DI-Guy SDK Documentation  13.1
10.1 - DI-Guy Programming Examples

Table of Contents

The DI-Guy SDK offers many sample programs to help get you started.

Examples are in ./programming_examples.

The contents of the DI-Guy programming examples for Windows is as follows:

OpenGL examples. This is the main programming example directory. It contains examples of working with the DI-Guy OpenGL solution and demonstrates common API features across all rendering platforms.

Graphics API examples. The Graphics API is DI-Guy’s open source class-based method for integrating DI-Guy character graphics with various rendering solutions, including OpenGL, OpenSceneGraph, and DirectX 9. The demos show both Immediate Mode (OpenGL), Scene Graph (OpenSceneGraph) style and DirectX 9 rendering, and show how to also use your own geometry loader (not recommended if using skinned characters).

DI-Guy networking. SDK examples of broadcasting and receiving human characters for DIS, HLA 1.3, and HLA 1516. The examples use VR-Link, but are intended to assist developers with networking DI-Guy with other third party and customer proprietary networking solutions.

Plug-ins. You can create plug-ins, that is, dynamically linked libraries that can be optionally linked to DI-Guy applications at load time. The most typical use is plug-in software that supplements DI-Guy Scenario.

If you install DI-Guy for Vega Prime, software examples will be installed into Vega Prime’s resources directory in the vpDiguy directory.

DI-Guy digest. The DI-Guy digest is an XML file that describes DI-Guy content in detail, including character types, appearances, and motion information. Users that create custom content can recompile the digest, so that their content will be part of the digest.

10.1.1 OpenGL Examples

OpenGL is DI-Guy’s default for programming examples. This means that the diguy_ogl directory contains a far more extensive set of examples than the other directories. This does not mean that functionality shown in the OpenGL examples does not work on the other platforms. In fact, the opposite is true. Even if you are not using the DI-Guy OpenGL renderer, do not let that stop you from using the DI-Guy OpenGL examples, which demonstrate lots of DI-Guy functionality that works on all the platforms. There are also a few examples in the dx9 directory, such as intersection example, that are quite useful.

  • AI Playback. Similar to simple playback, but with DI-Guy AI also activated when the scenario was built in DI-Guy Scenario.
  • AI Populate. Use DI-Guy AI completely through the SDK.
  • Culling. Shows culling of characters based on camera frustum. Includes demonstrates using far positioning.
  • FaceFX. A demonstration of DI-Guy Expressive Faces using the SDK.
  • Gaze. Demonstration of the majority of the Gaze API for commanding characters to look at thing.
  • Get Position. A simple example of querying DI-Guy characters for information.
  • Guide. An excellent demonstration of various DI-Guy guide algorithms in action. A guide is useful when a character's position is being driven intermittently from an external source.
  • Intersection Test. Demonstrates vector intersection to DI-Guy characters.
  • Load Manager. A demonstration of the DI-Guy Load Manager, a method for improving performance in single view DI-Guy applications that manages various LOD-type activities.
  • LODs. Shows DI-Guy Level-of-Detail being activated, including a demonstration using far positioning.
  • Path API. A demonstration of some simple path commands including setting waypoints, action beads, actions, and script beads on a path.
  • Pose. The back joint of a character is rotated directly through the API. In addition, the entire pose of a character is captured and displayed on a second character.
  • Rolling Pitching Ship. DI-Guy characters parented to a moving ship maintaining upright Z posture.
  • Shadow Playback. DI-Guy playback with different shaders.
  • Simple. Our simplest example. Instantiate a DI-Guy soldier character and command him to walk, walk in a crouched posture, go prone, and fire his weapon.
  • Simple Playback. another simple example. Play a .dss file as output from DI-Guy Scenario.
  • View Far Settings. Demonstrates fog, light, and camera callbacks. Also shows a scenario running far from the origin, and how to coordinate the camera to avoid jitter caused by lack of precision.
  • View Settings. Demonstrates various methods of setting the camera, fog, and light

[Home] [Top of Page]