diguyViewCamera Class Declaration

diguyViewCamera.h

DI-Guy API Version 5.1.26

This file was automatically generated from comments in the C/C++ header file diguyViewCamera.h. Do not edit this file directly; the changes will be lost. Please mail suggestions or corrections to diguy@bdi.com

Alphabetical Index

Includes: diguy_constants.h | declspec_diguy.h

class diguyViewCamera

class BDI_DECLSPEC_diguy diguyViewCamera
{
public:
    const char* get_name();
    const char* get_type_name();
    int load_settings(const char* settings_name);
    int load_settings(diguyViewCameraSettings* settings);
    void apply_settings();
    void set_near_plane(float near_plane);
    void set_far_plane(float far_plane);
    void set_fov(float fov);
    float get_near_plane();
    float get_far_plane();
    float get_fov();
    void set_aspect(float aspect);
    float get_aspect();
    void set_position(float x, float y, float z);
    float get_position_x();
    float get_position_y();
    float get_position_z();
    void set_orientation(float yaw, float roll, float pitch);
    void set_orientation_roll(float r);
    float get_orientation_yaw();
    float get_orientation_roll();
    float get_orientation_pitch();
    void set_distance(float distance);
    float get_distance();
    void set_fix(float x, float y, float z);
    float get_fix_x();
    float get_fix_y();
    float get_fix_z();
    void set_track_name(const char* track_name);
    const char* get_track_name();
    void set_dolly_name(const char* dolly_name);
    const char* get_dolly_name();
    void set_track_link_name(const char* track_link_name);
    const char* get_track_link_name();
    void set_track_offset(float x, float y, float z);
    float get_track_offset_x();
    float get_track_offset_y();
    float get_track_offset_z();
    void set_track_offset_is_in_world_coordinates(int value);
    int get_track_offset_is_in_world_coordinates();
    void set_dolly_offset(float x, float y, float z);
    float get_dolly_offset_x();
    float get_dolly_offset_y();
    float get_dolly_offset_z();
    void set_dolly_offset_is_in_world_coordinates(int value);
    int get_dolly_offset_is_in_world_coordinates();
    diguyViewCameraMoveMode get_move_mode();
    int set_move_mode(diguyViewCameraMoveMode move_mode);
    diguyViewCameraProjectionMode get_projection_mode();
    int set_projection_mode(diguyViewCameraProjectionMode projection_mode);
    float get_speed();
    int set_speed(float speed);
    int increase_speed();
    int decrease_speed();
    void set_dolly_link_name(const char* dolly_link_name);
    const char* get_dolly_link_name();
    enum {
        CALLBACK_ID_SETTINGS_CHANGED = 1
    };
#ifdef CPLUSPLUS_ONLY
    int add_callback(int callback_id,
        diguyViewCameraCallback* callback,
        void* callback_params = 0,
        void* callback_user_data = 0);
    int remove_callback(int callback_id,
        diguyViewCameraCallback* callback);
    int remove_callback_with_user_data(int callback_id,
        void* callback_user_data);
#endif
    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);
    bdiCamera* get_scripted_object() {return m_camera;}
};

function diguyViewCamera::get_name

Prototype:

const char* get_name();
Description:

Returns the name of the object. This pointer will never be NULL.

C++, Perl

Returns:

name of the object

function diguyViewCamera::get_type_name

Prototype:

const char* get_type_name();
Description:

Returns the type name of the object. This pointer will never be NULL.

Returns:

type name of the object

Callable From:

function diguyViewCamera::load_settings

Prototype:

int load_settings(const char* settings_name);
Description:

Loads the specified settings into this camera.

C++, Perl

Returns:

0 on success, -1 on failure

function diguyViewCamera::load_settings

Prototype:

int load_settings(diguyViewCameraSettings* settings);
Description:

Loads the specified settings into this camera.

C++, Perl

Returns:

0 on success, -1 on failure

function diguyViewCamera::apply_settings

Prototype:

void apply_settings();
Description:

This function applies this camera's settings.

function diguyViewCamera::set_near_plane

Prototype:

void set_near_plane(float near_plane);
Description:

This sets the distance from this camera to the near plane.

Arguments:

near_planedistance to near plane, in meters

function diguyViewCamera::set_far_plane

Prototype:

void set_far_plane(float far_plane);
Description:

This sets the distance from this camera to the far plane.

Arguments:

far_planedistance to far plane, in meters

function diguyViewCamera::set_fov

Prototype:

void set_fov(float fov);
Description:

This sets the field-of-view of the current camera.

Arguments:

fovfield-of-view, in degrees

function diguyViewCamera::get_near_plane

