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