|
BowlerKernel
|


Public Member Functions | |
| Sphere () | |
| Sphere (double radius) | |
| Sphere (LengthParameter size) | |
| Sphere (LengthParameter size, int numSlices, int numStacks) | |
| Sphere (double radius, int numSlices, int numStacks) | |
| Sphere (Vector3d center, double radius, int numSlices, int numStacks) | |
| List< Polygon > | toPolygons () |
| Vector3d | getCenter () |
| Sphere | setCenter (Vector3d center) |
| double | getRadius () |
| Sphere | setRadius (double radius) |
| int | getNumSlices () |
| Sphere | setNumSlices (int numSlices) |
| int | getNumStacks () |
| Sphere | setNumStacks (int numStacks) |
| PropertyStorage | getProperties () |
Public Member Functions inherited from eu.mihosoft.vrl.v3d.Primitive | |
| CSG | toCSG () |
Private Member Functions | |
| void | init () |
| Vertex | sphereVertex (Vector3d c, double r, double theta, double phi) |
Private Attributes | |
| Vector3d | center |
| double | radius |
| int | numSlices |
| int | numStacks |
| final PropertyStorage | properties = new PropertyStorage() |
Static Private Attributes | |
| static final int | NUM_SLICES = 16 |
| static final int | NUM_STACKS = 8 |
A solid sphere.
Tthe tessellation along the longitude and latitude directions can be controlled via the numSlices and numStacks parameters.
Definition at line 50 of file Sphere.java.
| eu.mihosoft.vrl.v3d.Sphere.Sphere | ( | ) |
Constructor. Creates a sphere with radius 1, 16 slices and 8 stacks and center [0,0,0].
Definition at line 76 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.init().

| eu.mihosoft.vrl.v3d.Sphere.Sphere | ( | double | radius | ) |
Constructor. Creates a sphere with the specified radius, 16 slices and 8 stacks and center [0,0,0].
| radius | sphare radius |
Definition at line 86 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.init(), and eu.mihosoft.vrl.v3d.Sphere.radius.

| eu.mihosoft.vrl.v3d.Sphere.Sphere | ( | LengthParameter | size | ) |
Definition at line 94 of file Sphere.java.
References eu.mihosoft.vrl.v3d.parametrics.Parameter.getMM().

| eu.mihosoft.vrl.v3d.Sphere.Sphere | ( | LengthParameter | size, |
| int | numSlices, | ||
| int | numStacks | ||
| ) |
Definition at line 98 of file Sphere.java.
References eu.mihosoft.vrl.v3d.parametrics.Parameter.getMM(), eu.mihosoft.vrl.v3d.Sphere.numSlices, and eu.mihosoft.vrl.v3d.Sphere.numStacks.

| eu.mihosoft.vrl.v3d.Sphere.Sphere | ( | double | radius, |
| int | numSlices, | ||
| int | numStacks | ||
| ) |
Constructor. Creates a sphere with the specified radius, number of slices and stacks.
| radius | sphare radius |
| numSlices | number of slices |
| numStacks | number of stacks |
Definition at line 110 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.init(), eu.mihosoft.vrl.v3d.Sphere.radius, eu.mihosoft.vrl.v3d.Sphere.setNumSlices(), and eu.mihosoft.vrl.v3d.Sphere.setNumStacks().

| eu.mihosoft.vrl.v3d.Sphere.Sphere | ( | Vector3d | center, |
| double | radius, | ||
| int | numSlices, | ||
| int | numStacks | ||
| ) |
Constructor. Creates a sphere with the specified center, radius, number of slices and stacks.
| center | center of the sphere |
| radius | sphere radius |
| numSlices | number of slices |
| numStacks | number of stacks |
Definition at line 126 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.center, eu.mihosoft.vrl.v3d.Sphere.radius, eu.mihosoft.vrl.v3d.Sphere.setNumSlices(), and eu.mihosoft.vrl.v3d.Sphere.setNumStacks().

