KFbxSystemUnit Class Reference

#include <kfbxsystemunit.h>

List of all members.


Detailed Description

This class is used to describe the units of measurement used within a particular scene.

Definition at line 59 of file kfbxsystemunit.h.


Public Member Functions

  KFbxSystemUnit (double pScaleFactor, double pMultiplier=1.0)
  Constructor.
void  ConvertScene (KFbxScene *pScene, const KFbxUnitConversionOptions &pOptions=DefaultConversionOptions) const
  Convert a scene from its system units to this unit.
void  ConvertChildren (KFbxNode *pRoot, const KFbxSystemUnit &pSrcUnit, const KFbxUnitConversionOptions &pOptions=DefaultConversionOptions) const
  Converts the children of the given node to this system unit.
void  ConvertScene (KFbxScene *pScene, KFbxNode *pFbxRoot, const KFbxUnitConversionOptions &pOptions=DefaultConversionOptions) const
  Convert a scene from its system units to this unit, using the specified Fbx_Root node.
double  GetScaleFactor () const
  Gets the scale factor of this system unit, relative to centimeters.
KString  GetScaleFactorAsString (bool pAbbreviated=true) const
  Returns a unit label for the current scale factor.
KString  GetScaleFactorAsString_Plurial () const
  Returns a unit label for the current scale factor.
double  GetMultiplier () const
  Gets the multiplier factor of this system unit.
double  GetConversionFactorTo (const KFbxSystemUnit &pTarget) const
  Returns the conversion factor from this unit to pTarget (does not include the muliplier factor).
double  GetConversionFactorFrom (const KFbxSystemUnit &pSource) const
  Returns the conversion factor from pSource to this unit.

Classes

struct   KFbxUnitConversionOptions
  Defines various options that can be set for converting the units of a scene. More...

Constructor & Destructor Documentation

KFbxSystemUnit ( double  pScaleFactor,
double  pMultiplier = 1.0  
)

Constructor.

Parameters:
pScaleFactor  The equivalent number of centimeters in the new system unit. eg For an inch unit, use a scale factor of 2.54
pMultiplier  A multiplier factor of pScaleFactor.

Member Function Documentation

void ConvertScene ( KFbxScene pScene,
const KFbxUnitConversionOptions pOptions = DefaultConversionOptions  
) const

Convert a scene from its system units to this unit.

Parameters:
pScene  The scene to convert
pOptions  Various conversion options. See KFbxSystemUnit::KFbxUnitConversionOptions

void ConvertChildren ( KFbxNode pRoot,
const KFbxSystemUnit pSrcUnit,
const KFbxUnitConversionOptions pOptions = DefaultConversionOptions  
) const

Converts the children of the given node to this system unit.

Unlike the ConvertScene() method, this method does not set the axis system of the scene that the pRoot node belongs, nor does it adjust KFbxPoses as they are not stored under the scene, and not under a particular node.

Parameters:
pRoot  The given node.
pSrcUnit  The source system unit.
pOptions  Various conversion options. See KFbxSystemUnit::KFbxUnitConversionOptions

void ConvertScene ( KFbxScene pScene,
KFbxNode pFbxRoot,
const KFbxUnitConversionOptions pOptions = DefaultConversionOptions  
) const

Convert a scene from its system units to this unit, using the specified Fbx_Root node.

This method is provided for backwards compatibility only and ConvertScene( KFbxScene* , const KFbxUnitConversionOptions& ) should be used instead whenever possible.

Parameters:
pScene  The scene to convert
pFbxRoot  The Fbx_Root node to use in conversion
pOptions  Conversion options. See KFbxSystemUnit::KFbxUnitConversionOptions

double GetScaleFactor (  )  const

Gets the scale factor of this system unit, relative to centimeters.

This factor scales values in system units to centimeters. For the purpose of scaling values to centimeters, this value should be used and the "multiplier" (returned by GetMultiplier()) should be ignored.

KString GetScaleFactorAsString ( bool  pAbbreviated = true  )  const

Returns a unit label for the current scale factor.

Parameters:
pAbbreviated  If true, abbreviated string will return.

KString GetScaleFactorAsString_Plurial (  )  const

Returns a unit label for the current scale factor.

Capital first letter + "s" added + foot -> feet

double GetMultiplier (  )  const

Gets the multiplier factor of this system unit.

double GetConversionFactorTo ( const KFbxSystemUnit pTarget  )  const

Returns the conversion factor from this unit to pTarget (does not include the muliplier factor).

Parameters:
pTarget  The target unit.

double GetConversionFactorFrom ( const KFbxSystemUnit pSource  )  const

Returns the conversion factor from pSource to this unit.

Parameters:
pSource  The source unit.
KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit
KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit KFbxSystemUnit