public class MechModel extends MechSystemBase implements TransformableGeometry, ScalableUnits, MechSystemModel
ModelComponent.NavpanelVisibility
MechSystem.ConstraintInfo, MechSystem.FrictionInfo
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
myParametricsInSystemMatrix
DEFAULT_NAVPANEL_DISPLAY
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
ARTICULATED, SIMULATING
COMPUTE_CONTACTS, UPDATE_CONTACTS
TRANSLUCENT, 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 |
addConstrainer(ConstrainerBase c) |
void |
addForceEffector(ForceComponent fe) |
void |
addFrameMarker(FrameMarker mkr) |
void |
addFrameMarker(FrameMarker mkr,
Frame frame,
Point3d loc) |
void |
addFrameSpring(FrameSpring s) |
void |
addMeshBody(MeshComponent rb) |
void |
addModel(MechSystemModel m) |
void |
addMultiPointSpring(MultiPointSpring s) |
void |
addMuscleExciter(MuscleExciter mex) |
void |
addParticle(Particle p) |
void |
addRenderable(RenderableComponent rb) |
void |
addRigidBody(RigidBody rb) |
void |
addRigidBodyConnector(RigidBodyConnector c) |
StepAdjustment |
advance(double t0,
double t1,
int flags)
Advances this object from time t0 to time t1.
|
void |
attachAxialSpring(Point pnt0,
Point pnt1,
AxialSpring s) |
void |
attachFrameSpring(Frame frameA,
Frame frameB,
FrameSpring s) |
ComponentList<DynamicAttachment> |
attachments() |
void |
attachPoint(Point p1,
FemElement3d elem)
Attaches a point to the element of an FEM.
|
void |
attachPoint(Point p1,
FemModel3d fem,
double reduceTol)
Attaches a point to an FEM.
|
void |
attachPoint(Point p1,
Particle p2) |
void |
attachPoint(Point p1,
RigidBody body) |
void |
attachPoint(Point p1,
RigidBody body,
Point3d loc) |
RenderableComponentList<AxialSpring> |
axialSprings() |
DynamicMechComponent |
checkVelocityStability()
Checks the velocity stability of this system.
|
void |
clear() |
void |
clearAxialSprings() |
void |
clearConstrainers() |
void |
clearForceEffectors() |
void |
clearFrameMarkers() |
void |
clearFrameSprings() |
void |
clearMeshBodies() |
void |
clearModels() |
void |
clearMultiPointSprings() |
void |
clearParticles() |
void |
clearRenderables() |
void |
clearRigidBodies() |
void |
clearRigidBodyConnectors() |
void |
closePrintStateFile() |
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 |
detachPoint(Point p1) |
void |
dispose()
Called when the model is discarded.
|
ComponentListView<ForceComponent> |
forceEffectors() |
RenderableComponentList<FrameMarker> |
frameMarkers() |
ComponentListView<FrameSpring> |
frameSprings() |
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 a,
Collidable b)
Returns the collision behavior for a specified pair of collidables.
|
CollisionManager |
getCollisionManager() |
void |
getConstrainers(java.util.List<Constrainer> list,
int level) |
CollisionBehavior |
getDefaultCollisionBehavior(Collidable typeA,
Collidable typeB)
Gets the default collision behavior, for this MechModel,
for a specified pair of generic collidable types.
|
void |
getDynamicComponents(java.util.List<DynamicMechComponent> active,
java.util.List<DynamicMechComponent> attached,
java.util.List<DynamicMechComponent> 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() |
MechSystemSolver.MatrixSolver |
getMatrixSolver() |
double |
getMaxColoredExcitation() |
PropertyMode |
getMaxColoredExcitationMode() |
ComponentList<MuscleExciter> |
getMuscleExciters() |
double |
getPenetrationTol() |
PropertyMode |
getPenetrationTolMode() |
double |
getPointDamping() |
PropertyMode |
getPointDampingMode() |
java.lang.String |
getPrintState() |
boolean |
getProfiling() |
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.
|
boolean |
hasState()
Returns true if this component has state.
|
static boolean |
isActive(DynamicMechComponent c) |
static MechModel |
lowestCommonModel(ModelComponent comp1,
ModelComponent comp2) |
ComponentListView<MeshComponent> |
meshBodies() |
ComponentListView<MechSystemModel> |
models() |
RenderableComponentList<MultiPointSpring> |
multiPointSprings() |
java.io.PrintWriter |
openPrintStateFile(java.lang.String name) |
PointList<Particle> |
particles() |
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 |
removeConstrainer(ConstrainerBase c) |
void |
removeForceEffector(ForceEffector fe) |
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 |
removeRenderable(RenderableComponent rb) |
void |
removeRigidBody(RigidBody rb) |
void |
removeRigidBodyConnector(RigidBodyConnector c) |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
ComponentListView<RenderableComponent> |
renderables() |
java.io.PrintWriter |
reopenPrintStateFile(java.lang.String name) |
ComponentListView<RigidBody> |
rigidBodies() |
ComponentListView<RigidBodyConnector> |
rigidBodyConnectors() |
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) |
void |
setCollisionBehavior(Collidable a,
Collidable b,
boolean enabled)
Enables or disables collisions for a specified pair of Collidables,
overriding, if necessary, the primary collision behavior.
|
void |
setCollisionBehavior(Collidable a,
Collidable b,
boolean enabled,
double mu)
Sets collision behavior for a specified pair of Collidables, overriding,
if necessary, the primary behavior.
|
void |
setCollisionBehavior(Collidable a,
Collidable b,
CollisionBehavior behavior)
Sets collision behavior for a specified pair of Collidables, overriding,
if necessary, the primary behavior.
|
void |
setDefaultCollisionBehavior(boolean enabled,
double mu)
Specifies the default collision behavior for all default pairs
(RigidBody-RigidBody, RigidBody-Deformable, Deformable-Deformable,
Deformable-Self) associated with this MechModel.
|
void |
setDefaultCollisionBehavior(Collidable typeA,
Collidable typeB,
boolean enabled,
double mu)
Sets the default collision behavior, for this MechModel, for a specified
pair of generic collidable types.
|
void |
setDefaultCollisionBehavior(Collidable typeA,
Collidable typeB,
CollisionBehavior behavior)
Sets the default collision behavior, for this MechModel, for a specified
pair of generic collidable types.
|
void |
setDefaultCollisionBehavior(CollisionBehavior behavior)
Specifies a default collision behavior for all default pairs
(RigidBody-RigidBody, RigidBody-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) |
void |
setPenetrationTolIfNecessary() |
void |
setPenetrationTolMode(PropertyMode mode) |
void |
setPointDamping(double d) |
void |
setPointDampingMode(PropertyMode mode) |
void |
setPrintState(java.lang.String fmt) |
void |
setProfiling(boolean enable) |
void |
setRotaryDamping(double d) |
void |
setRotaryDampingMode(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 object.
|
void |
transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags)
Applies an affine transformation to the geometry of this object.
|
void |
updateBounds(Point3d pmin,
Point3d 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, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, copy, createState, createVelocityJacobian, getActiveForces, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveStiffness, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAttachmentConstraints, getAttachmentDerivatives, getAuxState, getBilateralConstraints, getBilateralConstraintSizes, getBilateralImpulses, getBilateralImpulses, getBilateralInfo, getDefaultStabilization, getDynamicsEnabled, getFrictionConstraints, getInitialState, getInverseMassMatrix, getMass, getMassMatrix, getNumBilateralImpulses, getNumUnilateralImpulses, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralImpulses, getUnilateralImpulses, getUnilateralInfo, getUpdateForcesAtStepEnd, hasParameterizedType, initialize, maxFrictionConstraintSets, numActiveComponents, numAttachedComponents, numParametricComponents, printActiveStiffness, reduceVelocityJacobian, setActiveForces, setActivePosState, setActiveVelState, setAuxState, setBilateralImpulses, setBilateralImpulses, setDefaultStabilization, setDynamicsEnabled, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setStabilization, setState, setUnilateralImpulses, setUnilateralImpulses, setUpdateForcesAtStepEnd, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeMassMatrix, writeStiffnessMatrix
createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderProps
copy, getInitialState, getMaxStepSize, hierarchyContainsReferences, setInitialState, setMaxStepSize
add, add, addAll, addComponents, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, indexOf, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, retainAll, setNavpanelDisplay, setNumberingStartAtOne, setShortName, size, toArray, toArray, updateNameMap
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxStepSize, initialize
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
createState, getInitialState, getState, setState
addActivePosImpulse, 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, updateForces
getName
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RenderableModelBase
public void clear()
clear
in interface java.util.Collection<ModelComponent>
clear
in class ComponentList<ModelComponent>
public double getRadius()
public void setPenetrationTol(double tol)
public 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)
setDefaultCollisionBehavior(behavior)
.behavior
- desired collision behaviorpublic CollisionBehavior getDefaultCollisionBehavior(Collidable typeA, Collidable typeB)
getDefaultCollisionBehavior(typeA,typeB)
.typeA
- first generic collidable typetypeB
- second generic collidable typepublic void setDefaultCollisionBehavior(Collidable typeA, Collidable typeB, CollisionBehavior behavior)
setDefaultCollisionBehavior(typeA,typeB,behavior)
.typeA
- first generic collidable typetypeB
- second generic collidable typebehavior
- specified collision behaviorpublic void setDefaultCollisionBehavior(Collidable typeA, Collidable typeB, boolean enabled, double mu)
setDefaultCollisionBehavior(typeA,typeB,behavior)
.typeA
- first generic collidable typetypeB
- second generic collidable typeenabled
- if true, enables collisionsmu
- friction coefficient (ignored if enabled is false)public void setCollisionBehavior(Collidable a, Collidable b, boolean enabled)
setCollisionBehavior(a,b,behavior)
.a
- first Collidableb
- second Collidableenabled
- if true, enables collisionspublic void setCollisionBehavior(Collidable a, Collidable b, boolean enabled, double mu)
setCollisionBehavior(a,b,behavior)
.a
- first Collidableb
- second Collidableenabled
- if true, enables collisionsmu
- friction coefficient (ignored if enabled is false)public void setCollisionBehavior(Collidable a, Collidable b, CollisionBehavior behavior)
setCollisionBehavior(a,b,behavior)
.a
- first Collidableb
- second Collidablebehavior
- specified collision behaviorpublic CollisionBehavior getCollisionBehavior(Collidable a, Collidable b)
getCollisionBehavior(a,b)
.a
- first Collidableb
- second Collidablepublic void getCollidables(java.util.List<Collidable> list, int level)
getCollidables
in interface MechSystemModel
public 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 addParticle(Particle p)
public void removeParticle(Particle p)
public void clearParticles()
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<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 void addFrameMarker(FrameMarker mkr)
public void removeFrameMarker(FrameMarker mkr)
public void clearFrameMarkers()
public RenderableComponentList<FrameMarker> frameMarkers()
public ComponentListView<RigidBodyConnector> rigidBodyConnectors()
public void addRigidBodyConnector(RigidBodyConnector c)
public void removeRigidBodyConnector(RigidBodyConnector c)
public void clearRigidBodyConnectors()
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, FemModel3d fem, double reduceTol)
p1
- Point to connect. Must currently be a particle.fem
- FemModel to connect the point to.reduceTol
- if > 0, attempts to reduce the number of nodes
in the connection by removing any whose coordinate weights are
less than reduceTol
.public void attachPoint(Point p1, FemElement3d elem)
p1
- Point to connect. Must currently be a particle.elem
- Element to connect the point to.public ComponentList<DynamicAttachment> attachments()
public void addAttachment(DynamicAttachment ax)
public boolean detachPoint(Point p1)
public void getAttachments(java.util.List<DynamicAttachment> list, int level)
getAttachments
in interface MechSystemModel
public boolean getAddConstraintForces()
public void setAddConstraintForces(boolean enable)
public static boolean isActive(DynamicMechComponent c)
public void getDynamicComponents(java.util.List<DynamicMechComponent> active, java.util.List<DynamicMechComponent> attached, java.util.List<DynamicMechComponent> parametric)
getDynamicComponents
in interface MechSystemModel
public void getConstrainers(java.util.List<Constrainer> list, int level)
getConstrainers
in interface MechSystemModel
public void getForceEffectors(java.util.List<ForceEffector> list, int level)
getForceEffectors
in interface MechSystemModel
public void getAuxStateComponents(java.util.List<HasAuxState> list, int level)
getAuxStateComponents
in interface MechSystemModel
public void getSlaveObjectComponents(java.util.List<HasSlaveObjects> list, int level)
getSlaveObjectComponents
in interface MechSystemModel
getSlaveObjectComponents
in class MechSystemBase
list
- HasSlaveObjects components should be added to this listpublic void projectRigidBodyPositionConstraints()
public int combineMatrixTypes(int type1, int type2)
public java.lang.String getPrintState()
public void setPrintState(java.lang.String fmt)
public java.io.PrintWriter openPrintStateFile(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.io.PrintWriter reopenPrintStateFile(java.lang.String name) throws java.io.IOException
java.io.IOException
public void closePrintStateFile() throws java.io.IOException
java.io.IOException
public StepAdjustment preadvance(double t0, double t1, int flags)
ModelBase
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
preadvance
in interface Model
preadvance
in class MechSystemBase
t0
- current time (seconds)t1
- new time to advance to (seconds)flags
- reserved for future usepublic StepAdjustment advance(double t0, double t1, int flags)
ModelBase
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
public void recursivelyFinalizeAdvance(StepAdjustment stepAdjust, double t0, double t1, int flags, int level)
recursivelyFinalizeAdvance
in interface MechSystemModel
recursivelyFinalizeAdvance
in class MechSystemBase
public void recursivelyInitialize(double t, int level)
recursivelyInitialize
in interface MechSystemModel
recursivelyInitialize
in class MechSystemBase
public 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
ModelComponentBase
write
.scan
in interface ModelComponent
scan
in interface Scannable
scan
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(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RenderableModelBase
pmin
- minimum pointpmax
- maximum pointpublic void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class RenderableModelBase
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public void transformGeometry(AffineTransform3dBase X)
TransformableGeometry
transformGeometry (X, this, 0);
transformGeometry
in interface TransformableGeometry
X
- affine transformationpublic void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
TransformableGeometry
topComponent
should be the component for which the method
was initially invoked. The variable flags
provides
information about the context in which the transformation is
being applied. At present, the available flags are
TransformableGeometry.SIMULATING
and TransformableGeometry.ARTICULATED
.transformGeometry
in interface TransformableGeometry
X
- affine transformationtopObject
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factorpublic boolean hasState()
hasState
in interface ModelComponent
hasState
in class ModelComponentBase
public 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 void setProfiling(boolean enable)
public boolean getProfiling()
public void componentChanged(ComponentChangeEvent e)
ComponentList
This method should propagate the notification up the component hierarchy
by calling notifyParentOfChange
.
componentChanged
in interface ComponentChangeListener
componentChanged
in interface CompositeComponent
componentChanged
in class ComponentList<ModelComponent>
e
- optional argument giving specific information about the changepublic DynamicMechComponent checkVelocityStability()
checkVelocityStability
in interface MechSystemModel