Open Reality Reference Guide
 
Loading...
Searching...
No Matches
FBVector2< tType > Class Template Reference

Two dimensional vector (template). More...

#include <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 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.
 

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]

template<class tType >
FBVector2 ( )

Constructor.

◆ FBVector2() [2/4]

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

Copy Constructor.

◆ FBVector2() [3/4]

template<class tType >
FBVector2 ( tType *  pValue)

Constructor from array.

Parameters
pValueArray to take values from.

◆ FBVector2() [4/4]

template<class tType >
FBVector2 ( tType  p1,
tType  p2 
)

Constructor.

Parameters
p1First element
p2Second element.

Member Function Documentation

◆ Init()

template<class tType >
void Init ( )

Initialization function.

Clear vector.

◆ operator tType *()

template<class tType >
operator tType * ( ) const

Overloaded cast to array.

Returns
Array of items of tType.

◆ operator!=()

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

not equal operator.

Parameters
pVectorVector to compare.
Returns
true if not equal.

◆ operator=()

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

Overloaded equal operator.

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

◆ operator==()

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

equal operator.

Parameters
pVectorVector to compare.
Returns
true if equal.

◆ operator[]()

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

Overloaded [] operator.

Parameters
pIndexElement to access.
Returns
Element at pIndex.

◆ Set()

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

Set vector from an array.

Parameters
pValueArray to copy value from.

Member Data Documentation

◆ mValue

template<class tType >
tType mValue[2]

Values.

Definition at line 92 of file fbtypes.h.


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