javax.media.j3d
Class OrientedShape3DRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeRetained
              extended by javax.media.j3d.LeafRetained
                  extended by javax.media.j3d.Shape3DRetained
                      extended by javax.media.j3d.OrientedShape3DRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId

 class OrientedShape3DRetained
extends Shape3DRetained


Field Summary
private  AxisAngle4d aa
           
(package private) static int ALIGNMENT_CHANGED
           
(package private)  Vector3f axis
           
(package private) static int AXIS_CHANGED
           
(package private) static int CONSTANT_SCALE_CHANGED
           
(package private)  boolean constantScale
           
(package private) static double EPSILON
           
private  Vector3d eyeVec
           
private  Vector4d[] im_vec
           
private  Transform3D left_xform
           
private  Vector4d lvec
           
(package private)  int mode
           
private  Vector3d nAxis
           
(package private)  boolean orientedTransformDirty
           
(package private)  Transform3D[] orientedTransforms
           
private  Transform3D right_xform
           
(package private) static int ROTATION_CHANGED
           
(package private)  Point3f rotationPoint
           
(package private) static int SCALE_FACTOR_CHANGED
           
(package private)  double scaleFactor
           
(package private)  Transform3D scaleXform
           
private  Vector3d vector
           
private  Point3d viewPosition
           
private  Transform3D xform
           
private  Vector3d yAxis
           
private  Vector3d yUp
           
private  Point3d yUpPoint
           
private  Vector3d zAxis
           
private  Transform3D zRotate
           
 
Fields inherited from class javax.media.j3d.Shape3DRetained
altApps, appearance, APPEARANCE_CHANGED, APPEARANCEOVERRIDE_CHANGED, appearanceOverrideEnable, bounds, BOUNDS_CHANGED, branchGroupPath, changedFrequent, closestSwitchIndex, closestSwitchParent, COLLISION_CHANGED, collisionBound, collisionVwcBound, fogs, GEOMETRY_CHANGED, geometryList, inImmCtx, isCollidable, isDirty, isPickable, key, LAST_DEFINED_BIT, lights, mirrorShape3D, modelClips, numAltApps, numfogs, numlights, numModelClips, orderedPath, otherAppearance, sourceNode, targetThreads, viewList, visible, vwcBounds
 
Fields inherited from class javax.media.j3d.LeafRetained
boundsDirty, switchState
 
Fields inherited from class javax.media.j3d.NodeRetained
ALTERNATEAPPEARANCE, AMBIENTLIGHT, apiBounds, BACKGROUND, BACKGROUNDSOUND, BEHAVIOR, BOUNDINGLEAF, boundsAutoCompute, BRANCHGROUP, branchGroupPaths, cachedBounds, childIndex, CLIP, collidable, CONESOUND, CONTAINS_VIEWPLATFORM, CURRENT_LOCAL_TO_VWORLD, DECALGROUP, DIRECTIONALLIGHT, EXPONENTIALFOG, geometryBackground, GROUP, inSharedGroup, LAST_LOCAL_TO_VWORLD, LINEARFOG, LINK, localBounds, locale, localToVworld, localToVworldIndex, localToVworldKeys, MODELCLIP, MORPH, nnuId, nodeId, nodeType, NUMNODES, ORDEREDGROUP, orderedId, ORIENTEDSHAPE3D, parent, parentSwitchLink, parentTransformLink, pickable, POINTLIGHT, POINTSOUND, refCount, SHAPE, SHAREDGROUP, SOUNDSCAPE, SPOTLIGHT, staticTransform, SWITCH, TRANSFORMGROUP, universe, validCachedBounds, VIEWPLATFORM, VIEWSPECIFICGROUP
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
OrientedShape3DRetained()
          Constructs a OrientedShape3D node with default parameters.
 
Method Summary
(package private)  void compile(CompileState compState)
          This is the default compile() method, which just marks the sgo as compiled.
(package private)  void getAlignmentAxis(Vector3f axis)
          Retrieves the alignment axis of this OrientedShape3D node, and copies it into the specified vector.
(package private)  int getAlignmentMode()
          Retrieves the alignment mode.
(package private)  boolean getConstantScaleEnable()
           
(package private)  Transform3D getOrientedTransform(int viewIndex)
           
(package private)  void getRotationPoint(Point3f point)
          Retrieves the rotation point of this OrientedShape3D node, and copies it into the specified vector.
(package private)  double getScale()
           
(package private)  void initAlignmentAxis(float x, float y, float z)
           
