public class Cylinder extends Primitive
name, properties
Constructor and Description |
---|
Cylinder()
Initializes a new instance of the
Cylinder class. |
Cylinder(double radius,
double height)
Initializes a new instance of the
Cylinder class. |
Cylinder(double radiusTop,
double radiusBottom,
double height)
Initializes a new instance of the
Cylinder class. |
Cylinder(double radiusTop,
double radiusBottom,
double height,
int radialSegments,
int heightSegments,
boolean openEnded)
Initializes a new instance of the
Cylinder class. |
Cylinder(java.lang.String name,
double radiusTop,
double radiusBottom,
double height,
int radialSegments,
int heightSegments,
boolean openEnded,
double thetaStart,
double thetaLength)
Initializes a new instance of the
Cylinder class. |
Modifier and Type | Method and Description |
---|---|
boolean |
getGenerateFanCylinder()
Gets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
|
double |
getHeight()
Gets the height of the cylinder.
|
int |
getHeightSegments()
Gets the height segments.
|
Vector3 |
getOffsetBottom()
Gets the vertices transformation offset of the bottom side.
|
Vector3 |
getOffsetTop()
Gets the vertices transformation offset of the top side.
|
boolean |
getOpenEnded()
Gets a value indicating whether this
Cylinder open ended. |
int |
getRadialSegments()
Gets the radial segments.
|
double |
getRadiusBottom()
Gets the radius of cylinder's bottom cap.
|
double |
getRadiusTop()
Gets the radius of cylinder's top cap.
|
Vector2 |
getShearBottom()
Gets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
|
Vector2 |
getShearTop()
Gets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
|
double |
getThetaLength()
Gets the length of the theta.
|
double |
getThetaStart()
Gets the theta start.
|
void |
setGenerateFanCylinder(boolean value)
Sets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
|
void |
setHeight(double value)
Sets the height of the cylinder.
|
void |
setHeightSegments(int value)
Sets the height segments.
|
void |
setOffsetBottom(Vector3 value)
Sets the vertices transformation offset of the bottom side.
|
void |
setOffsetTop(Vector3 value)
Sets the vertices transformation offset of the top side.
|
void |
setOpenEnded(boolean value)
Sets a value indicating whether this
Cylinder open ended. |
void |
setRadialSegments(int value)
Sets the radial segments.
|
void |
setRadiusBottom(double value)
Sets the radius of cylinder's bottom cap.
|
void |
setRadiusTop(double value)
Sets the radius of cylinder's top cap.
|
void |
setShearBottom(Vector2 value)
Sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
|
void |
setShearTop(Vector2 value)
Sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
|
void |
setThetaLength(double value)
Sets the length of the theta.
|
void |
setThetaStart(double value)
Sets the theta start.
|
Mesh |
toMesh()
Convert current object to mesh
|
createEmptyMesh, getCastShadows, getReceiveShadows, merge, setCastShadows, setReceiveShadows, setup
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
getScene
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public Cylinder()
Cylinder
class.public Cylinder(double radius, double height)
Cylinder
class.radius
- Radius of the top and bottom cap.height
- Height.public Cylinder(double radiusTop, double radiusBottom, double height)
Cylinder
class.radiusTop
- Radius top.radiusBottom
- Radius bottom.height
- Height.public Cylinder(double radiusTop, double radiusBottom, double height, int radialSegments, int heightSegments, boolean openEnded)
Cylinder
class.radiusTop
- Radius of cylinder's top cap.radiusBottom
- Radius of cylinder's bottom cap.height
- Height of the cylinder.radialSegments
- Radial segments of both top and bottom circles..heightSegments
- Height segments.openEnded
- If set to true
the cylinder would have no bottom/top caps..public Cylinder(java.lang.String name, double radiusTop, double radiusBottom, double height, int radialSegments, int heightSegments, boolean openEnded, double thetaStart, double thetaLength)
Cylinder
class.name
- The name of this objectradiusTop
- Radius of cylinder's top cap.radiusBottom
- Radius of cylinder's bottom cap.height
- Height of the cylinder.radialSegments
- Radial segments of both top and bottom circles..heightSegments
- Height segments.openEnded
- If set to true
the cylinder would have no bottom/top caps..thetaStart
- Theta start.thetaLength
- Theta length.public Vector3 getOffsetBottom()
public void setOffsetBottom(Vector3 value)
value
- New valuepublic Vector3 getOffsetTop()
public void setOffsetTop(Vector3 value)
value
- New valuepublic boolean getGenerateFanCylinder()
public void setGenerateFanCylinder(boolean value)
value
- New valuepublic Vector2 getShearBottom()
public void setShearBottom(Vector2 value)
value
- New valuepublic Vector2 getShearTop()
public void setShearTop(Vector2 value)
value
- New valuepublic double getRadiusTop()
public void setRadiusTop(double value)
value
- New valuepublic double getRadiusBottom()
public void setRadiusBottom(double value)
value
- New valuepublic double getHeight()
public void setHeight(double value)
value
- New valuepublic int getRadialSegments()
public void setRadialSegments(int value)
value
- New valuepublic int getHeightSegments()
public void setHeightSegments(int value)
value
- New valuepublic boolean getOpenEnded()
Cylinder
open ended.
The default value is false.public void setOpenEnded(boolean value)
Cylinder
open ended.
The default value is false.value
- New valuepublic double getThetaStart()
public void setThetaStart(double value)
value
- New valuepublic double getThetaLength()
public void setThetaLength(double value)
value
- New valuepublic Mesh toMesh()
toMesh
in interface IMeshConvertible
toMesh
in class Primitive