com.jme.scene
Class Geometry

java.lang.Object
  extended bycom.jme.scene.Spatial
      extended bycom.jme.scene.Geometry
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Curve, Line, Point, Text, TriMesh

public abstract class Geometry
extends Spatial
implements java.io.Serializable

Geometry defines a leaf node of the scene graph. The leaf node contains the geometric data for rendering objects. It manages all rendering information such as a collection of states and the data for a model. Subclasses define what the model data is.

Version:
$Id: Geometry.java,v 1.70 2005/02/28 16:59:30 renanse Exp $
Author:
Mark Powell
See Also:
Serialized Form

Field Summary
protected  BoundingVolume bound
          The local bounds of this Geometry object.
protected  ColorRGBA[] color
          The geometry's per vertex color information.
protected  java.nio.FloatBuffer colorBuf
           
protected  Vector3f[] normal
          The geometry's per vertex normal information.
protected  java.nio.FloatBuffer normBuf
           
protected  java.nio.FloatBuffer[] texBuf
           
protected  Vector2f[][] texture
          The geometry's per Texture per vertex texture coordinate information.
protected  java.nio.FloatBuffer vertBuf
           
protected  Vector3f[] vertex
          The geometry's vertex information.
protected  int vertQuantity
          The number of vertexes in this geometry.
 
Fields inherited from class com.jme.scene.Spatial
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
Geometry()
          Empty Constructor to be used internally only.
Geometry(java.lang.String name)
          Constructor instantiates a new Geometry object.
Geometry(java.lang.String name, Vector3f[] vertex, Vector3f[] normal, ColorRGBA[] color, Vector2f[] texture)
          Constructor creates a new Geometry object.
 
Method Summary
protected  void applyRenderState(java.util.Stack[] states)
          applyRenderState determines if a particular render state is set for this Geometry.
 void applyStates()
          setStates applies all the render states for this particular geometry.
 void clearBuffers()
          Clears all vertex, normal, texture, and color buffers by setting them to null.
 void copyTextureCoords(int fromIndex, int toIndex)
          copyTextureCoords copys the texture coordinates of a given texture unit to another location.
 void draw(Renderer r)
          draw prepares the geometry for rendering to the display.
 void drawBounds(Renderer r)
          drawBounds calls super to set the render state then passes itself to the renderer.
 void findPick(Ray ray, PickResults results)
           
 Vector2f[][] getAllTextures()
          Returns the geometry's texture coordinate information.
 int getCloneID()
          Returns the ID number that identifies this Geometry's clone ID.
 java.nio.FloatBuffer getColorAsFloatBuffer()
          getColorAsFloatBuffer retrieves the float buffer that contains this geometry's color information.
 ColorRGBA[] getColors()
          getColors returns the color information of the geometry.
 BoundingVolume getModelBound()
          getModelBound retrieves the bounding object that contains the geometry node's vertices.
 java.nio.FloatBuffer getNormalAsFloatBuffer()
          getNormalAsFloatBuffer retrieves this geometry's normal information as a float buffer.
 Vector3f[] getNormals()
          getNormals returns the array that contains this geometry's normal information.
 int getNumberOfUnits()
          getNumberOfUnits returns the number of texture units this geometry supports.
 java.nio.FloatBuffer getTextureAsFloatBuffer()
          getTextureAsFloatBuffer retrieves this geometry's texture information contained within a float buffer.
 java.nio.FloatBuffer getTextureAsFloatBuffer(int textureUnit)
          getTextureAsFloatBuffer retrieves the texture buffer of a given texture unit.
 Vector2f[] getTextures()
          getTextures retrieves the texture array that contains this geometry's texture information.
 Vector2f[] getTextures(int textureUnit)
          getTextures retrieves the texture array that contains this geometry's texture information for a given texture unit.
 int getVBOColorID()
           
 int getVBONormalID()
           
 int getVBOTextureID(int index)
           
 int getVBOVertexID()
           
 java.nio.FloatBuffer getVerticeAsFloatBuffer()
          getVerticeAsFloatBuffer returns the float buffer that contains this geometry's vertex information.
 Vector3f[] getVertices()
          getVertices returns the vertex array for this geometry.
 int getVertQuantity()
          Returns the number of vertexes defined in this Geometry object.
 boolean isVBOColorEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for color information.
 boolean isVBONormalEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for normal information.
 boolean isVBOTextureEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for texture information.
 boolean isVBOVertexEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for vertex information.
 Spatial putClone(Spatial store, CloneCreator properties)
           
 Vector3f randomVertice()
          randomVertice returns a random vertex from the list of vertices set to this geometry.
 void reconstruct(Vector3f[] vertices, Vector3f[] normal, ColorRGBA[] color, Vector2f[] texture)
          reconstruct reinitializes the geometry with new data.
 void setAllTextures(Vector2f[][] texture)
          Sets all texture coordinates to those defined in the given array of arrays.
 void setColor(int index, ColorRGBA value)
          setColor sets a single colorRGBA into the color array.
 void setColors(ColorRGBA[] color)
          setColors sets the color array of this geometry.
protected  void setFloatBuffer(java.nio.FloatBuffer toSet)
          Sets this geometry's color buffer as a refrence to the passed FloatBuffer.
 void setForceView(boolean value)
          When true, this geometry object will always be rendered as long as its parent is rendered.
 void setModelBound(BoundingVolume modelBound)
          setModelBound sets the bounding object for this geometry.
 void setNormal(int index, Vector3f value)
          setNormal sets a single normal into the normal array.
protected  void setNormalBuffer(java.nio.FloatBuffer toSet)
          Sets this geometry's normal buffer as a refrence to the passed FloatBuffer.
 void setNormals(Vector3f[] normal)
          setNormals sets this geometry's normals to a new array of normal values.
 void setRandomColors()
          Sets every color of this geometry's color array to a random color.
 void setSolidColor(ColorRGBA color)
          setSolidColor sets the color array of this geometry to a single color.
 void setTexture(int index, Vector2f value)
          setTexture sets a single texture coordinate into the texture array.
 void setTexture(int index, Vector2f value, int textureUnit)
          setTexture sets a single texture coordinate into the texture array.
protected  void setTextureBuffer(java.nio.FloatBuffer toSet)
          Sets this geometry's first texture buffer as a refrence to the passed FloatBuffer.
 void setTextureCoord(int textureUnit, int index, Vector2f value)
          setTextureCoord sets a single coord into the texture array.
 void setTextures(Vector2f[] texture)
          setTextures sets this geometry's texture array to a new array.
 void setTextures(Vector2f[] textures, int textureUnit)
          setTextures sets the texture coordinates of a given texture unit.
 void setVBOColorEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for color information.
 void setVBOColorID(int id)
           
 void setVBONormalEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for normal information.
 void setVBONormalID(int id)
           
 void setVBOTextureEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for texture coordinate information.
 void setVBOTextureID(int index, int id)
           
 void setVBOVertexEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for vertex information.
 void setVBOVertexID(int id)
           
 void setVertex(int index, Vector3f value)
          setVertex sets a single vertex into the vertex array.
protected  void setVertexBuffer(java.nio.FloatBuffer toSet)
          Sets this geometry's vertex buffer as a refrence to the passed FloatBuffer.
 void setVertices(Vector3f[] vertex)
          setVertices sets the vertices of this geometry.
 void updateColorBuffer()
          setColorBuffer calculates the FloatBuffer that contains all the color information of this geometry.
 void updateColorBuffer(int quantity)
          setColorBuffer calculates the FloatBuffer that contains all the color information of this geometry.
 void updateModelBound()
          updateBound recalculates the bounding object assigned to the geometry.
 void updateNormalBuffer()
          updateNormalBuffer sets the float buffer that contains this geometry's normal information.
 void updateNormalBuffer(int quantity)
          updateNormalBuffer sets the float buffer that contains this geometry's normal information.
 void updateTextureBuffer()
          updateTextureBuffer sets the float buffer that contains this geometry's texture information.
 void updateTextureBuffer(int textureUnit)
          updateTextureBuffer sets the float buffer that contains this geometry's texture information.
 void updateTextureBuffer(int textureUnit, int quantity)
          updateTextureBuffer sets the float buffer that contains this geometry's texture information.
 void updateVertexBuffer()
          updateVertexBuffer sets the float buffer that contains this geometry's vertex information.
 void updateVertexBuffer(int quantity)
          updateVertexBuffer sets the float buffer that contains this geometry's vertex information.
 void updateWorldBound()
          updateWorldBound updates the bounding volume that contains this geometry.
 
Methods inherited from class com.jme.scene.Spatial
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, findCollisions, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasCollision, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateCollisionTree, updateGeometricState, updateRenderState, updateRenderState, updateWorldData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bound

protected BoundingVolume bound
The local bounds of this Geometry object.


vertex

protected Vector3f[] vertex
The geometry's vertex information.


normal

protected Vector3f[] normal
The geometry's per vertex normal information.


color

protected ColorRGBA[] color
The geometry's per vertex color information.


texture

protected Vector2f[][] texture
The geometry's per Texture per vertex texture coordinate information.


vertQuantity

protected int vertQuantity
The number of vertexes in this geometry.


colorBuf

protected transient java.nio.FloatBuffer colorBuf

normBuf

protected transient java.nio.FloatBuffer normBuf

vertBuf

protected transient java.nio.FloatBuffer vertBuf

texBuf

protected transient java.nio.FloatBuffer[] texBuf
Constructor Detail

Geometry

public Geometry()
Empty Constructor to be used internally only.


Geometry

public Geometry(java.lang.String name)
Constructor instantiates a new Geometry object. This is the default object which has an empty vertex array. All other data is null.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.

Geometry

public Geometry(java.lang.String name,
                Vector3f[] vertex,
                Vector3f[] normal,
                ColorRGBA[] color,
                Vector2f[] texture)
Constructor creates a new Geometry object. During instantiation the geometry is set including vertex, normal, color and texture information. Any part may be null except for the vertex information. If this is null, an exception will be thrown.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.
vertex - the points that make up the geometry.
normal - the normals of the geometry.
color - the color of each point of the geometry.
texture - the texture coordinates of the geometry.
Method Detail

reconstruct

public void reconstruct(Vector3f[] vertices,
                        Vector3f[] normal,
                        ColorRGBA[] color,
                        Vector2f[] texture)
reconstruct reinitializes the geometry with new data. This will reuse the geometry object.

Parameters:
vertices - the new vertices to use.
normal - the new normals to use.
color - the new colors to use.
texture - the new texture coordinates to use.

isVBOVertexEnabled

public boolean isVBOVertexEnabled()
Returns true if VBO (Vertex Buffer) is enabled for vertex information. This is used during rendering.

Returns:
If VBO is enabled for vertexes.

isVBOTextureEnabled

public boolean isVBOTextureEnabled()
Returns true if VBO (Vertex Buffer) is enabled for texture information. This is used during rendering.

Returns:
If VBO is enabled for textures.

isVBONormalEnabled

public boolean isVBONormalEnabled()
Returns true if VBO (Vertex Buffer) is enabled for normal information. This is used during rendering.

Returns:
If VBO is enabled for normals.

isVBOColorEnabled

public boolean isVBOColorEnabled()
Returns true if VBO (Vertex Buffer) is enabled for color information. This is used during rendering.

Returns:
If VBO is enabled for colors.

setVBOVertexEnabled

public void setVBOVertexEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for vertex information.

Parameters:
enabled - If true, VBO enabled for vertexes.

setVBOTextureEnabled

public void setVBOTextureEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for texture coordinate information.

Parameters:
enabled - If true, VBO enabled for texture coordinates.

setVBONormalEnabled

public void setVBONormalEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for normal information.

Parameters:
enabled - If true, VBO enabled for normals

setVBOColorEnabled

public void setVBOColorEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for color information.

Parameters:
enabled - If true, VBO enabled for colors

getVBOVertexID

public int getVBOVertexID()

getVBOTextureID

public int getVBOTextureID(int index)

getVBONormalID

public int getVBONormalID()

getVBOColorID

public int getVBOColorID()

setVBOVertexID

public void setVBOVertexID(int id)

setVBOTextureID

