Space Engineers
Public Member Functions | Static Public Member Functions | Static Public Attributes | Events | List of all members
Sandbox.Common.MyRenderDebugInputComponent Class Reference

This debug component can be used to remember debug draws methods, aabbs or matrices to be drawn, even if the event occurs just once and data can not be retrieved to render them in next frames. More...

Inheritance diagram for Sandbox.Common.MyRenderDebugInputComponent:
Sandbox.Game.Gui.MyDebugComponent

Public Member Functions

 MyRenderDebugInputComponent ()
 
override void Draw ()
 
override string GetName ()
 
- Public Member Functions inherited from Sandbox.Game.Gui.MyDebugComponent
void Section (string text, params object[] formatArgs)
 
 MyDebugComponent ()
 
 MyDebugComponent (bool enabled)
 
virtual bool HandleInput ()
 
virtual void DispatchUpdate ()
 
virtual void Update10 ()
 
virtual void Update100 ()
 
bool GetSwitchValue (MyKeys key)
 
bool GetSwitchValue (string note)
 

Static Public Member Functions

static void Clear ()
 Clears the lists. More...
 
static void AddMatrix (VRageMath.Matrix mat, VRageMath.Color col)
 Add matrix to be drawn as axes with OBB More...
 
static void AddAABB (VRageMath.BoundingBoxD aabb, VRageMath.Color col)
 Add AABB box to be drawn More...
 
static void AddCapsule (VRageMath.CapsuleD capsule, VRageMath.Color col)
 
static void AddLine (VRageMath.Vector3 from, VRageMath.Vector3 to, VRageMath.Color color)
 
static void BreakIfChecked (object objectToCheck)
 This will break the debugger, if passed object was added to MyRenderDebugInputComponent.CheckedObjects. Use for breaking in the code when you need to break at specific object. More...
 
- Static Public Member Functions inherited from Sandbox.Game.Gui.MyDebugComponent
static float NextTextOffset (float scale)
 
static void ResetFrame ()
 

Static Public Attributes

static List< object > CheckedObjects = new List<object>()
 This list can be used to track down specific objects during runtime debug step -> CheckedObjects.Add(this), and change then this later to -> if (CheckedObjects.Contain(this)) Debugger.Break(); More...
 
static List< Tuple< VRageMath.BoundingBoxD, VRageMath.Color > > AABBsToDraw = new List<Tuple<VRageMath.BoundingBoxD,VRageMath.Color>>()
 Add your AABB and Color to draw it every update when this component is enabled More...
 
static List< Tuple< VRageMath.Matrix, VRageMath.Color > > MatricesToDraw = new List<Tuple<VRageMath.Matrix,VRageMath.Color>>()
 Add your matrix to be draw every update if this component is enabled More...
 
static List< Tuple< VRageMath.CapsuleD, VRageMath.Color > > CapsulesToDraw = new List<Tuple<VRageMath.CapsuleD, VRageMath.Color>>()
 
static List< Tuple< VRageMath.Vector3, VRageMath.Vector3, VRageMath.Color > > LinesToDraw = new List<Tuple<VRageMath.Vector3, VRageMath.Vector3, VRageMath.Color>>()
 

Events

static Action OnDraw
 Subscribe to this event debug draw callbacks for specific objects to be draw independetly More...
 

Additional Inherited Members

- Public Types inherited from Sandbox.Game.Gui.MyDebugComponent
enum  MyDebugComponentInfoState { MyDebugComponentInfoState.NoInfo, MyDebugComponentInfoState.EnabledInfo, MyDebugComponentInfoState.FullInfo }
 
- Public Attributes inherited from Sandbox.Game.Gui.MyDebugComponent
int m_frameCounter = 0
 
- Protected Member Functions inherited from Sandbox.Game.Gui.MyDebugComponent
void Text (string message, params object[] arguments)
 
void Text (Color color, string message, params object[] arguments)
 
void Text (Color color, float scale, string message, params object[] arguments)
 
void MultilineText (string message, params object[] arguments)
 
void MultilineText (Color color, string message, params object[] arguments)
 
void MultilineText (Color color, float scale, string message, params object[] arguments)
 
void VSpace (float space)
 
void Save ()
 
void AddShortcut (MyKeys key, bool newPress, bool control, bool shift, bool alt, Func< string > description, Func< bool > action)
 
void AddSwitch (MyKeys key, Func< MyKeys, bool > action, string note="", bool defaultValue=false)
 
void AddSwitch (MyKeys key, Func< MyKeys, bool > action, MyRef< bool > boolRef, string note="")
 
void SetSwitch (MyKeys key, bool value)
 
- Properties inherited from Sandbox.Game.Gui.MyDebugComponent
static float VerticalTextOffset [get]
 
static float NextVerticalOffset [get]
 
