
This file was automatically generated from comments in the C/C++ header file diguyCharacter.h. Do not edit this file directly; the changes will be lost. Please mail suggestions or corrections to diguy@bdi.com
Includes: diguyCharacterPoseOverride.h | diguy_constants.h | declspec_diguy.h
class diguyCharacter
|
class BDI_DECLSPEC_diguy diguyCharacter { public: const char* get_name(); const char* get_type_name(); int get_index(); diguyScenario* get_scenario(); int get_enabled(); int set_enabled(int enabled); int get_visible(); int get_drawn_by_scenario_flag(); int set_drawn_by_scenario_flag(int flag); const char* get_character_type_string(); const char* get_appearance(); int set_current_appearance(const char* appearance); const char* get_current_appearance(); int set_current_head_appearance(const char* head_appearance); const char* get_current_head_appearance(); int get_num_links(); diguyGraphicsLink* get_link_at_index(int index); const char* get_link_name_at_index(int link_index); int get_num_link_shapes(const char* link_name); const char* get_link_shape_name_at_index(const char* link_name, int shape_index); int get_paused(); int die_now(const char* preferred_dead_action_name = 0); int set_t(float t); int set_t_controlled_by_scenario_t(int t_controlled_by_scenario_t); int get_t_controlled_by_scenario_t(); float get_current_tin(); int set_current_tin(float tin); float get_current_tout(); int set_current_tout(float tout); int set_careful_interpolation_threshold(float threshold); float get_careful_interpolation_threshold(); int set_motion_interpolation_flag(int flag); int get_motion_interpolation_flag(); int set_up_vector(char axis); int set_position(float tx, float ty, float tz); int set_position_relative_to_parent(float tx, float ty, float tz); int get_position(float* tx, float* ty, float* tz); int get_position_relative_to_parent(float* tx, float* ty, float* tz); int set_orientation(float rz, float rx, float ry); int set_orientation_relative_to_parent(float rz, float rx, float ry); int get_orientation(float* rz, float* rx, float* ry); int get_orientation_relative_to_parent(float* rz, float* rx, float* ry); int set_desired_position(float tx, float ty, float tz); int get_desired_position(float* tx, float* ty, float* tz); int set_desired_orientation(float rz, float rx, float ry); int get_desired_orientation(float* rz, float* rx, float* ry); int set_speed(float speed); float get_speed(); int set_scale(float scale_x, float scale_y, float scale_z); int get_scale(float* scale_x, float* scale_y, float* scale_z); int get_link_position(const char* link_name, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry); int get_link_position_with_offset(const char* link_name, float offset_tx, float offset_ty, float offset_tz, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry); int get_link_relative_position(const char* beginning_link_name, const char* ending_link_name, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry); int get_link_relative_position_with_offset(const char* beginning_link_name, const char* ending_link_name, float offset_tx, float offset_ty, float offset_tz, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry); int set_parent(const char* parent_name, const char* parent_link_name = ""); int unset_parent(); int get_dead(); #ifdef CPLUSPLUS_ONLY void* get_graphics_ptr(); int set_lod_ranges(float* ranges); int draw(); int draw_pass1(); int draw_pass2(); int set_user_data(void* user_data); void* get_user_data(); #endif enum { CALLBACK_ID_CREATE = 1, CALLBACK_ID_DESTROY, CALLBACK_ID_PRE_UPDATE, CALLBACK_ID_POST_UPDATE, CALLBACK_ID_DONE_SPEAKING, CALLBACK_ID_GAZE_STATUS, CALLBACK_ID_LPOINT_STATUS, CALLBACK_ID_SHOW, CALLBACK_ID_HIDE }; #ifdef CPLUSPLUS_ONLY int add_callback(int callback_id, diguyCharacterCallback* callback, void* callback_params = 0, void* callback_user_data = 0); int remove_callback(int callback_id, diguyCharacterCallback* callback); int remove_callback_with_user_data(int callback_id, void* callback_user_data); #endif int set_motion_lod(int lod); int get_motion_lod(); int set_graphics_lod(int lod); int get_graphics_lod(); const char* get_current_action(); int set_desired_action(const char* action_name, float speed = DIGUY_DEFAULT_FLOAT, int retain_path_shape = 0); const char* get_desired_action(); int force_action(const char* action_name, float speed = DIGUY_DEFAULT_FLOAT, int include_transition_arc = 1, float max_rampdown_interval = 0.5f, int retain_path_shape = 0); int force_action_with_duration(const char* action_name, float duration, int include_transition_arc = 1, float max_rampdown_interval = 0.5f); int force_action_and_path_shape(const char* action_name, const char* path_shape_name); int set_distance_along_path(float distance); float get_distance_along_path(); int leave_path(); float get_time_to_transition(); diguyCharacterMode get_action_mode(); diguyCharacterMode get_position_mode(); diguyMuzzle get_default_weapon_muzzle(); int set_default_weapon_muzzle(diguyMuzzle muzzle); const char* get_default_weapon_sound(); int set_default_weapon_sound(const char* sound_name); void set_weapon_spread(float spread); void set_weapon_hit_ratio(float hit_ratio); int fire_weapon(diguyMuzzle muzzle = DIGUY_MUZZLE_DEFAULT); int fire_weapon_n_times(int count, float dt = 0.2f, const char* sound_name = 0, diguyMuzzle muzzle = DIGUY_MUZZLE_DEFAULT); int get_weapon_fire_count(diguyMuzzle muzzle = DIGUY_MUZZLE_DEFAULT); int get_accessory1_state(); int get_rifle_state(); int play_sound(const char* sound_name); int set_t_scale_factor(float t_scale_factor); int unset_t_scale_factor(); int is_within_distance_n_of_character(const char* character_name, float distance); int is_within_distance_n_of_member_of_group(const char* group_name, float distance); int get_num_paths(); diguyCharacterPath* get_path_at_index(int index); const char* get_path_name_at_index(int index); int get_current_path_index(); int push_path(const char* path_name); int force_path(const char* path_name, float max_rampdown_interval = 0.5f); int force_partial_path(const char* path_name, const char* beginning_action_bead_name, float max_rampdown_interval = 0.5f); int resume_interrupted_path(float max_rampdown_interval = 0.5f); int create_and_force_bridge_path(const char* destination_path_name, const char* destination_path_action_bead_name, const char* via_action_name); #ifdef CPLUSPLUS_ONLY diguyCharacterPath* create_simple_path(const char* name, diguyWaypoint* waypoint0, diguyWaypoint* waypoint1, const char* transition_from_action_name, const char* fill_action_name, const char* transition_to_action_name); int destroy_path(diguyCharacterPath* path); #endif int jump_to_action_bead(const char* bead_name, float max_rampdown_interval = 0.5f); diguyCharacterPath* find_path(const char* path_name); #ifdef CPLUSPLUS_ONLY int set_altitude_function(diguyAltitudeFunction* altitude_function); diguyAltitudeFunction* get_altitude_function(); #endif int set_altitude_function_enabled_in_free_position_mode(int enabled); int get_altitude_function_enabled_in_free_position_mode(); int set_altitude_function_enabled_in_path_position_mode(int value); int get_altitude_function_enabled_in_path_position_mode(); int get_pose_in_radians(float* pose_array); int get_pose_array_size(); diguyCharacterPoseOverride* create_pose_override(int override_stage = 2); int destroy_pose_override(diguyCharacterPoseOverride* po); int gaze_at_angle(float azimuth, float elevation, float distance, int is_new_gaze = 1); int gaze_at_angle_local(float azimuth, float elevation, float distance = 10000.0f, int is_new_gaze = 1); int gaze_at_point(float tx, float ty, float tz, int is_new_gaze = 1); int gaze_at_point_local(float tx, float ty, float tz, int is_new_gaze = 1); int gaze_at_character(const char* target_character_name, const char* target_character_link_name, float offset_tx, float offset_ty, float offset_tz); int get_gaze_point(float* x, float* y, float* z); int get_gaze_is_acquired(); int get_gaze_is_steady(); int end_gaze(); int lpoint_at_angle(float azimuth, float elevation, float distance, int is_new_lpoint = 1, const char* base_gesture_name = 0); int lpoint_at_angle_local(float azimuth, float elevation, float distance = 10000.0f, int is_new_lpoint = 1, const char* base_gesture_name = 0); int lpoint_at_point(float tx, float ty, float tz, int is_new_lpoint = 1, const char* base_gesture_name = 0); int lpoint_at_point_local(float tx, float ty, float tz, int is_new_lpoint = 1, const char* base_gesture_name = 0); int lpoint_at_character(const char* target_character_name, const char* target_character_link_name, float offset_tx, float offset_ty, float offset_tz); int get_lpoint_point(float* x, float* y, float* z); const char* get_lpoint_base_gesture_name(); int get_lpoint_is_acquired(); int get_lpoint_is_steady(); int end_lpoint(); int set_gaze_params_to_defaults(); int set_gaze_param_desired_locate_time(float t); float get_gaze_param_desired_locate_time(); int set_gaze_link_uses_desired_locate_time(const char* link_name, int uses_desired_locate_time); int get_gaze_link_uses_desired_locate_time(const char* link_name); int set_gaze_link_azimuth_limits(const char* link_name, float min, float max); int get_gaze_link_azimuth_limits(const char* link_name, float* min, float* max); int set_gaze_link_elevation_limits(const char* link_name, float min, float max); int get_gaze_link_elevation_limits(const char* link_name, float* min, float* max); int set_gaze_link_azimuth_tolerance(const char* link_name, float min, float max); int get_gaze_link_azimuth_tolerance(const char* link_name, float* min, float* max); int set_gaze_link_elevation_tolerance(const char* link_name, float min, float max); int get_gaze_link_elevation_tolerance(const char* link_name, float* min, float* max); int set_gaze_link_max_angular_vel(const char* link_name, float angular_vel); int get_gaze_link_max_angular_vel(const char* link_name, float* angular_vel); int set_gaze_link_scale_factor(const char* link_name, float scale_factor); int get_gaze_link_scale_factor(const char* link_name, float* scale_factor); int set_link_enabled_for_gaze(const char* link_name, int enabled); int get_link_enabled_for_gaze(const char* link_name); int set_link_enabled_for_lpoint(const char* link_name, int enabled); int get_link_enabled_for_lpoint(const char* link_name); int set_nod(float azimuth, float elevation, float duration = 0.5f); int nod_head(float duration, float nod_count, float nod_elevation0 = 15.0f, float nod_elevation1 = 0.0f, float nod_elevation_out = 0.0f); int shake_head(float duration, float shake_count, float shake_azimuth0 = -20.0f, float shake_azimuth1 = 20.0f, float shake_azimuth_out = 0.0f); float get_nod_azimuth(); float get_nod_elevation(); int set_aim(float azimuth, float elevation); float get_aim_azimuth(); float get_aim_elevation(); int set_aim_interpolation_flag(int flag); int get_aim_interpolation_flag(); int set_aim_smooth_flag(int flag); int get_aim_smooth_flag(); int set_aim_divisions(int azimuth_divisions, int elevation_divisions); int set_face_expression(const char* facex_name, float duration); int set_viseme(const char* viseme_name, float weight); float get_viseme(const char* viseme_name); int set_orientation_eyes(float azimuth, float elevation); int set_orientation_eye_left(float azimuth, float elevation); int set_orientation_eye_right(float azimuth, float elevation); float get_azimuth_eye_left(); float get_elevation_eye_left(); float get_azimuth_eye_right(); float get_elevation_eye_right(); int set_eye_droop(float droop_amount); int blink(float duration_in = DIGUY_DEFAULT_FLOAT, float duration_out = DIGUY_DEFAULT_FLOAT, float target_in = DIGUY_DEFAULT_FLOAT, float target_out = DIGUY_DEFAULT_FLOAT, float tin = DIGUY_DEFAULT_FLOAT); float get_eye_droop(); int speak(const char* string); int is_speaking(); int is_reflected(); int execute_gesture(const char* gesture_name, int reps = DIGUY_DEFAULT_INT, float overall_duration = DIGUY_DEFAULT_FLOAT, float channel_A_weight = DIGUY_DEFAULT_FLOAT); int execute_1stage_gesture(const char* gesture_name, int reps = DIGUY_DEFAULT_INT, float stage1_duration = DIGUY_DEFAULT_FLOAT, float channel_A_weight = DIGUY_DEFAULT_FLOAT); int execute_2stage_gesture(const char* gesture_name, int reps = DIGUY_DEFAULT_INT, float stage1_duration = DIGUY_DEFAULT_FLOAT, float stage2_duration = DIGUY_DEFAULT_FLOAT, float channel_A_weight = DIGUY_DEFAULT_FLOAT); int execute_3stage_gesture(const char* gesture_name, int reps = DIGUY_DEFAULT_INT, float stage1_duration = DIGUY_DEFAULT_FLOAT, float stage2_duration = DIGUY_DEFAULT_FLOAT, float stage3_duration = DIGUY_DEFAULT_FLOAT, float channel_A_weight = DIGUY_DEFAULT_FLOAT); diguyCharacterGesture* create_gesture(const char* gesture_name); int destroy_gesture(diguyCharacterGesture* gesture); int abort_all_gestures(float max_rampdown_interval); diguySoundInstance* create_sound_instance(const char* sound_name); int destroy_sound_instance(diguySoundInstance* sound_instance); int stop_all_sounds(); int get_DIS_lifeform_state(); int get_DIS_weapon_state(int which = 0); int set_network_marking(const char* network_marking); const char* get_network_marking(); int set_is_network_published(int is_network_published); int get_is_network_published(); int get_network_entity_number(); int call_formation(const char* name, int snap_to=0); int break_formation(); diguyCharacterGuide* add_guide(const char* guide_name, int automatically_disable_when_acquired = 0); diguyCharacterGuide* create_guide(const char* guide_name, const char* guide_algorithm, int automatically_disable_when_acquired = 0); int remove_guide_with_name(const char* guide_name); int remove_guide(diguyCharacterGuide* guide); int remove_all_guides(); int add_motion_texture(const char* motex_name = "default", float texture_gain = 1.0f, int end_previous_motex = 1); int end_motion_texture(float rampdown_interval = 0.2f); int set_history_type(diguyHistoryType history_type); diguyHistoryType get_history_type(); int set_history_size_t(float t); float get_history_size_t(); int set_history_size_increment_t(float t); float get_history_size_increment_t(); int add_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL); int remove_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL); int force_action_by_name(const char* action_name, int include_transition_arc, float max_rampdown_interval, int retain_path_shape = 0); const char* get_desired_action_name(); int set_desired_action_by_name(const char* action_name, int retain_path_shape = 0); int force_partial_path_by_name(const char* path_name, const char* beginning_action_bead_name, float max_rampdown_interval = 0.5f); int force_path_by_name(const char* path_name, float max_rampdown_interval = 0.5f); int play_sound_by_name(const char* sound_name); int push_path_by_name(const char* path_name); int set_parent_by_name(const char* parent_name, const char* parent_link_name = ""); bdiScenarioCharacter* get_scripted_object() {return m_character;} };
function diguyCharacter::get_name |
Prototype:
Description:const char* get_name();
Returns the name of the object. This pointer will never be NULL.Returns:
name of the objectCallable From:
- C++
- Script
function diguyCharacter::get_type_name |
Prototype:
Description:const char* get_type_name();
Returns the type name of the object. This pointer will never be NULL.Returns:
type name of the objectCallable From:
- C++
- Script
function diguyCharacter::get_index |
Prototype:
Description:int get_index();
Returns the index of the object. This index may change if characters are created or destroyed, so it should not be considered a unique identifier for the character.Returns:
index of the objectCallable From:
- C++
- Script
function diguyCharacter::get_scenario |
Prototype:
Description:diguyScenario* get_scenario();
Returns the scenario that this character is a part of.Returns:
pointer to type diguyScenarioCallable From:
- C++
- Script
function diguyCharacter::get_enabled |
Prototype:
Description:int get_enabled();
Returns whether the character is enabled.Returns:
True if the character is enabled, false if not.Callable From:
- C++
- Script
function diguyCharacter::set_enabled |
Prototype:
Description:int set_enabled(int enabled);
Set whether a character is enabled. If the character is disabled, he will become invisible, both to the eye and to the scenario in which he lives.Returns:
Always return 0.Callable From:
- C++
- Script
function diguyCharacter::get_visible |
Prototype:
Description:int get_visible();
Returns whether the character is visible.Returns:
True if the character is visible, false if not.Callable From:
- C++
- Script
function diguyCharacter::get_drawn_by_scenario_flag |
Prototype:
Description:int get_drawn_by_scenario_flag();
Returns whether character drawing is done automatically by the scenario.Returns:
1 if character drawing is done by the scenario; 0 if notSee Also:
set_drawn_by_scenario_flag()Callable From:
- C++
- Script
function diguyCharacter::set_drawn_by_scenario_flag |
Prototype:
Description:int set_drawn_by_scenario_flag(int flag);
Sets whether this character is drawn automatically by the scenario.Performer 2.x Version:
This function has no effect. These environments automatically draw all elements in their visual database.OpenGL Version:
Direct3D Version:
If this flag is set to 0, it is up to the user to call the character draw_pass1() and draw_pass2() calls at the appropriate time.Arguments:
Returns:
flag pass 1 for character drawing to automatically be handled by scenario (this is the default); 0 for it not to be
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_character_type_string |
Prototype:
Description:const char* get_character_type_string();
Returns the type of the character. This pointer will never be NULL.Returns:
type of the characterCallable From:
- C++
- Script
function diguyCharacter::get_appearance |
Prototype:
Description:const char* get_appearance();
Returns the base appearance of the character. This pointer will never be NULL.
Note that the current appearance (as returned by get_current_appearance()) may be different than the base appearance. This base appearance is the starting appearance of the character before any calls to set_current_appearance() have been made.Returns:
name of base appearance of the characterCallable From:
- C++
- Script
function diguyCharacter::set_current_appearance |
Prototype:
Description:int set_current_appearance(const char* appearance);
This function sets the current appearance of this character.Arguments:
See Also:
appearance name of the new desired appearance
get_current_appearance(), set_current_head_appearance()Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguyCharacter::get_current_appearance |
Prototype:
Returns:const char* get_current_appearance();
current appearance; see set_current_appearance()Callable From:
- C++
- Script
function diguyCharacter::set_current_head_appearance |
Prototype:
Description:int set_current_head_appearance(const char* head_appearance);
This function sets the current head appearance of this character.Arguments:
Returns:
head_appearance name of the new desired head appearance
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguyCharacter::get_current_head_appearance |
Prototype:
Returns:const char* get_current_head_appearance();
current head appearance; see set_current_head_appearance()Callable From:
- C++
- Script
function diguyCharacter::get_num_links |
Prototype:
Returns:int get_num_links();
number of links on this characterCallable From:
- C++
- Script
function diguyCharacter::get_link_at_index |
Prototype:
Returns:diguyGraphicsLink* get_link_at_index(int index);
pointer of type diguyGraphicsLink; NULL if no link at the specified indexArguments:
Callable From:
index index of the link; indices start at 0
- C++
- Script
function diguyCharacter::get_link_name_at_index |
Prototype:
Returns:const char* get_link_name_at_index(int link_index);
the string identifying the link at the given indexArguments:
Callable From:
link_index index of the link; indices start at 0
- C++
- Script
function diguyCharacter::get_num_link_shapes |
Prototype:
Returns:int get_num_link_shapes(const char* link_name);
the number of shapes on the specified linkArguments:
Callable From:
link_name name of the link
- C++
- Script
function diguyCharacter::get_link_shape_name_at_index |
Prototype:
Returns:const char* get_link_shape_name_at_index(const char* link_name, int shape_index);
the name of the shape at the specified index on the linkArguments:
Callable From:
link_name name of the link shape_index index of the shape on the link; indices start at 0
- C++
- Script
function diguyCharacter::get_paused |
Prototype:
Description:int get_paused();
Returns whether this character is frozen in mid action.Returns:
1 if paused, 0 if not paused.Callable From:
- C++
- Script
function diguyCharacter::die_now |
Prototype:
Description:int die_now(const char* preferred_dead_action_name = 0);
This function sends this character a signal to die as soon as possible.Mode Effects:
Returns:
- This function will put the character into free action mode.
- This function will not change the position mode.
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguyCharacter::set_t |
Prototype:
Description:int set_t(float t);
This function sets the current t of the character. The character's position and pose will be set to be what it was (or will be) at the specified t.
If the scenario has control of t (return value of get_t_controlled_by_scenario_t() is false), then this function's effects will be overridden the next time diguyScenario::update() is called with a new t.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_t_controlled_by_scenario_t |
Prototype:
Description:int set_t_controlled_by_scenario_t(int t_controlled_by_scenario_t);
This function sets how the character's t (time) is controlled. If 1, the character's t will be set by the scenario on each call to diguyScenario::update(). If 0, the character's t should be set by calls to set_t() before calling diguyScenario::update().Arguments:
Returns:
t_controlled_by_scenario_t 0 for false, 1 for true
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_t_controlled_by_scenario_t |
Prototype:
Returns:int get_t_controlled_by_scenario_t();
whether character's t is controlled by the scenario; see set_t_controlled_by_scenario_t()Callable From:
- C++
- Script
function diguyCharacter::get_current_tin |
Prototype:
Description:float get_current_tin();
This function returns the current tin time of the character. The character will not be visible nor will it start traversing paths until the scenario reaches this time.Returns:
Current tin time in seconds.Callable From:
- C++
- Script
function diguyCharacter::set_current_tin |
Prototype:
Description:int set_current_tin(float tin);
This function sets the current tin time of the character. See get_current_tin().Arguments:
Returns:
tin new value of current tin in seconds
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_current_tout |
Prototype:
Description:float get_current_tout();
This function returns the current tout time of the character. The character will become visible and will stop traversing paths when the scenario reaches this time.Returns:
Current tout time in seconds.Callable From:
- C++
- Script
function diguyCharacter::set_current_tout |
Prototype:
Description:int set_current_tout(float tout);
This function sets the current tin time of the character. See get_current_tout().Arguments:
Callable From:
tout new value of current tout in seconds
- C++
- Script
function diguyCharacter::set_careful_interpolation_threshold |
Prototype:
Description:int set_careful_interpolation_threshold(float threshold);
When the motion data of a character is interpolated, a quick interpolation method can be used which may yield incorrect results, or an expensive interpolation method can be used which will yield correct results at the expense of time.Arguments:
threshold float between 0 (careful never) and 1 (careful always); default is 0.4Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_careful_interpolation_threshold |
Prototype:
Returns:float get_careful_interpolation_threshold();
most recent setting of the careful interpolation threshold; see set_careful_interpolation_threshold()Callable From:
- C++
- Script
function diguyCharacter::set_motion_interpolation_flag |
Prototype:
Description:int set_motion_interpolation_flag(int flag);
Sets whether the motion data of the character is interpolated. Interpolation is disabled by default for better performance. For applications achieving high frame rates, smoother motion may be achieved by turning interpolation on.Arguments:
Returns:
flag 0 by default
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_motion_interpolation_flag |
Prototype:
Returns:int get_motion_interpolation_flag();
most recent setting of the motion interpolation flag; see set_motion_interpolation_flag()Callable From:
- C++
- Script
function diguyCharacter::set_up_vector |
Prototype:
Description:int set_up_vector(char axis);
This function sets how the character should be oriented relative to its surroundings.Arguments:
axis the up vector the character should use; legal values shown below:
- 'd' - use default settings; character will change up vector depending on current action and path shape parameters
- 'z' - Z axis is up; character will be oriented so that positive z in character coordinates is always oriented along the positive Z axis
- 'n' - normal to path; character will be oriented so that positive Z in character coordinates is normal to the path shape the character is on
- 'c' - custom; character's rx and ry orientation values will not be be modified except by direct calls to set_orientation().
Having an up vector of 'z' effectively zeroes out the rx and ry values of the character's orientation.
Having an up vector of 'n' may override rx and ry values of the character's orientation with values derived from the character's path shapeReturns:
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguyCharacter::set_position |
Prototype:
Description:int set_position(float tx, float ty, float tz);
Sets the position of the character relative to the origin of the BDI global coordinate system. The new settings will take effect immediately, possibly causing the character to "teleport" if the new values are significantly different than the old.Mode Effects:
Arguments:
- This function will put the character into free position mode.
- This function will put the character into free action mode.
Returns:
tx, ty, tz position in meters from the origin
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_position_relative_to_parent |
Prototype:
Description:int set_position_relative_to_parent(float tx, float ty, float tz);
Sets the position of the character relative to its parent or the origin of the BDI global coordinate system if this character is not parented. The new settings will take effect immediately, possibly causing the character to "teleport" if the new values are significantly different than the old.Mode Effects:
Arguments:
- This function will put the character into free position mode.
- This function will put the character into free action mode.
Returns:
tx, ty, tz position in meters from the origin
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_position |
Prototype:
Description:int get_position(float* tx, float* ty, float* tz);
Retrieves the position of the character in the BDI global coordinate systemArguments:
tx, ty, tz position in meters from the origin Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_position_relative_to_parent |
Prototype:
Description:int get_position_relative_to_parent(float* tx, float* ty, float* tz);
Retrieves the position of the character relative to its parent or the origin of the BDI global coordinate system if this character is not parented.Arguments:
tx, ty, tz position in meters from the origin Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_orientation |
Prototype:
Description:int set_orientation(float rz, float rx, float ry);
Sets the position of the character relative to the origin of the BDI global coordinate system. The new settings will take effect immediately, possibly causing the character to "teleport" if the new values are significantly different than the old.
Note that if the character has an up vector of 'z' or 'n' or even sometimes 'd' (as set by the set_up_vector() call) the rx and ry values will not have any effect. To be able to set rx and ry values, set the up vector of the character to 'c', for "custom".Mode Effects:
Arguments:
- This function will put the character into free position mode.
- This function will put the character into free action mode.
Returns:
rz, rx, ry orientations in degrees
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_orientation_relative_to_parent |
Prototype:
Description:int set_orientation_relative_to_parent(float rz, float rx, float ry);
Sets the orientation of the character relative to its parent or the origin of the BDI global coordinate system if this character is not parented. The new settings will take effect immediately, possibly causing the character to "teleport" if the new values are significantly different than the old.Mode Effects:
Arguments:
- This function will put the character into free position mode.
- This function will put the character into free action mode.
Returns:
rz, rx, ry orientations in degrees
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_orientation |
Prototype:
Description:int get_orientation(float* rz, float* rx, float* ry);
Retrieves the orientation of the character in the BDI global coordinate systemArguments:
rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_orientation_relative_to_parent |
Prototype:
Description:int get_orientation_relative_to_parent(float* rz, float* rx, float* ry);
Retrieves the orientation of the character relative to its parent or the origin of the BDI global coordinate system if this character is not parented.Arguments:
rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_desired_position |
Prototype:
Description:int set_desired_position(float tx, float ty, float tz);
Sets the desired position of the character. How the character moves toward the desired position is determined by its current guides; see add_guide() and create_guide().Mode Effects:
Arguments:
- This function will put the character into free position mode.
- This function will put the character into free action mode.
Returns:
tx, ty, tz desired position in meters from the origin
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_desired_position |
Prototype:
Description:int get_desired_position(float* tx, float* ty, float* tz);
Retrieves the desired position of the character.Mode Restrictions:
Arguments:
- This function can only be called in free position mode.
tx, ty, tz desired position in meters from the origin Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_desired_orientation |
Prototype:
Description:int set_desired_orientation(float rz, float rx, float ry);
Sets the desired orientation of the character. See set_desired_position().Mode Effects:
Arguments:
- This function will put the character into free position mode.
- This function will put the character into free action mode.
Returns:
rz, rx, ry orientations in degrees counter-clockwise from the positive X axis
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_desired_orientation |
Prototype:
Description:int get_desired_orientation(float* rz, float* rx, float* ry);
Retrieves the desired orientation of the character.Mode Restrictions:
Arguments:
- This function can only be called in free position mode.
rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_speed |
Prototype:
Description:int set_speed(float speed);
Sets the speed the character should attempt to move, in meters per second.
This setting takes effect immediately. To set a desired action and a desired speed at the same time, use the speed argument of the set_desired_action() call.
This desired speed setting can be undone in a couple of ways:
Arguments:
Returns:
speed desired speed in meters per second
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_speed |
Prototype:
Returns:float get_speed();
the approximate speed at which the character is moving, in meters per secondCallable From:
- C++
- Script
function diguyCharacter::set_scale |
Prototype:
Description:int set_scale(float scale_x, float scale_y, float scale_z);
Sets the scale of the character on each of the three major axes.Arguments:
Returns:
scale_x, scale_y, scale_z the factor by which to scale along the given axis
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_scale |
Prototype:
Description:int get_scale(float* scale_x, float* scale_y, float* scale_z);
Returns the scale of the character.Arguments:
sx, sy, sz scale of the character along each axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_link_position |
Prototype:
Description:int get_link_position(const char* link_name, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry);
Returns the location and orientation of a specific link of the character.Arguments:
link_name name of the link; links are named after their inbound joint name tx, ty, tz position in meters from the origin rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_link_position_with_offset |
Prototype:
Description:int get_link_position_with_offset(const char* link_name, float offset_tx, float offset_ty, float offset_tz, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry);
Similar to get_link_position(), but allows specification of offset into ending link.Arguments:
link_name name of the link offset_tx, offset_ty, offset_tz offset in link tx, ty, tz position in meters from the origin rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_link_relative_position |
Prototype:
Description:int get_link_relative_position(const char* beginning_link_name, const char* ending_link_name, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry);
Returns the location and orientation of a specific link of the character relative to the position of another link.Arguments:
beginning_link_name name of the first link; send NULL to to specify the base link ending_link_name name of the last link; send NULL to to specify the base link tx, ty, tz position in meters from the origin rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::get_link_relative_position_with_offset |
Prototype:
Description:int get_link_relative_position_with_offset(const char* beginning_link_name, const char* ending_link_name, float offset_tx, float offset_ty, float offset_tz, float* tx, float* ty, float* tz, float* rz, float* rx, float* ry);
Similar to get_link_relative_position(), but allows specification of offset into ending link.Arguments:
beginning_link_name name of the first link; send NULL to to specify the base link ending_link_name name of the last link; send NULL to to specify the base link offset_tx, offset_ty, offset_tz offset in ending link tx, ty, tz position in meters from the origin rz, rx, ry orientations in degrees counter-clockwise from the positive X axis Pass NULL for any values that are not needed.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacter::set_parent |
Prototype:
Description:int set_parent(const char* parent_name, const char* parent_link_name = "");
Sets the parent of this character to be the passed character. This means that the coordinate system of this character will be local to the parent character rather than the world coordinate system.Arguments:
Returns:
parent_name character to which this character should be attached; pass NULL to have no parent and be attached to the world parent_link_name name of the link to which this character's base link should attach; pass "" to attach to the parent's base link
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguyCharacter::unset_parent |
Prototype:
Description:int unset_parent();
Detaches a character from its parent and reattches it to the world. This is equivalent to diguyCharacter::set_parent(NULL)Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguyCharacter::get_dead |
Prototype:
Returns:int get_dead();
1 if character is dead (die_now() function has been called), 0 if not.Callable From:
- C++
- Script
function diguyCharacter::get_graphics_ptr |
Prototype:
Returns:void* get_graphics_ptr();
A pointer to the character's graphics.Performer 2.x Version:
The return pointer may be cast to point to a pfNode.Vega 3.x Version:
The return pointer may be cast to point to a vgObject.Vega Prime Version:
The return pointer may be cast to point to a vpDiguyCharacter, which is derived from vpObject.OpenGL Version:
This function returns NULL.DirectX 8 Version:
This function returns NULL.Callable From:
- C++
function diguyCharacter::set_lod_ranges |
Prototype:
Description:int set_lod_ranges(float* ranges);
Sets the graphics Level of Detail (LOD) ranges for this character. Compare with diguyScenario::set_default_lod_ranges(), which sets the LOD ranges for newly created characters of a particular type. In both cases, ranges must be a static array of 8 floats, each larger than the one before.
This function sets graphics LOD ranges only. Motion levels of detain can be set by calling set_motion_lod().Returns:
0 on success, -1 on failureCallable From:
- C++
function diguyCharacter::draw |
Prototype:
Description:int draw();
This function draws this character in immediate mode graphics environments (see below). This is the equivalent of calling draw_pass1() immediately followed by draw_pass2().Callable From:
Returns:
- C++
0 on success, -1 on failurePerformer 2.x Version:
This function has no effect. These environments automatically draw all elements in their visual database.OpenGL Version:
Direct3D Version:
This function immediately draws this character. Either this