Open Reality Reference Guide
fbevaluatemanager.h
Go to the documentation of this file.
1 #ifndef __FBEVALUATEMANAGER_H__
2 #define __FBEVALUATEMANAGER_H__
3 /**************************************************************************
4 Copyright (c) 1994 - 2013 Autodesk, Inc. and/or its licensors.
5 All Rights Reserved.
6 
7 The coded instructions, statements, computer programs, and/or related
8 material (collectively the "Data") in these files contain unpublished
9 information proprietary to Autodesk, Inc. and/or its licensors, which is
10 protected by Canada and United States of America federal copyright law
11 and by international treaties.
12 
13 The Data may not be disclosed or distributed to third parties, in whole
14 or in part, without the prior written consent of Autodesk, Inc.
15 ("Autodesk").
16 
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24 FREE.
25 
26 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
45 
48 #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 // Essential includes
52 #include <fbsdk/fbcomponent.h>
53 
54 #ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {;
56 #endif
57 
60 {
64 };
65 
66 FB_DEFINE_ENUM(FBSDK_DLL, ParallelScheduleType);
67 
72 {
81 };
82 
83 typedef void (*kFBEvaluationGlobalFunctionCallback)(FBEvaluateInfo* pEvaluteInfo);
84 
87 {
88 public:
92  FBEventEvalGlobalCallback( HKEventBase pEvent );
93 
96 
101 };
102 
105 {
106 public:
107  virtual void Add ( HICallback pOwner, kICallbackHandler pHandler );
108  virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
109 };
110 
113 {
114 public:
115  virtual void Add ( HICallback pOwner, kICallbackHandler pHandler );
116  virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
117 };
118 
121 {
122 public:
123  virtual void Add ( HICallback pOwner, kICallbackHandler pHandler );
124  virtual void Remove ( HICallback pOwner, kICallbackHandler pHandler );
125 };
126 
133 {
135 
140  FBEvaluateManager(HIObject pObject=NULL);
141 
142 public:
147  FBPropertyParallelScheduleType ParallelScheduleType;
150 
153 
156 
160  bool IsInteractiveMode() const;
161 
172 
178  void RegisterEvaluationGlobalFunction (kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming);
179 
184  void UnregisterEvaluationGlobalFunction(kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming);
185 
193 
195 
200 };
201 
202 
208 
209 #ifdef FBSDKUseNamespace
210 } // namespace FBSDKNamespace
211 #endif
212 
213 #endif
FBEvaluateManager::InvalidateDAG
void InvalidateDAG()
Invalidate the DAG and trigger parallel scheduling at the next frame.
FBEvaluateManager::IsInteractiveMode
bool IsInteractiveMode() const
Check if the application main loop is in interactive or offline render mode.
FBEvaluateManager::NodeCount
FBPropertyInt NodeCount
Read only Property: Number of nodes to evaluate.
Definition: fbevaluatemanager.h:151
FBEvaluateManager::DeviceCount
FBPropertyInt DeviceCount
Read only Property: Number of devices to evaluate.
Definition: fbevaluatemanager.h:152
FB_DEFINE_ENUM
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
FBEvaluateManager::OnEvaluationPipelineEvent
FBPropertyEventCallbackEvalPipeline OnEvaluationPipelineEvent
For callback events at evaluation pipeline.
Definition: fbevaluatemanager.h:190
FBPropertyInt
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
Definition: fbproperties.h:1331
FBParallelScheduleType
FBParallelScheduleType
DEPRICATED use ParallelEvaluation on FBEvaluateManager insteadAvailable DAG parallel schedule algorit...
Definition: fbevaluatemanager.h:60
FBPropertyEventCallbackSynPoint
PropertyEvent: Callback at synchronization point (for kFBGlobalEvalCallbackSyn)
Definition: fbevaluatemanager.h:121
FBEvaluateManager::UnregisterEvaluationGlobalFunction
void UnregisterEvaluationGlobalFunction(kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming)
Register free callback function to critical timings / stages in the pipeline.
FBEvaluateManager::OnRenderingPipelineEvent
FBPropertyEventCallbackRenderPipeline OnRenderingPipelineEvent
For callback events at rendering pipeline.
Definition: fbevaluatemanager.h:191
FBEvaluateManager::ParallelDeformation
FBPropertyBool ParallelDeformation
Read/Write Property: true if deformation is evaluated in parallel.
Definition: fbevaluatemanager.h:144
kFBGlobalEvalCallbackBeforePlottingFrame
@ kFBGlobalEvalCallbackBeforePlottingFrame
Invoked before plotting a frame.
Definition: fbevaluatemanager.h:79
kFBGlobalEvalCallbackAfterDAG
@ kFBGlobalEvalCallbackAfterDAG
Invoked after all DAG (Transformation & Deformation) evaluation tasks finished in evaluation pipeline...
Definition: fbevaluatemanager.h:74
kFBParallelScheduleSerial
@ kFBParallelScheduleSerial
No parallel schedule, use sequential evaluation order instead.
Definition: fbevaluatemanager.h:61
kFBGlobalEvalCallbackAfterDeform
@ kFBGlobalEvalCallbackAfterDeform
Invoked after all deformation tasks finished in evaluation pipeline / thread.
Definition: fbevaluatemanager.h:75
FBEvaluateManager
Definition: fbevaluatemanager.h:133
FBEvaluateManager::FrameSkipOptimization
FBPropertyBool FrameSkipOptimization
Read/Write Property: if true, apply frame skip optimization during playback. off-line rendering don't...
Definition: fbevaluatemanager.h:146
kFBGlobalEvalCallbackBeforeRender
@ kFBGlobalEvalCallbackBeforeRender
Invoked in rendering pipeline, before any rendering tasks start (immediately after clearing GL back b...
Definition: fbevaluatemanager.h:77
FBEvaluateManager::ParallelEvaluation
FBPropertyBool ParallelEvaluation
Read/Write Property: true if parallel DAG schedule algorithm is being used. false when serial algorit...
Definition: fbevaluatemanager.h:148
__FBClassDeclare
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FBGlobalEvalCallbackTiming
FBGlobalEvalCallbackTiming
Global Evaluation callback timing.
Definition: fbevaluatemanager.h:72
FBEvent
Base Event class.
Definition: fbcomponent.h:940
FBEvaluateManager::TheOne
static FBEvaluateManager & TheOne()
Get the global object for this class.
FBPropertyEventCallbackRenderPipeline::Add
virtual void Add(HICallback pOwner, kICallbackHandler pHandler)
Add/Remove a callback.
FBEvaluateManager::DualQuaternionSkinning
FBPropertyBool DualQuaternionSkinning
Read/Write Property: Using state of the Dual Quaternion for skinning (CPU Skinning or GPU Skinning).
Definition: fbevaluatemanager.h:149
FBPropertyEventCallbackSynPoint::Add
virtual void Add(HICallback pOwner, kICallbackHandler pHandler)
Add/Remove a callback.
FBSDK_DLL
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbevaluatemanager.h:48
kFBGlobalEvalCallbackSyn
@ kFBGlobalEvalCallbackSyn
Invoked when both evaluation & rendering pipelines / threads are stopped. Useful for some complicated...
Definition: fbevaluatemanager.h:76
FBEvaluateManager::UseGPUDeformation
FBPropertyBool UseGPUDeformation
Read/Write Property: true if GPU deformation is used.
Definition: fbevaluatemanager.h:145
FBEventEvalGlobalCallback
Event: Global Evaluation pipeline critical timing callback event.
Definition: fbevaluatemanager.h:87
FBPropertyEvent
PropertyEvent: Base event class.
Definition: fbproperties.h:515
FBPropertyEventCallbackEvalPipeline::Add
virtual void Add(HICallback pOwner, kICallbackHandler pHandler)
Add/Remove a callback.
FBPropertyBool
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Definition: fbproperties.h:1308
fbcomponent.h
Basic class definitions.
__FB_FORWARD
__FB_FORWARD(FBEvaluateManager)
Evaluate Manager.
FBEvaluateManager::ParallelScheduleType
FBPropertyParallelScheduleType ParallelScheduleType
DEPRICATED Read/Write Property: choose between serial and parallel DAG schedule algorithm....
Definition: fbevaluatemanager.h:147
kFBParallelScheduleSimple
@ kFBParallelScheduleSimple
Simple parallel schedule, mainly analyze the task dependency based on Motion Hierarchy (scene graph),...
Definition: fbevaluatemanager.h:62
FBPropertyEventCallbackEvalPipeline
PropertyEvent: Callback at evaluation pipeline (for kFBGlobalEvalCallbackBeforeDAG,...
Definition: fbevaluatemanager.h:105
FBEventEvalGlobalCallback::FBEventEvalGlobalCallback
FBEventEvalGlobalCallback(HKEventBase pEvent)
Constructor.
FBEventEvalGlobalCallback::GetEvaluateInfo
FBEvaluateInfo * GetEvaluateInfo() const
Returns the Evaluation Info object associated with this callback event.
kFBGlobalEvalCallbackAfterPlottingFrame
@ kFBGlobalEvalCallbackAfterPlottingFrame
Invoked after plotting a frame.
Definition: fbevaluatemanager.h:80
FBEvaluateManager::OnSynchronizationEvent
FBPropertyEventCallbackSynPoint OnSynchronizationEvent
For callback events at synchronization point.
Definition: fbevaluatemanager.h:192
FBEvaluateManager::RegisterEvaluationGlobalFunction
void RegisterEvaluationGlobalFunction(kFBEvaluationGlobalFunctionCallback pCallback, FBGlobalEvalCallbackTiming pTiming)
Register free callback function to critical timings / stages in the pipeline.
kFBGlobalEvalCallbackBeforeDAG
@ kFBGlobalEvalCallbackBeforeDAG
Invoked before any DAG (Transformation & Deformation) evaluation tasks started in evaluation pipeline...
Definition: fbevaluatemanager.h:73
FBEvaluateInfo
AnimationNodeNotify evaluation information.
Definition: fbevaluateinfo.h:79
FBEvaluateManager::ParallelPipeline
FBPropertyBool ParallelPipeline
Read/Write Property: true if transformation is evaluated in parallel.
Definition: fbevaluatemanager.h:143
kFBGlobalEvalCallbackAfterRender
@ kFBGlobalEvalCallbackAfterRender
Invoked in rendering pipeline, after any rendering tasks finish (just before swapping GL back/front b...
Definition: fbevaluatemanager.h:78
FBComponent
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
kFBParallelScheduleAdvanced
@ kFBParallelScheduleAdvanced
Advanced parallel schedule, task dependency analyzation will be able to across ative constraint,...
Definition: fbevaluatemanager.h:63
FBSchedulingDependencyOutput
K_DLLIMPORT void FBSchedulingDependencyOutput(bool pEnable)
Debug function for MT dependency debug.
FBPropertyEventCallbackRenderPipeline
PropertyEvent: Callback at evaluation pipeline (for kFBGlobalEvalCallbackBeforeRender,...
Definition: fbevaluatemanager.h:113
FBEventEvalGlobalCallback::GetTiming
FBGlobalEvalCallbackTiming GetTiming() const
Get Callback Timing.