Package com.aspose.threed
Class Sphere
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Primitive
-
- com.aspose.threed.Sphere
-
- All Implemented Interfaces:
IMeshConvertible
public class Sphere extends Primitive
Parameterized sphere.
-
-
Constructor Summary
Constructors Constructor Description Sphere()
Initializes a new instance of theSphere
with default radius 1.Sphere(double radius)
Initializes a new instance of theSphere
class with specified radius.Sphere(double radius, int widthSegments, int heightSegments)
Initializes a new instance of theSphere
class with specified radius, width segments and height segments.Sphere(java.lang.String name, double radius, int widthSegments, int heightSegments, double phiStart, double phiLength, double thetaStart, double thetaLength)
Initializes a new instance of theSphere
class.
-
Method Summary
Modifier and Type Method Description BoundingBox
getBoundingBox()
Gets the bounding box of current entity in its object space coordinate system.int
getHeightSegments()
Gets the height segments.double
getPhiLength()
Gets the length of the phi.double
getPhiStart()
Gets the phi start.double
getRadius()
Gets the radius of the sphere.double
getThetaLength()
Gets the length of the theta.double
getThetaStart()
Gets the theta start.int
getWidthSegments()
Gets the width segments.void
setHeightSegments(int value)
Sets the height segments.void
setPhiLength(double value)
Sets the length of the phi.void
setPhiStart(double value)
Sets the phi start.void
setRadius(double value)
Sets the radius of the sphere.void
setThetaLength(double value)
Sets the length of the theta.void
setThetaStart(double value)
Sets the theta start.void
setWidthSegments(int value)
Sets the width segments.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
-
Sphere
public Sphere()
Initializes a new instance of theSphere
with default radius 1.
-
Sphere
public Sphere(double radius)
Initializes a new instance of theSphere
class with specified radius.- Parameters:
radius
- Radius.
-
Sphere
public Sphere(double radius, int widthSegments, int heightSegments)
Initializes a new instance of theSphere
class with specified radius, width segments and height segments.- Parameters:
radius
- Radius of the sphere.widthSegments
- Width segments.heightSegments
- Height segments.
-
Sphere
public Sphere(java.lang.String name, double radius, int widthSegments, int heightSegments, double phiStart, double phiLength, double thetaStart, double thetaLength)
Initializes a new instance of theSphere
class.- Parameters:
name
- Name.radius
- Radius of the sphere.widthSegments
- Width segments.heightSegments
- Height segments.phiStart
- Phi start.phiLength
- Phi length.thetaStart
- Theta start.thetaLength
- Theta length.
-
-
Method Detail
-
getWidthSegments
public int getWidthSegments()
Gets the width segments.
-
setWidthSegments
public void setWidthSegments(int value)
Sets the width 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
-
getPhiStart
public double getPhiStart()
Gets the phi start.
-
setPhiStart
public void setPhiStart(double value)
Sets the phi start.- Parameters:
value
- New value
-
getPhiLength
public double getPhiLength()
Gets the length of the phi.
-
setPhiLength
public void setPhiLength(double value)
Sets the length of the phi.- Parameters:
value
- New value
-
getThetaStart
public double getThetaStart()
Gets the theta start.
-
setThetaStart
public void setThetaStart(double value)
Sets the theta start.- Parameters:
value
- New value
-
getThetaLength
public double getThetaLength()
Gets the length of the theta.
-
setThetaLength
public void setThetaLength(double value)
Sets the length of the theta.- Parameters:
value
- New value
-
getRadius
public double getRadius()
Gets the radius of the sphere.
-
setRadius
public void setRadius(double value)
Sets the radius of the sphere.- Parameters:
value
- New value
-
getBoundingBox
public BoundingBox getBoundingBox()
Gets the bounding box of current entity in its object space coordinate system.- Overrides:
getBoundingBox
in classEntity
-
toMesh
public Mesh toMesh()
Convert current object to mesh- Specified by:
toMesh
in interfaceIMeshConvertible
- Specified by:
toMesh
in classPrimitive
- Returns:
- The mesh.
-
-