artisynth.core.mechmodels
Class PointState

java.lang.Object
  extended by artisynth.core.mechmodels.PointState
All Implemented Interfaces:
ScalableUnits, TransformableGeometry

public class PointState
extends java.lang.Object
implements TransformableGeometry, ScalableUnits


Field Summary
 
Fields inherited from interface artisynth.core.util.TransformableGeometry
ARTICULATED, SIMULATING
 
Constructor Summary
PointState()
           
 
Method Summary
 void addPos(Point3d p)
           
 void addVel(Vector3d v)
           
 boolean equals(ComponentState state)
           
 int get(VectorNd x, int idx)
           
 Point3d getPos()
           
 int getPos(double[] buf, int idx)
           
 Vector3d getVel()
           
 int getVel(double[] buf, int idx)
           
 void scaledAddPos(double s, Point3d p)
           
 void scaledAddVel(double s, Vector3d v)
           
 void scaleDistance(double s)
          Scales all distance coordinates.
 void scaleMass(double s)
          Scales all mass units.
 void set(PointState pstate)
           
 int set(VectorNd x, int idx)
           
 int setPos(double[] buf, int idx)
           
 void setPos(Point3d pnt)
           
 int setVel(double[] buf, int idx)
           
 void setVel(Vector3d v)
           
 void transformGeometry(AffineTransform3dBase X)
          Applies an affine transformation to the geometry of this object.
 void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
          Applies an affine transformation to the geometry of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointState

public PointState()
Method Detail

set

public void set(PointState pstate)

set

public int set(VectorNd x,
               int idx)

get

public int get(VectorNd x,
               int idx)

getPos

public int getPos(double[] buf,
                  int idx)

getVel

public int getVel(double[] buf,
                  int idx)

setPos

public int setPos(double[] buf,
                  int idx)

setPos

public void setPos(Point3d pnt)

setVel

public int setVel(double[] buf,
                  int idx)

setVel

public void setVel(Vector3d v)

addPos

public void addPos(Point3d p)

scaledAddPos

public void scaledAddPos(double s,
                         Point3d p)

addVel

public void addVel(Vector3d v)

scaledAddVel

public void scaledAddVel(double s,
                         Vector3d v)

scaleDistance

public void scaleDistance(double s)
Description copied from interface: ScalableUnits
Scales all distance coordinates.

Specified by:
scaleDistance in interface ScalableUnits
Parameters:
s - scaling factor

scaleMass

public void scaleMass(double s)
Description copied from interface: ScalableUnits
Scales all mass units.

Specified by:
scaleMass in interface ScalableUnits
Parameters:
s - scaling factor

transformGeometry

public void transformGeometry(AffineTransform3dBase X)
Description copied from interface: TransformableGeometry
Applies an affine transformation to the geometry of this object. This method should be equivalent to
 transformGeometry (X, this, 0);
 

Specified by:
transformGeometry in interface TransformableGeometry
Parameters:
X - affine transformation

transformGeometry

public void transformGeometry(AffineTransform3dBase X,
                              TransformableGeometry topObject,
                              int flags)
Description copied from interface: TransformableGeometry
Applies an affine transformation to the geometry of this object. If recursively invoked within a component hierarchy, then topComponent should be the component for which the method was initially invoked. The variable flags provides information about the context in which the transformation is being applied. At present, the available flags are TransformableGeometry.SIMULATING and TransformableGeometry.ARTICULATED.

Specified by:
transformGeometry in interface TransformableGeometry
Parameters:
X - affine transformation
topObject - component on which the method was initially invoked
flags - provides information about the context in which the transformation is being applied.

equals

public boolean equals(ComponentState state)

getPos

public Point3d getPos()

getVel

public Vector3d getVel()