Drag[en]gine Game Engine  1.0
deDebugDrawer Class Reference

Debug Drawer Object. More...

#include <deDebugDrawer.h>

Inheritance diagram for deDebugDrawer:
deResource deObject

Public Member Functions

Management
const decDVectorGetPosition () const
 Retrieves the position. More...
 
void SetPosition (const decDVector &position)
 Sets the position. More...
 
const decQuaternionGetOrientation () const
 Retrieves the orientation. More...
 
void SetOrientation (const decQuaternion &orientation)
 Sets the orientation. More...
 
const decVectorGetScale () const
 Retrieves the scale. More...
 
void SetScale (const decVector &scale)
 Sets the scale. More...
 
bool GetVisible () const
 Determines if the debug drawer is visible. More...
 
void SetVisible (bool visible)
 Sets if the debug drawer is visible. More...
 
bool GetXRay () const
 Determines if the debug drawer is rendered in x-ray mode. More...
 
void SetXRay (bool xray)
 Sets if the debug drawer is rendered in x-ray mode. More...
 
Shape Management
int GetShapeCount () const
 Retrieves the count of shapes. More...
 
deDebugDrawerShapeGetShapeAt (int index) const
 Retrieves the shape at the given index. More...
 
int IndexOfShape (deDebugDrawerShape *shape) const
 Retrieve index of the given shape. More...
 
bool HasShape (deDebugDrawerShape *shape) const
 Determines if the 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
deBaseGraphicDebugDrawerGetGraphicDebugDrawer () const
 Retrieves the graphics system peer object. More...
 
void SetGraphicDebugDrawer (deBaseGraphicDebugDrawer *graDebugDrawer)
 Sets the graphics system peer object. More...
 
Linked List
deWorldGetParentWorld () const
 Retrieves the parent world or NULL. More...
 
void SetParentWorld (deWorld *world)
 Sets the parent world or NULL. More...
 
deDebugDrawerGetLLWorldPrev () const
 Retrieves the previous debug drawer in the parent world linked list. More...
 
void SetLLWorldPrev (deDebugDrawer *debugDrawer)
 Sets the next debug drawer in the parent world linked list. More...
 
deDebugDrawerGetLLWorldNext () const
 Retrieves the next debug drawer in the parent world linked list. More...
 
void SetLLWorldNext (deDebugDrawer *debugDrawer)
 Sets the next debug drawer in the parent world linked list. 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)
 Creates a new debug drawer object with the given resource manager. More...
 
virtual ~deDebugDrawer ()
 Cleans up the debug drawer. 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 informations. 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.
Author
Pl├╝ss Roland
Version
1.0
Date
2014

Constructor & Destructor Documentation

◆ deDebugDrawer()

deDebugDrawer::deDebugDrawer ( deDebugDrawerManager manager)

Creates a new debug drawer object with the given resource manager.

◆ ~deDebugDrawer()

virtual deDebugDrawer::~deDebugDrawer ( )
protectedvirtual

Cleans up the 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.

Referenced by GetXRay().

◆ GetGraphicDebugDrawer()

deBaseGraphicDebugDrawer* deDebugDrawer::GetGraphicDebugDrawer ( ) const
inline

Retrieves the graphics system peer object.

References SetGraphicDebugDrawer().

◆ GetLLWorldNext()

deDebugDrawer* deDebugDrawer::GetLLWorldNext ( ) const
inline

Retrieves the next debug drawer in the parent world linked list.

References SetLLWorldNext().

◆ GetLLWorldPrev()

deDebugDrawer* deDebugDrawer::GetLLWorldPrev ( ) const
inline

Retrieves the previous debug drawer in the parent world linked list.

References SetLLWorldPrev().

◆ GetOrientation()

const decQuaternion& deDebugDrawer::GetOrientation ( ) const
inline

Retrieves the orientation.

References SetOrientation().

◆ GetParentWorld()

deWorld* deDebugDrawer::GetParentWorld ( ) const
inline

Retrieves the parent world or NULL.

References SetParentWorld().

◆ GetPosition()

