Expose userfacenormal to mjsMesh

PiperOrigin-RevId: 814253177
Change-Id: I644974feea0722f03e7c3b01be7b702dba233f0a
This commit is contained in:
Sam Haves
2025-10-02 08:52:50 -07:00
committed by Copybara-Service
parent 6320b95957
commit 32e08f9507
4 changed files with 11 additions and 0 deletions
+1
View File
@@ -2149,6 +2149,7 @@ typedef struct mjsMesh_ { // mesh specification
mjFloatVec* usernormal; // user normal data
mjFloatVec* usertexcoord; // user texcoord data
mjIntVec* userface; // user vertex indices
mjIntVec* userfacenormal; // user face normal indices
mjIntVec* userfacetexcoord; // user texcoord indices
mjsPlugin plugin; // sdf plugin
mjString* material; // name of material
+1
View File
@@ -479,6 +479,7 @@ typedef struct mjsMesh_ { // mesh specification
mjFloatVec* usernormal; // user normal data
mjFloatVec* usertexcoord; // user texcoord data
mjIntVec* userface; // user vertex indices
mjIntVec* userfacenormal; // user face normal indices
mjIntVec* userfacetexcoord; // user texcoord indices
mjsPlugin plugin; // sdf plugin
mjString* material; // name of material
+7
View File
@@ -9378,6 +9378,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='user vertex indices',
),
StructFieldDecl(
name='userfacenormal',
type=PointerType(
inner_type=ValueType(name='mjIntVec'),
),
doc='user face normal indices',
),
StructFieldDecl(
name='userfacetexcoord',
type=PointerType(
+2
View File
@@ -277,6 +277,7 @@ void mjCMesh::PointToLocal() {
spec.uservert = &spec_vert_;
spec.usernormal = &spec_normal_;
spec.userface = &spec_face_;
spec.userfacenormal = &spec_facenormal_;
spec.usertexcoord = &spec_texcoord_;
spec.userfacetexcoord = &spec_facetexcoord_;
spec.material = &spec_material_;
@@ -288,6 +289,7 @@ void mjCMesh::PointToLocal() {
uservert = nullptr;
usernormal = nullptr;
userface = nullptr;
userfacenormal = nullptr;
usertexcoord = nullptr;
userfacetexcoord = nullptr;
}