public class MechModel extends MechSystemBase implements TransformableGeometry, ScalableUnits, MechSystemModel
ModelComponent.NavpanelVisibilityMechSystem.ConstraintInfo, MechSystem.FrictionInfoCompositeComponent.NavpanelDisplay| Modifier and Type | Field and Description | 
|---|---|
| static PropertyList | myProps | 
myParametricsInSystemMatrixDEFAULT_NAVPANEL_DISPLAYenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGCOMPUTE_CONTACTS, UPDATE_CONTACTSTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description | 
|---|
| MechModel() | 
| MechModel(java.lang.String name) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAttachment(DynamicAttachment ax) | 
| void | addAxialSpring(AxialSpring s) | 
| void | addBodyConnector(BodyConnector c) | 
| void | addConstrainer(ConstrainerBase c) | 
| void | addForceEffector(ForceComponent fe) | 
| void | addFrame(Frame rb) | 
| void | addFrameMarker(FrameMarker mkr) | 
| void | addFrameMarker(FrameMarker mkr,
              Frame frame,
              Point3d loc) | 
| FrameMarker | addFrameMarker(Frame frame,
              Point3d loc)Adds a frame marker to a particular frame, with the location
 specified relative to the frame's coordinate frame | 
| void | addFrameSpring(FrameSpring s) | 
| void | addGeneralMassBlocks(SparseBlockMatrix M) | 
| void | addMeshBody(MeshComponent rb) | 
| void | addModel(MechSystemModel m) | 
| void | addMultiPointSpring(MultiPointSpring s) | 
| void | addMuscleExciter(MuscleExciter mex) | 
| void | addParticle(Particle p) | 
| void | addPoint(Point p) | 
| void | addRenderable(RenderableComponent rb) | 
| void | addRigidBody(RigidBody rb) | 
| void | addTransformableDependencies(TransformGeometryContext context,
                            int flags)Adds to  contextany transformable components which should be
 transformed as the same time as this component. | 
| void | attachAxialSpring(Point pnt0,
                 Point pnt1,
                 AxialSpring s) | 
| void | attachFrame(Frame frame,
           FrameAttachable comp)Attaches a frame to a FrameAttachable component, using each
 component's current position state. | 
| void | attachFrame(Frame frame,
           FrameAttachable comp,
           RigidTransform3d TFW)Attaches a frame to a FrameAttachable component, with the
 initial pose of the frame described by  TFWusin
 component's current position state. | 
| void | attachFrameSpring(Frame frameA,
                 Frame frameB,
                 FrameSpring s) | 
| ComponentList<DynamicAttachment> | attachments() | 
| void | attachPoint(Point p1,
           PointAttachable comp)Attaches a particle to a PointAttachable component, using both
 component's current position state. | 
| void | attachPoint(Point p1,
           RigidBody body,
           Point3d loc) | 
| RenderableComponentList<AxialSpring> | axialSprings() | 
| ComponentListView<BodyConnector> | bodyConnectors() | 
| DynamicComponent | checkVelocityStability()Checks the velocity stability of this system. | 
| void | clear() | 
| void | clearAxialSprings() | 
| void | clearBodyConnectors() | 
| boolean | clearCollisionBehavior(Collidable c0,
                      Collidable c1)Clears the collision behavior that was previously set using one of the
  setCollisionBehaviormethods. | 
| void | clearCollisionBehaviors()Clears any collision behaviors that have been set using the
  setCollisionBehaviormethods. | 
| boolean | clearCollisionResponse(Collidable c0,
                      Collidable c1)Clears the collision response that was previously set using one of the
  setCollisionResponsemethods. | 
| void | clearCollisionResponses()Clears any collision responses that have been set using the
  setCollisionResponse()methods. | 
| void | clearConstrainers() | 
| void | clearForceEffectors() | 
| void | clearFrameMarkers() | 
| void | clearFrames() | 
| void | clearFrameSprings() | 
| void | clearMeshBodies() | 
| void | clearModels() | 
| void | clearMultiPointSprings() | 
| void | clearParticles() | 
| void | clearPoints() | 
| void | clearRenderables() | 
| void | clearRigidBodies() | 
| int | combineMatrixTypes(int type1,
                  int type2) | 
| void | componentChanged(ComponentChangeEvent e)Notifies this composite component that a change has occured within one or
 more of its descendants. | 
| double | computeDefaultPenetrationTol()Computes a default value for the penetration tolerance based
 on the radius of this MechModel. | 
