Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Rendering
AtlasTexturePageLayout.h
1
// Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2
3
#pragma once
4
5
#include "Types.h"
6
#include "ITexturePageLayout.h"
7
#include "Bounds.h"
8
#include <string>
9
#include <map>
10
11
namespace
Eegeo
12
{
13
namespace
Rendering
14
{
15
class
AtlasTexturePageLayout
:
protected
NonCopyable
,
public
ITexturePageLayout
16
{
17
public
:
18
19
AtlasTexturePageLayout
(
int
imageWidth,
int
imageHeight,
bool
vFlip);
20
21
Geometry::Bounds2D
GetTileUVBounds(
int
index)
const
;
22
23
void
AddSprite(
int
index,
const
Geometry::Bounds2D
& pixelCoords);
24
void
RemoveSprite(
int
index);
25
26
bool
HasSprite(
int
index)
const
;
27
28
const
int
GetPageWidth()
const
{
return
m_imageWidth; }
29
const
int
GetPageHeight()
const
{
return
m_imageHeight; }
30
private
:
31
32
const
int
m_imageWidth;
33
const
int
m_imageHeight;
34
const
bool
m_vFlip;
35
36
std::map<int, Geometry::Bounds2D> m_spriteIdToUVBoundsMap;
37
38
bool
ValidateBounds(
const
Geometry::Bounds2D
& pixelCoords);
39
40
};
41
}
42
}
Generated on Sat Jun 10 2023 02:00:31 for eeGeo Platform SDK by
1.8.3.1