|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jinx.video.Sphere
public class Sphere
Simple Visible that draws a sphere using an internally constructed Model.
This uses triangles and display lists, so it should out-perform spheres
constructed using GLU. However, there is a slight cost; the constructor
pre-calculates everything ahead of time, so initial startup may take longer
than with previous versions.
API Stability: Stable.
| Constructor Summary | |
|---|---|
Sphere(double radius,
int slices,
int stacks)
Deprecated. this is only here for backwards compatibility with previous versions. This simply type-casts radius to a float and calls Sphere(float,int,int). |
|
Sphere(float radius,
int slices,
int stacks)
Constructs a Sphere with the given radius, slices and stacks. |
|
| Method Summary | |
|---|---|
void |
deinit(Context opt)
Deinitializes this Visible, disposing of any resources that it may be using. |
void |
draw(Context opt)
Renders this Visible to glDrawable. |
Coloration |
getColoration()
Provides the Coloration for this Sphere. |
Material |
getMaterial()
Deprecated. this class has been internally redesigned; please use the getColoration() method instead. |
java.lang.String |
getTexture()
Provides the name of the texture that this Sphere should use. |
void |
init(Context opt)
Initializes this Visible, preparing it for rendering. |
static Model |
newSphereModel(float radius,
int slices,
int stacks)
|
void |
setColoration(Coloration color)
Sets the Coloration for this Sphere. |
void |
setMaterial(Material material)
Deprecated. this class has been internally redesigned; please use the setColoration(Coloration) method instead. |
void |
setSmooth(boolean smooth)
|
void |
setTexture(java.lang.String texture)
Sets the name of the texture that this Sphere should use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sphere(float radius,
int slices,
int stacks)
radius - the radius of the sphere.slices - the number of longitude lines.stacks - the number of latitude lines.
public Sphere(double radius,
int slices,
int stacks)
radius - the radius of the sphere.slices - the number of longitude lines.stacks - the number of latitude lines.| Method Detail |
|---|
public void setSmooth(boolean smooth)
public void setTexture(java.lang.String texture)
texture - the name. If this is null, no texture will be used.public java.lang.String getTexture()
public void setMaterial(Material material)
material - the Material.public Material getMaterial()
public void setColoration(Coloration color)
color - the Coloration.public Coloration getColoration()
public void init(Context opt)
Visible
init in interface Visibleopt - describes the rendering options that are being used.public void deinit(Context opt)
Visible
deinit in interface Visibleopt - describes the rendering options that are being used.public void draw(Context opt)
Visible
draw in interface Visibleopt - describes the rendering options that are being used.
public static Model newSphereModel(float radius,
int slices,
int stacks)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||