diff --git a/include/limitless/models/mesh.hpp b/include/limitless/models/mesh.hpp index cff2af26..efeec190 100644 --- a/include/limitless/models/mesh.hpp +++ b/include/limitless/models/mesh.hpp @@ -12,9 +12,13 @@ namespace Limitless { Box bounding_box {}; void calculateBoundingBox() { + //TODO: dispatch? if (auto vnt = dynamic_cast*>(stream.get()); vnt) { bounding_box = Limitless::calculateBoundingBox(vnt->getVertices()); } + if (auto vnt = dynamic_cast*>(stream.get()); vnt) { + bounding_box = Limitless::calculateBoundingBox(vnt->getVertices()); + } } public: // Mesh(std::vector&& vertices, VertexStreamUsage usage, VertexStreamDraw draw, std::string _name) diff --git a/include/limitless/renderer/renderer_settings.hpp b/include/limitless/renderer/renderer_settings.hpp index 2831c97e..106ee532 100644 --- a/include/limitless/renderer/renderer_settings.hpp +++ b/include/limitless/renderer/renderer_settings.hpp @@ -83,12 +83,12 @@ namespace Limitless { /** * Render System Axes */ - bool coordinate_system_axes = true; + bool coordinate_system_axes = false; /** * Render bounding boxes */ - bool bounding_box = true; + bool bounding_box = false; class Builder { private: diff --git a/src/limitless/instances/instance_builder.cpp b/src/limitless/instances/instance_builder.cpp index 597037f6..4db06255 100644 --- a/src/limitless/instances/instance_builder.cpp +++ b/src/limitless/instances/instance_builder.cpp @@ -88,6 +88,7 @@ Instance::Builder& Instance::Builder::bounding_box(const Box& box) { std::shared_ptr Instance::Builder::asModel() { if (dynamic_cast(model_.get())) { auto instance = std::make_shared(model_, position_); + initialize(*instance); initialize(instance); return instance; } diff --git a/src/limitless/scene.cpp b/src/limitless/scene.cpp index 9ca90f6e..76179a85 100644 --- a/src/limitless/scene.cpp +++ b/src/limitless/scene.cpp @@ -140,7 +140,6 @@ Instances Scene::getInstances() const noexcept { }; for (const auto& [_, instance] : instances) { - visitor(instance); if (instance->isHidden()) { continue; }