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  VIS_Context(const VIS_Context &other);
27  int getKey() const;
28  inline bool operator==(VIS_Context other) const;
29  inline bool operator!=(VIS_Context other) const;
30 
31  const static VIS_Context Common;
32  const static VIS_Context None;
33 private:
34  int myKey;
35 };
36 
37 // Default icon for a new visualizer type
38 #define VIS_TYPE_DEFAULT_ICON "SHOP_vm_geo_file"
39 
40 // Name of visualizer types used to load up old user options as visualizers:
41 #define VIS_GENERIC_NAME "vis_generic"
42 #define VIS_MARKER_NAME "vis_marker"
43 
44 // Standard visualizer parameter names:
45 #define VIS_PARM_NAME_ATTRIB "attrib"
46 #define VIS_PARM_NAME_GROUP "group"
47 #define VIS_PARM_NAME_CLASS "class"
48 
49 
51 {
52 public:
53  VIS_TableRef();
54  explicit VIS_TableRef(int i);
56  inline bool operator==(const VIS_TableRef other) const;
57  inline bool operator!=(const VIS_TableRef other) const;
58  inline bool isNode() const { return myId >= 0; }
59  inline int getId() const { return myId; }
60 
61  static const VIS_TableRef Unassigned;
62  static const VIS_TableRef SceneFile;
63  static const VIS_TableRef Global;
64  static const VIS_TableRef Adhoc;
65 
66 private:
67  int myId;
68 };
69 
71 {
73  {
81  TABLE_DELETED
82  };
83 
84  VIS_Event(VIS_EventType type, VIS_TableRef owner, int index, int uid) :
85  myEventType(type), myOwner(owner), myIndex(index), myUniqueId(uid)
86  {}
87 
90  int myIndex;
92 };
93 
94 
96 
97 namespace VIS_Flags
98 {
99 
100 // Visualizer flag bits
101 enum
102 {
118  //----------------
120 };
121 
122 // Visualizer flags
138 
139 // Mount flag bits
140 enum
141 {
153  //----------------
155 };
156 
157 // Mount flags
165 const uint32 NoMove = 1 << NO_MOVE;
166 const uint32 NoDelete = 1 << NO_DELETE;
167 const uint32 NoSave = 1 << NO_SAVE;
169 } // namespace VIS_Flags
170 
172 {
177 
178  NUM_SCOPES // count sentinel
179 };
180 
181 
182 // Helper single input micronode subclass with the ability to arm and disarm
183 
185 {
186 public:
187  VIS_MicroNode() : myArmed(false), myInput(NULL) {}
188  void setInput(DEP_MicroNode *input) { myInput = input; }
189  void arm(bool armed);
190  bool isArmed() { return myArmed; }
191  DEP_MicroNode *getInput() { return myInput; }
192 private:
193  DEP_MicroNode *myInput;
194  bool myArmed;
195 };
196 
197 
198 inline bool VIS_TableRef::operator==(VIS_TableRef other) const
199 {
200  return myId == other.myId;
201 }
202 inline bool VIS_TableRef::operator!=(VIS_TableRef other) const
203 {
204  return myId != other.myId;
205 }
206 
207 
208 inline bool
210 {
211  return myKey == other.myKey;
212 }
213 
214 inline bool
216 {
217  return myKey != other.myKey;
218 }
219 
220 
221 
222 #endif
static const VIS_TableRef Global
Definition: VIS_Defines.h:63
static const VIS_Context None
Definition: VIS_Defines.h:32
const uint32 NeedsUpdate
Definition: VIS_Defines.h:134
VIS_VisualizerScope
Definition: VIS_Defines.h:171
VIS_EventType myEventType
Definition: VIS_Defines.h:88
const uint32 CollectsPrimitives
Definition: VIS_Defines.h:137
bool operator==(const VIS_TableRef other) const
Definition: VIS_Defines.h:198
const uint32 NoMove
Definition: VIS_Defines.h:165
const uint32 RendersDecorations
Definition: VIS_Defines.h:126
const uint32 ActOnUnselected
Definition: VIS_Defines.h:158
const uint32 ShowInToolbar
Definition: VIS_Defines.h:164
bool isArmed()
Definition: VIS_Defines.h:190
int getId() const
Definition: VIS_Defines.h:59
bool isNode() const
Definition: VIS_Defines.h:58
void setInput(DEP_MicroNode *input)
Definition: VIS_Defines.h:188
const uint32 ActOnDisplayed
Definition: VIS_Defines.h:161
const uint32 FiltersPrimitives
Definition: VIS_Defines.h:124
DEP_MicroNode * getInput()
Definition: VIS_Defines.h:191
png_uint_32 i
Definition: png.h:2877
const uint32 CommonContextOnly
Definition: VIS_Defines.h:133
VIS_Event(VIS_EventType type, VIS_TableRef owner, int index, int uid)
Definition: VIS_Defines.h:84
const uint32 NeedsRefine
Definition: VIS_Defines.h:135
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static const VIS_Context Common
Definition: VIS_Defines.h:31
const uint32 HasGroupParm
Definition: VIS_Defines.h:131
int myIndex
Definition: VIS_Defines.h:90
const uint32 ActOnTemplated
Definition: VIS_Defines.h:163
const uint32 NeedsRefineOnDeactivation
Definition: VIS_Defines.h:129
const uint32 NeedsRefineOnActivation
Definition: VIS_Defines.h:128
int myUniqueId
Definition: VIS_Defines.h:91
const uint32 NoSave
Definition: VIS_Defines.h:167
UT_NotifierImpl< VIS_Event & > VIS_EventNotifier
Definition: VIS_Defines.h:95
bool operator!=(const VIS_TableRef other) const
Definition: VIS_Defines.h:202
bool operator!=(VIS_Context other) const
Definition: VIS_Defines.h:215
bool operator==(VIS_Context other) const
Definition: VIS_Defines.h:209
#define VIS_API
Definition: VIS_API.h:10
const uint32 CreatesPrimitives
Definition: VIS_Defines.h:123
const uint32 NoDelete
Definition: VIS_Defines.h:166
static const VIS_TableRef SceneFile
Definition: VIS_Defines.h:62
static const VIS_TableRef Unassigned
Definition: VIS_Defines.h:61
const uint32 ActOnSelected
Definition: VIS_Defines.h:159
static const VIS_TableRef Adhoc
Definition: VIS_Defines.h:64
const uint32 ExclusiveActionPerType
Definition: VIS_Defines.h:132
void arm(bool armed)
GLuint index
Definition: glcorearb.h:785
const uint32 NoTypeChange
Definition: VIS_Defines.h:168
const uint32 HasAttributeParm
Definition: VIS_Defines.h:130
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
const uint32 ActOnGhosted
Definition: VIS_Defines.h:160
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:165
VIS_TableRef myOwner
Definition: VIS_Defines.h:89
const uint32 ActOnCurrent
Definition: VIS_Defines.h:162
const uint32 SetsUpRender
Definition: VIS_Defines.h:127
const uint32 NeedsRefineOnGeoChange
Definition: VIS_Defines.h:136
const uint32 SetsUpDecorations
Definition: VIS_Defines.h:125
GLenum src
Definition: glcorearb.h:1792
unsigned int uint32
Definition: SYS_Types.h:36