Prototype:

float get_near_plane();
Returns:

distance from this camera to the near plane, in meters

function diguyViewCamera::get_far_plane

Prototype:

float get_far_plane();
Returns:

distance from this camera to the far plane, in meters

function diguyViewCamera::get_fov

Prototype:

float get_fov();
Returns:

field-of-view of this camera, in degrees

function diguyViewCamera::set_aspect

Prototype:

void set_aspect(float aspect);
Description:

This function sets the aspect ratio of this camera.

function diguyViewCamera::get_aspect

Prototype:

float get_aspect();
Returns:

aspect ratio of this camera

function diguyViewCamera::set_position

Prototype:

void set_position(float x, float y, float z);
Description:

This function sets the position of this camera.

Arguments:

xx position, in meters
yy position, in meters
zz position, in meters

function diguyViewCamera::get_position_x

Prototype:

float get_position_x();
Returns:

position in x, in meters

function diguyViewCamera::get_position_y

Prototype:

float get_position_y();
Returns:

position in y, in meters

function diguyViewCamera::get_position_z

Prototype:

float get_position_z();
Returns:

position in z, in meters

function diguyViewCamera::set_orientation

Prototype:

void set_orientation(float yaw, float roll, float pitch);
Description:

This function sets the orientation of this camera. Note that this affects the fix.

Arguments:

yaw rotation about z axis, in degrees
roll rotation about x axis, in degrees
pitchrotation about y axis, in degrees

function diguyViewCamera::set_orientation_roll

Prototype:

void set_orientation_roll(float r);
Description:

This function sets the roll of this camera.

Arguments:

rrotation about x axis, in degrees

function diguyViewCamera::get_orientation_yaw

Prototype:

float get_orientation_yaw();
Returns:

rotation about z axis, in degrees

function diguyViewCamera::get_orientation_roll

Prototype:

float get_orientation_roll();
Returns:

rotation about x axis, in degrees

function diguyViewCamera::get_orientation_pitch

Prototype:

float get_orientation_pitch();
Returns:

rotation about y axis, in degrees

function diguyViewCamera::set_distance

Prototype:

void set_distance(float distance);
Description:

This function sets the distance from the position to the fix point. Note that this affects the fix.

Arguments:

distancedistance in meters

function diguyViewCamera::get_distance

Prototype:

float get_distance();
Returns:

distance from position to fix point, in meters

function diguyViewCamera::set_fix

Prototype:

void set_fix(float x, float y, float z);
Description:

This function sets the fix point of this camera. Note that this affects the orientation.

Arguments:

xx position, in meters
yy position, in meters
zz position, in meters

function diguyViewCamera::get_fix_x

Prototype:

float get_fix_x();
Returns:

fix point in x, in meters

function diguyViewCamera::get_fix_y

Prototype:

float get_fix_y();
Returns:

fix point in y, in meters

function diguyViewCamera::get_fix_z

Prototype:

float get_fix_z();
Returns:

fix point in z, in meters

function diguyViewCamera::set_track_name

Prototype:

void set_track_name(const char* track_name);
Description:

This function sets the name of the entity this camera should look at, if such an entity can be found. This will cause fix values to change over time.

Arguments:

track_namename of entity to look at, or NULL if no entity is to be tracked

function diguyViewCamera::get_track_name

Prototype:

const char* get_track_name();
Returns:

name of entity to be looked at; see set_track_name()

function diguyViewCamera::set_dolly_name

Prototype:

void set_dolly_name(const char* dolly_name);
Description:

This function sets the name of the entity this camera should look from, if such an entity can be found. This will cause position values to change over time.

Arguments:

dolly_namename of entity to look from, or NULL if no entity is to influence camera position

function diguyViewCamera::get_dolly_name

Prototype:

const char* get_dolly_name();
Returns:

name of entity to be looked from; see set_dolly_name()

function diguyViewCamera::set_track_link_name

Prototype:

void set_track_link_name(const char* track_link_name);
Description:

This function sets the name of the link to be tracked on the entity specified by set_track_name().

Arguments:

track_link_namename of link to look at, or NULL if the base link is to be tracked

function diguyViewCamera::get_track_link_name

Prototype:

const char* get_track_link_name();
Returns:

name of link to be looked at; see set_track_link_name()

function diguyViewCamera::set_track_offset

Prototype:

void set_track_offset(float x, float y, float z);

function diguyViewCamera::get_track_offset_x

Prototype:

float get_track_offset_x();

function diguyViewCamera::get_track_offset_y

Prototype:

float get_track_offset_y();

function diguyViewCamera::get_track_offset_z

Prototype:

