public class EBBeamBody extends DeformableBody
RigidBody.InertiaMethod
Collidable.Collidability, Collidable.Group
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
boolean |
applyXCorrection |
static PropertyList |
myProps |
double |
myXScale |
static boolean |
useMassCrossTerms |
static boolean |
useNewMass |
static boolean |
useNewMassDamping |
DEFAULT_SUBMESHES_SELECTABLE
dynamicVelInWorldCoords, myRenderFrame
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
All, AllBodies, Deformable, Rigid, Self
COPY_REFERENCES, REST_POSITION
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
EBBeamBody() |
EBBeamBody(double len,
double rad,
double density,
double E) |
EBBeamBody(PolygonalMesh mesh,
double len,
double density,
double E) |
Modifier and Type | Method and Description |
---|---|
void |
addEffectiveFrameMass(SpatialInertia M,
RigidTransform3d TFL0)
Adds a frame inertia to the effective spatial inertia for this Frame.
|
void |
addEffectivePointMass(double m,
Vector3d loc)
Adds a point mass to the effective spatial inertia for this Frame.
|
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 |
applyGravity(Vector3d gacc)
Applies a gravity force to this component, given a prescribed
gravity acceleration vector.
|
void |
computeDeformedFrame(RigidTransform3d A,
RigidTransform3d A0) |
void |
computeDeformedFrameVel(Twist vel,
RigidTransform3d A0)
Computes the spatial velocity of an attached frame A, as represented in
body coordinates.
|
void |
computeDeformedLocation(Vector3d pos,
Vector3d pos0)
Computes the deformed position in body coordinates
|
void |
computeElasticJacobian(MatrixNd Pi,
RigidTransform3d A0,
boolean worldCoords)
Compute the transform that maps elastic velocities onto the spatial
velocity of an attached frame A.
|
void |
computeStiffnessMatrix() |
void |
computeUndeformedFrame(RigidTransform3d A0,
RigidTransform3d A) |
double |
computeUndeformedLocation(Vector3d pos0,
Vector3d pos,
double tol)
Computes the undeformed position of a given position in body coordinates
|
double |
dshape0(double xi) |
double |
dshape1(double xi) |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getDShape(Matrix3d Dshp,
int i,
Vector3d pos0) |
SpatialInertia |
getEffectiveInertia() |
double |
getEffectiveMass()
Gets the effective scalar mass of this component.
|
void |
getEffectiveMass(Matrix M,
double t)
Gets the effective mass of this component at a particular time.
|
int |
getEffectiveMassForces(VectorNd f,
double t,
int idx)
Gets the mass forces for this component at a particular time.
|
void |
getMass(Matrix M,
double t)
Gets the mass of this component at a particular time.
|
void |
getShape(Vector3d shp,
int i,
Vector3d pos0) |
double |
getStiffness() |
static void |
main(java.lang.String[] args) |
int |
numElasticCoords() |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
resetEffectiveMass()
Resets the effective mass of this component to the nominal mass.
|
<T extends FemMaterial> |
setMaterial(T mat) |
void |
setStiffness(double E) |
double |
shape0(double xi) |
double |
shape1(double xi) |
void |
updateStiffnessMatrix() |
addDeformedFrameForce, addElasticForce, addExternalElasticForce, addForce, addFrameForce, addPointForce, addPointForce, addPosImpulse, addPosJacobian, addScaledExternalElasticForce, addSolveBlock, addToPointVelocity, applyExternalForces, computeDeformationGradient, computeDeformedVelocity, computeFrameLocation, computeFramePosition, computeFrameVelocity, computePointCoriolis, computePointLocation, computePointPosition, computePointVelocity, computeUndeformedLocation, computeWorldPointForceJacobian, createDefaultMaterial, createMassBlock, getDistanceGridComp, getElasticForce, getElasticPos, getElasticPos, getElasticPos, getElasticVel, getElasticVel, getElasticVel, getExternalElasticForce, getForce, getFreezeFrame, getInverseMass, getMassDamping, getMaterial, getPosDerivative, getPosState, getPosStateSize, getStiffnessDamping, getVelState, getVelStateSize, hasDistanceGrid, invalidateStiffness, isDeformable, mulInverseEffectiveMass, propertyChanged, setContactConstraint, setElasticForce, setElasticPos, setElasticPos, setElasticVel, setElasticVel, setExternalElasticForce, setForce, setFreezeFrame, setMassDamping, setPosState, setRandomForce, setRandomPosState, setRandomVelState, setStiffnessDamping, setVelState, zeroExternalForces, zeroForces
add, addConnector, addMesh, addMesh, addMesh, addMeshComp, addTransformableDependencies, allowCollision, centerPoseOnCenterOfMass, clearMeshComps, collectVertexMasters, componentChanged, containsConnector, containsContactMaster, containsMeshComp, copy, createBox, createBox, createBox, createCylinder, createEllipsoid, createFromMesh, createFromMesh, createFromMesh, createFromMesh, createIcosahedralSphere, createRenderProps, createSphere, extrapolatePose, findComponent, get, get, getByNumber, getCenterOfMass, getCenterOfMass, getCharacteristicRadius, getChildren, getCollidable, getCollidableAncestor, getCollidableIndex, getCollisionMesh, getConnectors, getCopyReferences, getDensity, getDensityRange, getDistanceGrid, getDistanceGridRes, getEffectiveMassForces, getFrameMarkers, getGridSurfaceRendering, getInertia, getInertialDamping, getInertialDampingMode, getInertiaMethod, getMass, getMass, getMassRange, getMesh, getMeshComp, getMeshComp, getMeshComps, getNavpanelDisplay, getNumberLimit, getRotationalInertia, getRotationalInertia, getSubmeshesSelectable, getSurfaceMesh, getSurfaceMeshComp, getSurfaceMeshes, getVolume, hasChildren, hasForce, hasInvariantMasters, hierarchyContainsReferences, indexOf, isCompound, isDuplicatable, isFreeBody, isMassConstant, mulInverseEffectiveMass, numComponents, numMeshComps, numSurfaceMeshes, penetrationDistance, postscan, prerender, remove, removeConnector, removeMeshComp, removeMeshComp, scaleDistance, scaleMass, scaleSurfaceMesh, scan, setCenterOfMass, setCollidable, setCollidableIndex, setDensity, setDisplayMode, setDistanceGridRes, setDynamic, setGridSurfaceRendering, setInertia, setInertia, setInertia, setInertia, setInertiaFromDensity, setInertiaFromMass, setInertialDamping, setInertialDampingMode, setInertiaMethod, setMass, setMesh, setMesh, setMesh, setPose, setRotationalInertia, setSubmeshesSelectable, setSurfaceMesh, setSurfaceMesh, setSurfaceMesh, subEffectiveInertia, surfaceTangent, transformCoordinateFrame, transformGeometry, translateCoordinateFrame, updateBounds, updateNameMap, write
add1DConstraintBlocks, add2DConstraintBlocks, addExternalForce, addForce, addPointForce, addRelativeVelocity, addScaledExternalForce, addSolveBlocks, addTargetJacobian, collectMasterComponents, computeAppliedWrench, computeForceOnMasters, computeFramePosVel, computePointPosVel, createFrameAttachment, createPointAttachment, getAxisDrawStyle, getAxisLength, getBodyForce, getBodyVelocity, getBodyVelState, getExternalForce, getForce, getForce, getFrameDamping, getFrameDampingMode, getJacobianType, getMoment, getOrientation, getOrientation, getPose, getPose, getPosition, getRenderFrame, getRotaryDamping, getRotaryDampingMode, getRotation, getSelection, getState, getTargetActivity, getTargetOrientation, getTargetPos, getTargetPose, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getTransForce, getVelocity, getVelocity, getWorldVelState, resetTargets, setAxisDrawStyle, setAxisLength, setBodyVelocity, setExternalForce, setForce, setFrameDamping, setFrameDampingMode, setOrientation, setPose, setPosition, setRotaryDamping, setRotaryDampingMode, setRotation, setState, setState, setTargetActivity, setTargetOrientation, setTargetPos, setTargetPose, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, transformPose, updateAttachmentPosStates, velocityLimitExceeded
addAttachmentRequest, addConstrainer, addMasterAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, getConstrainers, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeAttachmentRequest, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex, transformGeometry
defaultRenderPropsAreNull, getRenderHints, getRenderProps, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transformPose
createFrameAttachment
createPointAttachment
addAttachmentRequest, removeAttachmentRequest
addConstrainer, addMasterAttachment, getAttachment, getConstrainers, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex
advanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, hasState, numAuxVars, requiresAdvance, setAuxVarState
transformGeometry, transformPriority
isControllable
public static boolean useNewMass
public static boolean useNewMassDamping
public static boolean useMassCrossTerms
public boolean applyXCorrection
public double myXScale
public static PropertyList myProps
public EBBeamBody()
public EBBeamBody(PolygonalMesh mesh, double len, double density, double E)
public EBBeamBody(double len, double rad, double density, double E)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class DeformableBody
public double getStiffness()
public void setStiffness(double E)
public <T extends FemMaterial> T setMaterial(T mat)
setMaterial
in class DeformableBody
public int numElasticCoords()
numElasticCoords
in class DeformableBody
public void computeDeformedLocation(Vector3d pos, Vector3d pos0)
DeformableBody
computeDeformedLocation
in class DeformableBody
public double computeUndeformedLocation(Vector3d pos0, Vector3d pos, double tol)
DeformableBody
computeUndeformedLocation
in class DeformableBody
public void computeDeformedFrame(RigidTransform3d A, RigidTransform3d A0)
computeDeformedFrame
in class DeformableBody
public void computeUndeformedFrame(RigidTransform3d A0, RigidTransform3d A)
computeUndeformedFrame
in class DeformableBody
public void computeDeformedFrameVel(Twist vel, RigidTransform3d A0)
DeformableBody
computeDeformedFrameVel
in class DeformableBody
public void computeElasticJacobian(MatrixNd Pi, RigidTransform3d A0, boolean worldCoords)
DeformableBody
computeElasticJacobian
in class DeformableBody
Pi
- stores the elastic JacobianA0
- rest pose of A (relative to the body frame)worldCoords
- if true
, the spatial velocity is rotated
into world coordinates. Otherwise, it is returned in the coordinates of
A.public void updateStiffnessMatrix()
updateStiffnessMatrix
in class DeformableBody
public void computeStiffnessMatrix()
public void getMass(Matrix M, double t)
DynamicAgent
getMass
in interface DynamicAgent
getMass
in class DeformableBody
M
- matrix to return the mass int
- current timepublic int getEffectiveMassForces(VectorNd f, double t, int idx)
DynamicAgent
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.getEffectiveMassForces
in interface DynamicAgent
getEffectiveMassForces
in class DeformableBody
f
- vector to return the forces int
- current timeidx
- starting location within f
where forces should be storedidx
public void getEffectiveMass(Matrix M, double t)
DynamicAgent
getEffectiveMass
in interface DynamicAgent
getEffectiveMass
in class DeformableBody
M
- matrix to return the mass int
- current timepublic double getEffectiveMass()
getEffectiveMass
in interface DynamicAgent
getEffectiveMass
in class RigidBody
public SpatialInertia getEffectiveInertia()
getEffectiveInertia
in class RigidBody
public void addEffectivePointMass(double m, Vector3d loc)
addEffectivePointMass
in class DeformableBody
m
- mass of the pointloc
- location of the point (in local frame coordinates)public void addEffectiveFrameMass(SpatialInertia M, RigidTransform3d TFL0)
addEffectiveFrameMass
in class RigidBody
M
- spatial inertia to be addedTFL0
- location of the inertia (in local frame coordinates)public void resetEffectiveMass()
DynamicAgent
resetEffectiveMass
in interface DynamicAgent
resetEffectiveMass
in class RigidBody
public void applyForces(double t)
ForceEffector
applyForces
in interface ForceEffector
applyForces
in class DeformableBody
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 DeformableBody
S
- solve matrix to which scaled velocity Jacobian is to be addeds
- scaling factor for velocity Jacobianpublic void applyGravity(Vector3d gacc)
Frame
applyGravity
in interface DynamicAgent
applyGravity
in class RigidBody
public void getShape(Vector3d shp, int i, Vector3d pos0)
getShape
in class DeformableBody
public double shape0(double xi)
public double shape1(double xi)
public double dshape0(double xi)
public double dshape1(double xi)
public void getDShape(Matrix3d Dshp, int i, Vector3d pos0)
getDShape
in class DeformableBody
public void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class RigidBody
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public static void main(java.lang.String[] args)