Add texture attribute to lights.

PiperOrigin-RevId: 763739805
Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
This commit is contained in:
Google DeepMind
2025-05-27 05:03:04 -07:00
committed by Copybara-Service
parent 441ca838a1
commit 568620dd2f
18 changed files with 106 additions and 4 deletions
+20
View File
@@ -2227,6 +2227,14 @@ STRUCTS: Mapping[str, StructDecl] = dict([
doc='spot, directional, etc. (mjtLightType)',
array_extent=('nlight',),
),
StructFieldDecl(
name='light_texid',
type=PointerType(
inner_type=ValueType(name='int'),
),
doc='texture id for image lights',
array_extent=('nlight',),
),
StructFieldDecl(
name='light_castshadow',
type=PointerType(
@@ -6702,6 +6710,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='int'),
doc='type (mjtLightType)',
),
StructFieldDecl(
name='texid',
type=ValueType(name='int'),
doc='texture id for image lights',
),
StructFieldDecl(
name='attenuation',
type=ArrayType(
@@ -8996,6 +9009,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='mjtLightType'),
doc='type of light',
),
StructFieldDecl(
name='texture',
type=PointerType(
inner_type=ValueType(name='mjString'),
),
doc='texture name for image lights',
),
StructFieldDecl(
name='castshadow',
type=ValueType(name='mjtByte'),
+1
View File
@@ -1074,6 +1074,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
X(exponent);
X(headlight);
X(type);
X(texid);
X(castshadow);
X(bulbradius);
X(intensity);