Utility/Mesh: Add MeshSaver properly
Former-commit-id: 08a7fb99853e68e692e1346577c8d616c1f4a6f9 [formerly 626e980416ee0ceea15036bd6355321400a19475] Former-commit-id: d39fd4d74d2d58c14057b0f769ceb7ce120c103a
This commit is contained in:
parent
ce8461ca35
commit
6084ff1707
|
|
@ -71,6 +71,7 @@ namespace Nz
|
||||||
friend MeshLibrary;
|
friend MeshLibrary;
|
||||||
friend MeshLoader;
|
friend MeshLoader;
|
||||||
friend MeshManager;
|
friend MeshManager;
|
||||||
|
friend MeshSaver;
|
||||||
friend class Utility;
|
friend class Utility;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -126,6 +127,9 @@ namespace Nz
|
||||||
void RemoveSubMesh(const String& identifier);
|
void RemoveSubMesh(const String& identifier);
|
||||||
void RemoveSubMesh(unsigned int index);
|
void RemoveSubMesh(unsigned int index);
|
||||||
|
|
||||||
|
bool SaveToFile(const String& filePath, const MeshParams& params = MeshParams());
|
||||||
|
bool SaveToStream(Stream& stream, const String& format, const MeshParams& params = MeshParams());
|
||||||
|
|
||||||
void SetAnimation(const String& animationPath);
|
void SetAnimation(const String& animationPath);
|
||||||
void SetMaterialCount(unsigned int matCount);
|
void SetMaterialCount(unsigned int matCount);
|
||||||
void SetMaterialData(unsigned int matIndex, ParameterList data);
|
void SetMaterialData(unsigned int matIndex, ParameterList data);
|
||||||
|
|
|
||||||
|
|
@ -606,6 +606,16 @@ namespace Nz
|
||||||
InvalidateAABB();
|
InvalidateAABB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Mesh::SaveToFile(const String& filePath, const MeshParams& params)
|
||||||
|
{
|
||||||
|
return MeshSaver::SaveToFile(*this, filePath, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Mesh::SaveToStream(Stream& stream, const String& format, const MeshParams& params)
|
||||||
|
{
|
||||||
|
return MeshSaver::SaveToStream(*this, stream, format, params);
|
||||||
|
}
|
||||||
|
|
||||||
void Mesh::SetAnimation(const String& animationPath)
|
void Mesh::SetAnimation(const String& animationPath)
|
||||||
{
|
{
|
||||||
NazaraAssert(m_impl, "Mesh should be created first");
|
NazaraAssert(m_impl, "Mesh should be created first");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue