org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL Class Reference

Inheritance diagram for org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL:

Inheritance graph
[legend]
Collaboration diagram for org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL:

Collaboration graph
[legend]

Public Member Functions

 XAxesDrawerGL ()
void setConstantCoordinates (double yCoordinate, double zCoordinate)

Protected Member Functions

Vector3D[] findTicksPositions (double[] xCoordinates, double yCoordinate, double zCoordinate)
Vector3D[] findTicksPositions ()
Vector3D[] findSubticksPositions ()
Vector3D getAxisSegmentStart ()
Vector3D getAxisSegmentEnd ()

Private Attributes

double yCoordinate
double zCoordinate

Detailed Description

Class drawing axis alinged with X axis
Author:
Jean-Baptiste Silvy

Definition at line 24 of file XAxesDrawerGL.java.


Constructor & Destructor Documentation

org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::XAxesDrawerGL (  )  [inline]

Defulat constructor

Definition at line 32 of file XAxesDrawerGL.java.

References yCoordinate, and zCoordinate.

00032                                {
00033                 super();
00034                 yCoordinate = 0.0;
00035                 zCoordinate = 0.0;
00036         }


Member Function Documentation

void org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::setConstantCoordinates ( double  yCoordinate,
double  zCoordinate 
) [inline]

Set the y and z coordinates of the axis

Parameters:
yCoordinate y Coordinate of the axis
zCoordinate z Coordinate of the axis

Definition at line 43 of file XAxesDrawerGL.java.

00043                                                                                    {
00044                 this.yCoordinate = yCoordinate;
00045                 this.zCoordinate = zCoordinate;
00046         }

Vector3D [] org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::findTicksPositions ( double[]  xCoordinates,
double  yCoordinate,
double  zCoordinate 
) [inline, protected]

Compute ticks positions from an array of X coordinates

Parameters:
xCoordinates X coordinates of ticks
yCoordinate Y coordinate common for all ticks
zCoordinate Z coordinate common for all ticks
Returns:
array of vector with only displayable ticks

Definition at line 55 of file XAxesDrawerGL.java.

References org::scilab::modules::renderer::ObjectGL::getGL(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getTransform(), and res.

00055                                                                                                                {
00056                 int nbTicks = xCoordinates.length;
00057                 Vector3D[] res = new Vector3D[nbTicks];
00058                 for (int i = 0; i < nbTicks; i++) {
00059                         // only x coordinate is changing
00060                         res[i] = new Vector3D(xCoordinates[i], yCoordinate, zCoordinate);
00061                         res[i] = getTransform().getCanvasCoordinates(getGL(), res[i]);
00062                 }
00063                 return res;
00064         }

Here is the call graph for this function:

Vector3D [] org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::findTicksPositions (  )  [inline, protected, virtual]

Returns:
an array containing positions of ticks along the axis

Implements org::scilab::modules::renderer::axesDrawing::AxesTicksDrawerGL.

Definition at line 69 of file XAxesDrawerGL.java.

References org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getTicksPositions(), yCoordinate, and zCoordinate.

Referenced by findSubticksPositions().

00069                                                   {
00070                 return findTicksPositions(getTicksPositions(), yCoordinate, zCoordinate);
00071         }

Here is the call graph for this function:

Here is the caller graph for this function:

Vector3D [] org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::findSubticksPositions (  )  [inline, protected, virtual]

Returns:
an array containing positions of subticks along the axis

Implements org::scilab::modules::renderer::axesDrawing::AxesTicksDrawerGL.

Definition at line 76 of file XAxesDrawerGL.java.

References findTicksPositions(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getSubTicksPositions(), yCoordinate, and zCoordinate.

Here is the call graph for this function:

Vector3D org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::getAxisSegmentStart (  )  [inline, protected, virtual]

Returns:
position of the beginning of the axis

Implements org::scilab::modules::renderer::axesDrawing::AxesTicksDrawerGL.

Definition at line 83 of file XAxesDrawerGL.java.

References org::scilab::modules::renderer::ObjectGL::getGL(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getTicksPositions(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getTransform(), yCoordinate, and zCoordinate.

00083                                                  {
00084                 return getTransform().getCanvasCoordinates(getGL(), new Vector3D(getTicksPositions()[0], yCoordinate, zCoordinate));
00085         }

Here is the call graph for this function:

Vector3D org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::getAxisSegmentEnd (  )  [inline, protected, virtual]

Returns:
position of the end of the axis

Implements org::scilab::modules::renderer::axesDrawing::AxesTicksDrawerGL.

Definition at line 90 of file XAxesDrawerGL.java.

References org::scilab::modules::renderer::ObjectGL::getGL(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getTicksPositions(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::getTransform(), yCoordinate, and zCoordinate.

00090                                                {
00091                 double[] xCoordinates = getTicksPositions();
00092                 return getTransform().getCanvasCoordinates(getGL(),
00093                                                                                                    new Vector3D(xCoordinates[xCoordinates.length - 1],
00094                                                                                                    yCoordinate, zCoordinate));
00095         }

Here is the call graph for this function:


Field Documentation

double org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::yCoordinate [private]

Definition at line 26 of file XAxesDrawerGL.java.

Referenced by findSubticksPositions(), findTicksPositions(), getAxisSegmentEnd(), getAxisSegmentStart(), and XAxesDrawerGL().

double org::scilab::modules::renderer::axesDrawing::XAxesDrawerGL::zCoordinate [private]

Definition at line 27 of file XAxesDrawerGL.java.

Referenced by findSubticksPositions(), findTicksPositions(), getAxisSegmentEnd(), getAxisSegmentStart(), and XAxesDrawerGL().


The documentation for this class was generated from the following file:
Generated on Sun Apr 27 16:21:42 2008 for Scilab [trunk] by  doxygen 1.5.4