Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCVector2Dd Class Reference
General purpose 2D vector class.
More...
#include <SIBCVector2Dd.h>
List of all members.
Public Methods
- CSIBCVector2Dd ()
- CSIBCVector2Dd (const double in_dX, const double in_dY)
- CSIBCVector2Dd (const double in_dXY[2])
- CSIBCVector2Dd (int in_nIndex, double in_dVal)
- const double * GetArray () const
- double GetX (void) const
- double GetY (void) const
- double Get (const int in_nIndex) const
- void Get (double &out_dX, double &out_dY) 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
- CSIBCVector2Dd & SetX (const double in_dVal)
- CSIBCVector2Dd & SetY (const double in_dVal)
- CSIBCVector2Dd & Set (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & Set (const int in_nIndex, const double in_dVal)
- CSIBCVector2Dd & Set (const double in_dX, const double in_dY)
- CSIBCVector2Dd & SetNull (void)
- bool IsNull (const double in_dEpsilon=PICO_EPS) const
- CSIBCVector2Dd & SetMinimal (bool in_bInAbs=true, const double in_dEpsilon=PICO_EPS)
- CSIBCVector2Dd & SetMinimal (const CSIBCVector2Dd &in_vct, bool in_bInAbs=true)
- bool operator== (const CSIBCVector2Dd &in_vct) const
- bool operator!= (const CSIBCVector2Dd &in_vct) const
- CSIBCVector2Dd & Negate (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & Negate (void)
- double GetSquaredLength (void) const
- double GetLength (void) const
- bool SetLength (const double in_dLength)
- bool Normalize (void)
- CSIBCVector2Dd & Add (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & Add (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2)
- CSIBCVector2Dd & Sub (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & Sub (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2)
- CSIBCVector2Dd & Mul (const double in_dFactor)
- CSIBCVector2Dd & Mul (const double in_dFactor, const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & Mul (const CSIBCVector2Dd &in_vct, const double in_dFactor)
- CSIBCVector2Dd & Div (const double in_dFactor)
- CSIBCVector2Dd & Div (const CSIBCVector2Dd &in_vct, const double in_dFactor)
- CSIBCVector2Dd & MulComp (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2)
- CSIBCVector2Dd & MulComp (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & DivComp (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & DivComp (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2)
- CSIBCVector2Dd & Mul (const CSIBCVector3Dd &in_vct, const CSIBCRotMatd &in_mat)
- CSIBCVector2Dd & Mul (const CSIBCRotMatd &in_mat, const CSIBCVector3Dd &in_vct)
- bool SetProjection (const CSIBCVector2Dd &in_vct)
- CSIBCVector2Dd & SetMirror (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2)
- CSIBCVector2Dd & SetMidpoint (const CSIBCVector2Dd &in_pnt1, const CSIBCVector2Dd &in_pnt2)
- CSIBCVector2Dd & LinearPositionInterpolate (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2, const double in_dT)
- void SetBounds (const CSIBCVector2Dd &in_pnt, CSIBCVector2Dd &io_min, CSIBCVector2Dd &io_max)
- CSIBCVector2Dd & Combine (const CSIBCVector2Dd &in_vct1, const double in_dS1, const CSIBCVector2Dd &in_vct2, const double in_dS2)
- CSIBCVector2Dd & BsplinePositionInterpolate (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2, const CSIBCVector2Dd &in_vct3, const CSIBCVector2Dd &in_vct4, const double in_dT)
- CSIBCVector2Dd & BsplineVectorInterpolate (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2, const CSIBCVector2Dd &in_vct3, const CSIBCVector2Dd &in_vct4, const double in_dT)
Friends
- bool AreAlmostEqual (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2, const double in_dEpsilon=PICO_EPS)
- double GetDot (const CSIBCVector2Dd &in_vct1, const CSIBCVector2Dd &in_vct2)
- double GetDistance (const CSIBCVector2Dd &in_pnt1, const CSIBCVector2Dd &in_pnt2)
- double GetSquaredDistance (const CSIBCVector2Dd &in_pnt1, const CSIBCVector2Dd &in_pnt2)
- int Get2DPntSide (const CSIBCVector2Dd &in_pnt, const CSIBCVector2Dd &in_pntOrigin, const CSIBCVector2Dd &in_pntTip)
- bool FSegmentIntersect (const CSIBCVector2Dd &a0, const CSIBCVector2Dd &a1, const CSIBCVector2Dd &b0, const CSIBCVector2Dd &b1)
- bool ArePntsCollinear (const CSIBCVector2Dd &in_pnt1, const CSIBCVector2Dd &in_pnt2, const CSIBCVector2Dd &in_pnt3, const double in_dEpsilon=PICO_EPS)
Detailed Description
General purpose 2D vector class.
Representation of a 2D vector, defining operations to access, modify and perform calculations on 2D vectors. This class uses double precision floating-point numbers for represent its data, and in its operations. There are seperate similar classes for 3D and 4D vectors, CSIBCVector3Dd and CSIBCVector4Dd, 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
CSIBCVector2Dd::CSIBCVector2Dd |
( |
|
) |
|
|
|
Default constructor. Sets the values of each component of this vector to zero. |
CSIBCVector2Dd::CSIBCVector2Dd |
( |
const double |
in_dX, |
|
|
const double |
in_dY |
|
) |
|
|
|
Constructor. Sets the new vector to have i_fX and i_fY for its X and Y components, respectively. -
Parameters:
-
i_fX |
The value for the X component of the new vector. |
i_fY |
The value for the Y component of the new vector. |
|
CSIBCVector2Dd::CSIBCVector2Dd |
( |
const double |
in_dXY[2] |
) |
|
|
|
Constructor. Sets the new vector to have the X and Y values contained in the array in_dXY . -
Parameters:
-
in_dXY |
Array containing the X and Y values for the new vector. |
|
CSIBCVector2Dd::CSIBCVector2Dd |
( |
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
CSIBCVector2Dd & CSIBCVector2Dd::Add |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Add , CSIBCVector2Dd::Sub
|
CSIBCVector2Dd & CSIBCVector2Dd::Add |
( |
const CSIBCVector2Dd & |
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 CSIBCVector2Dd& Reference to this vector. |
-
See also:
-
CSIBCVector2Dd::Add , CSIBCVector2Dd::Sub
|
CSIBCVector2Dd & CSIBCVector2Dd::BsplinePositionInterpolate |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
in_vct2, |
|
|
const CSIBCVector2Dd & |
in_vct3, |
|
|
const CSIBCVector2Dd & |
in_vct4, |
|
|
const double |
in_dT |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::BsplineVectorInterpolate |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
in_vct2, |
|
|
const CSIBCVector2Dd & |
in_vct3, |
|
|
const CSIBCVector2Dd & |
in_vct4, |
|
|
const double |
in_dT |
|
) |
|
|
CSIBCVector2Dd& CSIBCVector2Dd::Combine |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const double |
in_dS1, |
|
|
const CSIBCVector2Dd & |
in_vct2, |
|
|
const double |
in_dS2 |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::Div |
( |
const CSIBCVector2Dd & |
in_vct, |
|
|
const double |
in_dFact |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::Div |
( |
const double |
in_dFact |
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::DivComp |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::DivComp |
( |
const CSIBCVector2Dd & |
in_vct |
) |
|
|
void CSIBCVector2Dd::Get |
( |
double & |
out_dX, |
|
|
double & |
out_dY |
|
) |
const |
|
double CSIBCVector2Dd::Get |
( |
const int |
in_nIndex |
) |
const |
|
const double * CSIBCVector2Dd::GetArray |
( |
|
) |
const |
|
|
Returns an array containing the X and Y 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 and Y components of this vector.
-
See also:
-
CSIBCVector2Dd::Get
|
int CSIBCVector2Dd::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).
-
See also:
-
CSIBCVector2Dd::GetMaxComponent , CSIBCVector2Dd::GetIndexOfMinComponent
|
int CSIBCVector2Dd::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).
-
See also:
-
CSIBCVector2Dd::GetMinComponent , CSIBCVector2Dd::GetIndexOfMaxComponent
|
double CSIBCVector2Dd::GetLength |
( |
void |
|
) |
const |
|
double CSIBCVector2Dd::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:
-
CSIBCVector2Dd::GetIndexOfMaxComponent , CSIBCVector2Dd::GetMinComponent
|
double CSIBCVector2Dd::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:
-
CSIBCVector2Dd::GetIndexOfMinComponent , CSIBCVector2Dd::GetMaxComponent
|
double CSIBCVector2Dd::GetSquaredLength |
( |
void |
|
) |
const |
|
double CSIBCVector2Dd::GetX |
( |
void |
|
) |
const |
|
double CSIBCVector2Dd::GetY |
( |
void |
|
) |
const |
|
bool CSIBCVector2Dd::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:
-
CSIBCVector2Dd::SetNull , CSIBCVector2Dd::AreAlmostEqual
|
CSIBCVector2Dd & CSIBCVector2Dd::LinearPositionInterpolate |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::SetMidpoint
|
|
Multiplies a 3x3 rotation matrix in_mat , into a 3D column vector, in_vct (in_mat * in_vct) , and stores the result in this vector. Since the output from this operation would normally be a 3D column vector, only the X and Y components of the result are used. -
Parameters:
-
in_mat |
Rotation matrix to multiply (on the left). |
in_vct |
Column vector to multiply (on the right). |
-
Returns:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Mul , CSIBCVector2Dd::MulComp , CSIBCVector2Dd::DivComp , CSIBCVector2Dd::Div
|
|
Multiplies a 3D row vector in_vct , into a 3x3 rotation matrix in_mat (in_vct * in_mat) , and stores the result in this vector. Since the output from this operation would normally be a 3D row vector, only the X and Y components of the result are used. -
Parameters:
-
in_vct |
Row vector to multiply (on the left). |
in_mat |
Rotation matrix to multiply (on the right). |
-
Returns:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Mul , CSIBCVector2Dd::MulComp , CSIBCVector2Dd::DivComp , CSIBCVector2Dd::Div
|
CSIBCVector2Dd & CSIBCVector2Dd::Mul |
( |
const CSIBCVector2Dd & |
in_vct, |
|
|
const double |
in_dFactor |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::Mul |
( |
const double |
in_dFactor, |
|
|
const CSIBCVector2Dd & |
in_vct |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::Mul |
( |
const double |
in_dFactor |
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::MulComp |
( |
const CSIBCVector2Dd & |
in_vct |
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::MulComp |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
in_vct2 |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::Negate |
( |
void |
|
) |
|
|
|
Sets this vector to its negative. -
Returns:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Negate
|
CSIBCVector2Dd & CSIBCVector2Dd::Negate |
( |
const CSIBCVector2Dd & |
in_vct |
) |
|
|
|
Sets this vector to the negative of in_vct . -
Parameters:
-
in_vct |
Vector containing the negative value for this vector. |
-
Returns:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Negate
|
bool CSIBCVector2Dd::Normalize |
( |
void |
|
) |
|
|
bool CSIBCVector2Dd::operator!= |
( |
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd::AreAlmostEqual , CSIBCVector2Dd::operator==
|
bool CSIBCVector2Dd::operator== |
( |
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd::AreAlmostEqual , CSIBCVector2Dd::operator!=
|
CSIBCVector2Dd & CSIBCVector2Dd::Set |
( |
const double |
in_dX, |
|
|
const double |
in_dY |
|
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::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). |
in_dVal |
The value to set the component to. |
-
Returns:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Set , CSIBCVector2Dd::Get
|
CSIBCVector2Dd & CSIBCVector2Dd::Set |
( |
const CSIBCVector2Dd & |
in_vct |
) |
|
|
void CSIBCVector2Dd::SetBounds |
( |
const CSIBCVector2Dd & |
in_pnt, |
|
|
CSIBCVector2Dd & |
io_min, |
|
|
CSIBCVector2Dd & |
io_max |
|
) |
|
|
bool CSIBCVector2Dd::SetLength |
( |
const double |
in_dLength |
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::SetMidpoint |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
in_vct2 |
|
) |
|
|
|
Sets this vector to the midpoint between the two points in_pnt1 and in_pnt2 . -
Parameters:
-
in_pnt1 |
First point for midpoint determination. |
in_pnt2 |
Second point for midpoint determination. |
-
Returns:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::LinearPositionInterpolate
|
CSIBCVector2Dd & CSIBCVector2Dd::SetMinimal |
( |
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::SetMinimal , CSIBCVector2Dd::AreAlmostEqual
|
CSIBCVector2Dd & CSIBCVector2Dd::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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::SetMinimal , CSIBCVector2Dd::AreAlmostEqual
|
CSIBCVector2Dd & CSIBCVector2Dd::SetMirror |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::SetProjection
|
CSIBCVector2Dd & CSIBCVector2Dd::SetNull |
( |
void |
|
) |
|
|
bool CSIBCVector2Dd::SetProjection |
( |
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd::SetMirror
|
CSIBCVector2Dd & CSIBCVector2Dd::SetX |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::SetY |
( |
const double |
in_dVal |
) |
|
|
CSIBCVector2Dd & CSIBCVector2Dd::Sub |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Sub , CSIBCVector2Dd::Add
|
CSIBCVector2Dd & CSIBCVector2Dd::Sub |
( |
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd& Reference to this vector.
-
See also:
-
CSIBCVector2Dd::Sub , CSIBCVector2Dd::Add
|
Friends And Related Function Documentation
bool AreAlmostEqual |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
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:
-
CSIBCVector2Dd::operator== , CSIBCVector2Dd::operator!=
|
bool ArePntsCollinear |
( |
const CSIBCVector2Dd & |
in_pnt1, |
|
|
const CSIBCVector2Dd & |
in_pnt2, |
|
|
const CSIBCVector2Dd & |
in_pnt3, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
bool FSegmentIntersect |
( |
const CSIBCVector2Dd & |
a0, |
|
|
const CSIBCVector2Dd & |
a1, |
|
|
const CSIBCVector2Dd & |
b0, |
|
|
const CSIBCVector2Dd & |
b1 |
|
) |
[friend] |
|
|
Determines whether two 2D line segments intersect. -
Parameters:
-
a0 |
The starting point of the first line segment. |
a1 |
The ending point of the first line segment. |
b0 |
The starting point of the second line segment. |
b1 |
The ending point of the second line segment. |
-
Returns:
-
bool true if the line segments intersect, false otherwise.
-
See also:
-
CSIBCVector2Dd::Get2DPntSide
|
int Get2DPntSide |
( |
const CSIBCVector2Dd & |
in_pnt, |
|
|
const CSIBCVector2Dd & |
in_pntOrigin, |
|
|
const CSIBCVector2Dd & |
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 the XY plane. |
in_pntTip |
Ending point of the vector in the XY plane. |
-
Returns:
-
int The side that the point is on. (-1 == right side, 1 == left side).
-
See also:
-
CSIBCVector2Dd::FSegmentIntersect
|
double GetDistance |
( |
const CSIBCVector2Dd & |
in_v1, |
|
|
const CSIBCVector2Dd & |
in_v2 |
|
) |
[friend] |
|
|
Computes the distance between two points in 2D 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 2D space.
-
See also:
-
CSIBCVector2Dd::GetSquaredDistance
|
double GetDot |
( |
const CSIBCVector2Dd & |
in_vct1, |
|
|
const CSIBCVector2Dd & |
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 CSIBCVector2Dd & |
in_v1, |
|
|
const CSIBCVector2Dd & |
in_v2 |
|
) |
[friend] |
|
|
Computes the squared distance between two points in 2D 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 2D space.
-
See also:
-
CSIBCVector2Dd::GetDistance
|
The documentation for this class was generated from the following files:
- SIBCVector2Dd.h
- SIBCVector2Dd.cpp
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.