FBVector2< tType > Class Template Reference
 
 
 
FBVector2< tType > Class Template Reference

#include <fbtypes.h>


Class Description

template<class tType>
class FBVector2< tType >

Two dimensional vector (template).

Definition at line 88 of file fbtypes.h.

Public Member Functions

  FBVector2 ()
  Constructor.
  FBVector2 (const FBVector2 &pVector)
  Copy Constructor.
  FBVector2 (tType *pValue)
  Constructor from array.
  FBVector2 (tType p1, tType p2)
  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 FBVector2 operator= (const FBVector2 &pVector)
  Overloaded equal operator.
bool  operator!= (const FBVector2 &pVector)
  not equal operator.
bool  operator== (const FBVector2 &pVector)
  equal operator.

Public Attributes

tType  mValue [2]
  Values.

Constructor & Destructor Documentation

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

Constructor.

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

Copy Constructor.

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

Constructor from array.

Parameters:
pValue Array to take values from.
template<class tType >
FBVector2< tType >::FBVector2 ( tType  p1,
tType  p2 
)

Constructor.

Parameters:
p1 First element
p2 Second element.

Member Function Documentation

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

Initialization function.

Clear vector.

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

Overloaded [] operator.

Parameters:
pIndex Element to access.
Returns:
Element at pIndex.
template<class tType >
void FBVector2< tType >::Set ( tType *  pValue )

Set vector from an array.

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

Overloaded cast to array.

Returns:
Array of items of tType.
template<class tType >
const FBVector2& FBVector2< tType >::operator= ( const FBVector2< tType > &  pVector )

Overloaded equal operator.

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

not equal operator.

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

equal operator.

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

Member Data Documentation

template<class tType >
tType FBVector2< tType >::mValue[2]

Values.

Definition at line 92 of file fbtypes.h.


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