Removed Keyframe animation type

Former-commit-id: 807c81e9b738dbb443c3101026f7b5bdff32a931
This commit is contained in:
Lynix
2013-03-05 10:54:58 +01:00
parent a97da928a2
commit e26728c424
10 changed files with 68 additions and 1033 deletions

View File

@@ -42,7 +42,6 @@ class NAZARA_API NzAnimation : public NzResource
bool AddSequence(const NzSequence& sequence);
void AnimateSkeleton(NzSkeleton* targetSkeleton, unsigned int frameA, unsigned int frameB, float interpolation) const;
bool CreateKeyframe(unsigned int frameCount);
bool CreateSkeletal(unsigned int frameCount, unsigned int jointCount);
void Destroy();

View File

@@ -9,7 +9,6 @@
enum nzAnimationType
{
nzAnimationType_Keyframe,
nzAnimationType_Skeletal,
nzAnimationType_Static,

View File

@@ -1,62 +0,0 @@
// Copyright (C) 2012 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_KEYFRAMEMESH_HPP
#define NAZARA_KEYFRAMEMESH_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Utility/Mesh.hpp>
#include <Nazara/Utility/SubMesh.hpp>
struct NzKeyframeMeshImpl;
class NAZARA_API NzKeyframeMesh final : public NzSubMesh
{
friend NzMesh;
public:
NzKeyframeMesh(const NzMesh* parent);
virtual ~NzKeyframeMesh();
bool Create(NzVertexBuffer* vertexBuffer, unsigned int frameCount);
void Destroy();
void Finish();
void GenerateAABBs();
const NzCubef& GetAABB() const override;
nzAnimationType GetAnimationType() const override;
unsigned int GetFrameCount() const;
const NzIndexBuffer* GetIndexBuffer() const override;
NzVector3f GetNormal(unsigned int frameIndex, unsigned int vertexIndex) const;
NzVector3f GetPosition(unsigned int frameIndex, unsigned int vertexIndex) const;
NzVector3f GetTangent(unsigned int frameIndex, unsigned int vertexIndex) const;
NzVector2f GetTexCoords(unsigned int vertexIndex) const;
void GetVertex(unsigned int frameIndex, unsigned int vertexIndex, NzMeshVertex* dest) const;
NzVertexBuffer* GetVertexBuffer();
const NzVertexBuffer* GetVertexBuffer() const;
unsigned int GetVertexCount() const override;
void Interpolate(const NzAnimation* animation, unsigned int frameA, unsigned int frameB, float interpolation) const;
bool IsAnimated() const override;
bool IsValid();
void SetAABB(unsigned int frameIndex, const NzCubef& aabb);
void SetIndexBuffer(const NzIndexBuffer* indexBuffer);
void SetNormal(unsigned int frameIndex, unsigned int vertexIndex, const NzVector3f& normal);
void SetPosition(unsigned int frameIndex, unsigned int vertexIndex, const NzVector3f& position);
void SetTangent(unsigned int frameIndex, unsigned int vertexIndex, const NzVector3f& tangent);
void SetTexCoords(unsigned int vertexIndex, const NzVector2f& texCoords);
private:
void InterpolateImpl(unsigned int frameA, unsigned int frameB, float interpolation) const;
NzKeyframeMeshImpl* m_impl = nullptr;
};
#endif // NAZARA_KEYFRAMEMESH_HPP

View File

@@ -51,7 +51,6 @@ class NAZARA_API NzMesh : public NzResource, NzResourceListener
bool AddSubMesh(NzSubMesh* subMesh);
bool AddSubMesh(const NzString& identifier, NzSubMesh* subMesh);
bool CreateKeyframe();
bool CreateSkeletal(unsigned int jointCount);
bool CreateStatic();
void Destroy();