Add support in mjModel for tagging textures with different roles, and use the slot index of a texture to designate its role.
PiperOrigin-RevId: 654030065 Change-Id: I34a5b132a7f91a6bb8f260500c1b9c128a03b596
This commit is contained in:
committed by
Copybara-Service
parent
8a8a44a4db
commit
796173170c
@@ -119,6 +119,24 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
||||
('mjTEXTURE_SKYBOX', 2),
|
||||
]),
|
||||
)),
|
||||
('mjtTextureRole',
|
||||
EnumDecl(
|
||||
name='mjtTextureRole',
|
||||
declname='enum mjtTextureRole_',
|
||||
values=dict([
|
||||
('mjTEXROLE_USER', 0),
|
||||
('mjTEXROLE_RGB', 1),
|
||||
('mjTEXROLE_OCCLUSION', 2),
|
||||
('mjTEXROLE_ROUGHNESS', 3),
|
||||
('mjTEXROLE_METALLIC', 4),
|
||||
('mjTEXROLE_NORMAL', 5),
|
||||
('mjTEXROLE_OPACITY', 6),
|
||||
('mjTEXROLE_EMISSIVE', 7),
|
||||
('mjTEXROLE_RGBA', 8),
|
||||
('mjTEXROLE_ORM', 9),
|
||||
('mjNTEXROLE', 10),
|
||||
]),
|
||||
)),
|
||||
('mjtIntegrator',
|
||||
EnumDecl(
|
||||
name='mjtIntegrator',
|
||||
|
||||
@@ -2925,7 +2925,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='indices of textures; -1: none (nmat x mjNTEXMAT)', # pylint: disable=line-too-long
|
||||
doc='indices of textures; -1: none (nmat x mjNTEXROLE)', # pylint: disable=line-too-long
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='mat_texuniform',
|
||||
@@ -7967,7 +7967,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
name='mat_texid',
|
||||
type=ArrayType(
|
||||
inner_type=ValueType(name='int'),
|
||||
extents=(600,),
|
||||
extents=(1000,),
|
||||
),
|
||||
doc='material texture ids (-1: no texture)',
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user