Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCVector3D Class Reference
General purpose 3D vector class.
More...
#include <SIBCVector.h>
List of all members.
Public Methods
- CSIBCVector3D ()
- CSIBCVector3D (const CSIBCVector3D &i_vVector)
- CSIBCVector3D (const SI_Float i_fX, const SI_Float i_fY, const SI_Float i_fZ)
- SI_Bool IsAlmostEqualTo (const CSIBCVector3D &i_vVector, const SI_Float i_fEpsilon)
- SI_Bool IsOrthogonalTo (const CSIBCVector3D &i_vVector)
- SI_Bool IsNull () const
- SI_Float GetDot (const CSIBCVector3D &i_vVector) const
- SI_Float GetDistanceFrom (const CSIBCVector3D &i_vVector) const
- SI_Float GetLength () const
- SI_Float GetSquaredLength () const
- SI_Float GetMaxComponent (SI_Int *o_nIndex) const
- SI_Float GetMinComponent (SI_Int *o_nIndex) const
- void Get (SI_Float *o_fX, SI_Float *o_fY, SI_Float *o_fZ) const
- SI_Float GetX () const
- SI_Float GetY () const
- SI_Float GetZ () const
- SI_Float GetW () const
- CSIBCVector3D & Set (SI_Float i_fX, SI_Float i_fY, SI_Float i_fZ)
- CSIBCVector3D & Normalize ()
- CSIBCVector3D & SetNull ()
- CSIBCVector3D & SetLength (const SI_Float i_fLength)
- CSIBCVector3D & SetCross (const CSIBCVector3D &i_vVector)
- CSIBCVector3D & Negate ()
- CSIBCVector3D & Add (const CSIBCVector3D &i_vVector)
- CSIBCVector3D & Sub (const CSIBCVector3D &i_vVector)
- CSIBCVector3D & Scale (const SI_Float i_fScale)
- CSIBCVector3D & Scale (CSIBCVector3D &o_vDest, const SI_Float i_fScale)
- CSIBCVector3D & MulComp (const CSIBCVector3D &i_vVector)
- CSIBCVector3D & DivComp (const CSIBCVector3D &i_vVector)
- CSIBCVector3D CrossProduct (const CSIBCVector3D &i_vVector) const
- void ScaleAndAdd (CSIBCVector3D &io_vDest, const SI_Float i_fScale)
- SI_Bool operator== (const CSIBCVector3D &i_vVector) const
- SI_Bool operator!= (const CSIBCVector3D &i_vVector) const
- CSIBCVector3D operator+ (const CSIBCVector3D &i_vVector) const
- CSIBCVector3D operator+ (const SI_Float &i_fFloat) const
- CSIBCVector3D operator- (const CSIBCVector3D &i_vVector) const
- CSIBCVector3D operator- (const SI_Float &i_fFloat) const
- CSIBCVector3D operator/ (const CSIBCVector3D &i_vVector) const
- CSIBCVector3D operator * (const SI_Float i_fFloat) const
- void Dump ()
Public Attributes
Detailed Description
General purpose 3D vector class.
Representation of a 3D vector, defining operations to access, modify and perform calculations on 2D vectors. This class uses single precision floating-point numbers for represent its data, and in its operations. There are seperate similar classes for 2D and 4D vectors, CSIBCVector2D and CSIBCVector4D, respectively, which also use single precision.
Furthermore, there is another set of vector classes which use double precision floating-point numbers, CSIBCVector2Dd, CSIBCVector3Dd and CSIBCVector4Dd 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
CSIBCVector3D::CSIBCVector3D |
( |
|
) |
[inline] |
|
|
Default constructor. Sets the values of each component of this vector to zero. |
CSIBCVector3D::CSIBCVector3D |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
|
Copy constructor. Sets the new vector's component values to be the same as i_vVector . -
Parameters:
-
i_vVector |
Vector to use for new vector's component values. |
|
CSIBCVector3D::CSIBCVector3D |
( |
const SI_Float |
in_dX, |
|
|
const SI_Float |
in_dY, |
|
|
const SI_Float |
in_dZ |
|
) |
[inline] |
|
|
Constructor. Sets the new vector to have i_fX , i_fY and i_fZ for its X, Y and Z 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. |
i_fZ |
The value for the Z component of the new vector. |
|
Member Function Documentation
CSIBCVector3D & CSIBCVector3D::Add |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
|
Adds this vector to i_vVector , and stores the result in this vector. -
Parameters:
-
i_vVector |
The vector to add to this vector. |
-
Returns:
-
CSIBCVector3D& Reference to this vector.
-
See also:
-
CSIBCVector3D::Sub
|
CSIBCVector3D CSIBCVector3D::CrossProduct |
( |
const CSIBCVector3D & |
in_vct |
) |
const [inline] |
|
|
Computes the cross product between this vector and i_vVector . The operation is as follows: Vout = Vthis x Vin. -
Parameters:
-
i_vVector |
Vector to find the cross product with. |
-
Returns:
-
CSIBCVector3D The result of the cross product.
-
See also:
-
CSIBCVector3D::SetCross
|
CSIBCVector3D & CSIBCVector3D::DivComp |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
|
Divides each component in this vector by its corresponding component in i_vVector . The result is stored in this vector. -
Parameters:
-
i_vVector |
Vector to divide components with this vector. |
-
Returns:
-
CSIBCVector3D& Reference to this vector.
-
See also:
-
CSIBCVector3D::operator/ , CSIBCVector3D::MulComp
|
void CSIBCVector3D::Dump |
( |
|
) |
|
|
|
Outputs the memory location of this object, and the values of each of its components. -
See also:
-
SIBCVector3D::Get
|
void CSIBCVector3D::Get |
( |
SI_Float * |
out_dX, |
|
|
SI_Float * |
out_dY, |
|
|
SI_Float * |
out_dZ |
|
) |
const [inline] |
|
SI_Float CSIBCVector3D::GetDistanceFrom |
( |
const CSIBCVector3D & |
in_vct |
) |
const [inline] |
|
|
Returns the distance between this vector and i_vVector . -
Parameters:
-
i_vVector |
Vector to determine distance from. |
-
Returns:
-
SI_Float Distance from this vector to
i_vVector .
-
See also:
-
CSIBCVector3D::GetLength
|
SI_Float CSIBCVector3D::GetDot |
( |
const CSIBCVector3D & |
in_vct |
) |
const [inline] |
|
|
Computes the dot product between this vector and i_vVector . -
Parameters:
-
i_vVector |
Vector to dot-product with this vector. |
-
Returns:
-
SI_Float Dot product of the two vectors.
-
See also:
-
CSIBCVector3D::IsOrthogonalTo
|
SI_Float CSIBCVector3D::GetLength |
( |
|
) |
const [inline] |
|
SI_Float CSIBCVector3D::GetMaxComponent |
( |
SI_Int * |
idx |
) |
const |
|
|
Returns the value and index of the maximum component of this vector. -
Parameters:
-
o_nIndex |
Pointer to an SI_Int to hold the value of the index that had the maximum component (0 == X, 1 == Y, 2 == Z). |
-
Returns:
-
SI_Float The value of the maximum component of this vector.
-
See also:
-
CSIBCVector3D::Get
|
SI_Float CSIBCVector3D::GetMinComponent |
( |
SI_Int * |
idx |
) |
const |
|
|
Returns the value and index of the minimum component of this vector. -
Parameters:
-
o_nIndex |
Pointer to an SI_Int to hold the value of the index that had the maximum component (0 == X, 1 == Y, 2 == Z). |
-
Returns:
-
SI_Float The value of the maximum component of this vector.
-
See also:
-
CSIBCVector3D::Get
|
SI_Float CSIBCVector3D::GetSquaredLength |
( |
|
) |
const [inline] |
|
SI_Float CSIBCVector3D::GetW |
( |
|
) |
const [inline] |
|
SI_Float CSIBCVector3D::GetX |
( |
|
) |
const [inline] |
|
SI_Float CSIBCVector3D::GetY |
( |
|
) |
const [inline] |
|
SI_Float CSIBCVector3D::GetZ |
( |
|
) |
const [inline] |
|
SI_Bool CSIBCVector3D::IsAlmostEqualTo |
( |
const CSIBCVector3D & |
in_vct, |
|
|
const SI_Float |
in_dEpsilon |
|
) |
[inline] |
|
|
Determines whether this vector and i_vVector are equal to each other, within a threshhold value given by i_fEpsilon. -
Parameters:
-
i_vVector |
Vector to compare equality with. |
i_fEpsilon |
Error range for floating-point comparison. |
-
Returns:
-
SI_Bool TRUE if the vectors are equal, FALSE otherwise.
-
See also:
-
CSIBCVector3D::IsOrthogonalTo , CSIBCVector3D::IsNull , CSIBCVector3D::operator==
|
SI_Bool CSIBCVector3D::IsNull |
( |
|
) |
const [inline] |
|
SI_Bool CSIBCVector3D::IsOrthogonalTo |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
CSIBCVector3D & CSIBCVector3D::MulComp |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
CSIBCVector3D & CSIBCVector3D::Negate |
( |
void |
|
) |
[inline] |
|
|
Sets all the components of this vector to be the negatives of their current values. -
Returns:
-
CSIBCVector3D& Reference to this vector.
-
See also:
-
CSIBCVector3D::Set
|
CSIBCVector3D & CSIBCVector3D::Normalize |
( |
|
) |
[inline] |
|
CSIBCVector3D CSIBCVector3D::operator * |
( |
const SI_Float |
factor |
) |
const [inline] |
|
|
Multiplies each component of this vector by i_fFloat . -
Parameters:
-
i_fFloat |
The amount to scale each component of this vector by. |
-
Returns:
-
CSIBCVector3D The result of the scaling.
-
See also:
-
CSIBCVector3D::Scale , CSIBCVector3D::MulComp
|
SI_Bool CSIBCVector3D::operator!= |
( |
const CSIBCVector3D & |
in_vct |
) |
const [inline] |
|
|
Determines whether this vector and i_vVector are not-equal. Note that this function does not use any floating-point comparison error, thus the two vectors must be exactly the same for a FALSE return value. -
Parameters:
-
i_vVector |
Vector to compare inequality with. |
-
Returns:
-
SI_Bool TRUE if the vectors are not equal, FALSE otherwise.
-
See also:
-
CSIBCVector3D::IsAlmostEqualTo , CSIBCVector3D::operator==
|
CSIBCVector3D CSIBCVector3D::operator+ |
( |
const SI_Float & |
in_flt |
) |
const [inline] |
|
CSIBCVector3D CSIBCVector3D::operator+ |
( |
const CSIBCVector3D & |
in_vtx |
) |
const [inline] |
|
CSIBCVector3D CSIBCVector3D::operator- |
( |
const SI_Float & |
in_flt |
) |
const [inline] |
|
CSIBCVector3D CSIBCVector3D::operator- |
( |
const CSIBCVector3D & |
in_vtx |
) |
const [inline] |
|
CSIBCVector3D CSIBCVector3D::operator/ |
( |
const CSIBCVector3D & |
in_vtx |
) |
const [inline] |
|
|
Divides each component in this vector by its corresponding component in i_vVector . -
Parameters:
-
i_vVector |
Vector to divide components with this vector. |
-
Returns:
-
CSIBCVector3D The result of the divisions.
-
See also:
-
CSIBCVector3D::DivComp
|
SI_Bool CSIBCVector3D::operator== |
( |
const CSIBCVector3D & |
in_v |
) |
const [inline] |
|
|
Determines whether this vector and i_vVector are equal. Note that this function does not use any floating-point comparison error, thus the two vectors must be exactly the same. -
Parameters:
-
i_vVector |
Vector to compare equality with. |
-
Returns:
-
SI_Bool TRUE if the vectors are equal, FALSE otherwise.
-
See also:
-
CSIBCVector3D::IsAlmostEqualTo , CSIBCVector3D::operator!=
|
CSIBCVector3D & CSIBCVector3D::Scale |
( |
CSIBCVector3D & |
o_V, |
|
|
const SI_Float |
in_dFactor |
|
) |
[inline] |
|
|
Scales all components of this vector by i_fScale , and stores the result in o_vDest . -
Parameters:
-
o_vDest |
Vector to receive the scaled vector. |
i_fScale |
The amount to scale each component of this vector. |
-
Returns:
-
CSIBCVector3D& Reference to this vector.
|
CSIBCVector3D & CSIBCVector3D::Scale |
( |
const SI_Float |
in_dFactor |
) |
[inline] |
|
void CSIBCVector3D::ScaleAndAdd |
( |
CSIBCVector3D & |
o_V, |
|
|
const SI_Float |
in_dFactor |
|
) |
[inline] |
|
|
Scales the components of this vector by i_fScale , and add the result to the io_vDest vector. The result is stored in io_vDest . -
Parameters:
-
io_vDest |
Vector to add to this scale vector. Holds the results of this operation. |
i_fScale |
The amount to scale each component of this vector (before addition). |
-
See also:
-
CSIBCVector3D::Add , CSIBCVector3D::Scale
|
CSIBCVector3D & CSIBCVector3D::Set |
( |
SI_Float |
in_dX, |
|
|
SI_Float |
in_dY, |
|
|
SI_Float |
in_dZ |
|
) |
[inline] |
|
|
Sets the values of the X, Y and Z components of this vector. -
Parameters:
-
i_fX |
The new value for the X component of this vector. |
i_fY |
The new value for the Y component of this vector. |
i_fZ |
The new value for the Z component of this vector. |
-
Returns:
-
CSIBCVector3D& Reference to this vector.
-
See also:
-
CSIBCVector3D::Get
|
CSIBCVector3D & CSIBCVector3D::SetCross |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
|
Sets this vector to be the cross product of this vector and i_vVector . -
Parameters:
-
i_vVector |
The vector to cross this vector with. |
-
Returns:
-
CSIBCVector3D& Reference to this vector.
-
See also:
-
CSIBCVector3D::CrossProduct
|
CSIBCVector3D & CSIBCVector3D::SetLength |
( |
const SI_Float |
in_dLength |
) |
[inline] |
|
CSIBCVector3D & CSIBCVector3D::SetNull |
( |
|
) |
[inline] |
|
CSIBCVector3D & CSIBCVector3D::Sub |
( |
const CSIBCVector3D & |
in_vct |
) |
[inline] |
|
|
Subtracts i_vVector from this vector, and stores the result in this vector. -
Parameters:
-
i_vVector |
The vector to subtract from this vector. |
-
Returns:
-
CSIBCVector3D& Reference to this vector.
-
See also:
-
CSIBCVector3D::Add
|
Member Data Documentation
float CSIBCVector3D::m_fX
|
|
|
The X component of this vector. |
float CSIBCVector3D::m_fY
|
|
|
The Y component of this vector. |
float CSIBCVector3D::m_fZ
|
|
|
The Z component of this vector. |
The documentation for this class was generated from the following files:
- SIBCVector.h
- SIBCVector.cpp
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.