![]() |
CamSim
0.0.0
A rasterization-based simulator for various types of cameras
|
Public Attributes | |
Type | |
| LightType | type |
| Light source type. More... | |
| float | innerConeAngle |
| For spot lights: inner cone angle in degrees. More... | |
| float | outerConeAngle |
| For spot lights: outer cone angle in degrees. More... | |
Geometry | |
| bool | isRelativeToCamera |
| Flag: does this light source move with the camera? More... | |
| QVector3D | position |
| Position. More... | |
| QVector3D | direction |
| Direction (for spot lights and directional lights) More... | |
| QVector3D | up |
| "Up vector" (for shadow mapping and power factor maps). Must be perpendicular to direction. More... | |
Basic simulation parameters | |
| QVector3D | color |
| Light color, for classic OpenGL cameras. More... | |
| float | power |
| Power in Watt, for PMD cameras. More... | |
| float | attenuationConstant |
| Constant attenuation coefficient. Should be 1 for physically plausible lights. More... | |
| float | attenuationLinear |
| Linear attenuation coefficient. Should be 0 for physically plausible lights. More... | |
| float | attenuationQuadratic |
| Quadratic attenuation coefficient. Should be 1 for physically plausible lights. More... | |
Shadows and reflective shadow maps | |
| bool | shadowMap |
| Flag: does this light source create a shadow map? (Used if shadow maps are active in the simulator pipeline.) More... | |
| unsigned int | shadowMapSize |
| Width and height of shadow map (only used if shadowMap is true) More... | |
| float | shadowMapDepthBias |
| Bias for comparison with shadow map depths. Value should be greater than or equal to zero. More... | |
| bool | reflectiveShadowMap |
| Flag: does this light source create reflective shadow maps? (Used if reflective shadow maps are active in the simulator pipeline.) More... | |
| unsigned int | reflectiveShadowMapSize |
| Width and height of reflective shadow map (only used if reflectiveShadowMap is true) More... | |
Advanced simulation parameters | |
| unsigned int | powerFactorTex |
| Texture containing power factor map (or 0 if unavailable). This will be created and updated automatically by the simulator; you only have to care about the parameters defined below. More... | |
| int | powerFactorMapWidth |
| Width of the power factor map. More... | |
| int | powerFactorMapHeight |
| Height of the power factor map. More... | |
| float | powerFactorMapAngleLeft |
| Angle in degrees at left border of power distribution map (seen from light source) More... | |
| float | powerFactorMapAngleRight |
| Angle in degrees at right border of power distribution map (seen from light source) More... | |
| float | powerFactorMapAngleBottom |
| Angle in degrees at bottom border of power distribution map (seen from light source) More... | |
| float | powerFactorMapAngleTop |
| Angle in degrees at top border of power distribution map (seen from light source) More... | |
| QVector< float > | powerFactors |
| Vector containing power factor map values (or empty). More... | |
| bool(* | powerFactorMapCallback )(void *callbackData, long long timestamp, int *mapWidth, int *mapHeight, float *angleLeft, float *angleRight, float *angleBottom, float *angleTop, QVector< float > &factors) |
| Callback function that allows dynamically changing power factor maps. More... | |
| void * | powerFactorMapCallbackData |
| Pointer to user-defined data fed into the power factor map callback. More... | |
| Light () | |
| Constructor. More... | |
| void | updatePowerFactorTex (unsigned int pbo, long long timestamp) |
| Update a power factor texture from the values given. This function is used by the simulator; do not call it in your own code. More... | |
The Light class.
This describes a light source for OpenGL-based rendering.
| CamSim::Light::Light | ( | ) |
Constructor.
| void CamSim::Light::updatePowerFactorTex | ( | unsigned int | pbo, |
| long long | timestamp | ||
| ) |
Update a power factor texture from the values given. This function is used by the simulator; do not call it in your own code.
| float CamSim::Light::attenuationConstant |
Constant attenuation coefficient. Should be 1 for physically plausible lights.
| float CamSim::Light::attenuationLinear |
Linear attenuation coefficient. Should be 0 for physically plausible lights.
| float CamSim::Light::attenuationQuadratic |
Quadratic attenuation coefficient. Should be 1 for physically plausible lights.
| QVector3D CamSim::Light::color |
Light color, for classic OpenGL cameras.
| QVector3D CamSim::Light::direction |
Direction (for spot lights and directional lights)
| float CamSim::Light::innerConeAngle |
For spot lights: inner cone angle in degrees.
| bool CamSim::Light::isRelativeToCamera |
Flag: does this light source move with the camera?
| float CamSim::Light::outerConeAngle |
For spot lights: outer cone angle in degrees.
| QVector3D CamSim::Light::position |
Position.
| float CamSim::Light::power |
Power in Watt, for PMD cameras.
| float CamSim::Light::powerFactorMapAngleBottom |
Angle in degrees at bottom border of power distribution map (seen from light source)
| float CamSim::Light::powerFactorMapAngleLeft |
Angle in degrees at left border of power distribution map (seen from light source)
| float CamSim::Light::powerFactorMapAngleRight |
Angle in degrees at right border of power distribution map (seen from light source)
| float CamSim::Light::powerFactorMapAngleTop |
Angle in degrees at top border of power distribution map (seen from light source)
| bool(* CamSim::Light::powerFactorMapCallback) (void *callbackData, long long timestamp, int *mapWidth, int *mapHeight, float *angleLeft, float *angleRight, float *angleBottom, float *angleTop, QVector< float > &factors) |
Callback function that allows dynamically changing power factor maps.
| callbackData | User defined pointer, see powerFactorMapCallbackData |
| timestamp | Time stamp for which to generate the map |
| mapWidth | Width of the generated map |
| mapHeight | Height of the generated map |
| angleLeft | Horizontal angle corresponding to left border of map |
| angleRight | Horizontal angle corresponding to right border of map |
| angleBottom | Vertical angle corresponding to bottom border of map |
| angleTop | Vertical angle corresponding to top border of map |
| factors | The map; this vector should be resized and filled with values |
| void* CamSim::Light::powerFactorMapCallbackData |
Pointer to user-defined data fed into the power factor map callback.
| int CamSim::Light::powerFactorMapHeight |
Height of the power factor map.
| int CamSim::Light::powerFactorMapWidth |
Width of the power factor map.
| QVector<float> CamSim::Light::powerFactors |
Vector containing power factor map values (or empty).
| unsigned int CamSim::Light::powerFactorTex |
Texture containing power factor map (or 0 if unavailable). This will be created and updated automatically by the simulator; you only have to care about the parameters defined below.
Each texel corresponds to an outgoing angle (horizontally and vertically) and contains a floating point value in [0,1] that is multiplied with the light source power value ('color' for classic OpenGL cameras; 'power' for PMD cameras).
| bool CamSim::Light::reflectiveShadowMap |
Flag: does this light source create reflective shadow maps? (Used if reflective shadow maps are active in the simulator pipeline.)
| unsigned int CamSim::Light::reflectiveShadowMapSize |
Width and height of reflective shadow map (only used if reflectiveShadowMap is true)
| bool CamSim::Light::shadowMap |
Flag: does this light source create a shadow map? (Used if shadow maps are active in the simulator pipeline.)
| float CamSim::Light::shadowMapDepthBias |
Bias for comparison with shadow map depths. Value should be greater than or equal to zero.
| unsigned int CamSim::Light::shadowMapSize |
Width and height of shadow map (only used if shadowMap is true)
| QVector3D CamSim::Light::up |
"Up vector" (for shadow mapping and power factor maps). Must be perpendicular to direction.
1.8.16