org.jzy3d.plot3d.primitives.axes
Class AxeBox

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.axes.AxeBox
All Implemented Interfaces:
IAxe
Direct Known Subclasses:
ContourAxeBox, FeedbackBufferAxeBox

public class AxeBox
extends java.lang.Object
implements IAxe

The AxeBox displays a box with invisible front faces and ticks labels.

Author:
Martin Pernollet

Constructor Summary
AxeBox(BoundingBox3d bbox)
           
AxeBox(BoundingBox3d bbox, IAxeLayout layout)
           
 
Method Summary
 void dispose()
           
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera camera)
          Draws the AxeBox.
 BoundingBox3d getBoxBounds()
           
 Coord3d getCenter()
           
 IAxeLayout getLayout()
           
 TextRenderer getTextRenderer()
           
 View getView()
           
 BoundingBox3d getWholeBounds()
          Return the boundingBox of this axis, including the volume occupied by the texts.
 void setAxe(BoundingBox3d bbox)
           
 void setScale(Coord3d scale)
          Set the scaling factor that are applyed on this object before GL commands.
 void setTextRenderer(ICanvas canvas)
          Initialize a text renderer that will reference the target canvas for getting its dimensions (in order to convert coordinates from OpenGL to Java2d).
 void setView(View view)
          When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxeBox

public AxeBox(BoundingBox3d bbox)

AxeBox

public AxeBox(BoundingBox3d bbox,
              IAxeLayout layout)
Method Detail

dispose

public void dispose()
Specified by:
dispose in interface IAxe

getTextRenderer

public TextRenderer getTextRenderer()

setTextRenderer

public void setTextRenderer(ICanvas canvas)
Initialize a text renderer that will reference the target canvas for getting its dimensions (in order to convert coordinates from OpenGL to Java2d).

Parameters:
canvas -

getView

public View getView()

setView

public void setView(View view)
When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.


setAxe

public void setAxe(BoundingBox3d bbox)
Specified by:
setAxe in interface IAxe

getBoxBounds

public BoundingBox3d getBoxBounds()
Specified by:
getBoxBounds in interface IAxe

getLayout

public IAxeLayout getLayout()
Specified by:
getLayout in interface IAxe

getWholeBounds

public BoundingBox3d getWholeBounds()
Return the boundingBox of this axis, including the volume occupied by the texts. This requires calling draw() before, which computes actual ticks position in 3d, and updates the bounds.


getCenter

public Coord3d getCenter()
Specified by:
getCenter in interface IAxe

setScale

public void setScale(Coord3d scale)
Set the scaling factor that are applyed on this object before GL commands.

Specified by:
setScale in interface IAxe

draw

public void draw(javax.media.opengl.GL gl,
                 javax.media.opengl.glu.GLU glu,
                 Camera camera)
Draws the AxeBox. The camera is used to determine which axis is closest to the ur point ov view, in order to decide for an axis on which to diplay the tick values.

Specified by:
draw in interface IAxe