C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguyCharacterPath.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 1992-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 /*********************************************************************
28  **
29  *t diguyCharacterPath
30  **
31  *b Link against: libdiguy
32  */
33 
34 #ifndef __diguyCharacterPath_H
35 #define __diguyCharacterPath_H
36 
37 #ifdef SWIG
38 %module diguyCharacterPath
39 #else
40 #define CPLUSPLUS_ONLY
41 #endif
42 
43 #ifdef CPLUSPLUS_ONLY
44 
45 class bdiScenarioPath;
46 class diguyCharacter;
47 class diguyCharacterPath;
53 class diguyPathShape;
54 class diguyWaypoint;
55 
56 #include <diguy_constants.h>
57 
58 
59 /****************************************************************************/
60 typedef struct
61 {
62  float t;
64 
65 
66 /****************************************************************************/
67 typedef struct
68 {
69  float t;
71 
72 
73 /****************************************************************************/
75  int callback_id,
76  void* callback_params,
77  void* callback_user_data);
78 
79 
80 #endif /* CPLUSPLUS_ONLY */
81 
82 
83 
84 #include <declspec_diguy.h>
85 
86 /****************************************************************************/
87 class BDI_DECLSPEC_diguy diguyCharacterPath
88 {
89 
90 public:
91 
92  /*l
93  *b Description:
94  **
95  ** Returns the name of the path. This pointer will
96  ** never be NULL.
97  **
98  *b Returns:
99  **
100  ** name of the path
101  **
102  *b Callable From:
103  **
104  *- - C++
105  *- - Script
106  */
107  const char* get_name();
108 
109  /*l
110  *b Description:
111  **
112  ** This function sets the name of this object.
113  **
114  *b Returns:
115  **
116  ** 0 on success, -1 on failure
117  **
118  *b Callable From:
119  **
120  *- - C++
121  *- - Script
122  */
123  int set_name(const char* name);
124 
125  /*l
126  *b Description:
127  **
128  ** All character paths are assigned a unique identifier, or uid. This
129  ** function returns this path's uid.
130  **
131  ** *Note*: unique identifiers will change between DI-Guy runs!
132  **
133  *b Returns:
134  **
135  ** unique identifier of object
136  **
137  *b Callable From:
138  **
139  *- - C++
140  *- - Script
141  */
142  long get_uid();
143 
144  /*l
145  *b Returns:
146  **
147  ** character that owns this path
148  **
149  *b Callable From:
150  **
151  *- - C++
152  *- - Script
153  */
154  diguyCharacter* get_character();
155 
156  /*l
157  *b Description:
158  **
159  ** This function should be called after all modifications have
160  ** been made to the path and it is time to re-derive the overall
161  ** path shape and when actions happen.
162  **
163  ** This update is deferred for reasons of performance; if there
164  ** are a lot of modifications to be made to the path they can all
165  ** be done in a group with only a single final update.
166  **
167  ** A call to update() is typically required after certain calls
168  ** are made on objects owned by the path, such as a diguyWaypoint or
169  ** a diguyCharacterPathActionBead. The documentation for function
170  ** calls of these objects will state whether a subsequent update()
171  ** call is necessary.
172  **
173  *b Returns:
174  **
175  ** 0 on success, -1 on failure
176  **
177  *b Callable From:
178  **
179  *- - C++
180  *- - Script
181  */
182  int update();
183 
184  /*l
185  *b Description:
186  **
187  ** This function returns the total length of the path,
188  ** in meters.
189  **
190  *b Returns:
191  **
192  ** length of path in meters
193  **
194  *b Callable From:
195  **
196  *- - C++
197  *- - Script
198  */
199  float get_length();
200 
201  /*l
202  *b Description:
203  **
204  ** This function returns how long this path is
205  **
206  *b Returns:
207  **
208  ** duration of this path, in seconds
209  **
210  *b Callable From:
211  **
212  *- - C++
213  *- - Script
214  */
215  float get_duration();
216 
217  /*l
218  *b Description:
219  **
220  ** This function returns, via the passed variable pointers,
221  ** the position and orientation of the point on the path
222  ** at the specified distance.
223  **
224  *b Arguments:
225  **
226  *a distance_into_path - distance in meters into path
227  *a of the desired point
228  *a x, y, z - position of point in meters from the origin
229  *a rz, rx, ry - orientation of point in degrees counter-clockwise
230  *a from the positive X axis
231  **
232  *b Returns:
233  **
234  ** 0 on success, -1 on failure
235  **
236  *b Callable From:
237  **
238  *- - C++
239  *- - Script
240  */
241  int get_point_at_distance(float distance_into_path,
242  float* x, float* y, float* z,
243  float* rz, float* rx, float* ry);
244 
245  /*l
246  *b Description:
247  **
248  ** This function returns the underlying path shape of the
249  ** path. The path shape defines only the waypoints and
250  ** associated spline shape of the path; it doesn't not
251  ** contain any beads or other information.
252  **
253  ** The returned path shape should be considered READ ONLY.
254  ** DO NOT edit the path shape using diguyPathShape member
255  ** functions!
256  **
257  *b Returns:
258  **
259  ** pointer to object of type diguyPathShape
260  **
261  *b Callable From:
262  **
263  *- - C++
264  *- - Script
265  */
266  diguyPathShape* get_path_shape();
267 
268 
269 /*****************************************************************************/
275  /*l
276  *b Returns:
277  *
278  ** the number of waypoints belonging to this path
279  **
280  *b Callable From:
281  **
282  *- - C++
283  *- - Script
284  */
285  int get_num_waypoints();
286 
287  /*l
288  *b Description:
289  **
290  ** This function gets the waypoint at the specified
291  ** index and returns a pointer to it. The returned
292  ** waypoint can then be queried for information or
293  ** modified.
294  **
295  ** Note that if the waypoint is modified, the update()
296  ** function must be called to update the path's shape
297  ** and other information.
298  **
299  *b Arguments:
300  **
301  *a index - index of the waypoint; indices start at 0
302  **
303  *b Returns:
304  **
305  ** pointer of type diguyWaypoint; NULL if no
306  ** waypoint at the specified index
307  **
308  *b Callable From:
309  **
310  *- - C++
311  *- - Script
312  **
313  *b Lua Example:
314  **
315  ** This example gets the first waypoint of the first
316  ** character's first path. It then changes the x coordinate
317  ** of the waypoint and updates the path to reflect the change.
318  **
319  *e local character = this_scenario:get_character_at_index(0);
320  *e local path0 = character:get_path_at_index(0);
321  *e
322  *e local wp0 = path0:get_waypoint_at_index(0);
323  *e local wp0_x = wp0:get_x();
324  *e wp0:set_x(wp0_x + 1.0);
325  *e
326  *e path0:update();
327  */
328  diguyWaypoint* get_waypoint_at_index(int index);
329 
330  /*l
331  *b Description:
332  **
333  ** This function returns a pointer to the specified waypoint.
334  **
335  *b Arguments:
336  **
337  *a name - name of waypoint to be found
338  **
339  *b Returns:
340  **
341  ** pointer of type diguyWaypoint; NULL if not found
342  **
343  *b Callable From:
344  **
345  *- - C++
346  *- - Script
347  */
348  diguyWaypoint* find_waypoint(const char* name);
349 
350  /*l
351  *b Description:
352  **
353  ** This function creates a new waypoint that is added to the
354  ** path. Do not call diguyScenario::destroy_waypoint() on
355  ** the returned waypoint; it will be destroyed automatically
356  ** with the path.
357  **
358  *b Arguments:
359  **
360  *a tx, ty, tz - position in meters from the origin
361  *a rz, rx, ry - orientations in degrees counter-clockwise
362  *a from the positive X axis
363  *a weight - how much influence this waypoint exerts
364  *a over the path curve
365  *a index - where the waypoint should be inserted in
366  *a the path; indices start at 0; pass -1 to
367  *a add to end of path
368  **
369  *b Returns:
370  **
371  ** pointer to type diguyWaypoint
372  **
373  *b Callable From:
374  **
375  *- - C++
376  *- - Script
377  */
378  diguyWaypoint* create_waypoint(float x = 0.0f, float y = 0.0f, float z = 0.0f,
379  float yaw = 0.0f, float roll = 0.0f, float pitch = 0.0f,
380  float weight = 1.0f,
381  int index = -1);
382 
383  /*l
384  *b Description:
385  **
386  ** This function adds a waypoint to the path.
387  **
388  ** The waypoint should be created using the function
389  ** diguyScenario::create_waypoint(), and destroyed
390  ** using the function diguyScenario::destroy_waypoint().
391  **
392  ** An internal copy of the waypoint is made, so it can
393  ** be destroyed right after this function call or used
394  ** for other path shapes.
395  **
396  *b Arguments:
397  **
398  *a waypoint - waypoint to be appended to end of path
399  **
400  *b Returns:
401  **
402  ** 0 on success, -1 on failure
403  **
404  *b Callable From:
405  **
406  *- - C++
407  *- - Script
408  */
409  int add_waypoint(diguyWaypoint* waypoint);
410 
411 
412 /*****************************************************************************/
418  /*l
419  *b Returns:
420  *
421  ** the number of action beads belonging to this path
422  **
423  *b Callable From:
424  **
425  *- - C++
426  *- - Script
427  */
428  int get_num_action_beads();
429 
430  /*l
431  *b Description:
432  **
433  ** This function gets the action bead at the specified
434  ** index and returns a pointer to it. The returned
435  ** action bead can then be queried for information or
436  ** modified.
437  **
438  ** Note that if the action bead is modified, the update()
439  ** function must be called to update the path's information.
440  **
441  *b Returns:
442  **
443  ** pointer of type diguyCharacterPathActionBead; NULL if no
444  ** action bead at the specified index
445  **
446  *b Arguments:
447  **
448  *a index - index of the action bead; indices start at 0
449  **
450  *b Callable From:
451  **
452  *- - C++
453  *- - Script
454  */
455  diguyCharacterPathActionBead* get_action_bead_at_index(int index);
456 
457  /*l
458  *b Description:
459  **
460  ** This function returns a pointer to the specified bead.
461  **
462  *b Arguments:
463  **
464  *a name - name of bead to be found
465  **
466  *b Returns:
467  **
468  ** pointer of type diguyCharacterPathActionBead; NULL if not found
469  **
470  *b Callable From:
471  **
472  *- - C++
473  *- - Script
474  */
475  diguyCharacterPathActionBead* find_action_bead(const char* name);
476 
477  /*l
478  *b Description:
479  **
480  ** This function returns a pointer to the last action bead of the
481  ** path. The last action bead is slightly different than the
482  ** rest. It has no inherent duration or length; instead, it
483  ** effectively specifies what the character should do once this
484  ** path has completed.
485  **
486  ** Calling this function is the same as the following:
487  **
488  *e int num_action_beads = path->get_num_action_beads();
489  *e diguyCharacterPathActionBead* ab;
490  *e ab = path->get_action_bead_at_index(num_action_beads-1);
491  **
492  ** Do not call delete or destroy_action_bead() on the returned
493  ** pointer. All paths must have a final action bead.
494  **
495  *b Returns:
496  **
497  ** pointer of type diguyCharacterPathActionBead; this pointer
498  ** should never be NULL
499  **
500  *b Callable From:
501  **
502  *- - C++
503  *- - Script
504  */
505  diguyCharacterPathActionBead* get_final_action_bead();
506 
507  /*l
508  *b Description:
509  **
510  ** This function inserts a new action bead at the specified
511  ** index and returns a pointer to it. The returned
512  ** action bead can then be queried for information or
513  ** modified.
514  **
515  ** Note that the update() function must be called after this
516  ** function.
517  **
518  ** Do not call delete on the returned pointer. Use
519  ** destroy_action_bead() instead.
520  **
521  *b Returns:
522  **
523  ** pointer of type diguyCharacterPathActionBead; NULL if
524  ** insertion failed
525  **
526  *b Arguments:
527  **
528  *a action - action new bead should perform
529  *a index - index of the action bead; indices start at 0;
530  *a pass -1 to append the action bead to the end
531  *a of the path
532  **
533  *b Callable From:
534  **
535  *- - C++
536  *- - Script
537  */
538  diguyCharacterPathActionBead* create_action_bead(const char* action,
539  int index = -1);
540 
541  /*l
542  *b Description:
543  **
544  ** This function removes the passed action bead from the
545  ** path and destroys it.
546  **
547  ** Note that the update() function must be called after this
548  ** function.
549  **
550  *b Returns:
551  **
552  ** 0 on success, -1 on failure
553  **
554  *b Arguments:
555  **
556  *a action_bead - object to destroy; must be part of this path
557  **
558  *b Callable From:
559  **
560  *- - C++
561  *- - Script
562  */
563  int destroy_action_bead(diguyCharacterPathActionBead* action_bead);
564 
565 
566 /*****************************************************************************/
572  /*l
573  *b Returns:
574  *
575  ** the number of script beads belonging to this path
576  **
577  *b Callable From:
578  **
579  *- - C++
580  *- - Script
581  */
582  int get_num_script_beads();
583 
584  /*l
585  *b Description:
586  **
587  ** This function gets the script bead at the specified
588  ** index and returns a pointer to it. The returned
589  ** script bead can then be queried for information or
590  ** modified.
591  **
592  ** Note that if the script bead is modified, the update()
593  ** function must be called to update the path's information.
594  **
595  *b Returns:
596  **
597  ** pointer of type diguyCharacterPathScriptBead; NULL if no
598  ** script bead at the specified index
599  **
600  *b Arguments:
601  **
602  *a index - index of the script bead; indices start at 0
603  **
604  *b Callable From:
605  **
606  *- - C++
607  *- - Script
608  */
609  diguyCharacterPathScriptBead* get_script_bead_at_index(int index);
610 
611  /*l
612  *b Description:
613  **
614  ** This function returns a pointer to the specified bead.
615  **
616  *b Arguments:
617  **
618  *a name - name of bead to be found
619  **
620  *b Returns:
621  **
622  ** pointer of type diguyCharacterPathScriptBead; NULL if not found
623  **
624  *b Callable From:
625  **
626  *- - C++
627  *- - Script
628  */
629  diguyCharacterPathScriptBead* find_script_bead(const char* name);
630 
631  /*l
632  *b Description:
633  **
634  ** This function inserts a new script bead at the specified
635  ** index and returns a pointer to it. The returned
636  ** script bead can then be queried for information or
637  ** modified.
638  **
639  ** Note that the update() function must be called after this
640  ** function.
641  **
642  ** Do not call delete on the returned pointer. Use
643  ** destroy_script_bead() instead.
644  **
645  *b Returns:
646  **
647  ** pointer of type diguyCharacterPathScriptBead; NULL if
648  ** insertion failed
649  **
650  *b Arguments:
651  **
652  *a script - script new bead should perform
653  *a index - index of the script bead; indices start at 0;
654  *a pass -1 to create the bead at the last index
655  *a script_type - defaults to "lua"
656  **
657  *b Callable From:
658  **
659  *- - C++
660  *- - Script
661  */
662  diguyCharacterPathScriptBead* create_script_bead(const char* script,
663  int index = -1,
664  const char* script_type = "lua");
665 
666  /*l
667  *b Description:
668  **
669  ** This function removes the passed script bead from the
670  ** path and destroys it.
671  **
672  ** Note that the update() function must be called after this
673  ** function.
674  **
675  *b Returns:
676  **
677  ** 0 on success, -1 on failure
678  **
679  *b Arguments:
680  **
681  *a script_bead - object to destroy; must be part of this path
682  **
683  *b Callable From:
684  **
685  *- - C++
686  *- - Script
687  */
688  int destroy_script_bead(diguyCharacterPathScriptBead* script_bead);
689 
690 
691 /*****************************************************************************/
697  /*l
698  *b Returns:
699  *
700  ** the number of decision beads belonging to this path
701  **
702  *b Callable From:
703  **
704  *- - C++
705  *- - Script
706  */
707  int get_num_decision_beads();
708 
709  /*l
710  *b Description:
711  **
712  ** This function gets the decision bead at the specified
713  ** index and returns a pointer to it. The returned
714  ** decision bead can then be queried for information.
715  **
716  ** Note that if the decision bead is modified, the update()
717  ** function must be called to update the path's information.
718  **
719  *b Returns:
720  **
721  ** pointer of type diguyCharacterPathDecisionBead; NULL if no
722  ** script bead at the specified index
723  **
724  *b Arguments:
725  **
726  *a index - index of the decision bead; indices start at 0
727  **
728  *b Callable From:
729  **
730  *- - C++
731  *- - Script
732  */
733  diguyCharacterPathDecisionBead* get_decision_bead_at_index(int index);
734 
735  /*l
736  *b Description:
737  **
738  ** This function returns a pointer to the specified bead.
739  **
740  *b Arguments:
741  **
742  *a name - name of bead to be found
743  **
744  *b Returns:
745  **
746  ** pointer of type diguyCharacterPathDecisionBead; NULL if not found
747  **
748  *b Callable From:
749  **
750  *- - C++
751  *- - Script
752  */
753  diguyCharacterPathDecisionBead* find_decision_bead(const char* name);
754 
755 
756 /*****************************************************************************/
762  /*l
763  *b Returns:
764  *
765  ** the number of gaze beads belonging to this path
766  **
767  *b Callable From:
768  **
769  *- - C++
770  *- - Script
771  */
772  int get_num_gaze_beads();
773 
774  /*l
775  *b Description:
776  **
777  ** This function gets the gaze bead at the specified
778  ** index and returns a pointer to it. The returned
779  ** gaze bead can then be queried for information.
780  **
781  ** Note that if the gaze bead is modified, the update()
782  ** function must be called to update the path's information.
783  **
784  *b Returns:
785  **
786  ** pointer of type diguyCharacterPathDecisionBead; NULL if no
787  ** script bead at the specified index
788  **
789  *b Arguments:
790  **
791  *a index - index of the gaze bead; indices start at 0
792  **
793  *b Callable From:
794  **
795  *- - C++
796  *- - Script
797  */
798  diguyCharacterPathGazeBead* get_gaze_bead_at_index(int index);
799 
800  /*l
801  *b Description:
802  **
803  ** This function returns a pointer to the specified bead.
804  **
805  *b Arguments:
806  **
807  *a name - name of bead to be found
808  **
809  *b Returns:
810  **
811  ** pointer of type diguyCharacterPathGazeBead; NULL if not found
812  **
813  *b Callable From:
814  **
815  *- - C++
816  *- - Script
817  */
818  diguyCharacterPathGazeBead* find_gaze_bead(const char* name);
819 
820 
821 /*****************************************************************************/
827  /*l
828  *b Returns:
829  *
830  ** the number of aim beads belonging to this path
831  **
832  *b Callable From:
833  **
834  *- - C++
835  *- - Script
836  */
837  int get_num_aim_beads();
838 
839  /*l
840  *b Description:
841  **
842  ** This function gets the aim bead at the specified
843  ** index and returns a pointer to it. The returned
844  ** aim bead can then be queried for information.
845  **
846  ** Note that if the aim bead is modified, the update()
847  ** function must be called to update the path's information.
848  **
849  *b Returns:
850  **
851  ** pointer of type diguyCharacterPathDecisionBead; NULL if no
852  ** script bead at the specified index
853  **
854  *b Arguments:
855  **
856  *a index - index of the aim bead; indices start at 0
857  **
858  *b Callable From:
859  **
860  *- - C++
861  *- - Script
862  */
863  diguyCharacterPathAimBead* get_aim_bead_at_index(int index);
864 
865  /*l
866  *b Description:
867  **
868  ** This function returns a pointer to the specified bead.
869  **
870  *b Arguments:
871  **
872  *a name - name of bead to be found
873  **
874  *b Returns:
875  **
876  ** pointer of type diguyCharacterPathAimBead; NULL if not found
877  **
878  *b Callable From:
879  **
880  *- - C++
881  *- - Script
882  */
883  diguyCharacterPathAimBead* find_aim_bead(const char* name);
884 
885 
886 /*****************************************************************************/
891 #ifdef CPLUSPLUS_ONLY
892 
893  /*l
894  *b Description:
895  **
896  ** This is an enumeration of the different callbacks
897  ** that can be registered with add_callback().
898  **
899  *b Usable From:
900  **
901  *- - C++
902  *- - Script
903  */
904  enum {
905  CALLBACK_ID_TIME_LEFT_DEPRECATED = 1,
906  CALLBACK_ID_TIME_INTO_DEPRECATED
907  };
908 
909  /*l
910  *b Description:
911  **
912  ** This function adds a user callback.
913  **
914  *b Arguments:
915  **
916  *a callback - pointer to function with prototype
917  *a diguyCharacterPathCallback (typedefed above)
918  *a callback_id - integer id of when this callback is to be called
919  *a callback_params - not currently used; pass NULL
920  *a callback_user_data - pointer for user's own use; DI-Guy will
921  *a do nothing to the contents of this pointer
922  *a beyond passing it back when the callback is
923  *a invoked
924  **
925  ** callback_id should be one of the following values:
926  **
927  *i CALLBACK_ID_TIME_LEFT_DEPRECATED
928  **
929  ** This callback id was formerly CALLBACK_ID_TIME_LEFT, which
930  ** has been deprecated. Use a decision bead or script bead
931  ** located near the end of the path for new development.
932  **
933  *i CALLBACK_ID_TIME_INTO_DEPRECATED
934  **
935  ** This callback id was formerly CALLBACK_ID_TIME_INTO, which
936  ** has been deprecated. Use a decision bead or script bead
937  ** located near the beginning of the path for new development.
938  **
939  ** Callbacks return a value of type diguyCallbackReturn,
940  ** which will be DIGUY_CALLBACK_STOP or DIGUY_CALLBACK_CONTINUE.
941  ** If the callback returns DIGUY_CALLBACK_STOP, the default handler
942  ** of the function will not be called; the callback is asserting
943  ** that it has done everything necessary for the function call.
944  ** If the callback returns DIGUY_CALLBACK_CONTINUE, the default
945  ** handler for the function will be called after the callback.
946  **
947  *b Returns:
948  **
949  ** 0 on success, -1 on failure
950  **
951  *b Callable From:
952  **
953  *- - C++
954  */
955  int add_callback(int callback_id,
956  diguyCharacterPathCallback* callback,
957  void* callback_params = 0,
958  void* callback_user_data = 0);
959 
960  /*l
961  *b Description:
962  **
963  ** This function removes a user callback. All callbacks matching
964  ** the specified callback_id and callback function will be removed.
965  **
966  *b Arguments:
967  **
968  *a callback_id - integer id of when this callback is to be called
969  *a callback - pointer to function with prototype
970  *a diguyCharacterCallback (typedefed above)
971  **
972  *b Returns:
973  **
974  ** 0 on success, -1 on failure
975  **
976  *b Callable From:
977  **
978  *- - C++
979  */
980  int remove_callback(int callback_id,
981  diguyCharacterPathCallback* callback);
982 
983  /*l
984  *b Description:
985  **
986  ** This function removes a user callback. All callbacks matching
987  ** the specified callback_id and callback_user_data pointer will
988  ** be removed.
989  **
990  *b Arguments:
991  **
992  *a callback_id - integer id of when this callback is to be called
993  *a callback_user_data - pointer for user's own use
994  **
995  *b Returns:
996  **
997  ** 0 on success, -1 on failure
998  **
999  *b Callable From:
1000  **
1001  *- - C++
1002  */
1003  int remove_callback_with_user_data(int callback_id,
1004  void* callback_user_data);
1005 
1006 #endif /* CPLUSPLUS_ONLY */
1007 
1008 
1009 /****************************************************************************/
1010 /****************************************************************************/
1011 /****************************************************************************/
1018 /****************************************************************************/
1019 /****************************************************************************/
1020 /****************************************************************************/
1021 
1022  int translate(float tx, float ty, float tz);
1023 
1024  int rotate_about_point(float rz, float rx, float ry,
1025  float rotation_pt_x, float rotation_pt_y, float rotation_pt_z);
1026 
1027  int set_ground_clamp_when_on_path(int ground_clamp_when_on_path);
1028  int get_ground_clamp_when_on_path();
1029 
1030  int get_position_at_distance(float distance,
1031  float* tx, float* ty, float* tz,
1032  float* rz = NULL, float* rx = NULL, float* ry = NULL);
1033  int get_position_at_distance_double(float distance,
1034  double* tx, double* ty, double* tz,
1035  float* rz = NULL, float* rx = NULL, float* ry = NULL);
1037  int get_position_at_t(float t,
1038  float* tx, float* ty, float* tz,
1039  float* rz = NULL, float* rx = NULL, float* ry = NULL);
1040  int get_position_at_t_double(float t,
1041  double* tx, double* ty, double* tz,
1042  float* rz = NULL, float* rx = NULL, float* ry = NULL);
1043 
1044 
1049 #ifdef CPLUSPLUS_ONLY
1050 
1051  bdiScenarioPath* get_scripted_object() {return m_scripted_object;}
1052 
1053 private:
1054 
1055  /*l
1056  ** A private constructor.
1057  */
1058  diguyCharacterPath(bdiScenarioPath* path);
1059 
1060  /*l
1061  ** A private destructor.
1062  */
1063  ~diguyCharacterPath();
1064 
1065  /*l
1066  ** A pointer to internal data.
1067  */
1068  bdiScenarioPath* m_scripted_object;
1069 
1070  friend class bdiScenarioPath;
1071  friend class diguyCharacter;
1072 
1073 #endif /* CPLUSPLUS_ONLY */
1074 
1075 };
1076 
1077 #endif /* __diguyCharacterPath_H */
1078