public class TargetFrame extends RigidBody implements TrackingTarget
RigidBody.InertiaMethod
ModelComponent.NavpanelVisibility
Collidable.Collidability, Collidable.Group
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
static VectorNd |
DEFAULT_SUB_WEIGHTS |
static double |
DEFAULT_WEIGHT |
static PropertyList |
myProps |
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 |
---|
TargetFrame() |
TargetFrame(RigidTransform3d X) |
Modifier and Type | Method and Description |
---|---|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list.
|
Frame |
getSourceComp()
Returns the source component associated with this target.
|
VectorNd |
getSubWeights()
Queries the subweights of this target.
|
int |
getTargetSize()
Queries the number of DOFs in the target.
|
double |
getWeight()
Queries the weight of this target.
|
void |
setDynamic(boolean dynamic)
Cannot set target frame as dynamic
|
void |
setSubWeights(VectorNd w)
Sets the subweights for this target.
|
void |
setWeight(double w)
Sets the weight for this target.
|
void |
transformGeometry(GeometryTransformer gtr,
TransformGeometryContext context,
int flags)
Transforms the geometry of this component, using the geometry transformer
gtr to transform its individual attributes. |
add, addConnector, addEffectiveFrameMass, addEffectivePointMass, addMesh, addMesh, addMesh, addMeshComp, addTransformableDependencies, addVelJacobian, allowCollision, applyForces, applyGravity, 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, getDistanceGridComp, getDistanceGridRes, getEffectiveInertia, getEffectiveMass, getEffectiveMass, getEffectiveMassForces, getEffectiveMassForces, getFrameMarkers, getGridSurfaceRendering, getInertia, getInertialDamping, getInertialDampingMode, getInertiaMethod, getInverseMass, getMass, getMass, getMass, getMassRange, getMesh, getMeshComp, getMeshComp, getMeshComps, getNavpanelDisplay, getNumberLimit, getRotationalInertia, getRotationalInertia, getSubmeshesSelectable, getSurfaceMesh, getSurfaceMeshComp, getSurfaceMeshes, getVolume, hasChildren, hasDistanceGrid, hasForce, hasInvariantMasters, hierarchyContainsReferences, indexOf, isCompound, isDeformable, isDuplicatable, isFreeBody, isMassConstant, mulInverseEffectiveMass, mulInverseEffectiveMass, numComponents, numMeshComps, numSurfaceMeshes, penetrationDistance, postscan, prerender, remove, removeConnector, removeMeshComp, removeMeshComp, render, resetEffectiveMass, scaleDistance, scaleMass, scaleSurfaceMesh, scan, setCenterOfMass, setCollidable, setCollidableIndex, setDensity, setDisplayMode, setDistanceGridRes, setGridSurfaceRendering, setInertia, setInertia, setInertia, setInertia, setInertiaFromDensity, setInertiaFromMass, setInertialDamping, setInertialDampingMode, setInertiaMethod, setMass, setMesh, setMesh, setMesh, setPose, setPosState, setRotationalInertia, setSubmeshesSelectable, setSurfaceMesh, setSurfaceMesh, setSurfaceMesh, subEffectiveInertia, surfaceTangent, transformCoordinateFrame, translateCoordinateFrame, updateBounds, updateNameMap, write
add1DConstraintBlocks, add2DConstraintBlocks, addExternalForce, addForce, addForce, addFrameForce, addPointForce, addPointForce, addPosImpulse, addPosJacobian, addRelativeVelocity, addScaledExternalForce, addSolveBlock, addSolveBlocks, addTargetJacobian, addToPointVelocity, applyExternalForces, collectMasterComponents, computeAppliedWrench, computeForceOnMasters, computeFrameLocation, computeFramePosition, computeFramePosVel, computeFrameVelocity, computePointCoriolis, computePointLocation, computePointPosition, computePointPosVel, computePointVelocity, createFrameAttachment, createMassBlock, createPointAttachment, getAxisDrawStyle, getAxisLength, getBodyForce, getBodyVelocity, getBodyVelState, getExternalForce, getForce, getForce, getForce, getFrameDamping, getFrameDampingMode, getJacobianType, getMoment, 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, resetTargets, setAxisDrawStyle, setAxisLength, setBodyVelocity, setContactConstraint, setExternalForce, setForce, setForce, setFrameDamping, setFrameDampingMode, setOrientation, setPose, setPosition, setRandomForce, setRandomPosState, setRandomVelState, setRotaryDamping, setRotaryDampingMode, setRotation, setState, setState, setTargetActivity, setTargetOrientation, setTargetPos, setTargetPose, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, transformPose, updateAttachmentPosStates, velocityLimitExceeded, zeroExternalForces, zeroForces
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, 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
connectToHierarchy, disconnectFromHierarchy, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
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 final double DEFAULT_WEIGHT
public static final VectorNd DEFAULT_SUB_WEIGHTS
public static PropertyList myProps
public TargetFrame()
public TargetFrame(RigidTransform3d X)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RigidBody
public double getWeight()
TrackingTarget
getWeight
in interface TrackingTarget
TrackingTarget.setWeight(double)
public void setWeight(double w)
TrackingTarget
setWeight
in interface TrackingTarget
w
- new target weightTrackingTarget.getWeight()
public VectorNd getSubWeights()
TrackingTarget
getSubWeights
in interface TrackingTarget
TrackingTarget.setSubWeights(maspack.matrix.VectorNd)
public void setSubWeights(VectorNd w)
TrackingTarget
TrackingTarget.getTargetSize()
, and each has a default value of 1. Subweights are
multiplied by the target weight (returned by TrackingTarget.getWeight()
) to yield
a net weight used to prioritize each degree of freedom in the tracking
computation, with higher weights resulting in more accurate tracking and
a weight of 0 resulting in no tracking at all.setSubWeights
in interface TrackingTarget
w
- new target subweightsTrackingTarget.getSubWeights()
public int getTargetSize()
TrackingTarget
getTargetSize
in interface TrackingTarget
public void setDynamic(boolean dynamic)
setDynamic
in class RigidBody
public void transformGeometry(GeometryTransformer gtr, TransformGeometryContext context, int flags)
TransformableGeometry
gtr
to transform its individual attributes. The
context
argument supplies information about what other
components are currently being transformed, and also allows the
requesting of update actions to be performed after all transform called
have completed. The context is also the usual entity that calls
this method, from within its TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method. The argument flags
provides flags to specify
various conditions associated with the the transformation.
At present, the available flags are TransformableGeometry.TG_SIMULATING
and
TransformableGeometry.TG_ARTICULATED
.
This method is not usually called directly by applications.
Instead, it is typically called from within the
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method of the context,
which takes care of the various operations needed for a
complete transform operation, including calling
TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int)
to collect other
components that should be transformed, calling
TransformableGeometry.transformGeometry(maspack.matrix.AffineTransform3dBase)
for each component, notifying
component parents that the geometry has changed, and calling
any requested TransformGeometryAction
s. More details
are given in the documentation for
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
.
TransformGeometryContext
provides a number of
static convenience transform
methods
which take care of building the context and calling
apply()
for a specified set of components.
This method should not
generally call transformGeometry()
for its descendant
components. Instead, descendants needing transformation should be
specified by adding them to the context in the method TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int)
.
transformGeometry
in interface TransformableGeometry
transformGeometry
in class RigidBody
gtr
- transformer implementing the transformcontext
- context information, including what other components
are being transformedflags
- specifies conditions associated with the transformationpublic Frame getSourceComp()
TrackingTarget
getSourceComp
in interface TrackingTarget
public void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBase
getHardReferences
in interface ModelComponent
getHardReferences
in class ModelComponentBase
refs
- list to which hard references are appended