NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::Visualization Class Referenceabstract

Class for the visualization. More...

#include <Visualization.hpp>

Inherits FW::Window::Listener.

Inherited by FW::VisualizationBVH, and FW::VisualizationKDTree.

Public Member Functions

 Visualization (Scene *scene)
 
virtual ~Visualization ()
 
virtual void draw (GLContext *gl, CameraControls &camera)=0
 The method used to draw the current state of visualization to the OpenGL context. More...
 
bool isVisible () const
 Return whether the visualization renders its output. More...
 
void setVisible (bool visible)
 Sets whether the visualization should be rendered or not. More...
 
- Public Member Functions inherited from FW::Window::Listener
 Listener (void)
 
virtual ~Listener (void)
 
virtual bool handleEvent (const Event &ev)=0
 

Protected Attributes

Array< Stringm_splitPath
 Text representation of the VisualizationBVH::m_nodeStack path. More...
 
S32 m_osahSplits [3]
 Counters of the number of OSAH splits in the subtree under the set node in the x, y and z dimensions. More...
 
S32 m_currentDepth
 Current node's depth information. More...
 
Array< S32m_visibility
 Visibility of individual triangles. More...
 
U32 m_nodeColor
 Color of the current node. More...
 
U32 m_siblingColor
 Color of the sibling of the current node. More...
 
U32 m_leftColor
 Color of the left child of the current node. More...
 
U32 m_leftPrims
 Number of primitives in the left child of the current node. More...
 
U32 m_rightColor
 Color of the right child of the current node. More...
 
U32 m_rightPrims
 Number of primitives in the right child of the current node. More...
 
Buffer m_rays
 Buffer holding some rays as line segments. More...
 
U32 m_rayColor
 Color of the ray line indices. More...
 
Buffer m_boxes
 Buffer holding selected boxes as quad primitives. More...
 
Buffer m_emptyBoxes
 Buffer holding empty boxes as quad primitives. More...
 
Buffer m_emptyColors
 Buffer holding colors of empty boxes as quad primitives. More...
 
Buffer m_emptyLineColors
 Buffer holding line colors of empty boxes as quad primitives. More...
 
Buffer m_invisTris
 Buffer holding visible selected triangles. More...
 
Buffer m_visTris
 Buffer holding invisible selected triangles. More...
 
bool m_visible
 Flag whether to show the BVH visualization. More...
 
bool m_showRays
 Flag whether to show the ray segments. More...
 
bool m_splitColors
 Flag whether to map left/right children colors based on the split type. More...
 
bool m_showChildren
 Flag whether to show children of the current node. More...
 
bool m_showAllOSAH
 Flag whether to show all OSAH split nodes. More...
 
bool m_showEmpty
 Flag whether to show empty nodes. More...
 
bool m_showCurrTris
 Flag whether to show triangles of the current node.};. More...
 
Scenem_scene
 

Detailed Description

Class for the visualization.

Definition at line 50 of file Visualization.hpp.

Constructor & Destructor Documentation

FW::Visualization::Visualization ( Scene scene)

Definition at line 43 of file Visualization.cpp.

FW::Visualization::~Visualization ( )
virtual

Definition at line 58 of file Visualization.cpp.

Member Function Documentation

virtual void FW::Visualization::draw ( GLContext gl,
CameraControls camera 
)
pure virtual

The method used to draw the current state of visualization to the OpenGL context.

Parameters
[in]glOpenGL context to draw into.
[in]cameraThe camera for the current frame.

Implemented in FW::VisualizationKDTree, and FW::VisualizationBVH.

bool FW::Visualization::isVisible ( void  ) const
inline

Return whether the visualization renders its output.

Returns
Returns true if the visualization is rendering, false otherwise.

Definition at line 67 of file Visualization.hpp.

void FW::Visualization::setVisible ( bool  visible)
inline

Sets whether the visualization should be rendered or not.

