artisynth.core.mechmodels
Class FixedMesh

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.RenderableComponentBase
          extended by artisynth.core.mechmodels.MeshComponent
              extended by artisynth.core.mechmodels.FixedMesh
All Implemented Interfaces:
ModelComponent, RenderableComponent, ScalableUnits, TransformableGeometry, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable

public class FixedMesh
extends MeshComponent


Nested Class Summary
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Field Summary
static PropertyList myProps
           
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
 
Fields inherited from interface artisynth.core.util.TransformableGeometry
ARTICULATED, SIMULATING
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
FixedMesh()
           
FixedMesh(MeshBase mesh)
           
FixedMesh(java.lang.String name)
           
 
Method Summary
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 AxisAngle getOrientation()
           
 RigidTransform3d getPose()
           
 void getPose(RigidTransform3d XFrameToWorld)
           
 Point3d getPosition()
           
 Quaternion getRotation()
           
 void scaleDistance(double s)
          Scales all distance coordinates.
 void scan(ReaderTokenizer rtok, java.lang.Object ref)
          Scans this element from a ReaderTokenizer.
 void setMesh(MeshBase mesh, java.lang.String fileName, AffineTransform3dBase X)
          Sets a mesh for this body.
 void setMeshFromFile(MeshBase mesh, java.lang.String fileName)
           
 void setMeshFromFile(MeshBase mesh, java.lang.String fileName, AffineTransform3dBase X)
           
 void setOrientation(AxisAngle axisAng)
           
 void setPose(RigidTransform3d XFrameToWorld)
           
 void setPosition(Point3d pos)
           
 void setRotation(Quaternion q)
           
 void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
          Applies an affine transformation to the geometry of this object.
 void transformMesh(AffineTransform3dBase X)
           
 void updateBounds(Point3d pmin, Point3d pmax)
          Update the minimum and maximum points for this object.
 void updatePosState(int flags)
           
 
Methods inherited from class artisynth.core.mechmodels.MeshComponent
copy, createRenderProps, getMesh, getVertex, numVertices, prerender, render, render, scaleMass, setDefaultValues, setMesh, setMesh, transformGeometry, transformGeometry, updatePosition, updateSlavePos
 
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase
getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderProps
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from interface maspack.properties.HasProperties
getProperty
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable, write
 

Field Detail

myProps

public static PropertyList myProps
Constructor Detail

FixedMesh

public FixedMesh()

FixedMesh

public FixedMesh(java.lang.String name)

FixedMesh

public FixedMesh(MeshBase mesh)
Method Detail

getAllPropertyInfo

public PropertyList getAllPropertyInfo()
Description copied from interface: HasProperties
Returns a list giving static information about all properties exported by this object.

Specified by:
getAllPropertyInfo in interface HasProperties
Overrides:
getAllPropertyInfo in class MeshComponent
Returns:
static information for all exported properties

setPose

public void setPose(RigidTransform3d XFrameToWorld)

getPose

public RigidTransform3d getPose()

getPose

public void getPose(RigidTransform3d XFrameToWorld)

getPosition

public Point3d getPosition()

setPosition

public void setPosition(Point3d pos)

getOrientation

public AxisAngle getOrientation()

setOrientation

public void setOrientation(AxisAngle axisAng)

getRotation

public Quaternion getRotation()

setRotation

public void setRotation(Quaternion q)

setMeshFromFile

public void setMeshFromFile(MeshBase mesh,
                            java.lang.String fileName)
                     throws java.io.IOException
Throws:
java.io.IOException

setMeshFromFile

public void setMeshFromFile(MeshBase mesh,
                            java.lang.String fileName,
                            AffineTransform3dBase X)
                     throws java.io.IOException
Throws:
java.io.IOException

updateBounds

public void updateBounds(Point3d pmin,
                         Point3d pmax)
Description copied from interface: GLRenderable
Update the minimum and maximum points for this object. In an x-y-z coordinate system with x directed to the right and y directed upwards, the minimum and maximum points can be thought of as defining the left-lower-far and right-upper-near corners of a bounding cube. This method should only reduce the elements of the minimum point and increase the elements of the maximum point, since it may be used as part of an iteration to determine the bounding cube for several different objects.

Specified by:
updateBounds in interface GLRenderable
Overrides:
updateBounds in class MeshComponent
Parameters:
pmin - minimum point
pmax - maximum point

scaleDistance

public void scaleDistance(double s)
Description copied from interface: ScalableUnits
Scales all distance coordinates.

Specified by:
scaleDistance in interface ScalableUnits
Overrides:
scaleDistance in class MeshComponent
Parameters:
s - scaling factor

setMesh

public void setMesh(MeshBase mesh,
                    java.lang.String fileName,
                    AffineTransform3dBase X)
Sets a mesh for this body.

Overrides:
setMesh in class MeshComponent

updatePosState

public void updatePosState(int flags)

transformMesh

public void transformMesh(AffineTransform3dBase X)

transformGeometry

public void transformGeometry(AffineTransform3dBase X,
                              TransformableGeometry topObject,
                              int flags)
Description copied from interface: TransformableGeometry
Applies an affine transformation to the geometry of this object. If recursively invoked within a component hierarchy, then 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.

Specified by:
transformGeometry in interface TransformableGeometry
Overrides:
transformGeometry in class MeshComponent
Parameters:
X - affine transformation
topObject - component on which the method was initially invoked
flags - provides information about the context in which the transformation is being applied.

scan

public void scan(ReaderTokenizer rtok,
                 java.lang.Object ref)
          throws java.io.IOException
Description copied from class: ModelComponentBase
Scans this element from a ReaderTokenizer. The expected text format is assumed to be compatible with that produced by write.

Specified by:
scan in interface ModelComponent
Specified by:
scan in interface Scannable
Overrides:
scan in class ModelComponentBase
Parameters:
rtok - Tokenizer from which to scan the element
ref - optional reference object which can be used for resolving references to other objects
Throws:
java.io.IOException - if an I/O or formatting error occured