Drag[en]gine Game Engine
1.21
|
Debug Drawer Object. More...
#include <deDebugDrawer.h>
Public Types | |
typedef deTObjectReference< deDebugDrawer > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
Type holding strong reference. More... | |
Public Member Functions | |
Management | |
const decDVector & | GetPosition () const |
Position. More... | |
void | SetPosition (const decDVector &position) |
Set position. More... | |
const decQuaternion & | GetOrientation () const |
Orientation. More... | |
void | SetOrientation (const decQuaternion &orientation) |
Set orientation. More... | |
const decVector & | GetScale () 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... | |
deDebugDrawerShape * | GetShapeAt (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 | |
deBaseGraphicDebugDrawer * | GetPeerGraphic () const |
Graphics system peer object. More... | |
void | SetPeerGraphic (deBaseGraphicDebugDrawer *peer) |
Set graphics system peer object. More... | |
Public Member Functions inherited from deResource | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () 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 | |
deWorld * | GetParentWorld () const |
Parent world or NULL. More... | |
void | SetParentWorld (deWorld *world) |
Set parent world or NULL. More... | |
deDebugDrawer * | GetLLWorldPrev () 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... | |
deDebugDrawer * | GetLLWorldNext () 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... | |
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.
Type holding strong reference.
deDebugDrawer::deDebugDrawer | ( | deDebugDrawerManager * | manager | ) |
Create new debug drawer object with the given resource manager.
|
protectedvirtual |
Clean up debug drawer.
void deDebugDrawer::AddShape | ( | deDebugDrawerShape * | shape | ) |
Adds a collision shape.
calls NotifyShapeLayoutChanged.
|
inline |
Next debug drawer in the parent world linked list.
|
inline |
Previous debug drawer in the parent world linked list.
|
inline |
Orientation.
|
inline |
Parent world or NULL.
|
inline |
Graphics system peer object.
|
inline |
Position.
|
inline |
Scale.
deDebugDrawerShape* deDebugDrawer::GetShapeAt | ( | int | index | ) | const |
Shape at the given index.
int deDebugDrawer::GetShapeCount | ( | ) | const |
Count of shapes.
|
inline |
Debug drawer is visible.
|
inline |
Debug drawer is rendered in x-ray mode.
bool deDebugDrawer::HasShape | ( | deDebugDrawerShape * | shape | ) | const |
Shape exists.
int deDebugDrawer::IndexOfShape | ( | deDebugDrawerShape * | shape | ) | const |
Retrieve index of the given shape.
void deDebugDrawer::NotifyShapeColorChanged | ( | ) |
Notify peers that shape edge or fill colors changed.
void deDebugDrawer::NotifyShapeContentChanged | ( | ) |
Notify peers that shape shapes or faces changed.
void deDebugDrawer::NotifyShapeGeometryChanged | ( | ) |
Notify peers that shape position, orientation or scaling changed.
void deDebugDrawer::NotifyShapeLayoutChanged | ( | ) |
Notify peers that shapes have been added or removed.
void deDebugDrawer::RemoveAllShapes | ( | ) |
Removes all collision shapes.
calls NotifyShapeLayoutChanged.
void deDebugDrawer::RemoveShape | ( | deDebugDrawerShape * | shape | ) |
Removes the collision shape.
calls NotifyShapeLayoutChanged.
void deDebugDrawer::RemoveShapeFrom | ( | int | index | ) |
Removes the collision shape at the given index.
calls NotifyShapeLayoutChanged.
void deDebugDrawer::SetLLWorldNext | ( | deDebugDrawer * | debugDrawer | ) |
Set next debug drawer in the parent world linked list.
void deDebugDrawer::SetLLWorldPrev | ( | deDebugDrawer * | debugDrawer | ) |
Set next debug drawer in the parent world linked list.
void deDebugDrawer::SetOrientation | ( | const decQuaternion & | orientation | ) |
Set orientation.
void deDebugDrawer::SetParentWorld | ( | deWorld * | world | ) |
Set parent world or NULL.
void deDebugDrawer::SetPeerGraphic | ( | deBaseGraphicDebugDrawer * | peer | ) |
Set graphics system peer object.
void deDebugDrawer::SetPosition | ( | const decDVector & | position | ) |
Set position.
void deDebugDrawer::SetScale | ( | const decVector & | scale | ) |
Set scale.
void deDebugDrawer::SetVisible | ( | bool | visible | ) |
Set if debug drawer is visible.
void deDebugDrawer::SetXRay | ( | bool | xray | ) |
Set if debug drawer is rendered in x-ray mode.