Parameters
[in]visibleThe visibility value.

Definition at line 73 of file Visualization.hpp.

Member Data Documentation

Buffer FW::Visualization::m_boxes
protected

Buffer holding selected boxes as quad primitives.

Definition at line 94 of file Visualization.hpp.

S32 FW::Visualization::m_currentDepth
protected

Current node's depth information.

Definition at line 78 of file Visualization.hpp.

Buffer FW::Visualization::m_emptyBoxes
protected

Buffer holding empty boxes as quad primitives.

Definition at line 95 of file Visualization.hpp.

Buffer FW::Visualization::m_emptyColors
protected

Buffer holding colors of empty boxes as quad primitives.

Definition at line 96 of file Visualization.hpp.

Buffer FW::Visualization::m_emptyLineColors
protected

Buffer holding line colors of empty boxes as quad primitives.

Definition at line 97 of file Visualization.hpp.

Buffer FW::Visualization::m_invisTris
protected

Buffer holding visible selected triangles.

Definition at line 98 of file Visualization.hpp.

U32 FW::Visualization::m_leftColor
protected

Color of the left child of the current node.

Definition at line 86 of file Visualization.hpp.

U32 FW::Visualization::m_leftPrims
protected

Number of primitives in the left child of the current node.

Definition at line 87 of file Visualization.hpp.

U32 FW::Visualization::m_nodeColor
protected

Color of the current node.

Definition at line 82 of file Visualization.hpp.

S32 FW::Visualization::m_osahSplits[3]
protected

Counters of the number of OSAH splits in the subtree under the set node in the x, y and z dimensions.

Definition at line 77 of file Visualization.hpp.

U32 FW::Visualization::m_rayColor
protected

Color of the ray line indices.

Definition at line 93 of file Visualization.hpp.

Buffer FW::Visualization::m_rays
protected

Buffer holding some rays as line segments.

Definition at line 92 of file Visualization.hpp.

U32 FW::Visualization::m_rightColor
protected

Color of the right child of the current node.

Definition at line 89 of file Visualization.hpp.

U32 FW::Visualization::m_rightPrims
protected

Number of primitives in the right child of the current node.

Definition at line 90 of file Visualization.hpp.

Scene* FW::Visualization::m_scene
protected

Definition at line 108 of file Visualization.hpp.

bool FW::Visualization::m_showAllOSAH
protected

Flag whether to show all OSAH split nodes.

Definition at line 105 of file Visualization.hpp.

bool FW::Visualization::m_showChildren
protected

Flag whether to show children of the current node.

Definition at line 104 of file Visualization.hpp.

bool FW::Visualization::m_showCurrTris
protected

Flag whether to show triangles of the current node.};.

Definition at line 107 of file Visualization.hpp.

bool FW::Visualization::m_showEmpty
protected

Flag whether to show empty nodes.

Definition at line 106 of file Visualization.hpp.

bool FW::Visualization::m_showRays
protected

Flag whether to show the ray segments.

Definition at line 102 of file Visualization.hpp.

U32 FW::Visualization::m_siblingColor
protected

Color of the sibling of the current node.

Definition at line 84 of file Visualization.hpp.

bool FW::Visualization::m_splitColors
protected

Flag whether to map left/right children colors based on the split type.

Definition at line 103 of file Visualization.hpp.

Array<String> FW::Visualization::m_splitPath
protected

Text representation of the VisualizationBVH::m_nodeStack path.

Definition at line 76 of file Visualization.hpp.

Array<S32> FW::Visualization::m_visibility
protected

Visibility of individual triangles.

Definition at line 79 of file Visualization.hpp.

bool FW::Visualization::m_visible
protected

Flag whether to show the BVH visualization.

Definition at line 101 of file Visualization.hpp.

Buffer FW::Visualization::m_visTris
protected

Buffer holding invisible selected triangles.

Definition at line 99 of file Visualization.hpp.


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