Package jme3utilities.mesh
Class RoundedRectangle
java.lang.Object
com.jme3.scene.Mesh
jme3utilities.mesh.RoundedRectangle
- All Implemented Interfaces:
com.jme3.export.Savable,com.jme3.util.clone.JmeCloneable,Cloneable
public class RoundedRectangle
extends com.jme3.scene.Mesh
A 2-D, static, fan-mode mesh that renders an axis-aligned rounded rectangle
in the X-Y plane.
In local space, X extends from x1 to x2 and Y extends from y1 to y2, with normals set to (0,0,zNorm). In texture space, X and Y extend from 0 to 1.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Mesh
com.jme3.scene.Mesh.Mode -
Constructor Summary
ConstructorsConstructorDescriptionInstantiate an axis-aligned, rounded unit square with a corner radius of 0.1, right-handed normals, and X and Y extending from 0 to 1.RoundedRectangle(float x1, float x2, float y1, float y2, float cornerRadius, float zNorm) Instantiate an axis-aligned rounded rectangle with the specified corner radius. -
Method Summary
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, read, 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, write
-
Constructor Details
-
RoundedRectangle
public RoundedRectangle()Instantiate an axis-aligned, rounded unit square with a corner radius of 0.1, right-handed normals, and X and Y extending from 0 to 1. -
RoundedRectangle
public RoundedRectangle(float x1, float x2, float y1, float y2, float cornerRadius, float zNorm) Instantiate an axis-aligned rounded rectangle with the specified corner radius.- Parameters:
x1- local X coordinate of the left edgex2- local X coordinate of the right edgey1- local Y coordinate of the bottom edgey2- local Y coordinate of the top edgecornerRadius- radius of the corner arcs (≥0)zNorm- the Z component of the normal vector (must be +1 or -1)
-