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