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 MeshLoader;
|
||||
friend MeshManager;
|
||||
friend MeshSaver;
|
||||
friend class Utility;
|
||||
|
||||
public:
|
||||
|
|
@ -126,6 +127,9 @@ namespace Nz
|
|||
void RemoveSubMesh(const String& identifier);
|
||||
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 SetMaterialCount(unsigned int matCount);
|
||||
void SetMaterialData(unsigned int matIndex, ParameterList data);
|
||||
|
|
|
|||
|
|
@ -606,6 +606,16 @@ namespace Nz
|
|||
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)
|
||||
{
|
||||
NazaraAssert(m_impl, "Mesh should be created first");
|
||||
|
|
|
|||
Loading…
Reference in New Issue