
/*********************************************************************
 ** Copyright (c) 1992-2022 MAK Technologies, Inc.
 ** All rights reserved.
 *********************************************************************/

/*********************************************************************
 **
 *t  diguyCharacterPathGazeBead
 **
 *b    Link against: libdiguy
 */

#ifndef __diguyCharacterPathGazeBead_H
#define __diguyCharacterPathGazeBead_H

#ifdef SWIG
%module diguyCharacterPathGazeBead
#else
#define CPLUSPLUS_ONLY
#endif

#ifdef CPLUSPLUS_ONLY
class bdiBeadGaze;
#endif


#include <declspec_diguy.h>

/*!
 ** \brief A bead that sits on a character's spline path and triggers a new gaze.
 **
 ** \ingroup diguyCore
 */

class BDI_DECLSPEC_diguy diguyCharacterPathGazeBead
{

public:
/*****************************************************************************/
/**
 *2  General Functions
 **
 **  Unless otherwise specified, all functions callable from:
 **
 *-    - C++
 *-    - Script
 */

   /*l
    *b  Description:
    **
    **    Returns the name of the object.  This pointer will
    **    never be NULL.
    **
    *b  Returns:
    **
    **    name of the object
    */
   const char* get_name();

   /*l
    *b  Description:
    **
    **    This function sets the name of this object.
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    */
   int set_name(const char* name);

   /*l
    *b  Description:
    **
    **    This function returns how far into the path this bead is.
    **
    *b  Returns:
    **
    **    distance into path of this bead, in meters
    */
   float get_distance_into_path();

   /*l
    *b  Description:
    **
    **    This function sets how far into the path this bead is.
    **
    **    Since distances and times on paths are interrelated,
    **    calling this function will have the side-effect of setting
    **    when on the path the bead is located, as if to a call to
    **    set_tin().
    **
    **    If this script bead is part of a diguyCharacterPath,
    **    the diguyCharacterPath::update() function must be called for
    **    changes to take effect.
    **
    *b  Arguments:
    **
    *a    distance_into_path - how far into the path this bead is,
    *a                         in meters
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    */
   int set_distance_into_path(float distance_into_path);

   /*l
    *b  Description:
    **
    **    This function returns where on the path this bead is.
    **
    *b  Returns:
    **
    **    location of this bead, in meters
    */
   float get_length();

   /*l
    *b  Description:
    **
    **    This function sets how long this bead will have an
    **    effect.   The bead will have an effect from its initial
    **    distance into the path (as set by set_distance_into_path())
    **    to (distance + length) seconds.
    **
    **    Since distances and times on paths are interrelated,
    **    calling this function will have the side-effect of setting
    **    when on the path the bead's effect ends, as if to a call
    **    to set_duration().
    **
    **    If this script bead is part of a diguyCharacterPath,
    **    the diguyCharacterPath::update() function must be called for
    **    changes to take effect.
    **
    *b  Arguments:
    **
    *a    duration - duration of this bead, in seconds
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    */
   int set_length(float length);

   /*l
    *b  Description:
    **
    **    This function returns when on the path this bead is.
    **
    *b  Returns:
    **
    **    time location of this bead, in seconds
    */
   float get_tin();

   /*l
    *b  Description:
    **
    **    This function sets when this bead will begin to have
    **    an effect.
    **
    **    Since distances and times on paths are interrelated,
    **    calling this function will have the side-effect of setting
    **    where on the path the bead is located, as if to a call to
    **    set_distance_into_path().
    **
    **    If this script bead is part of a diguyCharacterPath,
    **    the diguyCharacterPath::update() function must be called for
    **    changes to take effect.
    **
    *b  Arguments:
    **
    *a    tin - when this bead begins to have an effect, in seconds
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    */
   int set_tin(float tin);

   /*l
    *b  Description:
    **
    **    This function returns how long this bead will have an
    **    effect.
    **
    *b  Returns:
    **
    **    duration of this bead, in seconds
    */
   float get_duration();

   /*l
    *b  Description:
    **
    **    This function sets how long this bead will have an
    **    effect.   The bead will have an effect from tin seconds
    **    (as set by set_tin()) to (tin + duration) seconds.
    **
    **    Since distances and times on paths are interrelated,
    **    calling this function will have the side-effect of setting
    **    where on the path the bead's effect ends, as if to a call
    **    to set_length().
    **
    **    If this script bead is part of a diguyCharacterPath,
    **    the diguyCharacterPath::update() function must be called for
    **    changes to take effect.
    **
    *b  Arguments:
    **
    *a    duration - duration of this bead, in seconds
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    */
   int set_duration(float duration);


/****************************************************************************/
/****************************************************************************/
/*****************************************************************************
 **
 *2  Experimental Functions
 **
 **  The following functions are experimental and may change or
 **   disappear with no warning.
 */
/****************************************************************************/
/****************************************************************************/
/****************************************************************************/

   const char* get_begin_at_object_name();

   int set_begin_at_object_name(const char* begin_at_object_name);

   float get_begin_at_object_offset();

   int set_begin_at_object_offset(float begin_at_object_offset);

   const char* get_end_at_object_name();

   int set_end_at_object_name(const char* end_at_object_name);

   float get_end_at_object_offset();

   int set_end_at_object_offset(float end_at_object_offset);


/****************************************************************************/
/****************************************************************************/

/**
 *x  The functions and variables past this point are for internal use only.
 **   No external access to them is expected or necessary.
 */
#ifdef CPLUSPLUS_ONLY

   bdiBeadGaze* get_scripted_object() {return m_scripted_object;}

   friend class bdiBeadGaze;

private:

   /*l
    **    A private constructor.
    */
   diguyCharacterPathGazeBead(bdiBeadGaze* scripted_object);

   /*l
    **    A private destructor.
    */
   ~diguyCharacterPathGazeBead();

   /*l
    **    A pointer to internal data.
    */
   bdiBeadGaze* m_scripted_object;

#endif

};


#endif /* __diguyCharacterPathGazeBead_H */


/*********************************************************************
 ** Copyright (c) 1992-2022 MAK Technologies, Inc.
 ** All rights reserved.
 *********************************************************************/
