Skip to content

Commit 26302a3

Browse files
author
devsh
committed
adjust to AABB changes
1 parent 4ed18fa commit 26302a3

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

12_MeshLoaders/main.cpp

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -360,19 +360,13 @@ class MeshLoadersApp final : public MonoWindowApplication, public BuiltinResourc
360360
const auto& converted = reservation.getGPUObjects<ICPUPolygonGeometry>();
361361
for (const auto& geom : converted)
362362
{
363-
geom.value->visitAABB([&bound,&worldTforms,&tmp,&printAABB](const auto& aabb)->void
364-
{
365-
hlsl::shapes::AABB<3,double> promoted;
366-
promoted.minVx = aabb.minVx;
367-
promoted.maxVx = aabb.maxVx;
368-
printAABB(promoted,"Geometry");
369-
tmp[3].x += promoted.getExtent().x;
370-
const auto promotedWorld = hlsl::float64_t3x4(worldTforms.emplace_back(hlsl::transpose(tmp)));
371-
const auto transformed = hlsl::shapes::util::transform(promotedWorld,promoted);
372-
printAABB(transformed,"Transformed");
373-
bound = hlsl::shapes::util::union_(transformed,bound);
374-
}
375-
);
363+
const auto promoted = geom.value->getAABB<aabb_t>();
364+
printAABB(promoted,"Geometry");
365+
tmp[3].x += promoted.getExtent().x;
366+
const auto promotedWorld = hlsl::float64_t3x4(worldTforms.emplace_back(hlsl::transpose(tmp)));
367+
const auto transformed = hlsl::shapes::util::transform(promotedWorld,promoted);
368+
printAABB(transformed,"Transformed");
369+
bound = hlsl::shapes::util::union_(transformed,bound);
376370
}
377371
printAABB(bound,"Total");
378372
if (!m_renderer->addGeometries({ &converted.front().get(),converted.size() }))

0 commit comments

Comments
 (0)