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
|
|
|
|
{
|
2014-02-04 14:59:51 +01:00
|
|
|
Math::Matrix Relative;
|
|
|
|
Math::Matrix Absolute;
|
2014-01-22 16:31:33 +01:00
|
|
|
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]
|
2014-01-31 16:29:50 +01:00
|
|
|
double duration;
|
2014-01-22 16:31:33 +01:00
|
|
|
};
|
2013-11-20 10:22:01 +01:00
|
|
|
struct ModelInfo
|
|
|
|
{
|
|
|
|
std::vector<ID3D11ShaderResourceView*> Material;
|
2014-01-27 14:24:13 +01:00
|
|
|
Core::Buffer *Vertices,*Indecies;
|
|
|
|
bool Indexed, Animated;
|
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
|