Public Member Functions

fbxDistance Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed Description

FBX SDK distance class.

Examples:

ImportScene/DisplayLodGroup.cxx.

Definition at line 279 of file kfbxtypes.h.

#include <kfbxtypes.h>

List of all members.

Public Member Functions

KString const  unitName () const
float const  internalValue () const
  Get the value of distance when converting this measurement unit to inch.
float const  valueAs (KFbxSystemUnit const &pUnit) const
  Get the value of distance when converting this measurement unit to the specified measurement unit.

Constructors and Destructor

  fbxDistance ()
  Default constructor.
  fbxDistance (float pValue, KFbxSystemUnit pUnit)
  Constructor with default values.
  fbxDistance (float pValue, const char *pUnit)
  Constructor.
  ~fbxDistance ()
  Destructor.

Assignment operation

fbxDistance operator= (fbxDistance const &pValue)
  Assign operator.

boolean operation

bool  operator== (fbxDistance const &pRHS) const
  Equivalence operator.
bool  operator!= (fbxDistance const &pRHS) const
  Non-equivalence operator.

Access

KFbxSystemUnit const  unit () const
  Retrieve the measurement unit.
float const  value () const
  Retrieve the value of distance using the measurement unit.

Constructor & Destructor Documentation

fbxDistance ( ) [inline]

Default constructor.

Definition at line 287 of file kfbxtypes.h.

: mValue(0.0), mUnit(1.0) {  }
fbxDistance ( float  pValue,
KFbxSystemUnit  pUnit 
) [inline]

Constructor with default values.

Parameters:
pValue Value of distance using the measurement unit.
pUnit Unit of measurement.

Definition at line 293 of file kfbxtypes.h.

                                                           : mValue(0.0), mUnit(1.0) {
                mValue = pValue;
                mUnit = pUnit;
            }
fbxDistance ( float  pValue,
const char *  pUnit 
)

Constructor.

Parameters:
pValue Value of distance using the measurement unit.
pUnit Unit of measurement.
Remarks:
This constructor will convert string to KFbxSystemUnit.
~fbxDistance ( ) [inline]

Destructor.

Definition at line 306 of file kfbxtypes.h.

{  }

Member Function Documentation

fbxDistance& operator= ( fbxDistance const &  pValue ) [inline]

Assign operator.

Parameters:
pValue The distance to be assigned to this distance.
Returns:
This distance.

Definition at line 320 of file kfbxtypes.h.

                                                              {
                        mValue = pValue.mValue;
                        mUnit = pValue.mUnit;
                        return *this;
            }
bool operator== ( fbxDistance const &  pRHS ) const [inline]

Equivalence operator.

Parameters:
pRHS The distance to be compared with this distance.
Returns:
True, if the two distances are equal, false otherwise.

Definition at line 336 of file kfbxtypes.h.

{ return ( (mValue == pRHS.mValue) && (mUnit == pRHS.mUnit) ); }
bool operator!= ( fbxDistance const &  pRHS ) const [inline]

Non-equivalence operator.

Parameters:
pRHS The distance to be compared with this distance.
Returns:
True, if the two distances are unequal, false otherwise.

Definition at line 342 of file kfbxtypes.h.

{ return !operator==(pRHS); }
KString const unitName ( ) const [inline]

Definition at line 346 of file kfbxtypes.h.

{   return mUnit.GetScaleFactorAsString();    }
KFbxSystemUnit const unit ( ) const [inline]

Retrieve the measurement unit.

Returns:
The measure unit of the distance.

Definition at line 356 of file kfbxtypes.h.

{   return mUnit;  }
float const value ( ) const [inline]

Retrieve the value of distance using the measurement unit.

Returns:
The value of distance using the measurement unit.
Examples:
ImportScene/DisplayLodGroup.cxx.

Definition at line 361 of file kfbxtypes.h.

{   return mValue;  }
float const internalValue ( ) const [inline]

Get the value of distance when converting this measurement unit to inch.

Returns:
The value of distance when converting this measurement unit to inch.

Definition at line 367 of file kfbxtypes.h.

                                              {
                KFbxSystemUnit internalUnit(KFbxSystemUnit::Inch);
                float internalValue = (float)(mValue * mUnit.GetConversionFactorTo(internalUnit));
                return internalValue;
            }
float const valueAs ( KFbxSystemUnit const &  pUnit ) const [inline]

Get the value of distance when converting this measurement unit to the specified measurement unit.

Parameters:
pUnit The measurement unit to be converted to.
Returns:
The value of distance when using the specified measurement unit.

Definition at line 377 of file kfbxtypes.h.

            {
                float convertedValue = (float)(mValue * mUnit.GetConversionFactorTo(pUnit));
                return convertedValue;
            }

The documentation for this class was generated from the following file:

fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance
fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance fbxDistance