CDXVec Overloaded Operators
The functions in this section enable you to perform mathematical operations with CDXVec class objects.
- CDXVec::operator [] ( int index )
- CDXVec::operator [] ( long index )
- CDXVec::operator [] ( USHORT index )
- CDXVec::operator [] ( DWORD index )
- CDXVec::operator =
- CDXVec::operator !=
- CDXVec::operator +
- CDXVec::operator -
- CDXVec::operator +=
- CDXVec::operator -=
- CDXVec::operator ==
- CDXVec::ZeroVector
CDXVec::operator [] ( int index )
Accesses a dimension of the structure by index.
Syntax
TYPE& operator[]( int index ) const;
Parameters
index
Integer value used to access a dimension of the structure.
Return Value
Returns a TYPE& reference.
CDXVec::operator [] ( long index )
Accesses a dimension of the structure by index.
Syntax
TYPE& operator[]( long index ) const;
Parameters
index
Long value used to access a dimension of the structure.
Return Value
Returns a TYPE& reference.
CDXVec::operator [] ( USHORT index )
Accesses a dimension of the structure by index.
Syntax
TYPE& operator[]( USHORT index ) const;
Parameters
index
USHORT value used to access a dimension of the structure.
Return Value
Returns a TYPE& reference.
CDXVec::operator [] ( DWORD index )
Accesses a dimension of the structure by index.
Syntax
TYPE& operator[]( DWORD index ) const;
Parameters
index
DWORD value used to access a dimension of the structure.
Return Value
Returns a TYPE& reference.
CDXVec::operator =
Assigns components of one vector to another vector.
Syntax
void operator=( const CDXV_C &srcVector );
Parameters
srcVector
Source vector.
Return Value
No return value.
CDXVec::operator !=
Tests for inequality of two vectors.
Syntax
BOOL operator!=( const CDXV_C &otherVector ) const;
Parameters
otherVector
Vector passed in to be tested.
Return Value
Returns TRUE if the vector objects are not equal. Returns FALSE if the vector objects are equal.
CDXVec::operator +
Adds two vectors, returning a resultant vector.
Syntax
CDXV_C operator+( const CDXV_C &v );
Parameters
v
Vector passed in to be added.
Return Value
Returns a CDXV_C result.
CDXVec::operator -
Subtracts two vectors, returning a resultant vector.
Syntax
CDXV_C operator-( const CDXV_C &v );
Parameters
v
Vector passed in to be subtracted.
Return Value
Returns a CDXV_C result.
CDXVec::operator +=
Increments a vector with another vector.
Syntax
void operator+=( const CDXV_C &vOther );
Parameters
vOther
Vector passed in to be added.
Return Value
No return value.
CDXVec::operator -=
Decrements a vector with another vector.
Syntax
void operator-=( const CDXV_C &vOther );
Parameters
vOther
Vector passed in to be subtracted.
Return Value
No return value.
CDXVec::operator ==
Tests for equality of two vectors.
Syntax
BOOL operator==( const CDXV_C &otherVector ) const;
Parameters
otherVector
Vector passed in to be tested.
Return Value
Returns TRUE if the vector objects are equal. Returns FALSE if the vector objects are not equal.
CDXVec::ZeroVector
Sets all components of a vector to zero.
Syntax
void ZeroVector( void );
Return Value
No return value.