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(java.lang.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 |
---|---|
boolean |
equals(java.lang.Object obj)
Check if two spheres equal
|
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.
|
int |
hashCode()
Gets the hash code of current primitive instance
|
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
|
createRenderableResource, merge, setup
getBoundingBox, 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(java.lang.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 boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to check equality.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 double getRadius()
public void setRadius(double value)
value
- New valuepublic Mesh toMesh()
toMesh
in interface IMeshConvertible
toMesh
in class Primitive
public int hashCode()
hashCode
in class java.lang.Object
Sphere