![]() |
DI-Guy SDK Documentation
13.6
|
In addition to the information here, there is a substantial amount of documentation in the DI-Guy source code.
Most functions in the C++ header files have documentation comments with them. While doing the integration you will likely be referring to the source code documentation often.
In addition, there is an OpenSceneGraph (OSG) based example IG implementation, with source code, to provide concrete examples of how the various functions should be called and classes written. You will probably copy the provided example classes and replace the OSG code with code specific to your 3D environment.
The classes provided by DI-Guy can be broken into two groups: classes for interchanging information between your IG and Author, and classes for rendering 3D editing visuals.
The class diguyAuthorInterface is the primary way you send and receive information to and from DI-Guy. Its functions can be categorized into the following groups:
The API has classes that provide the IG with the information and infrastructure needed to render 3D editing visuals. These must be subclassed by you so you can do things appropriate to your IG. As with the DI-Guy Graphics API, you must register functions for creating instances of your subclasses when DI-Guy needs an object pointer to the base class.
\note These are suggested visual representations of editing visuals. If, for example, you would prefer different colors for editing visuals, you are free to ignore the colors specified by the visual’s material. If you would prefer different geometry altogether for waypoints, for example, a textured disc on the ground – you are free to ignore the polygons suggested in the reference implementation.
Most of the geometry visual classes follow the same template, one similar the DI-Guy Graphics API classes. Each of them has most of the following functions:
update(). Called when the geometry for the visual needs to be updated in some way. This can be because the overall lines or polygons need to be created or recreated, the position of the visual has changed, or the material has changed. It is common for build() and update() to use a shared utility function for creating polygons, and so on.
Author visual materials are used to specify basic color and other associated information suggested for rendering Author editing visuals. They specify pen color (used for drawing lines), brush color (used for filling polygons), line width, and so on.
Author visuals in general require less information than full DI-Guy Graphics API materials as stored in diguyGraphicsMaterial objects. Because of this a "light-weight" class is used that contains only basic information. All Author visuals provide a pointer to an Author visual material.
The class diguyAuthorMaterial is used for accessing material information.
Author multiline visuals are used to render path splines. They are a collection of line segments connected end to end. They should be rendered using the visual material’s pen color. As paths become selected and unselected the color of the pen changes.
The class diguyAuthorVisualMultiline is used for accessing multiline visual information.
Author waypoint visuals are used to render path waypoints. Each waypoint is a collection of polygonal solids that show the waypoint’s position and orientation. They should be rendered using the visual material’s brush color. As waypoints become selected and unselected the color of the brush changes.
The class diguyAuthorVisualWaypoint is used for accessing waypoint visual information.
Author object handle visuals are used to render various simple objects that need only a position and orientation. These include path beads, character selection discs, and terrain point pickers. The object handles specify the basic shape the handle should have (disc, sphere, cone, and so on) and the radii, height and other measurements for these shapes. The colors of the object handles are usually dependent on their role.
The class diguyAuthorVisualObjectHandle is used for accessing object handle visual information.
Author region mesh visuals render the meshes needed for showing the bounds and contents of crowd regions and general regions. They contain the line segments that outline the region boundaries, and the polygons that make up the region interior. In general, the materials for regions are translucent so that stacked regions can be represented.
The class diguyAuthorVisualRegionMesh is used for accessing region mesh visual information.
The Author paintbrush represents the spherical volume that shows where region painting will occur in certain Author input modes. The material for the paintbrush is translucent so that the terrain inside the brush can be seen.
The class diguyAuthorVisualRegionPaintbrush is used for accessing paintbrush visual information
[<< IG Integration] [Home] [Top of Page]