#include <SIBCVectorwd.h>
Public Member Functions |
|
| CSIBCVectorwd () | |
| CSIBCVectorwd (const double in_dX, const double in_dY, const double in_dZ, const double in_dW) | |
| double | GetX (void) const |
| double | GetY (void) const |
| double | GetZ (void) const |
| double | GetW (void) const |
| double | Get (const int in_iIndex) const |
| void | Get (double &out_dX, double &out_dY, double &out_dZ, double &out_dW) const |
| CSIBCVectorwd & | SetX (const double in_dVal) |
| CSIBCVectorwd & | SetY (const double in_dVal) |
| CSIBCVectorwd & | SetZ (const double in_dVal) |
| CSIBCVectorwd & | SetW (const double in_dVal) |
| CSIBCVectorwd & | Set (const int in_nIndex, const double in_dVal) |
| CSIBCVectorwd & | Set (const double in_dX, const double in_dY, const double in_dZ, const double in_dW) |
| CSIBCVectorwd & | SetNull (void) |
| bool | IsNull (const double in_dEpsilon=PICO_EPS) const |
| CSIBCVectorwd & | SetMinimal (const double in_dEpsilon=PICO_EPS) |
| bool | AreAlmostEqual (const CSIBCVectorwd &in_vct, const double in_dEpsilon=PICO_EPS) |
| bool | operator== (const CSIBCVectorwd &in_vct) const |
| bool | operator!= (const CSIBCVectorwd &in_vct) const |
| CSIBCVectorwd & | Negate (void) |
| double | GetLength (void) const |
| bool | SetLength (const double in_dLength) |
| bool | Normalize (void) |
| CSIBCVectorwd & | Add (const CSIBCVectorwd &in_vct) |
| CSIBCVectorwd & | Add (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| CSIBCVectorwd & | Sub (const CSIBCVectorwd &in_vct1) |
| CSIBCVectorwd & | Sub (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| CSIBCVectorwd & | Mul (const double in_vct) |
| CSIBCVectorwd & | Mul (const double in_dFactor, const CSIBCVectorwd &in_vct) |
| CSIBCVectorwd & | Mul (const CSIBCVectorwd &in_vct, const double in_dFactor) |
| CSIBCVectorwd & | Div (const double in_vct1) |
| CSIBCVectorwd & | Div (const double in_dFactor, const CSIBCVectorwd &in_vct) |
| CSIBCVectorwd & | MulComp (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| CSIBCVectorwd & | MulComp (const CSIBCVectorwd &in_vct) |
| CSIBCVectorwd & | DivComp (const CSIBCVectorwd &in_vct) |
| CSIBCVectorwd & | DivComp (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| CSIBCVectorwd & | SetMidpoint (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2) |
| CSIBCVectorwd & | LinearPositionInterpolate (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2, const double in_dT) |
| bool | SetOrthogonal (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| bool | SetOrthoProj (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| CSIBCVectorwd & | SetProjection (const CSIBCVectorwd &in_vct) |
| CSIBCVectorwd & | SetMirror (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| CSIBCVectorwd & | BsplinePositionInterpolate (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2, const CSIBCVectorwd &in_vct3, const CSIBCVectorwd &in_vct4, const double in_dT) |
| CSIBCVectorwd & | Combine (const CSIBCVectorwd &in_vct1, const double in_dS1, const CSIBCVectorwd &in_vct2, const double in_dS2) |
| void | SetBounds (const CSIBCVectorwd &in_pnt, CSIBCVectorwd &io_min, CSIBCVectorwd &io_max) |
Friends |
|
| double | GetDot (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| double | GetDistance (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2) |
| double | GetSquaredDistance (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2) |
| bool | AreOrthogonal (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2, const double in_dEpsilon=PICO_EPS) |
| double | GetVctAngle (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2, const bool in_bIsSigned=false) |
| double | GetPntAngle (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2, const CSIBCVectorwd &in_pnt3, const bool in_bIsSigned=false) |
| double | GetVctCosAngle (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2) |
| double | GetPntCosAngle (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2, const CSIBCVectorwd &in_pnt3) |
| bool | ArePntCollinear (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2, const CSIBCVectorwd &in_pnt3, const double in_dEpsilon=PICO_EPS) |
| bool | AreVctCoplanar (const CSIBCVectorwd &in_vct1, const CSIBCVectorwd &in_vct2, const CSIBCVectorwd &in_vct3, const double in_dEpsilon=PICO_EPS) |
| bool | ArePntCoplanar (const CSIBCVectorwd &in_pnt1, const CSIBCVectorwd &in_pnt2, const CSIBCVectorwd &in_pnt3, const CSIBCVectorwd &in_pnt4, const double in_dEpsilon=PICO_EPS) |
Representation of a 3D vector, with an implicit W componennt, defining operations to access, modify and perform calculations on 3D vectors. This class uses double precision floating-point numbers for represent its data, and in its operations. There are seperate similar classes for 2D and 4D vectors, CSIBCVector2Dd and CSIBCVector4Dd, respectively, which also use double precision, and also a 3D vector class that does not have an implicit W component, CSIBCVector3Dd.
Furthermore, there is another set of vector classes which use single precision floating-point numbers, CSIBCVector2D, CSIBCVector3D and CSIBCVector4D 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.
| CSIBCVectorwd | ( | const double | in_dX, | |
| const double | in_dY, | |||
| const double | in_dZ, | |||
| const double | in_dW | |||
| ) |
Constructor. Constructs a new 3D vector, with in_dX, in_dY, in_dZ and in_dW as the X, Y, Z and W component values, respectively.
| in_dX | The value for the X component of the new vector. | |
| in_dY | The value for the Y component of the new vector. | |
| in_dZ | The value for the Z component of the new vector. | |
| in_dW | The value for the W component of the new vector. |
| double GetX | ( | void | ) | const |
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.
Gets the value of the component specified by in_nIndex.
| in_nIndex | Index of the component value to get (0 == X, 1 == Y, 2 == Z, 3 == W). |
in_nIndex. | void Get | ( | double & | out_dX, | |
| double & | out_dY, | |||
| double & | out_dZ, | |||
| double & | out_dW | |||
| ) | const |
Gets the values of the X, Y, Z and W components of this vector.
| out_dX | Receives the value of the X component | |
| out_dY | Receives the value of the Y component | |
| out_dZ | Receives the value of the Z component | |
| out_dW | Receives the value of the W component |
Sets the value of the X component of this vector.
| in_dVal | The new value of the X component of this vector. |
Sets the value of the Y component of this vector.
| in_dVal | The new value of the Y component of this vector. |
Sets the value of the Z component of this vector.
| in_dVal | The new value of the Z component of this vector. |
Sets the value of the W component of this vector.
| in_dVal | The new value of the W component of this vector. |
Sets the component given by in_nIndex to in_dVal.
| in_nIndex | The index of the component to set (0 == X, 1 == Y, 2 == Z, 3 == W). | |
| in_dVal | The value to set the component to. |
| CSIBCVectorwd& Set | ( | const double | in_dX, | |
| const double | in_dY, | |||
| const double | in_dZ, | |||
| const double | in_dW | |||
| ) |
Sets the X, Y, Z and W components of the vector.
| in_dX | The value for the X component of the vector. | |
| in_dY | The value for the Y component of the vector. | |
| in_dZ | The value for the Z component of the vector. | |
| in_dW | The value for the W component of the vector. |
Sets all the components of this vector to zero.
Determines whether all components of this vector are equal to zero. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.
| in_dEpsilon | Floating-point comparison error range. Defaults to PICO_EPS. |
Sets each component of this vector to be at least in_dEpsilon (in absolute value). This does not change the sign of the component.
| in_dEpsilon | Value for the minimum absolute value of each component. Defaults to PICO_EPS. |
Determines whether all corresponding components of this vector and in_vct are equal. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.
| in_vct | Vector for equality comparison. | |
| in_dEpsilon | Floating-point comparison error range. Defaults to PICO_EPS. |
Determines whether all corresponding components of this vector and in_vct are exactly equal.
| in_vct | The vector to compare equality with. |
Determines whether any corresponding components of this vector and in_vct are different.
| in_vct | The vector to compare inequality with. |
Sets this vector to its negative.
Gets the length of this vector.
Sets the length of this vector.
| in_dLength | New length for this vector. |
Sets the vector to be a unit vector.
Adds this vector and in_vct. The W components are not added, and the W component of the resultant is taken from this vector. The result is stored in this vector.
| in_vct | Vector to add to this vector. return CSIBCVectorwd& Reference to this vector. |
| CSIBCVectorwd& Add | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2 | |||
| ) |
Adds in_vct1 and in_vct2. The W components are not added, and the W component of the resultant is taken from this vector. The result is stored in this vector.
| in_vct1 | First vector in the addition. | |
| in_vct2 | Second vector in the addition. |
Subtracts in_vct from this vector. The W components are not subtracted, and the W component of the resultant is taken from this vector. The result is stored in this vector.
| in_vct | Vector to subtract from this vector. |
| CSIBCVectorwd& Sub | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2 | |||
| ) |
Subtracts in_vct2 from in_vct1. The W components are not subtracted, and the W component of the resultant is taken from this vector. The result is stored in this vector.
| in_vct1 | First vector for the subtraction. | |
| in_vct2 | Second vector for the subtraction. |
Multiplies each component of this vector, except W, by in_dFactor. The result is stored in this vector.
| in_dFactor | Factor to multiply the components of this vector by. |
| CSIBCVectorwd& Mul | ( | const double | in_dFactor, | |
| const CSIBCVectorwd & | in_vct | |||
| ) |
Multiplies each of the components in in_vct, except W, by in_dFactor. The result is stored in this vector.
| in_dFactor | Factor to multiply the components of in_vct by. |
|
| in_vct | Vector to multiply. |
| CSIBCVectorwd& Mul | ( | const CSIBCVectorwd & | in_vct, | |
| const double | in_dFactor | |||
| ) |
Multiplies each of the components in in_vct, except W, by in_dFactor. The result is stored in this vector.
| in_vct | Vector to multiply. | |
| in_dFactor | Factor to multiply the components of in_vct by. |
Divides each component of this vector, except W, by in_dFactor. The result is stored in this vector.
| in_dFactor | Factor to divide the components of this vector by. |
| CSIBCVectorwd& Div | ( | const double | in_dFactor, | |
| const CSIBCVectorwd & | in_vct | |||
| ) |
Divides each component of in_vct, except W, by in_dFactor. The result is stored in this vector.
| in_vct | Vector to divide. | |
| in_dFactor | Factor to divide the components of this vector by. |
Multiplies each component of in_vct1 by the corresponding component in in_vct2, except for the W component which is set to the W component of this vector. The result is stored in this vector.
| in_vct1 | First vector to multiply the components of. | |
| in_vct2 | Second vector to multiply the components of. |
| CSIBCVectorwd& MulComp | ( | const CSIBCVectorwd & | in_vct | ) |
Multiplies each component of in_vct by the corresponding component in this vector, except for the W component which is set to the W component of this vector. The result is stored in this vector.
| in_vct | Vector to multiply the components of. |
Divides each component of this vector by the corresponding component in in_vct, except for the W component which is set to the W component of this vector. The result is stored in this vector.
| in_vct | Vector to divide the components of this vector by. |
| CSIBCVectorwd& DivComp | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2 | |||
| ) |
Divides each component of in_vct1 by the corresponding component in in_vct2, except for the W component which is set to the W component of this vector. The result is stored in this vector.
| in_vct1 | Vector to be divided by the components of in_vct2 |
|
| in_vct2 | Vector to divide the components of in_vct1 by. |
Sets this vector to the midpoint between the two points in_pnt1 and in_pnt2. The W component for the resultant is taken from the current vector.
| in_pnt1 | First point for midpoint determination. | |
| in_pnt2 | Second point for midpoint determination. |
| CSIBCVectorwd& LinearPositionInterpolate | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2, | |||
| const double | in_dT | |||
| ) |
Computes the linear interpolation between the two vectors in_vct1 and in_vct2, at a point in_dT between the two vectors. The W component is unaffected and taken from the current vector.
| in_vct1 | Starting point for the interpolation. | |
| in_vct2 | Ending point for the interpolation. | |
| in_dT | Interpolation point between the vectors, in the range [0.0f, 1.0f]. |
Not implemented yet.
Not implemented yet.
Not implemented yet.
Not implemented yet.
| CSIBCVectorwd& BsplinePositionInterpolate | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2, | |||
| const CSIBCVectorwd & | in_vct3, | |||
| const CSIBCVectorwd & | in_vct4, | |||
| const double | in_dT | |||
| ) |
Not implemented yet.
| CSIBCVectorwd& Combine | ( | const CSIBCVectorwd & | in_vct1, | |
| const double | in_dS1, | |||
| const CSIBCVectorwd & | in_vct2, | |||
| const double | in_dS2 | |||
| ) |
Not implemented yet.
Not implemented yet.
| double GetDot | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2 | |||
| ) | [friend] |
Computes the dot product between the vectors in_vct1 and in_vct2. Only the X, Y and Z components are used in this calculation.
| in_vct1 | First vector in the dot product. | |
| in_vct2 | Second vector in the dot product. |
in_vct1 and in_vct2.
Computes the distance between two points in 3D space given by in_pnt1 and in_pnt2.
| in_pnt1 | Starting point for distance calculation. | |
| in_pnt2 | Ending point for distance calculation. |
Computes the squared distance between two points in 3D space given by in_pnt1 and in_pnt2.
| in_pnt1 | Starting point for distance calculation. | |
| in_pnt2 | Ending point for distance calculation. |
| bool AreOrthogonal | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2, | |||
| const double | in_dEpsilon = PICO_EPS |
|||
| ) | [friend] |
Not implemented yet.
| double GetVctAngle | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2, | |||
| const bool | in_bIsSigned = false |
|||
| ) | [friend] |
Not implemented yet.
| double GetPntAngle | ( | const CSIBCVectorwd & | in_pnt1, | |
| const CSIBCVectorwd & | in_pnt2, | |||
| const CSIBCVectorwd & | in_pnt3, | |||
| const bool | in_bIsSigned = false |
|||
| ) | [friend] |
Not implemented yet.
Not implemented yet.
| double GetPntCosAngle | ( | const CSIBCVectorwd & | in_pnt1, | |
| const CSIBCVectorwd & | in_pnt2, | |||
| const CSIBCVectorwd & | in_pnt3 | |||
| ) | [friend] |
Not implemented yet.
| bool ArePntCollinear | ( | const CSIBCVectorwd & | in_pnt1, | |
| const CSIBCVectorwd & | in_pnt2, | |||
| const CSIBCVectorwd & | in_pnt3, | |||
| const double | in_dEpsilon = PICO_EPS |
|||
| ) | [friend] |
Not implemented yet.
| bool AreVctCoplanar | ( | const CSIBCVectorwd & | in_vct1, | |
| const CSIBCVectorwd & | in_vct2, | |||
| const CSIBCVectorwd & | in_vct3, | |||
| const double | in_dEpsilon = PICO_EPS |
|||
| ) | [friend] |
Not implemented yet.
| bool ArePntCoplanar | ( | const CSIBCVectorwd & | in_pnt1, | |
| const CSIBCVectorwd & | in_pnt2, | |||
| const CSIBCVectorwd & | in_pnt3, | |||
| const CSIBCVectorwd & | in_pnt4, | |||
| const double | in_dEpsilon = PICO_EPS |
|||
| ) | [friend] |
Not implemented yet.