Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

CSIBCVectorwd Class Reference

General purpose 3D vector class, with implicit W component. More...

#include <SIBCVectorwd.h>

List of all members.

Public Methods

Friends


Detailed Description

General purpose 3D vector class, with implicit W component.

Representation of a 3D vector, with an implicit W componennt, defining operations to access, modify and perform calculations on 3D vectors. This class uses double precision floating-point numbers for represent its data, and in its operations. There are seperate similar classes for 2D and 4D vectors, CSIBCVector2Dd and CSIBCVector4Dd, respectively, which also use double precision, and also a 3D vector class that does not have an implicit W component, CSIBCVector3Dd.

Furthermore, there is another set of vector classes which use single precision floating-point numbers, CSIBCVector2D, CSIBCVector3D and CSIBCVector4D for 2D, 3D and 4D vectors respectively. Quaternions represented as 4D vectors are also available in CSIBCQuaternion and CSIBCQuaterniond with single precision and double precision, repspectively.


Constructor & Destructor Documentation

CSIBCVectorwd::CSIBCVectorwd  
 

Default Constructor. Constructs a new 3D vector.

CSIBCVectorwd::CSIBCVectorwd const double    in_dX,
const double    in_dY,
const double    in_dZ,
const double    in_dW
 

Constructor. Constructs a new 3D vector, with in_dX, in_dY, in_dZ and in_dW as the X, Y, Z and W component values, respectively.

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.


Member Function Documentation

CSIBCVectorwd & CSIBCVectorwd::Add const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Adds in_vct1 and in_vct2. The W components are not added, and the W component of the resultant is taken from this vector. The result is stored in this vector.

Parameters:
in_vct1  First vector in the addition.
in_vct2  Second vector in the addition.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Add , CSIBCVectorwd::Sub

CSIBCVectorwd & CSIBCVectorwd::Add const CSIBCVectorwd &    in_vct
 

Adds this vector and in_vct. The W components are not added, and the W component of the resultant is taken from this vector. The result is stored in this vector.

Parameters:
in_vct  Vector to add to this vector. return CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Add , CSIBCVectorwd::Sub

bool CSIBCVectorwd::AreAlmostEqual const CSIBCVectorwd &    in_vct,
const double    in_dEpsilon = PICO_EPS
 

Determines whether all corresponding components of this vector and in_vct are equal. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison.

Parameters:
in_vct  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:
CSIBCVectorwd::operator== , CSIBCVectorwd::operator!=

CSIBCVectorwd& CSIBCVectorwd::BsplinePositionInterpolate const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2,
const CSIBCVectorwd &    in_vct3,
const CSIBCVectorwd &    in_vct4,
const double    in_dT
 

Not implemented yet.

CSIBCVectorwd& CSIBCVectorwd::Combine const CSIBCVectorwd &    in_vct1,
const double    in_dS1,
const CSIBCVectorwd &    in_vct2,
const double    in_dS2
 

Not implemented yet.

CSIBCVectorwd & CSIBCVectorwd::Div const double    in_dFactor,
const CSIBCVectorwd &    in_vct
 

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

Parameters:
in_vct  Vector to divide.
in_dFactor  Factor to divide the components of this vector by.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Div , CSIBCVectorwd::Mul , CSIBCVectorwd::DivComp , CSIBCVectorwd::MulComp

CSIBCVectorwd & CSIBCVectorwd::Div const double    in_dFact
 

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

Parameters:
in_dFactor  Factor to divide the components of this vector by.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Div , CSIBCVectorwd::Mul , CSIBCVectorwd::DivComp , CSIBCVectorwd::MulComp

CSIBCVectorwd & CSIBCVectorwd::DivComp const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Divides each component of in_vct1 by the corresponding component in in_vct2, except for the W component which is set to the W component of this vector. The result is stored in this vector.

Parameters:
in_vct1  Vector to be divided by the components of in_vct2
in_vct2  Vector to divide the components of in_vct1 by.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::DivComp , CSIBCVectorwd::MulComp , CSIBCVectorwd::Div , CSIBCVectorwd::Mul

CSIBCVectorwd & CSIBCVectorwd::DivComp const CSIBCVectorwd &    in_vct
 

Divides each component of this vector by the corresponding component in in_vct, except for the W component which is set to the W component of this vector. The result is stored in this vector.

