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-02-04 16:06:59 +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]
|
|
|
|
double duration;
|
|
|
|
};
|
2013-11-20 10:22:01 +01:00
|
|
|
struct ModelInfo
|
|
|
|
{
|
|
|
|
std::vector<ID3D11ShaderResourceView*> Material;
|
2013-11-26 09:09:35 +01:00
|
|
|
Core::Buffer *Vertices,*Indecies;
|
2014-02-04 16:06:59 +01:00
|
|
|
bool Indexed, Animated;
|
|
|
|
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
|