Main Page   Groups   Namespaces  

mini3d::vector3d Class Reference
[Core]

vector3d - A 3D vector class, derived from array<double, 3> More...

Inheritance diagram for mini3d::vector3d:

mini3d::array< double, 3 > List of all members.

Public Member Functions

 vector3d ()
 A default constructor.
 vector3d (const array<double, 3>& src)
 A copy constructor from base class.
 vector3d (const vector3d& src)
 A copy constructor.
 vector3d (double v[3])
 A constructor.
 vector3d (double vx, double vy, double vz)
 A constructor.
virtual ~vector3d ()
 A destructor.
array3d data () const
 Get the data as a double array.
array3d dataGL () const
 Get the data as a double array (for OpenGL rendering).
double operator* (const vector3d& rhs) const
 Get the dot product.
vector3d operator^ (const vector3d& rhs) const
 Get the cross product.
vector3doperator= (const array<double, 3>& src)
 Copy from the base class.
double angle (const vector3d& rhs) const
 Angle make with two vectors in radian ( 0 <= opAngle <= PI ).

Static Public Attributes

static const vector3d _zero_vector

Detailed Description

vector3d - A 3D vector class, derived from array<double, 3>


Constructor & Destructor Documentation

mini3d::vector3d::vector3d (  ) 
 

A default constructor.

The vector will set as [0 0 0].

mini3d::vector3d::vector3d ( const array<double, 3>&  src  ) 
 

A copy constructor from base class.

Parameters:
src the source vector to copy from.

mini3d::vector3d::vector3d ( const vector3d src  ) 
 

A copy constructor.

Parameters:
src the source vector to copy from.

mini3d::vector3d::vector3d ( double  v[3]  ) 
 

A constructor.

The vector will set as [v[0] v[1] v[2]].

Parameters:
v a double point array

mini3d::vector3d::vector3d ( double  vx,
double  vy,
double  vz
 

A constructor.

The vector will set as [vx vy vz].

Parameters:
vx the x component
vy the y component
vz the z component

virtual mini3d::vector3d::~vector3d (  )  [virtual]
 

A destructor.


Member Function Documentation

double mini3d::vector3d::angle ( const vector3d rhs  )  const
 

Angle make with two vectors in radian ( 0 <= opAngle <= PI ).

Parameters:
rhs the vector to make angle with.
Returns:
the angle in radian

array3d mini3d::vector3d::data (  )  const
 

Get the data as a double array.

Returns:
a double array3d

array3d mini3d::vector3d::dataGL (  )  const
 

Get the data as a double array (for OpenGL rendering).

Returns:
a double array3d

double mini3d::vector3d::operator* ( const vector3d rhs  )  const
 

Get the dot product.

Parameters:
rhs the vector to dot with
Returns:
the dot product

vector3d& mini3d::vector3d::operator= ( const array<double, 3>&  src  ) 
 

Copy from the base class.

Parameters:
src the vector to copy from
Returns:
itself

vector3d mini3d::vector3d::operator^ ( const vector3d rhs  )  const
 

Get the cross product.

Parameters:
rhs the vector to cross with.
Returns:
the cross vector


Member Data Documentation

const vector3d mini3d::vector3d::_zero_vector [static]
 


The documentation for this class was generated from the following file:
Generated for libmini3d by Doxygen 1.4.4 © 1997-2001