Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCVector4Dd Class Reference
General purpose 4D vector class.
More...
#include <SIBCVector4Dd.h>
List of all members.
Public Methods
- CSIBCVector4Dd ()
- CSIBCVector4Dd (const double in_dX, const double in_dY, const double in_dZ, const double in_dW)
- CSIBCVector4Dd (const CSIBCVector3Dd &in_vct, double in_dW)
- double GetX (void) const
- double GetY (void) const
- double GetZ (void) const
- double GetW (void) const
- double Get (const int in_nIndex) const
- void Get (double &out_dX, double &out_dY, double &out_dZ, double &out_dW) const
- CSIBCVector4Dd & SetX (const double in_dVal)
- CSIBCVector4Dd & SetY (const double in_dVal)
- CSIBCVector4Dd & SetZ (const double in_dVal)
- CSIBCVector4Dd & SetW (const double in_dVal)
- CSIBCVector4Dd & Set (const int in_nIndex, const double in_dVal)
- CSIBCVector4Dd & Set (const double in_dX, const double in_dY, const double in_dZ, const double in_dW)
- void Set (const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & SetNull (void)
- bool IsNull (const double in_dEpsilon=PICO_EPS) const
- CSIBCVector4Dd & SetMinimal (const double in_dEpsilon=PICO_EPS)
- bool operator== (const CSIBCVector4Dd &in_vct) const
- bool operator!= (const CSIBCVector4Dd &in_vct) const
- CSIBCVector4Dd & Negate (const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & Negate (void)
- double GetSquaredLength (void) const
- double GetLength (void) const
- bool SetLength (const double in_dLength)
- bool Normalize (void)
- CSIBCVector4Dd & Add (const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & Add (const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2)
- CSIBCVector4Dd & Sub (const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & Sub (const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2)
- CSIBCVector4Dd & Mul (const double in_dFactor)
- CSIBCVector4Dd & Mul (const double in_dFactor, const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & Mul (const CSIBCVector4Dd &in_vct, const double in_dFactor)
- CSIBCVector4Dd & Div (const double in_dFactor)
- CSIBCVector4Dd & Div (const CSIBCVector4Dd &in_vct, const double in_dFactor)
- CSIBCVector4Dd & MulComp (const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2)
- CSIBCVector4Dd & MulComp (const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & DivComp (const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & DivComp (const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2)
- CSIBCVector4Dd & Mul (const CSIBCMatrix44d &in_mat)
- CSIBCVector4Dd & Mul (const CSIBCVector4Dd &in_vct, const CSIBCMatrix44d &in_mat)
- CSIBCVector4Dd & Mul (const CSIBCMatrix44d &in_mat, const CSIBCVector4Dd &in_vct)
- CSIBCVector4Dd & Mul (const CSIBCVector4Dd &in_vct, const CSIBCXfoMatd &in_mat)
- CSIBCVector4Dd & Mul (const CSIBCXfoMatd &in_mat, const CSIBCVector4Dd &in_vct)
- bool SetProjection (const CSIBCVector4Dd &in_vct)
Friends
- bool AreAlmostEqual (const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- double GetDot (const CSIBCVector4Dd &in_vct1, const CSIBCVector4Dd &in_vct2)
- double GetDistance (const CSIBCVector4Dd &in_pnt1, const CSIBCVector4Dd &in_pnt2)
- double GetSquaredDistance (const CSIBCVector4Dd &in_pnt1, const CSIBCVector4Dd &in_pnt2)
Detailed Description
General purpose 4D vector class.
Representation of a 4D vector, defining operations to access, modify and perform calculations on 4D 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 3D vectors, CSIBCVector2Dd and CSIBCVector3Dd, respectively, which also use double precision.
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
CSIBCVector4Dd::CSIBCVector4Dd |
( |
|
) |
|
|
|
Default Constructor. Constructs a new 4D vector. |
CSIBCVector4Dd::CSIBCVector4Dd |
( |
const double |
in_dX, |
|
|
const double |
in_dY, |
|
|
const double |
in_dZ, |
|
|
const double |
in_dW |
|
) |
|
|
|
Constructor. Constructs a new 4D vector, with in_dX , in_dY , in_dZ and in_dW as the X, Y, Z and W 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. |
in_dW |
The value for the W component of the new vector. |
|
CSIBCVector4Dd::CSIBCVector4Dd |
( |
const CSIBCVector3Dd & |
in_vct, |
|
|
double |
in_dW |
|
) |
|
|
|
Constructor. Constructs a new 4D vector, with the X, Y and Z components taken from in_vct , and the W component as in_dW . -
Parameters:
-
in_vct |
The 3D vector for the X, Y and Z components. |
in_dW |
The value of the W component. |
|
Member Function Documentation
CSIBCVector4Dd & CSIBCVector4Dd::Add |
( |
const CSIBCVector4Dd & |
in_vct1, |
|
|
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd& Reference to this vector.
-
See also:
-
CSIBCVector4Dd::Add , CSIBCVector4Dd::Sub
|
CSIBCVector4Dd & CSIBCVector4Dd::Add |
( |
const CSIBCVector4Dd & |
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 CSIBCVector4Dd& Reference to this vector. |
-
See also:
-
CSIBCVector4Dd::Add , CSIBCVector4Dd::Sub
|
CSIBCVector4Dd & CSIBCVector4Dd::Div |
( |
const CSIBCVector4Dd & |
in_vct, |
|
|
const double |
in_dFactor |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Div |
( |
const double |
in_dFact |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::DivComp |
( |
const CSIBCVector4Dd & |
in_vct1, |
|
|
const CSIBCVector4Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::DivComp |
( |
const CSIBCVector4Dd & |
in_vct |
) |
|
|
void CSIBCVector4Dd::Get |
( |
double & |
out_dX, |
|
|
double & |
out_dY, |
|
|
double & |
out_dZ, |
|
|
double & |
out_dW |
|
) |
const |
|
double CSIBCVector4Dd::Get |
( |
const int |
in_nIndex |
) |
const |
|
double CSIBCVector4Dd::GetLength |
( |
void |
|
) |
const |
|
double CSIBCVector4Dd::GetSquaredLength |
( |
void |
|
) |
const |
|
double CSIBCVector4Dd::GetW |
( |
void |
|
) |
const |
|
double CSIBCVector4Dd::GetX |
( |
void |
|
) |
const |
|
double CSIBCVector4Dd::GetY |
( |
void |
|
) |
const |
|
double CSIBCVector4Dd::GetZ |
( |
void |
|
) |
const |
|
bool CSIBCVector4Dd::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:
-
CSIBCVector4Dd::SetNull , CSIBCVector4Dd::AreAlmostEqual
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const CSIBCXfoMatd & |
in_mat, |
|
|
const CSIBCVector4Dd & |
in_vct |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const CSIBCVector4Dd & |
in_vct, |
|
|
const CSIBCXfoMatd & |
in_mat |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const CSIBCMatrix44d & |
in_mat, |
|
|
const CSIBCVector4Dd & |
in_vct |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const CSIBCVector4Dd & |
in_vct, |
|
|
const CSIBCMatrix44d & |
in_mat |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const CSIBCMatrix44d & |
in_mat |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const CSIBCVector4Dd & |
in_vct, |
|
|
const double |
in_dFactor |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const double |
in_dFactor, |
|
|
const CSIBCVector4Dd & |
in_vct |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Mul |
( |
const double |
in_dFactor |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::MulComp |
( |
const CSIBCVector4Dd & |
in_vct |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::MulComp |
( |
const CSIBCVector4Dd & |
in_vct1, |
|
|
const CSIBCVector4Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Negate |
( |
void |
|
) |
|
|
|
Sets this vector to its negative. -
Returns:
-
CSIBCVector4Dd& Reference to this vector.
-
See also:
-
CSIBCVector4Dd::Negate
|
CSIBCVector4Dd & CSIBCVector4Dd::Negate |
( |
const CSIBCVector4Dd & |
in_vct |
) |
|
|
|
Sets this vector to the negative of in_vct . -
Parameters:
-
in_vct |
Vector containing the negative value for this vector. |
-
Returns:
-
CSIBCVector4Dd& Reference to this vector.
-
See also:
-
CSIBCVector4Dd::Negate
|
bool CSIBCVector4Dd::Normalize |
( |
void |
|
) |
|
|
bool CSIBCVector4Dd::operator!= |
( |
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd::AreAlmostEqual , CSIBCVector4Dd::operator==
|
bool CSIBCVector4Dd::operator== |
( |
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd::AreAlmostEqual , CSIBCVector4Dd::operator!=
|
void CSIBCVector4Dd::Set |
( |
const CSIBCVector4Dd & |
in_vct |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Set |
( |
const double |
in_dX, |
|
|
const double |
in_dY, |
|
|
const double |
in_dZ, |
|
|
const double |
in_dW |
|
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::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:
-
CSIBCVector4Dd& Reference to this vector.
-
See also:
-
CSIBCVector4Dd::Set , CSIBCVector4Dd::Get
|
bool CSIBCVector4Dd::SetLength |
( |
const double |
in_dLength |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::SetMinimal |
( |
const double |
in_dEpsilon = PICO_EPS |
) |
[inline] |
|
|
Sets each component of this vector to be at least in_dEpsilon (in absolute value). This does not change the sign of the component. -
Parameters:
-
in_dEpsilon |
Value for the minimum absolute value of each component. Defaults to PICO_EPS. |
-
Returns:
-
CSIBCVector4Dd& Reference to this vector
-
See also:
-
CSIBCVector4Dd::Set
|
CSIBCVector4Dd & CSIBCVector4Dd::SetNull |
( |
void |
|
) |
|
|
bool CSIBCVector4Dd::SetProjection |
( |
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd::SetOrthoProj
|
CSIBCVector4Dd & CSIBCVector4Dd::SetW |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::SetX |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::SetY |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::SetZ |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector4Dd & CSIBCVector4Dd::Sub |
( |
const CSIBCVector4Dd & |
in_vct1, |
|
|
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd& Reference to this vector.
-
See also:
-
CSIBCVector4Dd::Sub , CSIBCVector4Dd::Add
|
CSIBCVector4Dd & CSIBCVector4Dd::Sub |
( |
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd& Reference to this vector.
-
See also:
-
CSIBCVector4Dd::Sub , CSIBCVector4Dd::Add
|
Friends And Related Function Documentation
bool AreAlmostEqual |
( |
const CSIBCVector4Dd & |
in_vct1, |
|
|
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd::operator== , CSIBCVector4Dd::operator!=
|
double GetDistance |
( |
const CSIBCVector4Dd & |
in_v1, |
|
|
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd::GetSquaredDistance
|
double GetDot |
( |
const CSIBCVector4Dd & |
in_vct1, |
|
|
const CSIBCVector4Dd & |
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 . |
double GetSquaredDistance |
( |
const CSIBCVector4Dd & |
in_v1, |
|
|
const CSIBCVector4Dd & |
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:
-
CSIBCVector4Dd::GetDistance
|
The documentation for this class was generated from the following files:
- SIBCVector4Dd.h
- SIBCVector4Dd.cpp
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.