All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.simulationconstructionset.GroundContactPointGroup Maven / Gradle / Ivy

There is a newer version: 0.25.2
Show newest version
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;
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy