public abstract class DeformableBody extends RigidBody
RigidBody.InertiaMethod
Collidable.DefaultCollidable
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
dynamicVelInWorldCoords, myRenderFrame
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES
Default, Deformable, RigidBody, Self
ARTICULATED, SIMULATING
TRANSLUCENT, TWO_DIMENSIONAL
Modifier and Type | Method and Description |
---|---|
void |
addPointForce(Vector3d f,
Point3d loc)
Adds the effect of a force applied at a specific postion with respect to
this frame.
|
void |
addPosImpulse(double[] xbuf,
int xidx,
double h,
double[] vbuf,
int vidx) |
void |
addPosJacobian(SparseNumberedBlockMatrix S,
double s)
Scales the components of the position Jacobian associated with this force
effector and adds it to the supplied solve matrix M.
|
void |
addSolveBlock(SparseNumberedBlockMatrix S) |
void |
addVelJacobian(SparseNumberedBlockMatrix S,
double s)
Scales the components of the velocity Jacobian associated with this force
effector and adds it to the supplied solve matrix M.
|
void |
applyForces(double t)
Adds forces to the components affected by this force effector at a
particular time.
|
void |
computeDeformationGradient(Matrix3d F,
Vector3d x0) |
void |
computeDeformedFrame(RigidTransform3d A,
PolarDecomposition3d polarDecomp,
RigidTransform3d A0) |
void |
computeDeformedFrame(RigidTransform3d A,
RigidTransform3d A0) |
void |
computeDeformedFrameVel(Twist vel,
PolarDecomposition3d polarDecomp,
RigidTransform3d A0)
Computes the spatial velocity of an attached frame A, as represented
in the coordinates of A.
|
void |
computeDeformedFrameVel(Twist vel,
RigidTransform3d A,
RigidTransform3d A0)
Computes the spatial velocity of an attached frame A, as represented
in the coordinates of A.
|
void |
computeDeformedPos(Vector3d pos,
Vector3d pos0)
Computes the deformed position in body coordinates
|
void |
computeDeformedVel(Vector3d vel,
Vector3d pos0)
Computes the deformed velocity in body coordinates
|
void |
computeElasticJacobian(MatrixNd Pi,
PolarDecomposition3d polarDecomp,
RigidTransform3d A0)
Compute the transform that maps elastic velocities onto the spatial
velocity of an attached frame A, as represented in the coordinates of A.
|
void |
computeElasticJacobian(MatrixNd Pi,
RigidTransform3d A,
RigidTransform3d A0)
Compute the transform that maps elastic velocities onto the spatial
velocity of an attached frame A, as represented in the coordinates
of A.
|
void |
computePointPosition(Vector3d pos,
Point3d loc)
Computes the position, in world coordinates, of a point attached to this
frame.
|
void |
computePointVelocity(Vector3d vel,
Point3d loc,
Twist frameVel)
Computes the velocity, in world coordinates, of a point attached to this
frame.
|
void |
computeUndeformedFrame(RigidTransform3d A0,
PolarDecomposition3d polarDecomp,
RigidTransform3d A) |
double |
computeUndeformedPos(Vector3d pos0,
Vector3d pos,
double tol)
Computes the undeformed position of a given position in body coordinates
|
static FemMaterial |
createDefaultMaterial() |
MatrixBlock |
createMassBlock()
Create a matrix block for representing the mass of this component,
initialized to the component's effective mass (instrinsic mass
plus the mass due to all attachmented components).
|
MatrixBlock |
createSolveBlock() |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
abstract void |
getDShape(Matrix3d Dshp,
int i,
Vector3d pos0) |
VectorNd |
getElasticForce() |
VectorNd |
getElasticPos() |
double |
getElasticPos(int idx) |
void |
getElasticPos(VectorNd pos) |
VectorNd |
getElasticVel() |
double |
getElasticVel(int idx) |
void |
getElasticVel(VectorNd vel) |
int |
getForce(double[] f,
int idx) |
void |
getInverseMass(Matrix Minv,
Matrix M)
Inverts a mass for this component.
|
void |
getMass(Matrix M,
double t)
Gets the mass of this component at a particular time.
|
double |
getMassDamping() |
int |
getMassForces(VectorNd f,
double t,
int idx)
Gets the mass forces for this component at a particular time.
|
FemMaterial |
getMaterial() |
int |
getPosDerivative(double[] dxdt,
int idx) |
int |
getPosState(double[] buf,
int idx) |
int |
getPosStateSize() |
abstract void |
getShape(Vector3d shp,
int i,
Vector3d pos0) |
double |
getStiffnessDamping() |
int |
getVelState(double[] buf,
int idx) |
int |
getVelStateSize() |
abstract int |
numElasticCoords() |
void |
setElasticPos(int idx,
double value) |
void |
setElasticPos(VectorNd pos) |
void |
setElasticVel(int idx,
double value) |
void |
setElasticVel(VectorNd vel) |
int |
setForce(double[] f,
int idx) |
void |
setForcesToExternal() |
void |
setMassDamping(double d) |
void |
setMaterial(FemMaterial mat) |
int |
setPosState(double[] buf,
int idx) |
void |
setState(DynamicMechComponent c)
Sets the state of this DynamicMechComponent from that of
another.
|
void |
setStiffnessDamping(double d) |
int |
setVelState(double[] buf,
int idx) |
abstract void |
updateStiffnessMatrix() |
void |
zeroExternalForces() |
void |
zeroForces() |
addScaledVelocity, addVelocity, applyForce, applyGravity, applyPosImpulse, computeVolume, copy, createBox, createCollisionData, createCylinder, createEllipsoid, createFromMesh, createFromMesh, createFromMesh, createFromMesh, createRenderProps, createSphere, extrapolatePose, findFreeAttachedBodies, getCenterOfMass, getCenterOfMass, getCopyReferences, getDensity, getDensityRange, getFrameMarkers, getInertia, getInertiaMethod, getMass, getMass, getMassRange, getMesh, getMeshFileName, getMeshFileTransform, getOriginData, getOriginPoint, getPointRenderRadius, getRelativePoses, getRotationalInertia, getRotationalInertia, getSurfaceMesh, isCollidable, isDuplicatable, isMassConstant, isPullable, prerender, render, scaleDistance, scaleMass, scaleMesh, scan, setBodyVelocity, setCenterOfMass, setDensity, setDynamic, setInertia, setInertia, setInertia, setInertia, setInertiaFromDensity, setInertiaFromMass, setInertiaMethod, setMass, setMesh, setMesh, setMeshFileName, setMeshFileTransform, setPose, setPose, setPosition, setRelativePoses, setRotation, setRotationalInertia, setState, setState, setSurfaceMesh, setSurfaceMesh, setVelocity, transformGeometry, transformGeometry, updateAttachmentPosStates, updateBounds, updatePose, write
addExternalForce, addForce, addScaledExternalForce, addSolveBlocks, addTargetJacobian, computeAppliedWrench, computeAppliedWrench, computePointVelocity, drawAxes, getAxisLength, getBodyForce, getBodyVelocity, getBodyVelState, getExternalForce, getForce, getForce, getFrameDamping, getFrameDampingMode, getJacobianType, getMoment, getOrientation, getPose, getPose, getPosition, getRotaryDamping, getRotaryDampingMode, getRotation, getSelection, getState, getState, getTargetActivity, getTargetOrientation, getTargetPos, getTargetPose, getTargetPosition, getTargetVel, getTargetVelocity, getTracables, getTracingProbe, getTransForce, getVelocity, getVelocity, getWorldVelState, resetTargets, setAxisLength, setExternalForce, setForce, setFrameDamping, setFrameDampingMode, setOrientation, setRotaryDamping, setRotaryDampingMode, setTargetActivity, setTargetOrientation, setTargetPos, setTargetPose, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, velocityLimitExceeded
addMasterAttachment, getAttachment, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeMasterAttachment, setAttached, setSolveIndex
getRenderHints, getRenderProps, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable
addMasterAttachment, checkFlag, clearFlag, getAttachment, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeMasterAttachment, setAttached, setFlag, setSolveIndex
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RigidBody
public abstract int numElasticCoords()
public void setMassDamping(double d)
public double getMassDamping()
public void setStiffnessDamping(double d)
public double getStiffnessDamping()
public static FemMaterial createDefaultMaterial()
public FemMaterial getMaterial()
public void setMaterial(FemMaterial mat)
public VectorNd getElasticPos()
public VectorNd getElasticVel()
public void getElasticPos(VectorNd pos)
public void getElasticVel(VectorNd vel)
public VectorNd getElasticForce()
public void setElasticPos(VectorNd pos)
public void setElasticVel(VectorNd vel)
public MatrixBlock createMassBlock()
DynamicMechComponent
createMassBlock
in interface DynamicMechComponent
createMassBlock
in class Frame
public void getMass(Matrix M, double t)
DynamicMechComponent
getMass
in interface DynamicMechComponent
getMass
in class RigidBody
M
- matrix to return the mass int
- current timepublic int getMassForces(VectorNd f, double t, int idx)
DynamicMechComponent
f
, starting at the location
specified by idx
. Upon return, this method should
return the value of idx
incremented by the dimension
of the mass forces.getMassForces
in interface DynamicMechComponent
getMassForces
in class RigidBody
f
- vector to return the forces int
- current timeidx
- starting location within f
where forces should be storedidx
public void getInverseMass(Matrix Minv, Matrix M)
DynamicMechComponent
getInverseMass
in interface DynamicMechComponent
getInverseMass
in class RigidBody
Minv
- matrix to return the inverse mass inM
- matrix containing the mass to be invertedpublic void addSolveBlock(SparseNumberedBlockMatrix S)
addSolveBlock
in interface DynamicMechComponent
addSolveBlock
in class Frame
public MatrixBlock createSolveBlock()
createSolveBlock
in interface DynamicMechComponent
createSolveBlock
in class Frame
public void setState(DynamicMechComponent c)
DynamicMechComponent
setState
in interface DynamicMechComponent
setState
in class Frame
c
- component from which the state is to be copied.public void addPosImpulse(double[] xbuf, int xidx, double h, double[] vbuf, int vidx)
addPosImpulse
in interface DynamicMechComponent
addPosImpulse
in class Frame
public int getPosDerivative(double[] dxdt, int idx)
getPosDerivative
in interface DynamicMechComponent
getPosDerivative
in class Frame
public int getPosState(double[] buf, int idx)
getPosState
in interface DynamicMechComponent
getPosState
in class Frame
public int setPosState(double[] buf, int idx)
setPosState
in interface DynamicMechComponent
setPosState
in class RigidBody
public int getVelState(double[] buf, int idx)
getVelState
in interface DynamicMechComponent
getVelState
in class Frame
public int setVelState(double[] buf, int idx)
setVelState
in interface DynamicMechComponent
setVelState
in class RigidBody
public int setForce(double[] f, int idx)
setForce
in interface DynamicMechComponent
setForce
in class Frame
public int getForce(double[] f, int idx)
getForce
in interface DynamicMechComponent
getForce
in class Frame
public int getPosStateSize()
getPosStateSize
in interface DynamicMechComponent
getPosStateSize
in interface MotionTargetComponent
getPosStateSize
in class Frame
public int getVelStateSize()
getVelStateSize
in interface DynamicMechComponent
getVelStateSize
in interface MotionTargetComponent
getVelStateSize
in class Frame
public void zeroForces()
zeroForces
in interface DynamicMechComponent
zeroForces
in class Frame
public void zeroExternalForces()
zeroExternalForces
in interface DynamicMechComponent
zeroExternalForces
in class Frame
public void setForcesToExternal()
setForcesToExternal
in interface DynamicMechComponent
setForcesToExternal
in class Frame
public abstract void updateStiffnessMatrix()
public void applyForces(double t)
ForceEffector
applyForces
in interface ForceEffector
applyForces
in class Frame
t
- time (seconds)public void addVelJacobian(SparseNumberedBlockMatrix S, double s)
ForceEffector
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
addVelJacobian
in interface ForceEffector
addVelJacobian
in class Frame
S
- solve matrix to which scaled velocity Jacobian is to be addeds
- scaling factor for velocity Jacobianpublic void addPosJacobian(SparseNumberedBlockMatrix S, double s)
ForceEffector
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
addPosJacobian
in interface ForceEffector
addPosJacobian
in class Frame
S
- solve matrix to which scaled position Jacobian is to be addeds
- scaling factor for position Jacobianpublic void computePointPosition(Vector3d pos, Point3d loc)
Frame
computePointPosition
in class Frame
pos
- returns the point positionloc
- position of the point, in body coordinatespublic void computePointVelocity(Vector3d vel, Point3d loc, Twist frameVel)
Frame
computePointVelocity
in class Frame
vel
- returns the point velocityloc
- position of the point, in body coordinatesframeVel
- velocity of the frame, in rotated world coordinatespublic void computeDeformedPos(Vector3d pos, Vector3d pos0)
public double computeUndeformedPos(Vector3d pos0, Vector3d pos, double tol)
public void computeDeformedVel(Vector3d vel, Vector3d pos0)
public void computeDeformedFrame(RigidTransform3d A, PolarDecomposition3d polarDecomp, RigidTransform3d A0)
public void computeUndeformedFrame(RigidTransform3d A0, PolarDecomposition3d polarDecomp, RigidTransform3d A)
public void computeDeformedFrame(RigidTransform3d A, RigidTransform3d A0)
public void computeDeformedFrameVel(Twist vel, RigidTransform3d A, RigidTransform3d A0)
public void computeElasticJacobian(MatrixNd Pi, RigidTransform3d A, RigidTransform3d A0)
public void computeDeformedFrameVel(Twist vel, PolarDecomposition3d polarDecomp, RigidTransform3d A0)
public void computeElasticJacobian(MatrixNd Pi, PolarDecomposition3d polarDecomp, RigidTransform3d A0)
public void addPointForce(Vector3d f, Point3d loc)
addPointForce
in class Frame
public void setElasticPos(int idx, double value)
public double getElasticPos(int idx)
public void setElasticVel(int idx, double value)
public double getElasticVel(int idx)