2013-11-06 22:52:00 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef MODELINFO_h
|
|
|
|
#define MODELINFO_h
|
|
|
|
|
|
|
|
|
2013-11-26 09:09:35 +01:00
|
|
|
#include "..\Core\Core.h"
|
2013-11-06 22:52:00 +01:00
|
|
|
|
|
|
|
namespace Oyster
|
|
|
|
{
|
2013-11-20 10:22:01 +01:00
|
|
|
namespace Graphics
|
2013-11-06 22:52:00 +01:00
|
|
|
{
|
2013-11-26 09:09:35 +01:00
|
|
|
namespace Model
|
2013-11-06 22:52:00 +01:00
|
|
|
{
|
2014-01-22 16:31:33 +01:00
|
|
|
struct Bone
|
|
|
|
{
|
|
|
|
Math::Float4x4 Transform;
|
|
|
|
int Parent;
|
|
|
|
};
|
|
|
|
struct Frame
|
|
|
|
{
|
|
|
|
Bone bone;
|
|
|
|
double time;
|
|
|
|
};
|
|
|
|
struct Animation
|
|
|
|
{
|
|
|
|
std::wstring name;
|
|
|
|
int Bones;
|
|
|
|
int* Frames; //! Bone as index
|
|
|
|
Frame** Keyframes; //! @brief [Bone][Frame]
|
|
|
|
};
|
2013-11-20 10:22:01 +01:00
|
|
|
struct ModelInfo
|
|
|
|
{
|
|
|
|
std::vector<ID3D11ShaderResourceView*> Material;
|
2014-01-22 16:31:33 +01:00
|
|
|
Core::Buffer *Vertices,*Indecies,*Skeleton;
|
2013-11-20 10:22:01 +01:00
|
|
|
bool Indexed;
|
2014-01-22 16:31:33 +01:00
|
|
|
int VertexCount, IndexCount, BoneCount, AnimationCount;
|
|
|
|
Bone* bones;
|
|
|
|
Animation* Animations;
|
2013-11-20 10:22:01 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2013-11-06 22:52:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|