dlr::numeric::Vector3D Class Reference

The Vector2D class represents a real valued 2D vector. More...

#include <vector3D.h>

List of all members.

Public Member Functions

 Vector3D ()
 Default constructor initializes to (0, 0, 0).
 Vector3D (double x, double y, double z)
 Explicitly sets 3D coordinates.
 Vector3D (double x, double y, double z, double alpha)
 Explicitly sets 3D homogeneous coordinates.
 Vector3D (const Vector3D &source)
 Copy constructor.
 ~Vector3D ()
 Destructor.
void setValue (double x, double y, double z)
 Explicitly sets 3D coordinates.
void setValue (double x, double y, double z, double alpha)
 Explicitly sets 3D homogeneous coordinates.
double & x ()
 Returns the x component of the vector by reference.
double x () const
 Returns the x component of the vector by value.
double & y ()
 Returns the y component of the vector by reference.
double y () const
 Returns the y component of the vector by value.
double & z ()
 Returns the z component of the vector by reference.
double z () const
 Returns the z component of the vector by value.
Vector3Doperator= (const Vector3D &source)
 Assignment operator.
Vector3Doperator *= (double scalar)
 Multiplies each element by a scalar.
Vector3Doperator/= (double scalar)
 Divides each element by a scalar.
Vector3Doperator+= (const Vector3D &vec)
 Adds the elements of another Vector3D.
Vector3Doperator-= (const Vector3D &vec)
 Subtracts the elements of another Vector3D.
Vector3D operator- ()
 Returns a Vector3D equal to *this, but with each element negated.


Detailed Description

The Vector2D class represents a real valued 2D vector.

Definition at line 28 of file vector3D.h.


Constructor & Destructor Documentation

dlr::numeric::Vector3D::Vector3D (  )  [inline]

Default constructor initializes to (0, 0, 0).

Definition at line 33 of file vector3D.h.

Referenced by operator-().

dlr::numeric::Vector3D::Vector3D ( double  x,
double  y,
double  z 
) [inline]

Explicitly sets 3D coordinates.

Parameters:
x After construction, the vector will have this value as its X coordinate.
y After construction, the vector will have this value as its Y coordinate.
z After construction, the vector will have this value as its Z coordinate.

Definition at line 46 of file vector3D.h.

dlr::numeric::Vector3D::Vector3D ( double  x,
double  y,
double  z,
double  alpha 
) [inline]

Explicitly sets 3D homogeneous coordinates.

A 3D homogeneous vector has the form (x, y, z, alpha), and corresponds to the 3D point (x/alpha, y/alpha, z/alpha).

Parameters:
x The homogeneous X coordinate.
y The homogeneous Y coordinate.
z The homogeneous Z coordinate.
alpha Scale factor.

Definition at line 59 of file vector3D.h.

dlr::numeric::Vector3D::Vector3D ( const Vector3D source  )  [inline]

Copy constructor.

Parameters:
source The Vector3D to be copied.

Definition at line 67 of file vector3D.h.

dlr::numeric::Vector3D::~Vector3D (  )  [inline]

Destructor.

Definition at line 74 of file vector3D.h.


Member Function Documentation

void dlr::numeric::Vector3D::setValue ( double  x,
double  y,
double  z 
) [inline]

Explicitly sets 3D coordinates.

Parameters:
x The desired X coordinate.
y The desired Y coordinate.
z The desired Z coordinate.

Definition at line 83 of file vector3D.h.

Referenced by operator=(), and dlr::numeric::operator>>().

void dlr::numeric::Vector3D::setValue ( double  x,
double  y,
double  z,
double  alpha 
) [inline]

Explicitly sets 3D homogeneous coordinates.

Parameters:
x The homogeneous X coordinate.
y The homogeneous Y coordinate.
z The homogeneous Z coordinate.
alpha Scale factor.

Definition at line 95 of file vector3D.h.

double& dlr::numeric::Vector3D::x (  )  [inline]

Returns the x component of the vector by reference.

Returns:
A reference to the x component of the vector.

Definition at line 105 of file vector3D.h.

