
|
|
This file was automatically generated from diguyGraphicsMaterial.h. Do not edit this file directly; the changes will be lost.Includes: diguy_constants.h | declspec_diguy.h
Contents:
Alphabetical IndexLink against: libdiguy_graphics_api
class diguyGraphicsMaterial
|
class BDI_DECLSPEC_diguy diguyGraphicsMaterial { public: const char* get_name(); #ifdef CPLUSPLUS_ONLY void get_ambient(float* rgba); void get_diffuse(float* rgba); void get_specular(float* rgba); void get_emission(float* rgba); void get_shininess(float* s); int get_contains_alpha_component(); void free_loader_memory(); static diguyGraphicsMaterial* get_last_bound_material(); static void clear_last_bound_material(); #endif #ifdef CPLUSPLUS_ONLY virtual void build(); virtual void unbuild(); virtual void bind_now(); #endif
| Accessor Functions |
The functions in this section provide access to data in this object. They are designed to be called by DI-Guy programmers.
function diguyGraphicsMaterial::get_name |
Prototype:
Description:const char* get_name();
Returns the name of the texture. This pointer will never be NULL.Returns:
name of the textureCallable From:
- C++
- Script
function diguyGraphicsMaterial::get_ambient |
Prototype:
Description:void get_ambient(float* rgba);
This function returns the red, green, blue, and alpha components of the material's ambient setting. All returned values will be between 0 (least intensity) and 1 (highest intensity).Arguments:
Callable From:
rgba pointer to an array of four floats into which results should be copied
- C++
function diguyGraphicsMaterial::get_diffuse |
Prototype:
Description:void get_diffuse(float* rgba);
This function returns the red, green, blue, and alpha components of the material's diffuse setting. All returned values will be between 0 (least intensity) and 1 (highest intensity).Arguments:
Callable From:
rgba pointer to an array of four floats into which results should be copied
- C++
function diguyGraphicsMaterial::get_specular |
Prototype:
Description:void get_specular(float* rgba);
This function returns the red, green, blue, and alpha components of the material's specular setting. All returned values will be between 0 (least intensity) and 1 (highest intensity).Arguments:
Callable From:
rgba pointer to an array of four floats into which results should be copied
- C++
function diguyGraphicsMaterial::get_emission |
Prototype:
Description:void get_emission(float* rgba);
This function returns the red, green, blue, and alpha components of the material's emission setting. All returned values will be between 0 (least intensity) and 1 (highest intensity).Arguments:
Callable From:
rgba pointer to an array of four floats into which results should be copied
- C++
function diguyGraphicsMaterial::get_shininess |
Prototype:
Description:void get_shininess(float* s);
This function returns the material's shininess setting.Arguments:
Callable From:
s pointer to float into which result should be copied
- C++
function diguyGraphicsMaterial::get_contains_alpha_component |
Prototype:
Description:int get_contains_alpha_component();
This function returns whether the material contains an alpha component. Materials that have an alpha component can make objects semi-transparent, which can affect when said objects should be drawn.Returns:
1 if texture contains an alpha component, 0 if not; -1 on failureCallable From:
- C++
function diguyGraphicsMaterial::free_loader_memory |
Prototype:
Description:void free_loader_memory();
This function frees most memory allocated by the DI-Guy geometry loader for this object.
This function should only be called during or after the object's build() function has been called. After it has been called, calls to many accessor functions will fail.Callable From:
- C++
function diguyGraphicsMaterial::get_last_bound_material |
Prototype:
Description:static diguyGraphicsMaterial* get_last_bound_material();
This function returns the last material that was bound.
In bind_now() the current material can be checked against the last bound material; if the values are the same the bind_now() function can most often immediately return. This is desirable because rendering state changes can have significant performance overhead.Callable From:
- C++
function diguyGraphicsMaterial::clear_last_bound_material |
Prototype:
Description:static void clear_last_bound_material();
This function clears out the last bound material pointer.
diguyScenario::draw() calls it automatically, but it's recommended that this function also be called when the drawing of a new character is beginning. This can be done in diguyGraphicsLink::begin_character_draw().Callable From:
- C++
| Virtual Functions |
The functions in this section are all virtual functions that will be called by DI-Guy at various times during DI-Guy execution.
Because the functions are all virtual, DI-Guy programmers can create a subclass of this class and override them. Unless otherwise stated, the base class functions do not need to be called.
function diguyGraphicsMaterial::build |
Prototype:
Description:virtual void build();
This function will be called by DI-Guy when it is time for a renderer-specific material object to be created. At that point all material information has been read and is available via the Accessor Functions above.Immediate Mode:
Immediate mode renderers may override this function, to create an object that may be invoked by bind_now() to set material attributes.Scene Graph:
Scene graph renderers usually do override this function, to create a material object that will be associated with diguyGraphicsMesh objects.Callable From:
- N/A (automatically called by DI-Guy Graphics API during the Build Stage)
function diguyGraphicsMaterial::unbuild |
Prototype:
Description:virtual void unbuild();
This function will be called by DI-Guy when it is time for a renderer-specific material object to be destroyed.Immediate Mode:
Immediate mode renderers may override this function, to destroy any object that may have been created by build().Scene Graph:
Scene graph renderers usually do override this function, to destroy any object that may have been created by build().Callable From:
- N/A (automatically called by DI-Guy Graphics API during the Unbuild Stage)
function diguyGraphicsMaterial::bind_now |
Prototype:
Description:virtual void bind_now();
This function will be called by DI-Guy when the material should be made active, or bound.
Note that this material should be checked against the material returned by get_last_bound_material(). If they're the same this function should return early.Immediate Mode:
Immediate mode renderers usually do override this function, to invoke the object created by build(), or make calls to the renderer to set appropriate material state.Scene Graph:
Scene graph renderers usually do not override this function.Callable From:
- N/A (automatically called by DI-Guy Graphics API during Draw Stage)
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.