Parameters:
in_vct  Vector to divide the components of this vector by.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::DivComp , CSIBCVectorwd::MulComp , CSIBCVectorwd::Div , CSIBCVectorwd::Mul

void CSIBCVectorwd::Get double &    out_dX,
double &    out_dY,
double &    out_dZ,
double &    out_dW
const
 

Gets the values of the X, Y, Z and W components of this vector.

Parameters:
out_dX  Receives the value of the X component
out_dY  Receives the value of the Y component
out_dZ  Receives the value of the Z component
out_dW  Receives the value of the W component
See also:
CSIBCVectorwd::GetX , CSIBCVectorwd::GetY , CSIBCVectorwd::GetZ , CSIBCVectorwd::GetW , CSIBCVectorwd::Set

double CSIBCVectorwd::Get const int    in_nIndex const
 

Gets the value of the component specified by in_nIndex.

Parameters:
in_nIndex  Index of the component value to get (0 == X, 1 == Y, 2 == Z, 3 == W).
Returns:
double Value of the component specified by in_nIndex.
See also:
CSIBCVectorwd::GetX , CSIBCVectorwd::GetY , CSIBCVectorwd::GetZ , CSIBCVectorwd::GetW , CSIBCVectorwd::Set

double CSIBCVectorwd::GetLength void    const
 

Gets the length of this vector.

Returns:
double The squared length of this vector.
See also:
CSIBCVectorwd::GetSquaredLength , CSIBCVectorwd::SetLength , CSIBCVectorwd::Normalize

double CSIBCVectorwd::GetW void    const
 

Gets the W component of this vector.

Returns:
Value of the W component of this vector.
See also:
CSIBCVectorwd::GetX , CSIBCVectorwd::GetY , CSIBCVectorwd::GetZ , CSIBCVectorwd::SetW , CSIBCVectorwd::Get

double CSIBCVectorwd::GetX void    const
 

Gets the X component of this vector.

Returns:
Value of the X component of this vector.
See also:
CSIBCVectorwd::GetY , CSIBCVectorwd::GetZ , CSIBCVectorwd::GetW , CSIBCVectorwd::SetX , CSIBCVectorwd::Get

double CSIBCVectorwd::GetY void    const
 

Gets the Y component of this vector.

Returns:
Value of the Y component of this vector.
See also:
CSIBCVectorwd::GetX , CSIBCVectorwd::GetZ , CSIBCVectorwd::GetW , CSIBCVectorwd::SetY , CSIBCVectorwd::Get

double CSIBCVectorwd::GetZ void    const
 

Gets the Z component of this vector.

Returns:
Value of the Z component of this vector.
See also:
CSIBCVectorwd::GetX , CSIBCVectorwd::GetY , CSIBCVectorwd::GetW , CSIBCVectorwd::SetZ , CSIBCVectorwd::Get

bool CSIBCVectorwd::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:
CSIBCVectorwd::SetNull , CSIBCVectorwd::AreAlmostEqual

CSIBCVectorwd & CSIBCVectorwd::LinearPositionInterpolate const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2,
const double    in_dT
 

Computes the linear interpolation between the two vectors in_vct1 and in_vct2, at a point in_dT between the two vectors. The W component is unaffected and taken from the current vector.

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:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::SetMidpoint

CSIBCVectorwd & CSIBCVectorwd::Mul const CSIBCVectorwd &    in_vct,
const double    in_dFactor
 

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

Parameters:
in_vct  Vector to multiply.
in_dFactor  Factor to multiply the components of in_vct by.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Mul , CSIBCVectorwd::Div , CSIBCVectorwd::MulComp , CSIBCVectorwd::DivComp

CSIBCVectorwd & CSIBCVectorwd::Mul const double    in_dFactor,
const CSIBCVectorwd &    in_vct
 

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

Parameters:
in_dFactor  Factor to multiply the components of in_vct by.
in_vct  Vector to multiply.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Mul , CSIBCVectorwd::Div , CSIBCVectorwd::MulComp , CSIBCVectorwd::DivComp

CSIBCVectorwd & CSIBCVectorwd::Mul const double    in_dFactor
 

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

Parameters:
in_dFactor  Factor to multiply the components of this vector by.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Mul , CSIBCVectorwd::Div , CSIBCVectorwd::MulComp , CSIBCVectorwd::DivComp

