Package com.aspose.threed
Class Cylinder
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.SceneObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Primitive
-
- com.aspose.threed.Cylinder
-
- All Implemented Interfaces:
IMeshConvertible
,INamedObject
public class Cylinder extends Primitive
Parameterized Cylinder. It can also be used to represent the cone when one of radiusTop/radiusBottom is zero.
-
-
Field Summary
-
Fields inherited from class com.aspose.threed.A3DObject
name, properties
-
-
Constructor Summary
Constructors Constructor Description Cylinder()
Initializes a new instance of theCylinder
class.Cylinder(double radius, double height)
Initializes a new instance of theCylinder
class.Cylinder(double radiusTop, double radiusBottom, double height)
Initializes a new instance of theCylinder
class.Cylinder(double radiusTop, double radiusBottom, double height, int radialSegments, int heightSegments, boolean openEnded)
Initializes a new instance of theCylinder
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 theCylinder
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 thisCylinder
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 thisCylinder
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-
Methods inherited from class com.aspose.threed.Primitive
createEmptyMesh, getCastShadows, getReceiveShadows, merge, setCastShadows, setReceiveShadows, setup
-
Methods inherited from class com.aspose.threed.Entity
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.SceneObject
getScene
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Constructor Detail
-
Cylinder
public Cylinder()
Initializes a new instance of theCylinder
class.
-
Cylinder
public Cylinder(double radius, double height)
Initializes a new instance of theCylinder
class.- Parameters:
radius
- Radius of the top and bottom cap.height
- Height.
-
Cylinder
public Cylinder(double radiusTop, double radiusBottom, double height)
Initializes a new instance of theCylinder
class.- Parameters:
radiusTop
- Radius top.radiusBottom
- Radius bottom.height
- Height.
-
Cylinder
public Cylinder(double radiusTop, double radiusBottom, double height, int radialSegments, int heightSegments, boolean openEnded)
Initializes a new instance of theCylinder
class.- Parameters:
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 totrue
the cylinder would have no bottom/top caps..
-
Cylinder
public 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 theCylinder
class.- Parameters:
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 totrue
the cylinder would have no bottom/top caps..thetaStart
- Theta start.thetaLength
- Theta length.
-
-
Method Detail
-
getOffsetBottom
public Vector3 getOffsetBottom()
Gets the vertices transformation offset of the bottom side.
-
setOffsetBottom
public void setOffsetBottom(Vector3 value)
Sets the vertices transformation offset of the bottom side.- Parameters:
value
- New value
-
getOffsetTop
public Vector3 getOffsetTop()
Gets the vertices transformation offset of the top side.
-
setOffsetTop
public void setOffsetTop(Vector3 value)
Sets the vertices transformation offset of the top side.- Parameters:
value
- New value
-
getGenerateFanCylinder
public 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.
-
setGenerateFanCylinder
public 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.- Parameters:
value
- New value
-
getShearBottom
public 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)
-
setShearBottom
public 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)- Parameters:
value
- New value
-
getShearTop
public 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)
-
setShearTop
public 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)- Parameters:
value
- New value
-
getRadiusTop
public double getRadiusTop()
Gets the radius of cylinder's top cap.
-
setRadiusTop
public void setRadiusTop(double value)
Sets the radius of cylinder's top cap.- Parameters:
value
- New value
-
getRadiusBottom
public double getRadiusBottom()
Gets the radius of cylinder's bottom cap.
-
setRadiusBottom
public void setRadiusBottom(double value)
Sets the radius of cylinder's bottom cap.- Parameters:
value
- New value
-
getHeight
public double getHeight()
Gets the height of the cylinder.
-
setHeight
public void setHeight(double value)
Sets the height of the cylinder.- Parameters:
value
- New value
-
getRadialSegments
public int getRadialSegments()
Gets the radial segments.
-
setRadialSegments
public void setRadialSegments(int value)
Sets the radial segments.- Parameters:
value
- New value
-
getHeightSegments
public int getHeightSegments()
Gets the height segments.
-
setHeightSegments
public void setHeightSegments(int value)
Sets the height segments.- Parameters:
value
- New value
-
getOpenEnded
public boolean getOpenEnded()
Gets a value indicating whether thisCylinder
open ended. The default value is false.
-
setOpenEnded
public void setOpenEnded(boolean value)
Sets a value indicating whether thisCylinder
open ended. The default value is false.- Parameters:
value
- New value
-
getThetaStart
public double getThetaStart()
Gets the theta start. The default value is 0.
-
setThetaStart
public void setThetaStart(double value)
Sets the theta start. The default value is 0.- Parameters:
value
- New value
-
getThetaLength
public double getThetaLength()
Gets the length of the theta. The default value is 2π.
-
setThetaLength
public void setThetaLength(double value)
Sets the length of the theta. The default value is 2π.- Parameters:
value
- New value
-
toMesh
public Mesh toMesh()
Convert current object to mesh- Specified by:
toMesh
in interfaceIMeshConvertible
- Specified by:
toMesh
in classPrimitive
- Returns:
- The mesh.
-
-