| Vector3d eu.mihosoft.vrl.v3d.Sphere.getCenter | ( | ) |
Gets the center.
Definition at line 207 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.center.
| int eu.mihosoft.vrl.v3d.Sphere.getNumSlices | ( | ) |
Gets the num slices.
Definition at line 244 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.numSlices.
Referenced by eu.mihosoft.vrl.v3d.Sphere.toPolygons().
| int eu.mihosoft.vrl.v3d.Sphere.getNumStacks | ( | ) |
Gets the num stacks.
Definition at line 264 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.numStacks.
Referenced by eu.mihosoft.vrl.v3d.Sphere.toPolygons().
| PropertyStorage eu.mihosoft.vrl.v3d.Sphere.getProperties | ( | ) |
Returns the property storage of this primitive.
Reimplemented from eu.mihosoft.vrl.v3d.Primitive.
Definition at line 283 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.properties.
Referenced by eu.mihosoft.vrl.v3d.Sphere.toPolygons().
| double eu.mihosoft.vrl.v3d.Sphere.getRadius | ( | ) |
Gets the radius.
Definition at line 226 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.radius.
|
private |
Inits the.
Definition at line 136 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.center, eu.mihosoft.vrl.v3d.Sphere.NUM_SLICES, eu.mihosoft.vrl.v3d.Sphere.NUM_STACKS, eu.mihosoft.vrl.v3d.Sphere.radius, eu.mihosoft.vrl.v3d.Sphere.setNumSlices(), and eu.mihosoft.vrl.v3d.Sphere.setNumStacks().
Referenced by eu.mihosoft.vrl.v3d.Sphere.Sphere().

Sets the center.
| center | the center to set |
Definition at line 216 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.center.
| Sphere eu.mihosoft.vrl.v3d.Sphere.setNumSlices | ( | int | numSlices | ) |
Sets the num slices.
| numSlices | the numSlices to set |
Definition at line 253 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.NUM_SLICES, and eu.mihosoft.vrl.v3d.Sphere.numSlices.
Referenced by eu.mihosoft.vrl.v3d.Sphere.init(), and eu.mihosoft.vrl.v3d.Sphere.Sphere().
| Sphere eu.mihosoft.vrl.v3d.Sphere.setNumStacks | ( | int | numStacks | ) |
Sets the num stacks.
| numStacks | the numStacks to set |
Definition at line 273 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.NUM_STACKS, and eu.mihosoft.vrl.v3d.Sphere.numStacks.
Referenced by eu.mihosoft.vrl.v3d.Sphere.init(), and eu.mihosoft.vrl.v3d.Sphere.Sphere().
| Sphere eu.mihosoft.vrl.v3d.Sphere.setRadius | ( | double | radius | ) |
Sets the radius.
| radius | the radius to set |
Definition at line 235 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.radius.
|
private |
Sphere vertex.
| c | the c |
| r | the r |
| theta | the theta |
| phi | the phi |
Definition at line 152 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Vector3d.plus(), and eu.mihosoft.vrl.v3d.Vector3d.times().
Referenced by eu.mihosoft.vrl.v3d.Sphere.toPolygons().

| List<Polygon> eu.mihosoft.vrl.v3d.Sphere.toPolygons | ( | ) |
Returns the polygons that define this primitive.
Note: this method computes the polygons each time this method is called. The polygons can be cached inside a CSG object.
Reimplemented from eu.mihosoft.vrl.v3d.Primitive.
Definition at line 167 of file Sphere.java.
References eu.mihosoft.vrl.v3d.Sphere.center, eu.mihosoft.vrl.v3d.Sphere.getNumSlices(), eu.mihosoft.vrl.v3d.Sphere.getNumStacks(), eu.mihosoft.vrl.v3d.Sphere.getProperties(), eu.mihosoft.vrl.v3d.Sphere.radius, and eu.mihosoft.vrl.v3d.Sphere.sphereVertex().

|
private |
The center.
Definition at line 57 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.getCenter(), eu.mihosoft.vrl.v3d.Sphere.init(), eu.mihosoft.vrl.v3d.Sphere.setCenter(), eu.mihosoft.vrl.v3d.Sphere.Sphere(), and eu.mihosoft.vrl.v3d.Sphere.toPolygons().
|
staticprivate |
Definition at line 52 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.init(), and eu.mihosoft.vrl.v3d.Sphere.setNumSlices().
|
staticprivate |
Definition at line 54 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.init(), and eu.mihosoft.vrl.v3d.Sphere.setNumStacks().
|
private |
The num slices.
Definition at line 63 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.getNumSlices(), eu.mihosoft.vrl.v3d.Sphere.setNumSlices(), and eu.mihosoft.vrl.v3d.Sphere.Sphere().
|
private |
The num stacks.
Definition at line 66 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.getNumStacks(), eu.mihosoft.vrl.v3d.Sphere.setNumStacks(), and eu.mihosoft.vrl.v3d.Sphere.Sphere().
|
private |
The properties.
Definition at line 69 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.getProperties().
|
private |
The radius.
Definition at line 60 of file Sphere.java.
Referenced by eu.mihosoft.vrl.v3d.Sphere.getRadius(), eu.mihosoft.vrl.v3d.Sphere.init(), eu.mihosoft.vrl.v3d.Sphere.setRadius(), eu.mihosoft.vrl.v3d.Sphere.Sphere(), and eu.mihosoft.vrl.v3d.Sphere.toPolygons().