DI-Guy SDK Documentation  13.1
diguyAuthorVisualObjectHandle Class Reference

Link against: libdiguy More...

#include <diguyAuthorVisualObjectHandle.h>

Public Types

enum  {
  HANDLE_SHAPE_CYLINDER = 0, HANDLE_SHAPE_CONE, HANDLE_SHAPE_SPHERE, HANDLE_SHAPE_PATH_BEAD,
  HANDLE_SHAPE_PATH_STOP_SIGN
}
 The shapes the handle can have. More...
 

Public Member Functions

diguyAuthorVisualMaterialget_visual_material ()
 Returns the visual material to be used for rendering this object. More...
 
int get_handle_shape ()
 Returns the handle shape. More...
 
float get_radius ()
 Returns the handle radius, for those shapes that have one, including: More...
 
float get_height ()
 Returns the handle height, for those shapes that have one, including: More...
 
float get_bead_depth ()
 Returns the bead depth along the X axis, for those shapes that have one, including: More...
 
float get_bead_arm_thickness ()
 
int get_inverted ()
 Returns whether the handle shape should be inverted. More...
 
diguyVec3f get_position ()
 Returns the position, in meters from the origin, of the object handle in the DI-Guy global coordinate system. More...
 
diguyVec3d get_position_double ()
 Returns the high precision position of the object handle. More...
 
diguyVec3f get_orientation ()
 Returns the orientation, in degrees, of the object handle in the DI-Guy global coordinate system. More...
 
long get_uid ()
 Returns the uid (unique identifier) of this object handle. 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 ()
 See diguyAuthorVisualWaypoint::build() for general information about this function. 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.

class bdiScenarioCharacter
 
class bdiBead
 
class bdiBeadAction
 
class bdiScenarioEditor
 
static diguyAuthorVisualObjectHandleCreateFuncs_create_func
 
void * m_internal_data
 
bdiGeometryVisualMaterial * m_internal_material
 
bool m_owns_internal_material
 
int m_handle_shape
 
float m_size1
 
float m_size2
 
float m_size3
 
int m_inverted
 
bdiFarPosition * m_position
 
bdiVec3f * m_orientation
 
long m_uid
 
int m_visible
 
 diguyAuthorVisualObjectHandle (void *internal_data)
 
virtual ~diguyAuthorVisualObjectHandle ()
 
void set_shape_to_selection_disk (float radius=0.5f, float height=0.05f)
 
void set_shape_to_selection_cone (float radius=0.17f, float height=0.3f)
 
void set_shape_to_sphere (float radius)
 
void set_shape_to_path_bead ()
 
void set_shape_to_path_stop_sign ()
 
void set_internal_material (bdiGeometryVisualMaterial *mtl)
 

Detailed Description

Link against: libdiguy

Summary:

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

Object handle visuals are used for simple visuals such as beads on character paths, selection handles, etc.

Member Enumeration Documentation

anonymous enum

The shapes the handle can have.

HANDLE_SHAPE_CYLINDER

 A cylinder oriented along the Z axis, with its base at the
 origin.

HANDLE_SHAPE_CONE

 A cone oriented along the Z axis, with its base at the origin.
 If get_inverted() returns 1, the point will be at the origin.

HANDLE_SHAPE_SPHERE

 A sphere, centered at the origin.

HANDLE_SHAPE_PATH_BEAD

 Usually a plus sign with depth, oriented so it can rotate around
 the X axis.

HANDLE_SHAPE_PATH_STOP_SIGN

 Usually an octagon with depth, oriented so it can rotate around
 the X axis.
Enumerator
HANDLE_SHAPE_CYLINDER 
HANDLE_SHAPE_CONE 
HANDLE_SHAPE_SPHERE 
HANDLE_SHAPE_PATH_BEAD 
HANDLE_SHAPE_PATH_STOP_SIGN 

Constructor & Destructor Documentation

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

Member Function Documentation

diguyAuthorVisualMaterial* diguyAuthorVisualObjectHandle::get_visual_material ( )

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

int diguyAuthorVisualObjectHandle::get_handle_shape ( )
inline

Returns the handle shape.

This will be one of the enum values above.

