DI-Guy SDK Documentation  13.5
diguyAuthorVisualWaypoint Class Reference

Link against: libdiguy More...

#include <diguyAuthorVisualWaypoint.h>

Public Member Functions

diguyAuthorVisualMaterialget_visual_material ()
 Returns the visual material to be used for rendering this object. More...
 
int get_visible ()
 Returns 1 if this visual should be visible, else 0. More...
 
diguyWaypointget_waypoint ()
 Returns a pointer to the waypoint this visual is associated with. 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 ()
 unbuild() will be called by DI-Guy when it is time for a renderer-specific visual object to be destroyed. More...
 
virtual void update (int update_flags)
 update() will be called by DI-Guy when this visual has changed state and needs to be updated in some way. More...
 
virtual void draw ()
 draw() will be called by DI-Guy when it is time for a renderer-specific visual object to be drawn. More...
 
virtual void show ()
 show() will be called by DI-Guy if the visibility status of this visual has changed to be visible. More...
 
virtual void hide ()
 hide() will be called by DI-Guy if the visibility status of this visual has changed to be not visible. 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 diguyAuthorVisualWaypointCreateFuncs_create_func
 
bdiBeadWaypointm_scripted_object
 
diguyAuthorVisualMaterialm_visual_material
 
class diguyWaypoint
 
class bdiBeadWaypoint
 
 diguyAuthorVisualWaypoint (void *internal_data)
 
virtual ~diguyAuthorVisualWaypoint ()
 
bdiBeadWaypointget_scripted_object ()
 
virtual void internal_get_position (float *tx, float *ty, float *tz)
 
virtual void internal_get_orientation (float *rz, float *rx, float *ry)
 

Detailed Description

Link against: libdiguy

Summary:

The diguyAuthorVisualWaypoint class provides an interface for creating supplemental visuals needed for creating DI-Guy scenarios in a Host IG.

Waypoint visuals are used for visualizing waypoints on a character path.

Constructor & Destructor Documentation

diguyAuthorVisualWaypoint::diguyAuthorVisualWaypoint ( void *  internal_data)
protected
virtual diguyAuthorVisualWaypoint::~diguyAuthorVisualWaypoint ( )
protectedvirtual

Member Function Documentation

diguyAuthorVisualMaterial* diguyAuthorVisualWaypoint::get_visual_material ( )

Returns the visual material to be used for rendering this object.

int diguyAuthorVisualWaypoint::get_visible ( )

Returns 1 if this visual should be visible, else 0.

diguyWaypoint* diguyAuthorVisualWaypoint::get_waypoint ( )

Returns a pointer to the waypoint this visual is associated with.

Most of the information needed to create the visual can be retrieved using diguyWaypoint function calls.

virtual void diguyAuthorVisualWaypoint::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.

Waypoints are typically represented by relatively complex set of cylinders and cones. The provided reference implementation diguyAuthorVisualWaypoint subclass should be consulted for how to create waypoint visual components.

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 diguyAuthorVisualWaypoint::unbuild ( )
virtual

unbuild() will be called by DI-Guy when it is time for a renderer-specific visual object to be destroyed.

In general this function should undo all operations and deallocate all objects created during the build() function call.

virtual void diguyAuthorVisualWaypoint::update ( int  update_flags)
virtual

update() will be called by DI-Guy when this visual has changed state and needs to be updated in some way.

The update_flags argument will be a value from the diguyAuthorVisualUpdateFlag enumeration:

DIGUY_GRAPHICS_VISUAL_UPDATE_GEOMETRY

 The overall geometry of the visual needs to be updated.  This
 means that polygons, lines, and whatever other graphics
 primitives the visual uses need to be recreated.

DIGUY_GRAPHICS_VISUAL_UPDATE_POSITION

 The position and/or orientation of the visual needs to be
 updated.  The overall geometry of the visual (polygons, lines,
 etc.) remains unchanged, and don't need to be recreated.

 If the visual can be relocated via changing the offset of a
 scene graph node it can save time to not recreate a lot of
 geometry.

 If the visual can't be relocated in such a way, the entire set
 of geometry used by the visual; essentially, doing the same
 operation as for DIGUY_GRAPHICS_VISUAL_UPDATE_GEOMETRY.

DIGUY_GRAPHICS_VISUAL_UPDATE_MATERIAL

 The material of the visual needs to be updated.  This can include
 color, fill options, line width, etc.  The geometry and position
 of the visual remain the same.  The get_visual_material()
 function should be called to retrieve the updated materials.

 For some renderers it can make more sense to just recreate all of
 the visual geometry with the updated material settings.

DIGUY_GRAPHICS_VISUAL_UPDATE_ALL

 All aspects of the visual need to be updated.
virtual void diguyAuthorVisualWaypoint::draw ( )
virtual

draw() will be called by DI-Guy when it is time for a renderer-specific visual object to be drawn.

Immediate Mode:

Immediate mode renderers almost always override this function, to draw the visual.

Scene Graph:

Scene graph renderers usually do not override this function, as draw operations are usually taken care of automatically by the scene graph.

virtual void diguyAuthorVisualWaypoint::show ( )
virtual

show() will be called by DI-Guy if the visibility status of this visual has changed to be visible.

virtual void diguyAuthorVisualWaypoint::hide ( )
virtual

hide() will be called by DI-Guy if the visibility status of this visual has changed to be not visible.

bdiBeadWaypoint* diguyAuthorVisualWaypoint::get_scripted_object ( )
inlineprotected
virtual void diguyAuthorVisualWaypoint::internal_get_position ( float *  tx,
float *  ty,
float *  tz 
)
protectedvirtual
virtual void diguyAuthorVisualWaypoint::internal_get_orientation ( float *  rz,
float *  rx,
float *  ry 
)
protectedvirtual

Friends And Related Function Documentation

friend class diguyWaypoint
friend
friend class bdiBeadWaypoint
friend

Member Data Documentation

diguyAuthorVisualWaypointCreateFunc* diguyAuthorVisualWaypoint::s_create_func
static
bdiBeadWaypoint* diguyAuthorVisualWaypoint::m_scripted_object
protected
diguyAuthorVisualMaterial* diguyAuthorVisualWaypoint::m_visual_material
protected

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