#include <SIBCVector.h>
Public Member Functions |
|
| CSIBCVector3D () | |
| CSIBCVector3D (const CSIBCVector3D &i_vVector) | |
| CSIBCVector3D (const SI_Float i_fX, const SI_Float i_fY, const SI_Float i_fZ) | |
| SI_Bool | IsAlmostEqualTo (const CSIBCVector3D &i_vVector, const SI_Float i_fEpsilon) |
| SI_Bool | IsOrthogonalTo (const CSIBCVector3D &i_vVector) |
| SI_Bool | IsNull () const |
| SI_Float | GetDot (const CSIBCVector3D &i_vVector) const |
| SI_Float | GetDistanceFrom (const CSIBCVector3D &i_vVector) const |
| SI_Float | GetLength () const |
| SI_Float | GetSquaredLength () const |
| SI_Float | GetMaxComponent (SI_Int *o_nIndex) const |
| SI_Float | GetMinComponent (SI_Int *o_nIndex) const |
| void | Get (SI_Float *o_fX, SI_Float *o_fY, SI_Float *o_fZ) const |
| SI_Float | GetX () const |
| SI_Float | GetY () const |
| SI_Float | GetZ () const |
| SI_Float | GetW () const |
| CSIBCVector3D & | Set (SI_Float i_fX, SI_Float i_fY, SI_Float i_fZ) |
| CSIBCVector3D & | Normalize () |
| CSIBCVector3D & | SetNull () |
| CSIBCVector3D & | SetLength (const SI_Float i_fLength) |
| CSIBCVector3D & | SetCross (const CSIBCVector3D &i_vVector) |
| CSIBCVector3D & | Negate () |
| CSIBCVector3D & | Add (const CSIBCVector3D &i_vVector) |
| CSIBCVector3D & | Sub (const CSIBCVector3D &i_vVector) |
| CSIBCVector3D & | Scale (const SI_Float i_fScale) |
| CSIBCVector3D & | Scale (CSIBCVector3D &o_vDest, const SI_Float i_fScale) |
| CSIBCVector3D & | MulComp (const CSIBCVector3D &i_vVector) |
| CSIBCVector3D & | DivComp (const CSIBCVector3D &i_vVector) |
| CSIBCVector3D | CrossProduct (const CSIBCVector3D &i_vVector) const |
| void | ScaleAndAdd (CSIBCVector3D &io_vDest, const SI_Float i_fScale) |
| SI_Bool | operator== (const CSIBCVector3D &i_vVector) const |
| SI_Bool | operator!= (const CSIBCVector3D &i_vVector) const |
| CSIBCVector3D | operator+ (const CSIBCVector3D &i_vVector) const |
| CSIBCVector3D | operator+ (const SI_Float &i_fFloat) const |
| CSIBCVector3D | operator- (const CSIBCVector3D &i_vVector) const |
| CSIBCVector3D | operator- (const SI_Float &i_fFloat) const |
| CSIBCVector3D | operator/ (const CSIBCVector3D &i_vVector) const |
| CSIBCVector3D | operator * (const SI_Float i_fFloat) const |
| void | Dump () |
Public Attributes |
|
| float | m_fX |
| float | m_fY |
| float | m_fZ |
Representation of a 3D vector, defining operations to access, modify and perform calculations on 2D vectors. This class uses single precision floating-point numbers for represent its data, and in its operations. There are seperate similar classes for 2D and 4D vectors, CSIBCVector2D and CSIBCVector4D, respectively, which also use single precision.
Furthermore, there is another set of vector classes which use double precision floating-point numbers, CSIBCVector2Dd, CSIBCVector3Dd and CSIBCVector4Dd for 2D, 3D and 4D vectors respectively. Quaternions represented as 4D vectors are also available in CSIBCQuaternion and CSIBCQuaterniond with single precision and double precision, repspectively.
| CSIBCVector3D | ( | ) | [inline] |
Default constructor. Sets the values of each component of this vector to zero.
| CSIBCVector3D | ( | const CSIBCVector3D & | i_vVector | ) | [inline] |
Copy constructor. Sets the new vector's component values to be the same as i_vVector.
| i_vVector | Vector to use for new vector's component values. |
| CSIBCVector3D | ( | const SI_Float | i_fX, | |
| const SI_Float | i_fY, | |||
| const SI_Float | i_fZ | |||
| ) | [inline] |
Constructor. Sets the new vector to have i_fX, i_fY and i_fZ for its X, Y and Z components, respectively.
| i_fX | The value for the X component of the new vector. | |
| i_fY | The value for the Y component of the new vector. | |
| i_fZ | The value for the Z component of the new vector. |
| SI_Bool IsAlmostEqualTo | ( | const CSIBCVector3D & | i_vVector, | |
| const SI_Float | i_fEpsilon | |||
| ) | [inline] |
Determines whether this vector and i_vVector are equal to each other, within a threshhold value given by i_fEpsilon.
| i_vVector | Vector to compare equality with. | |
| i_fEpsilon | Error range for floating-point comparison. |
Determines whether this vector and i_vVector are orthogonal (at 90 degrees to each other). This function uses a floating-point comparison error of PICO_EPS.
| i_vVector | The vector to compare orthogonality with. |
Determines whether the all components of this vector are zero. This function uses a floating-point comparison error of PICO_EPS.
Computes the dot product between this vector and i_vVector.
| i_vVector | Vector to dot-product with this vector. |
Returns the distance between this vector and i_vVector.
| i_vVector | Vector to determine distance from. |
i_vVector. Returns the length of this vector.
Returns the squared length of this vector.
Returns the value and index of the maximum component of this vector.
| o_nIndex | Pointer to an SI_Int to hold the value of the index that had the maximum component (0 == X, 1 == Y, 2 == Z). |
Returns the value and index of the minimum component of this vector.
| o_nIndex | Pointer to an SI_Int to hold the value of the index that had the maximum component (0 == X, 1 == Y, 2 == Z). |
Gets the values of the vector components.
| o_fX | Pointer to an SI_Float to receive the value of the X component. | |
| o_fY | Pointer to an SI_Float to receive the value of the Y component. | |
| o_fZ | Pointer to an SI_Float to receive the value of the Z component. |
Gets the X component of this vector.
Gets the Y component of this vector.
Gets the Z component of this vector.
Gets the W component of this vector. This function is used for compatibility with CSIBCVector4D objects, and always returns 1.0f.
Sets the values of the X, Y and Z components of this vector.
| i_fX | The new value for the X component of this vector. | |
| i_fY | The new value for the Y component of this vector. | |
| i_fZ | The new value for the Z component of this vector. |
Normalizes the vector to a length of one. If the vector is null, then it is initialized to (1.0f, 0.0f, 0.0f).
Sets this vector to null. (Components equal 0.0f).
Sets the length of this vector to be i_fLength. If the vector is null (See CSIBCVector3D::IsNull), then the vector is unchanged.
| i_fLength | New length of the vector. |
Sets this vector to be the cross product of this vector and i_vVector.
| i_vVector | The vector to cross this vector with. |
Sets all the components of this vector to be the negatives of their current values.
Adds this vector to i_vVector, and stores the result in this vector.
| i_vVector | The vector to add to this vector. |
Subtracts i_vVector from this vector, and stores the result in this vector.
| i_vVector | The vector to subtract from this vector. |
Scales all components of this vector by i_fScale.
| i_fScale | The amount to scale each of the components of this vector by. |
| CSIBCVector3D & Scale | ( | CSIBCVector3D & | o_vDest, | |
| const SI_Float | i_fScale | |||
| ) | [inline] |
Scales all components of this vector by i_fScale, and stores the result in o_vDest.
| o_vDest | Vector to receive the scaled vector. | |
| i_fScale | The amount to scale each component of this vector. |
Multiplies each component in this vector by its corresponding component in i_vVector. The result is stored in this vector.
| i_vVector | Vector to multiply components with this vector. |
Divides each component in this vector by its corresponding component in i_vVector. The result is stored in this vector.
| i_vVector | Vector to divide components with this vector. |
Computes the cross product between this vector and i_vVector. The operation is as follows: Vout = Vthis x Vin.
| i_vVector | Vector to find the cross product with. |
Scales the components of this vector by i_fScale, and add the result to the io_vDest vector. The result is stored in io_vDest.
| io_vDest | Vector to add to this scale vector. Holds the results of this operation. | |
| i_fScale | The amount to scale each component of this vector (before addition). |
Determines whether this vector and i_vVector are equal. Note that this function does not use any floating-point comparison error, thus the two vectors must be exactly the same.
| i_vVector | Vector to compare equality with. |
Determines whether this vector and i_vVector are not-equal. Note that this function does not use any floating-point comparison error, thus the two vectors must be exactly the same for a FALSE return value.
| i_vVector | Vector to compare inequality with. |
Computes the vector addition between this vector and i_vVector.
| i_vVector | The vector to add this vector with. |
CSIBCVector3D::operator+(const SI_Float&)
CSIBCVector3D::operator-(const CSIBCVector3D&)
CSIBCVector3D::operator-(const SI_Float&)
| CSIBCVector3D operator+ | ( | const SI_Float & | i_fFloat | ) | const [inline] |
Computes the vector resulting from adding a constant value, i_fFloat, to each component of this vector.
| i_fFloat | The amount to add to each component of this vector. |
CSIBCVector3D::operator+(const CSIBCVector3D&)
CSIBCVector3D::operator-(const CSIBCVector3D&)
CSIBCVector3D::operator-(const SI_Float&)
Computes the vector subtraction of i_vVector from this vector.
| i_vVector | The vector to subtract from this vector. |
CSIBCVector3D::operator-(const SI_Float&)
CSIBCVector3D::operator+(const CSIBCVector3D &)
CSIBCVector3D::operator+(const SI_Float&)
| CSIBCVector3D operator- | ( | const SI_Float & | i_fFloat | ) | const [inline] |
Computes the vector resulting from subtracting a constant value, i_fFloat, from each component of this vector.
| i_fFloat | The amount to subtract from each component of this vector. |
CSIBCVector3D::operator-(const CSIBCVector3D&)
CSIBCVector3D::operator+(const SI_Float&)
CSIBCVector3D::operator+(const CSIBCVector3D&)
Divides each component in this vector by its corresponding component in i_vVector.
| i_vVector | Vector to divide components with this vector. |
Multiplies each component of this vector by i_fFloat.
| i_fFloat | The amount to scale each component of this vector by. |
Outputs the memory location of this object, and the values of each of its components.
The Y component of this vector.
The Z component of this vector.