![]() |
DI-Guy SDK Documentation
13.8
|
The diguyAuthorVisualRegionMesh class provides an interface for creating supplemental visuals needed for creating DI-Guy scenarios in a Host IG. More...
#include <diguyAuthorVisualRegionMesh.h>
Public Member Functions | |
| diguyAuthorVisualMaterial * | get_visual_material () |
| Returns the visual material to be used for rendering this object. More... | |
| diguyRegion * | get_region () |
| Returns the diguyRegion object that this visual is associated with. More... | |
| int | get_subregion_index () |
| Returns the index of the subregion of the associated diguyRegion that this visual is part of. More... | |
| int | get_num_quads () |
| Returns the number of quad polygons to be rendered by this visual. More... | |
| diguyVec3f | get_quad_point (int quad, int corner) |
| Returns one corner of one of the visual's quads. More... | |
| diguyVec3f * | get_quads_data_ptr () |
| Returns a pointer to a contiguous data buffer that contains all quad polygon data for this visual. More... | |
| int | get_num_edges () |
| Returns the number of line segment edges to be rendered by this visual. More... | |
| diguyVec3f | get_edge_point (int edge, int end) |
| Returns one endpoint of one of the visual's edges. More... | |
| diguyVec3f * | get_edges_data_ptr () |
| Returns a pointer to a contiguous data buffer that contains all line segment edge data for this visual. More... | |
| diguyVec3f | get_mesh_origin () |
| Returns the origin of the geometry in the visual. More... | |
| int | get_highlight_level () |
| Returns the level at which this mesh should be highlighted. More... | |
| int | get_visible () |
| Returns 1 if this visual should be visible, else 0. More... | |
Virtual Functions | |
The functions in this section are all virtual functions that will be called by DI-Guy Author 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. | |
| virtual void | build () |
| build() will be called by DI-Guy when it is time for a renderer-specific visual object to be created. More... | |
| virtual void | unbuild () |
| See diguyAuthorVisualWaypoint::unbuild() for general information about this function. More... | |
| virtual void | update (int update_flags) |
| See diguyAuthorVisualWaypoint::update() for general information about this function. More... | |
| virtual void | draw () |
| See diguyAuthorVisualWaypoint::draw() for general information about this function. More... | |
| virtual void | show () |
| See diguyAuthorVisualWaypoint::show() for general information about this function. More... | |
| virtual void | hide () |
| See diguyAuthorVisualWaypoint::hide() for general information about this function. More... | |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| static diguyAuthorVisualRegionMeshCreateFunc * | s_create_func |
| bdiRenderRegionMeshData * | m_scripted_object |
| class | bdiRenderRegionMeshData |
| diguyAuthorVisualRegionMesh (void *internal_data) | |
| virtual | ~diguyAuthorVisualRegionMesh () |
| bdiRenderRegionMeshData * | get_scripted_object () |
The diguyAuthorVisualRegionMesh class provides an interface for creating supplemental visuals needed for creating DI-Guy scenarios in a Host IG.
Region mesh visuals are used to visualize regions and navmeshes.
Link against: libdiguy
| diguyAuthorVisualRegionMesh::diguyAuthorVisualRegionMesh | ( | void * | internal_data | ) |
|
virtual |
| diguyAuthorVisualMaterial* diguyAuthorVisualRegionMesh::get_visual_material | ( | ) |
Returns the visual material to be used for rendering this object.
| diguyRegion* diguyAuthorVisualRegionMesh::get_region | ( | ) |
Returns the diguyRegion object that this visual is associated with.
Note that one diguyRegion will most likely have multiple region mesh visuals.
| int diguyAuthorVisualRegionMesh::get_subregion_index | ( | ) |
Returns the index of the subregion of the associated diguyRegion that this visual is part of.
This value will be one of the diguySubregionIndex enumerated values.
| int diguyAuthorVisualRegionMesh::get_num_quads | ( | ) |
Returns the number of quad polygons to be rendered by this visual.
They should be rendered using the material's brush color.
| diguyVec3f diguyAuthorVisualRegionMesh::get_quad_point | ( | int | quad, |
| int | corner | ||
| ) |
Returns one corner of one of the visual's quads.
Corner argument should be between 0 and 3, quad argument between 0 and the result from get_num_quads() - 1.
The returned vertex will be relative to the region's origin as returned by get_mesh_origin().
| diguyVec3f* diguyAuthorVisualRegionMesh::get_quads_data_ptr | ( | ) |
Returns a pointer to a contiguous data buffer that contains all quad polygon data for this visual.
There will be four times the value returned by get_num_quads() vectors in the data buffer.
The returned vertices will be relative to the region's origin as returned by get_mesh_origin().
| int diguyAuthorVisualRegionMesh::get_num_edges | ( | ) |
Returns the number of line segment edges to be rendered by this visual.
They should be rendered using the material's pen color.
| diguyVec3f diguyAuthorVisualRegionMesh::get_edge_point | ( | int | edge, |
| int | end | ||
| ) |
Returns one endpoint of one of the visual's edges.
End argument should be 0 or 1, edge argument between 0 and the result from get_num_edges() - 1.
The returned vertex will be relative to the region's origin as returned by get_mesh_origin().
| diguyVec3f* diguyAuthorVisualRegionMesh::get_edges_data_ptr | ( | ) |
Returns a pointer to a contiguous data buffer that contains all line segment edge data for this visual.
There will be two times the value returned by get_num_edges() vectors in the data buffer.
The returned vertices will be relative to the region's origin as returned by get_mesh_origin().
| diguyVec3f diguyAuthorVisualRegionMesh::get_mesh_origin | ( | ) |
Returns the origin of the geometry in the visual.
All quads and edges will be relative to this origin.
| int diguyAuthorVisualRegionMesh::get_highlight_level | ( | ) |
Returns the level at which this mesh should be highlighted.
This will be 0, 1, or 2. The higher the highlight level, the brighter the mesh should appear.
It's recommended that for highlight level 0, the colors of the visual material be scaled by a factor of 0.6; for highlight level 1, by a factor of 0.8; and for highlight level 2 don't scale.
Highlight level 2 should have a wider line width than levels 0 or 1.
| int diguyAuthorVisualRegionMesh::get_visible | ( | ) |
Returns 1 if this visual should be visible, else 0.
|
virtual |
build() will be called by DI-Guy when it is time for a renderer-specific visual object to be created.
All information necessary to build the visual should be available via the Accessor Functions above when this function is called.
It is common for build() and update() to use the same internal, user-written function for creating geometry.
Immediate Mode:
Immediate mode renderers may override this function to create an object, for example a vertex array, that may be used when draw() is called.
Scene Graph:
Scene graph renderers almost always override this function to create a scene graph node object that is attached to the scene graph and updated when update() is called.
|
virtual |
See diguyAuthorVisualWaypoint::unbuild() for general information about this function.
|
virtual |
See diguyAuthorVisualWaypoint::update() for general information about this function.
Specifics for this visual type are below.
DIGUY_GRAPHICS_VISUAL_UPDATE_GEOMETRY
Region mesh visuals need to use calls to get_num_quads(), get_quads_data_ptr(), etc. to determine geometry.
DIGUY_GRAPHICS_VISUAL_UPDATE_POSITION
Region mesh visuals do not use this value. The overall positions of polygons that make up the mesh are recomputed and applied during an overall geometry update operation.
|
virtual |
See diguyAuthorVisualWaypoint::draw() for general information about this function.
|
virtual |
See diguyAuthorVisualWaypoint::show() for general information about this function.
|
virtual |
See diguyAuthorVisualWaypoint::hide() for general information about this function.
|
inline |
|
friend |
|
static |
| bdiRenderRegionMeshData* diguyAuthorVisualRegionMesh::m_scripted_object |