public void setVBOTextureID(int index,
                            int id)

setVBONormalID

public void setVBONormalID(int id)

setVBOColorID

public void setVBOColorID(int id)

getColors

public ColorRGBA[] getColors()
getColors returns the color information of the geometry. This may be null and should be check for such a case.

Returns:
the color array.

setColors

public void setColors(ColorRGBA[] color)
setColors sets the color array of this geometry.

Parameters:
color - the new color array.

setColor

public void setColor(int index,
                     ColorRGBA value)
setColor sets a single colorRGBA into the color array. The index to set it is given, and due to speed considerations, no bounds checking is done. Therefore, if an invalid index is given, an ArrayIndexOutOfBoundsException will be thrown.

Parameters:
index - the index of the color to set.
value - the color to set.

setSolidColor

public void setSolidColor(ColorRGBA color)
setSolidColor sets the color array of this geometry to a single color.

Parameters:
color - the color to set.

setRandomColors

public void setRandomColors()
Sets every color of this geometry's color array to a random color.


getColorAsFloatBuffer

public java.nio.FloatBuffer getColorAsFloatBuffer()
getColorAsFloatBuffer retrieves the float buffer that contains this geometry's color information.

Returns:
the buffer that contains this geometry's color information.

getVertices

public Vector3f[] getVertices()
getVertices returns the vertex array for this geometry.

Returns:
the array of vertices for this geometry.

setVertices

public void setVertices(Vector3f[] vertex)
setVertices sets the vertices of this geometry. The vertices may not be null and will throw an exception if so.

Parameters:
vertex - the new vertices of this geometry.

setVertex

public void setVertex(int index,
                      Vector3f value)
setVertex sets a single vertex into the vertex array. The index to set it is given, and due to speed considerations, no bounds checking is done. Therefore, if an invalid index is given, an ArrayIndexOutOfBoundsException will be thrown.

Parameters:
index - the index of the vertex to set.
value - the vertex to set.

setTextureCoord

public void setTextureCoord(int textureUnit,
                            int index,
                            Vector2f value)
setTextureCoord sets a single coord into the texture array. The index to set it is given, and due to speed considerations, no bounds checking is done. Therefore, if an invalid index is given, an ArrayIndexOutOfBoundsException will be thrown.

Parameters:
textureUnit - the textureUnit to set on.
index - the index of the coord to set.
value - the vertex to set.

getVerticeAsFloatBuffer

public java.nio.FloatBuffer getVerticeAsFloatBuffer()
getVerticeAsFloatBuffer returns the float buffer that contains this geometry's vertex information.

Returns:
the float buffer that contains this geometry's vertex information.

getNormals

public Vector3f[] getNormals()
getNormals returns the array that contains this geometry's normal information.

Returns:
the normal array for this geometry.

setNormals

public void setNormals(Vector3f[] normal)
setNormals sets this geometry's normals to a new array of normal values.

Parameters:
normal - the new normal values.

setNormal

public void setNormal(int index,
                      Vector3f value)
setNormal sets a single normal into the normal array. The index to set it is given, and due to speed considerations, no bounds checking is done. Therefore, if an invalid index is given, an ArrayIndexOutOfBoundsException will be thrown.

Parameters:
index - the index of the normal to set.
value - the normal to set.

getNormalAsFloatBuffer

public java.nio.FloatBuffer getNormalAsFloatBuffer()
getNormalAsFloatBuffer retrieves this geometry's normal information as a float buffer.

Returns:
the float buffer containing the geometry information.

getTextures

public Vector2f[] getTextures()
getTextures retrieves the texture array that contains this geometry's texture information. The texture coordinates are those of the first texture unit.

Returns:
the array that contains the geometry's texture information.

getTextures

public Vector2f[] getTextures(int textureUnit)
getTextures retrieves the texture array that contains this geometry's texture information for a given texture unit. If the texture unit is invalid, or no texture coordinates are set for the texture unit, null is returned.

Parameters:
textureUnit - the texture unit to retrieve the coordinates for.
Returns:
the texture coordinates of a given texture unit. Null is returned if the texture unit is not valid, or no coordinates are set for the given unit.