| ComponentListView<ConstrainerBase> | constrainers() | 
| boolean | detachFrame(Frame frame) | 
| boolean | detachPoint(Point p1) | 
| void | dispose()Called when the model is discarded. | 
| ComponentListView<ForceComponent> | forceEffectors() | 
| RenderableComponentList<FrameMarker> | frameMarkers() | 
| ComponentListView<Frame> | frames() | 
| ComponentListView<FrameSpring> | frameSprings() | 
| CollisionBehavior | getActingCollisionBehavior(Collidable c0,
                          Collidable c1)Returns the behavior that controls collisions for a pair of specific
 collidables  c0andc1. | 
| boolean | getAddConstraintForces() | 
| PropertyList | getAllPropertyInfo()Returns a list giving static information about all properties exported by
 this object. | 
| void | getAttachments(java.util.List<DynamicAttachment> list,
              int level) | 
| void | getAuxStateComponents(java.util.List<HasAuxState> list,
                     int level) | 
| void | getCollidables(java.util.List<Collidable> list,
              int level) | 
| CollisionBehavior | getCollisionBehavior(Collidable c0,
                    Collidable c1)Returns the collision behavior that was previously set using one of the
  setCollisionBehaviormethods. | 
| CollisionManager | getCollisionManager() | 
| CollisionResponse | getCollisionResponse(Collidable c0,
                    Collidable c1)Returns the collision response that was previously set using one of the
  setCollisionResponsemethods. | 
| void | getConstrainers(java.util.List<Constrainer> list,
               int level) | 
| CollisionBehavior | getDefaultCollisionBehavior(Collidable.Group group0,
                           Collidable.Group group1)Gets the default collision behavior for a specified pair of primary
 collidable groups. | 
| void | getDynamicComponents(java.util.List<DynamicComponent> active,
                    java.util.List<DynamicComponent> attached,
                    java.util.List<DynamicComponent> parametric) | 
| java.awt.Color | getExcitationColor() | 
| PropertyMode | getExcitationColorMode() | 
| void | getForceEffectors(java.util.List<ForceEffector> list,
                 int level) | 
| double | getFrameDamping() | 
| PropertyMode | getFrameDampingMode() | 
| Vector3d | getGravity() | 
| PropertyMode | getGravityMode() | 
| MechSystemSolver.Integrator | getIntegrator() | 
| void | getMassMatrixValues(SparseBlockMatrix M,
                   VectorNd f,
                   double t) | 
| MechSystemSolver.MatrixSolver | getMatrixSolver() | 
| double | getMaxColoredExcitation() | 
| PropertyMode | getMaxColoredExcitationMode() | 
| ComponentList<MuscleExciter> | getMuscleExciters() | 
| double | getPenetrationTol()Returns the default distance by which collidable bodies are allowed to
 interpenetrate each other in order to preserve contact stability. | 
| PropertyMode | getPenetrationTolMode() | 
| double | getPointDamping() | 
| PropertyMode | getPointDampingMode() | 
| double | getRadius()Returns an estimate of the radius of components of this MechModel. | 
| double | getRotaryDamping() | 
| PropertyMode | getRotaryDampingMode() | 
| void | getSlaveObjectComponents(java.util.List<HasSlaveObjects> list,
                        int level)Should be overridden in subclasses to return all the HasSlaveObjects '
 components within this model. | 
| int | getStaticIncrements() | 
| double | getStaticTikhonovFactor() | 
| boolean | hasState()Queries if this component has state. | 
| static boolean | isActive(DynamicComponent c) | 
| static MechModel | lowestCommonModel(ModelComponent comp1,
                 ModelComponent comp2) | 
| ComponentListView<MeshComponent> | meshBodies() | 
| ComponentListView<MechSystemModel> | models() | 
| void | mulInverseMass(SparseBlockMatrix M,
              VectorNd a,
              VectorNd f) | 
| RenderableComponentList<MultiPointSpring> | multiPointSprings() | 
| static MechModel | nearestMechModel(ModelComponent c)Returns the nearest MechModel, if any, that is an ancestor of a specific
 component. | 
| PointList<Particle> | particles() | 
| PointList<Point> | points() | 
| StepAdjustment | preadvance(double t0,
          double t1,
          int flags)Prepares this object for advance from time t0 to time t1. | 
| void | projectRigidBodyPositionConstraints() | 
| void | recursivelyFinalizeAdvance(StepAdjustment stepAdjust,
                          double t0,
                          double t1,
                          int flags,
                          int level) | 
| void | recursivelyInitialize(double t,
                     int level) | 
| void | removeAxialSpring(AxialSpring s) | 
| void | removeBodyConnector(BodyConnector c) | 
| void | removeConstrainer(ConstrainerBase c) | 
| void | removeForceEffector(ForceEffector fe) | 
| void | removeFrame(Frame rb) | 
| void | removeFrameMarker(FrameMarker mkr) | 
| void | removeFrameSpring(FrameSpring s) | 
| void | removeMeshBody(MeshComponent rb) | 
| boolean | removeModel(MechSystemModel m) | 
| void | removeMultiPointSpring(MultiPointSpring s) | 
| boolean | removeMuscleExciter(MuscleExciter mex) | 
| void | removeParticle(Particle p) | 
| void | removePoint(Point p) | 
| void | removeRenderable(RenderableComponent rb) | 
| void | removeRigidBody(RigidBody rb) | 
| void | render(Renderer renderer,
      int flags)Render this object using the functionality of the supplied
  Renderer. | 
