DI-Guy SDK Documentation  13.8
diguyCharacterGuide.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  **
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 /*****************************************************************************/
566 class BDI_DECLSPEC_diguy diguyCharacterGuide
567 {
568 
569 public:
570 
571 /*****************************************************************************/
581  /*l
582  *b Returns:
583  **
584  ** name of the guide
585  */
586  const char* get_name();
587 
588  /*l
589  *b Description:
590  **
591  ** This function sets the name of this object.
592  **
593  *b Returns:
594  **
595  ** 0 on success, -1 on failure
596  */
597  int set_name(const char* name);
598 
599  /*l
600  *b Description:
601  **
602  ** This function enables or disables this guide.
603  **
604  *b Arguments:
605  **
606  *a enabled - pass 1 to enable to guide, 0 to disable
607  **
608  *b Returns:
609  **
610  ** 0 on success, -1 on failure
611  */
612  int set_enabled(int enabled);
613 
614  /*l
615  *b Returns:
616  **
617  ** whether this guide is enabled; see set_enabled()
618  */
619  int get_enabled();
620 
621  /*l
622  *b Description:
623  **
624  ** This function returns whether the character controlled
625  ** by this guide has reached its desired position.
626  **
627  *b Returns:
628  **
629  ** 1 if position reached, 0 if not
630  */
631  int get_position_acquired();
632 
633  /*l
634  *b Description:
635  **
636  ** This function manually sets whether the character controlled
637  ** by this guide has reached its desired position. Normally
638  ** this is determined automatically by the guide.
639  **
640  ** Note that calling this function may trigger a callback of
641  ** diguyCharacter::CALLBACK_ID_GUIDE_POSITION_ACQUIRED or
642  ** diguyCharacter::CALLBACK_ID_GUIDE_POSITION_UNACQUIRED.
643  **
644  *b Arguments:
645  **
646  *a acquired - pass 1 to set the desired position as acquired,
647  *a 0 as unacquired
648  */
649  void set_position_acquired(int acquired);
650 
651  /*l
652  *b Description:
653  **
654  ** This function returns whether the character controlled
655  ** by this guide has reached its desired orientation.
656  **
657  *b Returns:
658  **
659  ** 1 if orientation reached, 0 if not
660  */
661  int get_orientation_acquired();
662 
663  /*l
664  *b Description:
665  **
666  ** Similar to set_position_acquired(), but for orientation.
667  **
668  *b Arguments:
669  **
670  *a acquired - pass 1 to set the desired orientation as acquired,
671  *a 0 as unacquired
672  */
673  void set_orientation_acquired(int acquired);
674 
675  /*l
676  *b Description:
677  **
678  ** Returns that name of the guide algorithm.
679  */
680  const char *get_guide_algorithm();
681 
682  /*l
683  *b Description:
684  **
685  ** This function sets a float parameter for this guide's
686  ** guide algorithm.
687  **
688  *b Arguments:
689  **
690  *a parameter - name of the parameter to set
691  *a value - new value of the parameter
692  **
693  *b Returns:
694  **
695  ** 0 on success, -1 on failure
696  */
697  int set_guide_algorithm_float_parameter(const char* parameter, float value);
698 
699  /*l
700  *b Description:
701  **
702  ** This function gets the current setting for a float parameter of
703  ** this guide's guide algorithm.
704  **
705  *b Arguments:
706  **
707  *a parameter - name of the parameter to get
708  **
709  *b Returns:
710  **
711  ** current value of parameter
712  */
713  float get_guide_algorithm_float_parameter(const char* parameter);
714 
715  /*l
716  *b Description:
717  **
718  ** This function sets a string parameter for this guide's
719  ** guide algorithm.
720  **
721  *b Arguments:
722  **
723  *a parameter - name of the parameter to set
724  *a value - new value of the parameter
725  **
726  *b Returns:
727  **
728  ** 0 on success, -1 on failure
729  */
730  int set_guide_algorithm_string_parameter(const char* parameter,
731  const char * value);
732 
733  /*l
734  *b Description:
735  **
736  ** This function gets the current setting for a string parameter of
737  ** this guide's guide algorithm.
738  **
739  *b Arguments:
740  **
741  *a parameter - name of the parameter to get
742  **
743  *b Returns:
744  **
745  ** current value of parameter
746  */
747  const char * get_guide_algorithm_string_parameter(const char* parameter);
748 
749  /*l
750  *b Description:
751  **
752  ** This function sets a vector parameter for this guide's
753  ** guide algorithm.
754  **
755  *b Arguments:
756  **
757  *a parameter - name of the parameter to set
758  *a x, y, z - new value of the parameter
759  **
760  *b Returns:
761  **
762  ** 0 on success, -1 on failure
763  */
764  int set_guide_algorithm_vector_parameter(const char* parameter,
765  float x, float y, float z);
766 
767  /*l
768  *b Description:
769  **
770  ** This function gets the current setting for a vector parameter of
771  ** this guide's guide algorithm.
772  **
773  *b Arguments:
774  **
775  *a parameter - name of the parameter to get
776  **
777  *b Returns:
778  **
779  ** x, y, z values of vector
780  */
781  void get_guide_algorithm_vector_parameter(const char* parameter, float *x, float *y, float *z);
783  void get_current_desired_position(float *x, float *y, float *z);
784  void get_current_desired_orientation(float *rz);
785  void get_current_desired_position_double(double *x, double *y, double *z);
786 
791 #ifdef CPLUSPLUS_ONLY
792 
793  bdiScenarioCharacterGuide* get_scripted_object() {return m_scripted_object;}
794 
795 private:
796 
797  /*l
798  ** A private constructor.
799  */
800  diguyCharacterGuide(bdiScenarioCharacterGuide* scripted_object);
801 
802  /*l
803  ** A private destructor.
804  */
805  virtual ~diguyCharacterGuide();
806 
807  /*l
808  ** A pointer to internal data.
809  */
810  bdiScenarioCharacterGuide* m_scripted_object;
811 
812  friend class bdiScenarioCharacterGuide;
813 
814 #endif
815 
816 };
817 
818 
819 #endif /* __diguyCharacterGuide_H */
820 
821 
822 /*********************************************************************
823  ** Copyright (c) 1992-2022 MAK Technologies, Inc.
824  ** All rights reserved.
825  *********************************************************************/
826 
Represents algorithm for steering and maneuvering a character towards a goal point.
Definition: diguyCharacterGuide.h:561