![]() |
DI-Guy SDK Documentation
13.2
|
A bead that sits on a character's spline path and triggers a new action. More...
#include <diguyCharacterPathActionBead.h>
Public Member Functions | |
General Functions | |
Unless otherwise specified, all functions callable from:
| |
| const char * | get_name () |
| Returns the name of the object. More... | |
| int | set_name (const char *name) |
| This function sets the name of this object. More... | |
| const char * | get_action () |
| This function returns the action this bead specifies. More... | |
| int | set_action (const char *action) |
| This function sets the action this bead specifies. More... | |
| float | get_distance_into_path () |
| This function returns how far into the path this bead is. More... | |
| int | set_distance_into_path (float distance_into_path) |
| This function sets how far into the path this bead is. More... | |
| float | get_length () |
| This function returns where on the path this bead is. More... | |
| int | set_length (float length) |
| This function sets how long this bead will have an effect. More... | |
| int | get_derive_length_flag () |
| This function returns whether the length of this bead is derived from other information in the bead. More... | |
| int | set_derive_length_flag (int derive_length_flag) |
| This function sets whether the length of this bead is derived from other information in the bead. More... | |
| float | get_tin () |
| This function returns when on the path this bead is. More... | |
| int | set_tin (float tin) |
| This function sets when this bead will begin to have an effect. More... | |
| float | get_duration () |
| This function returns how long this bead will have an effect. More... | |
| int | set_duration (float duration) |
| This function sets how long this bead will have an effect. More... | |
| int | get_derive_duration_flag () |
| This function returns whether the duration of this bead is derived from other information in the bead. More... | |
| int | set_derive_duration_flag (int derive_duration_flag) |
| This function sets whether the duration of this bead is derived from other information in the bead. More... | |
| float | get_desired_duration () |
| Returns: the desired duration of this bead. More... | |
| int | set_desired_duration (float desired_duration) |
| This function sets the desired duration of the action bead. More... | |
| int | get_derive_desired_duration_flag () |
| This function returns whether the desired duration of this bead is derived from other information in the bead. More... | |
| int | set_derive_desired_duration_flag (int derive_desired_duration_flag) |
| This function sets whether the desired duration of this bead is derived from other information in the bead. More... | |
| int | get_motion_reps () |
| Returns: how many repetitions of the action's looping motion will be played. More... | |
| int | set_motion_reps (int motion_reps) |
| This function sets how many repetitions of the action's looping motion will be played. More... | |
| int | get_derive_motion_reps_flag () |
| This function returns whether the number of motion repetitions for this action is derived from other data in the bead. More... | |
| int | set_derive_motion_reps_flag (int derive_motion_reps) |
| This function sets whether the number of motion repetitions for this bead is derived from other information in the bead. More... | |
| int | get_transition_before_bead_flag () |
| This function returns whether the transition motion for this action bead from the previous action bead (if any) occurs before this action bead or after. More... | |
| int | set_transition_before_bead_flag (int transition_before_bead_flag) |
| This function sets whether the transition motion for this action bead from the previous action bead (if any) occurs before this action bead or after. More... | |
| const char * | get_companion_waypoint_name () |
| This function returns the name of this bead's companion waypoint. More... | |
| int | set_companion_waypoint_name (const char *companion_waypoint_name) |
| This function sets the name of this action bead's companion waypoint. More... | |
| int | create_or_update_companion_waypoint () |
| This function creates a companion waypoint for this action bead if it doesn't already have one. More... | |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| class | bdiBeadAction |
| bdiBeadAction * | m_scripted_object |
| A pointer to internal data. More... | |
| bdiBeadAction * | get_scripted_object () |
| diguyCharacterPathActionBead (bdiBeadAction *scripted_object) | |
| A private constructor. More... | |
| ~diguyCharacterPathActionBead () | |
| A private destructor. More... | |
A bead that sits on a character's spline path and triggers a new action.
|
private |
A private constructor.
|
private |
A private destructor.
| const char* diguyCharacterPathActionBead::get_name | ( | ) |
Returns the name of the object.
This pointer will never be NULL.
Returns:
name of the object
| int diguyCharacterPathActionBead::set_name | ( | const char * | name | ) |
This function sets the name of this object.
Returns:
0 on success, -1 on failure
| const char* diguyCharacterPathActionBead::get_action | ( | ) |
This function returns the action this bead specifies.
This pointer will never be NULL.
Returns:
action of this bead
| int diguyCharacterPathActionBead::set_action | ( | const char * | action | ) |
This function sets the action this bead specifies.
When a character is traversing the path containing this bead, the specified action will be performed when this bead is reached.
If this action bead is part of a diguyCharacterPath, the diguyCharacterPath::update() function must be called for changes to take effect.
| action | the action the character should perform when this bead is reached |
Returns:
0 on success, -1 on failure
| float diguyCharacterPathActionBead::get_distance_into_path | ( | ) |
This function returns how far into the path this bead is.
Returns:
distance into path of this bead, in meters
| int diguyCharacterPathActionBead::set_distance_into_path | ( | float | distance_into_path | ) |
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.
| distance_into_path | how far into the path this bead is, in meters |
Returns:
0 on success, -1 on failure
| float diguyCharacterPathActionBead::get_length | ( | ) |
This function returns where on the path this bead is.
Returns:
location of this bead, in meters
| int diguyCharacterPathActionBead::set_length | ( | float | length | ) |
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.
| duration | duration of this bead, in seconds |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::get_derive_length_flag | ( | ) |
This function returns whether the length of this bead is derived from other information in the bead.
If so, calling set_length() will have no effect.
See set_derive_length_flag() for information on how length is derived.
Returns:
integer flag; 1 means length is derived, 0 means it is not
| int diguyCharacterPathActionBead::set_derive_length_flag | ( | int | derive_length_flag | ) |
This function sets whether the length of this bead is derived from other information in the bead.
If so, calling set_length() will have no effect.
(More documentation needed to explain how length is derived.)
| derive_length_flag | pass 1 for length to be derived, else 0 |
Returns:
0 on success, -1 on failure
| float diguyCharacterPathActionBead::get_tin | ( | ) |
This function returns when on the path this bead is.
Returns:
time location of this bead, in seconds
| int diguyCharacterPathActionBead::set_tin | ( | float | tin | ) |
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.
| tin | when this bead begins to have an effect, in seconds |
Returns:
0 on success, -1 on failure
| float diguyCharacterPathActionBead::get_duration | ( | ) |
This function returns how long this bead will have an effect.
Returns:
duration of this bead, in seconds
| int diguyCharacterPathActionBead::set_duration | ( | float | duration | ) |
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.
Note that if duration is derived (as by a call to set_derive_duration_flag()), this function will have no 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'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.
| duration | duration of this bead, in seconds |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::get_derive_duration_flag | ( | ) |
This function returns whether the duration of this bead is derived from other information in the bead.
If so, calling set_duration() will have no effect.
See set_derive_duration_flag() for information on how length is derived.
Returns:
integer flag; 1 means duration is derived, 0 means it is not
Callable From:
| int diguyCharacterPathActionBead::set_derive_duration_flag | ( | int | derive_duration_flag | ) |
This function sets whether the duration of this bead is derived from other information in the bead.
If so, calling set_duration() will have no effect.
(More documentation needed to explain how duration is derived.)
| derive_length_flag | pass 1 for duration to be derived, else 0 |
Returns:
0 on success, -1 on failure
| float diguyCharacterPathActionBead::get_desired_duration | ( | ) |
Returns: the desired duration of this bead.
| int diguyCharacterPathActionBead::set_desired_duration | ( | float | desired_duration | ) |
This function sets the desired duration of the action bead.
| desired_duration | desired duration of action in seconds |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::get_derive_desired_duration_flag | ( | ) |
This function returns whether the desired duration of this bead is derived from other information in the bead.
If so, calling set_desired_duration() will have no effect.
Returns:
integer flag; 1 means duration is derived, 0 means it is not
| int diguyCharacterPathActionBead::set_derive_desired_duration_flag | ( | int | derive_desired_duration_flag | ) |
This function sets whether the desired duration of this bead is derived from other information in the bead.
If so, calling set_desired_duration() will have no effect.
| derive_desired_duration_flag | pass 1 for duration to be derived, else 0 |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::get_motion_reps | ( | ) |
Returns: how many repetitions of the action's looping motion will be played.
| int diguyCharacterPathActionBead::set_motion_reps | ( | int | motion_reps | ) |
This function sets how many repetitions of the action's looping motion will be played.
| motion_reps | how many times to play the looping motion |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::get_derive_motion_reps_flag | ( | ) |
This function returns whether the number of motion repetitions for this action is derived from other data in the bead.
If so, calling set_motion_reps() will have no effect.
Returns:
integer flag; 1 means number of motion reps is derived, 0 means it is not
| int diguyCharacterPathActionBead::set_derive_motion_reps_flag | ( | int | derive_motion_reps | ) |
This function sets whether the number of motion repetitions for this bead is derived from other information in the bead.
If so, calling set_motion_reps() will have no effect.
| derive_motion_reps | pass 1 for number of motion reps to be derived, else 0 |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::get_transition_before_bead_flag | ( | ) |
This function returns whether the transition motion for this action bead from the previous action bead (if any) occurs before this action bead or after.
Returns:
integer flag; 1 means transition happens before, 0 means it happens after
| int diguyCharacterPathActionBead::set_transition_before_bead_flag | ( | int | transition_before_bead_flag | ) |
This function sets whether the transition motion for this action bead from the previous action bead (if any) occurs before this action bead or after.
| transition_before_bead_flag | pass 1 for transition to happen before, 0 for it to happen after |
Returns:
0 on success, -1 on failure
| const char* diguyCharacterPathActionBead::get_companion_waypoint_name | ( | ) |
This function returns the name of this bead's companion waypoint.
Returns:
C string identifying name of companion waypoint; NULL if there is no companion waypoint
| int diguyCharacterPathActionBead::set_companion_waypoint_name | ( | const char * | companion_waypoint_name | ) |
This function sets the name of this action bead's companion waypoint.
The action bead will be constrained to stay at the companion waypoint as the waypoint is moved around.
| companion_waypoint_name | name of companion waypoint; pass |
| NULL | to un set the companion waypoint |
Returns:
0 on success, -1 on failure
| int diguyCharacterPathActionBead::create_or_update_companion_waypoint | ( | ) |
This function creates a companion waypoint for this action bead if it doesn't already have one.
The created waypoint will be at the action bead's current position. If this action bead already has a companion waypoint, it may be modified to show facing direction changes if this action or the previous action have changed since the companion waypoint was assigned.
Returns:
0 on success, -1 on failure
|
inline |
|
friend |
|
private |
A pointer to internal data.