public class Tube
extends com.jme3.scene.Mesh
Constructor and Description |
---|
Tube()
Default constructor for serialization only.
|
Tube(float outerRadius,
float innerRadius,
float height)
Creates a new, fully drawn (whole circle) MyTube, with 2 axis samples and
20 radial samples.
|
Tube(float outerRadius,
float innerRadius,
float height,
float centralAngle)
Creates a new MyTube, with 2 axis samples and some proper amount of
radial samples (based on central angle).
|
Tube(float outerRadius,
float innerRadius,
float height,
int axisSamples,
int radialSamples)
Creates a new MyTube, which is fully drawn (whole circle).
|
Tube(float outerRadius,
float innerRadius,
float height,
int axisSamples,
int radialSamples,
float centralAngle)
Creates a new MyTube.
|
Modifier and Type | Method and Description |
---|---|
int |
getAxisSamples() |
float |
getCentralAngle() |
float |
getHeight() |
float |
getInnerRadius() |
float |
getOuterRadius() |
int |
getRadialSamples() |
void |
read(com.jme3.export.JmeImporter e) |
void |
updateGeometry(float outerRadius,
float innerRadius,
float height,
int axisSamples,
int radialSamples,
float centralAngle)
Updates this tube mesh with new parameters.
|
void |
write(com.jme3.export.JmeExporter e) |
clearBuffer, clone, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getNumLodLevels, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, isAnimated, prepareForAnim, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPointSize, setStatic, setStreamed, updateBound, updateCounts
public Tube()
public Tube(float outerRadius, float innerRadius, float height)
outerRadius
- outer edge, where solid part ends.innerRadius
- inner radius, where the hole in the middle ends. If it is 0,
this shape looks identical to disc (note that it has more
vertexes and triangles!).height
- height of tube.public Tube(float outerRadius, float innerRadius, float height, float centralAngle)
outerRadius
- outer edge, where solid part ends.innerRadius
- inner radius, where the hole in the middle ends. If it is 0,
this shape looks identical to disc (note that it has more
vertexes and triangles!).height
- height of tube.centralAngle
- amount of tube to be drawn (FastMath.TWO_PI is for whole
circle, everything less draws just a part of it).public Tube(float outerRadius, float innerRadius, float height, int axisSamples, int radialSamples)
outerRadius
- outer edge, where solid part ends.innerRadius
- inner radius, where the hole in the middle ends. If it is 0,
this shape looks identical to disc (note that it has more
vertexes and triangles!).height
- height of tube.axisSamples
- number of triangle samples along the axis.radialSamples
- number of triangle samples along the radial.public Tube(float outerRadius, float innerRadius, float height, int axisSamples, int radialSamples, float centralAngle)
outerRadius
- outer edge, where solid part ends.innerRadius
- inner radius, where the hole in the middle ends. If it is 0,
this shape looks identical to disc (note that it has more
vertexes and triangles!).height
- height of tube.axisSamples
- number of triangle samples along the axis.radialSamples
- number of triangle samples along the radial.centralAngle
- amount of tube to be drawn (FastMath.TWO_PI is for whole
circle, everything less draws just a part of it).public float getCentralAngle()
public int getAxisSamples()
public int getRadialSamples()
public float getHeight()
public float getInnerRadius()
public float getOuterRadius()
public void updateGeometry(float outerRadius, float innerRadius, float height, int axisSamples, int radialSamples, float centralAngle)
outerRadius
- outer edge, where solid part ends.innerRadius
- inner radius, where the hole in the middle ends. If it is 0,
this shape looks identical to disc (note that it has more
vertexes and triangles!).height
- height of tube.axisSamples
- number of triangle samples along the axis.radialSamples
- number of triangle samples along the radial.centralAngle
- amount of tube to be drawn (FastMath.TWO_PI is for whole
circle, everything less draws just a part of it).public void read(com.jme3.export.JmeImporter e) throws java.io.IOException
read
in interface com.jme3.export.Savable
read
in class com.jme3.scene.Mesh
java.io.IOException
public void write(com.jme3.export.JmeExporter e) throws java.io.IOException
write
in interface com.jme3.export.Savable
write
in class com.jme3.scene.Mesh
java.io.IOException