Files
eepp/src/graphics/ctexturepackernode.hpp
spartanj 28868341ec Added cTexturePacker. Utility class to create texture atlas and save the subtextures as shapes.
Added cTextureGroupLoader. Utility class to load the texture atlas saved shapes ( sync and async ).
Added cTexturePackerNode and cTexturePackerTex, both are helpers to create the texture atlas, and not visibles to the end user.
Added some helpers functions for file path management.
Added some new functions for cImage. scaling, resize, thumnails, copy image into image, and some others, and moved some cTexture functions to cImage.
Added stbi_info support for BMP,PSD,HDR,PIC in stb_image.
Added Progress() function to cResourceLoader, to know the current loading progress in percent ( 0%-100% ).
Added api calls to some classes. But i'm still looking how to work with DLL.
Modified some details in cTimer and cTimeElapsed.
The code was only tested on linux, so, still need some checking, but, it's a lot of code, so i'll commit it and fix bugs if it's necessary.
2010-08-20 01:47:07 -03:00

50 lines
1.2 KiB
C++

#ifndef EE_GRAPHICSPRIVATECTEXTUREPACKERNODE
#define EE_GRAPHICSPRIVATECTEXTUREPACKERNODE
#include "base.hpp"
namespace EE { namespace Graphics { namespace Private {
class cTexturePackerNode {
public:
cTexturePackerNode( Int32 x, Int32 y, Int32 width, Int32 height );
bool Fits( Int32 wid, Int32 hit, Int32 &edgeCount, const bool& AllowFlipping = false ) const;
void GetRect( eeRecti &r ) const;
void Validate( cTexturePackerNode * n );
bool Merge( const cTexturePackerNode &n );
cTexturePackerNode * GetNext() const;
inline void SetNext( cTexturePackerNode * Next ) { mNext = Next; }
inline const Int32& X() const { return mX; }
inline const Int32& Y() const { return mY; }
inline void X( const Int32& x ) { mX = x; }
inline void Y( const Int32& y ) { mY = y; }
inline const Int32& Width() const { return mWidth; }
inline const Int32& Height() const { return mHeight; }
inline void Width( const Int32& W ) { mWidth = W; }
inline void Height( const Int32& H ) { mHeight = H; }
protected:
cTexturePackerNode * mNext;
Int32 mX;
Int32 mY;
Int32 mWidth;
Int32 mHeight;
};
}}}
#endif