11 #ifndef GR_DecorationRender_h
12 #define GR_DecorationRender_h
34 #define GR_DECOR_OPT_VECTOR_SCALE "vector_scale"
35 #define GR_DECOR_OPT_VECTOR_ARROW_TIP "vector_arrow_tip"
36 #define GR_DECOR_OPT_POINT_SCALE "point_scale"
37 #define GR_DECOR_OPT_COLOR "color"
38 #define GR_DECOR_OPT_SELECT_COLOR "select_color"
39 #define GR_DECOR_OPT_FONT_SIZE "font_size"
40 #define GR_DECOR_OPT_COLOR_ATTRIB "color_attrib"
41 #define GR_DECOR_OPT_NORMALIZE "normalize"
42 #define GR_DECOR_OPT_COLOR_XFORM "color_xform"
43 #define GR_DECOR_OPT_COLOR_XFORM_REF_VEC "color_xform_ref_vec"
57 override_vis(over_vis),
58 instance_group(inst_grp),
103 {
return myHasOverlayDecorations; }
132 RenderTarget render_mode,
134 PrimitiveType glprim_type,
145 PrimitiveType prim_type);
159 class GR_UserDecorInfo
163 : myCustomShaderRegistry(NULL),
174 : myCustomShaderRegistry(shader_registry),
175 myUserOption(user_option),
176 myAttribSize(attrib_size),
178 myIsString(is_string)
203 PrimitiveType prim_type,
214 bool showSelections()
const
215 {
return myRenderInfo->showSelections(); }
217 {
return myDecorEnabled[dec]; }
221 int getUserDecorAttribSize(
int decor)
const;
222 bool isFPUserDecor(
int decor)
const;
223 bool isStringUserDecor(
int decor)
const;
241 PrimitiveType prim_type);
242 void cleanupDecorationParms(
RE_Render *r,
262 PrimitiveType prim_type);
269 PrimitiveType prim_type,
287 int myUserStringCount[3];
288 int myUserStringIndex[3];
291 bool myHasDecorations;
292 bool myHasOverlayDecorations;
317 myDecorAttribSize(1),
328 const char *dec_attrib,
330 bool overlay =
false,
335 myDecorAttribOwner(dec_attrib_owner),
336 myDecorAttribSize(dec_attrib_size),
337 myDecorAttribStorage( dec_attrib_store),
339 mySelectMode(select_mode),
340 myVisibility(visibility),
345 myDecorAttrib.harden(dec_attrib);
351 myDecorAttribOwner = src.myDecorAttribOwner;
352 myDecorAttribSize = src.myDecorAttribSize;
354 myDecorAttrib.harden(src.myDecorAttrib);
355 myMaskAttrib.harden(src.myMaskAttrib);
357 myStyle = src.myStyle;
358 mySelectMode = src.mySelectMode;
359 myVisibility = src.myVisibility;
360 myDecorAttribStorage = src.myDecorAttribStorage;
362 myOptions = src.myOptions;
367 {
return myDecorAttribOwner; }
369 { myDecorAttribOwner = owner; }
371 {
return myDecorAttrib.length() ? myDecorAttrib : 0; }
373 { myDecorAttrib.harden(attrib); }
375 {
return myDecorAttribSize; }
377 { myDecorAttribSize =
size; }
379 {
return myDecorAttribStorage; }
381 { myDecorAttribStorage = store; }
383 {
return myMaskAttrib.length() ? myMaskAttrib : 0; }
385 { myMaskAttrib.harden(attrib); }
391 {
return mySelectMode; }
393 {
return myVisibility; }
395 { myVisibility = vis; }
400 const {
return myOptions; }
414 int myDecorAttribSize;
GR_VisualizerInfo(GA_AttributeOwner dec_attrib_owner, int dec_attrib_size, const char *dec_attrib, GT_Storage dec_attrib_store, bool overlay=false, GR_VisualizerDecorStyle style=GR_VISUALIZER_DECOR_TEXT, GR_SelectMode select_mode=GR_SELECT_NONE, GR_DecorVisibility visibility=GR_DECOR_ALWAYS_VISIBLE, int owner_id=-1)
GR_DecorVisibility getVisibility() const
const GR_DisplayOption * opts
const char * getMaskAttrib() const
void setMaskAttrib(const char *attrib)
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
GR_VisualizerDecorStyle getStyle() const
int getDecorAttribSize() const
const char * getDecorAttrib() const
void setDecorAttribOwner(GA_AttributeOwner owner)
set of parameters sent to GR_Primitive::update()
void setStyle(GR_VisualizerDecorStyle style)
GA_API const UT_StringHolder scale
GR_DecorationParms(const GR_DisplayOption *opt, bool over, bool over_vis, int inst_grp, GR_DecorRenderFlags flags)
GR_DecorRenderFlags render_flags
void setOwnerId(int owner_id)
void setDecorAttrib(const char *attrib)
void setDecorAttribStorage(GT_Storage store)
GT_Storage getDecorAttribStorage() const
GR_VisualizerInfo & operator=(const GR_VisualizerInfo &src)
GA_AttributeOwner getDecorAttribOwner() const
The base class for all GT primitive types.
const UT_Options * getOptions() const
GR_SelectMode getSelectMode() const
A map of string to various well defined value types.
void attachOptions(UT_Options *opts)
void setVisibility(GR_DecorVisibility vis)
bool hasOverlayDecorations() const
GLint GLint GLsizei GLint GLenum GLenum type
void setDecorAttribSize(int size)
const GR_VisualizerInfo * visualizer