AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzBitmapSprite9 Class Reference

#include <CzBitmapSprite9.h>

Inheritance diagram for CzBitmapSprite9:
CzBitmapSprite CzSprite

List of all members.

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.

Constructor & Destructor Documentation

virtual CzBitmapSprite9::~CzBitmapSprite9 ( ) [inline, virtual]

Member Function Documentation

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.

Parameters:
xThe x coordinate.
yThe y coordinate.
Returns:
true if the test passes, false if the test fails.

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.

Parameters:
xThe x coordinate.
yThe y coordinate.
Returns:
true if the test passes, false if the test fails.

Reimplemented from CzSprite.

void CzBitmapSprite9::Init ( int  vertex_count = 16) [virtual]

Initialises the sprite.

Parameters:
vertex_countNumber of vertices that the sprite is made up from.

Reimplemented from CzBitmapSprite.

bool CzBitmapSprite9::isClipped ( ) [virtual]

Query if this sprite is clipped.

Returns:
true if clipped, false if not.

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.

Parameters:
xThe x coordinate.
yThe y coordinate.
scaleThe amount to scale the focus range.
Returns:
true if outside focus range, false if not.

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.

Parameters:
[in]otherIf non-null, the other sprite.
Returns:
true if overlap, false if no overlap.

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

Parameters:
[in]otherIf non-null, the other.
i1First vertex index.
i2Second vertex index.
i3Third vertex index.
Returns:
true if overlap, false if no overlap.

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.

Parameters:
[in,out]otherIf non-null, the other sprite.
Returns:
true if overlap, false if no overlap.

Reimplemented from CzSprite.

void CzBitmapSprite9::TransformVertices ( ) [protected, virtual]

Builds a list of transformed vertices.

Transform sprites vertices by current sprite transform.

Reimplemented from CzSprite.


Member Data Documentation

Initial value:
 
{
     0, 3, 15, 12 
}
Initial value:
 
{
    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, 
}

The documentation for this class was generated from the following files: