
|
|
This file was automatically generated from diguyAuthorVisualRegionMesh.h. Do not edit this file directly; the changes will be lost.Includes: declspec_diguy.h
Contents:
Alphabetical IndexLink against: libdiguy
Summary:
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.
class diguyAuthorVisualRegionMesh
|
Function for setting the create function for region mesh visual subclass objects. This should be called after diguy_author_initialize(), but before any scenario is created of loaded.
class BDI_DECLSPEC_diguy diguyAuthorVisualRegionMesh { public: diguyAuthorVisualMaterial* get_visual_material(); diguyRegion* get_region(); int get_subregion_index(); int get_num_quads(); diguyVec3f get_quad_point(int quad, int corner); diguyVec3f* get_quads_data_ptr(); int get_num_edges(); diguyVec3f get_edge_point(int edge, int end); diguyVec3f* get_edges_data_ptr(); diguyVec3f get_mesh_origin(); int get_highlight_level(); int get_visible(); virtual void build(); virtual void unbuild(); virtual void update(int update_flags); virtual void draw(); virtual void show(); virtual void hide();
function diguyAuthorVisualRegionMesh::get_visual_material |
Prototype:
diguyAuthorVisualMaterial* get_visual_material();Returns the visual material to be used for rendering this object.
function diguyAuthorVisualRegionMesh::get_region |
Prototype:
diguyRegion* get_region();Returns the diguyRegion object that this visual is associated with. Note that one diguyRegion will most likely have multiple region mesh visuals.
function diguyAuthorVisualRegionMesh::get_subregion_index |
Prototype:
int 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.
function diguyAuthorVisualRegionMesh::get_num_quads |
Prototype:
int 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.
function diguyAuthorVisualRegionMesh::get_quad_point |
Prototype:
diguyVec3f 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.
function diguyAuthorVisualRegionMesh::get_quads_data_ptr |
Prototype:
diguyVec3f* 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().
function diguyAuthorVisualRegionMesh::get_num_edges |
Prototype:
int 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.
function diguyAuthorVisualRegionMesh::get_edge_point |
Prototype:
diguyVec3f 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.
function diguyAuthorVisualRegionMesh::get_edges_data_ptr |
Prototype:
diguyVec3f* 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().
function diguyAuthorVisualRegionMesh::get_mesh_origin |
Prototype:
diguyVec3f get_mesh_origin();Returns the origin of the geometry in the visual. All quads and edges will be relative to this origin.
function diguyAuthorVisualRegionMesh::get_highlight_level |
Prototype:
int 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.
function diguyAuthorVisualRegionMesh::get_visible |
Prototype:
int get_visible();Returns 1 if this visual should be visible, else 0.
| 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.
function diguyAuthorVisualRegionMesh::build |
Prototype:
Description:virtual void build();
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.
function diguyAuthorVisualRegionMesh::unbuild |
Prototype:
Description:virtual void unbuild();
See diguyAuthorVisualWaypoint::unbuild() for general information about this function.
function diguyAuthorVisualRegionMesh::update |
Prototype:
Description:virtual void update(int update_flags);
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.
function diguyAuthorVisualRegionMesh::draw |
Prototype:
Description:virtual void draw();
See diguyAuthorVisualWaypoint::draw() for general information about this function.
function diguyAuthorVisualRegionMesh::show |
Prototype:
Description:virtual void show();
See diguyAuthorVisualWaypoint::show() for general information about this function.
function diguyAuthorVisualRegionMesh::hide |
Prototype:
Description:virtual void hide();
See diguyAuthorVisualWaypoint::hide() for general information about this function.
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.