Utility/OBJParser: Prepare for saving
Former-commit-id: 90a78b4ca33ff8ce36fd5d37191799b196803c09 [formerly b39fe56eafb502516007de75ca77fdc6ab8a3391] Former-commit-id: 5481142d659e43f687a5b8b4e1634405702bfc7b
This commit is contained in:
@@ -8,6 +8,20 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
inline void OBJParser::Clear()
|
||||
{
|
||||
m_materials.clear();
|
||||
m_meshes.clear();
|
||||
m_positions.clear();
|
||||
m_normals.clear();
|
||||
m_texCoords.clear();
|
||||
}
|
||||
|
||||
inline String* OBJParser::GetMaterials()
|
||||
{
|
||||
return m_materials.data();
|
||||
}
|
||||
|
||||
inline const String* OBJParser::GetMaterials() const
|
||||
{
|
||||
return m_materials.data();
|
||||
@@ -18,6 +32,11 @@ namespace Nz
|
||||
return m_materials.size();
|
||||
}
|
||||
|
||||
inline OBJParser::Mesh* OBJParser::GetMeshes()
|
||||
{
|
||||
return m_meshes.data();
|
||||
}
|
||||
|
||||
inline const OBJParser::Mesh* OBJParser::GetMeshes() const
|
||||
{
|
||||
return m_meshes.data();
|
||||
@@ -33,6 +52,11 @@ namespace Nz
|
||||
return m_mtlLib;
|
||||
}
|
||||
|
||||
inline Vector3f* OBJParser::GetNormals()
|
||||
{
|
||||
return m_normals.data();
|
||||
}
|
||||
|
||||
inline const Vector3f* OBJParser::GetNormals() const
|
||||
{
|
||||
return m_normals.data();
|
||||
@@ -43,6 +67,11 @@ namespace Nz
|
||||
return m_normals.size();
|
||||
}
|
||||
|
||||
inline Vector4f* OBJParser::GetPositions()
|
||||
{
|
||||
return m_positions.data();
|
||||
}
|
||||
|
||||
inline const Vector4f* OBJParser::GetPositions() const
|
||||
{
|
||||
return m_positions.data();
|
||||
@@ -53,6 +82,11 @@ namespace Nz
|
||||
return m_positions.size();
|
||||
}
|
||||
|
||||
inline Vector3f* OBJParser::GetTexCoords()
|
||||
{
|
||||
return m_texCoords.data();
|
||||
}
|
||||
|
||||
inline const Vector3f* OBJParser::GetTexCoords() const
|
||||
{
|
||||
return m_texCoords.data();
|
||||
@@ -63,6 +97,36 @@ namespace Nz
|
||||
return m_texCoords.size();
|
||||
}
|
||||
|
||||
inline String* OBJParser::SetMaterialCount(std::size_t materialCount)
|
||||
{
|
||||
m_materials.resize(materialCount);
|
||||
return m_materials.data();
|
||||
}
|
||||
|
||||
inline OBJParser::Mesh* OBJParser::SetMeshCount(std::size_t meshCount)
|
||||
{
|
||||
m_meshes.resize(meshCount);
|
||||
return m_meshes.data();
|
||||
}
|
||||
|
||||
inline Vector3f* OBJParser::SetNormalCount(std::size_t normalCount)
|
||||
{
|
||||
m_normals.resize(normalCount);
|
||||
return m_normals.data();
|
||||
}
|
||||
|
||||
inline Vector4f* OBJParser::SetPositionCount(std::size_t positionCount)
|
||||
{
|
||||
m_positions.resize(positionCount);
|
||||
return m_positions.data();
|
||||
}
|
||||
|
||||
inline Vector3f* OBJParser::SetTexCoordCount(std::size_t texCoordCount)
|
||||
{
|
||||
m_texCoords.resize(texCoordCount);
|
||||
return m_texCoords.data();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void OBJParser::Emit(const T& text) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user