Files
NazaraEngine/include/Nazara/Utility/SubMesh.hpp
Lynix bcb05f13f8 Utility: First code cleaning pass
Former-commit-id: 834097e149f393c278e47ff31c8c4d12b0628d2b [formerly 5eb47a1c307a874555e07106b0d484ecc0958345] [formerly fab49feb40dbc3bfdc959659ff74a6d3a2b59606 [formerly a2be53055f8fb8123035e145ea2edb0043d780e2]]
Former-commit-id: d44f84cccad74434dc02a97a2a9b7a72dca49f5c [formerly d21b193e02096275d145af82ca4468f67ce1f74c]
Former-commit-id: 618d73318ca6c9ad86b091312858b38024b3a5e0
2016-09-04 20:39:34 +02:00

64 lines
1.6 KiB
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_SUBMESH_HPP
#define NAZARA_SUBMESH_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp>
#include <Nazara/Math/Box.hpp>
#include <Nazara/Utility/Enums.hpp>
#include <Nazara/Utility/IndexBuffer.hpp>
#include <Nazara/Utility/VertexBuffer.hpp>
#include <Nazara/Utility/VertexDeclaration.hpp>
namespace Nz
{
class Mesh;
class SubMesh;
using SubMeshConstRef = ObjectRef<const SubMesh>;
using SubMeshRef = ObjectRef<SubMesh>;
class NAZARA_UTILITY_API SubMesh : public RefCounted
{
friend Mesh;
public:
SubMesh(const Mesh* parent);
virtual ~SubMesh();
void GenerateNormals();
void GenerateNormalsAndTangents();
void GenerateTangents();
virtual const Boxf& GetAABB() const = 0;
virtual AnimationType GetAnimationType() const = 0;
virtual const IndexBuffer* GetIndexBuffer() const = 0;
UInt32 GetMaterialIndex() const;
const Mesh* GetParent() const;
PrimitiveMode GetPrimitiveMode() const;
UInt32 GetTriangleCount() const;
virtual UInt32 GetVertexCount() const = 0;
virtual bool IsAnimated() const = 0;
void SetMaterialIndex(UInt32 matIndex);
void SetPrimitiveMode(PrimitiveMode mode);
// Signals:
NazaraSignal(OnSubMeshRelease, const SubMesh* /*subMesh*/);
protected:
PrimitiveMode m_primitiveMode;
const Mesh* m_parent;
UInt32 m_matIndex;
};
}
#endif // NAZARA_SUBMESH_HPP