chrono::sensor::ChOptixGeometry Class Reference
Description
Optix Geometry class that is responsible for managing all geometric information in the optix scene This handles the acceleration structure and transforms.
#include <ChOptixGeometry.h>
Public Member Functions | |
ChOptixGeometry (OptixDeviceContext context) | |
Class constructor. More... | |
~ChOptixGeometry () | |
Class destructor. | |
void | AddBox (std::shared_ptr< ChBody > body, ChFrame< double > asset_frame, ChVector< double > scale, unsigned int mat_id) |
Add a box geometry to the optix scene. More... | |
void | AddSphere (std::shared_ptr< ChBody > body, ChFrame< double > asset_frame, ChVector< double > scale, unsigned int mat_id) |
Add a sphere geometry to the optix scene. More... | |
void | AddCylinder (std::shared_ptr< ChBody > body, ChFrame< double > asset_frame, ChVector< double > scale, unsigned int mat_id) |
Add a cylinder geometry to the optix scene. More... | |
unsigned int | AddRigidMesh (CUdeviceptr d_vertices, CUdeviceptr d_indices, std::shared_ptr< ChTriangleMeshShape > mesh_shape, std::shared_ptr< ChBody > body, ChFrame< double > asset_frame, ChVector< double > scale, unsigned int mat_id) |
Add a rigid mesh to the optix scene. More... | |
void | AddDeformableMesh (CUdeviceptr d_vertices, CUdeviceptr d_indices, std::shared_ptr< ChTriangleMeshShape > mesh_shape, std::shared_ptr< ChBody > body, ChFrame< double > asset_frame, ChVector< double > scale, unsigned int mat_id) |
Add a deformable mesh to the optix scene. More... | |
OptixTraversableHandle | CreateRootStructure () |
Create the root node and acceleration structure of the scene. More... | |
void | RebuildRootStructure () |
Rebuild the root acceleration structure for when the root changes. | |
void | UpdateBodyTransformsStart (float t_start, float t_target_end) |
Update the list of transforms associated with the bodies and assets at the start time. | |
void | UpdateBodyTransformsEnd (float t_end) |
Update the list of transforms associated with the bodies and assets at the end time. | |
void | UpdateDeformableMeshes () |
Update the deformable meshes based on how the meshes changed in Chrono. | |
void | Cleanup () |
Cleanup the entire optix geometry manager, cleans and frees device pointers and root structure. | |
void | SetOriginOffset (ChVector< float > origin_offset) |
Origin offset function for moving the origin to reduce large translations. | |
Constructor & Destructor Documentation
◆ ChOptixGeometry()
chrono::sensor::ChOptixGeometry::ChOptixGeometry | ( | OptixDeviceContext | context | ) |
Class constructor.
- Parameters
-
context optix context for which the ChOptixGeometry maintains the scene
Member Function Documentation
◆ AddBox()
void chrono::sensor::ChOptixGeometry::AddBox | ( | std::shared_ptr< ChBody > | body, |
ChFrame< double > | asset_frame, | ||
ChVector< double > | scale, | ||
unsigned int | mat_id | ||
) |
Add a box geometry to the optix scene.
- Parameters
-
body the Chrono Body that drives the box asset_frame the Chrono frame that specifies how the asset is attached to the body scale the scale of the box mat_id the material id associated with the box
◆ AddCylinder()
void chrono::sensor::ChOptixGeometry::AddCylinder | ( | std::shared_ptr< ChBody > | body, |
ChFrame< double > | asset_frame, | ||
ChVector< double > | scale, | ||
unsigned int | mat_id | ||
) |
Add a cylinder geometry to the optix scene.
- Parameters
-
body the Chrono Body that drives the cylinder asset_frame the Chrono frame that specifies how the asset is attached to the body scale the scale of the cylinder mat_id the material id associated with the cylinder
◆ AddDeformableMesh()
void chrono::sensor::ChOptixGeometry::AddDeformableMesh | ( | CUdeviceptr | d_vertices, |
CUdeviceptr | d_indices, | ||
std::shared_ptr< ChTriangleMeshShape > | mesh_shape, | ||
std::shared_ptr< ChBody > | body, | ||
ChFrame< double > | asset_frame, | ||
ChVector< double > | scale, | ||
unsigned int | mat_id | ||
) |
Add a deformable mesh to the optix scene.
- Parameters
-
d_vertices a device pointer to the vertices of the mesh d_indices a device pointer to the indices of the mesh mesh_shape the Chrono mesh shape that defines the mesh body the Chrono body on which the mesh is attached asset_frame the Chrono frame that specifies how the asset is attached to the body scale the scale of the mesh mat_id the material id associated with the mesh
◆ AddRigidMesh()
unsigned int chrono::sensor::ChOptixGeometry::AddRigidMesh | ( | CUdeviceptr | d_vertices, |
CUdeviceptr | d_indices, | ||
std::shared_ptr< ChTriangleMeshShape > | mesh_shape, | ||
std::shared_ptr< ChBody > | body, | ||
ChFrame< double > | asset_frame, | ||
ChVector< double > | scale, | ||
unsigned int | mat_id | ||
) |
Add a rigid mesh to the optix scene.
- Parameters
-
d_vertices a device pointer to the vertices of the mesh d_indices a device pointer to the indices of the mesh mesh_shape the Chrono mesh shape that defines the mesh body the Chrono body on which the mesh is attached asset_frame the Chrono frame that specifies how the asset is attached to the body scale the scale of the mesh mat_id the material id associated with the mesh
◆ AddSphere()
void chrono::sensor::ChOptixGeometry::AddSphere | ( | std::shared_ptr< ChBody > | body, |
ChFrame< double > | asset_frame, | ||
ChVector< double > | scale, | ||
unsigned int | mat_id | ||
) |
Add a sphere geometry to the optix scene.
- Parameters
-
body the Chrono Body that drives the sphere asset_frame the Chrono frame that specifies how the asset is attached to the body scale the scale of the sphere mat_id the material id associated with the sphere
◆ CreateRootStructure()
OptixTraversableHandle chrono::sensor::ChOptixGeometry::CreateRootStructure | ( | ) |
Create the root node and acceleration structure of the scene.
- Returns
- A traversable handle to the root node
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/optix/ChOptixGeometry.h
- /builds/uwsbel/chrono/src/chrono_sensor/optix/ChOptixGeometry.cpp