org.jzy3d.plot3d.primitives
Class Parallelepiped

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.AbstractDrawable
      extended by org.jzy3d.plot3d.primitives.AbstractWireframeable
          extended by org.jzy3d.plot3d.primitives.Parallelepiped
All Implemented Interfaces:
IMultiColorable, ISingleColorable, IGLRenderer, ISortableDraw

public class Parallelepiped
extends AbstractWireframeable
implements ISingleColorable, IMultiColorable

A Parallelepiped is a parallelepiped rectangle that is Drawable and Wireframeable. A future version of Rectangle3d should consider it as a Composite3d. This class has been implemented for debugging purpose and inconsistency of its input w.r.t other primitives should not be considered (no setData function).

Author:
Martin Pernollet

Field Summary
 
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
Parallelepiped()
          Initialize a parallelepiped.
Parallelepiped(BoundingBox3d b)
          Initialize a parallelepiped.
 
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.
 ColorMapper getColorMapper()
          Get the colormapper.
 boolean getFaceDisplayed()
          Get the face display status to on or off.
 Color getWireframeColor()
          Get the wireframe color.
 boolean getWireframeDisplayed()
          Get the wireframe display status to on or off.
 float getWireframeWidth()
          Get the wireframe width.
 void setColor(Color color)
          Set the color.
 void setColorMapper(ColorMapper mapper)
          Set the colormapper that will be used by the Drawable, instead of using precomputed colors.
 void setData(BoundingBox3d box)
          Set the parallelepiped data.
 void setFaceDisplayed(boolean status)
          Set the face display status to on or off.
 void setTransform(Transform transform)
          Set object's transformation that is applied at the beginning of a call to #draw(GL,GLU,Camera).
 void setWireframeColor(Color color)
          Set the wireframe color.
 void setWireframeDisplayed(boolean status)
          Set the wireframe display status to on or off.
 void setWireframeWidth(float width)
          Set the wireframe width.
 
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, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parallelepiped

public Parallelepiped()
Initialize a parallelepiped.


Parallelepiped

public Parallelepiped(BoundingBox3d b)
Initialize a parallelepiped.

Method Detail

draw

public void draw(javax.media.opengl.GL2 gl,
                 javax.media.opengl.glu.GLU glu,
                 Camera cam)
Description copied from class: AbstractDrawable
Call OpenGL2 routines for rendering the object.

Specified by:
draw in interface IGLRenderer
Specified by:
draw in class AbstractDrawable
Parameters:
gl - GL2 context
glu - GLU context
cam - a reference to a shooting Camera.

setTransform

public void setTransform(Transform transform)
Description copied from class: AbstractDrawable
Set object's transformation that is applied at the beginning of a call to #draw(GL,GLU,Camera).

Overrides:
setTransform in class AbstractDrawable

setWireframeColor

public void setWireframeColor(Color color)
Description copied from class: AbstractWireframeable
Set the wireframe color.

Overrides:
setWireframeColor in class AbstractWireframeable

setWireframeDisplayed

public void setWireframeDisplayed(boolean status)
Description copied from class: AbstractWireframeable
Set the wireframe display status to on or off.

Overrides:
setWireframeDisplayed in class AbstractWireframeable

setWireframeWidth

public void setWireframeWidth(float width)
Description copied from class: AbstractWireframeable
Set the wireframe width.

Overrides:
setWireframeWidth in class AbstractWireframeable

setFaceDisplayed

public void setFaceDisplayed(boolean status)
Description copied from class: AbstractWireframeable
Set the face display status to on or off.

Overrides:
setFaceDisplayed in class AbstractWireframeable

getWireframeColor

public Color getWireframeColor()
Description copied from class: AbstractWireframeable
Get the wireframe color.

Overrides:
getWireframeColor in class AbstractWireframeable

getWireframeDisplayed

public boolean getWireframeDisplayed()
Description copied from class: AbstractWireframeable
Get the wireframe display status to on or off.

Overrides:
getWireframeDisplayed in class AbstractWireframeable

getWireframeWidth

public float getWireframeWidth()
Description copied from class: AbstractWireframeable
Get the wireframe width.

Overrides:
getWireframeWidth in class AbstractWireframeable

getFaceDisplayed

public boolean getFaceDisplayed()
Description copied from class: AbstractWireframeable
Get the face display status to on or off.

Overrides:
getFaceDisplayed in class AbstractWireframeable

setData

public void setData(BoundingBox3d box)
Set the parallelepiped data.


setColorMapper

public void setColorMapper(ColorMapper mapper)
Description copied from interface: IMultiColorable
Set the colormapper that will be used by the Drawable, instead of using precomputed colors.

Specified by:
setColorMapper in interface IMultiColorable

getColorMapper

public ColorMapper getColorMapper()
Description copied from interface: IMultiColorable
Get the colormapper.

Specified by:
getColorMapper in interface IMultiColorable

setColor

public void setColor(Color color)
Description copied from interface: ISingleColorable
Set the color.

Specified by:
setColor in interface ISingleColorable
Parameters:
color - the color

getColor

public Color getColor()
Description copied from interface: ISingleColorable
Get the color.

Specified by:
getColor in interface ISingleColorable
Returns:
color the color.