public class PlanarPoint extends Point implements PlanarComponent
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
myRenderCoordsenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITIONTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
PlanarPoint() |
PlanarPoint(double x,
double y) |
PlanarPoint(Point2d p) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPosition(double dx,
double dy,
double dz) |
void |
addSolveBlock(SparseNumberedBlockMatrix S) |
void |
addToSolveBlock(Matrix2d M) |
void |
addToSolveBlockDiagonal(double d) |
void |
addVelocity(double dx,
double dy,
double dz) |
PlanarPoint |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
MatrixBlock |
createSolveBlock() |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
PlanarComponent |
getPlanarComponent() |
RigidTransform3d |
getPlaneToWorld()
Returns the transform from plane coordinates to world coordinates.
|
Point3d |
getPosition()
Returns the current position of this point, in world coordinates.
|
Point2d |
getPosition2d() |
void |
getPosition2d(Vector2d p) |
int |
getPosState(double[] x,
int idx) |
MatrixBlock |
getSolveBlock() |
Vector3d |
getVelocity() |
Vector2d |
getVelocity2d() |
void |
getVelocity2d(Vector2d v) |
int |
getVelState(double[] v,
int idx) |
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
void |
setPlanarComponent(PlanarComponent pcomp) |
void |
setPosition(double x,
double y,
double z) |
void |
setPosition(Point3d p) |
void |
setPosition2d(double x,
double y) |
void |
setPosition2d(Point2d p) |
int |
setPosState(double[] p,
int idx) |
void |
setVelocity(Vector3d v) |
void |
setVelocity2d(Vector2d v) |
int |
setVelState(double[] v,
int idx) |
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 |
transformToPlane(Point3d pp,
Point3d pw) |
void |
transformToPlane(Vector3d vp,
Vector3d vw) |
void |
transformToWorld(Point3d pw,
Point3d pp) |
void |
transformToWorld(Vector3d vw,
Vector3d vp) |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
addEffectiveMass, addExternalForce, addForce, addForce, addPosImpulse, addPosJacobian, addScaledExternalForce, addScaledForce, addSolveBlocks, addTargetJacobian, addToPointVelocity, addToSolveBlockDiagonal, addTransformableDependencies, addVelJacobian, applyExternalForces, applyForces, applyGravity, createMassBlock, createRenderProps, defaultRenderPropsAreNull, distance, distance, getCopyReferences, getEffectiveMass, getEffectiveMass, getEffectiveMassForces, getExternalForce, getForce, getForce, getJacobianType, getMass, getMass, getPointDamping, getPointDampingMode, getPosDerivative, getPosition, getPosStateSize, getRenderCoords, getRenderProps, getSelection, getState, getTargetActivity, getTargetPos, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getVelocity, getVelStateSize, hasForce, isDuplicatable, isMassConstant, isSelectable, mulInverseEffectiveMass, render, resetEffectiveMass, resetTargets, scaleMass, setContactConstraint, setExternalForce, setForce, setForce, setPointDamping, setPointDampingMode, setRandomForce, setRandomPosState, setRandomVelState, setRenderProps, setScaledExternalForce, setState, setState, setTargetActivity, setTargetPos, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, subForce, updatePosState, updateVelState, velocityLimitExceeded, zeroExternalForces, zeroForcesaddAttachmentRequest, addConstrainer, addMasterAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeAttachmentRequest, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex, transformGeometrygetRenderHints, isVisible, numSelectionQueriesNeeded, setVisible, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, 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, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenpostscanisWritable, writeaddAttachmentRequest, removeAttachmentRequestaddConstrainer, addMasterAttachment, getAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndexadvanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, hasState, numAuxVars, requiresAdvance, setAuxVarStatetransformGeometry, transformPrioritypublic static PropertyList myProps
public PlanarPoint()
public PlanarPoint(Point2d p)
public PlanarPoint(double x,
double y)
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class Pointpublic void setPlanarComponent(PlanarComponent pcomp)
public PlanarComponent getPlanarComponent()
public RigidTransform3d getPlaneToWorld()
PlanarComponentgetPlaneToWorld in interface PlanarComponentpublic Point2d getPosition2d()
public void setPosition2d(Point2d p)
public void setPosition2d(double x,
double y)
public void setVelocity2d(Vector2d v)
public Vector2d getVelocity2d()
public Point3d getPosition()
PointgetPosition in class Pointpublic int getPosState(double[] x,
int idx)
getPosState in interface DynamicAgentgetPosState in class Pointpublic void getPosition2d(Vector2d p)
public void setPosition(Point3d p)
setPosition in class Pointpublic void setPosition(double x,
double y,
double z)
setPosition in class Pointpublic void addPosition(double dx,
double dy,
double dz)
public int setPosState(double[] p,
int idx)
setPosState in interface DynamicAgentsetPosState in class Pointpublic Vector3d getVelocity()
getVelocity in class Pointpublic int getVelState(double[] v,
int idx)
getVelState in interface DynamicAgentgetVelState in class Pointpublic void getVelocity2d(Vector2d v)
public void setVelocity(Vector3d v)
setVelocity in class Pointpublic void addVelocity(double dx,
double dy,
double dz)
public int setVelState(double[] v,
int idx)
setVelState in interface DynamicAgentsetVelState in class Pointpublic void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBasewrite.scan in interface ModelComponentscan in interface Scannablescan in class ModelComponentBasertok - Tokenizer from which to scan the elementref - optional reference object which can be used for resolving references to
other objectsjava.io.IOException - if an I/O or formatting error occuredpublic void prerender(RenderList list)
IsRenderablelist.addIfVisible (obj);
for each of the objects in question.prerender in interface IsRenderableprerender in class Pointlist - list of objects to be renderedpublic void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class Pointpmin - minimum pointpmax - maximum pointpublic void scaleDistance(double s)
ScalableUnitsscaleDistance in interface ScalableUnitsscaleDistance in class Points - scaling factorpublic void transformGeometry(GeometryTransformer gtr, TransformGeometryContext context, int flags)
TransformableGeometrygtr 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 TransformGeometryActions. 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 TransformableGeometrytransformGeometry in class Pointgtr - transformer implementing the transformcontext - context information, including what other components
are being transformedflags - specifies conditions associated with the transformationpublic void addSolveBlock(SparseNumberedBlockMatrix S)
addSolveBlock in interface DynamicAgentaddSolveBlock in class Pointpublic MatrixBlock createSolveBlock()
createSolveBlock in class Pointpublic MatrixBlock getSolveBlock()
public void addToSolveBlock(Matrix2d M)
public void addToSolveBlockDiagonal(double d)
public PlanarPoint 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 Pointflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
components