Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCVector4D Class Reference
General purpuse 4D vector class.
More...
#include <SIBCVector.h>
List of all members.
Public Methods
- CSIBCVector4D ()
- CSIBCVector4D (const CSIBCVector4D &i_vVector)
- CSIBCVector4D (const SI_Float i_fX, const SI_Float i_fY, const SI_Float i_fZ, const SI_Float i_fW)
- CSIBCVector4D (const CSIBCVector3D &i_vVct, const SI_Float i_fW=1.0f)
- SI_Bool IsAlmostEqualTo (const CSIBCVector4D &i_vVector, const SI_Float i_fEpsilon)
- SI_Bool IsOrthogonalTo (const CSIBCVector4D &i_vVector)
- SI_Bool IsNull () const
- SI_Float GetDot (const CSIBCVector4D &i_vVector) const
- SI_Float GetDistanceFrom (const CSIBCVector4D &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, SI_Float *o_fW) const
- CSIBCVector4D & Set (SI_Float i_fX, SI_Float i_fY, SI_Float i_fZ, SI_Float i_fW)
- CSIBCVector4D & Normalize ()
- CSIBCVector4D & SetNull ()
- CSIBCVector4D & SetLength (const SI_Float i_fLength)
- CSIBCVector4D & Negate ()
- CSIBCVector4D & Add (const CSIBCVector4D &i_vVector)
- CSIBCVector4D & Sub (const CSIBCVector4D &i_vVector)
- CSIBCVector4D & Scale (const SI_Float i_fScale)
- CSIBCVector4D & MulComp (const CSIBCVector4D &i_vVector)
- CSIBCVector4D & DivComp (const CSIBCVector4D &i_vVector)
- SI_Bool operator== (const CSIBCVector4D &i_vVector) const
- SI_Bool operator!= (const CSIBCVector4D &i_vVector) const
- CSIBCVector4D operator+ (const CSIBCVector4D &i_vVector)
- CSIBCVector4D operator- (const CSIBCVector4D &i_vVector)
- CSIBCVector4D operator/ (const CSIBCVector4D &i_vVector)
- CSIBCVector4D & operator= (const CSIBCVector3D &i_vVector)
- void Dump ()
Public Attributes
Detailed Description
General purpuse 4D vector class.
Representation of a 4D 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 3D vectors, CSIBCVector2D and CSIBCVector3D, 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
CSIBCVector4D::CSIBCVector4D |
( |
|
) |
[inline] |
|
|
Default constructor. Sets the values of each component of this vector to zero. |
CSIBCVector4D::CSIBCVector4D |
( |
const CSIBCVector4D & |
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. |
|
CSIBCVector4D::CSIBCVector4D |
( |
const SI_Float |
in_dX, |
|
|
const SI_Float |
in_dY, |
|
|
const SI_Float |
in_dZ, |
|
|
const SI_Float |
in_dW |
|
) |
[inline] |
|
|
Constructor. Sets the new vector to have i_fX , i_fY , i_fZ and i_fW for its X, Y, Z and W 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. |
i_fW |
The value for the W component of the new vector. |
|
CSIBCVector4D::CSIBCVector4D |
( |
const CSIBCVector3D & |
in_vVct, |
|
|
const SI_Float |
in_dW = 1.0f |
|
) |
[inline] |
|
|
Constructor. Sets the new vector to have the X, Y and Z components values of i_vVct , and the W component i_fW . -
Parameters:
-
i_vVct |
The vector containing the X, Y and Z components to use for the new vector. |
i_fW |
The W value for the new vector (defaults to 1.0f). |
|
Member Function Documentation
CSIBCVector4D & CSIBCVector4D::Add |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::Sub
|
CSIBCVector4D & CSIBCVector4D::DivComp |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::operator/ , CSIBCVector4D::MulComp
|
void CSIBCVector4D::Dump |
( |
|
) |
|
|
|
Outputs the memory location of this object, and the values of each of its components. -
See also:
-
SIBCVector4D::Get
|
void CSIBCVector4D::Get |
( |
SI_Float * |
out_dX, |
|
|
SI_Float * |
out_dY, |
|
|
SI_Float * |
out_dZ, |
|
|
SI_Float * |
out_dW |
|
) |
const [inline] |
|
|
Gets the values of the vector components. -
Parameters:
-
o_fX |
Pointer to an SI_Float to receive the value of the X component. |
o_fY |
Pointer to an SI_Float to receive the value of the Y component. |
o_fZ |
Pointer to an SI_Float to receive the value of the Z component. |
o_fW |
Pointer to an SI_Float to receive the value of the W component. |
-
See also:
-
CSIBCVector4D::Set
|
SI_Float CSIBCVector4D::GetDistanceFrom |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D::GetLength
|
SI_Float CSIBCVector4D::GetDot |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D::IsOrthogonalTo
|
SI_Float CSIBCVector4D::GetLength |
( |
|
) |
const [inline] |
|
SI_Float CSIBCVector4D::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, 3 == W). |
-
Returns:
-
SI_Float The value of the maximum component of this vector.
-
See also:
-
CSIBCVector4D::Get
|
SI_Float CSIBCVector4D::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, 3 == W). |
-
Returns:
-
SI_Float The value of the maximum component of this vector.
-
See also:
-
CSIBCVector4D::Get
|
SI_Float CSIBCVector4D::GetSquaredLength |
( |
|
) |
const [inline] |
|
SI_Bool CSIBCVector4D::IsAlmostEqualTo |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D::IsOrthogonalTo , CSIBCVector4D::IsNull , CSIBCVector4D::operator==
|
SI_Bool CSIBCVector4D::IsNull |
( |
|
) |
const [inline] |
|
SI_Bool CSIBCVector4D::IsOrthogonalTo |
( |
const CSIBCVector4D & |
in_vct |
) |
[inline] |
|
CSIBCVector4D & CSIBCVector4D::MulComp |
( |
const CSIBCVector4D & |
in_vct |
) |
[inline] |
|
|
Multiplies each component in this vector by its corresponding component in i_vVector . The result is stored in this vector. -
Parameters:
-
i_vVector |
Vector to multiply components with this vector. |
-
Returns:
-
CSIBCVector4D& Reference to this vector
-
See also:
-
CSIBCVector4D::DivComp
|
CSIBCVector4D & CSIBCVector4D::Negate |
( |
void |
|
) |
[inline] |
|
|
Sets all the components of this vector to be the negatives of their current values. -
Returns:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::Set
|
CSIBCVector4D & CSIBCVector4D::Normalize |
( |
|
) |
[inline] |
|
SI_Bool CSIBCVector4D::operator!= |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D::IsAlmostEqualTo , CSIBCVector4D::operator==
|
CSIBCVector4D CSIBCVector4D::operator+ |
( |
const CSIBCVector4D & |
in_vtx |
) |
[inline] |
|
|
Computes the vector addition between this vector and i_vVector . -
Parameters:
-
i_vVector |
The vector to add this vector with. |
-
Returns:
-
CSIBCVector4D The result of the addition.
-
See also:
-
CSIBCVector4D::Add , CSIBCVector4D::operator-
|
CSIBCVector4D CSIBCVector4D::operator- |
( |
const CSIBCVector4D & |
in_vtx |
) |
[inline] |
|
|
Computes the vector subtraction of i_vVector from this vector. -
Parameters:
-
i_vVector |
The vector to subtract from this vector. |
-
Returns:
-
CSIBCVector4D The result of the subtraction.
-
See also:
-
CSIBCVector4D::Sub , CSIBCVector4D::operator+
|
CSIBCVector4D CSIBCVector4D::operator/ |
( |
const CSIBCVector4D & |
in_vtx |
) |
[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:
-
CSIBCVector4D The result of the divisions.
-
See also:
-
CSIBCVector4D::DivComp
|
CSIBCVector4D & CSIBCVector4D::operator= |
( |
const CSIBCVector3D & |
in_vtx |
) |
[inline] |
|
|
Sets this vector to be equal to i_vVector . -
Parameters:
-
i_vVector |
The vector to copy data from. |
-
Returns:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::Set
|
SI_Bool CSIBCVector4D::operator== |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D::IsAlmostEqualTo , CSIBCVector4D::operator!=
|
CSIBCVector4D & CSIBCVector4D::Scale |
( |
const SI_Float |
in_dFactor |
) |
[inline] |
|
|
Scales all components of this vector by i_fScale . -
Parameters:
-
i_fScale |
The amount to scale each of the components of this vector by. |
-
Returns:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::SetLength
|
CSIBCVector4D & CSIBCVector4D::Set |
( |
SI_Float |
in_dX, |
|
|
SI_Float |
in_dY, |
|
|
SI_Float |
in_dZ, |
|
|
SI_Float |
in_dW |
|
) |
[inline] |
|
|
Sets the values of the X, Y, Z and W 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. |
i_fW |
The new value for the W component of this vector. |
-
Returns:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::Get , CSIBCVector4D::operator=
|
CSIBCVector4D & CSIBCVector4D::SetLength |
( |
const SI_Float |
in_dLength |
) |
[inline] |
|
CSIBCVector4D & CSIBCVector4D::SetNull |
( |
|
) |
[inline] |
|
CSIBCVector4D & CSIBCVector4D::Sub |
( |
const CSIBCVector4D & |
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:
-
CSIBCVector4D& Reference to this vector.
-
See also:
-
CSIBCVector4D::Add
|
Member Data Documentation
float CSIBCVector4D::m_fW
|
|
|
The W component of this vector. |
float CSIBCVector4D::m_fX
|
|
|
The X component of this vector. |
float CSIBCVector4D::m_fY
|
|
|
The Y component of this vector. |
float CSIBCVector4D::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.