Public Member Functions | Public Attributes

FBVector2< tType > Class Template Reference

Search for all occurrences

Detailed Description

template<class tType>
class FBVector2< tType >

Two dimensional vector (template).

Definition at line 88 of file fbtypes.h.

#include <fbtypes.h>

List of all members.

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 FBVector2operator= (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

FBVector2 ( )

Constructor.

FBVector2 ( const FBVector2< tType > &  pVector)

Copy Constructor.

FBVector2 ( tType *  pValue)

Constructor from array.

Parameters:
pValueArray to take values from.
FBVector2 ( tType  p1,
tType  p2 
)

Constructor.

Parameters:
p1First element
p2Second element.

Member Function Documentation

void Init ( )

Initialization function.

Clear vector.

tType& operator[] ( int  pIndex)

Overloaded [] operator.

Parameters:
pIndexElement to access.
Returns:
Element at pIndex.
void Set ( tType *  pValue)

Set vector from an array.

Parameters:
pValueArray to copy value from.
operator tType * ( ) const

Overloaded cast to array.

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

Overloaded equal operator.

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

not equal operator.

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

equal operator.

Parameters:
pVectorVector to compare.
Returns:
true if equal.

Member Data Documentation

tType mValue[2]

Values.

Definition at line 92 of file fbtypes.h.


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