org::scilab::modules::renderer::utils::geom3D::Vector3D Class Reference

Collaboration diagram for org::scilab::modules::renderer::utils::geom3D::Vector3D:

Collaboration graph
[legend]

Public Member Functions

 Vector3D ()
 Vector3D (Vector3D copy)
 Vector3D (double[] values)
 Vector3D (double xCoord, double yCoord, double zCoord)
double getX ()
double getY ()
double getZ ()
float getXf ()
float getYf ()
float getZf ()
void setX (double xCoord)
void setY (double yCoord)
void setZ (double zCoord)
void setValues (double x, double y, double z)
void setValues (double[] values)
void setValues (Vector3D copy)
double[] getValues ()
double dotProduct (Vector3D v2)
Vector3D crossProduct (Vector3D v2)
double getNorm ()
double getSquareNorm ()
void normalize ()
Vector3D getNormalized ()
Vector3D scalarMult (double scalar)
Vector3D scale (double scaleX, double scaleY, double scaleZ)
void scalarMultSelf (double scalar)
Vector3D add (Vector3D v2)
Vector3D substract (Vector3D v2)
Vector3D getOpposite ()
String toString ()
Vector3D getCopy ()
Vector3D rotate (Vector3D axisCenter, Vector3D axisDir, double angle)
boolean isFinite ()
boolean equals (Vector3D v2)
int hashCode ()
double getMaxCoordinate ()
double getMinCoordinate ()

Static Public Attributes

static final Vector3D ORIGIN = new Vector3D(0.0, 0.0, 0.0)
static final Vector3D X_AXIS = new Vector3D(1.0, 0.0, 0.0)
static final Vector3D Y_AXIS = new Vector3D(0.0, 1.0, 0.0)
static final Vector3D Z_AXIS = new Vector3D(0.0, 0.0, 1.0)
static final int DIMENSION = 3

Private Attributes

double xCoord
double yCoord
double zCoord

Detailed Description

Class which represent a 3D vector
Author:
Jean-Baptiste Silvy

Definition at line 22 of file Vector3D.java.


Constructor & Destructor Documentation

org::scilab::modules::renderer::utils::geom3D::Vector3D::Vector3D (  )  [inline]

Default constructor

Definition at line 39 of file Vector3D.java.

References xCoord, yCoord, and zCoord.

Referenced by add(), crossProduct(), getCopy(), getNormalized(), getOpposite(), scalarMult(), scale(), and substract().

00039                           {
00040                 xCoord = 0.0;
00041                 yCoord = 0.0;
00042                 zCoord = 0.0;
00043         }

Here is the caller graph for this function:

org::scilab::modules::renderer::utils::geom3D::Vector3D::Vector3D ( Vector3D  copy  )  [inline]

Copy constructor

Parameters:
copy the vector which is copied

Definition at line 49 of file Vector3D.java.

References setValues().

00049                                        {
00050                 setValues(copy);
00051         }

Here is the call graph for this function:

org::scilab::modules::renderer::utils::geom3D::Vector3D::Vector3D ( double[]  values  )  [inline]

Constructor from an array

Parameters:
values array with 3 values

Definition at line 57 of file Vector3D.java.

References setValues().

00057                                          {
00058                 setValues(values);
00059         }

Here is the call graph for this function:

org::scilab::modules::renderer::utils::geom3D::Vector3D::Vector3D ( double  xCoord,
double  yCoord,
double  zCoord 
) [inline]

Constructor from the 3 coordinates

Parameters:
xCoord X coordinate
yCoord Y coordinate
zCoord Z coordinate

Definition at line 67 of file Vector3D.java.

References setValues().

00067                                                                      {
00068                 setValues(xCoord, yCoord, zCoord);
00069         }

Here is the call graph for this function:


Member Function Documentation

double org::scilab::modules::renderer::utils::geom3D::Vector3D::getX (  )  [inline]

Returns:
Vector X coordinates

Definition at line 74 of file Vector3D.java.

References xCoord.

