Class Quad

  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
All Implemented Interfaces:
Direct Known Subclasses:
Fader, FlareQuad, JMEDesktop, Mouse

public class Quad
extends TriMesh

A four sided, two dimensional shape (a quadrilateral).

The local height of the Quad defines it's size about the y-axis, while the width defines the x-axis. The z-axis will always be 0.

$Revision: 4131 $, $Date: 2009-03-19 16:15:28 -0400 (Thu, 19 Mar 2009) $
Mark Powell
See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class com.jme.scene.TriMesh
Nested classes/interfaces inherited from class com.jme.scene.Spatial
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode
Field Summary
protected  float height
protected  float width
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
collisionBits, cullHint, frustrumIntersects, geometricalControllers, 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
Quad(java.lang.String name)
          Constructor creates a new Quad object.
Quad(java.lang.String name, float width, float height)
          Constructor creates a new Quade object with the provided width and height.
Method Summary
 Vector3f getCenter()
          getCenter returns the center of the Quad.
 float getHeight()
 float getWidth()
 void initialize(float width, float height)
          Deprecated. Use updateGeometry(float,float) instead
 void resize(float width, float height)
          resize changes the width and height of the given quad by altering its vertices.
 void updateGeometry(float width, float height)
          Rebuild this quad based on a new set of parameters.
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, hasTriangleCollision, randomPointOnTriangles, read, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, 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, calculateCollisions, calculateCollisions, calculatePick, calculatePick, clearControllers, clearRenderState, clearRenderState, findCollisions, findPick, getClassTag, getCollisionMask, getController, getControllerCount, getControllers, getCullHint, 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, hasCollision, isCollidable, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, matches, matches, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCollisionMask, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.jme.util.export.Savable

Field Detail


protected float width


protected float height
Constructor Detail


public Quad()


public Quad(java.lang.String name)
Constructor creates a new Quad object. That data for the Quad is not set until a call to initialize is made.

name - the name of this Quad.


public Quad(java.lang.String name,
            float width,
            float height)
Constructor creates a new Quade object with the provided width and height.

name - the name of the Quad.
width - the width of the Quad.
height - the height of the Quad.
Method Detail


public Vector3f getCenter()
getCenter returns the center of the Quad.

Vector3f the center of the Quad.


public float getHeight()


public float getWidth()


public void initialize(float width,
                       float height)
Deprecated. Use updateGeometry(float,float) instead

initialize builds the data for the Quad object.

width - the width of the Quad.
height - the height of the Quad.


public void resize(float width,
                   float height)
resize changes the width and height of the given quad by altering its vertices.

width - the new width of the Quad.
height - the new height of the Quad.


public void updateGeometry(float width,
                           float height)
Rebuild this quad based on a new set of parameters.

width - the width of the quad.
height - the height of the quad.

Copyright 2003-2009 jMonkeyEngine