CSIBCVector2Dd Class Reference

General purpose 2D vector class. More...

#include <SIBCVector2Dd.h>

List of all members.

Public Member Functions

  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 (  ) 

Default constructor. Sets the values of each component of this vector to zero.

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:
[in]  in_dX  The value for the X component of the new vector.
[in]  in_dY  The value for the Y component of the new vector.

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]  in_dXY  Array containing the X and Y values for the new vector.

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]  in_nIndex  Index of the component to set to in_dVal. (0 == X, 1 == Y).
[in]  in_dVal  Value to set


Member Function Documentation

const double* 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:
Array containing the X and Y components of this vector.
See also:
CSIBCVector2Dd::Get

double GetX ( void   )  const

Returns the X component of this vector.

Returns:
Value of the X component of this vector.
See also:
CSIBCVector2Dd::GetY

CSIBCVector2Dd::SetX

CSIBCVector2Dd::Get

double GetY ( void   )  const

Returns the Y component of this vector.

Returns:
Value of the Y component of this vector.
See also:
CSIBCVector2Dd::GetX

CSIBCVector2Dd::SetY

CSIBCVector2Dd::Get

double Get ( const int  in_nIndex  )  const

Returns the value of the component specified by in_nIndex.

Parameters:
[in]  in_nIndex  Index of the component value to get (0 == X, 1 == Y).
Returns:
Value of the component specified by in_nIndex.
See also:
CSIBCVector2Dd::GetX

CSIBCVector2Dd::GetY

CSIBCVector2Dd::Set

void Get ( double &  out_dX,
double &  out_dY  
) const

Returns the values of the X and Y components of this vector.

Parameters:
[out]  out_dX  Receives the value of the X component
[out]  out_dY  Receives the value of the Y component
See also:
CSIBCVector2Dd::GetX

CSIBCVector2Dd::GetY

CSIBCVector2Dd::Set

double GetMaxComponent ( bool  in_bInAbs = true  )  const

Returns the value of largest component of the vector.

Parameters:
[in]  in_bInAbs  true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true.
Returns:
The value (or absolute value if in_bInAbs is true) of the largest component of the vector.
See also:
CSIBCVector2Dd::GetIndexOfMaxComponent

CSIBCVector2Dd::GetMinComponent

double GetMinComponent ( bool  in_bInAbs = true  )  const

Returns the value of smallest component of the vector.

Parameters:
[in]  in_bInAbs  true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true.
Returns:
The value (or absolute value if in_bInAbs is true) of the smallest component of the vector.
See also:
CSIBCVector2Dd::GetIndexOfMinComponent

CSIBCVector2Dd::GetMaxComponent

int GetIndexOfMaxComponent ( bool  in_bInAbs = true  )  const

Returns the index of the largest component of the vector.

Parameters:
[in]  in_bInAbs  true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true.
Returns:
Index of the largest component of the vector (0 == X, 1 == Y).
See also:
CSIBCVector2Dd::GetMaxComponent

CSIBCVector2Dd::GetIndexOfMinComponent

int GetIndexOfMinComponent ( bool  in_bInAbs = true  )  const

Returns the index of the smallest component of the vector.

Parameters:
[in]  in_bInAbs  true if comparisons should be made with absolute values, false if comparisons should be made without absolute values. Defaults to true.
Returns:
Index of the smallest component of the vector (0 == X, 1 == Y).
See also:
CSIBCVector2Dd::GetMinComponent

CSIBCVector2Dd::GetIndexOfMaxComponent

CSIBCVector2Dd& SetX ( const double  in_dVal  ) 

Sets the value of the X component of this vector.

Parameters:
[in]  in_dVal  The new value of the X component of this vector.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::SetY

CSIBCVector2Dd::Set

CSIBCVector2Dd::GetX

CSIBCVector2Dd& SetY ( const double  in_dVal  ) 

Sets the value of the Y component of this vector.

Parameters:
[in]  in_dVal  The new value of the Y component of this vector.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::SetX

CSIBCVector2Dd::Set

CSIBCVector2Dd::GetY

CSIBCVector2Dd& Set ( const CSIBCVector2Dd in_vct  ) 

Sets the value of this vector to the value of in_vct.

Parameters:
[in]  in_vct  Vector to set this vector equal to.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Set

CSIBCVector2Dd::SetX

CSIBCVector2Dd::SetY

CSIBCVector2Dd::Get

CSIBCVector2Dd& Set ( const int  in_nIndex,
const double  in_dVal  
)

Sets the component given by in_nIndex to in_dVal.

Parameters:
[in]  in_nIndex  The index of the component to set (0 == X, 1 == Y).
[in]  in_dVal  The value to set the component to.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Set

