public class Sphere extends Primitive
Constructor and Description |
---|
Sphere()
Initializes a new instance of the
Sphere with default radius 1. |
Sphere(double radius)
Initializes a new instance of the
Sphere class with specified radius. |
Sphere(double radius,
int widthSegments,
int heightSegments)
Initializes a new instance of the
Sphere class with specified radius, width segments and height segments. |
Sphere(String name,
double radius,
int widthSegments,
int heightSegments,
double phiStart,
double phiLength,
double thetaStart,
double thetaLength)
Initializes a new instance of the
Sphere class. |
Modifier and Type | Method and 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 |
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 |
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
|
getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
public Sphere()
Sphere
with default radius 1.public Sphere(double radius)
Sphere
class with specified radius.radius
- Radius.public Sphere(double radius, int widthSegments, int heightSegments)
Sphere
class with specified radius, width segments and height segments.radius
- Radius of the sphere.widthSegments
- Width segments.heightSegments
- Height segments.public Sphere(String name, double radius, int widthSegments, int heightSegments, double phiStart, double phiLength, double thetaStart, double thetaLength)
Sphere
class.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.public int getWidthSegments()
public void setWidthSegments(int value)
value
- New valuepublic int getHeightSegments()
public void setHeightSegments(int value)
value
- New valuepublic double getPhiStart()
public void setPhiStart(double value)
value
- New valuepublic double getPhiLength()
public void setPhiLength(double value)
value
- New valuepublic double getThetaStart()
public void setThetaStart(double value)
value
- New valuepublic double getThetaLength()
public void setThetaLength(double value)
value
- New valuepublic BoundingBox getBoundingBox()
getBoundingBox
in class Entity
public Mesh toMesh()
toMesh
in interface IMeshConvertible
toMesh
in class Primitive
Copyright © 2018. All rights reserved.