#include<kfbxsystemunit.h>
Definition at line59of 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... |
KFbxSystemUnit | ( | double | pScaleFactor, | |
double | pMultiplier=1.0 | |||
) |
Constructor.
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. |
void ConvertScene | ( | KFbxScene* | pScene, | |
constKFbxUnitConversionOptions& | pOptions=DefaultConversionOptions | |||
) | const |
Convert a scene from its system units to this unit.
pScene | The scene to convert | |
pOptions | Various conversion options. SeeKFbxSystemUnit::KFbxUnitConversionOptions |
void ConvertChildren | ( | KFbxNode* | pRoot, | |
constKFbxSystemUnit& | pSrcUnit, | |||
constKFbxUnitConversionOptions& | pOptions=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.
pRoot | The given node. | |
pSrcUnit | The source system unit. | |
pOptions | Various conversion options. SeeKFbxSystemUnit::KFbxUnitConversionOptions |
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.
This method is provided for backwards compatibility only and ConvertScene( KFbxScene* , const KFbxUnitConversionOptions&) should be used instead whenever possible.
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.
pAbbreviated | Iftrue , abbreviated string will return. |
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 | ( | constKFbxSystemUnit& | pTarget | ) | const |
Returns the conversion factor from this unit to pTarget (does not include the muliplier factor).
pTarget | The target unit. |
double GetConversionFactorFrom | ( | constKFbxSystemUnit& | pSource | ) | const |
Returns the conversion factor from pSource to this unit.
pSource | The source unit. |