| ComponentListView<RenderableComponent> | renderables() | 
| ComponentListView<RigidBody> | rigidBodies() | 
| void | scaleDistance(double s)Scales all distance coordinates. | 
| void | scaleMass(double s)Scales all mass units. | 
| void | scan(ReaderTokenizer rtok,
    java.lang.Object ref)Scans this element from a ReaderTokenizer. | 
| void | setAddConstraintForces(boolean enable) | 
| void | setBounds(double xmin,
         double ymin,
         double zmin,
         double xmax,
         double ymax,
         double zmax) | 
| void | setBounds(Point3d pmin,
         Point3d pmax) | 
| CollisionBehavior | setCollisionBehavior(Collidable c0,
                    Collidable c1,
                    boolean enabled)Enables or disables collisions for a specified pair of collidables
  c0andc1, overriding the default behavior or
 any behavior specified for the pair with previoussetBehaviorcalls. | 
| CollisionBehavior | setCollisionBehavior(Collidable c0,
                    Collidable c1,
                    boolean enabled,
                    double mu)Sets the collision behavior for a specified pair of collidables
  c0andc1, overriding the default behavior and
 any behavior specified for the pair with previoussetBehaviorcalls. | 
| void | setCollisionBehavior(Collidable c0,
                    Collidable c1,
                    CollisionBehavior behavior)Sets the collision behavior for a specified pair of collidables
  c0andc1, overriding the default behavior and
 any behavior specified for the pair with previoussetBehaviorcalls. | 
| CollisionResponse | setCollisionResponse(Collidable c0,
                    Collidable c1)Sets and returns a collision response for a specified pair of collidables
  c0andc1, removing any response that has been
 previoulsy specified for the same pair. | 
| void | setCollisionResponse(Collidable c0,
                    Collidable c1,
                    CollisionResponse response)Sets the collision response for a specified pair of collidables
  c0andc1, removing any response that has been
 previoulsy specified for the same pair. | 
| void | setDefaultCollisionBehavior(boolean enabled,
                           double mu)Specifies the default collision behavior for all primary collidable group
 pairs (Rigid-Rigid, Rigid-Deformable, Deformable-Deformable,
 Deformable-Self) associated with this MechModel. | 
| void | setDefaultCollisionBehavior(Collidable.Group group0,
                           Collidable.Group group1,
                           boolean enabled,
                           double mu)Sets the default collision behavior, for this MechModel, for a specified
 pair of generic collidable groups. | 
| void | setDefaultCollisionBehavior(Collidable.Group group0,
                           Collidable.Group group1,
                           CollisionBehavior behavior)Sets the default collision behavior, for this MechModel, for a specified
 pair of collidable groups. | 
| void | setDefaultCollisionBehavior(CollisionBehavior behavior)Specifies a default collision behavior for all primary collidable group
 pairs (Rigid-Rigid, Rigid-Deformable, Deformable-Deformable,
 Deformable-Self) associated with this MechModel. | 
| void | setExcitationColor(java.awt.Color color) | 
| void | setExcitationColorMode(PropertyMode mode) | 
| void | setFrameDamping(double d) | 
| void | setFrameDampingMode(PropertyMode mode) | 
| void | setFriction(double mu) | 
| void | setGravity(double gx,
          double gy,
          double gz) | 
| void | setGravity(Vector3d g) | 
| void | setGravityMode(PropertyMode mode) | 
| void | setIntegrator(MechSystemSolver.Integrator integrator) | 
| void | setMatrixSolver(MechSystemSolver.MatrixSolver method) | 
| void | setMaxColoredExcitation(double excitation) | 
| void | setMaxColoredExcitationMode(PropertyMode mode) | 
| void | setPenetrationTol(double tol)Sets the default distance by which collidable bodies are allowed to
 interpenetrate each other in order to preserve contact stability. | 
| void | setPenetrationTolIfNecessary() | 
| void | setPenetrationTolMode(PropertyMode mode) | 
| void | setPointDamping(double d) | 
| void | setPointDampingMode(PropertyMode mode) | 
| void | setRotaryDamping(double d) | 
| void | setRotaryDampingMode(PropertyMode mode) | 
| void | setStaticIncrements(int n) | 
| void | setStaticTikhonovFactor(double eps) | 
| static MechModel | topMechModel(ModelComponent comp)Returns the topmost MechModel, if any, that is associated with
 a specific component. | 