const decDVector& deDebugDrawer::GetPosition ( ) const
inline

Retrieves the position.

References SetPosition().

◆ GetScale()

const decVector& deDebugDrawer::GetScale ( ) const
inline

Retrieves the scale.

References SetScale().

◆ GetShapeAt()

deDebugDrawerShape* deDebugDrawer::GetShapeAt ( int  index) const

Retrieves the shape at the given index.

Referenced by GetXRay().

◆ GetShapeCount()

int deDebugDrawer::GetShapeCount ( ) const

Retrieves the count of shapes.

Referenced by GetXRay().

◆ GetVisible()

bool deDebugDrawer::GetVisible ( ) const
inline

Determines if the debug drawer is visible.

References SetVisible().

◆ GetXRay()

◆ HasShape()

bool deDebugDrawer::HasShape ( deDebugDrawerShape shape) const

Determines if the shape exists.

Referenced by GetXRay().

◆ IndexOfShape()

int deDebugDrawer::IndexOfShape ( deDebugDrawerShape shape) const

Retrieve index of the given shape.

Referenced by GetXRay().

◆ NotifyShapeColorChanged()

void deDebugDrawer::NotifyShapeColorChanged ( )

Notify peers that shape edge or fill colors changed.

Referenced by GetXRay().

◆ NotifyShapeContentChanged()

void deDebugDrawer::NotifyShapeContentChanged ( )

Notify peers that shape shapes or faces changed.

Referenced by GetXRay().

◆ NotifyShapeGeometryChanged()

void deDebugDrawer::NotifyShapeGeometryChanged ( )

Notify peers that shape position, orientation or scaling changed.

Referenced by GetXRay().

◆ NotifyShapeLayoutChanged()

void deDebugDrawer::NotifyShapeLayoutChanged ( )

Notify peers that shapes have been added or removed.

Referenced by GetXRay().

◆ RemoveAllShapes()

void deDebugDrawer::RemoveAllShapes ( )

Removes all collision shapes.

calls NotifyShapeLayoutChanged.

Referenced by GetXRay().

◆ RemoveShape()

void deDebugDrawer::RemoveShape ( deDebugDrawerShape shape)

Removes the collision shape.

calls NotifyShapeLayoutChanged.

Referenced by GetXRay().

◆ RemoveShapeFrom()

void deDebugDrawer::RemoveShapeFrom ( int  index)

Removes the collision shape at the given index.

calls NotifyShapeLayoutChanged.

Referenced by GetXRay().

◆ SetGraphicDebugDrawer()

void deDebugDrawer::SetGraphicDebugDrawer ( deBaseGraphicDebugDrawer graDebugDrawer)

Sets the graphics system peer object.

Referenced by GetGraphicDebugDrawer().

◆ SetLLWorldNext()

void deDebugDrawer::SetLLWorldNext ( deDebugDrawer debugDrawer)

Sets the next debug drawer in the parent world linked list.

Referenced by GetLLWorldNext().

◆ SetLLWorldPrev()

void deDebugDrawer::SetLLWorldPrev ( deDebugDrawer debugDrawer)

Sets the next debug drawer in the parent world linked list.

Referenced by GetLLWorldPrev().

◆ SetOrientation()

void deDebugDrawer::SetOrientation ( const decQuaternion orientation)

Sets the orientation.

Referenced by GetOrientation().

◆ SetParentWorld()

void deDebugDrawer::SetParentWorld ( deWorld world)

Sets the parent world or NULL.

Referenced by GetParentWorld().

◆ SetPosition()

void deDebugDrawer::SetPosition ( const decDVector position)

Sets the position.

Referenced by GetPosition().

◆ SetScale()

void deDebugDrawer::SetScale ( const decVector scale)

Sets the scale.

Referenced by GetScale().

◆ SetVisible()

void deDebugDrawer::SetVisible ( bool  visible)

Sets if the debug drawer is visible.

Referenced by GetVisible().

◆ SetXRay()

void deDebugDrawer::SetXRay ( bool  xray)

Sets if the debug drawer is rendered in x-ray mode.

Referenced by GetXRay().


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