CSIBCVector2Dd::Get

CSIBCVector2Dd& Set ( const double  in_dX,
const double  in_dY  
)

Sets the X and Y components of the vector.

Parameters:
[in]  in_dX  The value for the X component of the vector.
[in]  in_dY  The value for the Y component of the vector.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Set

CSIBCVector2Dd::GetX

CSIBCVector2Dd::GetY

CSIBCVector2Dd::Get

CSIBCVector2Dd& SetNull ( void   ) 

Sets all the components of this vector to zero.

Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::IsNull

CSIBCVector2Dd::Set

bool 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]  in_dEpsilon  Floating-point comparison error range. Defaults to PICO_EPS.
Return values:
true  if the vector is null
false  otherwise
See also:
CSIBCVector2Dd::SetNull

CSIBCVector2Dd::AreAlmostEqual

CSIBCVector2Dd & SetMinimal ( bool  in_bInAbs = true,
const double  in_dEpsilon = PICO_EPS  
) [inline]

Ensures 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]  in_bInAbs  true if comparisons are done with absolute values, false if comparisons are done without absolute values. Defaults to true.
[in]  in_dEpsilon  Minimal value for components of this vector. Defaults to PICO_EPS.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::SetMinimal

CSIBCVector2Dd::AreAlmostEqual

CSIBCVector2Dd& SetMinimal ( const CSIBCVector2Dd in_vct,
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]  in_vct  Vector containing minimal component values.
[in]  in_bInAbs  true if comparisons are done with absolute values, false if comparisons are done without absolute values. Defaults to true.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::SetMinimal

CSIBCVector2Dd::AreAlmostEqual

bool operator== ( const CSIBCVector2Dd in_vct  )  const

Determines whether all corresponding components of this vector and in_vct are exactly equal.

Parameters:
[in]  in_vct  The vector to compare equality with.
Return values:
true  if the vectors are exactly equal
false  otherwise
See also:
CSIBCVector2Dd::AreAlmostEqual

CSIBCVector2Dd::operator!=

bool operator!= ( const CSIBCVector2Dd in_vct  )  const

Determines whether any corresponding components of this vector and in_vct are different.

Parameters:
[in]  in_vct  The vector to compare inequality with.
Return values:
true  if the vectors differ in any component
false  otherwise
See also:
CSIBCVector2Dd::AreAlmostEqual

CSIBCVector2Dd::operator==

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:
Reference to this vector.
See also:
CSIBCVector2Dd::Negate

CSIBCVector2Dd& Negate ( void   ) 

Sets this vector to its negative.

Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Negate

double GetSquaredLength ( void   )  const

Gets the squared length of this vector.

Returns:
The squared length of this vector.
See also:
CSIBCVector2Dd::GetLength

CSIBCVector2Dd::SetLength

CSIBCVector2Dd::Normalize

double GetLength ( void   )  const

Returns the length of this vector.

Returns:
The squared length of this vector.
See also:
CSIBCVector2Dd::GetSquaredLength

CSIBCVector2Dd::SetLength

CSIBCVector2Dd::Normalize

bool SetLength ( const double  in_dLength  ) 

Sets the length of this vector.

Parameters:
[in]  in_dLength  New length for this vector.
Return values:
true  if the length was set properly
false  if the length of the current vector is zero
See also:
CSIBCVector2Dd::Normalize

CSIBCVector2Dd::GetLength

bool Normalize ( void   ) 

Sets the vector to be a unit vector.

Return values:
true  if the length was set properly
false  if the length of the current vector is zero
See also:
CSIBCVector2Dd::SetLength

CSIBCVector2Dd::GetLength

CSIBCVector2Dd& Add ( const CSIBCVector2Dd in_vct  ) 

Adds this vector and in_vct. The result is stored in this vector.

Parameters:
[in]  in_vct  Vector to add to this vector. return Reference to this vector.
See also:
CSIBCVector2Dd::Add

CSIBCVector2Dd::Sub

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]  in_vct1  First vector in the addition.
[in]  in_vct2  Second vector in the addition.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Add

CSIBCVector2Dd::Sub

CSIBCVector2Dd& Sub ( const CSIBCVector2Dd in_vct  ) 

Subtracts in_vct from this vector. The result is stored in this vector.

Parameters:
[in]  in_vct  Vector to subtract from this vector.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Sub

CSIBCVector2Dd::Add

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]  in_vct1  First vector for the subtraction.
[in]  in_vct2  Second vector for the subtraction.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Sub

CSIBCVector2Dd::Add

CSIBCVector2Dd& Mul ( const double  in_dFactor  ) 

Multiplies each component of this vector by in_dFactor. The result is stored in this vector.

