Package com.aspose.threed
Class Cylinder
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Primitive
-
- com.aspose.threed.Cylinder
-
- All Implemented Interfaces:
IMeshConvertible
public class Cylinder extends Primitive
Parameterized Cylinder. It can also be used to represent the cone when one of radiusTop/radiusBottom is zero.
-
-
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
Modifier and Type Method Description BoundingBox
getBoundingBox()
Gets the bounding box of current entity in its object space coordinate system.double
getHeight()
Gets the height of the cylinder.int
getHeightSegments()
Gets the height segments.boolean
getOpenEnded()
Gets a value indicating whether thisCylinder
open ended.int
getRadialSegments()
Gets the radial segments.double
getRadiusBottom()
Gets the radius bottoof cylinder's bottom cap.double
getRadiusTop()
Gets the radius of cylinder's top cap.double
getThetaLength()
Gets the length of the theta.double
getThetaStart()
Gets the theta start.void
setHeight(double value)
Sets the height of the cylinder.void
setHeightSegments(int value)
Sets the height segments.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 bottoof cylinder's bottom cap.void
setRadiusTop(double value)
Sets the radius of cylinder's top cap.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
createRenderableResource, merge, setup
-
Methods inherited from class com.aspose.threed.Entity
getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, 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
-
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 bottoof cylinder's bottom cap.
-
setRadiusBottom
public void setRadiusBottom(double value)
Sets the radius bottoof 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.
-
getBoundingBox
public BoundingBox getBoundingBox()
Gets the bounding box of current entity in its object space coordinate system.- Overrides:
getBoundingBox
in classEntity
-
-