| void | transformGeometry(AffineTransform3dBase X)Applies an affine transformation to the geometry of this component. | 
| void | transformGeometry(GeometryTransformer gtr,
                 TransformGeometryContext context,
                 int flags)Transforms the geometry of this component, using the geometry transformer
  gtrto transform its individual attributes. | 
| void | updateBounds(Vector3d pmin,
            Vector3d pmax)Update the minimum and maximum points for this object. | 
| java.lang.Object | validateMatrixSolver(MechSystemSolver.MatrixSolver method,
                    StringHolder errMsg) | 
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, addGeneralSolveBlocks, addPosJacobian, addVelJacobian, advance, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, closePrintStateFile, collectInitialForces, copy, createState, createVelocityJacobian, getActiveForces, getActiveMass, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveStiffness, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAttachmentConstraints, getAttachmentDerivatives, getAuxState, getBilateralConstraints, getBilateralConstraintSizes, getBilateralForces, getBilateralImpulses, getBilateralImpulses, getBilateralInfo, getDefaultStabilization, getDynamicDOFs, getDynamicsEnabled, getForces, getFrictionConstraints, getInitialState, getInverseMassMatrix, getMassMatrix, getNumBilateralImpulses, getNumUnilateralImpulses, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getPrintState, getProfiling, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralForces, getUnilateralImpulses, getUnilateralImpulses, getUnilateralInfo, getUpdateForcesAtStepEnd, getUpdateForcesAtStepEndMode, hasParameterizedType, initialize, maxFrictionConstraintSets, numActiveComponents, numAttachedComponents, numParametricComponents, openPrintStateFile, printActiveStiffness, reduceVelocityJacobian, reopenPrintStateFile, setActiveForces, setActivePosState, setActiveVelState, setAuxState, setBilateralImpulses, setBilateralImpulses, setDefaultStabilization, setDynamicsEnabled, setForces, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setPrintState, setPrintState, setProfiling, setStabilization, setState, setUnilateralImpulses, setUnilateralImpulses, setUpdateForcesAtStepEnd, setUpdateForcesAtStepEndMode, topMechSystem, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeBilateralConstraintMatrix, writeMassMatrix, writeMassMatrix, writeStiffnessMatrix, writeStiffnessMatrixcreateRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderPropsactionPerformed, copy, getInitialState, getMaxStepSize, getMenuItems, hierarchyContainsReferences, setInitialState, setMaxStepSizeadd, add, addAll, addComponents, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, indexOf, invalidateNumbers, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, retainAll, set, setNavpanelDisplay, setNumbered, setNumberingStartAtOne, setShortName, size, toArray, toArray, updateNameMapcheckFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isConnectedToHierarchy, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadvance, getMaxStepSize, initializeconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writecreateState, getInitialState, getState, setStateaddActivePosImpulse, addPosJacobian, addVelJacobian, buildMassMatrix, buildSolveMatrix, getActiveForces, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveVelState, getActiveVelStateSize, getBilateralConstraints, getBilateralImpulses, getBilateralInfo, getFrictionConstraints, getInverseMassMatrix, getMassMatrix, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getSolveMatrixType, getStructureVersion, getUnilateralConstraints, getUnilateralImpulses, getUnilateralInfo, maxFrictionConstraintSets, numActiveComponents, numParametricComponents, setActiveForces, setActivePosState, setActiveVelState, setBilateralImpulses, setParametricForces, setParametricPosState, setParametricVelState, setUnilateralImpulses, updateConstraints, updateForcesgetNamepublic static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class RenderableModelBasepublic void clear()
clear in interface java.util.Collection<ModelComponent>clear in class ComponentList<ModelComponent>public double getRadius()
public void setPenetrationTol(double tol)
MechModel.tol - desired penetration tolerancepublic double getPenetrationTol()
public PropertyMode getPenetrationTolMode()
public void setPenetrationTolMode(PropertyMode mode)
public void setPenetrationTolIfNecessary()
public double computeDefaultPenetrationTol()
public java.awt.Color getExcitationColor()
public void setExcitationColor(java.awt.Color color)
public PropertyMode getExcitationColorMode()
public void setExcitationColorMode(PropertyMode mode)
public double getMaxColoredExcitation()
public void setMaxColoredExcitation(double excitation)
public PropertyMode getMaxColoredExcitationMode()
public void setMaxColoredExcitationMode(PropertyMode mode)
public void setFriction(double mu)
public void setDefaultCollisionBehavior(boolean enabled,
                                        double mu)
