Main Page   Groups   Namespaces  

mini3d::point3d Class Reference
[Core]

point3d - A 3D point class, derived from array<double, 3> More...

Inheritance diagram for mini3d::point3d:

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

Public Member Functions

 point3d ()
 A default constructor.
 point3d (const array<double, 3>& src)
 A copy constructor from base class.
 point3d (const vector3d& src)
 A copy constructor from vector3d.
 point3d (const point3d& src)
 A copy constructor.
 point3d (double v[3])
 A constructor.
 point3d (double vx, double vy, double vz)
 A constructor.
virtual ~point3d ()
 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).
point3d operator+ (const vector3d& v) const
 Find point with the offset vector.
vector3d operator- (const point3d& rhs) const
 Find vector between two points.
point3doperator= (const array<double, 3>& src)
 Copy from the base class.

Static Public Attributes

static const point3d _zero_point

Detailed Description

point3d - A 3D point class, derived from array<double, 3>


Constructor & Destructor Documentation

mini3d::point3d::point3d (  ) 
 

A default constructor.

The vector will set as [0 0 0].

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

A copy constructor from base class.

Parameters:
src the source vector to copy from.

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

A copy constructor from vector3d.

Parameters:
src the vector3d to copy from.

mini3d::point3d::point3d ( const point3d src  ) 
 

A copy constructor.

Parameters:
src the source vector to copy from.

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

A constructor.

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

Parameters:
v a double point array

mini3d::point3d::point3d ( 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::point3d::~point3d (  )  [virtual]
 

A destructor.


Member Function Documentation

array3d mini3d::point3d::data (  )  const
 

Get the data as a double array.

Returns:
a double array3d

array3d mini3d::point3d::dataGL (  )  const
 

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

Returns:
a double array3d

point3d mini3d::point3d::operator+ ( const vector3d v  )  const
 

Find point with the offset vector.

Parameters:
v the vector to add to.
Returns:
point this + v.

vector3d mini3d::point3d::operator- ( const point3d rhs  )  const
 

Find vector between two points.

Parameters:
rhs the point to subtract from.
Returns:
vector from rhs to this.

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

Copy from the base class.

Parameters:
src the vector to copy from
Returns:
itself


Member Data Documentation

const point3d mini3d::point3d::_zero_point [static]
 


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