DI-Guy C++ SDK Reference  13.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguyCharacterPathDecisionBead.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2014 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 /*********************************************************************
8  **
9  *t diguyCharacterPathDecisionBead
10  **
11  *b Link against: libdiguy
12  */
13 
14 #ifndef __diguyCharacterPathDecisionBead_H
15 #define __diguyCharacterPathDecisionBead_H
16 
17 #ifdef SWIG
19 #else
20 #define CPLUSPLUS_ONLY
21 #endif
22 
23 #ifdef CPLUSPLUS_ONLY
24 class bdiBeadDecision;
25 #endif
26 
27 
28 #include <declspec_diguy.h>
29 
30 /****************************************************************************/
31 class BDI_DECLSPEC_diguy diguyCharacterPathDecisionBead
32 {
33 
34 public:
35 
36  /*l
37  *b Description:
38  **
39  ** Returns the name of the object. This pointer will
40  ** never be NULL.
41  **
42  *b Returns:
43  **
44  ** name of the object
45  **
46  *b Callable From:
47  **
48  *- - C++
49  *- - Script
50  */
51  const char* get_name();
52 
53  /*l
54  *b Description:
55  **
56  ** This function sets the name of this object.
57  **
58  *b Returns:
59  **
60  ** 0 on success, -1 on failure
61  **
62  *b Callable From:
63  **
64  *- - C++
65  *- - Script
66  */
67  int set_name(const char* name);
68 
69  /*l
70  *b Description:
71  **
72  ** This function returns how far into the path this bead is.
73  **
74  *b Returns:
75  **
76  ** distance into path of this bead, in meters
77  **
78  *b Callable From:
79  **
80  *- - C++
81  *- - Script
82  */
83  float get_distance_into_path();
84 
85  /*l
86  *b Description:
87  **
88  ** This function sets how far into the path this bead is.
89  **
90  ** Since distances and times on paths are interrelated,
91  ** calling this function will have the side-effect of setting
92  ** when on the path the bead is located, as if to a call to
93  ** set_tin().
94  **
95  ** If this script bead is part of a diguyCharacterPath,
96  ** the diguyCharacterPath::update() function must be called for
97  ** changes to take effect.
98  **
99  *b Arguments:
100  **
101  *a distance_into_path - how far into the path this bead is,
102  *a in meters
103  **
104  *b Returns:
105  **
106  ** 0 on success, -1 on failure
107  **
108  *b Callable From:
109  **
110  *- - C++
111  *- - Script
112  */
113  int set_distance_into_path(float distance_into_path);
114 
115  /*l
116  *b Description:
117  **
118  ** This function returns where on the path this bead is.
119  **
120  *b Returns:
121  **
122  ** location of this bead, in meters
123  **
124  *b Callable From:
125  **
126  *- - C++
127  *- - Script
128  */
129  float get_length();
130 
131  /*l
132  *b Description:
133  **
134  ** This function sets how long this bead will have an
135  ** effect. The bead will have an effect from its initial
136  ** distance into the path (as set by set_distance_into_path())
137  ** to (distance + length) seconds.
138  **
139  ** Since distances and times on paths are interrelated,
140  ** calling this function will have the side-effect of setting
141  ** when on the path the bead's effect ends, as if to a call
142  ** to set_duration().
143  **
144  ** If this script bead is part of a diguyCharacterPath,
145  ** the diguyCharacterPath::update() function must be called for
146  ** changes to take effect.
147  **
148  *b Arguments:
149  **
150  *a duration - duration of this bead, in seconds
151  **
152  *b Returns:
153  **
154  ** 0 on success, -1 on failure
155  **
156  *b Callable From:
157  **
158  *- - C++
159  *- - Script
160  */
161  int set_length(float length);
162 
163  /*l
164  *b Description:
165  **
166  ** This function returns when on the path this bead is.
167  **
168  *b Returns:
169  **
170  ** time location of this bead, in seconds
171  **
172  *b Callable From:
173  **
174  *- - C++
175  *- - Script
176  */
177  float get_tin();
178 
179  /*l
180  *b Description:
181  **
182  ** This function sets when this bead will begin to have
183  ** an effect.
184  **
185  ** Since distances and times on paths are interrelated,
186  ** calling this function will have the side-effect of setting
187  ** where on the path the bead is located, as if to a call to
188  ** set_distance_into_path().
189  **
190  ** If this script bead is part of a diguyCharacterPath,
191  ** the diguyCharacterPath::update() function must be called for
192  ** changes to take effect.
193  **
194  *b Arguments:
195  **
196  *a tin - when this bead begins to have an effect, in seconds
197  **
198  *b Returns:
199  **
200  ** 0 on success, -1 on failure
201  **
202  *b Callable From:
203  **
204  *- - C++
205  *- - Script
206  */
207  int set_tin(float tin);
208 
209  /*l
210  *b Description:
211  **
212  ** This function returns how long this bead will have an
213  ** effect.
214  **
215  *b Returns:
216  **
217  ** duration of this bead, in seconds
218  **
219  *b Callable From:
220  **
221  *- - C++
222  *- - Script
223  */
224  float get_duration();
225 
226  /*l
227  *b Description:
228  **
229  ** This function sets how long this bead will have an
230  ** effect. The bead will have an effect from tin seconds
231  ** (as set by set_tin()) to (tin + duration) seconds.
232  **
233  ** Since distances and times on paths are interrelated,
234  ** calling this function will have the side-effect of setting
235  ** where on the path the bead's effect ends, as if to a call
236  ** to set_length().
237  **
238  ** If this script bead is part of a diguyCharacterPath,
239  ** the diguyCharacterPath::update() function must be called for
240  ** changes to take effect.
241  **
242  *b Arguments:
243  **
244  *a duration - duration of this bead, in seconds
245  **
246  *b Returns:
247  **
248  ** 0 on success, -1 on failure
249  **
250  *b Callable From:
251  **
252  *- - C++
253  *- - Script
254  */
255  int set_duration(float duration);
256 
257 
258 /****************************************************************************/
259 /****************************************************************************/
260 /****************************************************************************/
267 /****************************************************************************/
268 /****************************************************************************/
269 /****************************************************************************/
270 
271  const char* get_begin_at_object_name();
272 
273  int set_begin_at_object_name(const char* begin_at_object_name);
274 
275  float get_begin_at_object_offset();
276 
277  int set_begin_at_object_offset(float begin_at_object_offset);
278 
279  const char* get_end_at_object_name();
280 
281  int set_end_at_object_name(const char* end_at_object_name);
282 
283  float get_end_at_object_offset();
284 
285  int set_end_at_object_offset(float end_at_object_offset);
286 
288 /****************************************************************************/
289 /****************************************************************************/
290 
295 #ifdef CPLUSPLUS_ONLY
296 
297  bdiBeadDecision* get_scripted_object() {return m_scripted_object;}
298 
299  friend class bdiBeadDecision;
300 
301 private:
302 
303  /*l
304  ** A private constructor.
305  */
306  diguyCharacterPathDecisionBead(bdiBeadDecision* scripted_object);
307 
308  /*l
309  ** A private destructor.
310  */
312 
313  /*l
314  ** A pointer to internal data.
315  */
316  bdiBeadDecision* m_scripted_object;
317 
318 #endif
319 
320 };
321 
322 
323 #endif /* __diguyCharacterPathDecisionBead_H */
324 
325 
326 /*********************************************************************
327  ** Copyright (c) 1992-2014 VT MAK
328  ** All rights reserved.
329  *********************************************************************/