setDefaultCollisionBehavior(behavior).enabled - if true, enables collisionsmu - friction coefficient (ignored if enabled is false)public void setDefaultCollisionBehavior(CollisionBehavior behavior)
This method is equivalent to calling
setDefaultCollisionBehavior (Collidable.All, Collidable.All, behavior)
behavior - desired collision behaviorpublic CollisionBehavior getDefaultCollisionBehavior(Collidable.Group group0, Collidable.Group group1)
Collidable.Rigid
 and Collidable.Deformable. In addition, the group Collidable.Self can be paired with Collidable.Deformable to
 obtain the default behavior for deformable self collisions; Collidable.Self cannot be paired with other groups.group0 - first generic collidable groupgroup1 - second generic collidable grouppublic void setDefaultCollisionBehavior(Collidable.Group group0, Collidable.Group group1, CollisionBehavior behavior)
Collidable.Rigid and Collidable.Deformable, as
 well as the composite groups Collidable.AllBodies (rigid and
 deformable) and Collidable.All (all bodies plus self collision).
 In addition, the group Collidable.Self can be paired with Collidable.Deformable, Collidable.AllBodies or Collidable.All to set the default self-collision behavior for deformable
 compound bodies. Collidable.Self cannot be paired with Collidable.Self or Collidable.Rigid.
 This method works by setting the behaviors for the appropriate primary collidable group pairs (Rigid-Rigid, Rigid-Deformable, Deformable-Deformable, Deformable-Self) implied by the specified groups.
group0 - first generic collidable groupgroup1 - second generic collidable groupbehavior - desired collision behaviorpublic void setDefaultCollisionBehavior(Collidable.Group group0, Collidable.Group group1, boolean enabled, double mu)
setDefaultCollisionBehavior(group0,group1,behavior), where a default
 CollisionBehavior object is created and set to reflect the
 specified enabled and friction settings.group0 - first generic collidable groupgroup1 - second generic collidable groupenabled - if true, enables collisionsmu - friction coefficient (ignored if enabled is false)public CollisionBehavior setCollisionBehavior(Collidable c0, Collidable c1, boolean enabled)
c0 and c1, overriding the default behavior or
 any behavior specified for the pair with previous
 setBehavior calls. This is a convenience wrapper for setCollisionBehavior(c0,c1,behavior), where a default
 CollisionBehavior object is created with the specified
 enabled setting and a friction coefficient of 0.c0 - first collidablec1 - second collidableenabled - if true, enables collisionspublic CollisionBehavior setCollisionBehavior(Collidable c0, Collidable c1, boolean enabled, double mu)
c0 and c1, overriding the default behavior and
 any behavior specified for the pair with previous
 setBehavior calls. This is a convenience wrapper for setCollisionBehavior(c0,c1,behavior), where a default
 CollisionBehavior object is created and set to reflect the
 specified enabled and friction settings.c0 - first collidablec1 - second collidableenabled - if true, enables collisionsmu - friction coefficient (ignored if enabled is false)CollisionBehavior object describing the collision
 behaviorpublic void setCollisionBehavior(Collidable c0, Collidable c1, CollisionBehavior behavior)
c0 and c1, overriding the default behavior and
 any behavior specified for the pair with previous
 setBehavior calls. The behavior specified by this method
 will be applied only among collidables for which this
 MechModel is the lowest common model.
 Since behaviors are added to the collision manager as sub-components,
 the specified behavior cannot be currently set and in particular can not
 be reused in other setCollisionBehavior calls. If reuse
 is desired, the behavior should be copied:
 
    CollisionBehavior behav = new CollisionBehavior();
    behav.setDrawIntersectionContours (true); 
    mesh.setCollisionBehavior (col0, col1, behav);
    behav = new CollisionBehavior(behav);
    mesh.setCollisionBehavior (col2, col3, behav); // OK
 
 There are restrictions on what pair of collidables can be
 specified. The first collidable must be a specific collidable object. The
 second may be a collidable group, such as Collidable.Rigid Collidable.All, or Collidable.Self. Self-collision is specified
 either using the group Collidable.Self or by specifying c0
 == c1. If self-collision is specified, then c0 must
 be deformable and must also be a compound collidable (since
 self-intersection is currently only supported among the sub-collidables
 of a compound collidable).
 
If c0 and/or c1 are specific collidables, then
 they must both be contained within the component hierarchy of this
 MechModel. In addition, if both c0 and
 c1 are specific collidables, then one cannot be a
 sub-collidable of the other, and this MechModel must be the
 lowest common model containing both of them.
 
 If c0 or c1 are compound collidables, then
 the behavior is applied to all appropriate pairs of their
 sub-collidables.  If self-collision is specified, then the behavior is
 applied among all sub-collidables whose getCollidable() method returns Colidability.ALL or
 Colidability.INTERNAL.
 
