Utility: Use UInt64 to store index/vertex instead of size_t

This commit is contained in:
SirLynix
2022-04-23 23:12:40 +02:00
parent 8cd1f2d590
commit 3d15f3578b
10 changed files with 23 additions and 23 deletions

View File

@@ -121,8 +121,8 @@ namespace Nz
const std::shared_ptr<SubMesh>& GetSubMesh(std::size_t index) const;
std::size_t GetSubMeshCount() const;
std::size_t GetSubMeshIndex(const std::string& identifier) const;
std::size_t GetTriangleCount() const;
std::size_t GetVertexCount() const;
UInt64 GetTriangleCount() const;
UInt64 GetVertexCount() const;
bool HasSubMesh(const std::string& identifier) const;
bool HasSubMesh(std::size_t index = 0) const;

View File

@@ -24,7 +24,7 @@ namespace Nz
AnimationType GetAnimationType() const final;
const std::shared_ptr<IndexBuffer>& GetIndexBuffer() const override;
const std::shared_ptr<VertexBuffer>& GetVertexBuffer() const;
std::size_t GetVertexCount() const override;
UInt64 GetVertexCount() const override;
bool IsAnimated() const final;
bool IsValid() const;

View File

@@ -26,7 +26,7 @@ namespace Nz
AnimationType GetAnimationType() const final;
const std::shared_ptr<IndexBuffer>& GetIndexBuffer() const override;
const std::shared_ptr<VertexBuffer>& GetVertexBuffer() const;
std::size_t GetVertexCount() const override;
UInt64 GetVertexCount() const override;
bool IsAnimated() const final;
bool IsValid() const;

View File

@@ -37,8 +37,8 @@ namespace Nz
virtual const std::shared_ptr<IndexBuffer>& GetIndexBuffer() const = 0;
std::size_t GetMaterialIndex() const;
PrimitiveMode GetPrimitiveMode() const;
std::size_t GetTriangleCount() const;
virtual std::size_t GetVertexCount() const = 0;
UInt64 GetTriangleCount() const;
virtual UInt64 GetVertexCount() const = 0;
virtual bool IsAnimated() const = 0;

View File

@@ -26,7 +26,7 @@ namespace Nz
template<typename T> SparsePtr<T> GetComponentPtr(VertexComponent component, std::size_t componentIndex = 0);
inline const VertexBuffer* GetVertexBuffer() const;
inline std::size_t GetVertexCount() const;
inline UInt64 GetVertexCount() const;
template<typename T> bool HasComponentOfType(VertexComponent component) const;

View File

@@ -26,7 +26,7 @@ namespace Nz
return m_mapper.GetBuffer();
}
inline std::size_t VertexMapper::GetVertexCount() const
inline UInt64 VertexMapper::GetVertexCount() const
{
return GetVertexBuffer()->GetVertexCount();
}