float get_track_offset_z();

function diguyViewCamera::set_track_offset_is_in_world_coordinates

Prototype:

void set_track_offset_is_in_world_coordinates(int value);

function diguyViewCamera::get_track_offset_is_in_world_coordinates

Prototype:

int get_track_offset_is_in_world_coordinates();

function diguyViewCamera::set_dolly_offset

Prototype:

void set_dolly_offset(float x, float y, float z);

function diguyViewCamera::get_dolly_offset_x

Prototype:

float get_dolly_offset_x();

function diguyViewCamera::get_dolly_offset_y

Prototype:

float get_dolly_offset_y();

function diguyViewCamera::get_dolly_offset_z

Prototype:

float get_dolly_offset_z();

function diguyViewCamera::set_dolly_offset_is_in_world_coordinates

Prototype:

void set_dolly_offset_is_in_world_coordinates(int value);

function diguyViewCamera::get_dolly_offset_is_in_world_coordinates

Prototype:

int get_dolly_offset_is_in_world_coordinates();

function diguyViewCamera::get_move_mode

Prototype:

diguyViewCameraMoveMode get_move_mode();

function diguyViewCamera::set_move_mode

Prototype:

int set_move_mode(diguyViewCameraMoveMode move_mode);

function diguyViewCamera::get_projection_mode

Prototype:

diguyViewCameraProjectionMode get_projection_mode();

function diguyViewCamera::set_projection_mode

Prototype:

int set_projection_mode(diguyViewCameraProjectionMode projection_mode);

function diguyViewCamera::get_speed

Prototype:

float get_speed();

function diguyViewCamera::set_speed

Prototype:

int set_speed(float speed);

function diguyViewCamera::increase_speed

Prototype:

int increase_speed();

function diguyViewCamera::decrease_speed

Prototype:

int decrease_speed();

function diguyViewCamera::set_dolly_link_name

Prototype:

void set_dolly_link_name(const char* dolly_link_name);
Description:

This function sets the name of the link to be dollied on the entity specified by set_dolly_name().

Arguments:

dolly_link_namename of link to look from, or NULL if the base link is to influence camera position

function diguyViewCamera::get_dolly_link_name

Prototype:

const char* get_dolly_link_name();
Returns:

name of link to be looked from; see set_dolly_link_name()

enumeration

	enum {
		CALLBACK_ID_SETTINGS_CHANGED = 1
	};
Description:

This is an enumeration of the different callbacks that can be registered with add_callback() and add_callback_script().

Usable From:

function diguyViewCamera::add_callback

Prototype:

int add_callback(int callback_id,
		diguyViewCameraCallback* callback,
		void* callback_params = 0,
		void* callback_user_data = 0);
Description:

This function adds a user callback.

Arguments:

callback pointer to function with prototype diguyViewCameraCallback (typedefed above)
callback_id integer id of when this callback is to be called
callback_paramsstruct containing additional parameters needed by some callbacks; actual type depends on callback_id
callback_user_datapointer for user's own use; DI-Guy will do nothing to the contents of this pointer beyond passing it back when the callback is invoked
callback_id should be one of the following values:

CALLBACK_ID_SETTINGS_CHANGED

This callback will be called if the current settings of this camera change

Callbacks return a value of type diguyCallbackReturn, which will be DIGUY_CALLBACK_STOP or DIGUY_CALLBACK_CONTINUE. If the callback returns DIGUY_CALLBACK_STOP, the default handler of the function will not be called; the callback is asserting that it has done everything necessary for the function call. If the callback returns DIGUY_CALLBACK_CONTINUE, the default handler for the function will be called after the callback.

Returns:

0 on success, -1 on failure

C++

Returns:

0 on success, -1 on failure

function diguyViewCamera::remove_callback

Prototype:

int remove_callback(int callback_id,
		diguyViewCameraCallback* callback);

function diguyViewCamera::remove_callback_with_user_data

Prototype:

int remove_callback_with_user_data(int callback_id,
		void* callback_user_data);

Experimental Functions

The following functions are experimental and may change or disappear with no warning.

function diguyViewCamera::add_callback_script

Prototype:

int add_callback_script(int callback_id,
		const char* callback_script,
		const char* callback_script_type = NULL);

function diguyViewCamera::remove_callback_script

Prototype:

int remove_callback_script(int callback_id,
		const char* callback_script,
		const char* callback_script_type = NULL);

function diguyViewCamera::get_scripted_object

Prototype:

bdiCamera* get_scripted_object();

Alphabetical Index


Copyright (C) 1992-2003

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/515 Massachusetts Avenue/Cambridge MA 02139.