setTextures

public void setTextures(Vector2f[] texture)
setTextures sets this geometry's texture array to a new array.

Parameters:
texture - the new texture information for this geometry.

setTextures

public void setTextures(Vector2f[] textures,
                        int textureUnit)
setTextures sets the texture coordinates of a given texture unit. If the texture unit is not valid, then the coordinates are ignored.

Parameters:
textures - the coordinates to set.
textureUnit - the texture unit to set them to.

setTexture

public void setTexture(int index,
                       Vector2f value)
setTexture sets a single texture coordinate into the texture array. The index to set it is given, and due to speed considerations, no bounds checking is done. Therefore, if an invalid index is given, an ArrayIndexOutOfBoundsException will be thrown.

Parameters:
index - the index of the texture coordinate to set.
value - the texture coordinate to set.

setTexture

public void setTexture(int index,
                       Vector2f value,
                       int textureUnit)
setTexture sets a single texture coordinate into the texture array. The index to set it is given, and due to speed considerations, no bounds checking is done. Therefore, if an invalid index is given, an ArrayIndexOutOfBoundsException will be thrown.

Parameters:
index - the index of the texture coordinate to set.
value - the texture coordinate to set.
textureUnit - the texture unit to alter.

copyTextureCoords

public void copyTextureCoords(int fromIndex,
                              int toIndex)
copyTextureCoords copys the texture coordinates of a given texture unit to another location. If the texture unit is not valid, then the coordinates are ignored.

Parameters:
fromIndex - the coordinates to copy.
toIndex - the texture unit to set them to.

getTextureAsFloatBuffer

public java.nio.FloatBuffer getTextureAsFloatBuffer()
getTextureAsFloatBuffer retrieves this geometry's texture information contained within a float buffer.

Returns:
the float buffer that contains this geometry's texture information.

getTextureAsFloatBuffer

public java.nio.FloatBuffer getTextureAsFloatBuffer(int textureUnit)
getTextureAsFloatBuffer retrieves the texture buffer of a given texture unit. If the texture unit is not valid, null is returned.

Parameters:
textureUnit - the texture unit to check.
Returns:
the texture coordinates at the given texture unit.

getNumberOfUnits

public int getNumberOfUnits()
getNumberOfUnits returns the number of texture units this geometry supports.

Returns:
the number of texture units supported by the geometry.

getVertQuantity

public int getVertQuantity()
Returns the number of vertexes defined in this Geometry object. Basicly, it is vertex.length.

Returns:
The number of vertexes in this Geometry object.

setAllTextures

public void setAllTextures(Vector2f[][] texture)
Sets all texture coordinates to those defined in the given array of arrays.

Parameters:
texture - The new texture coordinates.

getAllTextures

public Vector2f[][] getAllTextures()
Returns the geometry's texture coordinate information.

Returns:
The geometry's texture coordinate information.

clearBuffers

public void clearBuffers()
Clears all vertex, normal, texture, and color buffers by setting them to null.


updateModelBound

public void updateModelBound()
updateBound recalculates the bounding object assigned to the geometry. This resets it parameters to adjust for any changes to the vertex information.


getModelBound

public BoundingVolume getModelBound()
getModelBound retrieves the bounding object that contains the geometry node's vertices.

Returns:
the bounding object for this geometry.

setModelBound

public void setModelBound(BoundingVolume modelBound)
setModelBound sets the bounding object for this geometry.

Parameters:
modelBound - the bounding object for this geometry.

setForceView

public void setForceView(boolean value)
When true, this geometry object will always be rendered as long as its parent is rendered.

Specified by:
setForceView in class Spatial
Parameters:
value - The new forced view flag for this object.

applyStates

public void applyStates()
setStates applies all the render states for this particular geometry.


draw

public void draw(Renderer r)
draw prepares the geometry for rendering to the display. The renderstate is set and the subclass is responsible for rendering the actual data.

Specified by:
draw in class Spatial
Parameters:
r - the renderer that displays to the context.
See Also:
Spatial.draw(com.jme.renderer.Renderer)

drawBounds

public void drawBounds(Renderer r)
drawBounds calls super to set the render state then passes itself to the renderer.

