|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jzy3d.plot3d.primitives.AbstractDrawable
org.jzy3d.plot3d.primitives.AbstractWireframeable
org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable
org.jzy3d.plot3d.primitives.enlightables.EnlightableSphere
public class EnlightableSphere
A Sphere allows rendering a sphere.
The position and shape of a Sphere3d is defined through
its setData() method. Moreover, a Sphere3d
is Wireframeable3d and support only one color that is defined
trough its setColor() method.
| Field Summary |
|---|
| Fields inherited from class org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable |
|---|
materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflection |
| Fields inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable |
|---|
facestatus, wfcolor, wfstatus, wfwidth |
| Fields inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable |
|---|
bbox, displayed, hasListeners, legend, legendDisplayed, listeners, transform |
| Constructor Summary | |
|---|---|
EnlightableSphere()
Initialize a black sphere at the origin with a radius of 10, and slicing of 15. |
|
EnlightableSphere(Coord3d position,
float radius,
int slicing,
Color color)
Initialize a sphere with the given parameters. |
|
| Method Summary | |
|---|---|
void |
draw(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
Call OpenGL2 routines for rendering the object. |
Color |
getColor()
Get the color. |
void |
setColor(Color color)
Set the color. |
void |
setData(Coord3d position,
float radius,
float height,
int slices,
int stacks)
Set the sphere data. |
void |
setPosition(Coord3d position)
Set the position of the Sphere and the dimensions of its boundingbox. |
void |
setSlicing(int verticalWires,
int horizontalWires)
Set the sphere slicing parameters, i.e. the subtlety of the circle estimation. |
void |
setVolume(float radius)
Set the radius of the sphere, and the dimensions of its boundingbox. |
String |
toString(int depth)
|
| Methods inherited from class org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable |
|---|
applyMaterial, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection |
| Methods inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable |
|---|
getFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth, setFaceDisplayed, setWireframeColor, setWireframeDisplayed, setWireframeWidth |
| Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable |
|---|
addDrawableListener, call, call, callWithAlphaFactor, dispose, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getTransform, hasLegend, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EnlightableSphere()
public EnlightableSphere(Coord3d position,
float radius,
int slicing,
Color color)
| Method Detail |
|---|
public void draw(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
AbstractDrawable
draw in interface IGLRendererdraw in class AbstractDrawablegl - GL2 contextglu - GLU contextcam - a reference to a shooting Camera.
public void setData(Coord3d position,
float radius,
float height,
int slices,
int stacks)
position - sphere position (may be handled differently in future version)radius - radius of the sphereslices - number of vertical slices (i.e. wireframes)stacks - number of horizontal stacks (i.e. wireframes)public void setPosition(Coord3d position)
position - public void setVolume(float radius)
radius - sphere radius
public void setSlicing(int verticalWires,
int horizontalWires)
verticalWires - number of vertical sliceshorizontalWires - number of horizontal slicespublic void setColor(Color color)
ISingleColorable
setColor in interface ISingleColorablecolor - the colorpublic Color getColor()
ISingleColorable
getColor in interface ISingleColorablepublic String toString(int depth)
toString in class AbstractDrawable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||