Convert light directional boolean into a type enum.
PiperOrigin-RevId: 761983728 Change-Id: Id5bf93c103e5358d9c5cd9f1176532a978e0b3a8
This commit is contained in:
committed by
Copybara-Service
parent
373b4c0437
commit
74cc904edc
@@ -152,7 +152,7 @@
|
||||
X( int, light_, mode, nlight, 1 ) \
|
||||
X( int, light_, bodyid, nlight, 1 ) \
|
||||
X( int, light_, targetbodyid, nlight, 1 ) \
|
||||
X( mjtByte, light_, directional, nlight, 1 ) \
|
||||
X( int, light_, type, nlight, 1 ) \
|
||||
X( mjtByte, light_, castshadow, nlight, 1 ) \
|
||||
X( mjtByte, light_, active, nlight, 1 ) \
|
||||
X( mjtNum, light_, pos, nlight, 3 ) \
|
||||
|
||||
@@ -111,6 +111,17 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
||||
('mjCAMLIGHT_TARGETBODYCOM', 4),
|
||||
]),
|
||||
)),
|
||||
('mjtLightType',
|
||||
EnumDecl(
|
||||
name='mjtLightType',
|
||||
declname='enum mjtLightType_',
|
||||
values=dict([
|
||||
('mjLIGHT_SPOT', 0),
|
||||
('mjLIGHT_DIRECTIONAL', 1),
|
||||
('mjLIGHT_POINT', 2),
|
||||
('mjLIGHT_IMAGE', 3),
|
||||
]),
|
||||
)),
|
||||
('mjtTexture',
|
||||
EnumDecl(
|
||||
name='mjtTexture',
|
||||
|
||||
@@ -2220,11 +2220,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
array_extent=('nlight',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='light_directional',
|
||||
name='light_type',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjtByte'),
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='directional light',
|
||||
doc='spot, directional, etc. (mjtLightType)',
|
||||
array_extent=('nlight',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
@@ -6697,6 +6697,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
),
|
||||
doc='direction rel. to body frame',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='type',
|
||||
type=ValueType(name='int'),
|
||||
doc='type (mjtLightType)',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='attenuation',
|
||||
type=ArrayType(
|
||||
@@ -6744,11 +6749,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=ValueType(name='mjtByte'),
|
||||
doc='headlight',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='directional',
|
||||
type=ValueType(name='mjtByte'),
|
||||
doc='directional light',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='castshadow',
|
||||
type=ValueType(name='mjtByte'),
|
||||
@@ -8992,9 +8992,9 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
doc='is light active',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='directional',
|
||||
type=ValueType(name='mjtByte'),
|
||||
doc='is light directional or spot',
|
||||
name='type',
|
||||
type=ValueType(name='mjtLightType'),
|
||||
doc='type of light',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='castshadow',
|
||||
|
||||
@@ -1073,7 +1073,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
|
||||
X(cutoff);
|
||||
X(exponent);
|
||||
X(headlight);
|
||||
X(directional);
|
||||
X(type);
|
||||
X(castshadow);
|
||||
X(bulbradius);
|
||||
X(intensity);
|
||||
|
||||
Reference in New Issue
Block a user