mudbox::Base Class Reference

#include <math.h>

List of all members.


Detailed Description

Represents a local coordinate basis comprising three axes that define a coordinate system.

The axes don't have to be normalized or orthogonal, but no pair of them should be parallel.


Public Member Functions

  Base (void)
  Creates a empty base with no valid axises.
  Base (const Vector &vA, const Vector &vB, const Vector &vC)
  Creates a base with the three specified vector axes.
void  Derive (unsigned int iIndex, bool bRightHand=true)
  Derives one axis from the two others. (The new axis will be orthagonal to the other two).
void  Orthogonalize (unsigned int iIndex, unsigned int iSource=-1)
  Force one basis axis to be orthagonal to another (or both other) basis axes.
void  Normalize (void)
  Normalize all the three axes.
Vector  TransformFrom (const Vector &cSource) const
  Converts a point (represented as a vector) from basis space to world space and returns it.
Vector  TransformTo (const Vector &cSource) const
  Converts a point (represented as a vector) from world space to this basis space and returns it.
Base  operator * (float fFactor) const
  Multiplies the base vectors with a scalar value and returns the result.
Base  operator+ (const Base &bOther) const
  Adds two bases.
Vector Axis (unsigned int iIndex)
  Returns a reference to a basis axis.
const Vector Axis (unsigned int iIndex) const
  Returns a reference to a basis axis.

Public Attributes

Vector  a
Vector  b
Vector  c

Constructor & Destructor Documentation

mudbox::Base::Base void   ) 
 

Creates a empty base with no valid axises.

mudbox::Base::Base const Vector vA,
const Vector vB,
const Vector vC
 

Creates a base with the three specified vector axes.


Member Function Documentation

void mudbox::Base::Derive unsigned int  iIndex,
bool  bRightHand = true
 

Derives one axis from the two others. (The new axis will be orthagonal to the other two).

Parameters:
iIndex  [in] The axis to be recalculated. 0 for x, 1 for y, and 2 for z
bRightHand  [in] If true, make this a right-handed coordinate system
void mudbox::Base::Orthogonalize unsigned int  iIndex,
unsigned int  iSource = -1
 

Force one basis axis to be orthagonal to another (or both other) basis axes.

Parameters:
iIndex  [in] Specifies which axis to orthogonalize. 0 for x, 1 for y, and 2 for z.
iSource  [in] Specifies which axis to use as a reference. 0 for x, 1 for y, and 2 for z -- and -1 means "use both other axes"
void mudbox::Base::Normalize void   )  [inline]
 

Normalize all the three axes.

00724 { a.Normalize(); b.Normalize(); c.Normalize(); };
Vector mudbox::Base::TransformFrom const Vector cSource  )  const
 

Converts a point (represented as a vector) from basis space to world space and returns it.

Vector mudbox::Base::TransformTo const Vector cSource  )  const
 

Converts a point (represented as a vector) from world space to this basis space and returns it.

Base mudbox::Base::operator * float  fFactor  )  const
 

Multiplies the base vectors with a scalar value and returns the result.

Base mudbox::Base::operator+ const Base bOther  )  const
 

Adds two bases.

Vector& mudbox::Base::Axis unsigned int  iIndex  ) 
 

Returns a reference to a basis axis.

Parameters:
iIndex  [in] 0 for x; 1 for y; 2 for z
const Vector& mudbox::Base::Axis unsigned int  iIndex  )  const
 

Returns a reference to a basis axis.

Parameters:
iIndex  [in] 0 for x; 1 for y; 2 for z

Member Data Documentation

Vector mudbox::Base::a
 
Vector mudbox::Base::b
 
Vector mudbox::Base::c
 

mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base
mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base mudbox::Base