|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.geometry.SphereUtility
public class SphereUtility
Static methods for generating approximations to spheres. The approximations are based
either on subdividing a cube, or subdividing an icosahedron. These methods are used for
example in the package de.jreality.jogl
for quick rendering of
spherical representations of points.
Warning: the approximation methods here have an upper limit on the fineness of the approximation which they are prepared to calculate. These limits should problably be removed.
Field Summary | |
---|---|
static int |
SPHERE_COARSE
|
static int |
SPHERE_FINE
|
static int |
SPHERE_FINER
|
static int |
SPHERE_FINEST
|
static int |
SPHERE_SUPERFINE
|
static int |
SPHERE_WAYFINE
|
Method Summary | |
---|---|
static void |
assignSphericalUVs(PointSet ps,
double[] center)
|
static void |
colorizeSphere(PointSet ps,
double[] center,
ColorGradient cg)
Calculated the distance from center ( [0,0,0] if center is null ) for each vertex and sets vertex colors from the given Color Gradient (d_min->0, d_max-_1). |
static Rectangle3D |
getSphereBoundingBox()
Return a standard bounding box for a unit sphere. |
static IndexedFaceSet |
sphericalPatch(double cU,
double cV,
double uSize,
double vSize,
int xDetail,
int yDetail,
double radius)
Generate a spherical patch. |
static SceneGraphComponent |
tessellatedCubeSphere(int i)
Return a tessellated cube of order i. |
static IndexedFaceSet |
tessellatedIcosahedronSphere(int i)
|
static IndexedFaceSet |
tessellatedIcosahedronSphere(int i,
boolean sharedInstance)
Return a tessellated icosahedron of order i. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int SPHERE_COARSE
public static int SPHERE_FINE
public static int SPHERE_FINER
public static int SPHERE_FINEST
public static int SPHERE_SUPERFINE
public static int SPHERE_WAYFINE
Method Detail |
---|
public static IndexedFaceSet tessellatedIcosahedronSphere(int i)
public static IndexedFaceSet tessellatedIcosahedronSphere(int i, boolean sharedInstance)
i
- sharedInstance
-
public static SceneGraphComponent tessellatedCubeSphere(int i)
i
-
public static Rectangle3D getSphereBoundingBox()
public static IndexedFaceSet sphericalPatch(double cU, double cV, double uSize, double vSize, int xDetail, int yDetail, double radius)
cU
- cV
- uSize
- wdith of the patch (longitude)vSize
- height of the patch (latitude)n
- number of sample points in um
- number of sample points in vr
- radius of the sphere
public static void colorizeSphere(PointSet ps, double[] center, ColorGradient cg)
ps
- the PointSet to set vertex colorscenter
- optional centercg
- optional color color gradient
TODO: adapt to homogenious coordinatespublic static void assignSphericalUVs(PointSet ps, double[] center)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |