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 63 of file kfbxsystemunit.h.

Public Member Functions

 KFbxSystemUnit (double pScaleFactor)
 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.
double GetConversionFactorTo (const KFbxSystemUnit &pTarget) const
 Returns the conversion factor from this unit to pTarget.
double GetConversionFactorFrom (const KFbxSystemUnit &pSource) const
 Returns the conversion factor from pSource to this unit.

Static Public Attributes

static const KFbxSystemUnit mm
static const KFbxSystemUnit cm
static const KFbxSystemUnit m
static const KFbxSystemUnit km
static const KFbxSystemUnit Inch
static const KFbxSystemUnit Foot
static const KFbxSystemUnit Mile
static const KFbxSystemUnit Yard
static const KFbxSystemUnitsPredefinedUnits
static const KFbxUnitConversionOptions DefaultConversionOptions

Protected Attributes

double mScaleFactor

Classes

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


Constructor & Destructor Documentation

KFbxSystemUnit ( double  pScaleFactor  ) 

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


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.

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.

KString GetScaleFactorAsString ( bool  pAbbreviated = true  )  const

Returns a unit label for the current scale factor.

double GetConversionFactorTo ( const KFbxSystemUnit pTarget  )  const

Returns the conversion factor from this unit to pTarget.

double GetConversionFactorFrom ( const KFbxSystemUnit pSource  )  const

Returns the conversion factor from pSource to this unit.