Open Reality Reference Guide
FBVector2< tType > Class Template Reference

Two dimensional vector (template). More...

#include <fbtypes.h>

Public Member Functions

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

Public Attributes

tType mValue [2]
 Values. More...
 

Detailed Description

template<class tType>
class FBVector2< tType >

Two dimensional vector (template).

Definition at line 88 of file fbtypes.h.

Constructor & Destructor Documentation

◆ FBVector2() [1/4]

FBVector2 ( )

Constructor.

◆ FBVector2() [2/4]

FBVector2 ( const FBVector2< tType > &  pVector)

Copy Constructor.

◆ FBVector2() [3/4]

FBVector2 ( tType *  pValue)

Constructor from array.

Parameters
pValueArray to take values from.

◆ FBVector2() [4/4]

FBVector2 ( tType  p1,
tType  p2 
)

Constructor.

Parameters
p1First element
p2Second element.

Member Function Documentation

◆ Init()

void Init ( )

Initialization function.

Clear vector.

◆ operator tType *()

operator tType * ( ) const

Overloaded cast to array.

Returns
Array of items of tType.

◆ operator!=()

bool operator!= ( const FBVector2< tType > &  pVector)

not equal operator.

Parameters
pVectorVector to compare.
Returns
true if not equal.

◆ operator=()

const FBVector2& operator= ( const FBVector2< tType > &  pVector)

Overloaded equal operator.

Parameters
pVectorVector to copy.
Returns
this vector as a const.

◆ operator==()

bool operator== ( const FBVector2< tType > &  pVector)

equal operator.

Parameters
pVectorVector to compare.
Returns
true if equal.

◆ operator[]()

tType& operator[] ( int  pIndex)

Overloaded [] operator.

Parameters
pIndexElement to access.
Returns
Element at pIndex.

◆ Set()

void Set ( tType *  pValue)

Set vector from an array.

Parameters
pValueArray to copy value from.

Member Data Documentation

◆ mValue

tType mValue[2]

Values.

Definition at line 92 of file fbtypes.h.


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