Add intensity and range parameters to lights.
PiperOrigin-RevId: 758603199 Change-Id: I74e88bdfeedd9224e84d953f237d68eca79e6cb7
This commit is contained in:
committed by
Copybara-Service
parent
a6c3a287d6
commit
fa95fe0c59
@@ -845,6 +845,8 @@ struct mjModel_ {
|
||||
mjtByte* light_directional; // directional light (nlight x 1)
|
||||
mjtByte* light_castshadow; // does light cast shadows (nlight x 1)
|
||||
float* light_bulbradius; // light radius for soft shadows (nlight x 1)
|
||||
float* light_intensity; // intensity, in candela (nlight x 1)
|
||||
float* light_range; // range of effectiveness (nlight x 1)
|
||||
mjtByte* light_active; // is light on (nlight x 1)
|
||||
mjtNum* light_pos; // position rel. to body frame (nlight x 3)
|
||||
mjtNum* light_dir; // direction rel. to body frame (nlight x 3)
|
||||
|
||||
@@ -396,7 +396,9 @@ typedef struct mjsLight_ { // light specification
|
||||
mjtByte active; // is light active
|
||||
mjtByte directional; // is light directional or spot
|
||||
mjtByte castshadow; // does light cast shadows
|
||||
double bulbradius; // bulb radius, for soft shadows
|
||||
float bulbradius; // bulb radius, for soft shadows
|
||||
float intensity; // intensity, in candelas
|
||||
float range; // range of effectiveness
|
||||
float attenuation[3]; // OpenGL attenuation (quadratic model)
|
||||
float cutoff; // OpenGL cutoff
|
||||
float exponent; // OpenGL exponent
|
||||
|
||||
@@ -271,6 +271,8 @@ struct mjvLight_ { // OpenGL light
|
||||
mjtByte directional; // directional light
|
||||
mjtByte castshadow; // does light cast shadows
|
||||
float bulbradius; // bulb radius for soft shadows
|
||||
float intensity; // intensity, in candelas
|
||||
float range; // range of effectiveness
|
||||
};
|
||||
typedef struct mjvLight_ mjvLight;
|
||||
|
||||
@@ -504,6 +506,8 @@ struct mjvSceneState_ {
|
||||
mjtByte* light_directional;
|
||||
mjtByte* light_castshadow;
|
||||
float* light_bulbradius;
|
||||
float* light_intensity;
|
||||
float* light_range;
|
||||
mjtByte* light_active;
|
||||
float* light_attenuation;
|
||||
float* light_cutoff;
|
||||
|
||||
@@ -302,6 +302,8 @@
|
||||
XMJV( mjtByte, light_directional, nlight, 1 ) \
|
||||
XMJV( mjtByte, light_castshadow, nlight, 1 ) \
|
||||
XMJV( float, light_bulbradius, nlight, 1 ) \
|
||||
XMJV( float, light_intensity, nlight, 1 ) \
|
||||
XMJV( float, light_range, nlight, 1 ) \
|
||||
XMJV( mjtByte, light_active, nlight, 1 ) \
|
||||
X ( mjtNum, light_pos, nlight, 3 ) \
|
||||
X ( mjtNum, light_dir, nlight, 3 ) \
|
||||
|
||||
Reference in New Issue
Block a user