org.xith3d.scenegraph.particles.jops
Class GeneratorShape3D

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.Leaf
              extended by org.xith3d.scenegraph.Shape3D
                  extended by org.xith3d.scenegraph.particles.jops.GeneratorShape3D
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, Billboard

public class GeneratorShape3D
extends Shape3D
implements Billboard

Insert comment here.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
GeneratorShape3D(boolean relativeOrientation)
           
GeneratorShape3D(boolean relativeOrientation, org.softmed.jops.Generator generator)
           
 
Method Summary
protected  void buildAbsoluteOrientedTriangles(float[] carray, org.softmed.jops.Particle particle)
           
protected  void buildFacingCameraTriangles(float[] carray, org.softmed.jops.Particle particle)
           
 void dispose()
           
protected  org.jagatoo.opengl.enums.BlendFunction getBlendFactor(int glBlendFactorInteger)
           
 org.softmed.jops.Generator getGenerator()
           
 IndexedTriangleArray getGeometry()
          
 org.openmali.types.twodee.Sized2iRO getSizeOnScreen()
          Returns the Billboard desired on screen dimensions.
 boolean isAbsoluteOrientation()
           
static boolean isWireFrameEnabled()
           
protected  void rotate2f(org.openmali.vecmath2.TexCoord2f v, float angle)
           
 void setAbsoluteOrientation(boolean absoluteOrientation)
           
 void setGenerator(org.softmed.jops.Generator generator)
           
static void setWireFrameEnabled(boolean mode)
           
protected  void update()
           
 void update(org.openmali.vecmath2.Vector3f up, org.openmali.vecmath2.Vector3f right)
           
 void updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation, long frameId, long nanoTime, long nanoStep)
          This method is called by the renderer each frame, the BillBoard is rendered.
 
Methods inherited from class org.xith3d.scenegraph.Shape3D
absorbDetails, copy, freeOpenGLResources, getAppearance, getAppearance, getCustomComparable, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, newInstance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setCustomComparable, setGeometry, setIsShadowReceiver, setModListener, setVisible, sharedCopy, sharedCopy, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange
 
Methods inherited from class org.xith3d.scenegraph.Leaf
dump, getPickHost, setPickHost
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateOrderedChild, updateTransformGroup
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeneratorShape3D

public GeneratorShape3D(boolean relativeOrientation)

GeneratorShape3D

public GeneratorShape3D(boolean relativeOrientation,
                        org.softmed.jops.Generator generator)
Method Detail

setWireFrameEnabled

public static final void setWireFrameEnabled(boolean mode)

isWireFrameEnabled

public static boolean isWireFrameEnabled()

getGeometry

public final IndexedTriangleArray getGeometry()

Overrides:
getGeometry in class Shape3D
Returns:
the Geometry for this object.

setGenerator

public void setGenerator(org.softmed.jops.Generator generator)

getGenerator

public final org.softmed.jops.Generator getGenerator()

rotate2f

protected void rotate2f(org.openmali.vecmath2.TexCoord2f v,
                        float angle)

buildFacingCameraTriangles

protected void buildFacingCameraTriangles(float[] carray,
                                          org.softmed.jops.Particle particle)

buildAbsoluteOrientedTriangles

protected void buildAbsoluteOrientedTriangles(float[] carray,
                                              org.softmed.jops.Particle particle)

update

public void update(org.openmali.vecmath2.Vector3f up,
                   org.openmali.vecmath2.Vector3f right)

update

protected void update()

updateFaceToCamera

public void updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation,
                               long frameId,
                               long nanoTime,
                               long nanoStep)
Description copied from interface: Billboard
This method is called by the renderer each frame, the BillBoard is rendered.

Specified by:
updateFaceToCamera in interface Billboard
Parameters:
viewRotation - the camera's rotation
frameId - the current rendered frame's id

getBlendFactor

protected org.jagatoo.opengl.enums.BlendFunction getBlendFactor(int glBlendFactorInteger)

getSizeOnScreen

public org.openmali.types.twodee.Sized2iRO getSizeOnScreen()
Returns the Billboard desired on screen dimensions. For the default Billboard implementation, this method should return null, as the on-screen dimension is dependant on the distance between the Billboard and the camera. If the desired effect is a Billboard having a constant size on screen (usefull for icons, or textual information that should be readable at any distance), then this method should return the desired size in pixels. In this case, the Sized2iRO returned will generally be a constant. This method is called by the renderer each frame the Billboard is rendered. Note to implementers: for this behaviour to work properly, the unmodified geometry should of course have a unit size, ie: the width and the height should should be equal to 1f. Else the effective desired size on screen will be scaled accordingly.

Specified by:
getSizeOnScreen in interface Billboard
Returns:
the desired size on screen, or null for a standard billboard.

dispose

public void dispose()

isAbsoluteOrientation

public boolean isAbsoluteOrientation()

setAbsoluteOrientation

public void setAbsoluteOrientation(boolean absoluteOrientation)