Files
kraken/KREngine/KREngine/Classes/KRResource+blend.h
kearwood dfdc8c69b8 Native Blender file format support in progress
Changed material colour parameters from separate float values to KRVector3's

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4056
2012-05-09 01:56:04 +00:00

51 lines
1.1 KiB
C++

//
// KRResource+blend.h
// KREngine
//
// Created by Kearwood Gilbert on 12-05-08.
// Copyright (c) 2012 Kearwood Software. All rights reserved.
//
#ifndef KREngine_KRResource_blend_h
#define KREngine_KRResource_blend_h
class KRBlendFile {
public:
KRBlendFile(const void *pFile);
~KRBlendFile();
class Block {
public:
Block(KRBlendFile *blendFile, unsigned char *&scan);
~Block();
std::string getCode();
int getDataSize();
private:
std::string m_code;
__int32_t m_dataSize;
__int32_t m_sdna_index;
__int32_t m_structure_count;
__int64_t m_prev_pointer;
unsigned char *m_data;
};
private:
enum file_type {
KRBLEND_LITTLEENDIAN_32BIT,
KRBLEND_LITTLEENDIAN_64BIT,
KRBLEND_BIGENDIAN_32BIT,
KRBLEND_BIGENDIAN_64BIT
} m_file_type;
void readHeader(unsigned char *&scan);
__int32_t readInt(unsigned char *&scan);
__int64_t readPointer(unsigned char *&scan);
std::vector<Block> m_blocks;
};
#endif