CSIBCVectorwd & CSIBCVectorwd::MulComp const CSIBCVectorwd &    in_vct
 

Multiplies each component of in_vct by the corresponding component in this vector, except for the W component which is set to the W component of this vector. The result is stored in this vector.

Parameters:
in_vct  Vector to multiply the components of.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::MulComp , CSIBCVectorwd::DivComp , CSIBCVectorwd::Mul , CSIBCVectorwd::Div

CSIBCVectorwd & CSIBCVectorwd::MulComp const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Multiplies each component of in_vct1 by the corresponding component in in_vct2, except for the W component which is set to the W component of this vector. The result is stored in this vector.

Parameters:
in_vct1  First vector to multiply the components of.
in_vct2  Second vector to multiply the components of.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::MulComp , CSIBCVectorwd::DivComp , CSIBCVectorwd::Mul , CSIBCVectorwd::Div

CSIBCVectorwd & CSIBCVectorwd::Negate void   
 

Sets this vector to its negative.

Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Negate

bool CSIBCVectorwd::Normalize void   
 

Sets the vector to be a unit vector.

Returns:
bool true if the length was set properly, false if the length of the current vector is zero.
See also:
CSIBCVectorwd::SetLength , CSIBCVectorwd::GetLength

bool CSIBCVectorwd::operator!= const CSIBCVectorwd &    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:
CSIBCVectorwd::AreAlmostEqual , CSIBCVectorwd::operator==

bool CSIBCVectorwd::operator== const CSIBCVectorwd &    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:
CSIBCVectorwd::AreAlmostEqual , CSIBCVectorwd::operator!=

CSIBCVectorwd & CSIBCVectorwd::Set const double    in_dX,
const double    in_dY,
const double    in_dZ,
const double    in_dW
 

Sets the X, Y, Z and W components of the vector.

Parameters:
in_dX  The value for the X component of the vector.
in_dY  The value for the Y component of the vector.
in_dZ  The value for the Z component of the vector.
in_dW  The value for the W component of the vector.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Set , CSIBCVectorwd::SetX , CSIBCVectorwd::SetY , CSIBCVectorwd::SetZ , CSIBCVectorwd::SetW , CSIBCVectorwd::Get

CSIBCVectorwd & CSIBCVectorwd::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, 3 == W).
in_dVal  The value to set the component to.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Set , CSIBCVectorwd::Get

void CSIBCVectorwd::SetBounds const CSIBCVectorwd &    in_pnt,
CSIBCVectorwd &    io_min,
CSIBCVectorwd &    io_max
 

Not implemented yet.

bool CSIBCVectorwd::SetLength const double    in_dLength
 

Sets the length of this vector.

Parameters:
in_dLength  New length for this vector.
Returns:
bool true if the length was set properly, false if the length of the current vector is zero.
See also:
CSIBCVectorwd::Normalize , CSIBCVectorwd::GetLength

CSIBCVectorwd & CSIBCVectorwd::SetMidpoint const CSIBCVectorwd &    in_pnt1,
const CSIBCVectorwd &    in_pnt2
 

Sets this vector to the midpoint between the two points in_pnt1 and in_pnt2. The W component for the resultant is taken from the current vector.

Parameters:
in_pnt1  First point for midpoint determination.
in_pnt2  Second point for midpoint determination.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::SetMean , CSIBCVectorwd::LinearPositionInterpolate

CSIBCVectorwd & CSIBCVectorwd::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:
CSIBCVectorwd& Reference to this vector
See also:
CSIBCVectorwd::Set

CSIBCVectorwd& CSIBCVectorwd::SetMirror const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Not implemented yet.

CSIBCVectorwd & CSIBCVectorwd::SetNull void   
 

Sets all the components of this vector to zero.

Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::IsNull , CSIBCVectorwd::Set

bool CSIBCVectorwd::SetOrthogonal const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Not implemented yet.

bool CSIBCVectorwd::SetOrthoProj const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Not implemented yet.

CSIBCVectorwd& CSIBCVectorwd::SetProjection const CSIBCVectorwd &    in_vct
 

Not implemented yet.

CSIBCVectorwd & CSIBCVectorwd::SetW const double    in_dVal
 

Sets the value of the W component of this vector.

Parameters:
in_dVal  The new value of the W component of this vector.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::SetX , CSIBCVectorwd::SetY , CSIBCVectorwd::SetZ , CSIBCVectorwd::Set , CSIBCVectorwd::GetW

CSIBCVectorwd & CSIBCVectorwd::SetX const double    in_dVal
 

Sets the value of the X component of this vector.

Parameters:
in_dVal  The new value of the X component of this vector.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::SetY , CSIBCVectorwd::SetZ , CSIBCVectorwd::SetW , CSIBCVectorwd::Set , CSIBCVectorwd::GetX

CSIBCVectorwd & CSIBCVectorwd::SetY const double    in_dVal
 

Sets the value of the Y component of this vector.

Parameters:
in_dVal  The new value of the Y component of this vector.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::SetX , CSIBCVectorwd::SetZ , CSIBCVectorwd::SetW , CSIBCVectorwd::Set , CSIBCVectorwd::GetY

CSIBCVectorwd & CSIBCVectorwd::SetZ const double    in_dVal
 

Sets the value of the Z component of this vector.

Parameters:
in_dVal  The new value of the Z component of this vector.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::SetX , CSIBCVectorwd::SetY , CSIBCVectorwd::SetW , CSIBCVectorwd::Set , CSIBCVectorwd::GetZ

CSIBCVectorwd & CSIBCVectorwd::Sub const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
 

Subtracts in_vct2 from in_vct1. The W components are not subtracted, and the W component of the resultant is taken from this vector. The result is stored in this vector.

Parameters:
in_vct1  First vector for the subtraction.
in_vct2  Second vector for the subtraction.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Sub , CSIBCVectorwd::Add

CSIBCVectorwd & CSIBCVectorwd::Sub const CSIBCVectorwd &    in_vct
 

Subtracts in_vct from this vector. The W components are not subtracted, and the W component of the resultant is taken from this vector. The result is stored in this vector.

Parameters:
in_vct  Vector to subtract from this vector.
Returns:
CSIBCVectorwd& Reference to this vector.
See also:
CSIBCVectorwd::Sub , CSIBCVectorwd::Add


Friends And Related Function Documentation

bool AreOrthogonal const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2,
const double    in_dEpsilon = PICO_EPS
[friend]
 

Not implemented yet.

bool ArePntCollinear const CSIBCVectorwd &    in_pnt1,
const CSIBCVectorwd &    in_pnt2,
const CSIBCVectorwd &    in_pnt3,
const double    in_dEpsilon = PICO_EPS
[friend]
 

Not implemented yet.

bool ArePntCoplanar const CSIBCVectorwd &    in_pnt1,
const CSIBCVectorwd &    in_pnt2,
const CSIBCVectorwd &    in_pnt3,
const CSIBCVectorwd &    in_pnt4,
const double    in_dEpsilon = PICO_EPS
[friend]
 

Not implemented yet.

bool AreVctCoplanar const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2,
const CSIBCVectorwd &    in_vct3,
const double    in_dEpsilon = PICO_EPS
[friend]
 

Not implemented yet.

double GetDistance const CSIBCVectorwd &    in_v1,
const CSIBCVectorwd &    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:
CSIBCVectorwd::GetSquaredDistance

double GetDot const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
[friend]
 

Computes the dot product between the vectors in_vct1 and in_vct2. Only the X, Y and Z components are used in this calculation.

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 GetPntAngle const CSIBCVectorwd &    in_pnt1,
const CSIBCVectorwd &    in_pnt2,
const CSIBCVectorwd &    in_pnt3,
const bool    in_bIsSigned = false
[friend]
 

Not implemented yet.

double GetPntCosAngle const CSIBCVectorwd &    in_pnt1,
const CSIBCVectorwd &    in_pnt2,
const CSIBCVectorwd &    in_pnt3
[friend]
 

Not implemented yet.

double GetSquaredDistance const CSIBCVectorwd &    in_v1,
const CSIBCVectorwd &    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:
CSIBCVectorwd::GetDistance

double GetVctAngle const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2,
const bool    in_bIsSigned = false
[friend]
 

Not implemented yet.

double GetVctCosAngle const CSIBCVectorwd &    in_vct1,
const CSIBCVectorwd &    in_vct2
[friend]
 

Not implemented yet.


The documentation for this class was generated from the following files: © Copyright 2001-2003 Avid Technology, Inc. All rights reserved.

© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.