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

#include <vector3d.h>

+ Inheritance diagram for lwpp::Vector3< T >:
+ Collaboration diagram for lwpp::Vector3< T >:

List of all members.

Public Member Functions

 Vector3 (T n=0.0)
 Default Constructor.
 Vector3 (T _x, T _y, T _z)
 Constructor with all three components.
 Vector3 (const T n[3])
 Construct with an array of doubles.
 Vector3 (const Point3< T > &p)
 Vector3 (T theta, T phi)
 Construct from radial angles.
void Abs ()
T * asLWVector ()
Vector3 Cross (Vector3 a) const
Dot (Vector3 a) const
 Get the Dot product.
Magnitude () const
 Return the Length/Magnitude of the Vector3.
Vector3Normalize ()
 Normalize the Vector3.
Vector3 operator* (Vector3 b)
Vector3 operator* (double b)
Vector3operator*= (Vector3 b)
Vector3operator*= (T b)
Vector3 operator+ (Vector3 b)
 Add a Vector3.
Vector3operator+= (Vector3 b)
Vector3 operator- (Vector3 b)
 Subtract a Vector3.
Vector3operator-= (Vector3 b)
 Subtract a Vector3.
Vector3 operator/ (Vector3 b)
Vector3 operator/ (T b)
Vector3operator/= (Vector3 b)
Vector3operator/= (T b)
SphericalPhi ()
SphericalTheta ()
void Translate (Vector3 dir, T distance)
T & X ()
T & Y ()
T & Z ()

Public Attributes

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

Detailed Description

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

Base Class for Vector, will later on be a template, currently uses doubles only


Constructor & Destructor Documentation

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

Default Constructor.

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

Constructor with all three components.

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

Construct with an array of doubles.

Parameters:
narray of 3 doubles to initialize to.
template<typename T>
lwpp::Vector3< T >::Vector3 ( const Point3< T > &  p)
inlineexplicit
template<typename T>
lwpp::Vector3< T >::Vector3 ( theta,
phi 
)
inline

Construct from radial angles.


Member Function Documentation

template<typename T>
void lwpp::Vector3< T >::Abs ( )
inline
template<typename T>
T* lwpp::Vector3< T >::asLWVector ( )
inline
template<typename T >
Vector3< T > lwpp::Vector3< T >::Cross ( Vector3< T >  a) const
inline
template<typename T >
T lwpp::Vector3< T >::Dot ( Vector3< T >  a) const
inline

Get the Dot product.

template<typename T>
T lwpp::Vector3< T >::Magnitude ( ) const
inline

Return the Length/Magnitude of the Vector3.

template<typename T >
Vector3< T > & lwpp::Vector3< T >::Normalize ( )
inline

Normalize the Vector3.

template<typename T>
Vector3 lwpp::Vector3< T >::operator* ( Vector3< T >  b)
inline
template<typename T>
Vector3 lwpp::Vector3< T >::operator* ( double  b)
inline
template<typename T>
Vector3& lwpp::Vector3< T >::operator*= ( Vector3< T >  b)
inline
template<typename T>
Vector3& lwpp::Vector3< T >::operator*= ( b)
inline
template<typename T>
Vector3 lwpp::Vector3< T >::operator+ ( Vector3< T >  b)
inline

Add a Vector3.

template<typename T>
Vector3& lwpp::Vector3< T >::operator+= ( Vector3< T >  b)
inline

operator /// Add a Vector3

template<typename T>
Vector3 lwpp::Vector3< T >::operator- ( Vector3< T >  b)
inline

Subtract a Vector3.

template<typename T>
Vector3& lwpp::Vector3< T >::operator-= ( Vector3< T >  b)
inline

Subtract a Vector3.

template<typename T>
Vector3 lwpp::Vector3< T >::operator/ ( Vector3< T >  b)
inline
template<typename T>
Vector3 lwpp::Vector3< T >::operator/ ( b)
inline
template<typename T>
Vector3& lwpp::Vector3< T >::operator/= ( Vector3< T >  b)
inline
template<typename T>
Vector3& lwpp::Vector3< T >::operator/= ( b)
inline
template<typename T>
T lwpp::Vector3< T >::SphericalPhi ( )
inline
template<typename T>
T lwpp::Vector3< T >::SphericalTheta ( )
inline
template<typename T>
void lwpp::Vector3< T >::Translate ( Vector3< T >  dir,
distance 
)
inline
template<typename T>
T& lwpp::Vector3< T >::X ( )
inline
template<typename T>
T& lwpp::Vector3< T >::Y ( )
inline
template<typename T>
T& lwpp::Vector3< T >::Z ( )
inline

Member Data Documentation

template<typename T>
T lwpp::Vector3< T >::x
template<typename T>
T lwpp::Vector3< T >::y
template<typename T>
T lwpp::Vector3< T >::z

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


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