Free Electron
MetaPlugin.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __operator_MetaPlugin_h__
8 #define __operator_MetaPlugin_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Common functionality of meta plugins for Houdini, Maya, etc
17 
18  @ingroup meta
19 *//***************************************************************************/
20 class FE_DL_EXPORT MetaPlugin: public OperatorPlugin
21 {
22  public:
23  MetaPlugin(void);
24 virtual ~MetaPlugin(void);
25 
26  //* as OperatorPlugin
27 virtual void dirty(BWORD a_aggressive) {}
28 virtual void select(void) {}
29 
30 
31 virtual BWORD chronicle(String a_change,
32  sp<Counted> a_spOldCounted,
33  sp<Counted> a_spNewCounted)
34  { return FALSE; }
35 virtual BWORD interrupted(void) { return FALSE; }
36 
37  void setupScope(sp<Scope> a_spScope);
38  void setupBrush(sp<Scope> a_spScope);
39 
40  void insertHandler(sp<HandlerI> a_spHandlerI);
41  void removeHandler(sp<HandlerI> a_spHandlerI);
42 
43  /// @internal
45  { return m_spDrawBrush; }
46 
47  /// @internal
49  { return m_spDrawBrushOverlay; }
50 
51  /// @internal
53  { return m_spDrawGuideChain; }
54 
55  /// @internal
57  { return m_spDrawGuideCached; }
58 
59  /// @internal
61  { return m_spOperatorSurfaceI; }
62 
63  /// @internal
64  U32 inputCount(void)
65  { return m_surfaceInputArray.size(); }
66 
67  /// @internal
68  sp<Component> input(U32 a_index)
69  { return m_surfaceInputArray[a_index]; }
70 
71  /// @internal
73  { return m_spSurfaceOutput; }
74 
75  protected:
76 virtual bool evalParamBoolean(String a_key,Real a_time);
77 virtual I32 evalParamInteger(String a_key,Real a_time);
78 virtual String evalParamString(String a_key,Real a_time);
79  BWORD evalParamCondition(
80  String a_conditions,Real a_time);
81 
82  void clearReferences(void);
83 
84  sp<OperatorSurfaceI> m_spOperatorSurfaceI;
85  sp<SignalerI> m_spSignalerI;
86  sp<Layout> m_spCookLayout;
87  sp<Layout> m_spBrushLayout;
88 
89  sp<DrawI> m_spDrawOutput;
90  sp<DrawI> m_spDrawGuideChain;
91  sp<DrawI> m_spDrawGuideCached;
92  sp<DrawI> m_spDrawBrush;
93  sp<DrawI> m_spDrawBrushOverlay;
94 
95  Record m_cookSignal;
96  Record m_brushSignal;
97 
98  Accessor< Real > m_aFrame;
99  Accessor< Real > m_aStartFrame;
100  Accessor< Real > m_aEndFrame;
101  Accessor< Real > m_aTime;
102  Accessor< sp<Component> > m_aSurfaceOutput;
103  Accessor< sp<Component> > m_aDrawOutput;
104  Accessor< sp<Component> > m_aDrawGuide;
105  Accessor< sp<Component> > m_aDrawBrush;
106  Accessor< sp<Component> > m_aDrawBrushOverlay;
107  Accessor<Record> m_aWindowEvent;
108  Accessor<SpatialTransform> m_aCameraTransform;
109  Accessor<SpatialVector> m_aRayOrigin;
110  Accessor<SpatialVector> m_aRayDirection;
111 
112  Array< sp<Component> > m_surfaceInputArray;
113  sp<Component> m_spSurfaceOutput;
114  String m_nameOutput;
115  String m_lastName;
116  Real m_lastTime;
117 };
118 
119 } /* namespace ext */
120 } /* namespace fe */
121 
122 #endif /* __operator_MetaPlugin_h__ */
sp< OperatorSurfaceI > operatorSurface(void)
Definition: MetaPlugin.h:60
kernel
Definition: namespace.dox:3
sp< DrawI > drawBrush(void)
Definition: MetaPlugin.h:44
sp< DrawI > drawBrushOverlay(void)
Definition: MetaPlugin.h:48
sp< Component > output(void)
Definition: MetaPlugin.h:72
U32 inputCount(void)
Definition: MetaPlugin.h:64
Automatically reference-counted string container.
Definition: String.h:128
sp< Component > input(U32 a_index)
Definition: MetaPlugin.h:68
sp< DrawI > drawGuideCached(void)
Definition: MetaPlugin.h:56
Wrapper for std::vector.
Definition: Array.h:21
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Common functionality of meta plugins for Houdini, Maya, etc.
Definition: MetaPlugin.h:20
sp< DrawI > drawGuideChain(void)
Definition: MetaPlugin.h:52
Plugin back reference for OperatorSurfaceI.
Definition: OperatorPlugin.h:20