public class GenericMarker extends Marker
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
myRenderCoords
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES, REST_POSITION
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
GenericMarker(Point3d pnt) |
GenericMarker(PointAttachment attach) |
Modifier and Type | Method and Description |
---|---|
int |
addTargetJacobian(SparseBlockMatrix J,
int bi)
Add a row to the motion target Jacobian for this motion target.
|
void |
applyForces() |
void |
connectToHierarchy(CompositeComponent hcomp)
Called by the system after this component, or an ancestor of this
component, is added to the component hierarchy (i.e., added as
a child of another CompositeComponent).
|
GenericMarker |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
void |
disconnectFromHierarchy(CompositeComponent hcomp)
Called by the system after this component, or an ancestor of this
component, is removed from the component hierarchy (i.e., removed as a
child of its parent).
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
PointAttachment |
getAttachment()
Returns the slave attachment associated with this component, if any.
|
void |
getAttachments(java.util.List<DynamicAttachment> list)
Returns the attachments contained by this component.
|
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
void |
setAttached(DynamicAttachment attachment)
Attach this component to another via a DynamicAttachment object.
|
void |
transformGeometry(GeometryTransformer gtr,
TransformGeometryContext context,
int flags)
Transforms the geometry of this component, using the geometry transformer
gtr to transform its individual attributes. |
void |
updateAttachment() |
void |
updatePosState() |
void |
updateState() |
void |
updateVelState() |
connectAttachment, getHardReferences
addEffectiveMass, addExternalForce, addForce, addForce, addPosImpulse, addPosJacobian, addScaledExternalForce, addScaledForce, addSolveBlock, addSolveBlocks, addToPointVelocity, addToSolveBlockDiagonal, addTransformableDependencies, addVelJacobian, applyExternalForces, applyForces, applyGravity, createMassBlock, createRenderProps, createSolveBlock, defaultRenderPropsAreNull, distance, distance, getEffectiveMass, getEffectiveMass, getEffectiveMassForces, getExternalForce, getForce, getForce, getJacobianType, getMass, getMass, getPointDamping, getPointDampingMode, getPosDerivative, getPosition, getPosition, getPosState, getPosStateSize, getRenderCoords, getRenderProps, getSelection, getState, getTargetActivity, getTargetPos, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getVelocity, getVelocity, getVelState, getVelStateSize, hasForce, isMassConstant, isSelectable, mulInverseEffectiveMass, prerender, render, resetEffectiveMass, resetTargets, scaleDistance, scaleMass, setContactConstraint, setExternalForce, setForce, setForce, setPointDamping, setPointDampingMode, setPosition, setPosition, setPosState, setRandomForce, setRandomPosState, setRandomVelState, setRenderProps, setScaledExternalForce, setState, setState, setTargetActivity, setTargetPos, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, subForce, updateBounds, velocityLimitExceeded, zeroExternalForces, zeroForces
addAttachmentRequest, addConstrainer, addMasterAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeAttachmentRequest, removeConstrainer, removeMasterAttachment, setSolveIndex, transformGeometry
getRenderHints, isVisible, numSelectionQueriesNeeded, setVisible, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
addAttachmentRequest, removeAttachmentRequest
addConstrainer, addMasterAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setSolveIndex
advanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, hasState, numAuxVars, requiresAdvance, setAuxVarState
transformGeometry, transformPriority
public static PropertyList myProps
public GenericMarker(Point3d pnt)
public GenericMarker(PointAttachment attach)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class Point
public void setAttached(DynamicAttachment attachment)
DynamicAgent
setAttached
in interface DynamicAgent
setAttached
in class DynamicComponentBase
attachment
- Specifies the attachment relationship between
this component and its master(s)public PointAttachment getAttachment()
DynamicAgent
getAttachment
in interface AttachingComponent
getAttachment
in interface DynamicAgent
getAttachment
in class DynamicComponentBase
public int addTargetJacobian(SparseBlockMatrix J, int bi)
vt = J u
addTargetJacobian
in interface MotionTargetComponent
addTargetJacobian
in class Point
J
- motion target Jacobianbi
- block row index for the row to be addedpublic void getAttachments(java.util.List<DynamicAttachment> list)
Marker
getAttachments
in interface HasAttachments
getAttachments
in class Marker
public void updateState()
updateState
in class Marker
public void updatePosState()
updatePosState
in class Point
public void updateVelState()
updateVelState
in class Point
public void applyForces()
public void updateAttachment()
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 Point
gtr
- transformer implementing the transformcontext
- context information, including what other components
are being transformedflags
- specifies conditions associated with the transformationpublic void connectToHierarchy(CompositeComponent hcomp)
ModelComponentBase
When this method is called, ModelComponent.getParent()
will return the new
parent component; the system will have set this beforehand.
connectToHierarchy
in interface ModelComponent
connectToHierarchy
in class Marker
hcomp
- hierarchy component to which this component,
or its ancestor, was attachedpublic void disconnectFromHierarchy(CompositeComponent hcomp)
ModelComponentBase
When this method is called, ModelComponent.getParent()
will still return this
original parent component; the system will set this to null
after.
disconnectFromHierarchy
in interface ModelComponent
disconnectFromHierarchy
in class Marker
hcomp
- hierarchy component from which this component,
or its ancestor, was detachedpublic 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 CopyableComponent
isDuplicatable
in class Point
true
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 CopyableComponent
getCopyReferences
in class Point
refs
- list to which references are appendedancestor
- root node of the hierarchy from which references are to be excludedpublic GenericMarker copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_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 CopyableComponent
copy
in class Point
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
components