
|
|
This file was automatically generated from diguyPathShape.h. Do not edit this file directly; the changes will be lost.Includes: declspec_diguy.h
Contents:
Alphabetical IndexLink against: libdiguy
class diguyPathShape
|
class BDI_DECLSPEC_diguy diguyPathShape { public: const char* get_name(); int set_name(const char* name); long get_uid(); int set_clamp_at_end_flag(int value); int get_clamp_at_end_flag(); int update(); float get_length(); int get_point_at_distance(float distance_into_path_shape, float* x, float* y, float* z, float* rz, float* rx, float* ry); int get_num_waypoints(); diguyWaypoint* get_waypoint_at_index(int index); diguyWaypoint* create_waypoint(float x = 0.0f, float y = 0.0f, float z = 0.0f, float yaw = 0.0f, float roll = 0.0f, float pitch = 0.0f, float weight = 1.0f, int index = -1); int add_waypoint(diguyWaypoint* waypoint); void set_use_as_navmesh_portal(int use_as_portal); int get_use_as_navmesh_portal(); void set_one_way_portal(int one_way); int get_one_way_portal(); int translate(float tx, float ty, float tz); int rotate_about_point(float rz, float rx, float ry, float rotation_pt_x, float rotation_pt_y, float rotation_pt_z); int set_ground_clamp_when_on_path(int ground_clamp_when_on_path); int get_ground_clamp_when_on_path();
function diguyPathShape::get_name |
Prototype:
Description:const char* get_name();
Returns the name of the path shape. This pointer will never be NULL.Returns:
name of the path shapeCallable From:
- C++
- Script
function diguyPathShape::set_name |
Prototype:
Description:int set_name(const char* name);
This function sets the name of this object.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyPathShape::get_uid |
Prototype:
Description:long get_uid();
All path shapes are assigned a unique identifier, or uid. This function returns this path shape's uid.
Note: unique identifiers will change between DI-Guy runs!Returns:
unique identifier of objectCallable From:
- C++
- Script
function diguyPathShape::set_clamp_at_end_flag |
Prototype:
Description:int set_clamp_at_end_flag(int value);
This function determines what happens to objects following this path when they reach the end.
If 1, the object is restricted to stay at the end of the path.
If 0, the object will wrap to the beginning of the path.Arguments:
Returns:
value 1 to clamp, 0 to wrap
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyPathShape::get_clamp_at_end_flag |
Prototype:
Returns:int get_clamp_at_end_flag();
most recent setting of set_clamp_at_end_flag().
function diguyPathShape::update |
Prototype:
Description:int update();
This function should be called after all modifications have been made to the path shape and its waypoints and it is time to re-derive the overall path shape.
This update is deferred for reasons of performance; if there are a lot of modifications to be made to the path shape they can all be done in a group with only a single final update.
A call to update() is typically required after certain calls are made on objects owned by the path, such as a diguyWaypoint. The documentation for function calls of these objects will state whether a subsequent update() call is necessary.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyPathShape::get_length |
Prototype:
Description:float get_length();
This function returns the total length of the path shape, in meters.Returns:
length of path shape in metersCallable From:
- C++
- Script
function diguyPathShape::get_point_at_distance |
Prototype:
Description:int get_point_at_distance(float distance_into_path_shape, float* x, float* y, float* z, float* rz, float* rx, float* ry);
This function returns, via the passed variable pointers, the position and orientation of the point on the path shape at the specified distance.Arguments:
Returns:
distance_into_path_shape distance in meters into path shape of the desired point x, y, z position of point in meters from the origin rz, rx, ry orientation of point in degrees counter-clockwise from the positive X axis
0 on success, -1 on failureCallable From:
- C++
- Script
| Waypoint Functions |
function diguyPathShape::get_num_waypoints |
Prototype:
Returns:int get_num_waypoints();
the number of waypoints belonging to this path shapeCallable From:
- C++
- Script
function diguyPathShape::get_waypoint_at_index |
Prototype:
Description:diguyWaypoint* get_waypoint_at_index(int index);
This function gets the waypoint at the specified index and returns a pointer to it. The returned waypoint can then be queried for information or modified.
Note that if the waypoint is modified, the update() function must be called to update the path shape.Arguments:
Returns:
index index of the waypoint; indices start at 0
pointer of type diguyWaypoint; NULL if no waypoint at the specified indexCallable From:
- C++
- Script
function diguyPathShape::create_waypoint |
Prototype:
Description:diguyWaypoint* create_waypoint(float x = 0.0f, float y = 0.0f, float z = 0.0f, float yaw = 0.0f, float roll = 0.0f, float pitch = 0.0f, float weight = 1.0f, int index = -1);
This function creates a new waypoint that is added to the path shape. Do not call diguyScenario::destroy_waypoint() on the returned waypoint; it will be destroyed automatically with the path shape.Arguments:
Returns:
tx, ty, tz position in meters from the origin rz, rx, ry orientations in degrees counter-clockwise from the positive X axis weight how much influence this waypoint exerts over the path curve index where the waypoint should be inserted in the path shape; indices start at 0; pass -1 to add to end of path shape
pointer to type diguyWaypointCallable From:
- C++
- Script
function diguyPathShape::add_waypoint |
Prototype:
Description:int add_waypoint(diguyWaypoint* waypoint);
This function adds a waypoint to the path shape.
The waypoint should be created using the function diguyScenario::create_waypoint(), and destroyed using the function diguyScenario::destroy_waypoint().
An internal copy of the waypoint is made, so it can be destroyed right after this function call or used for other path shapes.Arguments:
Returns:
waypoint waypoint to be appended to end of path
0 on success, -1 on failureCallable From:
- C++
- Script
| Navmesh Functions |
function diguyPathShape::set_use_as_navmesh_portal |
Prototype:
Description:void set_use_as_navmesh_portal(int use_as_portal);
This function tells the Navmesh regions to use this path as a connection between two regions. The Navmesh should automatically choose the regions closest to the start and end points of the path. By default this functionality is off, but once activated it's assumed to be a two way connection.Arguments:
Callable From:
use_as_portal 1 to use as a connection, 0 to not
- C++
- Script
function diguyPathShape::get_use_as_navmesh_portal |
Prototype:
Description:int get_use_as_navmesh_portal();
This function returns if the path is being used as a connection between two regions.
Callable From:
1 if is a connection, 0 if not
- C++
- Script
function diguyPathShape::set_one_way_portal |
Prototype:
Description:void set_one_way_portal(int one_way);
This function tells the Navmesh regions to use this path as a one way connection between two regions. Defaults to 0 (two way connection)Arguments:
Callable From:
one_way 1 to set as one way connection, 0 to set as bidirectional
- C++
- Script
function diguyPathShape::get_one_way_portal |
Prototype:
Description:int get_one_way_portal();
This function returns if the path is being used as a one way connection between two regions.
Callable From:
1 if is one way connection, 0 if two way
- C++
- Script
| Experimental Functions |
The following functions are experimental and may change or disappear with no warning.
function diguyPathShape::translate |
Prototype:
int translate(float tx, float ty, float tz);
function diguyPathShape::rotate_about_point |
Prototype:
int rotate_about_point(float rz, float rx, float ry, float rotation_pt_x, float rotation_pt_y, float rotation_pt_z);
function diguyPathShape::set_ground_clamp_when_on_path |
Prototype:
int set_ground_clamp_when_on_path(int ground_clamp_when_on_path);
function diguyPathShape::get_ground_clamp_when_on_path |
Prototype:
int get_ground_clamp_when_on_path();
ALL RIGHTS RESERVED.
These coded instructions, statements, and computer programs contain unpublished proprietary information of Boston Dynamics and are protected by Copyright Laws of the United States. They may not be used, duplicated, or disclosed in any form, in whole or in part, without the prior written consent from Boston Dynamics.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Sofware clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished-rights reserved under the Copyright Laws of the United States.
Contractor/Manufacturer is:
Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.