Parameters:
[in]  in_dFactor  Factor to multiply the components of this vector by.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Mul

CSIBCVector2Dd::Div

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd& Mul ( const double  in_dFactor,
const CSIBCVector2Dd in_vct  
)

Multiplies each of the components in in_vct by in_dFactor. The result is stored in this vector.

Parameters:
[in]  in_dFactor  Factor to multiply the components of in_vct by.
[in]  in_vct  Vector to multiply.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Mul

CSIBCVector2Dd::Div

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd& Mul ( const CSIBCVector2Dd in_vct,
const double  in_dFactor  
)

Multiplies each of the components in in_vct by in_dFactor. The result is stored in this vector.

Parameters:
[in]  in_vct  Vector to multiply.
[in]  in_dFactor  Factor to multiply the components of in_vct by.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Mul

CSIBCVector2Dd::Div

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd& Div ( const double  in_dFactor  ) 

Divides each component of this vector by in_dFactor. The result is stored in this vector.

Parameters:
[in]  in_dFactor  Factor to divide the components of this vector by.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Div

CSIBCVector2Dd::Mul

CSIBCVector2Dd::DivComp

CSIBCVector2Dd::MulComp

CSIBCVector2Dd& Div ( const CSIBCVector2Dd in_vct,
const double  in_dFactor  
)

Divides each component of in_vct by in_dFactor. The result is stored in this vector.

Parameters:
[in]  in_vct  Vector to divide.
[in]  in_dFactor  Factor to divide the components of this vector by.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Div

CSIBCVector2Dd::Mul

CSIBCVector2Dd::DivComp

CSIBCVector2Dd::MulComp

CSIBCVector2Dd& MulComp ( const CSIBCVector2Dd in_vct1,
const CSIBCVector2Dd in_vct2  
)

Multiplies each component of in_vct1 by the corresponding component in in_vct2. The result is stored in this vector.

Parameters:
[in]  in_vct1  First vector to multiply the components of.
[in]  in_vct2  Second vector to multiply the components of.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd::Mul

CSIBCVector2Dd::Div

CSIBCVector2Dd& MulComp ( const CSIBCVector2Dd in_vct  ) 

Multiplies each component of in_vct by the corresponding component in this vector. The result is stored in this vector.

Parameters:
[in]  in_vct  Vector to multiply the components of.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd::Mul

CSIBCVector2Dd::Div

CSIBCVector2Dd& DivComp ( const CSIBCVector2Dd in_vct  ) 

Divides each component of this vector by the corresponding component in in_vct. The result is stored in this vector.

Parameters:
[in]  in_vct  Vector to divide the components of this vector by.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::DivComp

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::Div

CSIBCVector2Dd::Mul

CSIBCVector2Dd& DivComp ( const CSIBCVector2Dd in_vct1,
const CSIBCVector2Dd in_vct2  
)

Divides each component of in_vct1 by the corresponding component in in_vct2. The result is stored in this vector.

Parameters:
[in]  in_vct1  Vector to be divided by the components of in_vct2
[in]  in_vct2  Vector to divide the components of in_vct1 by.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::DivComp

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::Div

CSIBCVector2Dd::Mul

CSIBCVector2Dd& Mul ( const CSIBCVector3Dd in_vct,
const CSIBCRotMatd in_mat  
)

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]  in_vct  Row vector to multiply (on the left).
[in]  in_mat  Rotation matrix to multiply (on the right).
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Mul

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd::Div

CSIBCVector2Dd& Mul ( const CSIBCRotMatd in_mat,
const CSIBCVector3Dd in_vct  
)

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]  in_mat  Rotation matrix to multiply (on the left).
[in]  in_vct  Column vector to multiply (on the right).
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::Mul

CSIBCVector2Dd::MulComp

CSIBCVector2Dd::DivComp

CSIBCVector2Dd::Div

bool SetProjection ( const CSIBCVector2Dd in_vct  ) 

Projects this vector onto in_vct. The projected vector is stored in this vector.

Parameters:
[in]  in_vct  Vector to project this vector onto.
Return values:
true  if the vector is projected
false  if the input vector is the null vector, in which case this vector keeps its original value
See also:
CSIBCVector2Dd::SetMirror

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]  in_vct1  First vector in the computation.
[in]  in_vct2  Second vector in the computation.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::SetProjection

CSIBCVector2Dd& SetMidpoint ( const CSIBCVector2Dd in_pnt1,
const CSIBCVector2Dd in_pnt2  
)

Sets this vector to the midpoint between the two points in_pnt1 and in_pnt2.

