AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
#include <CzBitmapSprite9.h>
Public Member Functions | |
CzBitmapSprite9 () | |
virtual | ~CzBitmapSprite9 () |
void | Init (int vertex_count=16) |
Initialises the sprite. | |
virtual bool | isClipped () |
Query if this sprite is clipped. | |
bool | HitTest (float x, float y) |
Tests if an x.y point is within the sprites boundaries. | |
bool | HitTestNoClip (float x, float y) |
Tests if an x.y point is within the sprites boundaries. | |
bool | isOutsideFocusRange (float x, float y, float scale=1.0f) |
Tests to see if the supplied point is outside a specific distance. | |
void | Draw () |
bool | SimpleTestOverlap (CzSprite *other) |
A simple method to test for overlapping sprites. | |
bool | TestOverlap (CzSprite *other, int i1, int i2, int i3) |
Tests if the supplied triangular area of the sprite overlaps this sprite. | |
bool | TestOverlap (CzSprite *other) |
Tests for the overlapping of two sprites. | |
Static Public Attributes | |
static uint16 | Sprite9Indices [36] |
static uint16 | Sprite9ClipIndices [4] |
Protected Member Functions | |
void | RebuildUVList () |
void | TransformVertices () |
Builds a list of transformed vertices. |
CzBitmapSprite9::CzBitmapSprite9 | ( | ) | [inline] |
virtual CzBitmapSprite9::~CzBitmapSprite9 | ( | ) | [inline, virtual] |
void CzBitmapSprite9::Draw | ( | ) | [virtual] |
Reimplemented from CzBitmapSprite.
bool CzBitmapSprite9::HitTest | ( | float | x, |
float | y | ||
) | [virtual] |
Tests if an x.y point is within the sprites boundaries.
Note that this method will automatically fail if the x,y point is outside the sprite managers clipping window rect.
x | The x coordinate. |
y | The y coordinate. |
Reimplemented from CzSprite.
bool CzBitmapSprite9::HitTestNoClip | ( | float | x, |
float | y | ||
) | [virtual] |
Tests if an x.y point is within the sprites boundaries.
This method does not take into accuont any cliping rects that are assigned to the sprites manager.
x | The x coordinate. |
y | The y coordinate. |
Reimplemented from CzSprite.
void CzBitmapSprite9::Init | ( | int | vertex_count = 16 | ) | [virtual] |
Initialises the sprite.
vertex_count | Number of vertices that the sprite is made up from. |
Reimplemented from CzBitmapSprite.
bool CzBitmapSprite9::isClipped | ( | ) | [virtual] |
Query if this sprite is clipped.
Reimplemented from CzSprite.
bool CzBitmapSprite9::isOutsideFocusRange | ( | float | x, |
float | y, | ||
float | scale = 1.0f |
||
) | [virtual] |
Tests to see if the supplied point is outside a specific distance.
The focus range is the distance that a point has to move to to be declared as no longer having touch focus. The default focus range is calculated as the longest distance between each end of the sprite. The supplied scale value can be used to increase the focus range. For example a scale value of 2.0 will increase the focus range to double the size of the sprites visible dimensions.
x | The x coordinate. |
y | The y coordinate. |
scale | The amount to scale the focus range. |
Reimplemented from CzSprite.
void CzBitmapSprite9::RebuildUVList | ( | ) | [protected] |
Reimplemented from CzBitmapSprite.
bool CzBitmapSprite9::SimpleTestOverlap | ( | CzSprite * | other | ) | [virtual] |
A simple method to test for overlapping sprites.
Note that this nethod does not take into account rotation.
[in] | other | If non-null, the other sprite. |
Reimplemented from CzSprite.
bool CzBitmapSprite9::TestOverlap | ( | CzSprite * | other, |
int | i1, | ||
int | i2, | ||
int | i3 | ||
) | [virtual] |
Tests if the supplied triangular area of the sprite overlaps this sprite.
Using 3 vertices at the supplied indices i1, i2, i3 of the supplied sprites transformed vertices to see if the overlap this sprites vertices.
Note that this method can also test against 16 vertex patch sprites
[in] | other | If non-null, the other. |
i1 | First vertex index. | |
i2 | Second vertex index. | |
i3 | Third vertex index. |
Reimplemented from CzSprite.
bool CzBitmapSprite9::TestOverlap | ( | CzSprite * | other | ) | [virtual] |
Tests for the overlapping of two sprites.
This method takes into account rotation of both sprites. However, it will revert to a simple method of overlap testing if both sprites are not rotated.
[in,out] | other | If non-null, the other sprite. |
Reimplemented from CzSprite.
void CzBitmapSprite9::TransformVertices | ( | ) | [protected, virtual] |
Builds a list of transformed vertices.
Transform sprites vertices by current sprite transform.
Reimplemented from CzSprite.
uint16 CzBitmapSprite9::Sprite9ClipIndices [static] |
{ 0, 3, 15, 12 }
uint16 CzBitmapSprite9::Sprite9Indices [static] |
{ 0, 4, 5, 1, 1, 5, 6, 2, 2, 6, 7, 3, 4, 8, 9, 5, 5, 9, 10, 6, 6, 10, 11, 7, 8, 12, 13, 9, 9, 13, 14, 10, 10, 14, 15, 11, }