Referenced by dlr::numeric::AmanatidesWoo3D< ARRAY3D >::AmanatidesWoo3D(), dlr::numeric::angleAxisToQuaternion(), dlr::numeric::cross(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform3DTo2D::operator *(), dlr::numeric::Transform3D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), dlr::numeric::rollPitchYawToTransform3D(), and dlr::numeric::transform3DToQuaternion().

double dlr::numeric::Vector3D::x (  )  const [inline]

Returns the x component of the vector by value.

Returns:
The value of the x component of the vector.

Definition at line 112 of file vector3D.h.

double& dlr::numeric::Vector3D::y (  )  [inline]

Returns the y component of the vector by reference.

Returns:
A reference to the y component of the vector.

Definition at line 119 of file vector3D.h.

Referenced by dlr::numeric::AmanatidesWoo3D< ARRAY3D >::AmanatidesWoo3D(), dlr::numeric::angleAxisToQuaternion(), dlr::numeric::cross(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform3DTo2D::operator *(), dlr::numeric::Transform3D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), dlr::numeric::rollPitchYawToTransform3D(), and dlr::numeric::transform3DToQuaternion().

double dlr::numeric::Vector3D::y (  )  const [inline]

Returns the y component of the vector by value.

Returns:
The value of the y component of the vector.

Definition at line 126 of file vector3D.h.

double& dlr::numeric::Vector3D::z (  )  [inline]

Returns the z component of the vector by reference.

Returns:
A reference to the z component of the vector.

Definition at line 133 of file vector3D.h.

Referenced by dlr::numeric::AmanatidesWoo3D< ARRAY3D >::AmanatidesWoo3D(), dlr::numeric::angleAxisToQuaternion(), dlr::numeric::cross(), dlr::numeric::dot(), dlr::numeric::magnitudeSquared(), dlr::numeric::operator *(), dlr::numeric::Transform3DTo2D::operator *(), dlr::numeric::Transform3D::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), dlr::numeric::rollPitchYawToTransform3D(), and dlr::numeric::transform3DToQuaternion().

double dlr::numeric::Vector3D::z (  )  const [inline]

Returns the z component of the vector by value.

Returns:
The value of the z component of the vector.

Definition at line 140 of file vector3D.h.

Vector3D& dlr::numeric::Vector3D::operator= ( const Vector3D source  )  [inline]

Assignment operator.

Parameters:
source The vector to be copied.
Returns:
Reference to *this.

Definition at line 148 of file vector3D.h.

References m_x, m_y, m_z, and setValue().

Vector3D& dlr::numeric::Vector3D::operator *= ( double  scalar  )  [inline]

Multiplies each element by a scalar.

Parameters:
scalar X, Y, and Z values will be multiplied by this value.
Returns:
Reference to *this.

Definition at line 158 of file vector3D.h.

Vector3D& dlr::numeric::Vector3D::operator/= ( double  scalar  )  [inline]

Divides each element by a scalar.

Parameters:
scalar X, Y, and Z values will be divided by this value.
Returns:
Reference to *this.

Definition at line 168 of file vector3D.h.

References DLR_THROW.

Vector3D& dlr::numeric::Vector3D::operator+= ( const Vector3D vec  )  [inline]

Adds the elements of another Vector3D.

Parameters:
vec The elements of vec will be added to *this.
Returns:
Reference to *this.

Definition at line 182 of file vector3D.h.

References m_x, m_y, and m_z.

Vector3D& dlr::numeric::Vector3D::operator-= ( const Vector3D vec  )  [inline]

Subtracts the elements of another Vector3D.

Parameters:
vec The elements of vec will be subtracted from *this.
Returns:
Reference to *this.

Definition at line 192 of file vector3D.h.

References m_x, m_y, and m_z.

Vector3D dlr::numeric::Vector3D::operator- (  )  [inline]

Returns a Vector3D equal to *this, but with each element negated.

Returns:
The result of the negation.

Definition at line 201 of file vector3D.h.

References Vector3D().


The documentation for this class was generated from the following file:
Generated on Mon Jul 9 20:34:21 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2