RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
RoR::GUI::CollisionsDebug Class Reference

Diagnostic view for static terrain collisions and script event-boxes. More...

#include <GUI_CollisionsDebug.h>

Public Member Functions

void SetVisible (bool v)
 
bool IsVisible () const
 
bool IsHovered () const
 
void Draw ()
 
void CleanUp ()
 
void SetDrawEventBoxes (bool val)
 
void AddCollisionBoxDebugMesh (collision_box_t const &coll_box)
 
void DrawCollisionBoxDebugText (collision_box_t const &coll_box)
 
Ogre::Vector3 GetCollBoxWorldPos (collision_box_t const &coll_box)
 
void ClearEventBoxVisuals ()
 
void SetDrawCollisionMeshes (bool val)
 
void AddCollisionMeshDebugMesh (collision_mesh_t const &coll_mesh)
 
void DrawCollisionMeshDebugText (collision_mesh_t const &coll_mesh)
 
void ClearCollisionMeshVisuals ()
 
void SetDrawCollisionCells (bool val)
 
void ClearCollisionCellVisuals ()
 

Data Fields

const ImVec4 COLOR_EVENTBOX = ImVec4(181/255.f, 51/255.f, 64/255.f, 1.f)
 
const ImVec4 COLOR_COLLMESH = ImVec4(209/255.f, 109/255.f, 44/255.f, 1.f)
 
const float WIDTH_DRAWDIST = 75.f
 
const float DEFAULT_DRAWDIST = 200.f
 

Private Member Functions

void DrawLabelAtWorldPos (std::string const &caption, Ogre::Vector3 const &world_pos, ImVec4 const &text_color)
 
void GenerateCellDebugMaterials ()
 

Private Attributes

std::vector< Ogre::SceneNode * > m_collision_boxes
 
bool m_draw_collision_boxes = false
 
float m_collision_box_draw_distance = DEFAULT_DRAWDIST
 
std::vector< Ogre::SceneNode * > m_collision_meshes
 
bool m_draw_collision_meshes = false
 
float m_collision_mesh_draw_distance = DEFAULT_DRAWDIST
 
std::vector< Ogre::SceneNode * > m_collision_cells
 
Ogre::SceneNode * m_collision_grid_root = nullptr
 
bool m_draw_collision_cells = false
 
float m_collision_cell_draw_distance = DEFAULT_DRAWDIST
 
int m_cell_generator_distance_limit = 50
 
bool m_draw_labels = true
 
bool m_labels_draw_types = true
 
bool m_labels_draw_sources = true
 
bool m_is_visible = false
 
bool m_is_hovered = false
 

Detailed Description

Diagnostic view for static terrain collisions and script event-boxes.

Definition at line 38 of file GUI_CollisionsDebug.h.

Member Function Documentation

◆ AddCollisionBoxDebugMesh()

void CollisionsDebug::AddCollisionBoxDebugMesh ( collision_box_t const &  coll_box)

Definition at line 221 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ AddCollisionMeshDebugMesh()

void CollisionsDebug::AddCollisionMeshDebugMesh ( collision_mesh_t const &  coll_mesh)

Definition at line 191 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ CleanUp()

void CollisionsDebug::CleanUp ( )

Definition at line 396 of file GUI_CollisionsDebug.cpp.

+ Here is the caller graph for this function:

◆ ClearCollisionCellVisuals()

void CollisionsDebug::ClearCollisionCellVisuals ( )

Definition at line 545 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ ClearCollisionMeshVisuals()

void CollisionsDebug::ClearCollisionMeshVisuals ( )

Definition at line 519 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ ClearEventBoxVisuals()

void CollisionsDebug::ClearEventBoxVisuals ( )

Definition at line 532 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ Draw()

void CollisionsDebug::Draw ( )

Definition at line 42 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawCollisionBoxDebugText()

void CollisionsDebug::DrawCollisionBoxDebugText ( collision_box_t const &  coll_box)

Definition at line 324 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ DrawCollisionMeshDebugText()

void CollisionsDebug::DrawCollisionMeshDebugText ( collision_mesh_t const &  coll_mesh)

Definition at line 309 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ DrawLabelAtWorldPos()

void CollisionsDebug::DrawLabelAtWorldPos ( std::string const &  caption,
Ogre::Vector3 const &  world_pos,
ImVec4 const &  text_color 
)
private

Definition at line 358 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ GenerateCellDebugMaterials()

void CollisionsDebug::GenerateCellDebugMaterials ( )
private

Definition at line 408 of file GUI_CollisionsDebug.cpp.

◆ GetCollBoxWorldPos()

Ogre::Vector3 CollisionsDebug::GetCollBoxWorldPos ( collision_box_t const &  coll_box)

Definition at line 304 of file GUI_CollisionsDebug.cpp.

◆ IsHovered()

bool RoR::GUI::CollisionsDebug::IsHovered ( ) const
inline

Definition at line 48 of file GUI_CollisionsDebug.h.

+ Here is the call graph for this function:

◆ IsVisible()

bool RoR::GUI::CollisionsDebug::IsVisible ( ) const
inline

Definition at line 47 of file GUI_CollisionsDebug.h.

+ Here is the caller graph for this function:

◆ SetDrawCollisionCells()

void CollisionsDebug::SetDrawCollisionCells ( bool  val)

Definition at line 486 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ SetDrawCollisionMeshes()

void CollisionsDebug::SetDrawCollisionMeshes ( bool  val)

Definition at line 467 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ SetDrawEventBoxes()

void CollisionsDebug::SetDrawEventBoxes ( bool  val)

Definition at line 448 of file GUI_CollisionsDebug.cpp.

+ Here is the call graph for this function:

◆ SetVisible()

void CollisionsDebug::SetVisible ( bool  v)

Definition at line 564 of file GUI_CollisionsDebug.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ COLOR_COLLMESH

const ImVec4 RoR::GUI::CollisionsDebug::COLOR_COLLMESH = ImVec4(209/255.f, 109/255.f, 44/255.f, 1.f)

Definition at line 42 of file GUI_CollisionsDebug.h.

◆ COLOR_EVENTBOX

const ImVec4 RoR::GUI::CollisionsDebug::COLOR_EVENTBOX = ImVec4(181/255.f, 51/255.f, 64/255.f, 1.f)

Definition at line 41 of file GUI_CollisionsDebug.h.

◆ DEFAULT_DRAWDIST

const float RoR::GUI::CollisionsDebug::DEFAULT_DRAWDIST = 200.f

Definition at line 44 of file GUI_CollisionsDebug.h.

◆ m_cell_generator_distance_limit

int RoR::GUI::CollisionsDebug::m_cell_generator_distance_limit = 50
private

Definition at line 90 of file GUI_CollisionsDebug.h.

◆ m_collision_box_draw_distance

float RoR::GUI::CollisionsDebug::m_collision_box_draw_distance = DEFAULT_DRAWDIST
private

Definition at line 78 of file GUI_CollisionsDebug.h.

◆ m_collision_boxes

std::vector<Ogre::SceneNode*> RoR::GUI::CollisionsDebug::m_collision_boxes
private

Definition at line 76 of file GUI_CollisionsDebug.h.

◆ m_collision_cell_draw_distance

float RoR::GUI::CollisionsDebug::m_collision_cell_draw_distance = DEFAULT_DRAWDIST
private

Definition at line 89 of file GUI_CollisionsDebug.h.

◆ m_collision_cells

std::vector<Ogre::SceneNode*> RoR::GUI::CollisionsDebug::m_collision_cells
private

Definition at line 86 of file GUI_CollisionsDebug.h.

◆ m_collision_grid_root

Ogre::SceneNode* RoR::GUI::CollisionsDebug::m_collision_grid_root = nullptr
private

Definition at line 87 of file GUI_CollisionsDebug.h.

◆ m_collision_mesh_draw_distance

float RoR::GUI::CollisionsDebug::m_collision_mesh_draw_distance = DEFAULT_DRAWDIST
private

Definition at line 83 of file GUI_CollisionsDebug.h.

◆ m_collision_meshes

std::vector<Ogre::SceneNode*> RoR::GUI::CollisionsDebug::m_collision_meshes
private

Definition at line 81 of file GUI_CollisionsDebug.h.

◆ m_draw_collision_boxes

bool RoR::GUI::CollisionsDebug::m_draw_collision_boxes = false
private

Definition at line 77 of file GUI_CollisionsDebug.h.

◆ m_draw_collision_cells

bool RoR::GUI::CollisionsDebug::m_draw_collision_cells = false
private

Definition at line 88 of file GUI_CollisionsDebug.h.

◆ m_draw_collision_meshes

bool RoR::GUI::CollisionsDebug::m_draw_collision_meshes = false
private

Definition at line 82 of file GUI_CollisionsDebug.h.

◆ m_draw_labels

bool RoR::GUI::CollisionsDebug::m_draw_labels = true
private

Definition at line 92 of file GUI_CollisionsDebug.h.

◆ m_is_hovered

bool RoR::GUI::CollisionsDebug::m_is_hovered = false
private

Definition at line 96 of file GUI_CollisionsDebug.h.

◆ m_is_visible

bool RoR::GUI::CollisionsDebug::m_is_visible = false
private

Definition at line 95 of file GUI_CollisionsDebug.h.

◆ m_labels_draw_sources

bool RoR::GUI::CollisionsDebug::m_labels_draw_sources = true
private

Definition at line 94 of file GUI_CollisionsDebug.h.

◆ m_labels_draw_types

bool RoR::GUI::CollisionsDebug::m_labels_draw_types = true
private

Definition at line 93 of file GUI_CollisionsDebug.h.

◆ WIDTH_DRAWDIST

const float RoR::GUI::CollisionsDebug::WIDTH_DRAWDIST = 75.f

Definition at line 43 of file GUI_CollisionsDebug.h.


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