Package com.jme3.scene.shape
Class Quad
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Quad
- All Implemented Interfaces:
Savable,JmeCloneable,Cloneable
Quad represents a rectangular plane in space
defined by 4 vertices. The quad's lower-left side is contained
at the local space origin (0, 0, 0), while the upper-right
side is located at the width/height coordinates (width, height, 0).-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatgetWidth()voidread(JmeImporter importer) voidupdateGeometry(float width, float height) voidupdateGeometry(float width, float height, boolean flipCoords) voidwrite(JmeExporter e) Methods inherited from class com.jme3.scene.Mesh
addMorphTarget, clearBuffer, clearCollisionData, clone, cloneFields, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getInstanceCount, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getMorphIndex, getMorphTarget, getMorphTargetNames, getMorphTargets, getNumLodLevels, getPatchVertexCount, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, hasMorphTargets, isAnimated, isAnimatedByBone, isAnimatedByJoint, jmeClone, prepareForAnim, removeMorphTarget, removeMorphTarget, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPatchVertexCount, setStatic, setStreamed, updateBound, updateCounts
-
Constructor Details
-
Quad
protected Quad()Serialization only. Do not use. -
Quad
public Quad(float width, float height) Create a quad with the given width and height. The quad is always created in the XY plane.- Parameters:
width- The X extent or widthheight- The Y extent or width
-
Quad
public Quad(float width, float height, boolean flipCoords) Create a quad with the given width and height. The quad is always created in the XY plane.- Parameters:
width- The X extent or widthheight- The Y extent or widthflipCoords- If true, the texture coordinates will be flipped along the Y axis.
-
-
Method Details
-
getHeight
public float getHeight() -
getWidth
public float getWidth() -
updateGeometry
public void updateGeometry(float width, float height) -
updateGeometry
public void updateGeometry(float width, float height, boolean flipCoords) -
read
- Specified by:
readin interfaceSavable- Overrides:
readin classMesh- Throws:
IOException
-
write
- Specified by:
writein interfaceSavable- Overrides:
writein classMesh- Throws:
IOException
-