public class Particle extends Point implements PointAttachable
ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description | 
|---|---|
| static PropertyList | myProps | 
myRenderCoordsenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCESTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description | 
|---|
| Particle() | 
| Particle(double m) | 
| Particle(double m,
        double x,
        double y,
        double z) | 
| Particle(double m,
        Point3d p) | 
| Particle(java.lang.String name,
        double m,
        double x,
        double y,
        double z) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addEffectiveMass(double m) | 
| void | applyGravity(Vector3d gacc)Applies a gravity force to this component, given a prescribed
 gravity acceleration vector. | 
| int | applyPosImpulse(double[] delx,
               int idx) | 
| ModelComponent | copy(int flags,
    java.util.Map<ModelComponent,ModelComponent> copyMap)Create a copy of this component. | 
| PointParticleAttachment | createPointAttachment(Point pnt)Returns a PointAttachment that attaches  pntto this component. | 
| PropertyList | getAllPropertyInfo()Returns a list giving static information about all properties exported by
 this object. | 
| Vector3d | getConstraint()Returns the constraint for this particle, if any. | 
| boolean | getCopyReferences(java.util.List<ModelComponent> refs,
                 ModelComponent ancestor)Collects external references which must also be copied in order to
 duplicate this component. | 
| double | getEffectiveMass() | 
| void | getEffectiveMass(Matrix M,
                double t)Gets the effective mass of this component at a particular time. | 
| void | getInverseMass(Matrix Minv,
              Matrix M)Inverts a mass for this component. | 
| double | getMass() | 
| double | getMass(double t)Returns the scalar mass of this component at time t. | 
| void | getMass(Matrix M,
       double t)Gets the mass of this component at a particular time. | 
| int | getVelDerivative(double[] dxdt,
                int idx,
                double mass) | 
| boolean | isDuplicatable()Returns true if this component can be duplicated. | 
| int | mulInverseEffectiveMass(Matrix M,
                       double[] a,
                       double[] f,
                       int idx) | 
| void | resetEffectiveMass()Resets the effective mass of this component to the nominal mass. | 
| void | scaleDistance(double s)Scales all distance coordinates. | 
| void | scaleMass(double s)Scales all mass units. | 
| void | setConstraint(Vector3d c)Sets a constraint for this particle. | 
| void | setDynamic(boolean dynamic) | 
| void | setMass(double m) | 
addExternalForce, addForce, addLocalForce, addPosImpulse, addPosJacobian, addScaledExternalForce, addScaledForce, addScaledLocalForce, addSolveBlock, addSolveBlocks, addTargetJacobian, addToPointVelocity, addToSolveBlockDiagonal, addTransformableDependencies, addVelJacobian, applyExternalForces, applyForces, createMassBlock, createRenderProps, createSolveBlock, distance, distance, getEffectiveMassForces, getExternalForce, getForce, getForce, getJacobianType, getLocalPosition, getLocalPosition, getLocalVelocity, getLocalVelocity, getPointDamping, getPointDampingMode, getPointFrame, getPosDerivative, getPosition, getPosition, getPosState, getPosStateSize, getRenderCoords, getRenderProps, getSelection, getState, getTargetActivity, getTargetPos, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getVelocity, getVelocity, getVelState, getVelStateSize, isMassConstant, isSelectable, prerender, render, resetTargets, setContactConstraint, setExternalForce, setForce, setForce, setLocalPosition, setLocalPosition, setLocalVelocity, setLocalVelocity, setPointDamping, setPointDampingMode, setPointFrame, setPosition, setPosition, setPosState, setRenderProps, setScaledExternalForce, setState, setState, setTargetActivity, setTargetPos, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, subForce, subLocalForce, transformGeometry, updateBounds, updatePosState, updateVelState, velocityLimitExceeded, zeroExternalForces, zeroForcesaddConstrainer, addMasterAttachment, getAttachment, getConstrainers, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex, transformGeometrygetRenderHints, numSelectionQueriesNeeded, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isConnectedToHierarchy, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writeaddConstrainer, addMasterAttachment, checkFlag, clearFlag, getAttachment, getConstrainers, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setFlag, setSolveIndextransformGeometrypublic static PropertyList myProps
public Particle()
public Particle(double m)
public Particle(double m,
                Point3d p)
public Particle(double m,
                double x,
                double y,
                double z)
public Particle(java.lang.String name,
                double m,
                double x,
                double y,
                double z)
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class Pointpublic Vector3d getConstraint()
public void setConstraint(Vector3d c)
c - constraint value.public double getMass()
public double getMass(double t)
DynamicComponentgetMass in interface DynamicComponentgetMass in class Pointpublic void getMass(Matrix M, double t)
DynamicComponentgetMass in interface DynamicComponentgetMass in class PointM - matrix to return the mass int - current timepublic double getEffectiveMass()
getEffectiveMass in class Pointpublic void getEffectiveMass(Matrix M, double t)
DynamicComponentgetEffectiveMass in interface DynamicComponentgetEffectiveMass in class PointM - matrix to return the mass int - current timepublic int mulInverseEffectiveMass(Matrix M, double[] a, double[] f, int idx)
mulInverseEffectiveMass in interface DynamicComponentmulInverseEffectiveMass in class Pointpublic void resetEffectiveMass()
DynamicComponentresetEffectiveMass in interface DynamicComponentresetEffectiveMass in class Pointpublic void addEffectiveMass(double m)
addEffectiveMass in class Pointpublic void getInverseMass(Matrix Minv, Matrix M)
DynamicComponentgetInverseMass in interface DynamicComponentgetInverseMass in class DynamicComponentBaseMinv - matrix to return the inverse mass inM - matrix containing the mass to be invertedpublic void setMass(double m)
public void applyGravity(Vector3d gacc)
PointapplyGravity in interface DynamicComponentapplyGravity in class Pointpublic int applyPosImpulse(double[] delx,
                           int idx)
public int getVelDerivative(double[] dxdt,
                            int idx,
                            double mass)
public void scaleMass(double s)
ScalableUnitsscaleMass in interface ScalableUnitsscaleMass in class Points - scaling factorpublic void setDynamic(boolean dynamic)
public void scaleDistance(double s)
ScalableUnitsscaleDistance in interface ScalableUnitsscaleDistance in class Points - scaling factorpublic 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 Pointtrue if this component can be duplicated.public PointParticleAttachment createPointAttachment(Point pnt)
PointAttachablepnt
 to this component. It should not be assumed that pnt
 is currently connected to the component hierarchy, and no attempt
 should be made to connect the returned attachment to the hierarchy;
 the latter, if desired, is the responsibility of the caller.
 
 In some cases, it may not be possible to attach the point at its present location. In that case, the method will create an attachment to the nearest feasible location.
createPointAttachment in interface PointAttachablepnt - point for which an attachment should be createdpnt to this componentpublic boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
true if and only if CopyableComponent.isDuplicatable() returns
 true.getCopyReferences in interface CopyableComponentgetCopyReferences in class Pointrefs - list to which references are appendedancestor - root node of the hierarchy from which references are to be excludedpublic ModelComponent 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