org.opensourcephysics.drawing3d.java3d
Class Java3dElement

java.lang.Object
  extended by org.opensourcephysics.drawing3d.java3d.Java3dElement
All Implemented Interfaces:
ImplementingObject
Direct Known Subclasses:
Java3dAbstractTile, Java3dElementCone, Java3dElementCylinder, Java3dElementDisk, Java3dElementEllipsoid, Java3dElementImage, Java3dElementObject, Java3dElementPoints, Java3dElementPolygon, Java3dElementSegment, Java3dElementShape, Java3dElementSpring, Java3dElementTetrahedron, Java3dElementText, Java3dElementTrail, Java3dGroup

public abstract class Java3dElement
extends java.lang.Object
implements ImplementingObject

Title: Java3dElement

Description: The base class for a Java3D implementation of a 3D Element.

Copyright: Open Source Physics project

Version:
August 2009 Based on previous work by Glenn Ford
Author:
Carlos Jara Bravo, Francisco Esquembre

Field Summary
static int AFFECTS_TRANSFORM
           
 
Method Summary
 void addToScene()
          Efectively adds the element to the 3D scene.
abstract  boolean isPrimitive()
           
 void processChanges(int _change, int _cummulativeChange)
          Process changes of the element
 void removeFromScene()
          Efectively removes the element from the 3D scene.
 void styleChanged(int _change)
          Applies any change required by a change in style
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AFFECTS_TRANSFORM

public static final int AFFECTS_TRANSFORM
See Also:
Constant Field Values
Method Detail

addToScene

public void addToScene()
Description copied from interface: ImplementingObject
Efectively adds the element to the 3D scene. Required by Java 3D

Specified by:
addToScene in interface ImplementingObject

removeFromScene

public void removeFromScene()
Description copied from interface: ImplementingObject
Efectively removes the element from the 3D scene. Required by Java 3D

Specified by:
removeFromScene in interface ImplementingObject

processChanges

public void processChanges(int _change,
                           int _cummulativeChange)
Description copied from interface: ImplementingObject
Process changes of the element

Specified by:
processChanges in interface ImplementingObject
Parameters:
_change - int the changes of this element
_cummulativeChange - int the cumulative changes, i.e. the changes of the element and those inherited from parent groups

styleChanged

public void styleChanged(int _change)
Description copied from interface: ImplementingObject
Applies any change required by a change in style

Specified by:
styleChanged in interface ImplementingObject
Parameters:
_change - int indicates the change that took place

isPrimitive

public abstract boolean isPrimitive()
Returns:
Returns a boolean which indicates if the 3D object is primitive.