diguyViewLight

Generated from diguyViewLight.h

DI-Guy API Version 12.5.1

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

Contents:

Alphabetical Index

class diguyViewLight

class BDI_DECLSPEC_diguy diguyViewLight
{
public:
    const char* get_name();
    const char* get_type_name();
    void set_direction(float x, float y, float z);
    void get_direction(float* x, float* y, float* z);
    void set_position(float x, float y, float z);
    void get_position(float* x, float* y, float* z);
    void set_ambient_color(float r, float g, float b, float a);
    void get_ambient_color(float* r, float* g, float* b, float* a);
    void set_diffuse_color(float r, float g, float b, float a);
    void get_diffuse_color(float* r, float* g, float* b, float* a);
    void set_specular_color(float r, float g, float b, float a);
    void get_specular_color(float* r, float* g, float* b, float* a);
    int load_settings(const char* settings_name);
#ifdef CPLUSPLUS_ONLY
    int load_settings(diguyViewLightSettings* settings);
#endif
    void apply(int i = 0);
    enum {
        CALLBACK_ID_SETTINGS_CHANGED = 1
    };
#ifdef CPLUSPLUS_ONLY
    int add_callback(int callback_id,
        diguyViewLightCallback* callback,
        void* callback_params = 0,
        void* callback_user_data = 0);
    int remove_callback(int callback_id,
        diguyViewLightCallback* 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);
    void set_near_plane(float near_plane);
    float get_near_plane();
    void set_far_plane(float far_plane);
    float get_far_plane();
    void set_casts_shadows(int casts_shadows);
    int get_casts_shadows();
    
    int set_scene_objects_cast_shadows(int value);
    int get_scene_objects_cast_shadows();
    int set_brightness_multiplier(float multiplier);
    float get_brightness_multiplier();
    void set_shadow_volume_size(float volume);
    float get_shadow_volume_size();
    void set_shadow_offset_multiplier(float multiplier);
    float get_shadow_offset_multiplier();
    void set_spotlight_angle(float angle);
    float get_spotlight_angle();
    void set_texture_name(const char* name);
    void set_active(int active);
    int get_active();
    int set_shadow_map_update_paused(int pause);
    int get_shadow_map_update_paused();
    int set_shadow_map_update_frequency(int frame_frequency);
    int get_shadow_map_update_frequency();
General Functions

function diguyViewLight::get_name

Prototype:

const char* get_name();
Description:

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

Returns:

name of the object

Callable From:

function diguyViewLight::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 diguyViewLight::set_direction

Prototype:

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

This function sets the direction of this light.

Arguments:

xx direction, in meters
yy direction, in meters
zz direction, in meters
Callable From:

function diguyViewLight::get_direction

Prototype:

void get_direction(float* x, float* y, float* z);
Description:

This function gets the direction of this light. Values are returned via the passed pointers.

Arguments:

xx direction, in meters
yy direction, in meters
zz direction, in meters
Callable From:

function diguyViewLight::set_position

Prototype:

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

This function sets the position of this light.

Arguments:

xx position, in meters
yy position, in meters
zz position, in meters
Callable From:

function diguyViewLight::get_position

Prototype:

void get_position(float* x, float* y, float* z);
Description:

This function gets the position of this light. Values are returned via the passed pointers.

Arguments:

xx position, in meters
yy position, in meters
zz position, in meters
Callable From:

function diguyViewLight::set_ambient_color

Prototype:

void set_ambient_color(float r, float g, float b, float a);
Description:

This function sets the ambient color.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewLight::get_ambient_color

Prototype:

void get_ambient_color(float* r, float* g, float* b, float* a);
Description:

This function gets the ambient color of this light. Values are returned via the passed pointers.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewLight::set_diffuse_color

Prototype:

void set_diffuse_color(float r, float g, float b, float a);
Description:

This function sets the diffuse color.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewLight::get_diffuse_color

Prototype:

void get_diffuse_color(float* r, float* g, float* b, float* a);
Description:

This function gets the diffuse color of this light. Values are returned via the passed pointers.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewLight::set_specular_color

Prototype:

void set_specular_color(float r, float g, float b, float a);
Description:

This function sets the specular color.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewLight::get_specular_color

Prototype:

void get_specular_color(float* r, float* g, float* b, float* a);
Description:

This function gets the specular color of this light. Values are returned via the passed pointers.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

Load and Apply Functions

function diguyViewLight::load_settings

Prototype:

int load_settings(const char* settings_name);
Description:

Loads the specified settings into this light.

Returns:

0 on success, -1 on failure

Callable From:

function diguyViewLight::load_settings

Prototype:

int load_settings(diguyViewLightSettings* settings);
Description:

Loads the specified settings into this light.

Returns:

0 on success, -1 on failure

Callable From:

function diguyViewLight::apply

Prototype:

void apply(int i = 0);
Description:

Applies the light to OpenGL state. Currently DI-Guy only supports one light in it's default OpenGL implementation.

At least one light must be applied for advanced DI-Guy reference shaders to work.

Callback Functions

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 diguyViewLight::add_callback

Prototype:

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

This function adds a user callback.

Arguments:

callback pointer to function with prototype diguyViewLightCallback (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 light 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

Callable From:

function diguyViewLight::remove_callback

Prototype:

int remove_callback(int callback_id,
    diguyViewLightCallback* callback);
Description:

This function removes a user callback. All callbacks matching the specified callback_id and callback function will be removed.

Arguments:

callback_id integer id of when this callback is to be called
callback pointer to function with prototype diguyViewLightCallback (typedefed above)
Returns:

0 on success, -1 on failure

Callable From:

function diguyViewLight::remove_callback_with_user_data

Prototype:

int remove_callback_with_user_data(int callback_id,
    void* callback_user_data);
Description:

This function removes a user callback. All callbacks matching the specified callback_id and callback_user_data pointer will be removed.

Arguments:

callback_id integer id of when this callback is to be called
callback_user_datapointer for user's own use
Returns:

0 on success, -1 on failure

Callable From:

function diguyViewLight::add_callback_script

Prototype:

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

This function adds a user callback script. Callback scripts can be removed with remove_callback_script().

Arguments:

callback_id integer id of the callback
callback_script script text of callback to be added
callback_script_typethe type of script contained in callback_script
If NULL is passed for callback_script_type, a default script type will be derived based on the default script interpreter of the scenario.

lua specific:

When the script is called, the object for which it is being called will be in the callback_object global.

To pass NULL when calling from a lua script, use nil.

Returns:

0 on success, -1 on failure

Callable From:

function diguyViewLight::remove_callback_script

Prototype:

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

This function removes a user callback script previously added with add_callback_script().

Arguments:

callback_id integer id of the callback
callback_script script text of callback previously added
callback_script_typethe type of script contained in callback_script
If NULL is passed for callback_script, all callback scripts whose ids match callback_id and whose types match callback_script_type will be removed.

If NULL is passed for callback_script_type, a default script type will be derived based on the default script interpreter of the scenario.

lua specific:

To pass NULL when calling from a lua script, use nil.

Returns:

0 on success, -1 on failure

Callable From:

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

function diguyViewLight::set_near_plane

Prototype:

void set_near_plane(float near_plane);

function diguyViewLight::get_near_plane

Prototype:

float get_near_plane();

function diguyViewLight::set_far_plane

Prototype:

void set_far_plane(float far_plane);

function diguyViewLight::get_far_plane

Prototype:

float get_far_plane();

function diguyViewLight::set_casts_shadows

Prototype:

void set_casts_shadows(int casts_shadows);
Description:

Sets if a light will cast shadow; this will only work in DI-Guy Scenario.

function diguyViewLight::get_casts_shadows

Prototype:

int get_casts_shadows();
Returns:

Returns if a light will cast shadow; this is limited to DI-Guy Scenario

function diguyViewLight::set_scene_objects_cast_shadows

Prototype:

int set_scene_objects_cast_shadows(int value);

function diguyViewLight::get_scene_objects_cast_shadows

Prototype:

int get_scene_objects_cast_shadows();

function diguyViewLight::set_brightness_multiplier

Prototype:

int set_brightness_multiplier(float multiplier);

function diguyViewLight::get_brightness_multiplier

Prototype:

float get_brightness_multiplier();

function diguyViewLight::set_shadow_volume_size

Prototype:

void set_shadow_volume_size(float volume);

function diguyViewLight::get_shadow_volume_size

Prototype:

float get_shadow_volume_size();

function diguyViewLight::set_shadow_offset_multiplier

Prototype:

void set_shadow_offset_multiplier(float multiplier);

function diguyViewLight::get_shadow_offset_multiplier

Prototype:

float get_shadow_offset_multiplier();

function diguyViewLight::set_spotlight_angle

Prototype:

void set_spotlight_angle(float angle);

function diguyViewLight::get_spotlight_angle

Prototype:

float get_spotlight_angle();

function diguyViewLight::set_texture_name

Prototype:

void set_texture_name(const char* name);

function diguyViewLight::set_active

Prototype:

void set_active(int active);

function diguyViewLight::get_active

Prototype:

int get_active();

function diguyViewLight::set_shadow_map_update_paused

Prototype:

int set_shadow_map_update_paused(int pause);

function diguyViewLight::get_shadow_map_update_paused

Prototype:

int get_shadow_map_update_paused();

function diguyViewLight::set_shadow_map_update_frequency

Prototype:

int set_shadow_map_update_frequency(int frame_frequency);

function diguyViewLight::get_shadow_map_update_frequency

Prototype:

int get_shadow_map_update_frequency();

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.