![]() |
DI-Guy SDK Documentation
13.1
|
#include <diguyOglGraphicsShape.h>
Public Member Functions | |
| diguyOglGraphicsShape (void *internal_data) | |
| virtual void | build () |
| This function will be called by DI-Guy when it is time for renderer-specific shape objects to be created. More... | |
| virtual void | unbuild () |
| This function will be called by DI-Guy when it is time for the renderer-specific shape objects created during the build() call to be destroyed. More... | |
| virtual void | draw (int lod) |
| This function will be called by DI-Guy when it is time for the geometry of this shape to be drawn. More... | |
| virtual void | update_variation_texture (int num_pixels, unsigned char *pixel_data) |
| Pushes a char * pixel buffer of length num_pixels that represents the unique per shape texture. More... | |
Public Member Functions inherited from diguyGraphicsShape | |
| const char * | get_name () |
| This function returns the name of the shape. More... | |
| long | get_uid () |
| All shapes are assigned a unique identifier, or uid. More... | |
| diguyCharacter * | get_character () |
| This function returns a pointer to the diguyCharacter to which this shape belongs. More... | |
| const char * | get_shape_set_name () |
| This function returns the name of the shape set of which this shape is a part. More... | |
| const char * | get_shape_set_shape_name () |
| This function returns the name of the shape. More... | |
| const char * | get_recommended_attachment_link_name () |
| This function returns the name of the link to which this shape is typically attached. More... | |
| int | get_num_lods () |
| This function returns how many LODs this shape has. More... | |
| float * | get_lod_ranges () |
| This function returns the LOD ranges of this shape. More... | |
| int | get_graphics_lod () |
| This function returns the most recent lod setting as set by set_graphics_lod(), or as set by diguyCharacter::set_graphics_lod(). More... | |
| const char * | get_shape_set_filename_for_lod (int lod) |
| This function returns the filename of the geometry file from which the shape is read for a specific LOD. More... | |
| int | get_num_meshes (int lod) |
| This function returns the number of low-level geometry meshes that comprise this shape. More... | |
| diguyGraphicsMesh * | get_mesh_at_index_for_lod (int index, int lod) |
| This function returns a pointer to one of the low-level geometry mesh objects that comprise this shape. More... | |
| diguyGraphicsLink * | get_link () |
| This function returns a pointer to the link to which this shape is actually attached. More... | |
| const char * | get_switch_var_name () |
| This function returns the name of the DI-Guy motion data variable that controls whether this shape should be visible. More... | |
| int | get_switch_value () |
| This function returns the value of the DI-Guy motion data variable for which the shape should be visible. More... | |
| int | get_is_hidden () |
| This function returns whether this shape should currently be hidden or shown, based on the value of the shape's switch variable (if any). More... | |
| int | set_is_hidden (int hidden) |
| hides or shows the shape More... | |
| diguyGraphicsFile * | get_diguy_graphics_file (int lod) |
| This function returns the geometry file from which geometry for the shape was read. More... | |
| void * | get_diguy_graphics_file_part (int lod) |
| This function returns a pointer to an object that represents the geometry for the shape. More... | |
| int | get_graphics_state_switch_index () |
| Some shapes have meshes that have multiple selectable graphics states, including materials and textures. More... | |
| int | get_num_switched_graphics_states () |
| Returns the number of switched graphics states available to this shape. More... | |
| diguyGraphicsState * | get_switched_graphics_state (int switch_value=-1) |
| Returns the graphics state associated with the passed switch value. More... | |
| int | get_unique_color (unsigned char *r, unsigned char *g, unsigned char *b) |
| Returns in the passed pointers the unique color of this shape. More... | |
| int | get_contains_skinned_file () |
| This function identifies if this shape has skinned data. More... | |
| int | set_material_parameter_4f (const char *parameter_name, float x, float y, float z, float w, float blend_time=0.0) |
| Per shape material data. More... | |
| int | get_material_parameter_4f (const char *parameter_name, float *x, float *y, float *z, float *w) |
| Allow access to the current values of a material parameter, accounting for value blending. More... | |
| unsigned char * | get_variation_texture () |
| Returns a char * of length get_variation_texture_size() that represents the pixels in a unique per shape texture. More... | |
| int | get_variation_texture_size () |
| Returns the size of the texture specified in get_variation_texture() More... | |
| int | get_num_variations () |
| Returns the number of texture variations that this shape has. More... | |
| const char * | get_variation_name (int variation_index) |
| Returns the name of the texture variations at variation_index. More... | |
| int | set_variation_index (int variation_index) |
| Sets the shape to have the variation specified at variation_index, returns -1 if out of array bounds. More... | |
| int | get_has_custom_variation () |
| true if set_unique_ramp_data() is ever called on this object. More... | |
| int | get_num_variation_components () |
| Returns the number of different components in the current variation texture. More... | |
| const char * | get_variation_component_name (int index) |
| Returns the name of the component at index in the current variation texture. More... | |
| int | get_variation_component_index (const char *name) |
| Returns the index of the component with name in the current variation texture. More... | |
| int | set_variation_component_value (int index, float color_shift_r, float color_shift_g, float color_shift_b) |
| Sets the color shift value of the component at index in the current variation texture. More... | |
| int | set_state_switch_index (int index) |
| Sets current material swap index, allows overriding of value that was set based on appearance settings. More... | |
| int | get_shader_matrix_data (int *num_matrixes, const float **matrix_data) |
| This function is typically called by scene graph renderers as part of diguyGraphicsShape::update(). More... | |
| int | get_are_shader_matrices_transposed () |
| Returns the transpose state of the shader matrices. More... | |
| virtual void | update () |
| This function will be called by DI-Guy when it is time for renderer-specific shape objects created during the build() call to be updated with new data. More... | |
| virtual void | show () |
| This function will be called by DI-Guy when the shape should be shown, typically due to a change in the motion data that controls the switch. More... | |
| virtual void | hide () |
| This function will be called by DI-Guy when the shape should be hidden, typically due to a change in the motion data that controls the switch. More... | |
| virtual void | instancing_state_changed (int val) |
| virtual void | set_graphics_lod_ranges (float *ranges) |
| This function will be called by DI-Guy when the LOD ranges of this shape need to be updated after the shape has initially been built in the Build Stage. More... | |
| virtual void | set_graphics_lod (int lod) |
| This function will be called by DI-Guy when the LOD of this link is "manually" set by a diguyCharacter::set_graphics_lod() function call. More... | |
| int | get_bind_color_array (int *num_colors, const float **color_data) |
| Returns the unique color of the character links. More... | |
| int | get_link_to_matrix_table (int *num_matrices, const float **lookup_data) |
| int | get_bone_index_from_link_index (int link_index) |
| int | get_has_offset_matrix () |
| int | get_offset_matrix_4x4_ptr (float *matrix, int transpose=0) |
| int | get_has_offset_translation () |
| int | get_offset_translation (float *tx, float *ty, float *tz) |
| int | get_has_offset_rotation () |
| int | get_offset_rotation (float *rz, float *rx, float *ry) |
| int | get_has_offset_scale () |
| int | get_offset_scale (float *sx, float *sy, float *sz) |
| bdiShape * | get_scripted_object () |
Protected Member Functions | |
| void | create_default_variation_texture () |
Protected Member Functions inherited from diguyGraphicsShape | |
| diguyGraphicsShape (void *internal_data) | |
| A protected constructor. More... | |
| virtual | ~diguyGraphicsShape () |
| A protected destructor. More... | |
Protected Attributes | |
| GLuint | m_unique_texture_object |
| Variable containing data generated during the Build Stage. More... | |
Static Protected Attributes | |
| static GLuint | sm_default_variation_texture_object = 0 |
| 4 Header files and forward declarations More... | |
| diguyOglGraphicsShape::diguyOglGraphicsShape | ( | void * | internal_data | ) |
|
virtual |
This function will be called by DI-Guy when it is time for renderer-specific shape objects to be created.
All information necessary to build the shape should be available via the Accessor Functions above when this function is called.
The build() function for the link to which a shape is attached will be called before the shape's build() function.
Immediate Mode:
Immediate mode renderers can override this function, to create a pre-compiled object that expedites the draw(). Display lists in OpenGL are an example of this.
Scene Graph:
Scene graph renderers usually do override this function, to create scene graph nodes that will hold geometry nodes of meshes attached to the shape.
The following nodes are typically created:
a geometry parent or group-type object to which mesh nodes can be attached
The scene graph nodes created by this function should be attached to the nodes of the link to which the shape is attached. Use the get_link() function to get a pointer to the link.
In addition, the scene graph objects of meshes attached to the shape should be retrieved and attached to the shape's nodes. Use the get_mesh_at_index_for_lod() function to get pointers to the meshes.
Callable From:
Reimplemented from diguyGraphicsShape.
|
virtual |
This function will be called by DI-Guy when it is time for the renderer-specific shape objects created during the build() call to be destroyed.
The unbuild() function for the shape will be called before the unbuild() function of the link to which the shape is attached.
Immediate Mode:
Scene graph renderers can override this function, to destroy the scene graph nodes created by build().
Scene Graph:
Scene graph renderers usually do override this function, to destroy the scene graph nodes created by build().
Callable From:
Reimplemented from diguyGraphicsShape.
|
virtual |
This function will be called by DI-Guy when it is time for the geometry of this shape to be drawn.
Immediate Mode:
Immediate mode renderers usually do not override this function. The actual draw calls happen in diguyGraphicsMesh::draw() calls.
Scene Graph:
Scene graph renderers usually do not override this function; drawing is handled automatically by scene graphs.
Callable From:
Reimplemented from diguyGraphicsShape.
|
virtual |
Pushes a char * pixel buffer of length num_pixels that represents the unique per shape texture.
Typically a Immediate mode renderer would need to use this to create or update a texture see diguyOglGraphicsShape.cpp for an example. For an retained mode renderer we have get_variation_texture() as an accessor.
Callable From:
Reimplemented from diguyGraphicsShape.
|
protected |
|
protected |
Variable containing data generated during the Build Stage.
|
staticprotected |
4 Header files and forward declarations