float diguyAuthorVisualObjectHandle::get_radius ( )

Returns the handle radius, for those shapes that have one, including:

  • cylinder
  • cone
  • sphere
  • path_bead
  • path_stop_sign
float diguyAuthorVisualObjectHandle::get_height ( )

Returns the handle height, for those shapes that have one, including:

  • cylinder
  • cone
float diguyAuthorVisualObjectHandle::get_bead_depth ( )

Returns the bead depth along the X axis, for those shapes that have one, including:

  • path_bead
  • path_stop_sign
float diguyAuthorVisualObjectHandle::get_bead_arm_thickness ( )
int diguyAuthorVisualObjectHandle::get_inverted ( )

Returns whether the handle shape should be inverted.

Valid for:

  • cone
diguyVec3f diguyAuthorVisualObjectHandle::get_position ( )

Returns the position, in meters from the origin, of the object handle in the DI-Guy global coordinate system.

See diguyCharacter::set_position() for a description of the coordinate system.

diguyVec3d diguyAuthorVisualObjectHandle::get_position_double ( )

Returns the high precision position of the object handle.

diguyVec3f diguyAuthorVisualObjectHandle::get_orientation ( )

Returns the orientation, in degrees, of the object handle in the DI-Guy global coordinate system.

See diguyCharacter::set_position() for a description of the coordinate system.

long diguyAuthorVisualObjectHandle::get_uid ( )

Returns the uid (unique identifier) of this object handle.

int diguyAuthorVisualObjectHandle::get_visible ( )

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

virtual void diguyAuthorVisualObjectHandle::build ( )
virtual

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

virtual void diguyAuthorVisualObjectHandle::unbuild ( )
virtual

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

virtual void diguyAuthorVisualObjectHandle::update ( int  update_flags)
virtual

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

DIGUY_GRAPHICS_VISUAL_UPDATE_GEOMETRY

 Object handles have different shapes based on the handle shape
 returned by get_handle_shape().
virtual void diguyAuthorVisualObjectHandle::draw ( )
virtual

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

virtual void diguyAuthorVisualObjectHandle::show ( )
virtual

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

virtual void diguyAuthorVisualObjectHandle::hide ( )
virtual

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

void diguyAuthorVisualObjectHandle::set_shape_to_selection_disk ( float  radius = 0.5f,
float  height = 0.05f 
)
protected
void diguyAuthorVisualObjectHandle::set_shape_to_selection_cone ( float  radius = 0.17f,
float  height = 0.3f 
)
protected
void diguyAuthorVisualObjectHandle::set_shape_to_sphere ( float  radius)
protected
void diguyAuthorVisualObjectHandle::set_shape_to_path_bead ( )
protected
void diguyAuthorVisualObjectHandle::set_shape_to_path_stop_sign ( )
protected
void diguyAuthorVisualObjectHandle::set_internal_material ( bdiGeometryVisualMaterial *  mtl)
protected

Friends And Related Function Documentation

friend class bdiScenarioCharacter
friend
friend class bdiBead
friend
friend class bdiBeadAction
friend
friend class bdiScenarioEditor
friend

Member Data Documentation

diguyAuthorVisualObjectHandleCreateFunc* diguyAuthorVisualObjectHandle::s_create_func
static
void* diguyAuthorVisualObjectHandle::m_internal_data
protected
bdiGeometryVisualMaterial* diguyAuthorVisualObjectHandle::m_internal_material
protected
bool diguyAuthorVisualObjectHandle::m_owns_internal_material
protected
int diguyAuthorVisualObjectHandle::m_handle_shape
protected
float diguyAuthorVisualObjectHandle::m_size1
protected
float diguyAuthorVisualObjectHandle::m_size2
protected
float diguyAuthorVisualObjectHandle::m_size3
protected
int diguyAuthorVisualObjectHandle::m_inverted
protected
bdiFarPosition* diguyAuthorVisualObjectHandle::m_position
protected
bdiVec3f* diguyAuthorVisualObjectHandle::m_orientation
protected
long diguyAuthorVisualObjectHandle::m_uid
protected
int diguyAuthorVisualObjectHandle::m_visible
protected

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