public class FemAttachedFrame extends AttachedFrame
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityCompositeComponent.NavpanelDisplay| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
dynamicVelInWorldCoords, myRenderFrameenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITIONTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
FemAttachedFrame()
Creates a new FemAttachedFrame with default (identity) pose and no
FEM attachment assigned.
|
FemAttachedFrame(FemElement3dBase elem,
RigidTransform3d pose)
Creates a new FemAttachedFrame with the specified world pose and attaches
it to the given FEM element.
|
FemAttachedFrame(RigidTransform3d pose)
Creates a new FemAttachedFrame with the specified world pose and no
FEM attachment assigned.
|
| Modifier and Type | Method and Description |
|---|---|
FemAttachedFrame |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
FrameFem3dAttachment |
getAttachment()
Returns the slave attachment associated with this component, if any.
|
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
FemElement3dBase |
getElement()
Returns the FEM element to which this frame is currently attached,
or
null if the attachment is node-based rather than
element-based. |
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
boolean |
resetElement(FemModel3d model)
Called when the frame is moved (or when we remesh underneath it)
and we need to redetermine which element this frame is embedded in.
|
boolean |
resetElement(FemModel3d model,
boolean project)
Called when the frame is moved (or when we remesh underneath it)
and we need to redetermine which element this frame is embedded in.
|
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
setAttached(DynamicAttachment ax)
Attach this component to another via a DynamicAttachment object.
|
void |
setFromElement(FemElement3dBase elem)
Attaches this frame to the specified FEM element.
|
void |
setFromFem(FemModel3d fem)
Attaches this frame to the nearest element in the specified FEM model,
projecting the frame's origin onto the model surface if it lies outside.
|
boolean |
setFromFem(FemModel3d fem,
boolean project)
Attaches this frame to the nearest element in the specified FEM model.
|
boolean |
setFromNodes(java.util.Collection<FemNode3d> nodes)
Attaches this frame to the specified nodes using inverse-distance
weighting based on the frame's current pose.
|
boolean |
setFromNodes(java.util.Collection<FemNode3d> nodes,
VectorNd weights)
Attaches this frame to a weighted combination of the specified nodes.
|
boolean |
setFromNodes(FemNode3d[] nodes)
Attaches this frame to the specified nodes using inverse-distance
weighting based on the frame's current pose.
|
boolean |
setFromNodes(FemNode3d[] nodes,
double[] weights)
Attaches this frame to a weighted combination of the specified nodes.
|
void |
updateAttachment() |
void |
updateState()
Updates the pose and velocity of this frame from the current state
of its attached nodes.
|
connectAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachments, getHardReferencesadd, add1DConstraintBlocks, add2DConstraintBlocks, addAttachedFrame, addAttachedFrame, addAttachedFrameWorld, addEffectiveFrameMass, addEffectivePointMass, addExternalForce, addForce, addForce, addFrameForce, addMarker, addMarker, addMarker, addMarkerWorld, addPointForce, addPointForce, addPosImpulse, addPosJacobian, addRelativeVelocity, addScaledExternalForce, addSolveBlock, addSolveBlocks, addTargetJacobian, addToPointVelocity, addTransformableDependencies, addVelJacobian, applyExternalForces, applyForces, applyGravity, canAddMarker, clearAttachedFrames, clearMarkers, collectMasterComponents, componentChanged, computeAppliedWrench, computeForceOnMasters, computeFrameLocation, computeFramePosition, computeFramePosVel, computeFrameVelocity, computePointCoriolis, computePointLocation, computePointPosition, computePointPosVel, computePointVelocity, createFrameAttachment, createMarker, createMarker, createMassBlock, createPointAttachment, createRenderProps, findComponent, get, get, getAttachedFrames, getAxisDrawStyle, getAxisLength, getBodyForce, getBodyVelocity, getBodyVelState, getByNumber, getChildren, getEffectiveMass, getEffectiveMass, getEffectiveMassForces, getExternalForce, getForce, getForce, getForce, getFrameDamping, getFrameDampingMode, getFrameMarkers, getJacobianType, getMarkers, getMass, getMass, getMoment, getNavpanelDisplay, getNumberLimit, getOrientation, getOrientation, getPosDerivative, getPose, getPose, getPosition, getPosState, getPosStateSize, getRenderFrame, getRotaryDamping, getRotaryDampingMode, getRotation, getSelection, getState, getTargetActivity, getTargetOrientation, getTargetPos, getTargetPose, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getTransForce, getVelocity, getVelocity, getVelState, getVelStateSize, getWorldVelState, hasChildren, hasForce, hierarchyContainsReferences, indexOf, isMassConstant, mulInverseEffectiveMass, numComponents, postscan, prerender, remove, removeAttachedFrame, removeMarker, render, resetEffectiveMass, resetTargets, scaleMass, scan, setAxisDrawStyle, setAxisLength, setBodyVelocity, setContactConstraint, setExternalForce, setForce, setForce, setFrameDamping, setFrameDampingMode, setNavpanelDisplay, setOrientation, setPose, setPosition, setPosState, setRandomForce, setRandomPosState, setRandomVelState, setRotaryDamping, setRotaryDampingMode, setRotation, setState, setState, setTargetActivity, setTargetOrientation, setTargetPos, setTargetPose, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, transformGeometry, transformPose, updateAttachmentPosStates, updateBounds, updateNameMap, velocityLimitExceeded, zeroExternalForces, zeroForcesaddAttachmentRequest, addConstrainer, addMasterAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeAttachmentRequest, removeConstrainer, removeMasterAttachment, setSolveIndex, transformGeometrydefaultRenderPropsAreNull, getRenderHints, getRenderProps, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getGrandParent, 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, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenpostscanisWritable, writeaddAttachmentRequest, removeAttachmentRequestaddConstrainer, addMasterAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setSolveIndexadvanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, hasState, numAuxVars, requiresAdvance, setAuxVarStatetransformGeometry, transformPriorityisControllablerecursivelyFindpublic static PropertyList myProps
public FemAttachedFrame()
public FemAttachedFrame(RigidTransform3d pose)
pose - transform from this frame to world coordinatespublic FemAttachedFrame(FemElement3dBase elem, RigidTransform3d pose)
elem - FEM element to attach topose - transform from this frame to world coordinatespublic PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class Framepublic void setAttached(DynamicAttachment ax)
DynamicComponentBasesetAttached in interface DynamicAgentsetAttached in class DynamicComponentBaseax - Specifies the attachment relationship between
this component and its master(s)public FrameFem3dAttachment getAttachment()
getAttachment in interface AttachingComponentgetAttachment in interface DynamicAgentgetAttachment in class DynamicComponentBasepublic FemElement3dBase getElement()
null if the attachment is node-based rather than
element-based.nullpublic void setFromElement(FemElement3dBase elem)
elem - element to attach the frame topublic void setFromFem(FemModel3d fem)
fem - FEM model to attach topublic boolean setFromFem(FemModel3d fem, boolean project)
project is
true, it is projected onto the model surface; otherwise,
returns false without attaching.fem - FEM model to attach toproject - if true, project the origin onto the surface
when it lies outside the modelfalse if the origin is outside the model and
project is falsepublic boolean setFromNodes(java.util.Collection<FemNode3d> nodes, VectorNd weights)
nodes - nodes to attach the frame toweights - weight for each nodefalse if the weighting computation did not fully convergepublic boolean setFromNodes(FemNode3d[] nodes, double[] weights)
nodes - nodes to attach the frame toweights - weight for each nodefalse if the weighting computation did not fully convergepublic boolean setFromNodes(java.util.Collection<FemNode3d> nodes)
nodes - nodes to attach the frame tofalse if the weighting computation did not fully convergepublic boolean setFromNodes(FemNode3d[] nodes)
nodes - nodes to attach the frame tofalse if the weighting computation did not fully convergepublic void updateState()
updateState in class AttachedFramepublic void updateAttachment()
public boolean resetElement(FemModel3d model)
public boolean resetElement(FemModel3d model, boolean project)
public void scaleDistance(double s)
ScalableUnitsscaleDistance in interface ScalableUnitsscaleDistance in class Frames - scaling factorpublic boolean isDuplicatable()
true if and only if CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent) returns true.
This method is not currently used. It is intended to provide a faster
way of determining if a component can be duplicated, without having to
use CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent) to build the list of copy references.
isDuplicatable in interface CopyableComponentisDuplicatable in class Frametrue if this component can be duplicated.public boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
true if and only if CopyableComponent.isDuplicatable() returns
true.getCopyReferences in interface CopyableComponentgetCopyReferences in class Framerefs - list to which references are appendedancestor - root node of the hierarchy from which references are to be excludedpublic FemAttachedFrame copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponentCOPY_REFERENCES
is set in flags, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap.copy in interface CopyableComponentcopy in class Frameflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
components