DI-Guy SDK Documentation  13.1
diguyCharacterGuide.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  **
10  *t diguyCharacterGuide
11  **
12  */
13 
14 #ifndef __diguyCharacterGuide_H
15 #define __diguyCharacterGuide_H
16 
17 
18 #ifdef SWIG
19 %module diguyCharacterGuide
20 #else
21 #define CPLUSPLUS_ONLY
22 #endif
23 
24 #ifdef CPLUSPLUS_ONLY
25 class bdiScenarioCharacterGuide;
26 #endif
27 
28 
29 #include <declspec_diguy.h>
30 
31 /*****************************************************************************/
478 class BDI_DECLSPEC_diguy diguyCharacterGuide
479 {
480 
481 public:
482 
483 /*****************************************************************************/
493  /*l
494  *b Returns:
495  **
496  ** name of the guide
497  */
498  const char* get_name();
499 
500  /*l
501  *b Description:
502  **
503  ** This function sets the name of this object.
504  **
505  *b Returns:
506  **
507  ** 0 on success, -1 on failure
508  */
509  int set_name(const char* name);
510 
511  /*l
512  *b Description:
513  **
514  ** This function enables or disables this guide.
515  **
516  *b Arguments:
517  **
518  *a enabled - pass 1 to enable to guide, 0 to disable
519  **
520  *b Returns:
521  **
522  ** 0 on success, -1 on failure
523  */
524  int set_enabled(int enabled);
525 
526  /*l
527  *b Returns:
528  **
529  ** whether this guide is enabled; see set_enabled()
530  */
531  int get_enabled();
532 
533  /*l
534  *b Description:
535  **
536  ** This function returns whether the character controlled
537  ** by this guide has reached its desired position.
538  **
539  *b Returns:
540  **
541  ** 1 if position reached, 0 if not
542  */
543  int get_position_acquired();
544 
545  /*l
546  *b Description:
547  **
548  ** This function manually sets whether the character controlled
549  ** by this guide has reached its desired position. Normally
550  ** this is determined automatically by the guide.
551  **
552  ** Note that calling this function may trigger a callback of
553  ** diguyCharacter::CALLBACK_ID_GUIDE_POSITION_ACQUIRED or
554  ** diguyCharacter::CALLBACK_ID_GUIDE_POSITION_UNACQUIRED.
555  **
556  *b Arguments:
557  **
558  *a acquired - pass 1 to set the desired position as acquired,
559  *a 0 as unacquired
560  */
561  void set_position_acquired(int acquired);
562 
563  /*l
564  *b Description:
565  **
566  ** This function returns whether the character controlled
567  ** by this guide has reached its desired orientation.
568  **
569  *b Returns:
570  **
571  ** 1 if orientation reached, 0 if not
572  */
573  int get_orientation_acquired();
574 
575  /*l
576  *b Description:
577  **
578  ** Similar to set_position_acquired(), but for orientation.
579  **
580  *b Arguments:
581  **
582  *a acquired - pass 1 to set the desired orientation as acquired,
583  *a 0 as unacquired
584  */
585  void set_orientation_acquired(int acquired);
586 
587  /*l
588  *b Description:
589  **
590  ** Returns that name of the guide algorithm.
591  */
592  const char *get_guide_algorithm();
593 
594  /*l
595  *b Description:
596  **
597  ** This function sets a float parameter for this guide's
598  ** guide algorithm.
599  **
600  *b Arguments:
601  **
602  *a parameter - name of the parameter to set
603  *a value - new value of the parameter
604  **
605  *b Returns:
606  **
607  ** 0 on success, -1 on failure
608  */
609  int set_guide_algorithm_float_parameter(const char* parameter, float value);
610 
611  /*l
612  *b Description:
613  **
614  ** This function gets the current setting for a float parameter of
615  ** this guide's guide algorithm.
616  **
617  *b Arguments:
618  **
619  *a parameter - name of the parameter to get
620  **
621  *b Returns:
622  **
623  ** current value of parameter
624  */
625  float get_guide_algorithm_float_parameter(const char* parameter);
626 
627  /*l
628  *b Description:
629  **
630  ** This function sets a string parameter for this guide's
631  ** guide algorithm.
632  **
633  *b Arguments:
634  **
635  *a parameter - name of the parameter to set
636  *a value - new value of the parameter
637  **
638  *b Returns:
639  **
640  ** 0 on success, -1 on failure
641  */
642  int set_guide_algorithm_string_parameter(const char* parameter,
643  const char * value);
644 
645  /*l
646  *b Description:
647  **
648  ** This function gets the current setting for a string parameter of
649  ** this guide's guide algorithm.
650  **
651  *b Arguments:
652  **
653  *a parameter - name of the parameter to get
654  **
655  *b Returns:
656  **
657  ** current value of parameter
658  */
659  const char * get_guide_algorithm_string_parameter(const char* parameter);
660 
661  /*l
662  *b Description:
663  **
664  ** This function sets a vector parameter for this guide's
665  ** guide algorithm.
666  **
667  *b Arguments:
668  **
669  *a parameter - name of the parameter to set
670  *a x, y, z - new value of the parameter
671  **
672  *b Returns:
673  **
674  ** 0 on success, -1 on failure
675  */
676  int set_guide_algorithm_vector_parameter(const char* parameter,
677  float x, float y, float z);
678 
679  /*l
680  *b Description:
681  **
682  ** This function gets the current setting for a vector parameter of
683  ** this guide's guide algorithm.
684  **
685  *b Arguments:
686  **
687  *a parameter - name of the parameter to get
688  **
689  *b Returns:
690  **
691  ** x, y, z values of vector
692  */
693  void get_guide_algorithm_vector_parameter(const char* parameter, float *x, float *y, float *z);
694 
695  void get_current_desired_position(float *x, float *y, float *z);
696  void get_current_desired_orientation(float *rz);
697  void get_current_desired_position_double(double *x, double *y, double *z);
698 
703 #ifdef CPLUSPLUS_ONLY
704 
705  bdiScenarioCharacterGuide* get_scripted_object() {return m_scripted_object;}
706 
707 private:
708 
709  /*l
710  ** A private constructor.
711  */
712  diguyCharacterGuide(bdiScenarioCharacterGuide* scripted_object);
713 
714  /*l
715  ** A private destructor.
716  */
717  virtual ~diguyCharacterGuide();
718 
719  /*l
720  ** A pointer to internal data.
721  */
722  bdiScenarioCharacterGuide* m_scripted_object;
723 
724  friend class bdiScenarioCharacterGuide;
725 
726 #endif
727 
728 };
729 
730 
731 #endif /* __diguyCharacterGuide_H */
732 
733 
734 /*********************************************************************
735  ** Copyright (c) 1992-2015 VT MAK
736  ** All rights reserved.
737  *********************************************************************/
738 
Represents algorithm for steering and maneuvering a character towards a goal point.
Definition: diguyCharacterGuide.h:474