Package jme3utilities.mesh
Class Prism
java.lang.Object
com.jme3.scene.Mesh
jme3utilities.mesh.Prism
- All Implemented Interfaces:
com.jme3.export.Savable,com.jme3.util.clone.JmeCloneable,Cloneable
public class Prism
extends com.jme3.scene.Mesh
A 3-D, static, Triangles-mode Mesh (without indices or texture coordinates)
that renders a prism.
- See Also:
-
Cylinder
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Mesh
com.jme3.scene.Mesh.Mode -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrism()No-argument constructor needed by SavableClassUtil.Prism(float x, float yHeight, float z) Instantiate a right prism, closed at both ends with right triangles.Prism(int numSides, float radius, float yHeight, boolean generateNormals) Instantiate a right prism, closed at both ends with regular polygons. -
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
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
Prism
protected Prism()No-argument constructor needed by SavableClassUtil. -
Prism
public Prism(int numSides, float radius, float yHeight, boolean generateNormals) Instantiate a right prism, closed at both ends with regular polygons. The center is at (0,0,0). The end polygons lie parallel with the X-Z plane. All triangles face outward.- Parameters:
numSides- the desired number of sides for each end (≥3)radius- the desired radius of each end (in mesh units, >0)yHeight- the desired total height of the prism on the Y axis (in mesh units, >0)generateNormals- true → generate normals, false → no normals
-
Prism
public Prism(float x, float yHeight, float z) Instantiate a right prism, closed at both ends with right triangles.The midpoint of the edge joining the right angles of the triangles is at (0,0,0). The end triangles lie parallel with the X-Z plane. All triangles face outward.
Normals are not generated. If normals are needed, add them using
MyMesh.generateFacetNormals(com.jme3.scene.Mesh).- Parameters:
x- the desired length of the legs parallel to the X axis (in mesh units, >0)yHeight- the desired total height of the prism on the Y axis (in mesh units, >0)z- the desired length of the legs parallel to the Z axis (in mesh units, >0)
-