diguySceneObject

Generated from diguySceneObject.h

DI-Guy API Version 12.5.1

This file was automatically generated from diguySceneObject.h. Do not edit this file directly; the changes will be lost.
Includes: declspec_diguy.h | diguy_constants.h

Contents:

Alphabetical Index

Link against: libdiguy

class diguySceneObject

class BDI_DECLSPEC_diguy diguySceneObject
{
public:
    const char* get_name();
    int set_name(const char* name);
    long get_uid();
    const char* get_filename();
    const char* get_nodename();
    const char* get_alternate_filename();
    const char* get_fully_resolved_filename();
    int show();
    int hide();
    int add_vertex_to_user_defined(float x, float y, float z);
    int add_triangle_to_user_defined(int index0, int index1, int index2);
#ifdef CPLUSPLUS_ONLY
    int add_vertex_array_to_user_defined(const float* const vertices, 
        int num_vertices, int skipBytes = 12);
    int add_triangle_array_to_user_defined(const int* const indices, int num_indices);
    int add_triangle_to_user_defined(const float* const pos0,
        const float* const pos1, const float* const pos2);
#endif
    int build_user_defined();
    int set_render_mode_shader(const char* shader_name,
        const char* render_mode = NULL);
    void reset_render_mode_shader_to_default(const char* render_mode = NULL);
    const char* get_render_mode_shader(const char* render_mode = NULL);
    diguyGraphicsShaderProgram* get_shader_program();
    diguyGraphicsShaderTechnique* get_shader_technique();
    int set_temporary_current_shader(const char* shader_name);
    void reset_current_shader_to_default();
    diguyGraphicsShaderInstance* get_shader_instance();
    void reset_shader_instance_variables_to_initial_values();
    void reset_shader_instance_variables_to_program_defaults();
    int set_switch_state(const char* switch_name,
        int state);
    int get_switch_state(const char* switch_name);
    int set_dof_state(const char* dof_name,
        float tx, float ty, float tz,
        float rz, float rx, float ry);
    int set_dof_state_flt(const char* dof_name,
        float tx, float ty, float tz,
        float rx, float ry, float rz);
    int get_dof_state(const char* dof_name,
        float* tx, float* ty, float* tz,
        float* rz, float* rx, float* ry);
    int get_dof_state_flt(const char* dof_name,
        float* tx, float* ty, float* tz,
        float* rx, float* ry, float* rz);
    int add_switch_target(const char* switch_name,
        int state,
        float t);
    int abort_all_switch_targets(const char* switch_name);
    int add_dof_target(const char* dof_name,
        float tx, float ty, float tz,
        float rz, float rx, float ry,
        float blend_tin, float blend_tout,
        const char* blend_function_name = 0);
    int add_dof_target_flt(const char* dof_name,
        float tx, float ty, float tz,
        float rx, float ry, float rz,
        float blend_tin, float blend_tout,
        const char* blend_function_name = 0);
    int abort_all_dof_targets(const char* dof_name);
    int set_shader_program(const char* shader_name);
    int set_position(float x, float y, float z);
    int get_position(float* x, float* y, float* z);
    int set_orientation(float rz, float rx, float ry);
    int get_orientation(float* rz, float* rx, float* ry);
    int set_scale(float sx, float sy, float sz);
    int get_scale(float* sx, float* sy, float* sz);
    int set_filename(const char* file_name);
    int get_is_sky_box();
    int set_is_sky_box(int skybox);
    static int set_texture_load_behavior(diguyGraphicsTextureLoadingBehavior mode);
    static diguyGraphicsTextureLoadingBehavior get_texture_load_behavior();
#ifdef CPLUSPLUS_ONLY
    int draw_visual();
#endif
    int get_include_in_octtree();
    int set_include_in_octtree(int val);
    int set_include_in_physics_sim_scene(int include_in_simulation_terrain);
    int get_include_in_physics_sim_scene();
    int set_physics_collision_group(diguyPhysicsCollisionGroup collision_group);
    diguyPhysicsCollisionGroup get_physics_collision_group();
    int get_min(float* x, float* y, float* z);
    int get_max(float* x, float* y, float* z);
    void set_scene_graph_mask(unsigned int mask);
    unsigned int get_scene_graph_mask();
    int get_enabled();
    int set_enabled(int enabled);
    int get_visible();
    int set_visible(int visible);

function diguySceneObject::get_name

Prototype:

const char* get_name();
Description:

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

Returns:

name of the scene object

Callable From:

function diguySceneObject::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 diguySceneObject::get_uid

Prototype:

long get_uid();
Description:

All scene objects are assigned a unique identifier, or uid. This function returns this scene object's uid.

Note: unique identifiers will change between DI-Guy runs!

Returns:

unique identifier of object

Callable From:

function diguySceneObject::get_filename

Prototype:

const char* get_filename();
Description:

Returns the filename of the scene object. This pointer will never be NULL.

The returned filename may be relative to another directory, such as $DIGUYgeometrysets. Call get_fully_resolved_filename() to have DI-Guy search for the fully resolved filename.

Returns:

filename of the scene object

Callable From:

function diguySceneObject::get_nodename

Prototype:

const char* get_nodename();
Returns:

node within the scene object file; returned string is 0 length if contents of entire file should be used

Callable From:

function diguySceneObject::get_alternate_filename

Prototype:

const char* get_alternate_filename();
Returns:

alternate filename of the scene object

Callable From:

function diguySceneObject::get_fully_resolved_filename

Prototype:

const char* get_fully_resolved_filename();
Description:

Returns the fully resolved filename of the scene object. Returns NULL if the file cannot be found.

Returns:

fully resolved filename of the scene object; NULL if not found

Callable From:

function diguySceneObject::show

Prototype:

int show();
Description:

Attempts to load the file returned by get_filename() and construct an object that can be rendered in the current graphics environment by the call draw_visual().

Returns:

0 on success, -1 on failure

OpenGL Version:

Function will create OpenGL display lists.

Direct3D Version:

Function will have no effect. User must load and display object.

Callable From:

function diguySceneObject::hide

Prototype:

int hide();
Description:

Hides the scene object. See show() for notes on which platforms do not yet display scene objects.

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::add_vertex_to_user_defined

Prototype:

int add_vertex_to_user_defined(float x, float y, float z);
Description:

Adds a vertex to a user defined scene object.

Returns:

0 on success, -1 on failure

function diguySceneObject::add_triangle_to_user_defined

Prototype:

int add_triangle_to_user_defined(int index0, int index1, int index2);
Description:

Adds a triangle to a user defined scene object. Indices refer to vertices added with a add_vertex_* call.

Returns:

0 on success, -1 on failure

function diguySceneObject::add_vertex_array_to_user_defined

Prototype:

int add_vertex_array_to_user_defined(const float* const vertices, 
    int num_vertices, int skipBytes = 12);
Description:

Adds an array of vertices to a user defined scene object.

Arguments:

skipBytesbytes between vertex position information
Returns:

0 on success, -1 on failure

function diguySceneObject::add_triangle_array_to_user_defined

Prototype:

int add_triangle_array_to_user_defined(const int* const indices, int num_indices);
Description:

Adds an array of triangles to a user defined scene object. The array should contain indices to vertices added with add_vertex_* calls.

Arguments:

num_indicesNumber of indices (3 indices per triangle).
Returns:

0 on success, -1 on failure

function diguySceneObject::add_triangle_to_user_defined

Prototype:

int add_triangle_to_user_defined(const float* const pos0,
    const float* const pos1, const float* const pos2);
Description:

Adds a triangle to a user defined object. Positions are expected to be float[3].

Returns:

0 on success, -1 on failure

function diguySceneObject::build_user_defined

Prototype:

int build_user_defined();
Description:

Builds the geometry of the user defined scene object from data passed via add_vertex_ and add_triangle_ calls.

Returns:

0 on success, -1 on failure

Shader Functions

function diguySceneObject::set_render_mode_shader

Prototype:

int set_render_mode_shader(const char* shader_name,
    const char* render_mode = NULL);
Description:

This function is essentially the same as the function diguyCharacter::set_render_mode_shader(), but applies to this scene object.

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::reset_render_mode_shader_to_default

Prototype:

void reset_render_mode_shader_to_default(const char* render_mode = NULL);
Description:

This function is essentially the same as the function diguyCharacter::reset_render_mode_shader_to_default(), but applies to this scene object.

Callable From:

function diguySceneObject::get_render_mode_shader

Prototype:

const char* get_render_mode_shader(const char* render_mode = NULL);
Description:

This function is essentially the same as the function diguyCharacter::get_render_mode_shader(), but applies to this to this scene object.

Returns:

name of shader program; NULL if none

Callable From:

function diguySceneObject::get_shader_program

Prototype:

diguyGraphicsShaderProgram* get_shader_program();
Description:

This function is essentially the same as the function diguyCharacter::get_shader_program(), but applies to this to this scene object. It's here for backwards compatibility DI-Guy 12 now uses shader techniques as wrappers for shader programs.

Returns:

object of type diguyGraphicsShaderProgram; NULL if none

Callable From:

function diguySceneObject::get_shader_technique

Prototype:

diguyGraphicsShaderTechnique* get_shader_technique();
Description:

This function is essentially the same as the function diguyCharacter::get_shader_technique(), but applies to this to this scene object.

Returns:

object of type diguyGraphicsShaderTechnique; NULL if none

Callable From:

function diguySceneObject::set_temporary_current_shader

Prototype:

int set_temporary_current_shader(const char* shader_name);
Description:

This function is essentially the same as the function diguyCharacter::set_temporary_current_shader_program(), but applies to this to this scene object.

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::reset_current_shader_to_default

Prototype:

void reset_current_shader_to_default();
Description:

This function is essentially the same as the function diguyCharacter::reset_current_shader_to_default(), but applies to this to this scene object.

Callable From:

function diguySceneObject::get_shader_instance

Prototype:

diguyGraphicsShaderInstance* get_shader_instance();
Description:

This function is essentially the same as the function diguyCharacter::get_shader_instance(), but applies to this to this scene object.

Note that the shader instance of a scene object can change over the lifetime of the scene object. Therefore the returned pointer should not be stored, but should be re-read each time it is needed.

Returns:

object of type diguyGraphicsShaderInstance; NULL if none

Callable From:

function diguySceneObject::reset_shader_instance_variables_to_initial_values

Prototype:

void reset_shader_instance_variables_to_initial_values();
Description:

This function is essentially the same as the function diguyCharacter::reset_shader_instance_variables_to_initial_values(), but applies to this scene object.

Callable From:

function diguySceneObject::reset_shader_instance_variables_to_program_defaults

Prototype:

void reset_shader_instance_variables_to_program_defaults();
Description:

This function is essentially the same as the function diguyCharacter::reset_shader_instance_variables_to_program_defaults(), but applies to this scene object.

Callable From:

Deprecated Functions

function diguySceneObject::set_switch_state

Prototype:

int set_switch_state(const char* switch_name,
    int state);
Description:

Set the state of a switch belonging to this scene object. Currently only supported on OpenGL platform.

Arguments:

switch_namethe name of the switch element
state the state, i.e. active sub-element, of the switch
Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::get_switch_state

Prototype:

int get_switch_state(const char* switch_name);
Description:

Get the state of a switch belonging to this scene object. Currently only supported on OpenGL platform.

Arguments:

switch_namethe name of the switch element
Returns:

The state of the switch, -1 if fails.

Callable From:

function diguySceneObject::set_dof_state

Prototype:

int set_dof_state(const char* dof_name,
    float tx, float ty, float tz,
    float rz, float rx, float ry);
Description:

Set the state of a DOF element belonging to this scene object. Currently only supported on OpenGL platform.

Arguments:

dof_name the name of the DOF element
tx, ty, tzthe x, y, and z displacements of the DOF
rz, rx, rythe rotation of the DOF about the z, x, and y axes
The DOF will be rotated in ZXY order. For rotation in XYZ order, use set_dof_state_flt().

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::set_dof_state_flt

Prototype:

int set_dof_state_flt(const char* dof_name,
    float tx, float ty, float tz,
    float rx, float ry, float rz);
Description:

Set the state of a DOF element belonging to this scene object. Currently only supported on OpenGL platform.

Arguments:

dof_name the name of the DOF element
tx, ty, tzthe x, y, and z displacements of the DOF
rz, rx, rythe rotation of the DOF about the z, x, and y axes
The DOF will be rotated in XYZ order. For rotation in ZXY order, use set_dof_state().

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::get_dof_state

Prototype:

int get_dof_state(const char* dof_name,
    float* tx, float* ty, float* tz,
    float* rz, float* rx, float* ry);
Description:

Get the state of a DOF element belonging to this scene object. Currently only supported on OpenGL platform.

Arguments:

dof_name the name of the DOF element
tx, ty, tzthe x, y, and z displacements of the DOF
rz, rx, rythe rotation of the DOF about the z-, x-, and y-axes
The returned rotation values assume ZXY order. For XYZ order, use get_dof_state_flt().

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::get_dof_state_flt

Prototype:

int get_dof_state_flt(const char* dof_name,
    float* tx, float* ty, float* tz,
    float* rx, float* ry, float* rz);
Description:

Get the state of a DOF element belonging to this scene object. Currently only supported on OpenGL platform.

Arguments:

dof_name the name of the DOF element
tx, ty, tzthe x, y, and z displacements of the DOF
rx, ry, rzthe rotation of the DOF about the z-, x-, and y-axes
The returned rotation values assume ZXY order. For XYZ order, use get_dof_state_flt().

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::add_switch_target

Prototype:

int add_switch_target(const char* switch_name,
    int state,
    float t);
Description:

Set a trigger to change the state of a switch at a given time. Currently only supported on OpenGL platform.

Arguments:

switch_namethe name of the switch to be triggered
state the state the switch should be in after time t
t the time at which the switch should switch
Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::abort_all_switch_targets

Prototype:

int abort_all_switch_targets(const char* switch_name);
Description:

Abort all the targets states for a given switch which have been set either using the DI-Guy function, add_dof_target() or using a behavior file. Currently only supported on OpenGL platform.

Arguments:

switch_namethe name of the switch whose targets are to be aborted
Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::add_dof_target

Prototype:

int add_dof_target(const char* dof_name,
    float tx, float ty, float tz,
    float rz, float rx, float ry,
    float blend_tin, float blend_tout,
    const char* blend_function_name = 0);
Description:

Set a trigger to change the state of a DOF at a given time. Currently only supported on OpenGL platform.

Arguments:

dof_name the name of the DOF element
tx, ty, tz the x, y, and z displacements of the DOF
rz, rx, ry the rotation of the DOF about the z-, x-, and y-axes
blend_tin the time at which the DOF should begin changing states
blend_tout the time at which the DOF should stop changing states
blend_function_namethe type of interpolation to be used between the current and desired DOF states
Currently, valid function names are "Linear", "HalfSine", and "QuarterSine".

The DOF will be rotated in ZXY order. For rotation in XYZ order, use set_dof_state_flt().

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::add_dof_target_flt

Prototype:

int add_dof_target_flt(const char* dof_name,
    float tx, float ty, float tz,
    float rx, float ry, float rz,
    float blend_tin, float blend_tout,
    const char* blend_function_name = 0);
Description:

Set a trigger to change the state of a DOF at a given time. Currently only supported on OpenGL platform.

Arguments:

dof_name the name of the DOF element
tx, ty, tz the x, y, and z displacements of the DOF
rx, ry, rz the rotation of the DOF about the z-, x-, and y-axes The DOF will be rotated in XYZ order. For rotation in ZXY order, use add_dof_target().
blend_tin the time at which the DOF should begin changing states
blend_tout the time at which the DOF should stop changing states
blend_function_namethe type of interpolation to be used between the current and desired DOF states
Currently, valid function names are "Linear", "HalfSine", and "QuarterSine".

The DOF will be rotated in XYZ order. For rotation in ZXY order, use set_dof_state_flt().

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::abort_all_dof_targets

Prototype:

int abort_all_dof_targets(const char* dof_name);
Description:

Abort all the targets states for a given DOF which have been set either using the DI-Guy function, add_dof_target() or using a behavior file. Currently only supported on OpenGL platform.

Arguments:

dof_namethe name of the DOF whose targets are to be aborted
Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::set_shader_program

Prototype:

int set_shader_program(const char* shader_name);
Deprecated as of 10.5.2. Use set_shader_program_name() instead.

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

function diguySceneObject::set_position

Prototype:

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

This function allows the a master flight file xrefs with large offsets from the origin to be untranslated. The offset can then be added to the XYZ position of the Scene Object. This is sometimes necessary to overcome far position rendering issues.

function diguySceneObject::get_position

Prototype:

int get_position(float* x, float* y, float* z);

function diguySceneObject::set_orientation

Prototype:

int set_orientation(float rz, float rx, float ry);

function diguySceneObject::get_orientation

Prototype:

int get_orientation(float* rz, float* rx, float* ry);

function diguySceneObject::set_scale

Prototype:

int set_scale(float sx, float sy, float sz);

function diguySceneObject::get_scale

Prototype:

int get_scale(float* sx, float* sy, float* sz);

function diguySceneObject::set_filename

Prototype:

int set_filename(const char* file_name);

function diguySceneObject::get_is_sky_box

Prototype:

int get_is_sky_box();

function diguySceneObject::set_is_sky_box

Prototype:

int set_is_sky_box(int skybox);

function diguySceneObject::set_texture_load_behavior

Prototype:

static int set_texture_load_behavior(diguyGraphicsTextureLoadingBehavior mode);

function diguySceneObject::get_texture_load_behavior

Prototype:

static diguyGraphicsTextureLoadingBehavior get_texture_load_behavior();

function diguySceneObject::draw_visual

Prototype:

int draw_visual();
Description:

Draws the scene object.

Currently OpenGL only.

Returns:

0 on success, -1 on failure

Callable From:

function diguySceneObject::get_include_in_octtree

Prototype:

int get_include_in_octtree();

function diguySceneObject::set_include_in_octtree

Prototype:

int set_include_in_octtree(int val);

function diguySceneObject::set_include_in_physics_sim_scene

Prototype:

int set_include_in_physics_sim_scene(int include_in_simulation_terrain);

function diguySceneObject::get_include_in_physics_sim_scene

Prototype:

int get_include_in_physics_sim_scene();

function diguySceneObject::set_physics_collision_group

Prototype:

int set_physics_collision_group(diguyPhysicsCollisionGroup collision_group);

function diguySceneObject::get_physics_collision_group

Prototype:

diguyPhysicsCollisionGroup get_physics_collision_group();

function diguySceneObject::get_min

Prototype:

int get_min(float* x, float* y, float* z);

function diguySceneObject::get_max

Prototype:

int get_max(float* x, float* y, float* z);

function diguySceneObject::set_scene_graph_mask

Prototype:

void set_scene_graph_mask(unsigned int mask);

function diguySceneObject::get_enabled

Prototype:

int get_enabled();

function diguySceneObject::set_enabled

Prototype:

int set_enabled(int enabled);

function diguySceneObject::get_visible

Prototype:

int get_visible();

function diguySceneObject::set_visible

Prototype:

int set_visible(int visible);

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.