Nebula
Loading...
Searching...
No Matches
Physics::VisualDebugger Class Reference

#include <visualdebugger.h>

Detailed Description

Class that communicates with the physics visual debugger program.

Holds utility methods to easily display stuff such as arrow and text in the debugger.

Classes

class  TimedDrawData
 base class for draw-calls that should be done over a number of steps More...
 

Public Member Functions

 VisualDebugger ()
 constructor
 
virtual ~VisualDebugger ()
 destructor
 
virtual void OnStep ()
 do one step
 
virtual void Initialize (Scene *s)
 initialize debugger connection
 
void SetSimulationFrameTime (float time)
 set how much time that should pass each step
 
float SetSimulationFrameTime () const
 get how much time that should pass each step
 
void DrawTimedArrow (const Math::point &p, const Math::vector &dir, uint numSteps, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw an arrow during a number of steps
 
void DrawTimedLine (const Math::point &p, const Math::vector &dir, uint numSteps, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw a line during a number of steps
 
void DrawTimedPlane (const Math::point &p, const Math::vector &dir, float scale, uint numSteps, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw a plane during a number of steps
 
void DrawTimedText (const Math::point &p, const Util::String &text, uint numSteps, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw text during a number of steps
 
void DrawTimedAABB (const Math::bbox &bbox, uint numSteps, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw an AABB during a number of steps
 
virtual void SetCameraView (const Math::mat4 &viewMatrix)
 set the camera view
 
virtual void DrawArrow (const Math::point &p, const Math::vector &dir, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw an arrow
 
virtual void DrawLine (const Math::point &p, const Math::vector &dir, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw a line
 
virtual void DrawPlane (const Math::point &p, const Math::vector &dir, float scale, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw a plane
 
virtual void DrawText (const Math::point &p, const Util::String &text, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw text
 
virtual void DrawAABB (const Math::bbox &bbox, const Math::vec4 &color=Math::vec4(1, 1, 1, 1))
 draw an AABB
 

Protected Member Functions

void Draw (const TimedDrawData &data)
 perform drawing
 

Protected Attributes

Scenescene
 
float simulationFrameTime
 
Util::Array< TimedDrawDatatimedDrawData
 

Private Member Functions

 __DeclareInterfaceSingleton (VisualDebugger)
 

Constructor & Destructor Documentation

◆ VisualDebugger()

Physics::VisualDebugger::VisualDebugger ( )

constructor

◆ ~VisualDebugger()

Physics::VisualDebugger::~VisualDebugger ( )
virtual

destructor

Member Function Documentation

◆ __DeclareInterfaceSingleton()

Physics::VisualDebugger::__DeclareInterfaceSingleton ( VisualDebugger )
private

◆ Draw()

void Physics::VisualDebugger::Draw ( const TimedDrawData & data)
protected

perform drawing

◆ DrawAABB()

void Physics::VisualDebugger::DrawAABB ( const Math::bbox & bbox,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )
virtual

draw an AABB

◆ DrawArrow()

void Physics::VisualDebugger::DrawArrow ( const Math::point & p,
const Math::vector & dir,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )
virtual

draw an arrow

◆ DrawLine()

void Physics::VisualDebugger::DrawLine ( const Math::point & p,
const Math::vector & dir,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )
virtual

draw a line

◆ DrawPlane()

void Physics::VisualDebugger::DrawPlane ( const Math::point & p,
const Math::vector & dir,
float scale,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )
virtual

draw a plane

◆ DrawText()

void Physics::VisualDebugger::DrawText ( const Math::point & p,
const Util::String & text,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )
virtual

draw text

◆ DrawTimedAABB()

void Physics::VisualDebugger::DrawTimedAABB ( const Math::bbox & bbox,
uint numSteps,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )

draw an AABB during a number of steps

◆ DrawTimedArrow()

void Physics::VisualDebugger::DrawTimedArrow ( const Math::point & p,
const Math::vector & dir,
uint numSteps,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )

draw an arrow during a number of steps

◆ DrawTimedLine()

void Physics::VisualDebugger::DrawTimedLine ( const Math::point & p,
const Math::vector & dir,
uint numSteps,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )

draw a line during a number of steps

◆ DrawTimedPlane()

void Physics::VisualDebugger::DrawTimedPlane ( const Math::point & p,
const Math::vector & dir,
float scale,
uint numSteps,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )

draw a plane during a number of steps

◆ DrawTimedText()

void Physics::VisualDebugger::DrawTimedText ( const Math::point & p,
const Util::String & text,
uint numSteps,
const Math::vec4 & color = Math::vec4(1, 1, 1, 1) )

draw text during a number of steps

◆ Initialize()

void Physics::VisualDebugger::Initialize ( Scene * s)
virtual

initialize debugger connection

◆ OnStep()

void Physics::VisualDebugger::OnStep ( )
virtual

do one step

◆ SetCameraView()

void Physics::VisualDebugger::SetCameraView ( const Math::mat4 & viewMatrix)
virtual

set the camera view

◆ SetSimulationFrameTime() [1/2]

float Physics::VisualDebugger::SetSimulationFrameTime ( ) const
inline

get how much time that should pass each step

◆ SetSimulationFrameTime() [2/2]

void Physics::VisualDebugger::SetSimulationFrameTime ( float time)
inline

set how much time that should pass each step

Member Data Documentation

◆ scene

Scene* Physics::VisualDebugger::scene
protected

◆ simulationFrameTime

float Physics::VisualDebugger::simulationFrameTime
protected

◆ timedDrawData

Util::Array<TimedDrawData> Physics::VisualDebugger::timedDrawData
protected

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