public abstract class PointAttachment extends DynamicAttachmentBase implements CopyableComponent
ModelComponent.NavpanelVisibility
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames
COPY_REFERENCES, REST_POSITION
Modifier and Type | Method and Description |
---|---|
int |
addTargetJacobian(SparseBlockMatrix j,
int bi) |
void |
applyForces() |
boolean |
checkMasterBlocks(MatrixBlock[] blks,
double eps)
Checks a set of master blocks to see if they are consistent with those
computed numerically.
|
PointAttachment |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of 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.
|
abstract void |
getCurrentPos(Vector3d pos)
Returns the current position of the attached point, in world coordinates.
|
DynamicComponent[] |
getMasters() |
Point |
getPoint() |
Point |
getSlave()
Returns the slave DynamicMechComponent associated with this attachment.
|
void |
invalidateMasters() |
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
void |
notifyMastersOfPositionChange()
If necessary, notify this attachment's master components that the
position state of one or more of them has changed.
|
int |
numMasters() |
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor) |
addBackRefs, addBackRefs, addConnectedMasterRefs, addMassToMasters, clone, connectAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, getDerivative, getGT, getHardReferences, mulSubGT, mulSubGTM, mulSubMG, oneMasterActive, oneMasterNotAttached, removeBackRefs, removeBackRefs, removeConnectedMasterRefs, setSlaveAffectsStiffness, slaveAffectsStiffness, updateAttachment, updatePosStates, updateVelStates
checkFlag, checkName, checkNameUniqueness, clearFlag, createTempFlag, getAllPropertyInfo, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, 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
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
postscan
isWritable, write
public Point getSlave()
DynamicAttachmentBase
null
.getSlave
in interface DynamicAttachment
getSlave
in class DynamicAttachmentBase
public Point getPoint()
public DynamicComponent[] getMasters()
getMasters
in interface DynamicAttachment
getMasters
in class DynamicAttachmentBase
public int numMasters()
numMasters
in interface DynamicAttachment
numMasters
in class DynamicAttachmentBase
public void invalidateMasters()
invalidateMasters
in interface DynamicAttachment
invalidateMasters
in class DynamicAttachmentBase
public abstract void getCurrentPos(Vector3d pos)
pos
- used to return current point positionpublic void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
java.io.IOException
public PointAttachment 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 DynamicAttachmentComp
copy
in interface CopyableComponent
copy
in class DynamicAttachmentBase
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
componentspublic void applyForces()
applyForces
in interface DynamicAttachment
applyForces
in class DynamicAttachmentBase
public 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
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
refs
- list to which references are appendedancestor
- root node of the hierarchy from which references are to be excludedpublic int addTargetJacobian(SparseBlockMatrix j, int bi)
public void notifyMastersOfPositionChange()
createNumericMasterBlocks()
. Attachments
only need to implement this method when setting the position state of one
or more masters, in isolation, incurs the need for other updates before a
subsequwent call to DynamicAttachmentBase.updatePosStates()
will perform correctly.public boolean checkMasterBlocks(MatrixBlock[] blks, double eps)