| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859 |
- /****************************************************************************************
-
- Copyright (C) 2015 Autodesk, Inc.
- All rights reserved.
-
- Use of this software is subject to the terms of the Autodesk license agreement
- provided at the time of installation or download, or which otherwise accompanies
- this software in either electronic or hard copy form.
-
- ****************************************************************************************/
- //! \file fbxbindingoperator.h
- #ifndef _FBXSDK_SCENE_SHADING_BINDING_OPERATOR_H_
- #define _FBXSDK_SCENE_SHADING_BINDING_OPERATOR_H_
- #include <fbxsdk/fbxsdk_def.h>
- #include <fbxsdk/scene/shading/fbxbindingtablebase.h>
- #include <fbxsdk/fbxsdk_nsbegin.h>
- /** 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.
- * \code
- * //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() );
- * \endcode
- * \nosubgrouping
- * \see FbxOperatorEntryView, FbxBindingTableEntry, FbxPropertyEntryView
- */
- class FBXSDK_DLL FbxBindingOperator : public FbxBindingTableBase
- {
- FBXSDK_OBJECT_DECLARE(FbxBindingOperator, FbxBindingTableBase);
- public:
- /** Run the operator on the given object.
- * \param pObject The object that will be evaluated.
- * \param pResult A pointer to a buffer to hold the result.
- * \return \c true on success, \c false otherwise.
- */
- template <class FBXTYPE>
- bool Evaluate(const FbxObject* pObject, FBXTYPE* pResult) const
- {
- EFbxType lResultType;
- void* lResult = NULL;
- bool lSuccess = Evaluate(pObject, &lResultType, &lResult);
- if (lSuccess)
- {
- FbxTypeCopy(*pResult, lResult, lResultType);
- }
- FreeEvaluationResult(lResultType, lResult);
- return lSuccess;
- }
-
- /** Run the inverse operator on the given object,
- * assigning the result directly to the object.
- * \param pObject The object that will be evaluated.
- * \param pInOut Type of value being reversed.
- * \param setObj Control to set the property (only to query by the default ).
- * \param index Used only in FbxMultiplyDistBOF.
- * \return \c true on success, \c false otherwise.
- */
- template <class FBXTYPE>
- bool ReverseEvaluation(const FbxObject* pObject, FBXTYPE * pInOut,
- bool setObj=false, int index=0) const
- {
- const void* 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;
- }
- /** Evaluate the value of an operator parameter.
- * \param pObject The object that will be evaluated.
- * \param 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.
- * \param pResult A pointer to the result.
- * \return \c true on success, \c 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.
- */
- template <class FBXTYPE>
- bool EvaluateEntry(const FbxObject* pObject, const char* pEntryDestinationName, FBXTYPE* pResult) const
- {
- EFbxType lResultType;
- void* lResult = NULL;
- bool lSuccess = EvaluateEntry(pObject, pEntryDestinationName, &lResultType, &lResult);
- if (lSuccess)
- {
- FbxTypeCopy(*pResult, lResult, lResultType);
- }
- FreeEvaluationResult(lResultType, lResult);
- return lSuccess;
- }
- /** This property stores the name of function.
- *
- * Default value is "".
- */
- FbxPropertyT<FbxString> FunctionName;
- /** This property stores the name of target.
- *
- * Default value is "".
- */
- FbxPropertyT<FbxString> TargetName;
- //////////////////////////////////////////////////////////////////////////
- // Static values
- //////////////////////////////////////////////////////////////////////////
- //! Function name.
- static const char* sFunctionName;
- //! Target name.
- static const char* sTargetName;
- //! Default value for function name.
- static const char* sDefaultFunctionName;
- //! Default value for target name.
- static const char* sDefaultTargetName;
- //////////////////////////////////////////////////////////////////////////
- // Functions
- //////////////////////////////////////////////////////////////////////////
- /** \internal
- *
- */
- static void RegisterFunctions();
- /** \internal
- *
- */
- static void UnregisterFunctions();
- /** It represents a binding relationship between current object and the target.
- * Any binding operation need to specify a certain kind of binding function.
- * \nosubgrouping
- */
- class FBXSDK_DLL Function
- {
- public:
- //!Destructor.
- virtual ~Function() {}
- /** Run the operator on the given object.
- * \param pOperator The operator that will be applied.
- * \param pObject The object that will be evaluated.
- * \param pResultType Will be filled by the type of the result.
- * \param pResult Will be filled by a pointer to a buffer that hold the result.
- * The caller must call FreeEvaluationResult() when it is done with this pointer.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const = 0;
-
- /** Run the inverse operator on the given object,
- * assigning the result directly to the object.
- * \param pOperator The operator that will be applied.
- * \param pTarget The object that will be evaluated.
- * \param pIn
- * \param pOut
- * \param pOutType Type of value being reversed.
- * \param setObj Control to set the property (only to query by the default ).
- * \param index Used only in FbxMultiplyDistBOF.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const = 0;
- };
- /** The abstract factory class for binding function.
- * \nosubgrouping
- */
- class FBXSDK_DLL FunctionCreatorBase
- {
- public:
- //!Destructor.
- virtual ~FunctionCreatorBase() {}
- /** Get name of the function.
- * \return The name of the function.
- */
- virtual const char* GetFunctionName() const = 0;
- /** Create the function.
- */
- virtual Function* CreateFunction() const = 0;
- };
- /** The concrete factory class for binding function.
- * \nosubgrouping
- */
- template <class FUNCTION>
- class FunctionCreator : public FunctionCreatorBase
- {
- public:
- /** Get Name of the operation function.
- * \return The Name of the operation function.
- */
- virtual const char* GetFunctionName() const
- {
- return FUNCTION::FunctionName;
- }
- /** Create the operation function.
- */
- virtual Function* CreateFunction() const
- {
- return FbxNew< FUNCTION >();
- }
- };
- /** This utility class is used to register and unregister the binding function creators.
- * \nosubgrouping
- */
- class FBXSDK_DLL FunctionRegistry
- {
- public:
- /** To register the binding function creator.
- * \param pCreator The binding function creator to register.
- */
- static void RegisterFunctionCreator(FunctionCreatorBase const& pCreator)
- {
- sRegistry.Insert(pCreator.GetFunctionName(), &pCreator);
- }
- /** To unregister the binding function creator.
- * \param pCreator The binding function creator to unregister.
- */
- static void UnregisterFunctionCreator(FunctionCreatorBase const& pCreator)
- {
- sRegistry.Remove(pCreator.GetFunctionName());
- }
- /** To find the binding function creator by name.
- * \param pName The name of the operation function creator to find.
- */
- static const FunctionCreatorBase* FindCreator(const char* pName)
- {
- RegistryType::RecordType* lRecord = sRegistry.Find(pName);
- if (lRecord)
- {
- return lRecord->GetValue();
- }
- else
- {
- return NULL;
- }
- }
- private:
- typedef FbxMap<const char*, const FunctionCreatorBase*, FbxCharPtrCompare> RegistryType;
- static RegistryType sRegistry;
- };
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- bool EvaluateEntry(const FbxObject* pObject, const char* pEntryDestinationName, EFbxType* pResultType, void** pResult) const;
- bool GetEntryProperty(const FbxObject* pObject, const char* pEntryDestinationName, FbxProperty & pProp) const;
- protected:
- virtual void Construct(const FbxObject* pFrom);
- virtual void Destruct(bool pRecursive);
- virtual void ConstructProperties(bool pForceSet);
- void InstantiateFunction();
- bool Evaluate(const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- bool ReverseEvaluate(const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- void FreeEvaluationResult(EFbxType pResultType, void* pResult) const;
- Function* mFunction;
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** An evaluation operator to get the position of the node that is bound with this operator via a certain property.
- * The position of the node is represented by translation.
- */
- class FbxNodePositionBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluate the position of the node that is bound with this operator via a certain property.
- * The position of the node is represented by translation.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned, eFbxDouble4 in this case.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
-
- //! Inverse evaluation for this binding function is not implemented yet.
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxNodePositionBOF();
- virtual ~FbxNodePositionBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** An evaluation operator to get the direction of the node that is bound with this operator via a certain property.
- * The direction of the node is represented by Euler rotation.
- */
- class FbxNodeDirectionBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluate the direction of the node that is bound with this operator via a certain property.
- * The direction of the node is represented by Euler rotation.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned, eFbxDouble4 in this case.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
-
- //! Inverse evaluation for this binding function is not implemented yet.
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxNodeDirectionBOF();
- virtual ~FbxNodeDirectionBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** A pass through operator used to assign constants to parameters.
- */
- class FbxAssignBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object property specified by "X" and returns it.
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType Will be filled by the type of the result.
- * \param pResult Will be filled by a pointer to a buffer that hold the result.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
-
- //! Inverse evaluation for this binding function is not implemented yet.
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxAssignBOF();
- virtual ~FbxAssignBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** A conditional operator that outputs one out of two properties, based on
- * the value of a predicate property.
- */
- class FbxConditionalBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object property specified by "predicate".
- * If the property value is true (!= 0, != ""), returns the value of the
- * property specified by "ifTrue", else returns the value of the property
- * specified by "ifFalse".
- *
- * Currently the data types supported for the input property are
- * limited to "integer", "boolean", "float", "double" and "string".
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxConditionalBOF();
- virtual ~FbxConditionalBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** A switch operator that outputs one out of n properties, based on
- * the value of a predicate property.
- */
- class FbxSwitchBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object property specified by "predicate".
- * Returns the value of the property specified by "case_n", where n
- * is the value of "predicate". If there is no case_n entry, returns
- * the value of the property specified by "default".
- *
- * Currently the data types supported for the predicate property are
- * limited to "integer" and "boolean".
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxSwitchBOF();
- virtual ~FbxSwitchBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxTRSToMatrixBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "T", "R" and "S" and
- * return a transform matrix.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxTRSToMatrixBOF();
- virtual ~FbxTRSToMatrixBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxAddBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "X" and "Y"
- * return X+Y as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxAddBOF();
- virtual ~FbxAddBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxSubstractBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "X" and "Y"
- * return X-Y as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxSubstractBOF();
- virtual ~FbxSubstractBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxMultiplyBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "X" and "Y"
- * return X*Y as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- //Set index to 1 to get realWorldScale.
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxMultiplyBOF();
- virtual ~FbxMultiplyBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxMultiplyDistBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "X" and "Y"
- * return X*Y as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxMultiplyDistBOF();
- virtual ~FbxMultiplyDistBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxOneOverXBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "X"
- * return 1/X as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxOneOverXBOF();
- virtual ~FbxOneOverXBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxPowerBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object properties specified by "X" and "Y"
- * return X^Y as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxPowerBOF();
- virtual ~FbxPowerBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxDegreeToRadianBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object property specified by "X"
- * return X converted to radian as a float.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxDegreeToRadianBOF();
- virtual ~FbxDegreeToRadianBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxVectorDegreeToVectorRadianBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object property specified by "X"
- * return X converted to radian as a vector3.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxVectorDegreeToVectorRadianBOF();
- virtual ~FbxVectorDegreeToVectorRadianBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxSphericalToCartesianBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Evaluates the object property specified by "rho", "theta" and "phi"
- * return the converted Cartesian coordinates as a double3.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxSphericalToCartesianBOF();
- virtual ~FbxSphericalToCartesianBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- class FbxIsYupBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Check if the scene coordinate system is y-up
- * return a bool.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxIsYupBOF();
- virtual ~FbxIsYupBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** A symbol(string) operator that search the string table and return its corresponding unique id, based on
- * the value of a predicate property.
- */
- class FbxSymbolIDBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Check in the symbol table the string and returns its unique ID as an integer
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxSymbolIDBOF();
- virtual ~FbxSymbolIDBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- /** A chooser operator that check spot distribution and returns the correct value, based on
- * the value of a predicate property.
- */
- class FbxSpotDistributionChooserBOF : public FbxBindingOperator::Function
- {
- public:
- //! Name of the operation function.
- static const char* FunctionName;
- /** Check the enum of the spot distribution and returns the correct value
- * as an int.
- *
- * \param pOperator Operator running on the object.
- * \param pObject The object that will be evaluated.
- * \param pResultType The type of the result to be returned.
- * \param pResult A pointer to a buffer that can hold the result.
- * \return \c true on success, \c false otherwise.
- */
- virtual bool Evaluate(const FbxBindingOperator* pOperator, const FbxObject* pObject, EFbxType* pResultType, void** pResult) const;
-
- //! Inverse evaluation for this binding function is not implemented yet.
- virtual bool ReverseEvaluate(const FbxBindingOperator* pOperator, const FbxObject* pTarget, const void* pIn, void** pOut, EFbxType* pOutType, bool setObj, int index) const;
-
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- FbxSpotDistributionChooserBOF();
- virtual ~FbxSpotDistributionChooserBOF();
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- #include <fbxsdk/fbxsdk_nsend.h>
- #endif /* _FBXSDK_SCENE_SHADING_BINDING_OPERATOR_H_ */
|