KFbxSystemUnit
#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 line63of filekfbxsystemunit.h.


Public Member Functions

 KFbxSystemUnit(double pScaleFactor, double pMultiplier=1.0)
 Constructor.
void ConvertScene(KFbxScene*pScene, constKFbxUnitConversionOptions&pOptions=DefaultConversionOptions) const
 Convert a scene from its system units to this unit.
void ConvertChildren(KFbxNode*pRoot, constKFbxSystemUnit&pSrcUnit, constKFbxUnitConversionOptions&pOptions=DefaultConversionOptions) const
 Converts the children of the given node to this system unit.
void ConvertScene(KFbxScene*pScene,KFbxNode*pFbxRoot, constKFbxUnitConversionOptions&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(constKFbxSystemUnit&pTarget) const
 Returns the conversion factor from this unit to pTarget (does not include the muliplier factor).
double GetConversionFactorFrom(constKFbxSystemUnit&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(KFbxScenepScene,
constKFbxUnitConversionOptionspOptions=DefaultConversionOptions 
)const

Convert a scene from its system units to this unit.

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

void ConvertChildren(KFbxNodepRoot,
constKFbxSystemUnitpSrcUnit,
constKFbxUnitConversionOptionspOptions=DefaultConversionOptions 
)const

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

Unlike theConvertScene()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(KFbxScenepScene,
KFbxNodepFbxRoot,
constKFbxUnitConversionOptionspOptions=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. SeeKFbxSystemUnit::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 byGetMultiplier()) should be ignored.

KStringGetScaleFactorAsString(bool pAbbreviated=true ) const

Returns a unit label for the current scale factor.

KStringGetScaleFactorAsString_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(constKFbxSystemUnitpTarget ) const

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

double GetConversionFactorFrom(constKFbxSystemUnitpSource ) const

Returns the conversion factor from pSource to this unit.