public class

Sphere

extends Element
implements Renderable Resettable
java.lang.Object
   ↳ casmi.graphics.element.Element
     ↳ casmi.graphics.element.Sphere

Class Overview

Sphere class. Wrap JOGL and make it easy to use.

Summary

[Expand]
Inherited Fields
From class casmi.graphics.element.Element
Public Constructors
Sphere(double radius)
Creates a new Sphere object using radius.
Sphere(double radius, int slices, int stacks)
Creates a new Sphere object using radius, slices and stacks.
Public Methods
Texture getTexture()
void render(GL2 gl, GLU glu, int width, int height, boolean selection)
void reset(GL2 gl)
final void setDetail(int slices, int stacks)
Sets the division number.
final void setRadius(double radius)
Sets radius of this Sphere.
final void setSlices(int slices)
Sets the sliced division number.
final void setStacks(int stacks)
Sets the stacked division number.
void setTexture(Texture texture)
[Expand]
Inherited Methods
From class casmi.graphics.element.Element
From class java.lang.Object
From interface casmi.graphics.object.Renderable
From interface casmi.graphics.object.Resettable

Public Constructors

public Sphere (double radius)

Creates a new Sphere object using radius.

Parameters
radius The radius of the Sphere.

public Sphere (double radius, int slices, int stacks)

Creates a new Sphere object using radius, slices and stacks.

Parameters
radius The radius of the Sphere.
slices The sliced division number.
stacks The stacks division number.

Public Methods

public Texture getTexture ()

public void render (GL2 gl, GLU glu, int width, int height, boolean selection)

public void reset (GL2 gl)

public final void setDetail (int slices, int stacks)

Sets the division number.

Parameters
slices The sliced division number.
stacks The stacks division number.

public final void setRadius (double radius)

Sets radius of this Sphere.

Parameters
radius The radius of the Sphere.

public final void setSlices (int slices)

Sets the sliced division number.

Parameters
slices The sliced division number.

public final void setStacks (int stacks)

Sets the stacked division number.

Parameters
stacks The stacks division number.

public void setTexture (Texture texture)