LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::Point3< T > Class Template Reference

#include <point3d.h>

List of all members.

Public Member Functions

 Point3 (T n=0.0)
 Default Constructor.
 Point3 (T _x, T _y, T _z)
 Constructor with all three components.
 Point3 (const T n[3])
 Construct with an array of doubles.
 Point3 (const Vector3< T > &v)
 Construct from a vector, basically describing a point in a unit sphere.
T * asLWVector ()
Magnitude () const
Point3 operator* (const T d) const
Point3operator*= (const T d)
Point3operator*= (const Vector3< T > &v)
Point3 operator+ (const Vector3< T > &v) const
 Add a Vector3d.
Point3operator+= (const Vector3< T > &v)
Point3 operator- (const Vector3< T > &v) const
 Subtract a Vector3d.
Vector3< T > operator- (const Point3 &p) const
 Subtract a Point3.
Point3operator-= (const Vector3< T > &v)
Point3 operator/ (const T d) const
Point3operator/= (const T d)
Point3operator/= (const Vector3< T > &v)

Public Attributes

double x
double y
double z
 Storage for the vector components, uses &x for LW compatibility.

Related Functions

(Note that these are not member functions.)

template<typename T >
Distance (const Point3< T > &p1, const Point3< T > &p2)

Detailed Description

template<typename T>
class lwpp::Point3< T >

A Point3 describes a location in 3D space as denoted by x,y,z


Constructor & Destructor Documentation

template<typename T>
lwpp::Point3< T >::Point3 ( n = 0.0)
inlineexplicit

Default Constructor.

Parameters:
nvalue to set all components to.
template<typename T>
lwpp::Point3< T >::Point3 ( _x,
_y,
_z 
)
inline

Constructor with all three components.

Parameters:
_xfirst component
_ysecond component
_zthird component
template<typename T>
lwpp::Point3< T >::Point3 ( const T  n[3])
inline

Construct with an array of doubles.

Parameters:
narray of 3 doubles to initialize to.
template<typename T>
lwpp::Point3< T >::Point3 ( const Vector3< T > &  v)
inlineexplicit

Construct from a vector, basically describing a point in a unit sphere.


Member Function Documentation

template<typename T>
T* lwpp::Point3< T >::asLWVector ( )
inline
template<typename T>
T lwpp::Point3< T >::Magnitude ( ) const
inline
template<typename T>
Point3 lwpp::Point3< T >::operator* ( const T  d) const
inline
template<typename T>
Point3& lwpp::Point3< T >::operator*= ( const T  d)
inline
template<typename T>
Point3& lwpp::Point3< T >::operator*= ( const Vector3< T > &  v)
inline
template<typename T>
Point3 lwpp::Point3< T >::operator+ ( const Vector3< T > &  v) const
inline

Add a Vector3d.

template<typename T>
Point3& lwpp::Point3< T >::operator+= ( const Vector3< T > &  v)
inline
template<typename T>
Point3 lwpp::Point3< T >::operator- ( const Vector3< T > &  v) const
inline

Subtract a Vector3d.

template<typename T>
Vector3<T> lwpp::Point3< T >::operator- ( const Point3< T > &  p) const
inline

Subtract a Point3.

template<typename T>
Point3& lwpp::Point3< T >::operator-= ( const Vector3< T > &  v)
inline
template<typename T>
Point3 lwpp::Point3< T >::operator/ ( const T  d) const
inline
template<typename T>
Point3& lwpp::Point3< T >::operator/= ( const T  d)
inline
template<typename T>
Point3& lwpp::Point3< T >::operator/= ( const Vector3< T > &  v)
inline

Friends And Related Function Documentation

template<typename T >
T Distance ( const Point3< T > &  p1,
const Point3< T > &  p2 
)
related

Compute the distance between two points


Member Data Documentation

template<typename T>
double lwpp::Point3< T >::x
template<typename T>
double lwpp::Point3< T >::y
template<typename T>
double lwpp::Point3< T >::z

Storage for the vector components, uses &x for LW compatibility.


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