Save normalising transform applied to mesh assets in mjModel.mesh_{pos,quat}
Fixes #409 PiperOrigin-RevId: 564217402 Change-Id: I53ddeef4e343905021cd7852d548f6769c876474
This commit is contained in:
committed by
Copybara-Service
parent
a07e172770
commit
0ba10cc4f0
@@ -780,6 +780,8 @@ struct mjModel_ {
|
||||
int* mesh_texcoordadr; // texcoord data address; -1: no texcoord (nmesh x 1)
|
||||
int* mesh_texcoordnum; // number of texcoord (nmesh x 1)
|
||||
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)
|
||||
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)
|
||||
|
||||
@@ -294,6 +294,8 @@
|
||||
XMJV( int, mesh_bvhadr, nmesh, 1 ) \
|
||||
XMJV( int, mesh_bvhnum, nmesh, 1 ) \
|
||||
XMJV( int, mesh_graphadr, nmesh, 1 ) \
|
||||
X ( mjtNum, mesh_pos, nmesh, 3 ) \
|
||||
X ( mjtNum, mesh_quat, nmesh, 4 ) \
|
||||
X ( float, mesh_vert, nmeshvert, 3 ) \
|
||||
X ( float, mesh_normal, nmeshnormal, 3 ) \
|
||||
X ( float, mesh_texcoord, nmeshtexcoord, 2 ) \
|
||||
|
||||
Reference in New Issue
Block a user