chrono::sensor::ChScene Class Reference

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 (ChVector3f pos, ChColor color, float max_range)
 Add a point light that emits light in all directions. More...
 
unsigned int AddPointLight (const PointLight &p)
 Add a point light that emits light in all directions. More...
 
unsigned int AddAreaLight (ChVector3f pos, ChColor color, float max_range, ChVector3f du, ChVector3f dv)
 Add an area light that emits light in a particular direction. More...
 
std::vector< PointLightGetPointLights ()
 Function for gaining access to the vector of point lights and can be used to modify lighting dynamically. More...
 
std::vector< AreaLightGetAreaLights ()
 Function for gaining access to the vector of area 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 (ChVector3f color)
 Function for setting the ambient light color. More...
 
ChVector3f GetAmbientLight ()
 Function for setting the ambient light color. More...
 
void ResetLightsChanged ()
 Function for resetting the lights changed variable.
 
void ResetAreaLightsChanged ()
 Function for resetting the area lights changed variable.
 
bool GetLightsChanged ()
 Function for getting the lights changed variable.
 
bool GetAreaLightsChanged ()
 Function for getting the area lights changed variable.
 
void ResetBackgroundChanged ()
 Function for resetting the background changed variable.
 
bool GetBackgroundChanged ()
 Function for getting the background changed variable.
 
void SetFogColor (ChVector3f color)
 Function to set the fog color.
 
ChVector3f GetFogColor ()
 Function to get the fog color.
 
void SetFogScattering (float coefficient)
 Function to set the fog scattering coefficient.
 
void SetFogScatteringFromDistance (float distance)
 Function to set the fog scattering coefficient from max visible distance. More...
 
float GetFogScattering ()
 Function to get the fog scattering coefficient.
 
void SetSceneEpsilon (float e)
 Allows setting the scene epsilon used for traversal checks. More...
 
float GetSceneEpsilon ()
 Accessor to the scene epsilon value. More...
 
void UpdateOriginOffset (ChVector3f sensor_pos, bool force=false)
 Function to change the origin offset if necessary. More...
 
bool GetOriginChanged ()
 
void ResetOriginChanged ()
 
ChVector3f GetOriginOffset ()
 Access function for the origin offset. More...
 
void SetOriginOffsetThreshold (float threshold)
 Set the threshold for moving the origin. More...
 
void EnableDynamicOrigin (bool enable)
 Enable dynamic moving of the scene origin. More...
 

Member Function Documentation

◆ AddAreaLight()

CH_SENSOR_API unsigned int chrono::sensor::ChScene::AddAreaLight ( ChVector3f  pos,
ChColor  color,
float  max_range,
ChVector3f  du,
ChVector3f  dv 
)

Add an area light that emits light in a particular direction.

Parameters
posThe global position of the light source
colorThe golor of the light source
max_rangethe range at which the light intensity is equal to 1% of its maximum intensity
duthe x vector of the area light
dvthe y vector of the ara light
Returns
the index of the light that has been added

◆ AddPointLight() [1/2]

CH_SENSOR_API unsigned int chrono::sensor::ChScene::AddPointLight ( ChVector3f  pos,
ChColor  color,
float  max_range 
)

Add a point light that emits light in all directions.

Parameters
posThe global position of the light source
colorThe golor of the light source
max_rangethe 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 ( const PointLight p)

Add a point light that emits light in all directions.

Parameters
pA point light the will be added directly
Returns
the index of the light that has been added

◆ EnableDynamicOrigin()

void chrono::sensor::ChScene::EnableDynamicOrigin ( bool  enable)
inline

Enable dynamic moving of the scene origin.

Parameters
enablewhether to enable to the moving origin

◆ GetAmbientLight()

ChVector3f chrono::sensor::ChScene::GetAmbientLight ( )
inline

Function for setting the ambient light color.

Returns
the ambient light in the scene

◆ GetAreaLights()

std::vector<AreaLight> chrono::sensor::ChScene::GetAreaLights ( )
inline

Function for gaining access to the vector of area lights and can be used to modify lighting dynamically.

Returns
m_arealights A vector of area lights in the scene currently

◆ GetBackground()

Background chrono::sensor::ChScene::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

◆ GetOriginOffset()

ChVector3f chrono::sensor::ChScene::GetOriginOffset ( )
inline

Access function for the origin offset.

Returns
the origin offset

◆ GetPointLights()

std::vector<PointLight> chrono::sensor::ChScene::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()

float chrono::sensor::ChScene::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
idthe index of the point light to be modified
pthe new point light that will replace the values at the given index

◆ SetAmbientLight()

void chrono::sensor::ChScene::SetAmbientLight ( ChVector3f  color)
inline

Function for setting the ambient light color.

Parameters
colorthe 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
ba new background for the scene

◆ SetFogScatteringFromDistance()

CH_SENSOR_API void chrono::sensor::ChScene::SetFogScatteringFromDistance ( float  distance)

Function to set the fog scattering coefficient from max visible distance.

Function to set the fog scattering coefficient.

◆ SetOriginOffsetThreshold()

void chrono::sensor::ChScene::SetOriginOffsetThreshold ( float  threshold)
inline

Set the threshold for moving the origin.

Parameters
thresholdthe threshold outside of which to move the scene origin

◆ SetSceneEpsilon()

CH_SENSOR_API void chrono::sensor::ChScene::SetSceneEpsilon ( float  e)

Allows setting the scene epsilon used for traversal checks.

Parameters
ethe epsilon value

◆ UpdateOriginOffset()

void chrono::sensor::ChScene::UpdateOriginOffset ( ChVector3f  sensor_pos,
bool  force = false 
)

Function to change the origin offset if necessary.

Parameters
sensor_posthe position of the sensor
forcewhether to force updating even if threshold is not met

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