blob: e66947980a69f776cb0631b8fe6e7e6d36dada7c [file] [log] [blame]
#ifndef _NIMA_BLOCKREADER_HPP_
#define _NIMA_BLOCKREADER_HPP_
#include <string>
#include "BinaryReader.hpp"
namespace nima
{
class Mat2D;
class Vec2D;
class BlockReader : public BinaryReader
{
public:
enum BlockTypes
{
Unknown = 0,
Nodes = 1,
ActorNode = 2,
ActorBone = 3,
ActorRootBone = 4,
ActorImage = 5,
View = 6,
Animation = 7,
Animations = 8,
Atlases = 9,
Atlas = 10,
ActorIKTarget = 11
};
private:
BlockTypes m_BlockType;
public:
BlockReader(unsigned char* data, unsigned int length);
BlockReader(BlockTypes type, unsigned char* data, unsigned int length);
BlockReader* readNextBlock();
BlockTypes blockType() { return m_BlockType; }
void read(Mat2D& mat);
void read(Vec2D& vec);
};
}
#endif