Update XML parsing to store asset path so that assets can be recovered and sent to external renderers
PiperOrigin-RevId: 567347908 Change-Id: I4d8e1abe35be3a67643ff925af709921280856f8
This commit is contained in:
committed by
Copybara-Service
parent
4f34cacf35
commit
7f8018a3f3
@@ -593,6 +593,7 @@ struct mjModel_ {
|
||||
int nuser_sensor; // number of mjtNums in sensor_user
|
||||
int nnames; // number of chars in all names
|
||||
int nnames_map; // number of slots in the names hash map
|
||||
int npaths; // number of chars in all paths
|
||||
|
||||
// sizes set after mjModel construction (only affect mjData)
|
||||
int nM; // number of non-zeros in sparse inertia matrix
|
||||
@@ -777,6 +778,7 @@ struct mjModel_ {
|
||||
int* mesh_graphadr; // graph data address; -1: no graph (nmesh x 1)
|
||||
mjtNum* mesh_pos; // translation applied to asset vertices (nmesh x 3)
|
||||
mjtNum* mesh_quat; // rotation applied to asset vertices (nmesh x 4)
|
||||
int* mesh_assetpathadr; // address of asset path for mesh; -1: none (nmesh x 1)
|
||||
float* mesh_vert; // vertex positions for all meshes (nmeshvert x 3)
|
||||
float* mesh_normal; // normals for all meshes (nmeshnormal x 3)
|
||||
float* mesh_texcoord; // vertex texcoords for all meshes (nmeshtexcoord x 2)
|
||||
@@ -983,6 +985,9 @@ struct mjModel_ {
|
||||
int* name_pluginadr; // plugin instance name pointers (nplugin x 1)
|
||||
char* names; // names of all objects, 0-terminated (nnames x 1)
|
||||
int* names_map; // internal hash map of names (nnames_map x 1)
|
||||
|
||||
// paths
|
||||
char* paths; // paths to assets, 0-terminated (npaths x 1)
|
||||
};
|
||||
typedef struct mjModel_ mjModel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user