Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCVector3Dd Class Reference
General purpose 3D vector class.
More...
#include <SIBCVector3Dd.h>
List of all members.
Public Methods
- CSIBCVector3Dd ()
- CSIBCVector3Dd (const double in_dX, const double in_dY, const double in_dZ)
- CSIBCVector3Dd (const double in_dXYZ[3])
- CSIBCVector3Dd (int in_nIndex, double in_dVal)
- const double * GetArray () const
- double GetX (void) const
- double GetY (void) const
- double GetZ (void) const
- double Get (const int in_nIndex) const
- void Get (double &out_dX, double &out_dY, double &out_dZ) const
- double GetMaxComponent (bool in_bInAbs=true) const
- double GetMinComponent (bool in_bInAbs=true) const
- int GetIndexOfMaxComponent (bool in_bInAbs=true) const
- int GetIndexOfMinComponent (bool in_bInAbs=true) const
- CSIBCVector3Dd & SetX (const double in_dVal)
- CSIBCVector3Dd & SetY (const double in_dVal)
- CSIBCVector3Dd & SetZ (const double in_dVal)
- CSIBCVector3Dd & Set (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Set (const int in_nIndex, const double in_dVal)
- CSIBCVector3Dd & Set (const double in_dX, const double in_dY, const double in_dZ)
- CSIBCVector3Dd & SetNull (void)
- bool IsNull (const double in_dEpsilon=PICO_EPS) const
- CSIBCVector3Dd & SetMinimal (bool in_bInAbs=true, const double in_dEpsilon=PICO_EPS)
- CSIBCVector3Dd & SetMinimal (const CSIBCVector3Dd &, bool in_bInAbs=true)
- bool operator== (const CSIBCVector3Dd &in_vct) const
- bool operator!= (const CSIBCVector3Dd &in_vct) const
- CSIBCVector3Dd & Negate (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Negate (void)
- double GetSquaredLength (void) const
- double GetLength (void) const
- bool SetLength (const double in_dLength)
- bool Normalize (void)
- CSIBCVector3Dd & Add (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Add (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- CSIBCVector3Dd & Sub (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Sub (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- CSIBCVector3Dd & Mul (const double in_dFactor)
- CSIBCVector3Dd & Mul (const double in_dFactor, const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Mul (const CSIBCVector3Dd &in_vct, const double in_dFactor)
- CSIBCVector3Dd & Mul (const CSIBCVector3Dd &in_vct, const CSIBCMatrix33d &in_mat)
- CSIBCVector3Dd & Mul (const CSIBCMatrix33d &in_mat)
- CSIBCVector3Dd & Mul (const CSIBCMatrix33d &in_mat, const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Mul (const CSIBCVector3Dd &in_vct, const CSIBCRotMatd &in_mat)
- CSIBCVector3Dd & Mul (const CSIBCRotMatd &in_mat, const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & Mul (const CSIBCVector3Dd &in_vct, const CSIBCXfoMatd &in_mat)
- CSIBCVector3Dd & Mul (const CSIBCVector3Dd &in_vct, const CSIBCMatrix44d &in_mat)
- CSIBCVector3Dd & Div (const double in_dFactor)
- CSIBCVector3Dd & Div (const CSIBCVector3Dd &in_vct, const double in_dFactor)
- CSIBCVector3Dd & MulComp (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- CSIBCVector3Dd & MulComp (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & DivComp (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & DivComp (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- CSIBCVector3Dd & SetCross (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & SetCross (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- bool SetOrthogonal (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- bool SetOrthoProj (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- bool SetProjection (const CSIBCVector3Dd &in_vct)
- CSIBCVector3Dd & SetMirror (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- CSIBCVector3Dd & SetMidpoint (const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2)
- CSIBCVector3Dd & SetMean (const CSIBCVector3Dd *in_vct, unsigned long in_nbVct)
- CSIBCVector3Dd & LinearPositionInterpolate (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const double in_dT)
- void SetBounds (const CSIBCVector3Dd &in_pnt, CSIBCVector3Dd &io_min, CSIBCVector3Dd &io_max)
- CSIBCVector3Dd & Combine (const CSIBCVector3Dd &in_vct1, const double in_dS1, const CSIBCVector3Dd &in_vct2, const double in_dS2)
- CSIBCVector3Dd & BsplinePositionInterpolate (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const CSIBCVector3Dd &in_vct3, const CSIBCVector3Dd &in_vct4, const double in_dT)
- CSIBCVector3Dd & BsplineVectorInterpolate (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const CSIBCVector3Dd &in_vct3, const CSIBCVector3Dd &in_vct4, const double in_dT)
Friends
- bool AreAlmostEqual (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- double GetDot (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- bool AreOrthogonal (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- bool AreParallel (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- double GetDistance (const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2)
- double GetSquaredDistance (const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2)
- void GetOrthogonalBasis (const CSIBCVector3Dd &in_vct1, CSIBCVector3Dd &out_vct2, CSIBCVector3Dd &out_vct3)
- void GetOrthonormalBasis (CSIBCVector3Dd &io_vct1, CSIBCVector3Dd &out_vct2, CSIBCVector3Dd &out_vct3)
- double GetPntsAngle (const CSIBCVector3Dd &in_pntOrigin, const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2)
- double Get2DPntsAngleSigned (const CSIBCVector3Dd &in_pntOrigin, const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2)
- double GetPntsCosAngle (const CSIBCVector3Dd &in_pntOrigin, const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2)
- double GetVctsAngle (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- double Get2DVctsAngleSigned (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2)
- double GetVctsCosAngle (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- int Get2DPntSide (const CSIBCVector3Dd &in_pnt, const CSIBCVector3Dd &in_pntOrigin, const CSIBCVector3Dd &in_pntTip)
- double GetTriangleArea (const CSIBCVector3Dd &in_rPoint0, const CSIBCVector3Dd &in_rPoint1, const CSIBCVector3Dd &in_rPoint2)
- bool ArePntsCollinear (const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2, const CSIBCVector3Dd &in_pnt3, const double in_dEpsilon=PICO_EPS)
- bool AreVctsCoplanar (const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const CSIBCVector3Dd &in_vct3, const double in_dEpsilon=PICO_EPS)
- bool ArePntsCoplanar (const CSIBCVector3Dd &in_pnt1, const CSIBCVector3Dd &in_pnt2, const CSIBCVector3Dd &in_pnt3, const CSIBCVector3Dd &in_pnt4, const double in_dEpsilon=PICO_EPS)
Detailed Description
General purpose 3D vector class.
Representation of a 3D vector, 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. There also exists a 3D vector class with an implicit W component, CSIBCVectorwd.
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.
Constructor & Destructor Documentation
CSIBCVector3Dd::CSIBCVector3Dd |
( |
|
) |
|
|
|
Default Constructor. Constructs a new 3D vector. |
CSIBCVector3Dd::CSIBCVector3Dd |
( |
const double |
in_dX, |
|
|
const double |
in_dY, |
|
|
const double |
in_dZ |
|
) |
|
|
|
Constructor. Constructs a new 3D vector, with in_dX , in_dY and in_dZ as the X, Y and Z component values, respectively. -
Parameters:
-
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. |
|
CSIBCVector3Dd::CSIBCVector3Dd |
( |
const double |
in_dXYZ[3] |
) |
|
|
|
Constructor. Sets the new vector to have the X, Y and Z values contained in the array in_dXYZ . -
Parameters:
-
in_dXY |
Array containing the X, Y and Z values for the new vector. |
|
CSIBCVector3Dd::CSIBCVector3Dd |
( |
int |
in_nIndex, |
|
|
double |
in_dVal |
|
) |
|
|
|
Constructor. Sets the component determined by in_nIndex to in_dVal , and the other component to zero. -
Parameters:
-
in_nIndex |
Index of the component to set to in_dVal . (0 == X, 1 == Y). |
|
Member Function Documentation
CSIBCVector3Dd & CSIBCVector3Dd::Add |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
|
|
|
Adds in_vct1 and in_vct2 . The result is stored in this vector. -
Parameters:
-
in_vct1 |
First vector in the addition. |
in_vct2 |
Second vector in the addition. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Add , CSIBCVector3Dd::Sub
|
CSIBCVector3Dd & CSIBCVector3Dd::Add |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
|
Adds this vector and in_vct . The result is stored in this vector. -
Parameters:
-
in_vct |
Vector to add to this vector. return CSIBCVector3Dd& Reference to this vector. |
-
See also:
-
CSIBCVector3Dd::Add , CSIBCVector3Dd::Sub
|
CSIBCVector3Dd & CSIBCVector3Dd::BsplinePositionInterpolate |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const CSIBCVector3Dd & |
in_vct3, |
|
|
const CSIBCVector3Dd & |
in_vct4, |
|
|
const double |
in_dT |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::BsplineVectorInterpolate |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const CSIBCVector3Dd & |
in_vct3, |
|
|
const CSIBCVector3Dd & |
in_vct4, |
|
|
const double |
_6t |
|
) |
|
|
CSIBCVector3Dd& CSIBCVector3Dd::Combine |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const double |
in_dS1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const double |
in_dS2 |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Div |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
const double |
in_dFact |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Div |
( |
const double |
in_dFact |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::DivComp |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::DivComp |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
void CSIBCVector3Dd::Get |
( |
double & |
out_dX, |
|
|
double & |
out_dY, |
|
|
double & |
out_dZ |
|
) |
const |
|
double CSIBCVector3Dd::Get |
( |
const int |
in_nIndex |
) |
const |
|
const double * CSIBCVector3Dd::GetArray |
( |
|
) |
const |
|
|
Returns an array containing the X, Y and Z components of the vector. Note that the pointer obtained from this call should not be freed. Any modification to the values in the array results in a direct modification of this object. -
Returns:
-
const double* Array containing the X, Y and Z components of this vector.
-
See also:
-
CSIBCVector3Dd::Get
|
int CSIBCVector3Dd::GetIndexOfMaxComponent |
( |
bool |
in_bInAbs = true |
) |
const |
|
|
Gets the index of the largest component of the vector. -
Parameters:
-
in_bInAbs |
true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true. |
-
Returns:
-
int Index of the largest component of the vector (0 == X, 1 == Y, 2 == Z).
-
See also:
-
CSIBCVector3Dd::GetMaxComponent , CSIBCVector3Dd::GetIndexOfMinComponent
|
int CSIBCVector3Dd::GetIndexOfMinComponent |
( |
bool |
in_bInAbs = true |
) |
const |
|
|
Gets the index of the smallest component of the vector. -
Parameters:
-
in_bInAbs |
true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true. |
-
Returns:
-
int Index of the smallest component of the vector (0 == X, 1 == Y, 2 == Z).
-
See also:
-
CSIBCVector3Dd::GetMinComponent , CSIBCVector3Dd::GetIndexOfMaxComponent
|
double CSIBCVector3Dd::GetLength |
( |
void |
|
) |
const |
|
double CSIBCVector3Dd::GetMaxComponent |
( |
bool |
in_bInAbs = true |
) |
const |
|
|
Gets the value of largest component of the vector. -
Parameters:
-
in_bInAbs |
true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true. |
-
Returns:
-
double The value (or absolute value if
in_bInAbs is true) of the largest component of the vector.
-
See also:
-
CSIBCVector3Dd::GetIndexOfMaxComponent , CSIBCVector3Dd::GetMinComponent
|
double CSIBCVector3Dd::GetMinComponent |
( |
bool |
in_bInAbs = true |
) |
const |
|
|
Gets the value of smallest component of the vector. -
Parameters:
-
in_bInAbs |
true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true. |
-
Returns:
-
double The value (or absolute value if
in_bInAbs is true) of the smallest component of the vector.
-
See also:
-
CSIBCVector3Dd::GetIndexOfMinComponent , CSIBCVector3Dd::GetMaxComponent
|
double CSIBCVector3Dd::GetSquaredLength |
( |
void |
|
) |
const |
|
double CSIBCVector3Dd::GetX |
( |
void |
|
) |
const |
|
double CSIBCVector3Dd::GetY |
( |
void |
|
) |
const |
|
double CSIBCVector3Dd::GetZ |
( |
void |
|
) |
const |
|
bool CSIBCVector3Dd::IsNull |
( |
const double |
in_dEpsilon = PICO_EPS |
) |
const |
|
|
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. -
Parameters:
-
in_dEpsilon |
Floating-point comparison error range. Defaults to PICO_EPS. |
-
Returns:
-
bool true if the vector is null, false otherwise.
-
See also:
-
CSIBCVector3Dd::SetNull , CSIBCVector3Dd::AreAlmostEqual
|
CSIBCVector3Dd & CSIBCVector3Dd::LinearPositionInterpolate |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
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. -
Parameters:
-
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]. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::SetMidpoint
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
const CSIBCMatrix44d & |
in_mat |
|
) |
|
|
|
Multiplies a row vector in_vct , into a 4x4 matrix in_mat (in_vct * in_mat) , and stores the result in this vector. Since a 4-vector is required for the multiplication, the W component of in_vct is assumed to be 1. The X, Y and Z output components are divided by the resultant W component. -
Parameters:
-
in_vct |
Row vector to multiply (on the left). |
in_mat |
Rotation matrix to multiply (on the right). |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Mul , CSIBCVector3Dd::MulComp , CSIBCVector3Dd::DivComp , CSIBCVector3Dd::Div
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
const CSIBCXfoMatd & |
in_mat |
|
) |
|
|
|
Multiplies a row vector in_vct , into a 4x4 transformation matrix in_mat (in_vct * in_mat) , and stores the result in this vector. Since a 4-vector is required for the multiplication, the W component of in_vct is assumed to be 1. Since the output from this operation is normally a 4-vector, only the X, Y and Z components are used. -
Parameters:
-
in_vct |
Row vector to multiply (on the left). |
in_mat |
Rotation matrix to multiply (on the right). |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Mul , CSIBCVector3Dd::MulComp , CSIBCVector3Dd::DivComp , CSIBCVector3Dd::Div
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCRotMatd & |
in_mat, |
|
|
const CSIBCVector3Dd & |
in_vct |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
const CSIBCRotMatd & |
in_mat |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCMatrix33d & |
in_mat, |
|
|
const CSIBCVector3Dd & |
in_vct |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCMatrix33d & |
in_mat |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
const CSIBCMatrix33d & |
in_mat |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
const double |
in_dFactor |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const double |
in_dFactor, |
|
|
const CSIBCVector3Dd & |
in_vct |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Mul |
( |
const double |
in_dFactor |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::MulComp |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::MulComp |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Negate |
( |
void |
|
) |
|
|
|
Sets this vector to its negative. -
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Negate
|
CSIBCVector3Dd & CSIBCVector3Dd::Negate |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
|
Sets this vector to the negative of in_vct . -
Parameters:
-
in_vct |
Vector containing the negative value for this vector. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Negate
|
bool CSIBCVector3Dd::Normalize |
( |
void |
|
) |
|
|
bool CSIBCVector3Dd::operator!= |
( |
const CSIBCVector3Dd & |
in_vct |
) |
const |
|
|
Determines whether any corresponding components of this vector and in_vct are different. -
Parameters:
-
in_vct |
The vector to compare inequality with. |
-
Returns:
-
bool true if the vectors differ in any component, false otherwise.
-
See also:
-
CSIBCVector3Dd::AreAlmostEqual , CSIBCVector3Dd::operator==
|
bool CSIBCVector3Dd::operator== |
( |
const CSIBCVector3Dd & |
in_v |
) |
const |
|
|
Determines whether all corresponding components of this vector and in_vct are exactly equal. -
Parameters:
-
in_vct |
The vector to compare equality with. |
-
Returns:
-
bool true if the vectors are exactly equal, false otherwise.
-
See also:
-
CSIBCVector3Dd::AreAlmostEqual , CSIBCVector3Dd::operator!=
|
CSIBCVector3Dd & CSIBCVector3Dd::Set |
( |
const double |
in_dX, |
|
|
const double |
in_dY, |
|
|
const double |
in_dZ |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Set |
( |
const int |
in_nIndex, |
|
|
const double |
in_dVal |
|
) |
|
|
|
Sets the component given by in_nIndex to in_dVal . -
Parameters:
-
in_nIndex |
The index of the component to set (0 == X, 1 == Y, 2 == Z). |
in_dVal |
The value to set the component to. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Set , CSIBCVector3Dd::Get
|
CSIBCVector3Dd & CSIBCVector3Dd::Set |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
void CSIBCVector3Dd::SetBounds |
( |
const CSIBCVector3Dd & |
in_pnt, |
|
|
CSIBCVector3Dd & |
io_min, |
|
|
CSIBCVector3Dd & |
io_max |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::SetCross |
( |
const CSIBCVector3Dd & |
in_v1, |
|
|
const CSIBCVector3Dd & |
in_v2 |
|
) |
|
|
|
Computes the cross product between in_vct1 and in_vct2 (in_vct1 x in_vct2) . The result is stored in this vector. -
Parameters:
-
in_vct1 |
Vector to cross with this vector (on the left). |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::GetDot , CSIBCVector3Dd::SetCross
|
CSIBCVector3Dd & CSIBCVector3Dd::SetCross |
( |
const CSIBCVector3Dd & |
in_v1 |
) |
|
|
|
Computes the cross product between this vector and in_vct (this x in_vct) . The result is stored in this vector -
Parameters:
-
in_vct |
Vector to cross with this vector (on the left). |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::GetDot , CSIBCVector3Dd::SetCross
|
bool CSIBCVector3Dd::SetLength |
( |
const double |
in_dLength |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::SetMean |
( |
const CSIBCVector3Dd * |
in_pvct, |
|
|
unsigned long |
in_ulNbVect |
|
) |
|
|
|
Computes the mean of the vector components of the vectors in the array in_vct . The result is stored in this vector. -
Parameters:
-
in_vct |
Array of vectors (in_nbVct long) to calculate the mean of. |
in_nbVct |
Number of vectors in the in_vct array. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::SetMidpoint , CSIBCVector3Dd::LinearPositionInterpolate
|
CSIBCVector3Dd & CSIBCVector3Dd::SetMidpoint |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::SetMinimal |
( |
const CSIBCVector3Dd & |
in_vctReference, |
|
|
bool |
in_bInAbs = true |
|
) |
|
|
|
Ensures that each of the components of this vector are at least as large as the components of in_vct . If they are not, they are set to be equal to the component of in_vct . Note that if comparisons are done with absolute values, the sign of the vector components does not change, if they are less than the corresponding component values in in_vct . -
Parameters:
-
in_vct |
Vector containing minimal component values. |
in_bInAbs |
true if comparisons are done with absolute values, false if comparisons are done without absolute values. Defaults to true. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::SetMinimal , CSIBCVector3Dd::AreAlmostEqual
|
CSIBCVector3Dd & CSIBCVector3Dd::SetMinimal |
( |
bool |
in_bInAbs = true, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[inline] |
|
|
Ensure that each of the components of this vector are at least as large as in_dEpsilon . If not, they are set to in_dEpsilon . Note that if comparisons are done with absolute values, the sign of the vector components does not change, if they are less than in_dEpsilon . -
Parameters:
-
in_bInAbs |
true if comparisons are done with absolute values, false if comparisons are done without absolute values. Defaults to true. |
in_dEpsilon |
Minimal value for components of this vector. Defaults to PICO_EPS. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::SetMinimal , CSIBCVector3Dd::AreAlmostEqual
|
CSIBCVector3Dd & CSIBCVector3Dd::SetMirror |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
|
|
|
Computes in_vct1 * 2 - in_vct2 , and stores the result in this vector. -
Parameters:
-
in_vct1 |
First vector in the computation. |
in_vct2 |
Second vector in the computation. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::SetProjection
|
CSIBCVector3Dd & CSIBCVector3Dd::SetNull |
( |
void |
|
) |
|
|
bool CSIBCVector3Dd::SetOrthogonal |
( |
const CSIBCVector3Dd & |
in_v1, |
|
|
const CSIBCVector3Dd & |
in_v2 |
|
) |
|
|
|
Computes the vector that is orthogonal to in_vct1 , and in the same plane as in_vct1 and in_vct2 . The result is stored in this vector. -
Parameters:
-
in_vct1 |
Vector that the new vector should be orthogonal to. |
in_vct2 |
Another vector, with in_vct1 that forms a plane in which the new vector should lie in. |
-
Returns:
-
bool true if the orthogonal vector could be calculated, false if
in_vct1 and in_vct2 are colinear. If false, this vector contains the null vector.
-
See also:
-
CSIBCVector3Dd::AreOrthogonal , CSIBCVector3Dd::SetOrthoProj , CSIBCVector3Dd::GetOrthogonalBasis
|
bool CSIBCVector3Dd::SetOrthoProj |
( |
const CSIBCVector3Dd & |
in_v1, |
|
|
const CSIBCVector3Dd & |
in_v2 |
|
) |
|
|
|
Computes the vector that is orthogonal to in_vct1 , and in the same plane as in_vct1 and in_vct2 . The result is then projected on in_vct2 . The result is stored in this vector. -
Parameters:
-
in_vct1 |
Vector taht the new vector should be orthogonal to. |
iN_vct2 |
Another vector, with in_vct1 that forms a plane in which the new vector should lie in. The result is then projected onto this vector. |
-
Returns:
-
bool true if the orthogonal projected vector could be calculated, false if
in_vct1 and in_vct2 are colinear. If false, this vector contains the null vector.
-
See also:
-
CSIBCVector3Dd::SetOrthogonal , CSIBCVector3Dd::AreOrthogonal , CSIBCVector3Dd::SetProjection
|
bool CSIBCVector3Dd::SetProjection |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
|
Projects this vector onto in_vct . The projected vector is stored in this vector. -
Parameters:
-
in_vct |
Vector to project this vector onto. |
-
Returns:
-
bool true if the vector is projected, false if the input vector is the null vector. If false, this vector keeps its original value.
-
See also:
-
CSIBCVector3Dd::SetOrthoProj
|
CSIBCVector3Dd & CSIBCVector3Dd::SetX |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::SetY |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::SetZ |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector3Dd & CSIBCVector3Dd::Sub |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
|
|
|
Subtracts in_vct2 from in_vct1 . The result is stored in this vector. -
Parameters:
-
in_vct1 |
First vector for the subtraction. |
in_vct2 |
Second vector for the subtraction. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Sub , CSIBCVector3Dd::Add
|
CSIBCVector3Dd & CSIBCVector3Dd::Sub |
( |
const CSIBCVector3Dd & |
in_vct |
) |
|
|
|
Subtracts in_vct from this vector. The result is stored in this vector. -
Parameters:
-
in_vct |
Vector to subtract from this vector. |
-
Returns:
-
CSIBCVector3Dd& Reference to this vector.
-
See also:
-
CSIBCVector3Dd::Sub , CSIBCVector3Dd::Add
|
Friends And Related Function Documentation
bool AreAlmostEqual |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
|
Determines whether all corresponding components of the in_vct1 and in_vct2 are equal. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison. -
Parameters:
-
in_vct1 |
First vector for equality comparison. |
in_vct2 |
Second vector for equality comparison. |
in_dEpsilon |
Floating-point comparison error range. Defaults to PICO_EPS. |
-
Returns:
-
bool true if the vectors are equal, false otherwise.
-
See also:
-
CSIBCVector3Dd::operator== , CSIBCVector3Dd::operator!=
|
bool AreOrthogonal |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
|
Determines whether two vectors in_vct1 and in_vct2 are orthogonal to each other. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison. -
Parameters:
-
in_vct1 |
First vector for orthogonality comparison. |
in_vct2 |
Second vector for orthogonality comparison. |
in_dEpsilon |
Floating-point comparison error range. Defaults to PICO_EPS. |
-
Returns:
-
bool true if the vectors are orthogonal, false otherwise.
-
See also:
-
CSIBCVector3Dd::SetOrthogonal , CSIBCVector3Dd::SetOrthoProj , CSIBCVector3Dd::GetOrthogonalBasis
|
bool AreParallel |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
|
Determines whether in_vct1 and in_vct2 are parallel vectors. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison. -
Parameters:
-
in_vct1 |
The first vector in the parallelism comparison. |
in_vct2 |
The second vector in the parallelism comparison. |
in_dEpsilon |
Floating-point comparison error range. Defaults to PICO_EPS. |
|
bool ArePntsCollinear |
( |
const CSIBCVector3Dd & |
in_pnt1, |
|
|
const CSIBCVector3Dd & |
in_pnt2, |
|
|
const CSIBCVector3Dd & |
in_pnt3, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
bool ArePntsCoplanar |
( |
const CSIBCVector3Dd & |
in_pnt1, |
|
|
const CSIBCVector3Dd & |
in_pnt2, |
|
|
const CSIBCVector3Dd & |
in_pnt3, |
|
|
const CSIBCVector3Dd & |
in_pnt4, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
bool AreVctsCoplanar |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const CSIBCVector3Dd & |
in_vct3, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
double Get2DPntsAngleSigned |
( |
const CSIBCVector3Dd & |
in_pntOrigin, |
|
|
const CSIBCVector3Dd & |
in_pnt1, |
|
|
const CSIBCVector3Dd & |
in_pnt2 |
|
) |
[friend] |
|
int Get2DPntSide |
( |
const CSIBCVector3Dd & |
in_pnt, |
|
|
const CSIBCVector3Dd & |
in_pntOrigin, |
|
|
const CSIBCVector3Dd & |
in_pntTip |
|
) |
[friend] |
|
|
Determines which 'side' of the vector formed between the points in_pntOrigin and in_pntTip , a point in_pnt is on. -
Parameters:
-
in_pnt |
Point to determine which side of the vector it is on. |
in_pntOrigin |
Staring point of the vector. |
in_pntTip |
Ending point of the vector. |
-
Returns:
-
int The side that the point is on. (-1 == right side, 1 == left side).
|
double Get2DVctsAngleSigned |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
[friend] |
|
double GetDistance |
( |
const CSIBCVector3Dd & |
in_v1, |
|
|
const CSIBCVector3Dd & |
in_v2 |
|
) |
[friend] |
|
|
Computes the distance between two points in 3D space given by in_pnt1 and in_pnt2 . -
Parameters:
-
in_pnt1 |
Starting point for distance calculation. |
in_pnt2 |
Ending point for distance calculation. |
-
Returns:
-
double The scalar distance between the two points, in 3D space.
-
See also:
-
CSIBCVector3Dd::GetSquaredDistance
|
double GetDot |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2 |
|
) |
[friend] |
|
|
Computes the dot product between the vectors in_vct1 and in_vct2 . -
Parameters:
-
in_vct1 |
First vector in the dot product. |
in_vct2 |
Second vector in the dot product. |
-
Returns:
-
double The dot product between
in_vct1 and in_vct2 .
-
See also:
-
CSIBCVector3Dd::SetCross
|
void GetOrthogonalBasis |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
CSIBCVector3Dd & |
out_vct2, |
|
|
CSIBCVector3Dd & |
out_vct3 |
|
) |
[friend] |
|
void GetOrthonormalBasis |
( |
CSIBCVector3Dd & |
io_vct1, |
|
|
CSIBCVector3Dd & |
out_vct2, |
|
|
CSIBCVector3Dd & |
out_vct3 |
|
) |
[friend] |
|
|
Computes two vectors out_vct2 and out_vct3 , which together with the input vector in_vct1 form an orthonormal basis. io_vct1 is normalized if it is not already normalized. -
Parameters:
-
io_vct1 |
Vector to compute the orthonormal vector from. Normalized if not already normalized. |
out_vct2 |
Receives an orthonormal basis vector. |
out_vct3 |
Receives an orthonormal basis vector. |
-
See also:
-
CSIBCVector3Dd::GetOrthogonalBasis , CSIBCVector3Dd::SetOrthogonal , CSIBCVector3Dd::SetOrthoProj
|
double GetPntsAngle |
( |
const CSIBCVector3Dd & |
in_pntOrigin, |
|
|
const CSIBCVector3Dd & |
in_pnt1, |
|
|
const CSIBCVector3Dd & |
in_pnt2 |
|
) |
[friend] |
|
double GetPntsCosAngle |
( |
const CSIBCVector3Dd & |
in_pntOrigin, |
|
|
const CSIBCVector3Dd & |
in_pnt1, |
|
|
const CSIBCVector3Dd & |
in_pnt2 |
|
) |
[friend] |
|
double GetSquaredDistance |
( |
const CSIBCVector3Dd & |
in_v1, |
|
|
const CSIBCVector3Dd & |
in_v2 |
|
) |
[friend] |
|
|
Computes the squared distance between two points in 3D space given by in_pnt1 and in_pnt2 . -
Parameters:
-
in_pnt1 |
Starting point for distance calculation. |
in_pnt2 |
Ending point for distance calculation. |
-
Returns:
-
double The squared scalar distance between the two points, in 3D space.
-
See also:
-
CSIBCVector3Dd::GetDistance
|
double GetTriangleArea |
( |
const CSIBCVector3Dd & |
in_rPointP, |
|
|
const CSIBCVector3Dd & |
in_rPointQ, |
|
|
const CSIBCVector3Dd & |
in_rPointR |
|
) |
[friend] |
|
|
Calculates the area of the triangle with the verticies in_rPoint0 , in_rPoint1 and in_rPoint2 . -
Parameters:
-
in_rPoint0 |
First vertex of the triangle. |
in_rPoint1 |
Second vertex of the triangle. |
in_rPoint2 |
Third vertex of the triangle. |
|
double GetVctsAngle |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
double GetVctsCosAngle |
( |
const CSIBCVector3Dd & |
in_vct1, |
|
|
const CSIBCVector3Dd & |
in_vct2, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
The documentation for this class was generated from the following files:
- SIBCVector3Dd.h
- SIBCVector3Dd.cpp
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.