Referenced by org::scilab::modules::renderer::subwinDrawing::CameraGL::centerAxesBox(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::checkLabels(), org::scilab::modules::renderer::arcDrawing::NurbsArcGL::computeArcControlPoints4D(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::computeGlobalOrientation(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::computeLabelCenter(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::computeLengthDependingArrowSize(), org::scilab::modules::renderer::subwinDrawing::CameraGL::computeMarginsSize(), org::scilab::modules::renderer::textDrawing::TextContentDrawerGL::convertToArray(), org::scilab::modules::renderer::subwinDrawing::SubwinBackgroundDrawerGL::drawBackground(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawFrontTrihedron(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawHalfBox(), org::scilab::modules::renderer::utils::selection::RubberBox::drawNewBox(), org::scilab::modules::renderer::textDrawing::RightAlignedTextGL::drawTextContent(), org::scilab::modules::renderer::textDrawing::LeftAlignedTextGL::drawTextContent(), org::scilab::modules::renderer::textDrawing::CenteredAlignedTextGL::drawTextContent(), org::scilab::modules::renderer::textDrawing::FilledTextDrawerGL::drawTextContentPix(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::drawTriangle(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawTrihedron(), org::scilab::modules::renderer::utils::glTools::GLTools::endPixelCoordinates(), org::scilab::modules::renderer::utils::selection::RubberBox::erasePreviousBox(), org::scilab::modules::renderer::subwinDrawing::CameraGL::getBoxScreenExtent(), org::scilab::modules::renderer::utils::selection::RubberBox::getFirstPointX(), org::scilab::modules::renderer::utils::selection::RubberBox::getSecondPointX(), org::scilab::modules::renderer::subwinDrawing::CameraGL::moveAxesBox(), org::scilab::modules::renderer::subwinDrawing::CameraGL::moveViewingArea(), org::scilab::modules::renderer::utils::geom3D::Matrix4D::mult(), org::scilab::modules::renderer::utils::geom3D::Matrix4D::mult3D(), org::scilab::modules::renderer::textDrawing::CenteredTextDrawerGL::placeBoundingBox(), org::scilab::modules::renderer::textDrawing::StandardTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::textDrawing::FilledTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::textDrawing::CenteredTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::utils::CoordinateTransformation::project(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::redrawArrowHeads(), org::scilab::modules::renderer::subwinDrawing::CameraGL::revertAxes(), org::scilab::modules::renderer::subwinDrawing::CameraGL::rotateAxesBox(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::setAxesBounds(), org::scilab::modules::renderer::arcDrawing::ArcTools::setCoordinatesToCircleGL(), org::scilab::modules::renderer::utils::geom3D::Plane3D::setEquation(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::showTicksLines(), org::scilab::modules::renderer::subwinDrawing::CameraGL::switchTo2DCoordinates(), org::scilab::modules::renderer::utils::CoordinateTransformation::unProject(), and org::scilab::modules::renderer::utils::glTools::GLTools::usePixelCoordinates().

00074                              {
00075                 return xCoord;
00076         }

Here is the caller graph for this function:

double org::scilab::modules::renderer::utils::geom3D::Vector3D::getY (  )  [inline]

Returns:
Vector Y coordinates

Definition at line 81 of file Vector3D.java.

References yCoord.

Referenced by org::scilab::modules::renderer::subwinDrawing::CameraGL::centerAxesBox(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::checkLabels(), org::scilab::modules::renderer::arcDrawing::NurbsArcGL::computeArcControlPoints4D(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::computeGlobalOrientation(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::computeLabelCenter(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::computeLengthDependingArrowSize(), org::scilab::modules::renderer::subwinDrawing::CameraGL::computeMarginsSize(), org::scilab::modules::renderer::textDrawing::TextContentDrawerGL::convertToArray(), org::scilab::modules::renderer::subwinDrawing::SubwinBackgroundDrawerGL::drawBackground(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawFrontTrihedron(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawHalfBox(), org::scilab::modules::renderer::utils::selection::RubberBox::drawNewBox(), org::scilab::modules::renderer::textDrawing::FilledTextDrawerGL::drawTextContentPix(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::drawTriangle(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawTrihedron(), org::scilab::modules::renderer::utils::glTools::GLTools::endPixelCoordinates(), org::scilab::modules::renderer::utils::selection::RubberBox::erasePreviousBox(), org::scilab::modules::renderer::subwinDrawing::CameraGL::getBoxScreenExtent(), org::scilab::modules::renderer::utils::selection::RubberBox::getFirstPointY(), org::scilab::modules::renderer::utils::selection::RubberBox::getSecondPointY(), org::scilab::modules::renderer::subwinDrawing::CameraGL::moveAxesBox(), org::scilab::modules::renderer::subwinDrawing::CameraGL::moveViewingArea(), org::scilab::modules::renderer::utils::geom3D::Matrix4D::mult(), org::scilab::modules::renderer::utils::geom3D::Matrix4D::mult3D(), org::scilab::modules::renderer::textDrawing::CenteredTextDrawerGL::placeBoundingBox(), org::scilab::modules::renderer::textDrawing::StandardTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::textDrawing::FilledTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::textDrawing::CenteredTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::utils::CoordinateTransformation::project(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::redrawArrowHeads(), org::scilab::modules::renderer::subwinDrawing::CameraGL::revertAxes(), org::scilab::modules::renderer::subwinDrawing::CameraGL::rotateAxesBox(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::setAxesBounds(), org::scilab::modules::renderer::arcDrawing::ArcTools::setCoordinatesToCircleGL(), org::scilab::modules::renderer::utils::geom3D::Plane3D::setEquation(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::showTicksLines(), org::scilab::modules::renderer::subwinDrawing::CameraGL::switchTo2DCoordinates(), org::scilab::modules::renderer::utils::CoordinateTransformation::unProject(), and org::scilab::modules::renderer::utils::glTools::GLTools::usePixelCoordinates().

00081                              {
00082                 return yCoord;
00083         }

Here is the caller graph for this function:

double org::scilab::modules::renderer::utils::geom3D::Vector3D::getZ (  )  [inline]

Returns:
Vector Z coordinates

Definition at line 88 of file Vector3D.java.

References zCoord.

Referenced by org::scilab::modules::renderer::subwinDrawing::CameraGL::centerAxesBox(), org::scilab::modules::renderer::arcDrawing::NurbsArcGL::computeArcControlPoints4D(), org::scilab::modules::renderer::textDrawing::TextContentDrawerGL::convertToArray(), org::scilab::modules::renderer::subwinDrawing::SubwinBackgroundDrawerGL::drawBackground(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawFrontTrihedron(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawHalfBox(), org::scilab::modules::renderer::utils::selection::RubberBox::drawNewBox(), org::scilab::modules::renderer::textDrawing::RightAlignedTextGL::drawTextContent(), org::scilab::modules::renderer::textDrawing::LeftAlignedTextGL::drawTextContent(), org::scilab::modules::renderer::textDrawing::CenteredAlignedTextGL::drawTextContent(), org::scilab::modules::renderer::drawers::ArrowHeadDrawerGL::drawTriangle(), org::scilab::modules::renderer::subwinDrawing::SubwinLineBoxDrawer::drawTrihedron(), org::scilab::modules::renderer::utils::glTools::GLTools::endPixelCoordinates(), org::scilab::modules::renderer::utils::selection::RubberBox::erasePreviousBox(), org::scilab::modules::renderer::subwinDrawing::CameraGL::getAxesBoxDepthRange(), org::scilab::modules::renderer::subwinDrawing::CameraGL::getBoxScreenExtent(), org::scilab::modules::renderer::surfaceDrawing::ZDependingColorComputer::getFacetColor(), org::scilab::modules::renderer::subwinDrawing::CameraGL::moveAxesBox(), org::scilab::modules::renderer::subwinDrawing::CameraGL::moveViewingArea(), org::scilab::modules::renderer::utils::geom3D::Matrix4D::mult(), org::scilab::modules::renderer::utils::geom3D::Matrix4D::mult3D(), org::scilab::modules::renderer::textDrawing::StandardTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::textDrawing::FilledTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::textDrawing::CenteredTextDrawerGL::placeTextGrid(), org::scilab::modules::renderer::utils::CoordinateTransformation::project(), org::scilab::modules::renderer::subwinDrawing::CameraGL::revertAxes(), org::scilab::modules::renderer::subwinDrawing::CameraGL::rotateAxesBox(), org::scilab::modules::renderer::arcDrawing::ArcTools::setCoordinatesToCircleGL(), org::scilab::modules::renderer::utils::geom3D::Plane3D::setEquation(), org::scilab::modules::renderer::subwinDrawing::TicksDrawerGL::showTicksLines(), org::scilab::modules::renderer::subwinDrawing::CameraGL::switchTo2DCoordinates(), org::scilab::modules::renderer::utils::CoordinateTransformation::unProject(), and org::scilab::modules::renderer::utils::glTools::GLTools::usePixelCoordinates().

00088                              {
00089                 return zCoord;
00090         }

Here is the caller graph for this function:

float org::scilab::modules::renderer::utils::geom3D::Vector3D::getXf (  )  [inline]

Returns:
Vector X coordinates as float

Definition at line 95 of file Vector3D.java.

References xCoord.

00095                              {
00096                 return (float) xCoord;
00097         }

float org::scilab::modules::renderer::utils::geom3D::Vector3D::getYf (  )  [inline]

Returns:
Vector Y coordinates as float

Definition at line 102 of file Vector3D.java.

References yCoord.

00102                              {
00103                 return (float) yCoord;
00104         }

float org::scilab::modules::renderer::utils::geom3D::Vector3D::getZf (  )  [inline]

Returns:
Vector Z coordinates as float

Definition at line 109 of file Vector3D.java.

References zCoord.

00109                              {
00110                 return (float) zCoord;
00111         }

void org::scilab::modules::renderer::utils::geom3D::Vector3D::setX ( double  xCoord  )  [inline]

void org::scilab::modules::renderer::utils::geom3D::Vector3D::setY ( double  yCoord  )  [inline]