This method works by adding the indicated behavior to the collision
 manager as a sub-component. If a behavior has been previously set for the
 specified pair, the previous behavior is removed. The behavior can be
 queried later using getCollisionBehavior(c0,c1) and removed using clearCollisionBehavior(c0,c1).
c0 - first collidablec1 - second collidablebehavior - desired collision behaviorpublic CollisionBehavior getCollisionBehavior(Collidable c0, Collidable c1)
setCollisionBehavior methods.  If no behavior for the
 indicated pair was set, null is returned.c0 - first collidablec1 - second collidablepublic boolean clearCollisionBehavior(Collidable c0, Collidable c1)
setCollisionBehavior methods. If no behavior for the
 indicated pair was set, the method returns false.c0 - first collidablec1 - second collidabletrue if the specific behavior had been set
 and was removedpublic void clearCollisionBehaviors()
setCollisionBehavior methods.public CollisionResponse setCollisionResponse(Collidable c0, Collidable c1)
c0 and c1, removing any response that has been
 previoulsy specified for the same pair. This is a convenience wrapper for
 setCollisionResponse(c0,c1,response), which creates and returns
 the required CollisionResponse object.c0 - first collidablec1 - second collidablepublic void setCollisionResponse(Collidable c0, Collidable c1, CollisionResponse response)
c0 and c1, removing any response that has been
 previoulsy specified for the same pair. At every subsequent integration
 step, the response object will be updated to contain the current
 collision information for the collidable pair. Since responses are added
 to the collision manager as sub-components, the specified response cannot
 be currently set.
 There are restrictions on what pair of collidables can be
 specified. The first collidable must be a specific collidable object. The
 second may be a collidable group, such as Collidable.Rigid Collidable.All, or Collidable.Self. Self-collision is specified
 either using the group Collidable.Self or by specifying c0
 == c1. If self-collision is specified, then c0 must
 be deformable and must also be a compound collidable (since
 self-intersection is currently only supported among the sub-collidables
 of a compound collidable).
 
If c0 and/or c1 are specific collidables, then
 they must both be contained within the component hierarchy of this
 MechModel.
 
If c0 or c1 are compound collidables, then
 the response is collected for all appropriate pairs of their
 sub-collidables.  If self-collision is specified, then the response is
 collected for all sub-collidables whose getCollidable() method returns Colidability.ALL or
 Colidability.INTERNAL.
 
This method works by adding the indicated response to the collision
 manager as a sub-component. If a response has been previously set for the
 specified pair, the previous response is removed. The response can be
 queried later using getCollisionResponse(c0,c1) and removed using clearCollisionResponse(c0,c1).
c0 - first collidablec1 - second collidableresponse - desired collision responsepublic CollisionResponse getCollisionResponse(Collidable c0, Collidable c1)
setCollisionResponse methods.  If no response for the
 indicated pair was set, null is returned.c0 - first collidablec1 - second collidablepublic boolean clearCollisionResponse(Collidable c0, Collidable c1)
setCollisionResponse methods. If no response for the
 indicated pair was set, the method returns false.c0 - first collidablec1 - second collidabletrue if the specific response had been set
 and was removedpublic void clearCollisionResponses()
setCollisionResponse() methods.public CollisionBehavior getActingCollisionBehavior(Collidable c0, Collidable c1)
c0 and c1. This will be determined
 by the lowest MechModel which contains both c0
 and c1, and be either a default behavior, or an override
 behavior specified will a setBehavior call. In some cases,
 if c0 and/or c1 are not collidable, or if one
 or both are compound collidables with different behaviors for their
 sub-collidables (see below), no unique controlling behavior will exist
 and this method will return null.
 Both c0 and c1 must be specific collidables;
 collidable groups (such as Collidable.Rigid or Collidable.Group) are not allowed.
 
If c0 or c1 are compound collidables, then
 if the same acting behavior is found among all pairs of sub-collidables
 for which collisions are permitted, that behavior is returned; otherwise,
 null is returned. In particular, if c0 equals
 c1, then this method searches for the same collision
 behavior among all sub-collidables of c0 for which
 self-intersection is permitted (i.e., those whose getCollidable() method returns
 Colidability.ALL or Colidability.INTERNAL).
