us.ihmc.simulationconstructionset.GroundContactPointGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simulation-construction-set
Show all versions of simulation-construction-set
Simulation Construction Set
package us.ihmc.simulationconstructionset;
import java.util.ArrayList;
public class GroundContactPointGroup
{
private ArrayList groundContactPoints = new ArrayList<>();
private ArrayList groundContactPointsInContact = new ArrayList<>();
private ArrayList groundContactPointsNotInContact = new ArrayList<>();
public GroundContactPointGroup()
{
}
public void addGroundContactPoint(GroundContactPoint groundContactPoint)
{
groundContactPoints.add(groundContactPoint);
}
public ArrayList getGroundContactPoints()
{
return groundContactPoints;
}
public void decideGroundContactPointsInContact()
{
groundContactPointsInContact.clear();
groundContactPointsNotInContact.clear();
for (int i = 0; i < groundContactPoints.size(); i++)
{
GroundContactPoint point = groundContactPoints.get(i);
if (point.isInContact())
groundContactPointsInContact.add(point);
else
groundContactPointsNotInContact.add(point);
}
}
public ArrayList getGroundContactPointsInContact()
{
return groundContactPointsInContact;
}
public ArrayList getGroundContactPointsNotInContact()
{
return groundContactPointsNotInContact;
}
}