diguyViewFog

Generated from diguyViewFog.h

DI-Guy API Version 12.5.1

This file was automatically generated from diguyViewFog.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 diguyViewFog

class BDI_DECLSPEC_diguy diguyViewFog
{
public:
    const char* get_name();
    const char* get_type_name();
    void set_density(float density);
    float get_density();
    void set_start(float start);
    float get_start();
    void set_end(float end);
    float get_end();
    void set_color(float r, float g, float b, float a);
    void get_color(float* r, float* g, float* b, float* a);
    void set_fog_mode(int mode);
    int get_fog_mode();
    int load_settings(const char* settings_name);
#ifdef CPLUSPLUS_ONLY
    int load_settings(diguyViewFogSettings* settings);
#endif
    enum {
        CALLBACK_ID_SETTINGS_CHANGED = 1
    };
#ifdef CPLUSPLUS_ONLY
    int add_callback(int callback_id,
        diguyViewFogCallback* callback,
        void* callback_params = 0,
        void* callback_user_data = 0);
    int remove_callback(int callback_id,
        diguyViewFogCallback* 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);
General Functions

function diguyViewFog::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 diguyViewFog::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 diguyViewFog::set_density

Prototype:

void set_density(float density);
Description:

This sets the density of the fog.

Arguments:

densitydistance of this fog; higher causes more opaque fog
Callable From:

function diguyViewFog::get_density

Prototype:

float get_density();
Returns:

density of fog

Callable From:

function diguyViewFog::set_start

Prototype:

void set_start(float start);
Description:

This sets the distance at which fog begins to affect the scene. Colors of objects before this distance will not be affected. Colors of objects after this distance will start to be modulated toward to fog color.

Arguments:

startdistance to where fog starts, in meters
Callable From:

function diguyViewFog::get_start

Prototype:

float get_start();
Returns:

distance to where fog starts, in meters; see set_start()

Callable From:

function diguyViewFog::set_end

Prototype:

void set_end(float end);
Description:

This sets the distance at which the fog completely overrides the colors of objects in the scene.

Arguments:

enddistance to where fog ends, in meters
Callable From:

function diguyViewFog::get_end

Prototype:

float get_end();
Returns:

distance to where fog ends, in meters; see set_end()

Callable From:

function diguyViewFog::set_color

Prototype:

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

This function sets the color of this fog.

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewFog::get_color

Prototype:

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

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

Arguments:

rred component
gblue component
bgreen component
aalpha component
Callable From:

function diguyViewFog::set_fog_mode

Prototype:

void set_fog_mode(int mode);
Description:

This function sets the fog mode.

Arguments:

modenew mode for fog calculations
DIGUY_FOG_MODE_DISABLED fog is completely turned off
DIGUY_FOG_MODE_EXP per-vertex exponential
DIGUY_FOG_MODE_EXP2 per-vertex exponential style 2
DIGUY_FOG_MODE_LINEAR per-vertex linear
Returns:

0 on success, -1 on failure

Callable From:

function diguyViewFog::get_fog_mode

Prototype:

int get_fog_mode();
Returns:

the most recent setting made by set_fog_mode()

Callable From:

Load and Apply Functions

function diguyViewFog::load_settings

Prototype:

int load_settings(const char* settings_name);
Description:

Loads the specified settings into this fog.

Returns:

0 on success, -1 on failure

Callable From:

function diguyViewFog::load_settings

Prototype:

int load_settings(diguyViewFogSettings* settings);
Description:

Loads the specified settings into this fog.

Returns:

0 on success, -1 on failure

Callable From:

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

Prototype:

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

This function adds a user callback.

Arguments:

callback pointer to function with prototype diguyViewFogCallback (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 fog 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 diguyViewFog::remove_callback

Prototype:

int remove_callback(int callback_id,
    diguyViewFogCallback* 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 diguyViewFogCallback (typedefed above)
Returns:

0 on success, -1 on failure

Callable From:

function diguyViewFog::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 diguyViewFog::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 diguyViewFog::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:


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.