RTFX  0.3
Real time special effects collaborative visualization and production library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
RTFX::Point3D Class Reference

A 3D point object. More...

#include <algebra.hpp>

Public Member Functions

 Point3D ()
 
 Point3D (double _other[3])
 
 Point3D (double _x, double _y, double _z)
 
 Point3D (const Point3D &_other)
 
Point3Doperator= (const Point3D &_other)
 
Point3Doperator= (const double _other[3])
 
bool operator== (const Point3D _other)
 
Point3Doperator= (const int _other[2])
 
double length2 () const
 
double length () const
 
double & operator[] (size_t _idx)
 
double operator[] (size_t _idx) const
 
double dot (const Point3D &_other) const
 
double * data ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &_ar, const unsigned int _version)
 

Private Attributes

double v [3]
 

Friends

class boost::serialization::access
 

Detailed Description

A 3D point object.

Constructor & Destructor Documentation

RTFX::Point3D::Point3D ( )
inline

The base constructor

RTFX::Point3D::Point3D ( double  _other[3])
inline

Construct Point3D from array size 3 of values

RTFX::Point3D::Point3D ( double  _x,
double  _y,
double  _z 
)
inline

Construct Point3D from three double values

RTFX::Point3D::Point3D ( const Point3D _other)
inline

Copy constructor

Member Function Documentation

double* RTFX::Point3D::data ( )
inline

Return a pointer to the data

double RTFX::Point3D::dot ( const Point3D _other) const
inline

Compute the dot product of this Point3D and the input Point3D. Returns a double value.

double RTFX::Point3D::length ( ) const
inline

Return this points distance from the origin

double RTFX::Point3D::length2 ( ) const
inline

Return this points squared distance from the origin

Point3D& RTFX::Point3D::operator= ( const Point3D _other)
inline

Equals operator sets this point to equal the other point

Point3D& RTFX::Point3D::operator= ( const double  _other[3])
inline

Equals operator sets this point to have the values contained in the array

Point3D& RTFX::Point3D::operator= ( const int  _other[2])
inline

Operator = sets this point to have the values in the integer array of size 2. The z component is set to 0

bool RTFX::Point3D::operator== ( const Point3D  _other)
inline

Operator == checks if this point is equal to another

double& RTFX::Point3D::operator[] ( size_t  _idx)
inline

Access the points values using the array []. Assumption: idx is a valid index.

double RTFX::Point3D::operator[] ( size_t  _idx) const
inline

Access the points values using the array []. Assumption: idx is a valid index.


The documentation for this class was generated from the following file: