com.jme.scene
Class BezierMesh

java.lang.Object
  extended bycom.jme.scene.Spatial
      extended bycom.jme.scene.Geometry
          extended bycom.jme.scene.TriMesh
              extended bycom.jme.scene.BezierMesh
All Implemented Interfaces:
java.io.Serializable

public class BezierMesh
extends TriMesh

BezierMesh is defined by a collection of BezierPatch objects that define a 4x4 patch of control anchors. These anchors define the curve the surface of the mesh will take. The patch also contains information about it's detail level, which defines how smooth the mesh will be.

Version:
$Id: BezierMesh.java,v 1.12 2004/09/14 21:52:13 mojomonkey Exp $
Author:
Mark Powell
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.scene.TriMesh
indices, triangleQuantity
 
Fields inherited from class com.jme.scene.Geometry
bound, color, colorBuf, normal, normBuf, texBuf, texture, vertBuf, vertex, vertQuantity
 
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
BezierMesh(java.lang.String name)
          Constructor creates a default BezierMesh object.
BezierMesh(java.lang.String name, BezierPatch patch)
          Constructor creates a new BezierMesh object with the given BezierPatch.
 
Method Summary
 void setPatch(BezierPatch patch)
          setPatch sets the BezierPatch of the mesh.
 void tessellate()
          tessellate generates the BezierMesh vertices from the supplied patch and detail level.
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, drawBounds, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree, updateIndexBuffer
 
Methods inherited from class com.jme.scene.Geometry
applyRenderState, applyStates, copyTextureCoords, findPick, getAllTextures, getCloneID, getColorAsFloatBuffer, getColors, getModelBound, getNormalAsFloatBuffer, getNormals, getNumberOfUnits, getTextureAsFloatBuffer, getTextureAsFloatBuffer, getTextures, getTextures, getVBOColorID, getVBONormalID, getVBOTextureID, getVBOVertexID, getVerticeAsFloatBuffer, getVertices, getVertQuantity, isVBOColorEnabled, isVBONormalEnabled, isVBOTextureEnabled, isVBOVertexEnabled, randomVertice, reconstruct, setAllTextures, setColor, setColors, setFloatBuffer, setForceView, setModelBound, setNormal, setNormalBuffer, setNormals, setRandomColors, setSolidColor, setTexture, setTexture, setTextureBuffer, setTextureCoord, setTextures, setTextures, setVBOColorEnabled, setVBOColorID, setVBONormalEnabled, setVBONormalID, setVBOTextureEnabled, setVBOTextureID, setVBOVertexEnabled, setVBOVertexID, setVertex, setVertexBuffer, setVertices, updateColorBuffer, updateColorBuffer, updateModelBound, updateNormalBuffer, updateNormalBuffer, updateTextureBuffer, updateTextureBuffer, updateTextureBuffer, updateVertexBuffer, updateVertexBuffer, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateGeometricState, updateRenderState, updateRenderState, updateWorldData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BezierMesh

public BezierMesh(java.lang.String name)
Constructor creates a default BezierMesh object.

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

BezierMesh

public BezierMesh(java.lang.String name,
                  BezierPatch patch)
Constructor creates a new BezierMesh object with the given BezierPatch. The mesh is then automatically tessellated.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.
patch - the BezierPatch used to define this mesh.
Method Detail

setPatch

public void setPatch(BezierPatch patch)
setPatch sets the BezierPatch of the mesh. It is then tessellated.

Parameters:
patch - the patch to use for this mesh.

tessellate

public void tessellate()
tessellate generates the BezierMesh vertices from the supplied patch and detail level. This method is called when patch is set, and therefore, should normally have to be called. However, if patch is changed externally, and you wish to update the mesh, a call to tessellate is appropriate.