Classes |
Public Member Functions |
Protected Member Functions |
Static Protected Member Functions |
Protected Attributes |
Static Protected Attributes |
List of all members
chrono::sensor::ChFilterVisualize Class Reference
Description
A filter that, when applied to a sensor, creates a GUI window to visualize the sensor (using GLFW).
This visualizes data as an image. Will only work on data that can be interpreted as image data.
#include <ChFilterVisualize.h>
Inheritance diagram for chrono::sensor::ChFilterVisualize:
Collaboration diagram for chrono::sensor::ChFilterVisualize:
Classes | |
struct | DestroyglfwWin |
Helper to allow GLFWwindow to be in a unique_ptr. More... | |
Public Member Functions | |
ChFilterVisualize (int w, int h, std::string name="ChFilterVisualize", bool fullscreen=false) | |
Class constructor. More... | |
virtual | ~ChFilterVisualize () |
Class destructor. | |
virtual void | Apply () |
Apply function. Visualizes data as an image. | |
virtual void | Initialize (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut) |
Initializes all data needed by the filter access apply function. More... | |
Public Member Functions inherited from chrono::sensor::ChFilter | |
virtual | ~ChFilter () |
Virtual class desctructor. | |
std::string & | Name () |
Accesses the name of the filter. More... | |
Protected Member Functions | |
void | CreateGlfwWindow (std::string m_name) |
Creates a GLFW window for this filter. | |
Protected Member Functions inherited from chrono::sensor::ChFilter | |
ChFilter (std::string name) | |
protected constructor for the filter which requires a name as input. More... | |
void | InvalidFilterGraphNullBuffer (std::shared_ptr< ChSensor > pSensor) |
Error function for invalid filter graph: null buffer found. | |
void | InvalidFilterGraphBufferTypeMismatch (std::shared_ptr< ChSensor > pSensor) |
Error function for invalid filter graph: type mismatch in graph. | |
void | InvalidFilterGraphSensorTypeMismatch (std::shared_ptr< ChSensor > pSensor) |
Error function for invalid filter graph: type mismatch in graph. | |
Static Protected Member Functions | |
static void | OnNewWindow () |
Helper function for when new window is created. | |
static void | OnCloseWindow () |
Helper function for when window is closed. | |
Protected Attributes | |
std::shared_ptr< SensorDeviceR8Buffer > | m_bufferR8 |
std::shared_ptr< SensorDeviceRGBA8Buffer > | m_bufferRGBA8 |
std::shared_ptr< SensorDeviceSemanticBuffer > | m_bufferSemantic |
std::shared_ptr< SensorDeviceDIBuffer > | m_bufferDI |
std::shared_ptr< SensorDeviceRadarBuffer > | m_bufferRadar |
std::shared_ptr< SensorHostR8Buffer > | m_hostR8 |
std::shared_ptr< SensorHostRGBA8Buffer > | m_hostRGBA8 |
std::shared_ptr< SensorHostSemanticBuffer > | m_hostSemantic |
std::shared_ptr< SensorHostDIBuffer > | m_hostDI |
std::shared_ptr< SensorHostRadarBuffer > | m_hostRadar |
CUstream | m_cuda_stream |
reference to the cuda stream | |
std::unique_ptr< GLFWwindow, DestroyglfwWin > | m_window |
pointer to the window | |
unsigned int | m_gl_tex_id = 0 |
reference data for the GL context and texture | |
bool | m_window_disabled = false |
for checking if window is not allowed on sysmtem (e.g. headless rendering) | |
int | m_w |
width of the window | |
int | m_h |
height of the window | |
bool | m_fullscreen |
toggle for fullscreen mode | |
Static Protected Attributes | |
static int | s_windowCount = 0 |
keeps track of the window count | |
static std::mutex | s_glfwMutex |
mutex to prevent us making two windows at the exact same time | |
Constructor & Destructor Documentation
◆ ChFilterVisualize()
CH_SENSOR_API chrono::sensor::ChFilterVisualize::ChFilterVisualize | ( | int | w, |
int | h, | ||
std::string | name = "ChFilterVisualize" , |
||
bool | fullscreen = false |
||
) |
Class constructor.
- Parameters
-
w Width of the window to create h Height of the window to create name String name of the filter fullscreen whether the window should be spawned in full screen mode
Member Function Documentation
◆ Initialize()
|
virtual |
Initializes all data needed by the filter access apply function.
- Parameters
-
pSensor A pointer to the sensor on which the filter is attached. bufferInOut A buffer that is passed into the filter.
Implements chrono::sensor::ChFilter.
Reimplemented in chrono::sensor::ChFilterVisualizePointCloud.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/filters/ChFilterVisualize.h
- /builds/uwsbel/chrono/src/chrono_sensor/filters/ChFilterVisualize.cpp