public class MechModel extends MechSystemBase implements TransformableGeometry, ScalableUnits
MechModels. Collision behaviors are managed by the
model's collision manager.
The MechSystemBase.advance(double, double, int) method of the top-level MechModel is used to
advance the mechanical system forward in time using integrator specified by
the integrator property.
MechSystemBase.ConstraintForceStateSaverModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityMechSystem.ConstraintInfoCompositeComponent.NavpanelDisplay| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
DEFAULT_STABILIZATION, DEFAULT_USE_IMPLICIT_FRICTION, myParametricsInSystemMatrix, myPrepareAdvanceInPreadvance, mySaveForcesAsState, useAllDynamicCompsDEFAULT_MAX_STEP_SIZEDEFAULT_NAVPANEL_DISPLAYenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGSTATE_IS_VOLATILECOMPUTE_CONTACTS, UPDATE_CONTACTSTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
MechModel() |
MechModel(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(DynamicAttachmentComp ax) |
void |
addAxialSpring(AxialSpring s)
Adds an axial spring to this model's axial spring container.
|
void |
addBodyConnector(BodyConnector c)
Adds a body connector to this model's body connector container.
|
void |
addConstrainer(ConstrainerBase c)
Adds a constrainer to this model's constrainer container.
|
void |
addField(FieldComponent fcomp)
Adds a field component to this model's field component container.
|
void |
addForceEffector(ForceComponent fe)
Adds a force effector to this model's force effector container.
|
void |
addFrame(Frame rb)
Adds a frame to this model's frame container.
|
void |
addFrameMarker(FrameMarker mkr)
Adds a frame marker to this model's frame marker container.
|
void |
addFrameMarker(FrameMarker mkr,
Frame frame,
Point3d loc)
Sets the frame and location of a frame marker and adds it to this
model's frame marker container.
|
FrameMarker |
addFrameMarker(Frame frame,
Point3d loc)
Creates and add a frame marker to a particular frame, with a location
specified relative to the frame's coordinate frame
|
FrameMarker |
addFrameMarkerWorld(Frame frame,
Point3d pos)
Creates and add a frame marker to a particular frame, with a location
specified in world coordinates
|
void |
addFrameSpring(FrameSpring s)
Adds a frame spring to this model's frame spring container.
|
void |
addGeneralMassBlocks(SparseNumberedBlockMatrix M) |
void |
addMeshBody(MeshComponent mcomp)
Adds a mesh component to the
meshBodies list of this model. |
void |
addModel(MechSystemModel m)
Adds a sub-model to this model's sub-model container.
|
void |
addMultiPointSpring(MultiPointSpring s)
Adds a multi-point spring to this model's multi-point spring container.
|
void |
addMuscleExciter(MuscleExciter mex)
Adds a muscle exciter to this model's muscle exciter container.
|
void |
addParticle(Particle p)
Adds a particle to this model's particle container.
|
void |
addPoint(Point p)
Adds a point to this model's point container.
|
void |
addRenderable(RenderableComponent rb)
Adds a renderable component to this model's renderable container.
|
void |
addRigidBody(RigidBody rb)
Adds a rigid body to this model's rigid body container.
|
void |
addTransformableDependencies(TransformGeometryContext context,
int flags)
Adds to
context any transformable components which should be
transformed as the same time as this component. |
void |
attachAxialSpring(Point pnt0,
Point pnt1,
AxialSpring s)
Sets the end points of an axial spring and adds it to this model's
axial spring container.
|
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)
Sets the end frames of a frame spring and adds it to this model's
frame spring container.
|
ComponentList<DynamicAttachmentComp> |
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()
Returns this model's default container for axial springs.
|
RenderableComponentList<BodyConnector> |
bodyConnectors()
Returns this model's default container for body connectors.
|
void |
checkAllForces(java.lang.String msg,
VectorNd forcevec,
boolean printDiffs)
Checks the forces of all the dynamic components in this model against a
set of reference forces, and prints out the components which differ.
|
void |
checkAllPositions(java.lang.String msg,
VectorNd posvec,
boolean printDiffs)
Checks the positions of all the dynamic components in this model against
a set of reference positions, and prints out the components which
differ.
|
void |
checkAllVelocities(java.lang.String msg,
VectorNd velvec,
boolean printDiffs)
Checks the velocities of all the dynamic components in this model against
a set of reference positions, and prints out the components which
differ.
|
DynamicComponent |
checkVelocityStability()
Checks the velocity stability of this system.
|
void |
clear() |
void |
clearAxialSprings()
Removes all axial springs from this model's axial spring container.
|
void |
clearBodyConnectors()
Removes all body connectors from this model's body connector container.
|
boolean |
clearCollisionBehavior(Collidable c0,
Collidable c1)
Clears the collision behavior that was previously set using one of the
setCollisionBehavior methods. |
void |
clearCollisionBehaviors()
Clears any collision behaviors that have been set using the
setCollisionBehavior methods. |
boolean |
clearCollisionResponse(Collidable c0,
Collidable c1)
Clears the collision response that was previously set using one of the
setCollisionResponse methods. |
void |
clearCollisionResponses()
Clears any collision responses that have been set using the
setCollisionResponse() methods. |
void |
clearConstrainers()
Removes all constrainers from this model's constrainer container.
|
void |
clearFields()
Removes all field components from this model's field component container.
|
void |
clearForceEffectors()
Removes all force effectors from this model's force effector container.
|
void |
clearFrameMarkers()
Removes all frame markers from this model's frame marker container.
|
void |
clearFrames()
Removes all frames from this model's frame container.
|
void |
clearFrameSprings()
Removes all frame springs from this model's frame spring container.
|
void |
clearMeshBodies()
Removes all mesh components from the
meshBodies list of this model. |
void |
clearModels()
Removes all sub-models from this model's sub-model container.
|
void |
clearMultiPointSprings()
Removes all multi-point springs from this model's multi-point spring
container.
|
void |
clearMuscleExciters()
Removes all muscle exciters from this model's muscle exciter container.
|
void |
clearParticles()
Removes all particles from this model's particle container.
|
void |
clearPoints()
Removes all points from this model's point container.
|
void |
clearRenderables()
Removes all renderable components from this model's renderable container.
|
void |
clearRigidBodies()
Removes all rigid bodies from this model's rigid body container.
|
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.
|
double |
computeDefaultWrapKnotDensity()
Computes a default value for the wrap knot density, based on the
radius of this MechModel.
|
ComponentListView<ConstrainerBase> |
constrainers()
Returns this model's default container for constrainers.
|
boolean |
detachFrame(Frame frame) |
boolean |
detachPoint(Point p1) |
void |
dispose()
Called when the model is discarded.
|
ComponentListView<ForceComponent> |
forceEffectors()
Returns this model's default container for force effectors.
|
PointList<FrameMarker> |
frameMarkers()
Returns this model's default container for frame markers.
|
RenderableComponentList<Frame> |
frames()
Returns this model's default container for frames.
|
RenderableComponentList<FrameSpring> |
frameSprings()
Returns this model's default container for frame springs.
|
CollisionBehavior |
getActingCollisionBehavior(Collidable c0,
Collidable c1)
Returns the behavior that controls collisions for a pair of specific
collidables
c0 and c1. |
SparseBlockMatrix |
getActiveStiffnessMatrix() |
boolean |
getAddConstraintForces() |
boolean |
getAddFrameMarkerStiffness()
Queries whether frame marker rotational effects are added to
the stiffness matrix.
|
java.util.ArrayList<DynamicComponent> |
getAllDynamicComponents()
Returns a list of all the dynamic components in this model.
|
VectorNd |
getAllForces()
Returns a vector of the forces of all the dynamic components in this
model.
|
VectorNd |
getAllPositions()
Returns a vector of the positions of all the dynamic components in this
model.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
VectorNd |
getAllVelocities()
Returns a vector of the velocities of all the dynamic components in this
model.
|
void |
getAttachments(java.util.List<DynamicAttachment> list,
int level) |
void |
getAuxStateComponents(java.util.List<HasNumericState> 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
setCollisionBehavior methods. |
CollisionManager |
getCollisionManager()
Returns the collision manager for this MechModel.
|
CollisionResponse |
getCollisionResponse(Collidable c0,
Collidable c1)
Returns the collision response that was previously set using one of the
setCollisionResponse methods. |
void |
getConstrainers(java.util.List<Constrainer> list,
int level) |
CoordinateSetter |
getCoordinateSetter()
Returns the coordinate setter for this MechModel, allocating it on
demand.
|
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> comps) |
void |
getDynamicComponents(java.util.List<DynamicComponent> active,
java.util.List<DynamicComponent> attached,
java.util.List<DynamicComponent> parametric) |
java.awt.Color |
getExcitationColor() |
PropertyMode |
getExcitationColorMode() |
ComponentList<FieldComponent> |
getFields()
Returns this model's default container for field components.
|
void |
getForceEffectors(java.util.List<ForceEffector> list,
int level) |
double |
getFrameDamping() |
PropertyMode |
getFrameDampingMode() |
double |
getFriction()
Returns the global friction coefficient in the collision manager for this
MechModel.
|
Vector3d |
getGravity() |
PropertyMode |
getGravityMode() |
double |
getInertialDamping() |
PropertyMode |
getInertialDampingMode() |
MechSystemSolver.Integrator |
getIntegrator() |
void |
getMassMatrixValues(SparseNumberedBlockMatrix M,
VectorNd f,
double t) |
double |
getMaxColoredExcitation() |
PropertyMode |
getMaxColoredExcitationMode() |
ComponentList<MuscleExciter> |
getMuscleExciters()
Returns this model's default container for muscle exciters.
|
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() |
double |
getRotaryLimitTol()
Queries the rotary limit tolerance for this MechModel.
|
PropertyMode |
getRotaryLimitTolMode() |
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() |
SparseBlockMatrix |
getStiffnessMatrix(java.util.List<SolveMatrixModifier> modifiers)
Returns the regular active stiffness matrix used by the
ArtiSynth solver.
|
SparseBlockMatrix |
getTrueStiffnessMatrix() |
double |
getWrapKnotDensity()
Returns the default knot density for wrapping strands in
MultiPointSpring and MultiPointSpring. |
PropertyMode |
getWrapKnotDensityMode() |
SparseBlockMatrix |
getYPRStiffnessMatrix(java.util.List<SolveMatrixModifier> modifiers)
Returns the true active stiffness matrix with frame orientation
expressed using yaw-pitch-roll coordinates.
|
boolean |
hasState()
Queries if this component has state.
|
static boolean |
isActive(DynamicComponent c) |
boolean |
isBilateralStructureConstant()
Queries whether or not the matrix structure of the bilateral constraints
returned by this system is constant for a given structure version.
|
static MechModel |
lowestCommonModel(ModelComponent comp1,
ModelComponent comp2) |
RenderableComponentList<MeshComponent> |
meshBodies()
Returns the list used to store mesh component in this model.
|
ComponentListView<MechSystemModel> |
models()
Returns this model's default container for sub-models (which includes FE
models).
|
void |
mulInverseMass(SparseBlockMatrix M,
VectorNd a,
VectorNd f) |
RenderableComponentList<MultiPointSpring> |
multiPointSprings()
Returns this model's default container for multi-point springs.
|
static MechModel |
nearestMechModel(ModelComponent c)
Returns the nearest MechModel, if any, that is an ancestor of a specific
component.
|
void |
notifyParentOfChange(ComponentChangeEvent e)
Notifies the parent of this component (if any) of changes within in its
descendants.
|
PointList<Particle> |
particles()
Returns this model's default container for particles.
|
PointList<Point> |
points()
Returns this model's default container for points.
|
StepAdjustment |
preadvance(double t0,
double t1,
int flags)
Prepares this model for advance from time t0 to time t1.
|
void |
printPointSpringInfo(java.lang.String msg)
Prints the tensions in all the point-to-point muscles in this model.
|
void |
projectRigidBodyPositionConstraints() |
void |
readState(java.lang.String filename)
Reads the state of this MechModel from a file.
|
void |
recursivelyFinalizeAdvance(StepAdjustment stepAdjust,
double t0,
double t1,
int flags,
int level) |
void |
recursivelyInitialize(double t,
int level) |
void |
recursivelyPrepareAdvance(double t0,
double t1,
int flags,
int level) |
boolean |
removeAxialSpring(AxialSpring s)
Removes an axial spring from this model's axial spring container.
|
boolean |
removeBodyConnector(BodyConnector c)
Removes a body connector from this model's body connector container.
|
boolean |
removeConstrainer(ConstrainerBase c)
Removes a constrainer from this model's constrainer container.
|
boolean |
removeField(FieldComponent fcomp)
Removes a field component from this model's field component container.
|
boolean |
removeForceEffector(ForceEffector fe)
Removes a force effector from this model's force effector container.
|
boolean |
removeFrame(Frame rb)
Removes a frame from this model's frame container.
|
boolean |
removeFrameMarker(FrameMarker mkr)
Removes a frame marker from this model's frame marker container.
|
boolean |
removeFrameSpring(FrameSpring s)
Removes a frame spring from this model's frame spring container.
|
boolean |
removeMeshBody(MeshComponent mcomp)
Removes a mesh component from the
meshBodies list of this model. |
boolean |
removeModel(MechSystemModel m)
Removes a sub-model from this model's sub-model container.
|
boolean |
removeMultiPointSpring(MultiPointSpring s)
Removes a multi-point spring from this model's multi-point spring
container.
|
boolean |
removeMuscleExciter(MuscleExciter mex)
Removes a muscle exciter from this model's muscle exciter container.
|
boolean |
removeParticle(Particle p)
Removes a particle from this model's particle container.
|
boolean |
removePoint(Point p)
Removes a point from this model's point container.
|
boolean |
removeRenderable(RenderableComponent rb)
Removes a renderable component from this model's renderable container.
|
boolean |
removeRigidBody(RigidBody rb)
Removes a rigid body from this model's rigid body container.
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer. |
ComponentList<RenderableComponent> |
renderables()
Returns this model's default container for renderable components.
|
RenderableComponentList<RigidBody> |
rigidBodies()
Returns this model's default container for rigid bodies.
|
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 |
setAddFrameMarkerStiffness(boolean enable)
Sets whether frame marker rotational effects are added to the stiffness
matrix.
|
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
c0 and c1, overriding the default behavior or
any behavior specified for the pair with previous
setBehavior calls. |
CollisionBehavior |
setCollisionBehavior(Collidable c0,
Collidable c1,
boolean enabled,
double mu)
Sets the collision behavior for a specified pair of collidables
c0 and c1, overriding the default behavior and
any behavior specified for the pair with previous
setBehavior calls. |
void |
setCollisionBehavior(Collidable c0,
Collidable c1,
CollisionBehavior behavior)
Sets the collision behavior for a specified pair of collidables
c0 and c1, overriding the default behavior and
any behavior specified for the pair with previous
setBehavior calls. |
CollisionResponse |
setCollisionResponse(Collidable c0,
Collidable c1)
Sets and returns a collision response for a specified pair of collidables
c0 and c1, 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
c0 and c1, removing any response that has been
previoulsy specified for the same pair. |
void |
setCompliantContact()
Sets the default behavior for collisions to be compliant, using estimated
values for the compliance, damping, and stiction creep.
|
void |
setCompliantContact(double c,
double d,
double sc)
Sets the default behavior for collisions to be compliant, with a
specified compliance, damping, and stiction creep.
|
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)
Sets the global friction coefficient in the collision manager for this
MechModel.
|
void |
setGravity(double gx,
double gy,
double gz) |
void |
setGravity(Vector3d g) |
void |
setGravityMode(PropertyMode mode) |
void |
setInertialDamping(double d) |
void |
setInertialDampingMode(PropertyMode mode) |
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 |
setRotaryLimitTol(double tol)
Sets the rotary limit tolerance for this MechModel.
|
void |
setRotaryLimitTolMode(PropertyMode mode) |
void |
setStaticIncrements(int n) |
void |
setStaticTikhonovFactor(double eps) |
void |
setWrapKnotDensity(double p)
Sets the default knot density for wrapping strands in
MultiPointSpring and MultiPointSpring. |
void |
setWrapKnotDensityMode(PropertyMode mode) |
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
gtr to transform its individual attributes. |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
void |
updateWrapSegments()
Updates the wrapping segments for all MultiPointSprings in this model.
|
void |
writeState(java.lang.String filename)
Writes the state of this MechModel to a file.
|
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, addGeneralSolveBlocks, addPosJacobian, addVelJacobian, advance, advanceAuxState, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, closePrintStateFile, collectInitialForces, copy, createState, createVelocityJacobian, getActiveDampingMatrix, getActiveDynamicComponents, getActiveForces, getActiveMass, getActiveMassMatrix, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAllConstrainers, getAttachmentConstraints, getAttachmentDerivatives, getAuxAdvanceState, getAuxVarDerivative, getAuxVarState, getAuxVarStateSize, getBilateralConstraints, getBilateralConstraintSizes, getBilateralForces, getBilateralForces, getBilateralInfo, getDefaultMatrixSolver, getDefaultStabilization, getDefaultUseImplicitFriction, getDynamicComponents, getDynamicDOFs, getDynamicsEnabled, getForceEffectors, getForces, getFrictionConstraints, getFrictionForces, getFrictionForces, getFrictionState, getFrictionState, getInitialState, getInverseMassMatrix, getMassMatrix, getMatrixSolver, getMatrixSolverRange, getNumBilateralForces, getNumUnilateralForces, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getPrintState, getProfiling, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralForces, getUnilateralForces, getUnilateralInfo, getUnilateralState, getUnilateralState, getUpdateForcesAtStepEnd, getUpdateForcesAtStepEndMode, getUseImplicitFriction, initialize, maxFrictionConstraintSets, numActiveComponents, numAttachedComponents, numParametricComponents, openPrintStateFile, placeDynamicComponent, printActiveMass, printActiveMass, printActiveStiffness, printActiveStiffness, reduceVelocityJacobian, reopenPrintStateFile, setActiveForces, setActivePosState, setActiveVelState, setAuxAdvanceState, setAuxVarState, setBilateralForces, setBilateralForces, setDefaultMatrixSolver, setDefaultStabilization, setDefaultUseImplicitFriction, setDynamicsEnabled, setForces, setFrictionForces, setFrictionForces, setFrictionState, setFrictionState, setIntegrator, setMatrixSolver, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setPrintState, setPrintState, setProfiling, setStabilization, setState, setUnilateralForces, setUnilateralForces, setUnilateralState, setUnilateralState, setUpdateForcesAtStepEnd, setUpdateForcesAtStepEndMode, setUseImplicitFriction, topMechSystem, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateDynamicComponentLists, updateForceComponentList, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeBilateralConstraintMatrix, writeMassMatrix, writeMassMatrix, writePrintStateHeader, writeStiffnessMatrix, writeStiffnessMatrixcreateRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderPropsactionPerformed, copy, getDefaultMaxStepSize, getMaxStepSize, getMenuItems, hasParameterizedType, hierarchyContainsReferences, setDefaultMaxStepSize, setMaxStepSizeadd, add, addAll, addComponents, addFixed, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getMinNumber, getNavpanelDisplay, getNumberLimit, getOneBasedNumbering, getParameterType, getShortName, hasChildren, incrementNumbering, indexOf, invalidateNumbers, isEditable, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, reorderComponents, resetNumbersToIndices, retainAll, set, setEditable, setNavpanelDisplay, setNumbered, setOneBasedNumbering, setShortName, size, toArray, toArray, updateNameMapcheckFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittransformPrioritygetMaxStepSizeconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenpostscanisWritable, writegetNameequals, hashCode, parallelStream, removeIf, spliterator, streamrecursivelyFindpublic 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 boolean getAddFrameMarkerStiffness()
true if frame marker rotational are added to
the stiffness matrix.public void setAddFrameMarkerStiffness(boolean enable)
false by default. If enabled, it will cause the
stiffness matrix to be asymmetric.enable - if true, causes frame marker rotational to
be added to the stiffness matrix.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 void setWrapKnotDensity(double p)
MultiPointSpring and MultiPointSpring. This is the number of
knots used per unit distance. When a wrapping strand is initialized, and
the number of knots is not explicitly specified, this number is
multiplied by the strand's initial length to determine the number of
knots.
If specified as a negative number, the knot density will be set to a
default value based on the overall size of this MechModel.
p - desired knot densitypublic double getWrapKnotDensity()
MultiPointSpring and MultiPointSpring. See setWrapKnotDensity(double) for details.public PropertyMode getWrapKnotDensityMode()
public void setWrapKnotDensityMode(PropertyMode mode)
public double computeDefaultWrapKnotDensity()
public void setRotaryLimitTol(double tol)
tol - new rotary limit tolerancepublic double getRotaryLimitTol()
public PropertyMode getRotaryLimitTolMode()
public void setRotaryLimitTolMode(PropertyMode mode)
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)
mu - global friction coefficientpublic double getFriction()
public void setDefaultCollisionBehavior(boolean enabled,
double mu)
setDefaultCollisionBehavior(behavior).enabled - if true, enables collisionsmu - friction coefficient (ignored if enabled is false). If less
than zero, the value is undefined and will be inherited from the global
setting in this MechModel's collision manager.setFriction(double),
getFriction()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). If
less than zero, the value is undefined and will be inherited from the global
setting in this MechModel's collision manager.setFriction(double),
getFriction()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). If less
than zero, the value is undefined and will be inherited from the global
setting in this MechModel's collision manager.
setting for this MechModel.CollisionBehavior object describing the collision
behaviorsetFriction(double),
getFriction()public 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 subcomponents,
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 subcomponent. 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 subcomponents, 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 subcomponent. 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 void setCompliantContact()
r of the model's current bounding sphere, the average mass
m of the model's collidables, and the current magnitude g
for the acceleration of gravity. In order for the estimated values to
make sense, it is important to call this method after the model
has been assembled. If gravity is set to 0, 9.8 is used instead. If there
are no collidable bodies, m is set to 1.
(0.001 r)/(m g), which allows contact
penetrations of 0.001 r under a force of m g.2 sqrt(m/c), where c is the
compliance. This enables critical damping.1e-5 r, so that stiction contacts
can be expected to move by about 0.001 r in 100 seconds. This
allows the creep to be small while still providing a large enough value
to regularize the static friction constraints.This method works by setting the compliance, damping, and stiction
creep properties for the collision manager of this model and all other
MechModels contained within it.
public void setCompliantContact(double c,
double d,
double sc)
> 0, then the contact computations will be
regularized.
This method works by setting the compliance, damping, and stiction
creep properties for the collision manager of this model and all other
MechModels contained within it.
c - complianced - dampingsc - stiction creeppublic CollisionManager getCollisionManager()
public CoordinateSetter getCoordinateSetter()
public MechSystemSolver.Integrator getIntegrator()
getIntegrator in class MechSystemBasepublic void setStaticTikhonovFactor(double eps)
public double getStaticTikhonovFactor()
public void setStaticIncrements(int n)
public int getStaticIncrements()
public PointList<Particle> particles()
public void addParticle(Particle p)
p - particle to addpublic boolean removeParticle(Particle p)
p - particle to remove
true if the component was present and actually removedpublic void clearParticles()
public PointList<Point> points()
public void addPoint(Point p)
p - point to addpublic boolean removePoint(Point p)
p - point to removetrue if the point was present and actually removedpublic void clearPoints()
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 double getInertialDamping()
public void setInertialDamping(double d)
public PropertyMode getInertialDampingMode()
public void setInertialDampingMode(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 RenderableComponentList<AxialSpring> axialSprings()
public void addAxialSpring(AxialSpring s)
s - axial spring to addpublic boolean removeAxialSpring(AxialSpring s)
s - axial spring to removetrue if the spring was present and actually removedpublic void clearAxialSprings()
public void attachAxialSpring(Point pnt0, Point pnt1, AxialSpring s)
pnt0 - first end point of the springpnt1 - second end point of the springs - axial spring to attach and addpublic RenderableComponentList<MultiPointSpring> multiPointSprings()
public void addMultiPointSpring(MultiPointSpring s)
s - multi-point spring to addpublic boolean removeMultiPointSpring(MultiPointSpring s)
s - multi-point spring to removetrue if the spring was present and actually removedpublic void clearMultiPointSprings()
public void updateWrapSegments()
public RenderableComponentList<FrameSpring> frameSprings()
public void addFrameSpring(FrameSpring s)
s - frame spring to addpublic boolean removeFrameSpring(FrameSpring s)
s - frame spring to removetrue if the spring was present and actually removedpublic void clearFrameSprings()
public void attachFrameSpring(Frame frameA, Frame frameB, FrameSpring s)
frameA - first end frame of the springframeB - second end frame of the springs - frame spring to attach and addpublic ComponentListView<ForceComponent> forceEffectors()
public void addForceEffector(ForceComponent fe)
fe - force effector to addpublic boolean removeForceEffector(ForceEffector fe)
fe - force effector to removetrue if the effector was present and actually removedpublic void clearForceEffectors()
public ComponentList<MuscleExciter> getMuscleExciters()
public void addMuscleExciter(MuscleExciter mex)
mex - muscle exciter to addpublic boolean removeMuscleExciter(MuscleExciter mex)
mex - muscle exciter to removetrue if the exciter was present and actually removedpublic void clearMuscleExciters()
public ComponentList<FieldComponent> getFields()
public void addField(FieldComponent fcomp)
fcomp - field component to addpublic boolean removeField(FieldComponent fcomp)
fcomp - field component to removetrue if the component was present and actually removedpublic void clearFields()
public RenderableComponentList<RigidBody> rigidBodies()
public void addRigidBody(RigidBody rb)
rb - rigid body to addpublic boolean removeRigidBody(RigidBody rb)
rb - rigid body to removetrue if the body was present and actually removedpublic void clearRigidBodies()
public RenderableComponentList<Frame> frames()
public void addFrame(Frame rb)
rb - frame to addpublic boolean removeFrame(Frame rb)
rb - frame to removetrue if the frame was present and actually removedpublic void clearFrames()
public RenderableComponentList<MeshComponent> meshBodies()
public void addMeshBody(MeshComponent mcomp)
meshBodies list of this model.mcomp - mesh component to be addedpublic boolean removeMeshBody(MeshComponent mcomp)
meshBodies list of this model.mcomp - mesh component to be removedtrue if the component was present and actually removedpublic void clearMeshBodies()
meshBodies list of this model.public PointList<FrameMarker> frameMarkers()
public void addFrameMarker(FrameMarker mkr)
mkr - frame marker to addpublic boolean removeFrameMarker(FrameMarker mkr)
mkr - frame marker to removetrue if the marker was present and actually removedpublic void clearFrameMarkers()
public void addFrameMarker(FrameMarker mkr, Frame frame, Point3d loc)
mkr - frame marker to attach and addframe - frame to attach the marker toloc - marker location in frame coordinates, or null to
leave the location unchangedpublic FrameMarker addFrameMarker(Frame frame, Point3d loc)
frame - frame object to add a marker toloc - marker location in frame coordinatespublic FrameMarker addFrameMarkerWorld(Frame frame, Point3d pos)
frame - frame object to add a marker topos - marker position in world coordinatespublic RenderableComponentList<BodyConnector> bodyConnectors()
public void addBodyConnector(BodyConnector c)
c - body connector to addpublic boolean removeBodyConnector(BodyConnector c)
c - body connector to removetrue if the connector was present and actually removedpublic void clearBodyConnectors()
public ComponentListView<ConstrainerBase> constrainers()
public void addConstrainer(ConstrainerBase c)
c - constrainer to addpublic boolean removeConstrainer(ConstrainerBase c)
c - constrainer to removetrue if the constrainer was present and actually removedpublic void clearConstrainers()
public ComponentList<RenderableComponent> renderables()
public void addRenderable(RenderableComponent rb)
rb - renderable component to addpublic boolean removeRenderable(RenderableComponent rb)
rb - renderable component to removetrue if the component was present and actually removedpublic void clearRenderables()
public ComponentListView<MechSystemModel> models()
public void addModel(MechSystemModel m)
m - sub-model to addpublic boolean removeModel(MechSystemModel m)
m - sub-model to removetrue if the model was present and actually removedpublic 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<DynamicAttachmentComp> attachments()
public void addAttachment(DynamicAttachmentComp 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 getDynamicComponents(java.util.List<DynamicComponent> comps)
getDynamicComponents in interface MechSystemModelpublic boolean isBilateralStructureConstant()
isBilateralStructureConstant in interface MechSystemisBilateralStructureConstant in class MechSystemBasetrue if bilateral constraints have a constant structurepublic 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(SparseNumberedBlockMatrix M)
addGeneralMassBlocks in interface MechSystemModeladdGeneralMassBlocks in class MechSystemBasepublic void getMassMatrixValues(SparseNumberedBlockMatrix 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<HasNumericState> 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)
If 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
The flags argument gives additional information that may
be relevant when advancing the model. Currently implemented
flags include Model.STATE_IS_VOLATILE.
preadvance in interface Modelpreadvance in class MechSystemBaset0 - current time (seconds)t1 - new time to advance to (seconds)flags - additional information relevant to the advancepublic void recursivelyPrepareAdvance(double t0,
double t1,
int flags,
int level)
recursivelyPrepareAdvance in interface MechSystemModelrecursivelyPrepareAdvance in class MechSystemBasepublic 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)
TransformGeometryContext.transform (this, X, 0);
transformGeometry in interface TransformableGeometryX - affine transformation to apply to the componentpublic void transformGeometry(GeometryTransformer gtr, TransformGeometryContext context, int flags)
gtr 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)
context 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 void notifyParentOfChange(ComponentChangeEvent e)
componentChanged method.notifyParentOfChange in interface ModelComponentnotifyParentOfChange in class ModelComponentBasee - optional argument giving specific information about the changepublic DynamicComponent checkVelocityStability()
checkVelocityStability in interface MechSystemModelnull if there is no instabilitypublic void dispose()
ModelBasepublic SparseBlockMatrix getActiveStiffnessMatrix()
getActiveStiffnessMatrix in class MechSystemBasepublic SparseBlockMatrix getTrueStiffnessMatrix()
public SparseBlockMatrix getYPRStiffnessMatrix(java.util.List<SolveMatrixModifier> modifiers)
modifiers - if not null, specifies a list
of modifiers to apply to the true stiffness matrix before
converting it to yaw-pitch-roll coordinates.public SparseBlockMatrix getStiffnessMatrix(java.util.List<SolveMatrixModifier> modifiers)
modifiers - if not null, specifies a list
of modifiers to apply to the stiffness matrix.public void writeState(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic void readState(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic java.util.ArrayList<DynamicComponent> getAllDynamicComponents()
public VectorNd getAllPositions()
public VectorNd getAllVelocities()
public VectorNd getAllForces()
public void checkAllPositions(java.lang.String msg,
VectorNd posvec,
boolean printDiffs)
public void checkAllVelocities(java.lang.String msg,
VectorNd velvec,
boolean printDiffs)
public void checkAllForces(java.lang.String msg,
VectorNd forcevec,
boolean printDiffs)
VectorNd myF0;
constrainedBackwardEuler (
double t0, double t1, StepAdjustment stepAdjust) {
...
if (t0 == 0) {
if (myF0 == null) {
myF0 = ((MechModel)mySys).getAllForces();
}
else {
((MechModel)mySys).checkAllForces ("force check", myF0, true);
}
}
}
public void printPointSpringInfo(java.lang.String msg)