(package private)  void initAlignmentAxis(Vector3f axis)
           
(package private)  void initAlignmentMode(int mode)
           
(package private)  void initConstantScaleEnable(boolean cons_scale)
           
(package private)  void initRotationPoint(float x, float y, float z)
           
(package private)  void initRotationPoint(Point3f point)
           
(package private)  void initScale(double scale)
           
private  boolean projectToPlane(Vector3d projVec, Vector3d planeVec)
           
(package private)  void searchGeometryAtoms(UnorderList list)
           
(package private)  void sendChangedMessage(int component, java.lang.Object attr)
           
(package private)  void setAlignmentAxis(float x, float y, float z)
          Sets the new alignment axis.
(package private)  void setAlignmentAxis(Vector3f axis)
          Sets the new alignment axis.
(package private)  void setAlignmentMode(int mode)
          Sets the alignment mode.
(package private)  void setConstantScaleEnable(boolean enable)
           
(package private)  void setRotationPoint(float x, float y, float z)
          Sets the new rotation point.
(package private)  void setRotationPoint(Point3f point)
          Sets the new rotation point.
(package private)  void setScale(double scale)
           
(package private)  void updateImmediateMirrorObject(java.lang.Object[] args)
           
(package private)  void updateOrientedTransform(Canvas3D canvas, int viewIndex)
           
 
Methods inherited from class javax.media.j3d.Shape3DRetained
addAltApp, addFog, addGeometry, addLight, addModelClip, allowIntersect, checkEquivalenceClass, clearLive, clearMirrorShape, computeCombineBounds, doSetLive, getAllGeometries, getAppearance, getAppearanceOverrideEnable, getBounds, getCollisionBounds, getCombineBounds, getEffectiveBounds, getGeomAtom, getGeomAtomsArray, getGeomAtomsList, getGeometry, getInImmCtx, getLocalBounds, getMirrorObjects, getMirrorShape, getMirrorShape, getPrimaryViewIdx, handleFrequencyChange, indexOfGeometry, initializeGAtom, initMirrorShape3D, insertGeometry, intersect, intersect, intersectGeometryList, intersectGeometryList, isAlphaEditable, isAlphaFrequentlyEditable, isEquivalent, isStatic, merge, numGeometries, removeAllGeometries, removeAltApp, removeFog, removeGeometry, removeGeometry, removeLight, removeModelClip, setAppearance, setAppearanceOverrideEnable, setBounds, setBoundsAutoCompute, setCollisionBounds, setGeomAtom, setGeometry, setInImmCtx, setLive, setMorphGeometry, shapeIsMergeable, staticXformCanBeApplied, updateBounds, updateCollidable, updatePickable, willRemainOpaque
 
Methods inherited from class javax.media.j3d.LeafRetained
clone, updateBoundingLeaf, updateMirrorObject, updateTransformChange
 
Methods inherited from class javax.media.j3d.NodeRetained
computeNonLiveLocalToVworld, dirtyBoundsCache, equal, findCollidableFlags, findPickableFlags, findTransformLevels, getBoundsAutoCompute, getCollidable, getCurrentLocalToVworld, getCurrentLocalToVworld, getCurrentLocalToVworld, getId, getLastLocalToVworld, getLastLocalToVworld, getLastLocalToVworld, getLocale, getLocalToVworld, getLocalToVworld, getLocalToVworld, getParent, getPickable, getVirtualUniverse, mergeTransform, notifySceneGraphChanged, processViewSpecificInfo, recombineAbove, removeNodeData, setAuxData, setCollidable, setNodeData, setParent, setPickable, transformBounds, updateLocalToVworld
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, clone, doSetLive, getSource, isInSetLive, markAsLive, setCompiled, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIGNMENT_CHANGED

static final int ALIGNMENT_CHANGED
See Also:
Constant Field Values

AXIS_CHANGED

static final int AXIS_CHANGED
See Also:
Constant Field Values

ROTATION_CHANGED

static final int ROTATION_CHANGED
See Also:
Constant Field Values

CONSTANT_SCALE_CHANGED

static final int CONSTANT_SCALE_CHANGED
See Also:
Constant Field Values

SCALE_FACTOR_CHANGED

static final int SCALE_FACTOR_CHANGED
See Also:
Constant Field Values

mode

int mode

axis

Vector3f axis

rotationPoint

Point3f rotationPoint

nAxis

private Vector3d nAxis

viewPosition

private Point3d viewPosition

yUpPoint

