Description
Scene class used for camera renderings. Includes environment colors, lights, etc.
#include <ChScene.h>
Public Member Functions | |
ChScene () | |
Class constructor. | |
~ChScene () | |
Class destructor. | |
unsigned int | AddPointLight (ChVector< float > pos, ChVector< float > color, float max_range) |
Add a point light that emits light in all directions. More... | |
unsigned int | AddPointLight (PointLight p) |
Add a point light that emits light in all directions. More... | |
std::vector< PointLight > | GetPointLights () |
Function for gaining access to the vector of point lights and can be used to modify lighting dynamically. More... | |
void | ModifyPointLight (unsigned int id, PointLight p) |
Function for gaining access to the vector of point lights and can be used to modify lighting dynamically. More... | |
Background | GetBackground () |
Function for gaining access to the background. More... | |
void | SetBackground (Background b) |
Function for gaining access to the background. More... | |
void | SetAmbientLight (ChVector< float > color) |
Function for setting the ambient light color. More... | |
ChVector< float > | GetAmbientLight () |
Function for setting the ambient light color. More... | |
void | ResetLightsChanged () |
Function for resetting the lights changed variable. | |
bool | GetLightsChanged () |
Function for getting the lights changed variable. | |
void | ResetBackgroundChanged () |
Function for resetting the background changed variable. | |
bool | GetBackgroundChanged () |
Function for getting the background changed variable. | |
void | SetSceneEpsilon (float e) |
Allows setting the scene epsilon used for traversal checks. More... | |
float | GetSceneEpsilon () |
Accessor to the scene epsilon value. More... | |
Member Function Documentation
◆ AddPointLight() [1/2]
CH_SENSOR_API unsigned int chrono::sensor::ChScene::AddPointLight | ( | ChVector< float > | pos, |
ChVector< float > | color, | ||
float | max_range | ||
) |
Add a point light that emits light in all directions.
- Parameters
-
pos The global position of the light source color The golor of the light source max_range the range at which the light intensity is equal to 1% of its maximum intensity
- Returns
- the index of the light that has been added
◆ AddPointLight() [2/2]
CH_SENSOR_API unsigned int chrono::sensor::ChScene::AddPointLight | ( | PointLight | p | ) |
Add a point light that emits light in all directions.
- Parameters
-
p A point light the will be added directly
- Returns
- the index of the light that has been added
◆ GetAmbientLight()
|
inline |
Function for setting the ambient light color.
- Returns
- the ambient light in the scene
◆ GetBackground()
|
inline |
Function for gaining access to the background.
Can be used to dynamically change the background color, or texture
- Returns
- m_background the background used for rendering
◆ GetPointLights()
|
inline |
Function for gaining access to the vector of point lights and can be used to modify lighting dynamically.
- Returns
- m_pointlights A vector of point lights in the scene currently
◆ GetSceneEpsilon()
|
inline |
Accessor to the scene epsilon value.
- Returns
- the scene epsilon
◆ ModifyPointLight()
CH_SENSOR_API void chrono::sensor::ChScene::ModifyPointLight | ( | unsigned int | id, |
PointLight | p | ||
) |
Function for gaining access to the vector of point lights and can be used to modify lighting dynamically.
- Parameters
-
id the index of the point light to be modified p the new point light that will replace the values at the given index
◆ SetAmbientLight()
|
inline |
Function for setting the ambient light color.
- Parameters
-
color the color+intensity of ambient light
◆ SetBackground()
CH_SENSOR_API void chrono::sensor::ChScene::SetBackground | ( | Background | b | ) |
Function for gaining access to the background.
Can be used to dynamically change the background color, or texture
- Parameters
-
b a new background for the scene
◆ SetSceneEpsilon()
CH_SENSOR_API void chrono::sensor::ChScene::SetSceneEpsilon | ( | float | e | ) |
Allows setting the scene epsilon used for traversal checks.
- Parameters
-
e the epsilon value
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/optix/scene/ChScene.h
- /builds/uwsbel/chrono/src/chrono_sensor/optix/scene/ChScene.cpp