HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VIS_Defines.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: VIS_Defines.h (VIS Library, C++)
7  *
8  * COMMENTS:
9  * Common definitions used by visualization classes.
10  */
11 
12 #ifndef __VIS_Defines__
13 #define __VIS_Defines__
14 
15 #include "VIS_API.h"
16 #include <UT/UT_Notifier.h>
17 
18 #include <DEP/DEP_MicroNode.h>
19 #include <PRM/PRM_ParmList.h>
20 
22 {
23 public:
24  VIS_Context();
25  explicit VIS_Context(int key);
26  int getKey() const;
27  inline bool operator==(VIS_Context other) const;
28  inline bool operator!=(VIS_Context other) const;
29 
30  const static VIS_Context Common;
31  const static VIS_Context None;
32 private:
33  int myKey;
34 };
35 
36 // Default icon for a new visualizer type
37 #define VIS_TYPE_DEFAULT_ICON "SHOP_vm_geo_file"
38 
39 // Name of visualizer types used to load up old user options as visualizers:
40 #define VIS_GENERIC_NAME "vis_generic"
41 #define VIS_MARKER_NAME "vis_marker"
42 
43 // Standard visualizer parameter names:
44 #define VIS_PARM_NAME_ATTRIB "attrib"
45 #define VIS_PARM_NAME_GROUP "group"
46 #define VIS_PARM_NAME_CLASS "class"
47 
48 
50 {
51 public:
52  VIS_TableRef();
53  explicit VIS_TableRef(int i);
54  inline bool operator==(const VIS_TableRef other) const;
55  inline bool operator!=(const VIS_TableRef other) const;
56  inline bool isNode() const { return myId >= 0; }
57  inline int getId() const { return myId; }
58 
59  static const VIS_TableRef Unassigned;
60  static const VIS_TableRef SceneFile;
61  static const VIS_TableRef Global;
62  static const VIS_TableRef Adhoc;
63 
64 private:
65  int myId;
66 };
67 
69 {
71  {
79  TABLE_DELETED
80  };
81 
82  VIS_Event(VIS_EventType type, VIS_TableRef owner, int index, int uid) :
83  myEventType(type), myOwner(owner), myIndex(index), myUniqueId(uid)
84  {}
85 
88  int myIndex;
90 };
91 
92 
94 
95 namespace VIS_Flags
96 {
97 
98 // Visualizer flag bits
99 enum
100 {
116  //----------------
118 };
119 
120 // Visualizer flags
136 
137 // Mount flag bits
138 enum
139 {
151  //----------------
153 };
154 
155 // Mount flags
163 const uint32 NoMove = 1 << NO_MOVE;
164 const uint32 NoDelete = 1 << NO_DELETE;
165 const uint32 NoSave = 1 << NO_SAVE;
167 } // namespace VIS_Flags
168 
170 {
175 
176  NUM_SCOPES // count sentinel
177 };
178 
179 
180 // Helper single input micronode subclass with the ability to arm and disarm
181 
183 {
184 public:
185  VIS_MicroNode() : myArmed(false), myInput(NULL) {}
186  void setInput(DEP_MicroNode *input) { myInput = input; }
187  void arm(bool armed);
188  bool isArmed() { return myArmed; }
189  DEP_MicroNode *getInput() { return myInput; }
190 private:
191  DEP_MicroNode *myInput;
192  bool myArmed;
193 };
194 
195 
196 inline bool VIS_TableRef::operator==(VIS_TableRef other) const
197 {
198  return myId == other.myId;
199 }
200 inline bool VIS_TableRef::operator!=(VIS_TableRef other) const
201 {
202  return myId != other.myId;
203 }
204 
205 
206 inline bool
208 {
209  return myKey == other.myKey;
210 }
211 
212 inline bool
214 {
215  return myKey != other.myKey;
216 }
217 
218 
219 
220 #endif
static const VIS_TableRef Global
Definition: VIS_Defines.h:61
static const VIS_Context None
Definition: VIS_Defines.h:31
const uint32 NeedsUpdate
Definition: VIS_Defines.h:132
VIS_VisualizerScope
Definition: VIS_Defines.h:169
VIS_EventType myEventType
Definition: VIS_Defines.h:86
const uint32 CollectsPrimitives
Definition: VIS_Defines.h:135
bool operator==(const VIS_TableRef other) const
Definition: VIS_Defines.h:196
const uint32 NoMove
Definition: VIS_Defines.h:163
const uint32 RendersDecorations
Definition: VIS_Defines.h:124
const uint32 ActOnUnselected
Definition: VIS_Defines.h:156
const uint32 ShowInToolbar
Definition: VIS_Defines.h:162
bool isArmed()
Definition: VIS_Defines.h:188
int getId() const
Definition: VIS_Defines.h:57
bool isNode() const
Definition: VIS_Defines.h:56
void setInput(DEP_MicroNode *input)
Definition: VIS_Defines.h:186
const uint32 ActOnDisplayed
Definition: VIS_Defines.h:159
const uint32 FiltersPrimitives
Definition: VIS_Defines.h:122
DEP_MicroNode * getInput()
Definition: VIS_Defines.h:189
const uint32 CommonContextOnly
Definition: VIS_Defines.h:131
VIS_Event(VIS_EventType type, VIS_TableRef owner, int index, int uid)
Definition: VIS_Defines.h:82
const uint32 NeedsRefine
Definition: VIS_Defines.h:133
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static const VIS_Context Common
Definition: VIS_Defines.h:30
const uint32 HasGroupParm
Definition: VIS_Defines.h:129
int myIndex
Definition: VIS_Defines.h:88
const uint32 ActOnTemplated
Definition: VIS_Defines.h:161
const uint32 NeedsRefineOnDeactivation
Definition: VIS_Defines.h:127
const uint32 NeedsRefineOnActivation
Definition: VIS_Defines.h:126
int myUniqueId
Definition: VIS_Defines.h:89
const uint32 NoSave
Definition: VIS_Defines.h:165
UT_NotifierImpl< VIS_Event & > VIS_EventNotifier
Definition: VIS_Defines.h:93
bool operator!=(const VIS_TableRef other) const
Definition: VIS_Defines.h:200
bool operator!=(VIS_Context other) const
Definition: VIS_Defines.h:213
bool operator==(VIS_Context other) const
Definition: VIS_Defines.h:207
#define VIS_API
Definition: VIS_API.h:10
const uint32 CreatesPrimitives
Definition: VIS_Defines.h:121
const uint32 NoDelete
Definition: VIS_Defines.h:164
static const VIS_TableRef SceneFile
Definition: VIS_Defines.h:60
static const VIS_TableRef Unassigned
Definition: VIS_Defines.h:59
const uint32 ActOnSelected
Definition: VIS_Defines.h:157
static const VIS_TableRef Adhoc
Definition: VIS_Defines.h:62
const uint32 ExclusiveActionPerType
Definition: VIS_Defines.h:130
void arm(bool armed)
GLuint index
Definition: glcorearb.h:786
const uint32 NoTypeChange
Definition: VIS_Defines.h:166
const uint32 HasAttributeParm
Definition: VIS_Defines.h:128
unsigned int uint32
Definition: SYS_Types.h:40
const uint32 ActOnGhosted
Definition: VIS_Defines.h:158
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:165
VIS_TableRef myOwner
Definition: VIS_Defines.h:87
const uint32 ActOnCurrent
Definition: VIS_Defines.h:160
type
Definition: core.h:1059
const uint32 SetsUpRender
Definition: VIS_Defines.h:125
const uint32 NeedsRefineOnGeoChange
Definition: VIS_Defines.h:134
const uint32 SetsUpDecorations
Definition: VIS_Defines.h:123