private Point3d yUpPoint

eyeVec

private Vector3d eyeVec

yUp

private Vector3d yUp

zAxis

private Vector3d zAxis

yAxis

private Vector3d yAxis

vector

private Vector3d vector

aa

private AxisAngle4d aa

xform

private Transform3D xform

zRotate

private Transform3D zRotate

constantScale

boolean constantScale

scaleFactor

double scaleFactor

left_xform

private Transform3D left_xform

right_xform

private Transform3D right_xform

scaleXform

Transform3D scaleXform

im_vec

private Vector4d[] im_vec

lvec

private Vector4d lvec

orientedTransformDirty

boolean orientedTransformDirty

orientedTransforms

Transform3D[] orientedTransforms

EPSILON

static final double EPSILON
See Also:
Constant Field Values
Constructor Detail

OrientedShape3DRetained

public OrientedShape3DRetained()
Constructs a OrientedShape3D node with default parameters. The default values are as follows:

Method Detail

initAlignmentMode

void initAlignmentMode(int mode)

setAlignmentMode

void setAlignmentMode(int mode)
Sets the alignment mode.

Parameters:
mode - one of: ROTATE_ABOUT_AXIS or ROTATE_ABOUT_POINT

getAlignmentMode

int getAlignmentMode()
Retrieves the alignment mode.

Returns:
one of: ROTATE_ABOUT_AXIS or ROTATE_ABOUT_POINT

initAlignmentAxis

void initAlignmentAxis(Vector3f axis)

initAlignmentAxis

void initAlignmentAxis(float x,
                       float y,
                       float z)

setAlignmentAxis

void setAlignmentAxis(Vector3f axis)
Sets the new alignment axis. This is the ray about which this OrientedShape3D rotates when the mode is ROTATE_ABOUT_AXIS.

Parameters:
axis - the new alignment axis

setAlignmentAxis

void setAlignmentAxis(float x,
                      float y,
                      float z)
Sets the new alignment axis. This is the ray about which this OrientedShape3D rotates when the mode is ROTATE_ABOUT_AXIS.

Parameters:
x - the x component of the alignment axis
y - the y component of the alignment axis
z - the z component of the alignment axis

getAlignmentAxis

void getAlignmentAxis(Vector3f axis)
Retrieves the alignment axis of this OrientedShape3D node, and copies it into the specified vector.

Parameters:
axis - the vector that will contain the alignment axis

initRotationPoint

void initRotationPoint(Point3f point)

initRotationPoint

void initRotationPoint(float x,
                       float y,
                       float z)

setRotationPoint

void setRotationPoint(Point3f point)
Sets the new rotation point. This is the point about which the OrientedShape3D rotates when the mode is ROTATE_ABOUT_POINT.

Parameters:
point - the new rotation point

setRotationPoint

void setRotationPoint(float x,
                      float y,
                      float z)
Sets the new rotation point. This is the point about which the OrientedShape3D rotates when the mode is ROTATE_ABOUT_POINT.

Parameters:
x - the x component of the rotation point
y - the y component of the rotation point
z - the z component of the rotation point

getRotationPoint

void getRotationPoint(Point3f point)
Retrieves the rotation point of this OrientedShape3D node, and copies it into the specified vector.

Parameters:
axis - the point that will contain the rotation point

setConstantScaleEnable

void setConstantScaleEnable(boolean enable)

getConstantScaleEnable

boolean getConstantScaleEnable()

initConstantScaleEnable

void initConstantScaleEnable(boolean cons_scale)

setScale

void setScale(double scale)

initScale

void initScale(double scale)

getScale

double getScale()

sendChangedMessage

void sendChangedMessage(int component,
                        java.lang.Object attr)

updateImmediateMirrorObject

void updateImmediateMirrorObject(java.lang.Object[] args)
Overrides:
updateImmediateMirrorObject in class Shape3DRetained

getOrientedTransform

Transform3D getOrientedTransform(int viewIndex)

updateOrientedTransform

void updateOrientedTransform(Canvas3D canvas,
                             int viewIndex)

projectToPlane

private boolean projectToPlane(Vector3d projVec,
                               Vector3d planeVec)

compile

void compile(CompileState compState)
Description copied from class: SceneGraphObjectRetained
This is the default compile() method, which just marks the sgo as compiled.

Overrides:
compile in class Shape3DRetained

searchGeometryAtoms

void searchGeometryAtoms(UnorderList list)
Overrides:
searchGeometryAtoms in class Shape3DRetained


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.