![]() |
DI-Guy SDK Documentation
13.2
|
#include <diguyWaypoint.h>
Public Member Functions | |
General Functions | |
Unless otherwise noted all functions in this class section are callable from:
| |
| const char * | get_name () |
| Returns the name of the object. More... | |
| long | get_uid () |
| All waypoints are assigned a unique identifier, or uid. More... | |
| int | get_selected () |
| Returns: 1 if waypoint is selected in DI-Guy Scenario or DI-Guy Author, 0 if not. More... | |
Position and Orientation Functions | |
The Boston Dynamics global coordinate system is right-handed, with X forward, Z up, and Y to the left. Rotation directions follow standard right-handed coordinate system conventions:
NOTE: If modifications are made to the waypoint using any of the set_*() commands, if the waypoint is part of a diguyCharacterPath or diguyPathShape, the diguyCharacterPath::update() or diguyPathShape::update() function must be called for changes to take effect. Multiple changes can be made before the update calls are made. | |
| void | set_position (float x, float y, float z) |
| This function sets the x, y, z coordinates of the waypoint in meters. More... | |
| void | set_position_double (double x, double y, double z) |
| Double precision version of set_position(). More... | |
| void | get_position (float *x, float *y, float *z) |
| Returns: x, y, z coordinate of waypoint in meters. More... | |
| void | get_position_double (double *tx, double *ty, double *tz) |
| Double precision version of get_position(). More... | |
| void | set_orientation_in (float rz, float rx, float ry) |
| Sets the orientation of the path entering the waypoint. More... | |
| void | get_orientation_in (float *rz, float *rx, float *ry) |
| Retrieves the orientation of the path entering the waypoint. More... | |
| void | set_orientation_out (float rz, float rx, float ry) |
| Equivalent to set_orientation_in(), but for the path exiting the waypoint. More... | |
| void | get_orientation_out (float *rz, float *rx, float *ry) |
| Equivalent to get_orientation_in(), but for the path exiting the waypoint. More... | |
| void | set_yaw_coupled (int yaw_coupled) |
| This function sets whether the yaw in and yaw out angles are coupled together. More... | |
| int | get_yaw_coupled () |
| Returns: whether the yaw in and yaw out angles are coupled together; see set_yaw_coupled() More... | |
| void | set_yaw_coupling_offset (float yaw_coupling_offset) |
| This function sets by how much the yaw in and yaw out angles should be offset when they are coupled together. More... | |
| float | get_yaw_coupling_offset () |
| Returns: the offset between yaw in and yaw out when the yaw angles are coupled together; see set_yaw_coupling_offset() More... | |
| void | set_roll_coupled (int roll_coupled) |
| This function is the same as its yaw counterpart, but rotation is about the x axis. More... | |
| int | get_roll_coupled () |
| This function is the same as its yaw counterpart, but rotation is about the x axis. More... | |
| void | set_roll_coupling_offset (float roll_coupling_offset) |
| This function is the same as its yaw counterpart, but rotation is about the x axis. More... | |
| float | get_roll_coupling_offset () |
| This function is the same as its yaw counterpart, but rotation is about the x axis. More... | |
| void | set_pitch_coupled (int pitch_coupled) |
| This function is the same as its yaw counterpart, but rotation is about the y axis. More... | |
| int | get_pitch_coupled () |
| This function is the same as its yaw counterpart, but rotation is about the y axis. More... | |
| void | set_pitch_coupling_offset (float pitch_coupling_offset) |
| This function is the same as its yaw counterpart, but rotation is about the y axis. More... | |
| float | get_pitch_coupling_offset () |
| This function is the same as its yaw counterpart, but rotation is about the y axis. More... | |
| void | set_weight_in (float weight_in) |
| This function sets the weight of the control handle heading into the waypoint. More... | |
| float | get_weight_in () |
| Returns: weight heading into the waypoint, in meters; see set_weight_in() More... | |
| void | set_weight_out (float weight_out) |
| Similar to set_weight_in(), but for the outgoing weight. More... | |
| float | get_weight_out () |
| Returns: weight heading out of the waypoint, in meters; see set_weight_out(). More... | |
| void | set_weight_coupled (int weight_coupled) |
| This function sets whether the weight in and weight out are coupled together. More... | |
| int | get_weight_coupled () |
| Returns: whether the weight in and weight out are coupled together; see set_weight_coupled() More... | |
| void | get_control_point_in_position (float *x, float *y, float *z) |
| This function returns the world position of the control point heading into the waypoint. More... | |
| void | get_control_point_out_position (float *x, float *y, float *z) |
| Similar to get_control_point_in_position(), but for out control point. More... | |
| void | get_forward_normal_in (float *x, float *y, float *z) |
| This function returns the normal vector of the control bar heading into the waypoint. More... | |
| void | get_left_normal_in (float *x, float *y, float *z) |
| Similar to get_forward_normal_in(), but for left normal. More... | |
| void | get_up_normal_in (float *x, float *y, float *z) |
| Similar to get_out_normal_in(), but for up normal. More... | |
| void | get_forward_normal_out (float *x, float *y, float *z) |
| Similar to get_forward_normal_in(), but for out control bar. More... | |
| void | get_left_normal_out (float *x, float *y, float *z) |
| Similar to get_left_normal_in(), but for out control bar. More... | |
| void | get_up_normal_out (float *x, float *y, float *z) |
| Similar to get_up_normal_in(), but for out control bar. More... | |
Other Functions | |
| void | set_num_segments (int num_segments) |
| This function sets how many segments the path portion this waypoint begins will be divided into. More... | |
| int | get_num_segments () |
| Returns: how many segments the path portion this waypoint begins will be divided into; see set_num_segments() More... | |
Deprecated Functions | |
The following functions are deprecated as of DI-Guy 10 As these functions may disappear in a future version of DI-Guy, it is recommended that you replace calls to these functions from your application. | |
| void | set_x (float x) |
| This function is deprecated. More... | |
| float | get_x () |
| This function is deprecated. More... | |
| void | set_y (float y) |
| This function is deprecated. More... | |
| float | get_y () |
| This function is deprecated. More... | |
| void | set_z (float z) |
| This function is deprecated. More... | |
| float | get_z () |
| This function is deprecated. More... | |
| void | set_yaw_in (float yaw) |
| This function is deprecated. More... | |
| float | get_yaw_in () |
| This function is deprecated. More... | |
| void | set_yaw_out (float yaw) |
| This function is deprecated. More... | |
| float | get_yaw_out () |
| This function is deprecated. More... | |
| int | get_yaw_smooth () |
| This function is deprecated. More... | |
| void | set_yaw_smooth (int yaw_smooth) |
| This function is deprecated. More... | |
| float | get_yaw_offset () |
| This function is deprecated. More... | |
| void | set_yaw_offset (float yaw_offset) |
| This function is deprecated. More... | |
| void | set_roll_in (float roll) |
| This function is deprecated. More... | |
| float | get_roll_in () |
| This function is deprecated. More... | |
| void | set_roll_out (float roll) |
| This function is deprecated. More... | |
| float | get_roll_out () |
| This function is deprecated. More... | |
| int | get_roll_smooth () |
| This function is deprecated. More... | |
| void | set_roll_smooth (int roll_smooth) |
| This function is deprecated. More... | |
| float | get_roll_offset () |
| This function is deprecated. More... | |
| void | set_roll_offset (float roll_offset) |
| This function is deprecated. More... | |
| void | set_pitch_in (float pitch) |
| This function is deprecated. More... | |
| float | get_pitch_in () |
| This function is deprecated. More... | |
| void | set_pitch_out (float pitch) |
| This function is deprecated. More... | |
| float | get_pitch_out () |
| This function is deprecated. More... | |
| int | get_pitch_smooth () |
| This function is deprecated. More... | |
| void | set_pitch_smooth (int pitch_smooth) |
| This function is deprecated. More... | |
| float | get_pitch_offset () |
| This function is deprecated. More... | |
| void | set_pitch_offset (float pitch_offset) |
| This function is deprecated. More... | |
| int | get_distance_smooth () |
| This function is deprecated. More... | |
| void | set_distance_smooth (int distance_smooth) |
| This function is deprecated. More... | |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| bdiBeadWaypoint * | m_scripted_object |
| A pointer to internal data. More... | |
| class | diguyScenario |
| class | bdiBeadWaypoint |
| bdiBeadWaypoint * | get_scripted_object () |
| diguyWaypoint (bdiBeadWaypoint *waypoint) | |
| A private constructor. More... | |
| ~diguyWaypoint () | |
| A private destructor. More... | |
|
private |
A private constructor.
|
private |
A private destructor.
| const char* diguyWaypoint::get_name | ( | ) |
Returns the name of the object.
This pointer will never be NULL.
Returns:
name of the object
| long diguyWaypoint::get_uid | ( | ) |
All waypoints are assigned a unique identifier, or uid.
This function returns this waypoints's uid.
Note: unique identifiers will change between DI-Guy runs!
Returns:
unique identifier of object
| int diguyWaypoint::get_selected | ( | ) |
Returns: 1 if waypoint is selected in DI-Guy Scenario or DI-Guy Author, 0 if not.
| void diguyWaypoint::set_position | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
This function sets the x, y, z coordinates of the waypoint in meters.
Requires subsequent call to diguyCharacterPath::update() or diguyPathShape::update(). (See above.)
Returns:
x, y, z coordinate of waypoint in meters
| void diguyWaypoint::set_position_double | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Double precision version of set_position().
| void diguyWaypoint::get_position | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Returns: x, y, z coordinate of waypoint in meters.
| void diguyWaypoint::get_position_double | ( | double * | tx, |
| double * | ty, | ||
| double * | tz | ||
| ) |
Double precision version of get_position().
| void diguyWaypoint::set_orientation_in | ( | float | rz, |
| float | rx, | ||
| float | ry | ||
| ) |
Sets the orientation of the path entering the waypoint.
If the angles in and angles out are coupled (e.g., get_yaw_coupled() returns 1) this will set rz out, as well. The new angle out will be angle in plus the angle coupling offset.
Requires subsequent call to diguyCharacterPath::update() or diguyPathShape::update(). (See above.)
| rz,rx,ry | orientations in degrees |
| void diguyWaypoint::get_orientation_in | ( | float * | rz, |
| float * | rx, | ||
| float * | ry | ||
| ) |
Retrieves the orientation of the path entering the waypoint.
| rz,rx,ry | orientations in degrees counter-clockwise from the positive X axis |
| void diguyWaypoint::set_orientation_out | ( | float | rz, |
| float | rx, | ||
| float | ry | ||
| ) |
Equivalent to set_orientation_in(), but for the path exiting the waypoint.
| void diguyWaypoint::get_orientation_out | ( | float * | rz, |
| float * | rx, | ||
| float * | ry | ||
| ) |
Equivalent to get_orientation_in(), but for the path exiting the waypoint.
| void diguyWaypoint::set_yaw_coupled | ( | int | yaw_coupled | ) |
This function sets whether the yaw in and yaw out angles are coupled together.
In general, for paths to look smooth, the in and out angles should be coupled together with 0 coupling offset.
Requires subsequent call to diguyCharacterPath::update() or diguyPathShape::update(). (See above.)
| yaw_coupled | pass 1 to couple yaw in to yaw out |
| int diguyWaypoint::get_yaw_coupled | ( | ) |
Returns: whether the yaw in and yaw out angles are coupled together; see set_yaw_coupled()
| void diguyWaypoint::set_yaw_coupling_offset | ( | float | yaw_coupling_offset | ) |
This function sets by how much the yaw in and yaw out angles should be offset when they are coupled together.
Requires subsequent call to diguyCharacterPath::update() or diguyPathShape::update(). (See above.)
| yaw_coupling_offset | new yaw coupling offset, in degrees |
| float diguyWaypoint::get_yaw_coupling_offset | ( | ) |
Returns: the offset between yaw in and yaw out when the yaw angles are coupled together; see set_yaw_coupling_offset()
| void diguyWaypoint::set_roll_coupled | ( | int | roll_coupled | ) |
This function is the same as its yaw counterpart, but rotation is about the x axis.
| int diguyWaypoint::get_roll_coupled | ( | ) |
This function is the same as its yaw counterpart, but rotation is about the x axis.
| void diguyWaypoint::set_roll_coupling_offset | ( | float | roll_coupling_offset | ) |
This function is the same as its yaw counterpart, but rotation is about the x axis.
| float diguyWaypoint::get_roll_coupling_offset | ( | ) |
This function is the same as its yaw counterpart, but rotation is about the x axis.
| void diguyWaypoint::set_pitch_coupled | ( | int | pitch_coupled | ) |
This function is the same as its yaw counterpart, but rotation is about the y axis.
| int diguyWaypoint::get_pitch_coupled | ( | ) |
This function is the same as its yaw counterpart, but rotation is about the y axis.
| void diguyWaypoint::set_pitch_coupling_offset | ( | float | pitch_coupling_offset | ) |
This function is the same as its yaw counterpart, but rotation is about the y axis.
| float diguyWaypoint::get_pitch_coupling_offset | ( | ) |
This function is the same as its yaw counterpart, but rotation is about the y axis.
| void diguyWaypoint::set_weight_in | ( | float | weight_in | ) |
This function sets the weight of the control handle heading into the waypoint.
The weights of the waypoint set how long the "control handles" of the waypoint are, in meters. The longer the control handle, the more the path will be stretched in the direction of the waypoint's orientation.
If the weight in and weight out are coupled (get_weight_coupled() returns 1) this will set weight out, as well.
Requires subsequent call to diguyCharacterPath::update() or diguyPathShape::update(). (See above.)
| float diguyWaypoint::get_weight_in | ( | ) |
Returns: weight heading into the waypoint, in meters; see set_weight_in()
| void diguyWaypoint::set_weight_out | ( | float | weight_out | ) |
Similar to set_weight_in(), but for the outgoing weight.
| float diguyWaypoint::get_weight_out | ( | ) |
Returns: weight heading out of the waypoint, in meters; see set_weight_out().
| void diguyWaypoint::set_weight_coupled | ( | int | weight_coupled | ) |
This function sets whether the weight in and weight out are coupled together.
If this waypoint is part of a diguyCharacterPath or diguyPathShape, the diguyCharacterPath::update() or diguyPathShape::update() function must be called for changes to take effect.
| int diguyWaypoint::get_weight_coupled | ( | ) |
Returns: whether the weight in and weight out are coupled together; see set_weight_coupled()
| void diguyWaypoint::get_control_point_in_position | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
This function returns the world position of the control point heading into the waypoint.
This is derived from the waypoint's position, orientation in, and the weights of the in control bar.
| void diguyWaypoint::get_control_point_out_position | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Similar to get_control_point_in_position(), but for out control point.
| void diguyWaypoint::get_forward_normal_in | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
This function returns the normal vector of the control bar heading into the waypoint.
| void diguyWaypoint::get_left_normal_in | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Similar to get_forward_normal_in(), but for left normal.
| void diguyWaypoint::get_up_normal_in | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Similar to get_out_normal_in(), but for up normal.
| void diguyWaypoint::get_forward_normal_out | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Similar to get_forward_normal_in(), but for out control bar.
| void diguyWaypoint::get_left_normal_out | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Similar to get_left_normal_in(), but for out control bar.
| void diguyWaypoint::get_up_normal_out | ( | float * | x, |
| float * | y, | ||
| float * | z | ||
| ) |
Similar to get_up_normal_in(), but for out control bar.
| void diguyWaypoint::set_num_segments | ( | int | num_segments | ) |
This function sets how many segments the path portion this waypoint begins will be divided into.
This is strictly for visualization purposes only and will have no functional effect.
If this waypoint is part of a diguyCharacterPath or diguyPathShape, the diguyCharacterPath::update() or diguyPathShape::update() function must be called for changes to take effect.
| num_segments | number of segments to divide path portion into; default is 64 |
| int diguyWaypoint::get_num_segments | ( | ) |
Returns: how many segments the path portion this waypoint begins will be divided into; see set_num_segments()
| void diguyWaypoint::set_x | ( | float | x | ) |
This function is deprecated.
Use set_position() instead.
| float diguyWaypoint::get_x | ( | ) |
This function is deprecated.
Use get_position() instead.
| void diguyWaypoint::set_y | ( | float | y | ) |
This function is deprecated.
Use set_position() instead.
| float diguyWaypoint::get_y | ( | ) |
This function is deprecated.
Use get_position() instead.
| void diguyWaypoint::set_z | ( | float | z | ) |
This function is deprecated.
Use set_position() instead.
| float diguyWaypoint::get_z | ( | ) |
This function is deprecated.
Use get_position() instead.
| void diguyWaypoint::set_yaw_in | ( | float | yaw | ) |
This function is deprecated.
Use set_orientation_in() instead.
| float diguyWaypoint::get_yaw_in | ( | ) |
This function is deprecated.
Use get_orientation_in() instead.
| void diguyWaypoint::set_yaw_out | ( | float | yaw | ) |
This function is deprecated.
Use set_orientation_out() instead.
| float diguyWaypoint::get_yaw_out | ( | ) |
This function is deprecated.
Use get_orientation_out() instead.
| int diguyWaypoint::get_yaw_smooth | ( | ) |
This function is deprecated.
Use get_yaw_coupled() instead.
| void diguyWaypoint::set_yaw_smooth | ( | int | yaw_smooth | ) |
This function is deprecated.
Use set_yaw_coupled() instead.
| float diguyWaypoint::get_yaw_offset | ( | ) |
This function is deprecated.
Use get_yaw_coupling_offset() instead.
| void diguyWaypoint::set_yaw_offset | ( | float | yaw_offset | ) |
This function is deprecated.
Use set_yaw_coupling_offset() instead.
| void diguyWaypoint::set_roll_in | ( | float | roll | ) |
This function is deprecated.
Use set_orientation_in() instead.
| float diguyWaypoint::get_roll_in | ( | ) |
This function is deprecated.
Use get_orientation_in() instead.
| void diguyWaypoint::set_roll_out | ( | float | roll | ) |
This function is deprecated.
Use set_orientation_out() instead.
| float diguyWaypoint::get_roll_out | ( | ) |
This function is deprecated.
Use get_orientation_out() instead.
| int diguyWaypoint::get_roll_smooth | ( | ) |
This function is deprecated.
Use get_roll_coupled() instead.
| void diguyWaypoint::set_roll_smooth | ( | int | roll_smooth | ) |
This function is deprecated.
Use set_roll_coupled() instead.
| float diguyWaypoint::get_roll_offset | ( | ) |
This function is deprecated.
Use get_roll_coupling_offset() instead.
| void diguyWaypoint::set_roll_offset | ( | float | roll_offset | ) |
This function is deprecated.
Use set_roll_coupling_offset() instead.
| void diguyWaypoint::set_pitch_in | ( | float | pitch | ) |
This function is deprecated.
Use set_orientation_in() instead.
| float diguyWaypoint::get_pitch_in | ( | ) |
This function is deprecated.
Use get_orientation_in() instead.
| void diguyWaypoint::set_pitch_out | ( | float | pitch | ) |
This function is deprecated.
Use set_orientation_out() instead.
| float diguyWaypoint::get_pitch_out | ( | ) |
This function is deprecated.
Use get_orientation_out() instead.
| int diguyWaypoint::get_pitch_smooth | ( | ) |
This function is deprecated.
Use get_pitch_coupled() instead.
| void diguyWaypoint::set_pitch_smooth | ( | int | pitch_smooth | ) |
This function is deprecated.
Use set_pitch_coupled() instead.
| float diguyWaypoint::get_pitch_offset | ( | ) |
This function is deprecated.
Use get_pitch_coupling_offset() instead.
| void diguyWaypoint::set_pitch_offset | ( | float | pitch_offset | ) |
This function is deprecated.
Use get_pitch_coupling_offset() instead.
| int diguyWaypoint::get_distance_smooth | ( | ) |
This function is deprecated.
Use get_weight_coupled() instead.
| void diguyWaypoint::set_distance_smooth | ( | int | distance_smooth | ) |
This function is deprecated.
Use set_weight_coupled() instead.
|
inline |
|
friend |
|
friend |
|
private |
A pointer to internal data.