|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.mechmodels.RigidBodyContact
public class RigidBodyContact
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface artisynth.core.mechmodels.HasAuxState |
---|
HasAuxState.StateContext |
Field Summary |
---|
Fields inherited from interface maspack.render.GLRenderable |
---|
TRANSLUCENT, TWO_DIMENSIONAL |
Constructor Summary | |
---|---|
RigidBodyContact(RigidBody b0,
PolygonalMesh m0,
RigidBody b1,
PolygonalMesh m1)
|
|
RigidBodyContact(RigidBody b0,
RigidBody b1)
|
Method Summary | |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt)
|
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int numf)
|
int |
addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
IntHolder changeCnt)
|
void |
advanceAuxState(double t0,
double t1)
Called at the very beginning of the time step (in the system's preadvance() method) to perform any required updating of the component's state before the application in input probes or controllers. |
RenderProps |
createRenderProps()
|
boolean |
equals(java.lang.Object obj)
|
void |
getAuxState(DataBuffer data)
Saves state information for this component by adding data to the supplied DataBuffer. |
MatrixNdBlock |
getBilateralBlockA(int numb)
|
MatrixNdBlock |
getBilateralBlockB(int numb)
|
int |
getBilateralConstraints(java.util.ArrayList<RigidBodyConstraint> bilaterals)
Gets the bilateral constraints associated with this constrainer. |
int |
getBilateralImpulses(VectorNd lam,
int idx)
|
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
|
void |
getBilateralSizes(VectorNi sizes)
|
RigidBody |
getBodyA()
Returns the first body associated with this constrainer. |
RigidBody |
getBodyB()
Returns the second body associated with this constrainer, or null if there is no such body. |
double |
getFriction()
|
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
Saves initial state information data for this component by adding data to the supplied data buffer. |
double |
getPenetrationTol()
|
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable. |
MatrixNdBlock |
getUnilateralBlockA(int numu)
|
MatrixNdBlock |
getUnilateralBlockB(int numu)
|
double |
getUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals,
boolean setEngaged)
Gets the unilateral constraints associated with this constrainer. |
int |
getUnilateralImpulses(VectorNd the,
int idx)
|
int |
getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
|
void |
getUnilateralSizes(VectorNi sizes)
|
boolean |
hasActiveContact()
|
int |
hashCode()
|
boolean |
hasUnilateralConstraints()
Returns true if this constrainer has unilateral constraints. |
int |
maxFrictionConstraintSets()
|
int |
numBilateralConstraints()
Returns the number of bilateral constraints associated with this constrainer. |
int |
numUnilateralConstraints()
Returns the number of unilateral constraints which are currently engaged. |
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn by a GLRenderer. |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL. |
void |
scaleDistance(double s)
|
void |
setAuxState(DataBuffer data)
Restores the state for this component by reading from the supplied data buffer, starting at the current buffer offsets. |
int |
setBilateralImpulses(VectorNd lam,
double h,
int idx)
|
void |
setFriction(double mu)
|
void |
setPenetrationTol(double tol)
|
int |
setUnilateralImpulses(VectorNd the,
double h,
int idx)
|
void |
skipAuxState(DataBuffer data)
Skips over the state information for this component contained in the supplied data buffer, starting at the current buffer offsets. |
void |
transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject)
|
void |
updateBodyStates(double t,
boolean setEngaged)
Updates internal information needed for computing constraints. |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object. |
double |
updateConstraints(double t,
int flags)
|
void |
updateUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals,
int offset,
int num)
Updates the unilateral constraints associated with this constrainer. |
double |
updateValues(double t)
|
void |
zeroImpulses()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RigidBodyContact(RigidBody b0, PolygonalMesh m0, RigidBody b1, PolygonalMesh m1)
public RigidBodyContact(RigidBody b0, RigidBody b1)
Method Detail |
---|
public void setPenetrationTol(double tol)
setPenetrationTol
in interface RigidBodyConstrainer
public double getPenetrationTol()
getPenetrationTol
in interface RigidBodyConstrainer
public RigidBody getBodyA()
RigidBodyConstrainer
getBodyA
in interface RigidBodyConstrainer
public RigidBody getBodyB()
RigidBodyConstrainer
getBodyB
in interface RigidBodyConstrainer
public double getFriction()
public void setFriction(double mu)
public MatrixNdBlock getBilateralBlockA(int numb)
getBilateralBlockA
in interface RigidBodyConstrainer
public MatrixNdBlock getBilateralBlockB(int numb)
getBilateralBlockB
in interface RigidBodyConstrainer
public MatrixNdBlock getUnilateralBlockA(int numu)
getUnilateralBlockA
in interface RigidBodyConstrainer
public MatrixNdBlock getUnilateralBlockB(int numu)
getUnilateralBlockB
in interface RigidBodyConstrainer
public void updateBodyStates(double t, boolean setEngaged)
RigidBodyConstrainer
updateBodyStates
in interface RigidBodyConstrainer
t
- current time (seconds)setEngaged
- if true
, then the method should determine
which unilateral constraints are engagedpublic double updateValues(double t)
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
pmin
- minimum pointpmax
- maximum pointpublic int getRenderHints()
GLRenderable
TRANSLUCENT
.
getRenderHints
in interface GLRenderable
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public RenderProps createRenderProps()
public void scaleDistance(double s)
public void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject)
public boolean hasUnilateralConstraints()
RigidBodyConstrainer
hasUnilateralConstraints
in interface RigidBodyConstrainer
public int numUnilateralConstraints()
RigidBodyConstrainer
getUnilateralConstraints
with
setEngaged
set to false
.
numUnilateralConstraints
in interface RigidBodyConstrainer
public double getUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals, boolean setEngaged)
RigidBodyConstrainer
getUnilateralConstraints
in interface RigidBodyConstrainer
unilaterals
- array list into which the constrainer places the constraintssetEngaged
- if true, recompute the set of unilateral constraints.
If false, the set of unilateral constraints will stay the same.
public void updateUnilateralConstraints(java.util.ArrayList<RigidBodyConstraint> unilaterals, int offset, int num)
RigidBodyConstrainer
getUnilateralConstraints
, located at a specific offset within an array
list.
updateUnilateralConstraints
in interface RigidBodyConstrainer
unilaterals
- contains constraints which should be updatedoffset
- starting location of constraints within unilaterals
num
- number of constraints to updatepublic int setUnilateralImpulses(VectorNd the, double h, int idx)
setUnilateralImpulses
in interface Constrainer
setUnilateralImpulses
in interface RigidBodyConstrainer
public void zeroImpulses()
zeroImpulses
in interface Constrainer
zeroImpulses
in interface RigidBodyConstrainer
public int getUnilateralImpulses(VectorNd the, int idx)
getUnilateralImpulses
in interface Constrainer
getUnilateralImpulses
in interface RigidBodyConstrainer
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes
in interface Constrainer
getBilateralSizes
in interface RigidBodyConstrainer
public void getUnilateralSizes(VectorNi sizes)
getUnilateralSizes
in interface Constrainer
getUnilateralSizes
in interface RigidBodyConstrainer
public double updateConstraints(double t, int flags)
updateConstraints
in interface Constrainer
updateConstraints
in interface RigidBodyConstrainer
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb, IntHolder changeCnt)
addBilateralConstraints
in interface Constrainer
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo
in interface Constrainer
public int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu, IntHolder changeCnt)
addUnilateralConstraints
in interface Constrainer
public int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
getUnilateralInfo
in interface Constrainer
public int maxFrictionConstraintSets()
maxFrictionConstraintSets
in interface Constrainer
public int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
addFrictionConstraints
in interface Constrainer
public int numBilateralConstraints()
RigidBodyConstrainer
numBilateralConstraints
in interface RigidBodyConstrainer
public int getBilateralConstraints(java.util.ArrayList<RigidBodyConstraint> bilaterals)
RigidBodyConstrainer
getBilateralConstraints
in interface RigidBodyConstrainer
bilaterals
- array list into which the constrainer places the constraintspublic int setBilateralImpulses(VectorNd lam, double h, int idx)
setBilateralImpulses
in interface Constrainer
setBilateralImpulses
in interface RigidBodyConstrainer
public int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses
in interface Constrainer
getBilateralImpulses
in interface RigidBodyConstrainer
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void advanceAuxState(double t0, double t1)
HasAuxState
advanceAuxState
in interface HasAuxState
t0
- beginning time associated with the time step advancet1
- end time associated with the time step advancepublic void skipAuxState(DataBuffer data)
skipAuxState
in interface HasAuxState
data
- buffer containing the state informationpublic void getAuxState(DataBuffer data)
HasAuxState
getAuxState
in interface HasAuxState
data
- buffer for storing the state values.public void getInitialAuxState(DataBuffer newData, DataBuffer oldData)
HasAuxState
If oldData
is non-null, then this contains
previously stored initial state information (starting at its current
buffer offsets), which should be stored into
newData
in place of the current component state data.
This may only be partially possible if the component's state structure
has changed since oldData
was written.
getInitialAuxState
in interface HasAuxState
newData
- buffer for storing the state values.oldData
- if non-null, contains old state information that should be
written into newData
in place of the current state
information.public void setAuxState(DataBuffer data)
HasAuxState
setAuxState
in interface HasAuxState
data
- buffer containing the state informationpublic boolean hasActiveContact()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |