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

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]
 

Returns the length of this vector.

Returns:
SI_Float The length of this vector.
See also:
CSIBCVector4D::GetSquaredLength , CSIBCVector4D::GetMaxComponent , CSIBCVector4D::GetMinComponent

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]
 

Returns the squared length of this vector.

Returns:
SI_Float The squared length of this vector.
See also:
CSIBCVector4D::GetLength , CSIBCVector4D::GetMaxComponent , CSIBCVector4D::GetMinComponent

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]
 

Determines whether all of the components of this vector are zero. This function uses a floating-point comparison error of PICO_EPS.

Returns:
SI_Bool TRUE if all of the vector's components are zero, FALSE otherwise.
See also:
CSIBCVector4D::IsAlmostEqualTo , CSIBCVector4D::IsNull

SI_Bool CSIBCVector4D::IsOrthogonalTo const CSIBCVector4D &    in_vct [inline]
 

Determines whether this vector and i_vVector are orthogonal (at 90 degrees to each other). This function uses a floating-point comparison error of PICO_EPS.

Parameters:
i_vVector  The vector to compare orthogonality with.
Returns:
SI_Bool TRUE if the vectors are orthogonal, FALSE otherwise.
See also:
CSIBCVector4D::IsAlmostEqualTo , CSIBCVector4D::IsNull , CSIBCVector4D::GetDot

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]
 

Normalizes the vector to a length of one. If the vector is null, then it is initialized to (1.0f, 0.0f, 0.0f, 0.0f).

Returns:
CSIBCVector4D& Reference to this vector.
See also:
CSIBCVector4D::SetLength , CSIBCVector4D::GetLength

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]
 

Sets the length of this vector to be i_fLength. If the vector is null (See CSIBCVector4D::IsNull), then the vector is unchanged.

Parameters:
i_fLength  New length of the vector.
Returns:
CSIBCVector4D& Reference to this vector.
See also:
CSIBCVector4D::GetLength , CSIBCVector4D::Set

CSIBCVector4D & CSIBCVector4D::SetNull   [inline]
 

Sets this vector to null. (Components equal 0.0f).

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

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: © Copyright 2001-2003 Avid Technology, Inc. All rights reserved.

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