public class FrameFrameAttachment extends FrameAttachment
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
boolean |
debug |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITION| Constructor and Description |
|---|
FrameFrameAttachment() |
FrameFrameAttachment(Frame frame) |
FrameFrameAttachment(Frame frame,
Frame master) |
FrameFrameAttachment(Frame frame,
Frame master,
RigidTransform3d TFM) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMassToMasters() |
void |
applyForce(Wrench wr)
Applies a force to this frame, in world coordinates, by propagating
it through to the underlying master bodies.
|
void |
applyForces() |
FrameFrameAttachment |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
double |
getAverageMasterInertia()
Returns the average rotational inertia of the master components as seen
by the attached frame.
|
double |
getAverageMasterMass()
Returns the average mass of the master components as seen by the attached
frame.
|
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
void |
getCurrentTFW(RigidTransform3d TFW)
Returns the current pose of the attached frame, in world coordinates.
|
void |
getCurrentVel(Twist vel,
Twist dg)
Returns the current velocity of the attached frame, in frame coordinates.
|
boolean |
getDerivative(double[] buf,
int idx) |
Frame |
getMaster() |
void |
getMasterForces(VectorNd f,
Wrench wr)
Computes the master forces that result when a wr is applied in the
attached coordinate frame.
|
RigidTransform3d |
getTFM() |
void |
getUndeformedTFW(RigidTransform3d TFW)
Returns the current undeformed pose of the attached frame, in world
coordinates.
|
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
boolean |
isFlexible()
Indicates that this attachment is flexible.
|
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
set(Frame frame,
Frame master,
RigidTransform3d TFM) |
void |
set(Frame master,
RigidTransform3d TFW) |
boolean |
setCurrentTFW(RigidTransform3d TFW)
Sets the current pose of the attached frame, in world coordinates.
|
void |
setWithTFM(Frame master,
RigidTransform3d TFM) |
void |
updateAttachment()
Update attachment to reflect changes in the slave state.
|
void |
updatePosStates() |
void |
updateVelStates() |
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor) |
getFrame, getGT, getMasterBlocks, getMasters, getSlave, invalidateMasters, mulSubGT, mulSubGTM, mulSubMG, numMasters, scaleMass, transformGeometryaddBackRefs, addBackRefs, addConnectedMasterRefs, clone, connectAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, getHardReferences, oneMasterActive, oneMasterNotAttached, removeBackRefs, removeBackRefs, removeConnectedMasterRefs, setSlaveAffectsStiffness, slaveAffectsStiffnesscheckFlag, 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, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetAllPropertyInfo, getPropertygetChildren, hasChildrenpostscanisWritable, writepublic FrameFrameAttachment()
public FrameFrameAttachment(Frame frame)
public FrameFrameAttachment(Frame frame, Frame master, RigidTransform3d TFM)
public boolean isFlexible()
FrameAttachmentisFlexible in class FrameAttachmenttrue if this attachment is flexible.public Frame getMaster()
public RigidTransform3d getTFM()
public void set(Frame frame, Frame master, RigidTransform3d TFM)
public void set(Frame master, RigidTransform3d TFW)
public void setWithTFM(Frame master, RigidTransform3d TFM)
public void updatePosStates()
updatePosStates in interface DynamicAttachmentupdatePosStates in class DynamicAttachmentBasepublic void updateVelStates()
updateVelStates in interface DynamicAttachmentupdateVelStates in class DynamicAttachmentBasepublic void updateAttachment()
DynamicAttachmentBaseupdateAttachment in interface DynamicAttachmentupdateAttachment in class DynamicAttachmentBasepublic boolean setCurrentTFW(RigidTransform3d TFW)
FrameAttachmentsetCurrentTFW in class FrameAttachmentTFW - new pose for the attached frame, in world coordinatestrue if the underlying master
components have changedpublic void applyForces()
applyForces in interface DynamicAttachmentapplyForces in class FrameAttachmentpublic boolean getDerivative(double[] buf,
int idx)
getDerivative in interface DynamicAttachmentgetDerivative in class DynamicAttachmentBasepublic void addMassToMasters()
addMassToMasters in interface DynamicAttachmentaddMassToMasters in class DynamicAttachmentBasepublic void getCurrentTFW(RigidTransform3d TFW)
FrameAttachmentgetCurrentTFW in class FrameAttachmentTFW - used to return current frame pose.public void getUndeformedTFW(RigidTransform3d TFW)
FrameAttachmentgetCurrentTFW().getUndeformedTFW in class FrameAttachmentTFW - used to return current undeformed frame pose.FrameAttachment.isFlexible()public void getCurrentVel(Twist vel, Twist dg)
FrameAttachment\dot J velmwhere
J is the matrix that maps master velocities
to the attached frame velocity (in frame coordinates), and velm
are the master velocities.getCurrentVel in class FrameAttachmentvel - used to return current frame velocitydg - if not null, returns the velocity derivative termpublic void applyForce(Wrench wr)
applyForce in class FrameAttachmentwr - force to apply to the framepublic void getMasterForces(VectorNd f, Wrench wr)
f is auto-sized
to the correct size. The first six elements of f contain the
wrench applied to the master frame, rotated into world coordinates.f - returns the master forceswr - applied wrench (in attached frame coordinates)public double getAverageMasterMass()
getAverageMasterMass in class FrameAttachmentpublic double getAverageMasterInertia()
getAverageMasterInertia in class FrameAttachmentpublic void writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor)
throws java.io.IOException
writeItems in class FrameAttachmentjava.io.IOExceptionpublic 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 FrameAttachmenttrue 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 FrameAttachmentrefs - list to which references are appendedancestor - root node of the hierarchy from which references are to be excludedpublic void scaleDistance(double s)
ScalableUnitss - scaling factorpublic FrameFrameAttachment 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 DynamicAttachmentCompcopy in interface CopyableComponentcopy in class FrameAttachmentflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
components