Specified by:
drawBounds in class Spatial
Parameters:
r - the renderer to display

updateWorldBound

public void updateWorldBound()
updateWorldBound updates the bounding volume that contains this geometry. The location of the geometry is based on the location of all this node's parents.

Specified by:
updateWorldBound in class Spatial
See Also:
Spatial.updateWorldBound()

applyRenderState

protected void applyRenderState(java.util.Stack[] states)
applyRenderState determines if a particular render state is set for this Geometry. If not, the default state will be used.

Overrides:
applyRenderState in class Spatial
Parameters:
states - An array of stacks for each state.

updateColorBuffer

public void updateColorBuffer()
setColorBuffer calculates the FloatBuffer that contains all the color information of this geometry.


updateColorBuffer

public void updateColorBuffer(int quantity)
setColorBuffer calculates the FloatBuffer that contains all the color information of this geometry.

Parameters:
quantity - The number of vertices to update the buffer with colors for.

updateVertexBuffer

public void updateVertexBuffer()
updateVertexBuffer sets the float buffer that contains this geometry's vertex information.


updateVertexBuffer

public void updateVertexBuffer(int quantity)
updateVertexBuffer sets the float buffer that contains this geometry's vertex information.

Parameters:
quantity - The number of vertices to update the buffer with.

updateNormalBuffer

public void updateNormalBuffer()
updateNormalBuffer sets the float buffer that contains this geometry's normal information.


updateNormalBuffer

public void updateNormalBuffer(int quantity)
updateNormalBuffer sets the float buffer that contains this geometry's normal information.

Parameters:
quantity - The number of vertices to update the buffer with normals for.

updateTextureBuffer

public void updateTextureBuffer()
updateTextureBuffer sets the float buffer that contains this geometry's texture information. Updates textureUnit 0.


updateTextureBuffer

public void updateTextureBuffer(int textureUnit)
updateTextureBuffer sets the float buffer that contains this geometry's texture information.

Parameters:
textureUnit -

updateTextureBuffer

public void updateTextureBuffer(int textureUnit,
                                int quantity)
updateTextureBuffer sets the float buffer that contains this geometry's texture information.

Parameters:
textureUnit -
quantity -

randomVertice

public Vector3f randomVertice()
randomVertice returns a random vertex from the list of vertices set to this geometry. If there are no vertices set, null is returned.

Returns:
Vector3f a random vertex from the vertex list. Null is returned if the vertex list is not set.

findPick

public void findPick(Ray ray,
                     PickResults results)
Specified by:
findPick in class Spatial

setTextureBuffer

protected void setTextureBuffer(java.nio.FloatBuffer toSet)
Sets this geometry's first texture buffer as a refrence to the passed FloatBuffer. Incorrectly built FloatBuffers can have undefined results. Use with care.

Parameters:
toSet - The FloatBuffer to set this geometry's first texture buffer to

setNormalBuffer

protected void setNormalBuffer(java.nio.FloatBuffer toSet)
Sets this geometry's normal buffer as a refrence to the passed FloatBuffer. Incorrectly built FloatBuffers can have undefined results. Use with care.

Parameters:
toSet - The FloatBuffer to set this geometry's normal buffer to

setVertexBuffer

protected void setVertexBuffer(java.nio.FloatBuffer toSet)
Sets this geometry's vertex buffer as a refrence to the passed FloatBuffer. Incorrectly built FloatBuffers can have undefined results. Use with care.

Parameters:
toSet - The FloatBuffer to set this geometry's vertex buffer to

setFloatBuffer

protected void setFloatBuffer(java.nio.FloatBuffer toSet)
Sets this geometry's color buffer as a refrence to the passed FloatBuffer. Incorrectly built FloatBuffers can have undefined results. Use with care.

Parameters:
toSet - The FloatBuffer to set this geometry's color buffer to

putClone

public Spatial putClone(Spatial store,
                        CloneCreator properties)
Overrides:
putClone in class Spatial

getCloneID

public int getCloneID()
Returns the ID number that identifies this Geometry's clone ID.

Returns:
The assigned clone ID of this geometry. Non clones are -1.