Add SDF geom to test/testdata/model.xml.
Also, when a mesh has both an octree and a bvh, render only the octree. PiperOrigin-RevId: 790680831 Change-Id: Iaf3896933f6728af4db1eaa83ff5b06558ab0d19
This commit is contained in:
committed by
Copybara-Service
parent
100b1a06fd
commit
7baaa39846
@@ -764,7 +764,7 @@ void mjv_addGeoms(const mjModel* m, mjData* d, const mjvOption* vopt,
|
||||
for (int geomid = 0; geomid < m->ngeom; geomid++) {
|
||||
int meshid = m->geom_dataid[geomid];
|
||||
// skip if not a mesh or if there is an octree
|
||||
if (m->geom_type[geomid] == mjGEOM_SDF || meshid == -1 || m->mesh_octadr[meshid] >= 0) {
|
||||
if (meshid == -1 || m->geom_type[geomid] == mjGEOM_SDF || m->mesh_octadr[meshid] >= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ void mjv_addGeoms(const mjModel* m, mjData* d, const mjvOption* vopt,
|
||||
if (vopt->flags[mjVIS_MESHBVH]) {
|
||||
for (int geomid = 0; geomid < m->ngeom; geomid++) {
|
||||
int meshid = m->geom_dataid[geomid];
|
||||
if (meshid == -1 || (m->geom_type[geomid] == mjGEOM_MESH && m->mesh_octadr[meshid] == -1)) {
|
||||
if (meshid == -1 || m->geom_type[geomid] == mjGEOM_HFIELD || m->mesh_octadr[meshid] == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
@@ -116,6 +116,9 @@
|
||||
<geom type="box" size=".025 .01 0.0001" pos=".025 0 0" euler="20 0 0" mass="1e-4" fluidshape="ellipsoid"/>
|
||||
<geom type="box" size=".025 .01 0.0001" pos="-.025 0 0" euler="-19 0 0" mass="1e-4" fluidshape="ellipsoid"/>
|
||||
</body>
|
||||
<body pos="-.2 .3 .8">
|
||||
<geom type="sdf" mesh="icosahedron" size=".1" rgba="0 0 1 1"/>
|
||||
</body>
|
||||
</worldbody>
|
||||
|
||||
<equality>
|
||||
|
||||
Reference in New Issue
Block a user