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, int max_keyframes=2) | |
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. | |
void | AddInstancedStaticSceneMeshes (std::vector< ChFrame<>> &frames, std::shared_ptr< ChTriangleMeshShape > mesh) |
adds a static triangle mesh to the scene that is external to Chrono. More... | |
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... | |
optix::Context | GetContext () |
Gives the user the optix context. More... | |
std::vector< std::shared_ptr< ChOptixSensor > > | GetSensor () |
Gives the user access to the list of sensors being managed by this engine. More... | |
Constructor & Destructor Documentation
◆ ChOptixEngine()
chrono::sensor::ChOptixEngine::ChOptixEngine | ( | ChSystem * | sys, |
int | device_id, | ||
int | max_scene_reflections = 9 , |
||
bool | verbose = false , |
||
int | max_keyframes = 2 |
||
) |
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 max_keyframes The number of keyframes to used for motion blur. Defaults to minimum of 2 which is smallest that enables interpolation.
Member Function Documentation
◆ AddInstancedStaticSceneMeshes()
void chrono::sensor::ChOptixEngine::AddInstancedStaticSceneMeshes | ( | std::vector< ChFrame<>> & | frames, |
std::shared_ptr< ChTriangleMeshShape > | mesh | ||
) |
adds a static triangle mesh to the scene that is external to Chrono.
This is a way to add complex environment that includes trees, etc
- Parameters
-
frames The reference frames that encode location, orientation, and scale. One for each object that should be added to the environment mesh The mesh that should be added at each reference frame.
◆ 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
◆ GetContext()
|
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
◆ 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 access to the list of sensors being managed by this engine.
- Returns
- 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.
create and set the noise buffer here
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/optixcpp/ChOptixEngine.h
- /builds/uwsbel/chrono/src/chrono_sensor/optixcpp/ChOptixEngine.cpp