Description
Optix Engine that is responsible for managing all render-based sensors.
The is the interface between the dynamic simulation and the rendering/ray tracing. All ray tracing code is setup and managed via this class.
#include <ChOptixEngine.h>
Public Member Functions | |
| ChOptixEngine (ChSystem *sys, int device_id, int max_scene_reflections=9, bool verbose=false, bool debug=false) | |
| Class constructor. More... | |
| ~ChOptixEngine () | |
| Class destructor. | |
| void | AssignSensor (std::shared_ptr< ChOptixSensor > sensor) |
| Add a sensor for this engine to manage and update. More... | |
| void | UpdateSensors (std::shared_ptr< ChScene > scene) |
| Updates the sensors if they need to be updated based on simulation time and last update time. More... | |
| void | ConstructScene () |
| Tells the optix manager to construct the scene from scratch, translating all objects from Chrono to OptiX. | |
| int | GetDevice () |
| Way to query the device ID on which the engine is running. More... | |
| int | GetNumSensor () |
| Query the number of sensors for which this engine is responsible. More... | |
| std::vector< std::shared_ptr< ChOptixSensor > > | GetSensor () |
| Gives the user the optix context. More... | |
Constructor & Destructor Documentation
◆ ChOptixEngine()
| chrono::sensor::ChOptixEngine::ChOptixEngine | ( | ChSystem * | sys, |
| int | device_id, | ||
| int | max_scene_reflections = 9, |
||
| bool | verbose = false, |
||
| bool | debug = false |
||
| ) |
Class constructor.
- Parameters
-
sys Pointer to the ChSystem that defines the simulation device_id The id of the GPU which this engine is running on max_scene_reflections The maximum number of ray recursions that should be allowed by this engine verbose Sets verbose level for the engine debug Whether to run the engine in debug mode, which may have additional error checking and printing
Member Function Documentation
◆ AssignSensor()
| void chrono::sensor::ChOptixEngine::AssignSensor | ( | std::shared_ptr< ChOptixSensor > | sensor | ) |
Add a sensor for this engine to manage and update.
- Parameters
-
sensor A shared pointer to an Optix-based sensor
◆ GetDevice()
|
inline |
Way to query the device ID on which the engine is running.
CANNOT BE MODIFIED since the engine will have been already constructed
- Returns
- the GPU ID
◆ GetNumSensor()
|
inline |
Query the number of sensors for which this engine is responsible.
- Returns
- The number of sensors managed by this engine
◆ GetSensor()
|
inline |
Gives the user the optix context.
This should be used with caution and should not be required for typical simulations.
- Returns
- The Optix context Gives the user access to the list of sensors being managed by this engine.
- the vector of Chrono sensors
◆ UpdateSensors()
| void chrono::sensor::ChOptixEngine::UpdateSensors | ( | std::shared_ptr< ChScene > | scene | ) |
Updates the sensors if they need to be updated based on simulation time and last update time.
- Parameters
-
scene The scene that should be rendered with.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/optix/ChOptixEngine.h
- /builds/uwsbel/chrono/src/chrono_sensor/optix/ChOptixEngine.cpp