CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iBugPlug Struct Reference

Using this interface you can communicate with the BugPlug plugin. More...

#include <bugplug.h>

Inheritance diagram for iBugPlug:

iBase List of all members.

Public Methods

virtual void SetupDebugSector ()=0
 Setup the 'debug sector'. More...

virtual void DebugSectorBox (const csBox3 &box, float r, float g, float b, const char *name=0, iMeshObject *mesh=0)=0
 Add a colored filled box to the debug sector. More...

virtual void DebugSectorTriangle (const csVector3 &s1, const csVector3 &s2, const csVector3 &s3, float r, float g, float b)=0
 Add a transparent filled triangle to the debug sector. More...

virtual void SwitchDebugSector (const csReversibleTransform &trans)=0
 Switch BugPlug view to the debug sector. More...

virtual bool CheckDebugSector () const=0
 Returns true if the debug sector is currently visible. More...

virtual void SetupDebugView ()=0
 Setup the 'debug 2dview'. More...

virtual int DebugViewPoint (const csVector2 &point)=0
 Add a dragable point. More...

virtual void DebugViewLine (int i1, int i2)=0
 Add a line. More...

virtual void DebugViewBox (int i1, int i2)=0
 Add a box. More...

virtual int DebugViewPointCount () const=0
 Return the current number of points. More...

virtual const csVector2DebugViewGetPoint (int i) const=0
 Return a point. More...

virtual int DebugViewLineCount () const=0
 Return the current number of lines. More...

virtual void DebugViewGetLine (int i, int &i1, int &i2) const=0
 Return a line. More...

virtual int DebugViewBoxCount () const=0
 Return the current number of boxes. More...

virtual void DebugViewGetBox (int i, int &i1, int &i2) const=0
 Return a box. More...

virtual void DebugViewRenderObject (iBugPlugRenderObject *obj)=0
 Add some rendering code that will be rendered right before the points and lines are rendered. More...

virtual void DebugViewClearScreen (bool cs)=0
 Indicate if BugPlug should clear the screen before rendering the debug view. More...

virtual void SwitchDebugView ()=0
 Switch BugPlug view to the debug view. More...

virtual bool CheckDebugView () const=0
 Returns true if the debug view is currently visible. More...

virtual void AddCounter (const char *countername, int amount=1)=0
 Add an amount to a counter. More...

virtual void AddCounterEnum (const char *countername, int enumval, int amount=1)=0
 Add an amount to a enum-counter. More...

virtual void ResetCounter (const char *countername, int value=0)=0
 Reset some counter manually. More...

virtual void RemoveCounter (const char *countername)=0
 Remove a counter. More...


Detailed Description

Using this interface you can communicate with the BugPlug plugin.

This can be useful for specialized debugging operations.

Definition at line 51 of file bugplug.h.


Member Function Documentation

virtual void iBugPlug::AddCounter const char *    countername,
int    amount = 1
[pure virtual]
 

Add an amount to a counter.

Bugplug will automatically clear this counter every frame and show the last number, the average, the number of frames, and the total for every known counter. You don't have to specficially register a counter. Just by using this function BugPlug will know about the counter.

virtual void iBugPlug::AddCounterEnum const char *    countername,
int    enumval,
int    amount = 1
[pure virtual]
 

Add an amount to a enum-counter.

This is similar to a regular counter except that BugPlug will keep track of how many times every particular value is encountered. Enum-counters are displayed differently. BugPlug will automatically convert a counter to an enum-counter if you use this function on an existing counter and vice versa. BugPlug currently only supports enum values between 0 and 9.

virtual bool iBugPlug::CheckDebugSector   const [pure virtual]
 

Returns true if the debug sector is currently visible.

virtual bool iBugPlug::CheckDebugView   const [pure virtual]
 

Returns true if the debug view is currently visible.

virtual void iBugPlug::DebugSectorBox const csBox3   box,
float    r,
float    g,
float    b,
const char *    name = 0,
iMeshObject   mesh = 0
[pure virtual]
 

Add a colored filled box to the debug sector.

If name is not 0 it will be shown in BugPlug when the mouse is over the object. If iMeshObject* is not 0 it will be shown inside the box when the mouse is over the object.

virtual void iBugPlug::DebugSectorTriangle const csVector3   s1,
const csVector3   s2,
const csVector3   s3,
float    r,
float    g,
float    b
[pure virtual]
 

Add a transparent filled triangle to the debug sector.

The color will be max at s1 and completely black at s2 and s3.

virtual void iBugPlug::DebugViewBox int    i1,
int    i2
[pure virtual]
 

Add a box.

The two indices are as returned from DebugViewPoint().

virtual int iBugPlug::DebugViewBoxCount   const [pure virtual]
 

Return the current number of boxes.

virtual void iBugPlug::DebugViewClearScreen bool    cs [pure virtual]
 

Indicate if BugPlug should clear the screen before rendering the debug view.

True by default.

virtual void iBugPlug::DebugViewGetBox int    i,
int &    i1,
int &    i2
const [pure virtual]
 

Return a box.

virtual void iBugPlug::DebugViewGetLine int    i,
int &    i1,
int &    i2
const [pure virtual]
 

Return a line.

virtual const csVector2& iBugPlug::DebugViewGetPoint int    i const [pure virtual]
 

Return a point.

virtual void iBugPlug::DebugViewLine int    i1,
int    i2
[pure virtual]
 

Add a line.

The two indices are as returned from DebugViewPoint().

virtual int iBugPlug::DebugViewLineCount   const [pure virtual]
 

Return the current number of lines.

virtual int iBugPlug::DebugViewPoint const csVector2   point [pure virtual]
 

Add a dragable point.

Returns an index that can be used in a line.

virtual int iBugPlug::DebugViewPointCount   const [pure virtual]
 

Return the current number of points.

virtual void iBugPlug::DebugViewRenderObject iBugPlugRenderObject   obj [pure virtual]
 

Add some rendering code that will be rendered right before the points and lines are rendered.

If 0 the current object will be removed.

virtual void iBugPlug::RemoveCounter const char *    countername [pure virtual]
 

Remove a counter.

From this point on BugPlug will no longer show this counter (BugPlug will remove the counter internally).

virtual void iBugPlug::ResetCounter const char *    countername,
int    value = 0
[pure virtual]
 

Reset some counter manually.

Normally BugPlug will reset counters every frame but you can also reset it manually. If you reset an enum-counter all enum types are reset at once.

virtual void iBugPlug::SetupDebugSector   [pure virtual]
 

Setup the 'debug sector'.

The debug sector is a sector which you can fill with boxes and other objects. BugPlug can then switch the view to that sector so that the objects are rendered. This can be useful for debugging complicated systems in a graphical manner. This function will clear any previously created debug sector.

virtual void iBugPlug::SetupDebugView   [pure virtual]
 

Setup the 'debug 2dview'.

To this view a plugin or application can add various 2D objects (lines and points for example). This function will clear any previously created debug view.

virtual void iBugPlug::SwitchDebugSector const csReversibleTransform   trans [pure virtual]
 

Switch BugPlug view to the debug sector.

The given transform is given to the camera.

virtual void iBugPlug::SwitchDebugView   [pure virtual]
 

Switch BugPlug view to the debug view.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14