c0 - first collidablec1 - second collidablenull if such behavior exists.public void getCollidables(java.util.List<Collidable> list, int level)
getCollidables in interface MechSystemModelpublic CollisionManager getCollisionManager()
public void setMatrixSolver(MechSystemSolver.MatrixSolver method)
public java.lang.Object validateMatrixSolver(MechSystemSolver.MatrixSolver method, StringHolder errMsg)
public MechSystemSolver.MatrixSolver getMatrixSolver()
public void setIntegrator(MechSystemSolver.Integrator integrator)
public MechSystemSolver.Integrator getIntegrator()
public void setStaticTikhonovFactor(double eps)
public double getStaticTikhonovFactor()
public void setStaticIncrements(int n)
public int getStaticIncrements()
public void addParticle(Particle p)
public void removeParticle(Particle p)
public void clearParticles()
public void addPoint(Point p)
public void removePoint(Point p)
public void clearPoints()
public RenderableComponentList<AxialSpring> axialSprings()
public RenderableComponentList<MultiPointSpring> multiPointSprings()
public ComponentListView<FrameSpring> frameSprings()
public ComponentListView<ForceComponent> forceEffectors()
public double getPointDamping()
public void setPointDamping(double d)
public PropertyMode getPointDampingMode()
public void setPointDampingMode(PropertyMode mode)
public double getFrameDamping()
public void setFrameDamping(double d)
public PropertyMode getFrameDampingMode()
public void setFrameDampingMode(PropertyMode mode)
public double getRotaryDamping()
public void setRotaryDamping(double d)
public PropertyMode getRotaryDampingMode()
public void setRotaryDampingMode(PropertyMode mode)
public Vector3d getGravity()
public void setGravity(Vector3d g)
public void setGravity(double gx,
                       double gy,
                       double gz)
public PropertyMode getGravityMode()
public void setGravityMode(PropertyMode mode)
public void addAxialSpring(AxialSpring s)
public void attachAxialSpring(Point pnt0, Point pnt1, AxialSpring s)
public void removeAxialSpring(AxialSpring s)
public void clearAxialSprings()
public void addMultiPointSpring(MultiPointSpring s)
public void removeMultiPointSpring(MultiPointSpring s)
public void clearMultiPointSprings()
public void addFrameSpring(FrameSpring s)
public void attachFrameSpring(Frame frameA, Frame frameB, FrameSpring s)
public void removeFrameSpring(FrameSpring s)
public void clearFrameSprings()
public void addForceEffector(ForceComponent fe)
public void removeForceEffector(ForceEffector fe)
public void clearForceEffectors()
public void addMuscleExciter(MuscleExciter mex)
public boolean removeMuscleExciter(MuscleExciter mex)
public ComponentList<MuscleExciter> getMuscleExciters()
public ComponentListView<RigidBody> rigidBodies()
public void addRigidBody(RigidBody rb)
public void removeRigidBody(RigidBody rb)
public void clearRigidBodies()
public ComponentListView<Frame> frames()
public void addFrame(Frame rb)
public void removeFrame(Frame rb)
public void clearFrames()
public ComponentListView<MeshComponent> meshBodies()
public void addMeshBody(MeshComponent rb)
public void removeMeshBody(MeshComponent rb)
public void clearMeshBodies()
public void addFrameMarker(FrameMarker mkr, Frame frame, Point3d loc)
public FrameMarker addFrameMarker(Frame frame, Point3d loc)
frame - frame object to add a marker toloc - location within the frame (according to its own coordinate system)public void addFrameMarker(FrameMarker mkr)
public void removeFrameMarker(FrameMarker mkr)
public void clearFrameMarkers()
public RenderableComponentList<FrameMarker> frameMarkers()
public ComponentListView<BodyConnector> bodyConnectors()
public void addBodyConnector(BodyConnector c)
public void removeBodyConnector(BodyConnector c)
public void clearBodyConnectors()
public ComponentListView<ConstrainerBase> constrainers()
public void addConstrainer(ConstrainerBase c)
public void removeConstrainer(ConstrainerBase c)
public void clearConstrainers()
public ComponentListView<RenderableComponent> renderables()
public void addRenderable(RenderableComponent rb)
public void removeRenderable(RenderableComponent rb)
public void clearRenderables()
public ComponentListView<MechSystemModel> models()
public void addModel(MechSystemModel m)
public boolean removeModel(MechSystemModel m)
public void clearModels()
public void attachPoint(Point p1, PointAttachable comp)
p1 - Point to connect. Must currently be a particle.comp - Component to attach the particle to.public boolean detachPoint(Point p1)
public void attachFrame(Frame frame, FrameAttachable comp, RigidTransform3d TFW)
TFWusin
 component's current position state. The frame may be relocated
 if this is necessary to create an attachment.frame - Frame to connect.comp - component to attach the frame to.TFW - initial desired pose of the frame, in world coordinatespublic void attachFrame(Frame frame, FrameAttachable comp)
