com.vwp.j3d.utils.geometry
Class RotationShape3D

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Shape3D
                  extended by com.vwp.j3d.utils.geometry.RotationShape3D

public class RotationShape3D
extends javax.media.j3d.Shape3D

This class generates an rotation symmetric object out of a coordinate array which describes its hull. It bases on source code by Dr. Andrew Davison (http://fivedots.coe.psu.ac.th/~ad/jg)


Field Summary
static int ENABLE_APPEARANCE_MODIFY
          This flag specifies that the objects appearance has to be read- and writeable also after compilation.
static int ENABLE_PICK_REPORTING
          This flag specifies that the objects has to pickable also after compilation.
 
Fields inherited from class javax.media.j3d.Shape3D
ALLOW_APPEARANCE_OVERRIDE_READ, ALLOW_APPEARANCE_OVERRIDE_WRITE, ALLOW_APPEARANCE_READ, ALLOW_APPEARANCE_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE, ALLOW_GEOMETRY_READ, ALLOW_GEOMETRY_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING
 
Constructor Summary
RotationShape3D(double[] xsIn, double[] ysIn)
          Default constructor for a rotation symmetric object.
RotationShape3D(double[] xsIn, double[] ysIn, double zRadiusFactor, int divisions)
          Constructor for a white rotation symmetric object.
RotationShape3D(int flags, double[] xsIn, double[] ysIn, double zRadiusFactor, int divisions, javax.media.j3d.Appearance App)
          Constructor for a rotation symmetric object.
RotationShape3D(int flags, float[] xsIn, float[] ysIn, double zRadiusFactor, int divisions, javax.media.j3d.Appearance App)
          Constructor for a rotation symmetric object.
 
Method Summary
 
Methods inherited from class javax.media.j3d.Shape3D
addGeometry, cloneNode, duplicateNode, getAllGeometries, getAppearance, getAppearanceOverrideEnable, getBounds, getCollisionBounds, getGeometry, getGeometry, indexOfGeometry, insertGeometry, intersect, intersect, intersect, numGeometries, removeAllGeometries, removeGeometry, removeGeometry, setAppearance, setAppearanceOverrideEnable, setCollisionBounds, setGeometry, setGeometry
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLE_APPEARANCE_MODIFY

public static final int ENABLE_APPEARANCE_MODIFY
This flag specifies that the objects appearance has to be read- and writeable also after compilation. It causes this class to set the required capability bits for the underlying Shape3D

See Also:
Constant Field Values

ENABLE_PICK_REPORTING

public static final int ENABLE_PICK_REPORTING
This flag specifies that the objects has to pickable also after compilation. It causes this class to set the required capability bits for the underlying geometry data

See Also:
Constant Field Values
Constructor Detail

RotationShape3D

public RotationShape3D(double[] xsIn,
                       double[] ysIn)
Default constructor for a rotation symmetric object. It generates a white, non-elliptic RotationShape3D.

Parameters:
xsIn - x-coordinate array which describes the hull of the object
ysIn - y-coordinate array which describes the hull of the object

RotationShape3D

public RotationShape3D(int flags,
                       double[] xsIn,
                       double[] ysIn,
                       double zRadiusFactor,
                       int divisions,
                       javax.media.j3d.Appearance App)
Constructor for a rotation symmetric object.

Parameters:
flags - specifies which Primitive-flags have to be used for the object creation
xsIn - x-coordinate array which describes the hull of the object
ysIn - y-coordinate array which describes the hull of the object
zRadiusFactor - specifies if a elliptic object has to be created; if this value is euqal 1.0 the object won't be elliptic, values smaller 1.0 cause the model to be shrinked in z-direction, values greater 1.0 let it expand in z-direction
divisions - specifies the number of subdivision which have to be used to generate the object, this value has to be at least 3
App - the Appearance for this object

RotationShape3D

public RotationShape3D(int flags,
                       float[] xsIn,
                       float[] ysIn,
                       double zRadiusFactor,
                       int divisions,
                       javax.media.j3d.Appearance App)
Constructor for a rotation symmetric object.

Parameters:
flags - specifies which Primitive-flags have to be used for the object creation
xsIn - x-coordinate array which describes the hull of the object
ysIn - y-coordinate array which describes the hull of the object
zRadiusFactor - specifies if a elliptic object has to be created; if this value is euqal 1.0 the object won't be elliptic, values smaller 1.0 cause the model to be shrinked in z-direction, values greater 1.0 let it expand in z-direction
divisions - specifies the number of subdivision which have to be used to generate the object, this value has to be at least 3
App - the Appearance for this object

RotationShape3D

public RotationShape3D(double[] xsIn,
                       double[] ysIn,
                       double zRadiusFactor,
                       int divisions)
Constructor for a white rotation symmetric object.

Parameters:
xsIn - x-coordinate array which describes the hull of the object
ysIn - y-coordinate array which describes the hull of the object
zRadiusFactor - specifies if a elliptic object has to be created; if this value is euqal 1.0 the object won't be elliptic, values smaller 1.0 cause the model to be shrinked in z-direction, values greater 1.0 let it expand in z-direction
divisions - specifies the number of subdivision which have to be used to generate the object, this value has to be at least 3