Dawn/src/dawn/scene/components/display/mesh/CapsuleMeshHost.cpp

21 lines
457 B
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "CapsuleMeshHost.hpp"
using namespace Dawn;
CapsuleMeshHost::CapsuleMeshHost(std::weak_ptr<SceneItem> item) :
MeshHost(item),
radius(0.5f),
height(1.0f)
{
}
void CapsuleMeshHost::onStart() {
useEffect([&]{
CapsuleMesh::create(&this->mesh, radius, height);
}, { &this->radius, &this->height })();
}