DI-Guy SDK Documentation  13.8
diguyAuthorVisualRegionMesh Class Reference

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

diguyAuthorVisualMaterialget_visual_material ()
 Returns the visual material to be used for rendering this object. More...
 
diguyRegionget_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...
 
diguyVec3fget_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...
 
diguyVec3fget_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 diguyAuthorVisualRegionMeshCreateFuncs_create_func
 
bdiRenderRegionMeshDatam_scripted_object
 
class bdiRenderRegionMeshData
 
 diguyAuthorVisualRegionMesh (void *internal_data)
 
virtual ~diguyAuthorVisualRegionMesh ()
 
bdiRenderRegionMeshDataget_scripted_object ()
 

Detailed Description

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

Constructor & Destructor Documentation

diguyAuthorVisualRegionMesh::diguyAuthorVisualRegionMesh ( void *  internal_data)
virtual diguyAuthorVisualRegionMesh::~diguyAuthorVisualRegionMesh ( )
virtual

Member Function Documentation

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().

Note
this will be slow. Use get_quads_data_ptr() if possible.
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().

Note
this will be slow. Use get_edges_data_ptr() if possible.
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 void diguyAuthorVisualRegionMesh::build ( )
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 void diguyAuthorVisualRegionMesh::unbuild ( )
virtual

See diguyAuthorVisualWaypoint::unbuild() for general information about this function.

virtual void diguyAuthorVisualRegionMesh::update ( int  update_flags)
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 void diguyAuthorVisualRegionMesh::draw ( )
virtual

See diguyAuthorVisualWaypoint::draw() for general information about this function.

virtual void diguyAuthorVisualRegionMesh::show ( )
virtual

See diguyAuthorVisualWaypoint::show() for general information about this function.

virtual void diguyAuthorVisualRegionMesh::hide ( )
virtual

See diguyAuthorVisualWaypoint::hide() for general information about this function.

bdiRenderRegionMeshData* diguyAuthorVisualRegionMesh::get_scripted_object ( )
inline

Friends And Related Function Documentation

friend class bdiRenderRegionMeshData
friend

Member Data Documentation

diguyAuthorVisualRegionMeshCreateFunc* diguyAuthorVisualRegionMesh::s_create_func
static
bdiRenderRegionMeshData* diguyAuthorVisualRegionMesh::m_scripted_object

The documentation for this class was generated from the following file: