Drag[en]gine Game Engine  1.21
deDebugDrawer Class Reference

Debug Drawer Object. More...

#include <deDebugDrawer.h>

Inheritance diagram for deDebugDrawer:
deResource deObject

Public Types

typedef deTObjectReference< deDebugDrawerRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
const decDVectorGetPosition () const
 Position. More...
 
void SetPosition (const decDVector &position)
 Set position. More...
 
const decQuaternionGetOrientation () const
 Orientation. More...
 
void SetOrientation (const decQuaternion &orientation)
 Set orientation. More...
 
const decVectorGetScale () const
 Scale. More...
 
void SetScale (const decVector &scale)
 Set scale. More...
 
bool GetVisible () const
 Debug drawer is visible. More...
 
void SetVisible (bool visible)
 Set if debug drawer is visible. More...
 
bool GetXRay () const
 Debug drawer is rendered in x-ray mode. More...
 
void SetXRay (bool xray)
 Set if debug drawer is rendered in x-ray mode. More...
 
Shape Management
int GetShapeCount () const
 Count of shapes. More...
 
deDebugDrawerShapeGetShapeAt (int index) const
 Shape at the given index. More...
 
int IndexOfShape (deDebugDrawerShape *shape) const
 Retrieve index of the given shape. More...
 
bool HasShape (deDebugDrawerShape *shape) const
 Shape exists. More...
 
void AddShape (deDebugDrawerShape *shape)
 Adds a collision shape. More...
 
void RemoveShape (deDebugDrawerShape *shape)
 Removes the collision shape. More...
 
void RemoveShapeFrom (int index)
 Removes the collision shape at the given index. More...
 
void RemoveAllShapes ()
 Removes all collision shapes. More...
 
void NotifyShapeColorChanged ()
 Notify peers that shape edge or fill colors changed. More...
 
void NotifyShapeGeometryChanged ()
 Notify peers that shape position, orientation or scaling changed. More...
 
void NotifyShapeContentChanged ()
 Notify peers that shape shapes or faces changed. More...
 
void NotifyShapeLayoutChanged ()
 Notify peers that shapes have been added or removed. More...
 
System Peers
deBaseGraphicDebugDrawerGetPeerGraphic () const
 Graphics system peer object. More...
 
void SetPeerGraphic (deBaseGraphicDebugDrawer *peer)
 Set graphics system peer object. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deDebugDrawer (deDebugDrawerManager *manager)
 Create new debug drawer object with the given resource manager. More...
 
virtual ~deDebugDrawer ()
 Clean up debug drawer. More...
 

Linked List

deWorldGetParentWorld () const
 Parent world or NULL. More...
 
void SetParentWorld (deWorld *world)
 Set parent world or NULL. More...
 
deDebugDrawerGetLLWorldPrev () const
 Previous debug drawer in the parent world linked list. More...
 
void SetLLWorldPrev (deDebugDrawer *debugDrawer)
 Set next debug drawer in the parent world linked list. More...
 
deDebugDrawerGetLLWorldNext () const
 Next debug drawer in the parent world linked list. More...
 
void SetLLWorldNext (deDebugDrawer *debugDrawer)
 Set next debug drawer in the parent world linked list. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Debug Drawer Object.

A debug drawer is a helper object useful for debuging various engine modules. The graphic module knows how to render efficiently debug drawers ontop of a rendered world. Engine modules can register a debug drawer with world objects to display useful information. Every debug drawer object specifies a list of shapes and visual information on how to render them. Debug drawers can be individually set invisible if required.

Parameters
There are a couple of parameters that can be set for a debug drawer to define the appearance on screen. The visible flag determines if the debug drawer is rendered at all. The X-Ray flag determines if the shape can be seen through the already rendered geometry or if it is clipped by the depth buffer. The edge and fill color flag determine the color and transparency of the edges and the faces of the shape. By default the edge is set to white fully opaque and the fill is set to white fully transparent.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ deDebugDrawer()

deDebugDrawer::deDebugDrawer ( deDebugDrawerManager manager)

Create new debug drawer object with the given resource manager.

◆ ~deDebugDrawer()

virtual deDebugDrawer::~deDebugDrawer ( )
protectedvirtual

Clean up debug drawer.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddShape()

void deDebugDrawer::AddShape ( deDebugDrawerShape shape)

Adds a collision shape.

calls NotifyShapeLayoutChanged.

◆ GetLLWorldNext()

deDebugDrawer* deDebugDrawer::GetLLWorldNext ( ) const
inline

Next debug drawer in the parent world linked list.

◆ GetLLWorldPrev()

deDebugDrawer* deDebugDrawer::GetLLWorldPrev ( ) const
inline

Previous debug drawer in the parent world linked list.

◆ GetOrientation()

const decQuaternion& deDebugDrawer::GetOrientation ( ) const
inline

Orientation.

◆ GetParentWorld()

deWorld* deDebugDrawer::GetParentWorld ( ) const
inline

Parent world or NULL.

◆ GetPeerGraphic()

deBaseGraphicDebugDrawer* deDebugDrawer::GetPeerGraphic ( ) const
inline

Graphics system peer object.

◆ GetPosition()

const decDVector& deDebugDrawer::GetPosition ( ) const
inline

Position.

◆ GetScale()

const decVector& deDebugDrawer::GetScale ( ) const
inline

Scale.

◆ GetShapeAt()

deDebugDrawerShape* deDebugDrawer::GetShapeAt ( int  index) const

Shape at the given index.

◆ GetShapeCount()

int deDebugDrawer::GetShapeCount ( ) const

Count of shapes.

◆ GetVisible()

bool deDebugDrawer::GetVisible ( ) const
inline

Debug drawer is visible.

◆ GetXRay()

bool deDebugDrawer::GetXRay ( ) const
inline

Debug drawer is rendered in x-ray mode.

◆ HasShape()

bool deDebugDrawer::HasShape ( deDebugDrawerShape shape) const

Shape exists.

◆ IndexOfShape()

int deDebugDrawer::IndexOfShape ( deDebugDrawerShape shape) const

Retrieve index of the given shape.

◆ NotifyShapeColorChanged()

void deDebugDrawer::NotifyShapeColorChanged ( )

Notify peers that shape edge or fill colors changed.

◆ NotifyShapeContentChanged()

void deDebugDrawer::NotifyShapeContentChanged ( )

Notify peers that shape shapes or faces changed.

◆ NotifyShapeGeometryChanged()

void deDebugDrawer::NotifyShapeGeometryChanged ( )

Notify peers that shape position, orientation or scaling changed.

◆ NotifyShapeLayoutChanged()

void deDebugDrawer::NotifyShapeLayoutChanged ( )

Notify peers that shapes have been added or removed.

◆ RemoveAllShapes()

void deDebugDrawer::RemoveAllShapes ( )

Removes all collision shapes.

calls NotifyShapeLayoutChanged.

◆ RemoveShape()

void deDebugDrawer::RemoveShape ( deDebugDrawerShape shape)

Removes the collision shape.

calls NotifyShapeLayoutChanged.

◆ RemoveShapeFrom()

void deDebugDrawer::RemoveShapeFrom ( int  index)

Removes the collision shape at the given index.

calls NotifyShapeLayoutChanged.

◆ SetLLWorldNext()

void deDebugDrawer::SetLLWorldNext ( deDebugDrawer debugDrawer)

Set next debug drawer in the parent world linked list.

◆ SetLLWorldPrev()

void deDebugDrawer::SetLLWorldPrev ( deDebugDrawer debugDrawer)

Set next debug drawer in the parent world linked list.

◆ SetOrientation()

void deDebugDrawer::SetOrientation ( const decQuaternion orientation)

Set orientation.

◆ SetParentWorld()

void deDebugDrawer::SetParentWorld ( deWorld world)

Set parent world or NULL.

◆ SetPeerGraphic()

void deDebugDrawer::SetPeerGraphic ( deBaseGraphicDebugDrawer peer)

Set graphics system peer object.

◆ SetPosition()

void deDebugDrawer::SetPosition ( const decDVector position)

Set position.

◆ SetScale()

void deDebugDrawer::SetScale ( const decVector scale)

Set scale.

◆ SetVisible()

void deDebugDrawer::SetVisible ( bool  visible)

Set if debug drawer is visible.

◆ SetXRay()

void deDebugDrawer::SetXRay ( bool  xray)

Set if debug drawer is rendered in x-ray mode.


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