CVector4 Class Reference
Inheritance diagram for CVector4:

Collaboration diagram for CVector4:

Detailed Description
CVector4.Equality functions/operators | |
| bool | operator== (const CVector4 &other) const |
| Return TRUE if the coordinates of the two vectors are equal. | |
| bool | operator!= (const CVector4 &other) const |
| Return TRUE if one of the coordinates of the two vectors is different. | |
| bool | NullVector () const |
| Return TRUE if the vector is null. | |
Cast operators | |
| operator CPoint () const | |
| Convert the vector into a point (by rounding and returning x and y). | |
| operator FCoord () const | |
| Convert the vector into its squared length. | |
Functions/binary-operators that return Vector | |
| CVector4 | operator+ (const CVector4 &size) const |
| Add the two vectors. | |
| CVector4 | operator- (const CVector4 &size) const |
| Subtract the two vectors. | |
| CVector4 | operator * (const FCoord &lambda) const |
| Multiply the vector by a given scalar. | |
| CVector4 | operator% (const CVector4 &vec) const |
| Calculate the vector product of the two vectors. | |
| CVector4 | operator- () const |
| Inverse the vector. | |
| CVector4 | Normalized () |
| Normalize the vector (and assign its squared length to N). | |
Functions/binary-operators that return FCoord | |
| FCoord | operator * (const CVector4 &vec) const |
| Calculate the dot product of the two vectors. | |
| FCoord | Norme () |
| Affect the squared length of the vector to N and return it. | |
Serialization | |
| CArchive & | operator<< (CArchive &ar, const CVector4 &pt) |
| Write the vector into the archive. | |
| CArchive & | operator>> (CArchive &ar, CVector4 &pt) |
| Read the vector from the archive. | |
Public Member Functions | |
| CVector4 () | |
| Create an uninitialized vector. | |
| CVector4 (FCoord _x, FCoord _y, FCoord _z, FCoord _w=1) | |
| Create a vector from 3 (or 4) coordinates. | |
| CVector4 (const CVector4 far &point) | |
| Create a vector from another vector. | |
| void | operator= (const CVector4 &other) |
| Assign the source vector to this one. | |
Public Attributes | |
| FCoord | x |
| X-coordinate of the vector. | |
| FCoord | y |
| Y-coordinate of the vector. | |
| FCoord | z |
| Z-coordinate of the vector. | |
| FCoord | w |
| W-coordinate of the vector. | |
| FCoord | N |
| Squared length of the vector. | |
Protected Member Functions | |
| int | round (FCoord x) const |
| Return the nearest integer of the scalar. | |
Constructor & Destructor Documentation
Create a vector from 3 (or 4) coordinates.
Member Function Documentation
| bool operator== | ( | const CVector4 & | other | ) | const [inline] |
Return TRUE if the coordinates of the two vectors are equal.
| bool operator!= | ( | const CVector4 & | other | ) | const [inline] |
Return TRUE if one of the coordinates of the two vectors is different.
| bool NullVector | ( | ) | const [inline] |
Return TRUE if the vector is null.
| operator CPoint | ( | ) | const [inline] |
Convert the vector into a point (by rounding and returning x and y).
Calculate the vector product of the two vectors.
Calculate the dot product of the two vectors.
| int round | ( | FCoord | x | ) | const [inline, protected] |
Return the nearest integer of the scalar.
Friends And Related Function Documentation
| CArchive& operator<< | ( | CArchive & | ar, | |
| const CVector4 & | pt | |||
| ) | [friend] |
Write the vector into the archive.
Member Data Documentation



