HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
VISF_Primitive.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: VISF_Primitive.h (VISF Library, C++)
7
*
8
* COMMENTS:
9
* A subclass of GR_Primitive, the class VISF_Primitive is a wrapper
10
* for geometries generated by visualizers. It control the rendering
11
* these geometries according to the activation state of the associated
12
* visualizer.
13
*/
14
15
#ifndef __VISF_Primitive__
16
#define __VISF_Primitive__
17
18
#include "
VISF_API.h
"
19
20
#include <
GUI/GUI_GeoRender.h
>
21
#include <
GR/GR_Defines.h
>
22
#include <
GR/GR_Primitive.h
>
23
#include <
VIS/VIS_Handle.h
>
24
25
class
VISF_API
VISF_Primitive
:
public
GR_Primitive
26
{
27
public
:
28
VISF_Primitive
(
const
GR_RenderInfo
*info,
29
const
char
*
cache_name
);
30
31
~
VISF_Primitive
()
override
;
32
33
34
GR_BasePrimType
getBasePrimType
()
const override
35
{
return
GR_BASE_PRIM_VISUALIZE
; }
36
37
const
char
*
className
()
const override
{
return
"VISF_Primitive"
; }
38
39
virtual
void
updateVisualizer(
RE_RenderContext
r
,
40
const
GT_PrimitiveHandle
&primh,
41
const
GR_UpdateParms
&update_parms) = 0;
42
43
virtual
void
renderVisualizer(
RE_RenderContext
r
,
44
GR_RenderMode
render_mode,
45
GR_RenderFlags
render_flags,
46
GR_DrawParms
dp) = 0;
47
48
virtual
int
renderVisualizerPick(
RE_RenderContext
r
,
49
const
GR_DisplayOption
*opt,
50
unsigned
int
pick_type,
51
GR_PickStyle
pick_style,
52
bool
has_pick_map) = 0;
53
54
virtual
void
renderVisualizerDecoration(
RE_RenderContext
r
,
55
GR_Decoration
decor,
56
const
GR_DecorationParms
&parms) = 0;
57
58
virtual
59
GR_PrimAcceptResult
collectPrimitive(
GT_PrimitiveType
t
,
int
geo_type,
60
const
GT_PrimitiveHandle
>_prim,
61
const
GEO_Primitive
*geo_prim,
62
const
GR_Primitive
*gr_prim);
63
64
void
setVisHandle(
VIS_Handle
vh);
65
66
67
bool
isObjectSelected
()
68
{
return
myObjectSelected; }
69
70
OP_Node
*
getOpNode
()
71
{
return
myOpNode; }
72
73
GU_ConstDetailHandle
getDetail
()
74
{
return
myDetail; }
75
private
:
76
// Treat the following virtuals as final and override those above instead!
77
// TODO: Turn all these virtuals "final" when we have the compiler support.
78
79
void
render
(
RE_RenderContext
r
,
80
GR_RenderMode
render_mode,
81
GR_RenderFlags
flags
,
82
GR_DrawParms
dp)
override
;
83
84
int
renderPick
(
RE_RenderContext
r
,
85
const
GR_DisplayOption
*opt,
86
unsigned
int
pick_type,
87
GR_PickStyle
pick_style,
88
bool
has_pick_map)
override
;
89
90
void
renderDecoration
(
RE_RenderContext
r
,
91
GR_Decoration
decor,
92
const
GR_DecorationParms
&p)
override
;
93
94
95
GR_PrimAcceptResult
acceptPrimitive
(
GT_PrimitiveType
t
,
96
int
geo_type,
97
const
GT_PrimitiveHandle
&ph,
98
const
GEO_Primitive
*prim)
override
;
99
100
void
update
(
RE_RenderContext
r
,
101
const
GT_PrimitiveHandle
&primh,
102
const
GR_UpdateParms
&update_parms)
override
;
103
104
bool
shouldRender(
const
GR_DisplayOption
*opt);
105
106
VIS_Handle
myVisHandle;
107
int
myVisSerialNum;
108
109
// parameters cached from the update parms during update; these can
110
// be queried by the visualizer using the provided accessors.
111
112
bool
myObjectSelected;
113
OP_Node
*myOpNode;
114
GU_ConstDetailHandle
myDetail;
115
};
116
117
#endif
VISF_API
#define VISF_API
Definition:
VISF_API.h:10
flags
GLbitfield flags
Definition:
glcorearb.h:1596
GR_Primitive::render
virtual void render(RE_RenderContext r, GR_RenderMode render_mode, GR_RenderFlags flags, GR_DrawParms dp)=0
GUI_GeoRender.h
GR_DecorationParms
Definition:
GR_DecorationRender.h:56
GR_DisplayOption
Definition:
GR_DisplayOption.h:35
GR_Defines.h
GT_Names::cache_name
GT_API const UT_StringHolder cache_name
GR_Primitive.h
VISF_Primitive::getOpNode
OP_Node * getOpNode()
Definition:
VISF_Primitive.h:70
GR_Decoration
GR_Decoration
Definition:
GR_Defines.h:162
RE_RenderContext
Temporary container for either a RV_Render and an RE_Render.
Definition:
RE_RenderContext.h:23
GR_UpdateParms
set of parameters sent to GR_Primitive::update()
Definition:
GR_UpdateParms.h:37
GR_Primitive::renderPick
virtual int renderPick(RE_RenderContext r, const GR_DisplayOption *opt, unsigned int pick_type, GR_PickStyle pick_style, bool has_pick_map)=0
GR_Primitive
Definition:
GR_Primitive.h:55
GR_RenderMode
GR_RenderMode
Definition:
GR_Defines.h:48
GR_BasePrimType
GR_BasePrimType
Definition:
GR_Defines.h:366
OP_Node
Definition:
OP_Node.h:503
GR_DrawParms
Definition:
GR_DrawParms.h:19
VISF_Primitive::getDetail
GU_ConstDetailHandle getDetail()
Definition:
VISF_Primitive.h:73
GU_ConstDetailHandle
Definition:
GU_DetailHandle.h:176
UT_IntrusivePtr< GT_Primitive >
GR_Primitive::renderDecoration
virtual void renderDecoration(RE_RenderContext r, GR_Decoration decor, const GR_DecorationParms &parms)
GR_PrimAcceptResult
GR_PrimAcceptResult
Definition:
GR_Defines.h:359
GR_RenderFlags
GR_RenderFlags
Definition:
GR_Defines.h:86
GR_RenderInfo
Definition:
GR_RenderInfo.h:29
t
GLdouble t
Definition:
glad.h:2397
VISF_Primitive::getBasePrimType
GR_BasePrimType getBasePrimType() const override
The base primitive type is usually NORMAL unless this is a packed type.
Definition:
VISF_Primitive.h:34
GT_PrimitiveType
GT_PrimitiveType
Definition:
GT_PrimitiveTypes.h:16
GR_Primitive::acceptPrimitive
virtual GR_PrimAcceptResult acceptPrimitive(GT_PrimitiveType t, int geo_type, const GT_PrimitiveHandle &ph, const GEO_Primitive *prim)=0
GR_BASE_PRIM_VISUALIZE
Definition:
GR_Defines.h:376
VISF_Primitive
Definition:
VISF_Primitive.h:25
VISF_Primitive::className
const char * className() const override
Return a string version of this class's name.
Definition:
VISF_Primitive.h:37
VISF_Primitive::isObjectSelected
bool isObjectSelected()
Definition:
VISF_Primitive.h:67
GR_Primitive::update
virtual void update(RE_RenderContext r, const GT_PrimitiveHandle &primh, const GR_UpdateParms &p)=0
VISF_API.h
r
GLboolean r
Definition:
glcorearb.h:1222
GEO_Primitive
Definition:
GEO_Primitive.h:41
VIS_Handle
Definition:
VIS_Handle.h:28
VIS_Handle.h
GR_PickStyle
GR_PickStyle
Definition:
GR_Defines.h:252
VISF
VISF_Primitive.h
Generated on Sat Dec 21 2024 02:49:24 for HDK by
1.8.6