- Main Page
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes

# FbxBindingOperator Class Reference

Search for all occurrences

## Detailed Description

This object represents a binding operation on a FbxObject or FbxProperty.

For example, FbxBindingOperator can be used to bind a light object to a parameter of shader via FbxNodeDirectionBOF or FbxNodePositionBOF.

      //Create an entry lEntry of binding table lTable.
      FbxBindingTableEntry& lEntry = lTable->AddNewEntry();

      //Create a NodePositionConvert binding operator and add it as source of the lEntry.
      FbxOperatorEntryView lSrc(&lEntry, true, true);
      lSrc.SetOperatorName( "NodePositionConvert");
      FbxBindingOperator* lOp = pImpl.AddNewBindingOperator( "NodePositionConvert", FbxNodePositionBOF::FunctionName);

      //Add a property entry to the binding operator.
      FbxBindingTableEntry& lEntryPropParam = lOp->AddNewEntry();
      FbxPropertyEntryView lPropSrc(&lEntryPropParam, true, true);
      //Set the shader parameter (the property's name) as source of the lEntryPropParam.
      lPropSrc.SetProperty(lProp.GetHierarchicalName());
      //Set the operator function FbxNodePositionBOF as destination of the lEntryPropParam.
      lEntryPropParam.SetDestination( FbxNodePositionBOF::FunctionName );

      //Set the shader parameter as destination of the lEntry.
      FbxSemanticEntryView lDst( &lEntry, false, true );
      lDst.SetSemantic( lProp.GetName() );

See also:
  FbxOperatorEntryView, FbxBindingTableEntry, FbxPropertyEntryView

Definition at line 49 of file fbxbindingoperator.h.

`#include <fbxbindingoperator.h>`

Inheritance diagram for FbxBindingOperator:
[legend]

List of all members.

## Classes
class | Function
| It represents a binding relationship between current object and the target. More...
class | FunctionCreator
| The concrete factory class for binding function. More...
class | FunctionCreatorBase
| The abstract factory class for binding function. More...
class | FunctionRegistry
| This utility class is used to register and unregister the binding function creators. More...
## Public Member Functions
template<class FBXTYPE >
bool | Evaluate (FbxObject const *pObject, FBXTYPE *pResult) const
| Run the operator on the given object.
template<class FBXTYPE >
bool | ReverseEvaluation (FbxObject const *pObject, FBXTYPE *pInOut, bool setObj=false, int index=0) const
| Run the inverse operator on the given object, assigning the result directly to the object.
template<class FBXTYPE >
bool | EvaluateEntry (FbxObject const *pObject, char const *pEntryDestinationName, FBXTYPE *pResult) const
| Evaluate the value of an operator parameter.
bool | EvaluateEntry (FbxObject const *pObject, char const *pEntryDestinationName, EFbxType *pResultType, void **pResult) const
bool | GetEntryProperty (FbxObject const *pObject, char const *pEntryDestinationName, FbxProperty &pProp) const
## Static Public Member Functions
static void | RegisterFunctions ()
static void | UnregisterFunctions ()
## Public Attributes
FbxPropertyT< FbxString > | FunctionName
| This property stores the name of function.
FbxPropertyT< FbxString > | TargetName
| This property stores the name of target.
## Static Public Attributes
static const char * | sFunctionName
| Function name.
static const char * | sTargetName
| Target name.
static const char * | sDefaultFunctionName
| Default value for function name.
static const char * | sDefaultTargetName
| Default value for target name.
## Protected Member Functions
virtual void | Construct (const FbxBindingOperator *pFrom)
virtual void | Destruct (bool pRecursive)
| Optional destructor override, automatically called by default destructor.
virtual void | ConstructProperties (bool pForceSet)
| Optional property constructor override, automatically called by default constructor.
void | InstantiateFunction ()
bool | Evaluate (FbxObject const *pObject, EFbxType *pResultType, void **pResult) const
bool | ReverseEvaluate (FbxObject const *pTarget, void const *pIn, void **pOut, EFbxType *pOutType, bool setObj, int index) const
void | FreeEvaluationResult (EFbxType pResultType, void *pResult) const
## Protected Attributes
Function * | mFunction

## Member Function Documentation

bool Evaluate | ( | FbxObject const * | pObject,
|  | FBXTYPE * | pResult
| ) |  | const`[inline]`

Search for all occurrences

Run the operator on the given object.

Parameters:

  pObject | The object that will be evaluated.
  pResult | A pointer to a buffer to hold the result.

Returns:
  `true` on success, `false` otherwise.

Definition at line 60 of file fbxbindingoperator.h.

        {
            EFbxType lResultType;
            void* lResult = NULL;

            bool lSuccess = Evaluate(pObject, &lResultType, &lResult);

            if (lSuccess)
            {
                FbxTypeCopy(*pResult, lResult, lResultType);
            }

            FreeEvaluationResult(lResultType, lResult);

            return lSuccess;
        }

bool ReverseEvaluation | ( | FbxObject const * | pObject,
|  | FBXTYPE * | pInOut,
|  | bool | setObj = `false`,
|  | int | index = `0`
| ) |  | const`[inline]`

Search for all occurrences

Run the inverse operator on the given object, assigning the result directly to the object.

Parameters:

  pObject | The object that will be evaluated.
  pInOut | Type of value being reversed.
  setObj | Control to set the property (only to query by the default ).
  index | Used only in FbxMultiplyDistBOF.

Returns:
  `true` on success, `false` otherwise.

Definition at line 86 of file fbxbindingoperator.h.

        {

            void const* lIn = pInOut;
            void* lOut = NULL;
            EFbxType lOutType;

            bool lSuccess = ReverseEvaluate(pObject, lIn, &lOut, &lOutType, setObj, index);

            if (lSuccess)
            {
                FbxTypeCopy(*pInOut, lOut, lOutType);
            }

            FreeEvaluationResult(lOutType, lOut);

            return lSuccess;
        }

bool EvaluateEntry | ( | FbxObject const * | pObject,
|  | char const * | pEntryDestinationName,
|  | FBXTYPE * | pResult
| ) |  | const`[inline]`

Search for all occurrences

Evaluate the value of an operator parameter.

Parameters:

  pObject | The object that will be evaluated.
  pEntryDestinationName | The name of the parameter. This is used to get the property or operator that is related to this parameter, then to evaluate the property or operator.
  pResult | A pointer to the result.

Returns:
  `true` on success, `false` otherwise.

Remarks:
  This method can handle different types of entries. For property entry and constant entry, this method will find out the property via the pEntryDestinationName and then evaluate its value; for operator entry, this method will find out the operator via the pEntryDestinationName and evaluate the operator function to get the property's value; for any other types of entry, this method is meaningless.

Definition at line 120 of file fbxbindingoperator.h.

        {
            EFbxType lResultType;
            void* lResult = NULL;

            bool lSuccess = EvaluateEntry(pObject, pEntryDestinationName, &lResultType, &lResult);

            if (lSuccess)
            {
                FbxTypeCopy(*pResult, lResult, lResultType);
            }

            FreeEvaluationResult(lResultType, lResult);

            return lSuccess;
        }

static void RegisterFunctions | ( |  | ) | `[static]`

Search for all occurrences

static void UnregisterFunctions | ( |  | ) | `[static]`

Search for all occurrences

bool EvaluateEntry | ( | FbxObject const * | pObject,
|  | char const * | pEntryDestinationName,
|  | EFbxType * | pResultType,
|  | void ** | pResult
| ) |  | const

Search for all occurrences

bool GetEntryProperty | ( | FbxObject const * | pObject,
|  | char const * | pEntryDestinationName,
|  | FbxProperty & | pProp
| ) |  | const

Search for all occurrences

virtual void Construct | ( | const FbxBindingOperator * | pFrom | ) | `[protected, virtual]`

Search for all occurrences

virtual void Destruct | ( | bool | pRecursive | ) | `[protected, virtual]`

Search for all occurrences

Optional destructor override, automatically called by default destructor.

Parameters:

  pRecursive | If true, children objects should be destroyed as well.

Remarks:
  In case it is decided to override this function, do not forget to call ParentClass::Destruct(pResursive) at the end.

Reimplemented from FbxObject.

virtual void ConstructProperties | ( | bool | pForceSet | ) | `[protected, virtual]`

Search for all occurrences

Optional property constructor override, automatically called by default constructor.

Parameters:

  pForceSet | If the property value must be set regardless of default value.

Remarks:
  If your object have properties, they must be initialized in this function.

Reimplemented from FbxObject.

void InstantiateFunction | ( |  | ) | `[protected]`

Search for all occurrences

bool Evaluate | ( | FbxObject const * | pObject,
|  | EFbxType * | pResultType,
|  | void ** | pResult
| ) |  | const`[protected]`

Search for all occurrences

bool ReverseEvaluate | ( | FbxObject const * | pTarget,
|  | void const * | pIn,
|  | void ** | pOut,
|  | EFbxType * | pOutType,
|  | bool | setObj,
|  | int | index
| ) |  | const`[protected]`

Search for all occurrences

void FreeEvaluationResult | ( | EFbxType | pResultType,
|  | void * | pResult
| ) |  | const`[protected]`

Search for all occurrences

## Member Data Documentation

FbxPropertyT<FbxString> FunctionName

Search for all occurrences

This property stores the name of function.

Default value is "".

Definition at line 141 of file fbxbindingoperator.h.

FbxPropertyT<FbxString> TargetName

Search for all occurrences

This property stores the name of target.

Default value is "".

Definition at line 147 of file fbxbindingoperator.h.

const char* sFunctionName`[static]`

Search for all occurrences

Function name.

Definition at line 154 of file fbxbindingoperator.h.

const char* sTargetName`[static]`

Search for all occurrences

Target name.

Definition at line 156 of file fbxbindingoperator.h.

const char* sDefaultFunctionName`[static]`

Search for all occurrences

Default value for function name.

Definition at line 159 of file fbxbindingoperator.h.

const char* sDefaultTargetName`[static]`

Search for all occurrences

Default value for target name.

Definition at line 161 of file fbxbindingoperator.h.

Function* mFunction`[protected]`

Search for all occurrences

Definition at line 317 of file fbxbindingoperator.h.

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

- fbxsdk/scene/shading/fbxbindingoperator.h

FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator
FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator FbxBindingOperator