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, IWireframeable

public class Parallelepiped
extends AbstractWireframeable
implements ISingleColorable, IMultiColorable

A Parallelepiped is a parallelepiped rectangle that is Drawable and Wireframeable. 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).


Constructor Summary
Parallelepiped()
          Initialize a parallelepiped.
Parallelepiped(BoundingBox3d b)
          Initialize a parallelepiped.
 
Method Summary
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL 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 AbstractDrawable.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, dispose, getBarycentre, getBounds, getDistance, getFace, getLongestDistance, getShortestDistance, getTransform, hasFace, isDisplayed, isFace2dDisplayed, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, toString, toString
 
Methods inherited from class java.lang.Object
equals, 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.GL gl,
                 javax.media.opengl.glu.GLU glu,
                 Camera cam)
Description copied from class: AbstractDrawable
Call OpenGL routines for rendering the object.

Specified by:
draw in interface IGLRenderer
Specified by:
draw in class AbstractDrawable
Parameters:
gl - GL 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 AbstractDrawable.draw(GL,GLU,Camera).

Overrides:
setTransform in class AbstractDrawable

setWireframeColor

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

Specified by:
setWireframeColor in interface IWireframeable
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.

Specified by:
setWireframeDisplayed in interface IWireframeable
Overrides:
setWireframeDisplayed in class AbstractWireframeable

setWireframeWidth

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

Specified by:
setWireframeWidth in interface IWireframeable
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.

Specified by:
setFaceDisplayed in interface IWireframeable
Overrides:
setFaceDisplayed in class AbstractWireframeable

getWireframeColor

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

Specified by:
getWireframeColor in interface IWireframeable
Overrides:
getWireframeColor in class AbstractWireframeable

getWireframeDisplayed

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

Specified by:
getWireframeDisplayed in interface IWireframeable
Overrides:
getWireframeDisplayed in class AbstractWireframeable

getWireframeWidth

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

Specified by:
getWireframeWidth in interface IWireframeable
Overrides:
getWireframeWidth in class AbstractWireframeable

getFaceDisplayed

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

Specified by:
getFaceDisplayed in interface IWireframeable
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.