Skip to content
Snippets Groups Projects
Commit a72afde6 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add articulated simox XML in ObjectClass

parent 4a140014
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,10 @@ Core segment type of Object/Class.
<armarx::arondto::PackagePath />
</ObjectChild>
<ObjectChild key="articulatedSimoxXmlPath">
<armarx::arondto::PackagePath />
</ObjectChild>
<ObjectChild key="meshWrlPath">
<armarx::arondto::PackagePath />
</ObjectChild>
......
......@@ -172,18 +172,23 @@ namespace armarx::armem::server::obj::clazz
toAron(data.id, info.id());
if (fs::is_regular_file(info.simoxXML().absolutePath))
auto setPathIfExists = [](
armarx::arondto::PackagePath & aron,
const PackageFileLocation & location)
{
toAron(data.simoxXmlPath, info.simoxXML());
}
if (fs::is_regular_file(info.wavefrontObj().absolutePath))
{
toAron(data.meshObjPath, info.wavefrontObj());
}
if (fs::is_regular_file(info.file(".wrl").absolutePath))
{
toAron(data.meshWrlPath, info.file(".wrl"));
}
if (fs::is_regular_file(location.absolutePath))
{
toAron(aron, location);
}
else
{
toAron(aron, PackageFileLocation());
}
};
setPathIfExists(data.simoxXmlPath, info.simoxXML());
setPathIfExists(data.articulatedSimoxXmlPath, info.articulatedSimoxXML());
setPathIfExists(data.meshObjPath, info.wavefrontObj());
setPathIfExists(data.meshWrlPath, info.meshWrl());
auto aabb = info.loadAABB();
toAron(data.aabb, aabb ? aabb.value() : simox::AxisAlignedBoundingBox());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment