Utility/Mesh: Add Build static method
This commit is contained in:
@@ -4,16 +4,26 @@
|
||||
|
||||
#include <Nazara/Utility/Mesh.hpp>
|
||||
#include <memory>
|
||||
#include <Nazara/Utility/StaticMesh.hpp>
|
||||
#include <Nazara/Utility/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
Mesh::Mesh() :
|
||||
inline Mesh::Mesh() :
|
||||
m_materialData(1),
|
||||
m_aabbUpdated(false),
|
||||
m_isValid(false)
|
||||
{
|
||||
}
|
||||
|
||||
inline std::shared_ptr<Mesh> Mesh::Build(std::shared_ptr<StaticMesh> staticMesh)
|
||||
{
|
||||
std::shared_ptr<Mesh> mesh = std::make_shared<Mesh>();
|
||||
mesh->CreateStatic();
|
||||
mesh->AddSubMesh(std::move(staticMesh));
|
||||
|
||||
return mesh;
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Utility/DebugOff.hpp>
|
||||
|
||||
Reference in New Issue
Block a user