DI-Guy SDK Documentation  13.1
diguyCharacterPathDecisionBead.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2015 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 
37 /****************************************************************************/
38 class BDI_DECLSPEC_diguy diguyCharacterPathDecisionBead
39 {
40 
41 public:
42 /*****************************************************************************/
52  /*l
53  *b Description:
54  **
55  ** Returns the name of the object. This pointer will
56  ** never be NULL.
57  **
58  *b Returns:
59  **
60  ** name of the object
61  */
62  const char* get_name();
63 
64  /*l
65  *b Description:
66  **
67  ** This function sets the name of this object.
68  **
69  *b Returns:
70  **
71  ** 0 on success, -1 on failure
72  */
73  int set_name(const char* name);
74 
75  /*l
76  *b Description:
77  **
78  ** This function returns how far into the path this bead is.
79  **
80  *b Returns:
81  **
82  ** distance into path of this bead, in meters
83  */
84  float get_distance_into_path();
85 
86  /*l
87  *b Description:
88  **
89  ** This function sets how far into the path this bead is.
90  **
91  ** Since distances and times on paths are interrelated,
92  ** calling this function will have the side-effect of setting
93  ** when on the path the bead is located, as if to a call to
94  ** set_tin().
95  **
96  ** If this script bead is part of a diguyCharacterPath,
97  ** the diguyCharacterPath::update() function must be called for
98  ** changes to take effect.
99  **
100  *b Arguments:
101  **
102  *a distance_into_path - how far into the path this bead is,
103  *a in meters
104  **
105  *b Returns:
106  **
107  ** 0 on success, -1 on failure
108  */
109  int set_distance_into_path(float distance_into_path);
110 
111  /*l
112  *b Description:
113  **
114  ** This function returns where on the path this bead is.
115  **
116  *b Returns:
117  **
118  ** location of this bead, in meters
119  */
120  float get_length();
121 
122  /*l
123  *b Description:
124  **
125  ** This function sets how long this bead will have an
126  ** effect. The bead will have an effect from its initial
127  ** distance into the path (as set by set_distance_into_path())
128  ** to (distance + length) seconds.
129  **
130  ** Since distances and times on paths are interrelated,
131  ** calling this function will have the side-effect of setting
132  ** when on the path the bead's effect ends, as if to a call
133  ** to set_duration().
134  **
135  ** If this script bead is part of a diguyCharacterPath,
136  ** the diguyCharacterPath::update() function must be called for
137  ** changes to take effect.
138  **
139  *b Arguments:
140  **
141  *a duration - duration of this bead, in seconds
142  **
143  *b Returns:
144  **
145  ** 0 on success, -1 on failure
146  */
147  int set_length(float length);
148 
149  /*l
150  *b Description:
151  **
152  ** This function returns when on the path this bead is.
153  **
154  *b Returns:
155  **
156  ** time location of this bead, in seconds
157  */
158  float get_tin();
159 
160  /*l
161  *b Description:
162  **
163  ** This function sets when this bead will begin to have
164  ** an effect.
165  **
166  ** Since distances and times on paths are interrelated,
167  ** calling this function will have the side-effect of setting
168  ** where on the path the bead is located, as if to a call to
169  ** set_distance_into_path().
170  **
171  ** If this script bead is part of a diguyCharacterPath,
172  ** the diguyCharacterPath::update() function must be called for
173  ** changes to take effect.
174  **
175  *b Arguments:
176  **
177  *a tin - when this bead begins to have an effect, in seconds
178  **
179  *b Returns:
180  **
181  ** 0 on success, -1 on failure
182  */
183  int set_tin(float tin);
184 
185  /*l
186  *b Description:
187  **
188  ** This function returns how long this bead will have an
189  ** effect.
190  **
191  *b Returns:
192  **
193  ** duration of this bead, in seconds
194  */
195  float get_duration();
196 
197  /*l
198  *b Description:
199  **
200  ** This function sets how long this bead will have an
201  ** effect. The bead will have an effect from tin seconds
202  ** (as set by set_tin()) to (tin + duration) seconds.
203  **
204  ** Since distances and times on paths are interrelated,
205  ** calling this function will have the side-effect of setting
206  ** where on the path the bead's effect ends, as if to a call
207  ** to set_length().
208  **
209  ** If this script bead is part of a diguyCharacterPath,
210  ** the diguyCharacterPath::update() function must be called for
211  ** changes to take effect.
212  **
213  *b Arguments:
214  **
215  *a duration - duration of this bead, in seconds
216  **
217  *b Returns:
218  **
219  ** 0 on success, -1 on failure
220  */
221  int set_duration(float duration);
222 
223 
224 /****************************************************************************/
225 /****************************************************************************/
226 /****************************************************************************/
233 /****************************************************************************/
234 /****************************************************************************/
235 /****************************************************************************/
236 
237  const char* get_begin_at_object_name();
238 
239  int set_begin_at_object_name(const char* begin_at_object_name);
240 
241  float get_begin_at_object_offset();
242 
243  int set_begin_at_object_offset(float begin_at_object_offset);
244 
245  const char* get_end_at_object_name();
246 
247  int set_end_at_object_name(const char* end_at_object_name);
248 
249  float get_end_at_object_offset();
250 
251  int set_end_at_object_offset(float end_at_object_offset);
252 
253 
254 /****************************************************************************/
255 /****************************************************************************/
261 #ifdef CPLUSPLUS_ONLY
262 
263  bdiBeadDecision* get_scripted_object() {return m_scripted_object;}
264 
265  friend class bdiBeadDecision;
266 
267 private:
268 
269  /*l
270  ** A private constructor.
271  */
272  diguyCharacterPathDecisionBead(bdiBeadDecision* scripted_object);
274  /*l
275  ** A private destructor.
276  */
278 
279  /*l
280  ** A pointer to internal data.
281  */
282  bdiBeadDecision* m_scripted_object;
283 
284 #endif
285 
286 };
287 
288 
289 #endif /* __diguyCharacterPathDecisionBead_H */
290 
291 
292 /*********************************************************************
293  ** Copyright (c) 1992-2015 VT MAK
294  ** All rights reserved.
295  *********************************************************************/
A bead that sits on a character's spline path and triggers a new decision.
Definition: diguyCharacterPathDecisionBead.h:35