frame - Frame to connect.comp - component to attach the frame to.public boolean detachFrame(Frame frame)
public ComponentList<DynamicAttachment> attachments()
public void addAttachment(DynamicAttachment ax)
public void getAttachments(java.util.List<DynamicAttachment> list, int level)
getAttachments in interface MechSystemModelpublic boolean getAddConstraintForces()
public void setAddConstraintForces(boolean enable)
public static boolean isActive(DynamicComponent c)
public void getDynamicComponents(java.util.List<DynamicComponent> active, java.util.List<DynamicComponent> attached, java.util.List<DynamicComponent> parametric)
getDynamicComponents in interface MechSystemModelpublic void getConstrainers(java.util.List<Constrainer> list, int level)
getConstrainers in interface MechSystemModelpublic void getForceEffectors(java.util.List<ForceEffector> list, int level)
getForceEffectors in interface MechSystemModelpublic void addGeneralMassBlocks(SparseBlockMatrix M)
addGeneralMassBlocks in interface MechSystemModeladdGeneralMassBlocks in class MechSystemBasepublic void getMassMatrixValues(SparseBlockMatrix M, VectorNd f, double t)
getMassMatrixValues in interface MechSystemModelpublic void mulInverseMass(SparseBlockMatrix M, VectorNd a, VectorNd f)
mulInverseMass in interface MechSystemmulInverseMass in interface MechSystemModelpublic void getAuxStateComponents(java.util.List<HasAuxState> list, int level)
getAuxStateComponents in interface MechSystemModelpublic void getSlaveObjectComponents(java.util.List<HasSlaveObjects> list, int level)
getSlaveObjectComponents in interface MechSystemModelgetSlaveObjectComponents in class MechSystemBaselist - HasSlaveObjects components should be added to this listpublic void projectRigidBodyPositionConstraints()
public int combineMatrixTypes(int type1,
                              int type2)
public StepAdjustment preadvance(double t0, double t1, int flags)
ModelBaseIf the method determines that the step size should be
 reduced, it can return a StepAdjustment object indicating
 the recommended reduction. Otherwise, the method may return 
 null
preadvance in interface Modelpreadvance in class MechSystemBaset0 - current time (seconds)t1 - new time to advance to (seconds)flags - reserved for future usepublic void recursivelyFinalizeAdvance(StepAdjustment stepAdjust, double t0, double t1, int flags, int level)
recursivelyFinalizeAdvance in interface MechSystemModelrecursivelyFinalizeAdvance in class MechSystemBasepublic void recursivelyInitialize(double t,
                                  int level)
recursivelyInitialize in interface MechSystemModelrecursivelyInitialize in class MechSystemBasepublic void setBounds(double xmin,
                      double ymin,
                      double zmin,
                      double xmax,
                      double ymax,
                      double zmax)
public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBasewrite.scan in interface ModelComponentscan in interface Scannablescan in class ComponentList<ModelComponent>rtok - 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 updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class RenderableModelBasepmin - minimum pointpmax - maximum pointpublic void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerender in class RenderableModelBaserenderer - provides the functionality used to perform the rendering.flags - flags that may be used to control different 
 aspects of the rendering. Flags are defined in Renderer
 and currently include
 Renderer.HIGHLIGHT and
 Renderer.SORT_FACES.public void transformGeometry(AffineTransform3dBase X)
TransformableGeometryTransformGeometryContext.transform (this, X, 0);
transformGeometry in interface TransformableGeometryX - affine transformation to apply to the componentpublic 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 TransformableGeometrygtr - transformer implementing the transformcontext - context information, including what other components
 are being transformedflags - specifies conditions associated with the transformationpublic void addTransformableDependencies(TransformGeometryContext context, int flags)
TransformableGeometrycontext any transformable components which should be
 transformed as the same time as this component. This will generally
 include descendant components, and may also include other components to
 which this component is connected in some way.
 
 This method is generally called from with the 
 TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int) method of a 
 TransformGeometryContext.
addTransformableDependencies in interface TransformableGeometrycontext - context information, to which the dependent components
 are added.flags - specifies conditions associated with the transformationpublic void scaleDistance(double s)
ScalableUnitsscaleDistance in interface ScalableUnitss - scaling factorpublic void scaleMass(double s)
ScalableUnitsscaleMass in interface ScalableUnitss - scaling factorpublic boolean hasState()
hasState in interface ModelComponenthasState in class ModelComponentBasetrue if this component has statepublic static MechModel lowestCommonModel(ModelComponent comp1, ModelComponent comp2)
public static MechModel topMechModel(ModelComponent comp)
comp - component to start withcomp, or
 null if there is none.public static MechModel nearestMechModel(ModelComponent c)
MechModel, the
 component itself returned.c - component to start withcomp, or
 null if there is none.public void componentChanged(ComponentChangeEvent e)
ComponentList
 
 This method should propagate the notification up the component hierarchy
 by calling notifyParentOfChange.
componentChanged in interface ComponentChangeListenercomponentChanged in interface CompositeComponentcomponentChanged in class ComponentList<ModelComponent>e - optional argument giving specific information about the changepublic DynamicComponent checkVelocityStability()
checkVelocityStability in interface MechSystemModelnull if there is no instability