diguyPathShape

Generated from diguyPathShape.h

DI-Guy API Version 12.5.1

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 Index

Link 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:

const char* get_name();
Description:

Returns the name of the path shape. This pointer will never be NULL.

Returns:

name of the path shape

Callable From:

function diguyPathShape::set_name

Prototype:

int set_name(const char* name);
Description:

This function sets the name of this object.

Returns:

0 on success, -1 on failure

Callable From:

function diguyPathShape::get_uid

Prototype:

long get_uid();
Description:

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 object

Callable From:

function diguyPathShape::set_clamp_at_end_flag

Prototype:

int set_clamp_at_end_flag(int value);
Description:

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:

value1 to clamp, 0 to wrap
Returns:

0 on success, -1 on failure

Callable From:

function diguyPathShape::get_clamp_at_end_flag

Prototype:

int get_clamp_at_end_flag();
Returns:

most recent setting of set_clamp_at_end_flag().

function diguyPathShape::update

Prototype:

int update();
Description:

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 failure

Callable From:

function diguyPathShape::get_length

Prototype:

float get_length();
Description:

This function returns the total length of the path shape, in meters.

Returns:

length of path shape in meters

Callable From:

function diguyPathShape::get_point_at_distance

Prototype:

int get_point_at_distance(float distance_into_path_shape,
    float* x, float* y, float* z,
    float* rz, float* rx, float* ry);
Description:

This function returns, via the passed variable pointers, the position and orientation of the point on the path shape at the specified distance.

Arguments:

distance_into_path_shapedistance in meters into path shape of the desired point
x, y, z position of point in meters from the origin
rz, rx, ryorientation of point in degrees counter-clockwise from the positive X axis
Returns:

0 on success, -1 on failure

Callable From:

Waypoint Functions

function diguyPathShape::get_num_waypoints

Prototype:

int get_num_waypoints();
Returns:

the number of waypoints belonging to this path shape

Callable From:

function diguyPathShape::get_waypoint_at_index

Prototype:

diguyWaypoint* get_waypoint_at_index(int index);
Description:

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:

indexindex of the waypoint; indices start at 0
Returns:

pointer of type diguyWaypoint; NULL if no waypoint at the specified index

Callable From:

function diguyPathShape::create_waypoint

Prototype:

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);
Description:

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:

tx, ty, tzposition in meters from the origin
rz, rx, ryorientations 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
Returns:

pointer to type diguyWaypoint

Callable From:

function diguyPathShape::add_waypoint

Prototype:

int add_waypoint(diguyWaypoint* waypoint);
Description:

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:

waypointwaypoint to be appended to end of path
Returns:

0 on success, -1 on failure

Callable From:

Navmesh Functions

function diguyPathShape::set_use_as_navmesh_portal

Prototype:

void set_use_as_navmesh_portal(int use_as_portal);
Description:

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:

use_as_portal1 to use as a connection, 0 to not
Callable From:

function diguyPathShape::get_use_as_navmesh_portal

Prototype:

int get_use_as_navmesh_portal();
Description:

This function returns if the path is being used as a connection between two regions.

1 if is a connection, 0 if not
Callable From:

function diguyPathShape::set_one_way_portal

Prototype:

void set_one_way_portal(int one_way);
Description:

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:

one_way1 to set as one way connection, 0 to set as bidirectional
Callable From:

function diguyPathShape::get_one_way_portal

Prototype:

int get_one_way_portal();
Description:

This function returns if the path is being used as a one way connection between two regions.

1 if is one way connection, 0 if two way
Callable From:

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();

Alphabetical Index




Copyright (C) 1992-2012 Boston Dynamics

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.