public class Cylinder extends Mesh
Modifier | Constructor and Description |
---|---|
protected |
Cylinder()
constructor for serialization only.
|
|
Cylinder(int axisSamples,
int radialSamples,
float radius,
float height)
Creates a Cylinder.
|
|
Cylinder(int axisSamples,
int radialSamples,
float radius,
float height,
boolean closed)
Creates a Cylinder.
|
|
Cylinder(int axisSamples,
int radialSamples,
float radius,
float height,
boolean closed,
boolean inverted)
Creates a new Cylinder.
|
|
Cylinder(int axisSamples,
int radialSamples,
float radius,
float radius2,
float height,
boolean closed,
boolean inverted) |
Modifier and Type | Method and Description |
---|---|
int |
getAxisSamples() |
float |
getHeight() |
int |
getRadialSamples() |
float |
getRadius() |
float |
getRadius2() |
boolean |
isClosed() |
boolean |
isInverted() |
void |
read(JmeImporter importer) |
void |
updateGeometry(int axisSamples,
int radialSamples,
float topRadius,
float bottomRadius,
float height,
boolean closed,
boolean inverted)
Rebuilds the cylinder based on a new set of parameters.
|
void |
write(JmeExporter e) |
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
protected Cylinder()
public Cylinder(int axisSamples, int radialSamples, float radius, float height)
axisSamples
- Number of triangle samples along the axis.radialSamples
- Number of triangle samples along the radial.radius
- The radius of the cylinder.height
- The cylinder's height.public Cylinder(int axisSamples, int radialSamples, float radius, float height, boolean closed)
axisSamples
- Number of triangle samples along the axis.radialSamples
- Number of triangle samples along the radial.radius
- The radius of the cylinder.height
- The cylinder's height.closed
- true to create a cylinder with top and bottom surfacepublic Cylinder(int axisSamples, int radialSamples, float radius, float height, boolean closed, boolean inverted)
axisSamples
- The number of vertices samples along the axis. It is equal to the number of segments + 1; so
that, for instance, 4 samples mean the cylinder will be made of 3 segments.radialSamples
- The number of triangle samples along the radius. For instance, 4 means that the sides of the
cylinder are made of 4 rectangles, and the top and bottom are made of 4 triangles.radius
- The radius of the cylinder.height
- The cylinder's height.closed
- true to create a cylinder with top and bottom surfaceinverted
- true to create a cylinder that is meant to be viewed from the
interior.public Cylinder(int axisSamples, int radialSamples, float radius, float radius2, float height, boolean closed, boolean inverted)
public int getAxisSamples()
public float getHeight()
public int getRadialSamples()
public float getRadius()
public float getRadius2()
public boolean isClosed()
public boolean isInverted()
public void updateGeometry(int axisSamples, int radialSamples, float topRadius, float bottomRadius, float height, boolean closed, boolean inverted)
axisSamples
- The number of vertices samples along the axis.
It is equal to the number of segments + 1; so
that, for instance, 4 samples mean the cylinder will be made of 3 segments.radialSamples
- The number of triangle samples along the radius.
For instance, 4 means that the sides of the
cylinder are made of 4 rectangles, and the top and bottom are made of 4 triangles.topRadius
- the radius of the top of the cylinder.bottomRadius
- the radius of the bottom of the cylinder.height
- the cylinder's height.closed
- should the cylinder have top and bottom surfaces.inverted
- is the cylinder is meant to be viewed from the inside.public void read(JmeImporter importer) throws java.io.IOException
public void write(JmeExporter e) throws java.io.IOException