DI-Guy SDK Documentation  13.7
diguyAuthorVisualRegionPaintbrush.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2022 MAK Technologies, Inc.
4  ** All rights reserved.
5  *********************************************************************/
6 
7 #ifndef __diguyAuthorVisualRegionPaintbrush_H
8 #define __diguyAuthorVisualRegionPaintbrush_H
9 
10 #include <declspec_diguy.h>
11 #include <diguy_constants.h>
12 class bdiNavMeshInterface;
15 class diguyVec3f;
16 
18 
19 
20 /*l
21  ** Function for setting the create function for region paintbrush subclass
22  ** objects. This should be called after diguy_author_initialize(), but
23  ** before any scenario is created of loaded.
24  */
26 
27 
28 /*********************************************************************
29  **
30  *t diguyAuthorVisualRegionPaintbrush
31  **
32  *b Link against: libdiguy
33  **
34  ** \brief
35  **
36  ** The diguyAuthorVisualRegionPaintbrush class provides an interface for
37  ** creating supplemental visuals needed for creating DI-Guy scenarios in a
38  ** Host IG.
39  **
40  ** Region paintbrush visuals are used to visualize the 3D paintbrush used
41  ** to show where painted regions and meshes will appear.
42  **
43  ** Paintbrushes are commonly shown as translucent spheres when they will
44  ** add to the region, or a yellow pencil-like column when they will erase
45  ** from the region.
46  */
47 class BDI_DECLSPEC_diguy diguyAuthorVisualRegionPaintbrush
48 {
49 
50 public:
51 
52  /*l
53  ** Returns the visual material to be used for rendering this object.
54  */
55  diguyAuthorVisualMaterial* get_visual_material();
56 
57  /*l
58  ** Returns the current position of the paintbrush in meters from the
59  ** DI-Guy origin.
60  */
61  diguyVec3f get_position();
62 
63  /*l
64  ** Returns the index of the subregion the paintbrush will paint into.
65  ** This will be a diguySubregionIndex enumeration value.
66  */
67  diguySubregionIndex get_painting_subregion();
68 
69  /*l
70  ** Sets the index of the subregion the paintbrush will paint into.
71  */
72  void set_painting_subregion(diguySubregionIndex subregion_index);
73 
74  /*l
75  ** Returns the current paintbrush mode, a diguyRegionPaintbrushMode
76  ** enumeration value.
77  */
78  diguyRegionPaintbrushMode get_paintrush_mode();
79 
80  /*l
81  ** Sets what happens when a paintbrush stroke is applied
82  ** in input modes DIGUY_SCENARIO_INPUT_MODE_REGION_PAINTER and
83  ** DIGUY_SCENARIO_INPUT_MODE_CROWD_EDITOR.
84  */
85  void set_paintrush_mode(diguyRegionPaintbrushMode mode);
86 
87  /*l
88  ** Returns the radius of the paintbrush.
89  */
90  float get_brush_size();
91 
92  /*l
93  ** Sets the radius of the paintbrush.
94  */
95  void set_brush_size(float radius);
96 
97  /*l
98  ** Returns 1 if the paintbrush should be shown as an eraser, else 0.
99  */
100  int get_brush_is_eraser();
101 
102  /*l
103  ** Returns 1 if this visual should be visible, else 0.
104  */
105  int get_visible();
106 
107 
108 /*****************************************************************************
109  **
110  *2 Virtual Functions
111  **
112  ** The functions in this section are all virtual functions that will
113  ** be called by DI-Guy Author at various times during DI-Guy execution.
114  ** Most visuals have a similar set of virtual functions.
115  **
116  ** Because the functions are all virtual, DI-Guy programmers can create
117  ** a subclass of this class and override them. Unless otherwise stated,
118  ** the base class functions do not need to be called.
119  */
120 
121  /*l
122  *b Description:
123  **
124  ** See diguyAuthorVisualWaypoint::build() for general information
125  ** about this function.
126  */
127  virtual void build();
128 
129  /*l
130  *b Description:
131  **
132  ** See diguyAuthorVisualWaypoint::unbuild() for general information
133  ** about this function.
134  */
135  virtual void unbuild();
136 
137  /*l
138  *b Description:
139  **
140  ** See diguyAuthorVisualWaypoint::update() for general information
141  ** about this function.
142  **
143  *i DIGUY_GRAPHICS_VISUAL_UPDATE_GEOMETRY
144  **
145  ** Paintbrushes are commonly shown as translucent spheres when they
146  ** will add to the region, or a yellow pencil-like column when they
147  ** will erase from the region.
148  */
149  virtual void update(int update_flags);
150 
151  /*l
152  *b Description:
153  **
154  ** See diguyAuthorVisualWaypoint::draw() for general information
155  ** about this function.
156  */
157  virtual void draw();
158 
159  /*l
160  *b Description:
161  **
162  ** See diguyAuthorVisualWaypoint::show() for general information
163  ** about this function.
164  */
165  virtual void show();
166 
167  /*l
168  *b Description:
169  **
170  ** See diguyAuthorVisualWaypoint::hide() for general information
171  ** about this function.
172  */
173  virtual void hide();
174 
175 
176 
177 
178 /****************************************************************************/
179 /****************************************************************************/
180 
185  static diguyAuthorVisualRegionPaintbrushCreateFunc* s_create_func;
187 protected:
188 
189  // protected constructor and destructor
190  diguyAuthorVisualRegionPaintbrush(void* internal_data);
192 
193  bdiNavMeshInterface* m_scripted_object;
194  bdiNavMeshInterface* get_scripted_object() {return m_scripted_object;}
195 
196  diguyAuthorVisualMaterial* m_visual_material;
197 
198  friend class bdiNavMesh;
199  friend class bdiNavMeshInterface;
200 };
201 
202 #endif /* __diguyAuthorVisualRegionPaintbrush_H */
203 
diguySubregionIndex
DI-Guy subregions.
Definition: diguy_constants.h:1519
diguyAuthorVisualRegionPaintbrush * diguyAuthorVisualRegionPaintbrushCreateFunc(void *internal_data)
Definition: diguyAuthorVisualRegionPaintbrush.h:17
void diguy_author_set_region_paintbrush_visual_create_func(diguyAuthorVisualRegionPaintbrushCreateFunc *func)
Function for setting the create function for region paintbrush subclass objects.
diguyRegionPaintbrushMode
DI-Guy region painting modes.
Definition: diguy_constants.h:1440
Definition: diguyAuthorVisualRegionPaintbrush.h:44
Definition: diguy_vector_classes.h:74
The diguyAuthorVisualMaterial class provides data needed to render DI-Guy Author visuals in a Host IG...
Definition: diguyAuthorVisualMaterial.h:22