Skip to content

Commit

Permalink
Receptacle test assets (#1994)
Browse files Browse the repository at this point in the history
* add new test assets for receptacle testing

* modify the simple_room config

* updated receptacle metadata and meshes

* update a manager test for asset changes

* adding Magnum::AnySceneImporter MagnumPlugins::AssimpImporter to python bindings plugins for scene import
  • Loading branch information
aclegg3 authored Mar 14, 2023
1 parent 0af488d commit 25450ab
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 5 deletions.
34 changes: 33 additions & 1 deletion data/test_assets/objects/chair.object_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
{
"render_asset": "chair.glb",
"mass": 9
"mass": 9,
"user_defined": {
"receptacle_aabb_chair_test": {
"name": "receptacle_aabb_chair_test",
"parent_object": "chair",
"position": [
-0.079131,
0.119772,
0
],
"scale": [
0.158802,
0.11,
0.19

]
},
"receptacle_mesh_chair_test": {
"name": "receptacle_mesh_chair_test",
"parent_object": "chair",
"position": [
0.0,
0.0,
0.0
],
"scale": [
1.0,
1.0,
1.0
],
"mesh_filepath": "receptacle_mesh_chair.ply"
}
}
}
16 changes: 16 additions & 0 deletions data/test_assets/objects/receptacle_mesh_chair.ply
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ply
format ascii 1.0
comment Created by Blender 3.3.0 - www.blender.org
element vertex 4
property float x
property float y
property float z
element face 2
property list uchar uint vertex_indices
end_header
0.045097 0.009212 0.175879
-0.243901 0.009212 -0.175879
-0.243901 0.009212 0.175879
0.045097 0.009212 -0.175879
3 0 1 2
3 0 3 1
16 changes: 16 additions & 0 deletions data/test_assets/scenes/receptacle_mesh_simple_room_table.ply
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ply
format ascii 1.0
comment Created by Blender 3.3.0 - www.blender.org
element vertex 4
property float x
property float y
property float z
element face 2
property list uchar uint vertex_indices
end_header
0.950000 1.167508 -0.950000
-0.450000 1.167508 0.450000
0.950000 1.167508 0.450000
-0.450000 1.167508 -0.950000
3 0 1 2
3 0 3 1
35 changes: 35 additions & 0 deletions data/test_assets/scenes/simple_room.stage_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"render_asset": "simple_room.glb",
"up": [0,0,1],
"front": [0,1,0],
"shader_type": "pbr",
"user_defined": {
"receptacle_aabb_simpleroom_test": {
"name": "receptacle_aabb_simpleroom_test",
"position": [
2.36945,
-1.3934,
2.61652
],
"scale": [
1.0,
1.0,
0.39171
]
},
"receptacle_mesh_simpleroom_test": {
"name": "receptacle_mesh_simpleroom_test",
"position": [
0.0,
0.0,
0.0
],
"scale": [
1.0,
1.0,
1.0
],
"mesh_filepath": "receptacle_mesh_simple_room_table.ply"
}
}
}
10 changes: 7 additions & 3 deletions src/cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,15 @@ if(NOT USE_SYSTEM_MAGNUM)
# for Python as well; and reset that back to strange build procedures that
# turn some features off again later can still work.
if(BUILD_GUI_VIEWERS)
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS MagnumPlugins::StbTrueTypeFont
CACHE STRING "" FORCE
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS
MagnumPlugins::StbTrueTypeFont Magnum::AnySceneImporter
MagnumPlugins::AssimpImporter CACHE STRING "" FORCE
)
else()
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS "" CACHE STRING "" FORCE)
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS Magnum::AnySceneImporter
MagnumPlugins::AssimpImporter
CACHE STRING "" FORCE
)
endif()
add_subdirectory("${DEPS_DIR}/magnum-bindings")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/tests/AttributesManagersTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ void AttributesManagersTest::testPhysicsAttributesManagersCreate() {

void AttributesManagersTest::testStageAttributesManagersCreate() {
std::string stageConfigFile =
Cr::Utility::Path::join(DATA_DIR, "test_assets/scenes/simple_room.glb");
Cr::Utility::Path::join(DATA_DIR, "test_assets/scenes/plane.glb");

CORRADE_INFO(
"Start Test : Create, Edit, Remove Attributes for "
Expand Down

0 comments on commit 25450ab

Please sign in to comment.