Skip to content

Commit

Permalink
Change test model to include submeshes
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <[email protected]>
  • Loading branch information
Blast545 committed Apr 26, 2021
1 parent 949ca93 commit a1ec6da
Show file tree
Hide file tree
Showing 8 changed files with 297 additions and 149 deletions.
2 changes: 1 addition & 1 deletion test/worlds/collada_world_exporter_submesh.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<include>
<static>true</static>
<pose>22 111 -10 0 -0 0</pose>
<uri>model://cordless_drill</uri>
<uri>model://mesh_with_submeshes</uri>
</include>

</world>
Expand Down
138 changes: 0 additions & 138 deletions test/worlds/models/cordless_drill/meshes/cordless_drill.dae

This file was deleted.

6 changes: 0 additions & 6 deletions test/worlds/models/cordless_drill/model.config

This file was deleted.

98 changes: 98 additions & 0 deletions test/worlds/models/mesh_with_submeshes/meshes/box.dae
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<unit name="meter" meter="1"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="Material-effect">
<profile_COMMON>
<technique sid="common">
<phong>
<emission>
<color sid="emission">0 0 0 1</color>
</emission>
<ambient>
<color sid="ambient">0 0 0 1</color>
</ambient>
<diffuse>
<color sid="diffuse">0.64 0.64 0.64 1</color>
</diffuse>
<specular>
<color sid="specular">0.5 0.5 0.5 1</color>
</specular>
<shininess>
<float sid="shininess">50</float>
</shininess>
<transparent opaque="A_ONE">
<color>1 1 1 1</color>
</transparent>
<transparency>
<float>1</float>
</transparency>
<index_of_refraction>
<float sid="index_of_refraction">1</float>
</index_of_refraction>
</phong>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="Material-material" name="Material-material">
<instance_effect url="#Material-effect"/>
</material>
</library_materials>
<library_geometries>
<geometry id="Cube-mesh" name="Cube">
<mesh>
<source id="Cube-mesh-positions">
<float_array id="Cube-mesh-positions-array" count="24">1 1 -1 1 -1 -1 -1 -0.9999998 -1 -0.9999997 1 -1 1 0.9999995 1 0.9999994 -1.000001 1 -1 -0.9999997 1 -1 1 1</float_array>
<technique_common>
<accessor source="#Cube-mesh-positions-array" count="8" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Cube-mesh-normals">
<float_array id="Cube-mesh-normals-array" count="18">0 0 -1 0 0 1 1 -2.83122e-7 0 -2.83122e-7 -1 0 -1 2.23517e-7 -1.3411e-7 2.38419e-7 1 2.08616e-7</float_array>
<technique_common>
<accessor source="#Cube-mesh-normals-array" count="6" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="Cube-mesh-vertices">
<input semantic="POSITION" source="#Cube-mesh-positions"/>
</vertices>
<polylist material="Material-material" count="6">
<input semantic="VERTEX" source="#Cube-mesh-vertices" offset="0"/>
<input semantic="NORMAL" source="#Cube-mesh-normals" offset="1"/>
<vcount>4 4 4 4 4 4 </vcount>
<p>0 0 1 0 2 0 3 0 4 1 7 1 6 1 5 1 0 2 4 2 5 2 1 2 1 3 5 3 6 3 2 3 2 4 6 4 7 4 3 4 4 5 0 5 3 5 7 5</p>
</polylist>
</mesh>
<extra><technique profile="MAYA"><double_sided>1</double_sided></technique></extra>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Cube" name="Cube" type="NODE">
<instance_geometry url="#Cube-mesh">
<bind_material>
<technique_common>
<instance_material symbol="Material-material" target="#Material-material"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#Scene"/>
</scene>
</COLLADA>
186 changes: 186 additions & 0 deletions test/worlds/models/mesh_with_submeshes/meshes/mesh_with_submeshes.dae

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions test/worlds/models/mesh_with_submeshes/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" ?>
<model>
<name>mesh_with_submeshes</name>
<version>1.0</version>
<sdf version="1.6">model.sdf</sdf>
</model>

Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version='1.0'?>
<sdf version='1.8'>
<model name='cordless_drill'>
<sdf version='1.6'>
<model name='scheme_resource_uri'>
<pose>0 0 1 0 0 0</pose>
<link name='the_link'>
<visual name='the_visual'>
<geometry>
<mesh>
<uri>model://cordless_drill/meshes/cordless_drill.dae</uri>
<uri>model://mesh_with_submeshes/meshes/box.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='the_collision'>
<geometry>
<mesh>
<uri>model://cordless_drill/meshes/cordless_drill.dae</uri>
<uri>model://mesh_with_submeshes/meshes/box.dae</uri>
</mesh>
</geometry>
</collision>
</link>
</model>
</sdf>

0 comments on commit a1ec6da

Please sign in to comment.