maspack.spatialmotion
Class RigidBodyConstraint

java.lang.Object
  extended by maspack.spatialmotion.RigidBodyConstraint

public class RigidBodyConstraint
extends java.lang.Object


Constructor Summary
RigidBodyConstraint()
           
 
Method Summary
 double getCompliance()
           
 double getContactAccel()
           
 Point3d getContactPoint()
          Returns the contact point for point contact constraints, or null otherwise.
 double getContactSpeed()
           
 double getDamping()
           
 double getDerivative()
           
 double getDistance()
           
 double getFriction()
           
 double getFrictionLimit()
           
 double getMultiplier()
           
 double getOffset()
           
 int getSolveIndex()
          Returns the index of this constraint within either the GT or NT matrix of the global system MLCP.
 void getState(DataBuffer data)
           
static int getStateSize()
           
 Wrench getWrenchA()
           
 Wrench getWrenchB()
           
 Wrench getWrenchC()
           
 boolean isUnilateral()
           
 void setCompliance(double c)
           
 void setContactAccel(double s)
           
 void setContactPoint(Point3d pnt)
          Sets the contact point for point contact constraints.
 void setContactSpeed(double s)
           
 void setDamping(double c)
           
 void setDerivative(double d)
           
 void setDistance(double d)
           
 void setFriction(double f)
           
 void setFrictionLimit(double f)
           
 void setMultiplier(double lam)
           
 void setOffset(double b)
           
 void setSolveIndex(int idx)
           
 void setState(DataBuffer data)
           
 void setUnilateral(boolean unilateral)
           
 void setWrenchA(Wrench wr)
           
 void setWrenchB(Wrench wr)
           
 void setWrenchC(Wrench wr)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RigidBodyConstraint

public RigidBodyConstraint()
Method Detail

setWrenchA

public void setWrenchA(Wrench wr)

getWrenchA

public Wrench getWrenchA()

setWrenchB

public void setWrenchB(Wrench wr)

getWrenchB

public Wrench getWrenchB()

setWrenchC

public void setWrenchC(Wrench wr)

getWrenchC

public Wrench getWrenchC()

isUnilateral

public boolean isUnilateral()

setUnilateral

public void setUnilateral(boolean unilateral)

getSolveIndex

public int getSolveIndex()
Returns the index of this constraint within either the GT or NT matrix of the global system MLCP.

Returns:
index within either GT or NT

setSolveIndex

public void setSolveIndex(int idx)

setDerivative

public void setDerivative(double d)

getDerivative

public double getDerivative()

setOffset

public void setOffset(double b)

getOffset

public double getOffset()

setMultiplier

public void setMultiplier(double lam)

getMultiplier

public double getMultiplier()

setDistance

public void setDistance(double d)

getDistance

public double getDistance()

setCompliance

public void setCompliance(double c)

getCompliance

public double getCompliance()

setDamping

public void setDamping(double c)

getDamping

public double getDamping()

setContactSpeed

public void setContactSpeed(double s)

getContactSpeed

public double getContactSpeed()

setContactAccel

public void setContactAccel(double s)

getContactAccel

public double getContactAccel()

setFrictionLimit

public void setFrictionLimit(double f)

getFrictionLimit

public double getFrictionLimit()

setFriction

public void setFriction(double f)

getFriction

public double getFriction()

setContactPoint

public void setContactPoint(Point3d pnt)
Sets the contact point for point contact constraints. A supplied value of null clears the contact point.

Parameters:
pnt - new contact point. The supplied value is copied internally.

getContactPoint

public Point3d getContactPoint()
Returns the contact point for point contact constraints, or null otherwise. The point is given in the coordinates of bodyA. This is intended for use by solvers in computing the friction. return contact point for point contacts. Should not be modfied.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStateSize

public static int getStateSize()

getState

public void getState(DataBuffer data)

setState

public void setState(DataBuffer data)