org.jdesktop.wonderland.client.jme.utils.graphics
Class TexturedQuad

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jme.scene.TriMesh
              extended by com.jme.scene.shape.Quad
                  extended by org.jdesktop.wonderland.client.jme.utils.graphics.TexturedQuad
All Implemented Interfaces:
com.jme.util.export.Savable, java.io.Serializable

public class TexturedQuad
extends com.jme.scene.shape.Quad

A quad with a texture displayed on it.

Author:
deronj
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.TriMesh
com.jme.scene.TriMesh.Mode
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
com.jme.scene.Spatial.CullHint, com.jme.scene.Spatial.LightCombineMode, com.jme.scene.Spatial.NormalsMode, com.jme.scene.Spatial.TextureCombineMode
 
Field Summary
protected  com.jme.image.Texture texture
          The texture which is displayed on the quad.
 
Fields inherited from class com.jme.scene.TriMesh
indexBuffer, mode, triangleQuantity
 
Fields inherited from class com.jme.scene.Geometry
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity
 
Fields inherited from class com.jme.scene.Spatial
cullHint, frustrumIntersects, geometricalControllers, geometricUpdateListeners, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
TexturedQuad(com.jme.image.Texture texture)
          Internal Only: Create a new instance of TexturedQuad.
TexturedQuad(com.jme.image.Texture texture, java.lang.String name)
          Create a new instance of TexturedQuad object.
TexturedQuad(com.jme.image.Texture texture, java.lang.String name, float width, float height)
          Create a new instance of TexturedQuad object given a width and height.
 
Method Summary
 java.lang.Object clone()
          Creates a new TexturedQuad object containing the same data as this one.
 com.jme.renderer.ColorRGBA getColor()
          Returns the ambient-and-diffuse color of this quad.
 com.jme.image.Texture getTexture()
          Returns this quad's texture.
 com.jme.scene.state.TextureState getTextureState()
          Returns this quad's TextureState.
 void initialize(float width, float height)
          

Note: this method resets the texture attributes of the quad to display the entire contents of the texture image on the quad.
 void printGeometry()
          For debug: Print the contents of this object's geometry
 void printRenderState()
          For debug: Print the contents of this object's render state.
 void read(com.jme.util.export.JMEImporter e)
           
 void setColor(com.jme.renderer.ColorRGBA color)
          Specify a new ambient-and-diffuse color of this quad.
 void setTexture(com.jme.image.Texture texture)
          Specify a new texture.
 void write(com.jme.util.export.JMEExporter e)
           
 
Methods inherited from class com.jme.scene.shape.Quad
getCenter, getHeight, getWidth, resize, updateGeometry
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getCollisionTreeValid, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, recalcTriangleQuantity, reconstruct, setCollisionTreeValid, setIndexBuffer, setMode, setTriangleQuantity
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, addGeometricUpdateListener, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getGlowColor, getGlowScale, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, isGlowEnabled, isLive, isVisible, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeGeometricUpdateListener, removeUserData, rotateUpTo, setCullHint, setGlowColor, setGlowEnabled, setGlowScale, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLive, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setVisible, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Field Detail

texture

protected com.jme.image.Texture texture
The texture which is displayed on the quad.

Constructor Detail

TexturedQuad

public TexturedQuad(com.jme.image.Texture texture)
Internal Only: Create a new instance of TexturedQuad. The width and height attributes must be supplied later by calling initialize.

Parameters:
texture - The texture to display on the quad.

TexturedQuad

public TexturedQuad(com.jme.image.Texture texture,
                    java.lang.String name)
Create a new instance of TexturedQuad object. The texture is displayed on the front face only. The center and size vertice information must be supplied later.

Parameters:
texture - The texture to display on the quad.
name - The name of the scene element.

TexturedQuad

public TexturedQuad(com.jme.image.Texture texture,
                    java.lang.String name,
                    float width,
                    float height)
Create a new instance of TexturedQuad object given a width and height. The quad is centered around its local origin.

Parameters:
texture - The texture to display on the quad.
name - The name of the scene element.
width - The width of the quad in local coordinates.
height - The height of the quad in local coordinates.
Method Detail

setTexture

public void setTexture(com.jme.image.Texture texture)
Specify a new texture.


getTexture

public com.jme.image.Texture getTexture()
Returns this quad's texture.


getTextureState

public com.jme.scene.state.TextureState getTextureState()
Returns this quad's TextureState.


setColor

public void setColor(com.jme.renderer.ColorRGBA color)
Specify a new ambient-and-diffuse color of this quad.


getColor

public com.jme.renderer.ColorRGBA getColor()
Returns the ambient-and-diffuse color of this quad.


initialize

public void initialize(float width,
                       float height)


Note: this method resets the texture attributes of the quad to display the entire contents of the texture image on the quad. It undoes any previous calls to setTextureCoords for this quad. If you have previously called setTextureCoords to display a subset of the image, you should call setTextureCoords again to set the appropriate texture coordinates for the new size specified via this initialize call.

Overrides:
initialize in class com.jme.scene.shape.Quad

clone

public java.lang.Object clone()
Creates a new TexturedQuad object containing the same data as this one.

Overrides:
clone in class java.lang.Object
Returns:
The new TexturedQuad.

write

public void write(com.jme.util.export.JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface com.jme.util.export.Savable
Overrides:
write in class com.jme.scene.TriMesh
Throws:
java.io.IOException

read

public void read(com.jme.util.export.JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface com.jme.util.export.Savable
Overrides:
read in class com.jme.scene.TriMesh
Throws:
java.io.IOException

printRenderState

public void printRenderState()
For debug: Print the contents of this object's render state.


printGeometry

public void printGeometry()
For debug: Print the contents of this object's geometry



Open Wonderland - http://openwonderland.org