Add texture attribute to lights.
PiperOrigin-RevId: 763739805 Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
This commit is contained in:
committed by
Copybara-Service
parent
441ca838a1
commit
568620dd2f
@@ -858,6 +858,7 @@ struct mjModel_ {
|
||||
int* light_bodyid; // id of light's body (nlight x 1)
|
||||
int* light_targetbodyid; // id of targeted body; -1: none (nlight x 1)
|
||||
int* light_type; // spot, directional, etc. (mjtLightType) (nlight x 1)
|
||||
int* light_texid; // texture id for image lights (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)
|
||||
|
||||
@@ -395,6 +395,7 @@ typedef struct mjsLight_ { // light specification
|
||||
// intrinsics
|
||||
mjtByte active; // is light active
|
||||
mjtLightType type; // type of light
|
||||
mjString* texture; // texture name for image lights
|
||||
mjtByte castshadow; // does light cast shadows
|
||||
float bulbradius; // bulb radius, for soft shadows
|
||||
float intensity; // intensity, in candelas
|
||||
|
||||
@@ -262,6 +262,7 @@ struct mjvLight_ { // OpenGL light
|
||||
float pos[3]; // position rel. to body frame
|
||||
float dir[3]; // direction rel. to body frame
|
||||
int type; // type (mjtLightType)
|
||||
int texid; // texture id for image lights
|
||||
float attenuation[3]; // OpenGL attenuation (quadratic model)
|
||||
float cutoff; // OpenGL cutoff
|
||||
float exponent; // OpenGL exponent
|
||||
|
||||
@@ -300,6 +300,7 @@
|
||||
X ( int, light_bodyid, nlight, 1 ) \
|
||||
X ( int, light_targetbodyid, nlight, 1 ) \
|
||||
X ( int, light_type, nlight, 1 ) \
|
||||
X ( int, light_texid, nlight, 1 ) \
|
||||
X ( mjtByte, light_castshadow, nlight, 1 ) \
|
||||
X ( float, light_bulbradius, nlight, 1 ) \
|
||||
X ( float, light_intensity, nlight, 1 ) \
|
||||
|
||||
Reference in New Issue
Block a user