Parameters:
[in]  in_pnt1  First point for midpoint determination.
[in]  in_pnt2  Second point for midpoint determination.
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::LinearPositionInterpolate

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]  in_vct1  Starting point for the interpolation.
[in]  in_vct2  Ending point for the interpolation.
[in]  in_dT  Interpolation point between the vectors, in the range [0.0f, 1.0f].
Returns:
Reference to this vector.
See also:
CSIBCVector2Dd::SetMidpoint

void SetBounds ( const CSIBCVector2Dd in_pnt,
CSIBCVector2Dd io_min,
CSIBCVector2Dd io_max  
)

Not implemented yet.

Parameters:
in_pnt  n/a
io_min  n/a
io_max  n/a

CSIBCVector2Dd& Combine ( const CSIBCVector2Dd in_vct1,
const double  in_dS1,
const CSIBCVector2Dd in_vct2,
const double  in_dS2  
)

Not implemented yet.

Parameters:
in_vct1  n/a
in_dS1  n/a
in_vct2  n/a
in_dS2  n/a

CSIBCVector2Dd& BsplinePositionInterpolate ( const CSIBCVector2Dd in_vct1,
const CSIBCVector2Dd in_vct2,
const CSIBCVector2Dd in_vct3,
const CSIBCVector2Dd in_vct4,
const double  in_dT  
)

Not implemented yet.

Parameters:
in_vct1  n/a
in_vct2  n/a
in_vct3  n/a
in_vct4  n/a
in_dT  n/a

CSIBCVector2Dd& BsplineVectorInterpolate ( const CSIBCVector2Dd in_vct1,
const CSIBCVector2Dd in_vct2,
const CSIBCVector2Dd in_vct3,
const CSIBCVector2Dd in_vct4,
const double  in_dT  
)

Not implemented yet.

Parameters:
in_vct1  n/a
in_vct2  n/a
in_vct3  n/a
in_vct4  n/a
in_dT  n/a


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]  in_vct1  First vector for equality comparison.
[in]  in_vct2  Second vector for equality comparison.
[in]  in_dEpsilon  Floating-point comparison error range. Defaults to PICO_EPS.
Return values:
true  if the vectors are equal
false  otherwise
See also:
CSIBCVector2Dd::operator==

CSIBCVector2Dd::operator!=

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]  in_vct1  First vector in the dot product.
[in]  in_vct2  Second vector in the dot product.
Returns:
The dot product between in_vct1 and in_vct2.

double GetDistance ( const CSIBCVector2Dd in_pnt1,
const CSIBCVector2Dd in_pnt2  
) [friend]

Computes the distance between two points in 2D space given by in_pnt1 and in_pnt2.

Parameters:
[in]  in_pnt1  Starting point for distance calculation.
[in]  in_pnt2  Ending point for distance calculation.
Returns:
The scalar distance between the two points, in 2D space.
See also:
CSIBCVector2Dd::GetSquaredDistance

double GetSquaredDistance ( const CSIBCVector2Dd in_pnt1,
const CSIBCVector2Dd in_pnt2  
) [friend]

Computes the squared distance between two points in 2D space given by in_pnt1 and in_pnt2.

Parameters:
[in]  in_pnt1  Starting point for distance calculation.
[in]  in_pnt2  Ending point for distance calculation.
Returns:
The squared scalar distance between the two points, in 2D space.
See also:
CSIBCVector2Dd::GetDistance

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]  in_pnt  Point to determine which side of the vector it is on.
[in]  in_pntOrigin  Staring point of the vector in the XY plane.
[in]  in_pntTip  Ending point of the vector in the XY plane.
Return values:
\c  -1 if the point is on the right side
\c  1 if the point is on the left side
See also:
CSIBCVector2Dd::FSegmentIntersect

bool FSegmentIntersect ( const CSIBCVector2Dd a0,
const CSIBCVector2Dd a1,
const CSIBCVector2Dd b0,
const CSIBCVector2Dd b1  
) [friend]

Determines whether two 2D line segments intersect.

Parameters:
[in]  a0  The starting point of the first line segment.
[in]  a1  The ending point of the first line segment.
[in]  b0  The starting point of the second line segment.
[in]  b1  The ending point of the second line segment.
Return values:
true  if the line segments intersect
false  otherwise
See also:
CSIBCVector2Dd::Get2DPntSide

bool ArePntsCollinear ( const CSIBCVector2Dd in_pnt1,
const CSIBCVector2Dd in_pnt2,
const CSIBCVector2Dd in_pnt3,
const double  in_dEpsilon = PICO_EPS  
) [friend]

Not implemented yet.

Parameters:
in_pnt1  n/a
in_pnt2  n/a
in_pnt3  n/a
in_dEpsilon  n/a


The documentation for this class was generated from the following file: