|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jme.scene.shape.Cylinder
public class Cylinder
A simple cylinder, defined by it's height and radius.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
---|
TriMesh.Mode |
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary |
---|
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 |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, 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 | |
---|---|
Cylinder()
|
|
Cylinder(java.lang.String name,
int axisSamples,
int radialSamples,
float radius,
float height)
Creates a new Cylinder. |
|
Cylinder(java.lang.String name,
int axisSamples,
int radialSamples,
float radius,
float height,
boolean closed)
Creates a new Cylinder. |
|
Cylinder(java.lang.String name,
int axisSamples,
int radialSamples,
float radius,
float height,
boolean closed,
boolean inverted)
Creates a new Cylinder. |
|
Cylinder(java.lang.String name,
int axisSamples,
int radialSamples,
float radius,
float radius2,
float height,
boolean closed,
boolean inverted)
|
Method Summary | |
---|---|
int |
getAxisSamples()
|
float |
getHeight()
|
int |
getRadialSamples()
|
float |
getRadius()
|
float |
getRadius2()
|
boolean |
isClosed()
|
boolean |
isInverted()
|
void |
read(JMEImporter e)
|
void |
recomputeGeometry(int axisSamples,
int radialSamples,
float radius,
float height,
boolean closed,
boolean inverted)
Deprecated. use updateGeometry(int, int, float, float, float, boolean, boolean) . |
void |
setHalfAngle(float radians)
Set the half angle of the cone. |
void |
setRadius(float radius)
Deprecated. use recomputeGeometry(int, int, float, float, boolean, boolean) . |
void |
setRadius1(float radius)
Deprecated. use recomputeGeometry(int, int, float, float, boolean, boolean) . |
void |
setRadius2(float radius2)
Deprecated. use recomputeGeometry(int, int, float, float, boolean, boolean) . |
void |
updateGeometry(int axisSamples,
int radialSamples,
float radius,
float radius2,
float height,
boolean closed,
boolean inverted)
Rebuilds the cylinder based on a new set of parameters. |
void |
write(JMEExporter e)
|
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, randomPointOnTriangles, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity |
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 |
---|
getClassTag |
Constructor Detail |
---|
public Cylinder()
public Cylinder(java.lang.String name, int axisSamples, int radialSamples, float radius, float height)
name
- The name of this Cylinder.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(java.lang.String name, int axisSamples, int radialSamples, float radius, float height, boolean closed)
name
- The name of this Cylinder.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(java.lang.String name, int axisSamples, int radialSamples, float radius, float height, boolean closed, boolean inverted)
name
- The name of this Cylinder.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 surfaceinverted
- true to create a cylinder that is meant to be viewed from the
interior.public Cylinder(java.lang.String name, int axisSamples, int radialSamples, float radius, float radius2, float height, boolean closed, boolean inverted)
Method Detail |
---|
public int getAxisSamples()
public float getHeight()
public int getRadialSamples()
public float getRadius()
public float getRadius2()
public boolean isClosed()
public boolean isInverted()
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class TriMesh
java.io.IOException
public void recomputeGeometry(int axisSamples, int radialSamples, float radius, float height, boolean closed, boolean inverted)
updateGeometry(int, int, float, float, float, boolean, boolean)
.
public void setHalfAngle(float radians)
radians
- public void setRadius(float radius)
recomputeGeometry(int, int, float, float, boolean, boolean)
.
This will also reset any second radius value on the cylinder.
Note: this method causes the tri-mesh geometry data to be recalculated, see the package description for more information about this.
radius
- the new radius.public void setRadius1(float radius)
recomputeGeometry(int, int, float, float, boolean, boolean)
.
Note: this method causes the tri-mesh geometry data to be recalculated, see the package description for more information about this.
radius
- the first radius to set.Cone}
public void setRadius2(float radius2)
recomputeGeometry(int, int, float, float, boolean, boolean)
.
Note: this method causes the tri-mesh geometry data to be recalculated, see the package description for more information about this.
radius
- the second radius to set.Cone}
public void updateGeometry(int axisSamples, int radialSamples, float radius, float radius2, float height, boolean closed, boolean inverted)
axisSamples
- the number of samples along the axis.radialSamples
- the number of samples around the radial.radius
- the radius of the bottom of the cylinder.radius2
- the radius of the top 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 write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class TriMesh
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |