FBVector3< tType > Class Template Reference
 
 
 
FBVector3< tType > Class Template Reference

#include <fbtypes.h>


Class Description

template<class tType>
class FBVector3< tType >

Three dimensional vector (template).

Definition at line 154 of file fbtypes.h.

Public Member Functions

  FBVector3 ()
  Constructor.
  FBVector3 (const FBVector3 &pVector)
  Copy Constructor.
  FBVector3 (tType *pValue)
  Constructor from array.
  FBVector3 (tType p1, tType p2, tType p3=0)
  Constructor.
void  Init ()
  Initialization function.
tType &  operator[] (int pIndex)
  Overloaded [] operator.
void  Set (tType *pValue)
  Set vector from an array.
  operator tType * () const
  Overloaded cast to array.
const FBVector3 operator= (const FBVector3 &pVector)
  Overloaded equal operator.
bool  operator!= (const FBVector3 &pVector)
  not equal operator.
bool  operator== (const FBVector3 &pVector)
  equal operator.

Public Attributes

tType  mValue [3]
  Values.

Constructor & Destructor Documentation

template<class tType>
FBVector3< tType >::FBVector3 ( )

Constructor.

template<class tType>
FBVector3< tType >::FBVector3 ( const FBVector3< tType > &  pVector )

Copy Constructor.

template<class tType>
FBVector3< tType >::FBVector3 ( tType *  pValue )

Constructor from array.

Parameters:
pValue Array to take values from.
template<class tType>
FBVector3< tType >::FBVector3 ( tType  p1,
tType  p2,
tType  p3 = 0 
)

Constructor.

Parameters:
p1 First element
p2 Second element.
p3 Third element(default=0).

Member Function Documentation

template<class tType>
void FBVector3< tType >::Init ( )

Initialization function.

Clear vector.

Reimplemented in FBSVector.

template<class tType>
tType& FBVector3< tType >::operator[] ( int  pIndex )

Overloaded [] operator.

Parameters:
pIndex Element to access.
Returns:
Element at pIndex.

Reimplemented in FBColor.

template<class tType>
void FBVector3< tType >::Set ( tType *  pValue )

Set vector from an array.

Parameters:
pValue Array to copy value from.
template<class tType>
FBVector3< tType >::operator tType * ( ) const

Overloaded cast to array.

Returns:
Array of items of tType.

Reimplemented in FBColor.

template<class tType>
const FBVector3& FBVector3< tType >::operator= ( const FBVector3< tType > &  pVector )

Overloaded equal operator.

Parameters:
pVector Vector to copy.
Returns:
this vector as a const.
template<class tType>
bool FBVector3< tType >::operator!= ( const FBVector3< tType > &  pVector )

not equal operator.

Parameters:
pVector Vector to compare.
Returns:
true if not equal.
template<class tType>
bool FBVector3< tType >::operator== ( const FBVector3< tType > &  pVector )

equal operator.

Parameters:
pVector Vector to compare.
Returns:
true if equal.

Member Data Documentation

template<class tType>
tType FBVector3< tType >::mValue[3]

Values.

Definition at line 158 of file fbtypes.h.


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