org.opensourcephysics.drawing3d.simple3d
Class SimpleElement

java.lang.Object
  extended by org.opensourcephysics.drawing3d.simple3d.SimpleElement
All Implemented Interfaces:
ImplementingObject
Direct Known Subclasses:
SimpleAbstractTile, SimpleElementImage, SimpleElementPoints, SimpleElementPolygon, SimpleElementSegment, SimpleElementShape, SimpleElementText, SimpleElementTrail, SimpleGroup

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

Title: SimpleElement

Description: Defines methods required by the painter's algorithm drawing scheme.

Version:
August 2009
Author:
Francisco Esquembre

Field Summary
static int FORCE_RECOMPUTE
          Any of these changes forces a recomputation of the SimpleElement
 
Method Summary
 void addToScene()
          Efectively adds the element to the 3D scene.
 org.opensourcephysics.drawing3d.simple3d.Object3D[] getObjects3D()
          Returns an array of Objects3D to sort according to its distance to the eye.
abstract  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

FORCE_RECOMPUTE

public static final int FORCE_RECOMPUTE
Any of these changes forces a recomputation of the SimpleElement

See Also:
Constant Field Values
Method Detail

addToScene

public final 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 final 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 abstract 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

getObjects3D

public org.opensourcephysics.drawing3d.simple3d.Object3D[] getObjects3D()
Returns an array of Objects3D to sort according to its distance to the eye.