bool Enabled [get, set]
 
virtual object InputData [get, set]
 

Detailed Description

This debug component can be used to remember debug draws methods, aabbs or matrices to be drawn, even if the event occurs just once and data can not be retrieved to render them in next frames.

Definition at line 16 of file MyRenderDebugInputComponent.cs.

Constructor & Destructor Documentation

Sandbox.Common.MyRenderDebugInputComponent.MyRenderDebugInputComponent ( )
inline

Definition at line 42 of file MyRenderDebugInputComponent.cs.

Member Function Documentation

static void Sandbox.Common.MyRenderDebugInputComponent.AddAABB ( VRageMath.BoundingBoxD  aabb,
VRageMath.Color  col 
)
inlinestatic

Add AABB box to be drawn

Parameters
aabbAABB box in world coords
colColor

Definition at line 117 of file MyRenderDebugInputComponent.cs.

static void Sandbox.Common.MyRenderDebugInputComponent.AddCapsule ( VRageMath.CapsuleD  capsule,
VRageMath.Color  col 
)
inlinestatic

Definition at line 122 of file MyRenderDebugInputComponent.cs.

static void Sandbox.Common.MyRenderDebugInputComponent.AddLine ( VRageMath.Vector3  from,
VRageMath.Vector3  to,
VRageMath.Color  color 
)
inlinestatic

Definition at line 127 of file MyRenderDebugInputComponent.cs.

static void Sandbox.Common.MyRenderDebugInputComponent.AddMatrix ( VRageMath.Matrix  mat,
VRageMath.Color  col 
)
inlinestatic

Add matrix to be drawn as axes with OBB

Parameters
matWorld matrix
colColor

Definition at line 107 of file MyRenderDebugInputComponent.cs.

static void Sandbox.Common.MyRenderDebugInputComponent.BreakIfChecked ( object  objectToCheck)
inlinestatic

This will break the debugger, if passed object was added to MyRenderDebugInputComponent.CheckedObjects. Use for breaking in the code when you need to break at specific object.

Definition at line 140 of file MyRenderDebugInputComponent.cs.

static void Sandbox.Common.MyRenderDebugInputComponent.Clear ( )
inlinestatic

Clears the lists.

Definition at line 93 of file MyRenderDebugInputComponent.cs.

override void Sandbox.Common.MyRenderDebugInputComponent.Draw ( )
inlinevirtual

Reimplemented from Sandbox.Game.Gui.MyDebugComponent.

Definition at line 53 of file MyRenderDebugInputComponent.cs.

override string Sandbox.Common.MyRenderDebugInputComponent.GetName ( )
inlinevirtual

Implements Sandbox.Game.Gui.MyDebugComponent.

Definition at line 132 of file MyRenderDebugInputComponent.cs.

Member Data Documentation

List<Tuple<VRageMath.BoundingBoxD, VRageMath.Color> > Sandbox.Common.MyRenderDebugInputComponent.AABBsToDraw = new List<Tuple<VRageMath.BoundingBoxD,VRageMath.Color>>()
static

Add your AABB and Color to draw it every update when this component is enabled

Definition at line 31 of file MyRenderDebugInputComponent.cs.

List<Tuple<VRageMath.CapsuleD, VRageMath.Color> > Sandbox.Common.MyRenderDebugInputComponent.CapsulesToDraw = new List<Tuple<VRageMath.CapsuleD, VRageMath.Color>>()
static

Definition at line 38 of file MyRenderDebugInputComponent.cs.

List<object> Sandbox.Common.MyRenderDebugInputComponent.CheckedObjects = new List<object>()
static

This list can be used to track down specific objects during runtime debug step -> CheckedObjects.Add(this), and change then this later to -> if (CheckedObjects.Contain(this)) Debugger.Break();

Definition at line 21 of file MyRenderDebugInputComponent.cs.

List<Tuple<VRageMath.Vector3, VRageMath.Vector3, VRageMath.Color> > Sandbox.Common.MyRenderDebugInputComponent.LinesToDraw = new List<Tuple<VRageMath.Vector3, VRageMath.Vector3, VRageMath.Color>>()
static

Definition at line 40 of file MyRenderDebugInputComponent.cs.

List<Tuple<VRageMath.Matrix, VRageMath.Color> > Sandbox.Common.MyRenderDebugInputComponent.MatricesToDraw = new List<Tuple<VRageMath.Matrix,VRageMath.Color>>()
static

Add your matrix to be draw every update if this component is enabled

Definition at line 36 of file MyRenderDebugInputComponent.cs.

Event Documentation

Action Sandbox.Common.MyRenderDebugInputComponent.OnDraw
static

Subscribe to this event debug draw callbacks for specific objects to be draw independetly

Definition at line 26 of file MyRenderDebugInputComponent.cs.


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