Axmol Engine 2.4.0-258ceca
|
Classes | |
class | AnchoredSprite |
Anchored Sprite. More... | |
class | AnimationFrame |
A frame of the animation. More... | |
class | Animation |
A Animation object is used to perform animations on the Sprite objects. More... | |
class | AnimationCache |
Singleton that manages the Animations. More... | |
class | AtlasNode |
AtlasNode is a subclass of Node that implements the RGBAProtocol and TextureProtocol protocol. More... | |
class | PolygonInfo |
PolygonInfo is an object holding the required data to display Sprites. More... | |
class | AutoPolygon |
AutoPolygon is a helper Object AutoPolygon's purpose is to process an image into 2d polygon mesh in runtime It has functions for each step in the process, from tracing all the points, to triangulation the result can be then passed to Sprite::create() to create a Polygon Sprite. More... | |
class | ClippingNode |
ClippingNode is a subclass of Node. More... | |
class | ClippingRectangleNode |
Clipping Rectangle Node. More... | |
class | DrawNode |
Node that draws dots, segments and polygons. More... | |
class | FastTMXLayer |
FastTMXLayer represents the TMX layer. More... | |
class | TMXTileAnimTask |
TMXTileAnimTask represents the frame-tick task of an animated tile. More... | |
class | TMXTileAnimManager |
TMXTileAnimManager controls all tile animation of a layer. More... | |
class | FastTMXTiledMap |
FastTMXTiledMap knows how to parse and render a TMX map. More... | |
class | FontFreeType |
FontFreeType is a class of rendering ttf/ttc characters. More... | |
class | GridBase |
Base class for Other grid. More... | |
class | Grid3D |
Grid3D is a 3D grid implementation. More... | |
class | TiledGrid3D |
TiledGrid3D is a 3D grid implementation. More... | |
struct | TTFConfig |
class | Label |
Label is a subclass of Node that knows how to render text labels. More... | |
class | LabelAtlas |
LabelAtlas is a subclass of AtlasNode. More... | |
class | LayerColor |
LayerColor is a subclass of Layer that implements the RGBAProtocol protocol. More... | |
class | LayerGradient |
LayerGradient is a subclass of LayerColor that draws gradients across the background. More... | |
class | LayerRadialGradient |
LayerRadialGradient is a subclass of Layer that draws radial gradients across the background. More... | |
class | LayerMultiplex |
MultipleLayer is a Layer with the ability to multiplex it's children. More... | |
class | Menu |
A Menu for touch handling. More... | |
class | MenuItem |
MenuItem base class. More... | |
class | MenuItemLabel |
An abstract class for "label" MenuItemLabel items. More... | |
class | MenuItemAtlasFont |
A MenuItemAtlasFont. More... | |
class | MenuItemFont |
A MenuItemFont. More... | |
class | MenuItemSprite |
MenuItemSprite accepts Node<RGBAProtocol> objects as items. More... | |
class | MenuItemImage |
MenuItemImage accepts images as items. More... | |
class | MenuItemToggle |
A MenuItemToggle. More... | |
class | MotionStreak |
Creates a trailing path. More... | |
class | Node |
Node is the base element of the Scene Graph. More... | |
class | NodeGrid |
Base class for Grid Node. More... | |
class | ParallaxNode |
ParallaxNode: A node that simulates a parallax scroller. More... | |
class | ParticleBatchNode |
ParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw"). More... | |
class | ParticleFire |
A fire particle system. More... | |
class | ParticleFireworks |
A fireworks particle system. More... | |
class | ParticleSun |
A sun particle system. More... | |
class | ParticleGalaxy |
A galaxy particle system. More... | |
class | ParticleFlower |
A flower particle system. More... | |
class | ParticleMeteor |
A meteor particle system. More... | |
class | ParticleSpiral |
An spiral particle system. More... | |
class | ParticleExplosion |
An explosion particle system. More... | |
class | ParticleSmoke |
An smoke particle system. More... | |
class | ParticleSnow |
An snow particle system. More... | |
class | ParticleRain |
A rain particle system. More... | |
class | ParticleSystemQuad |
ParticleSystemQuad is a subclass of ParticleSystem. More... | |
class | ProgressTimer |
ProgressTimer is a subclass of Node. More... | |
class | ProtectedNode |
A inner node type mainly used for UI module. More... | |
class | RenderTexture |
RenderTexture is a generic rendering target. More... | |
class | Scene |
Scene is a subclass of Node that is used only as an abstract concept. More... | |
class | Sprite |
Sprite is a 2d image ( http://en.wikipedia.org/wiki/Sprite_(computer_graphics) ). More... | |
class | SpriteBatchNode |
SpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw"). More... | |
class | SpriteFrame |
A SpriteFrame has: More... | |
class | SpriteFrameCache |
Singleton that handles the loading of the sprite frames. More... | |
class | TMXObjectGroup |
TMXObjectGroup represents the TMX object group. More... | |
class | TransitionEaseScene |
TransitionEaseScene can ease the actions of the scene protocol. More... | |
class | TransitionScene |
Base class for Transition scenes. More... | |
class | TransitionSceneOriented |
A Transition that supports orientation like. More... | |
class | TransitionRotoZoom |
TransitionRotoZoom: Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming. More... | |
class | TransitionJumpZoom |
TransitionJumpZoom: Zoom out and jump the outgoing scene, and then jump and zoom in the incoming. More... | |
class | TransitionMoveInL |
TransitionMoveInL: Move in from to the left the incoming scene. More... | |
class | TransitionMoveInR |
TransitionMoveInR: Move in from to the right the incoming scene. More... | |
class | TransitionMoveInT |
TransitionMoveInT: Move in from to the top the incoming scene. More... | |
class | TransitionMoveInB |
TransitionMoveInB: Move in from to the bottom the incoming scene. More... | |
class | TransitionSlideInL |
TransitionSlideInL: Slide in the incoming scene from the left border. More... | |
class | TransitionSlideInR |
TransitionSlideInR: Slide in the incoming scene from the right border. More... | |
class | TransitionSlideInB |
TransitionSlideInB: Slide in the incoming scene from the bottom border. More... | |
class | TransitionSlideInT |
TransitionSlideInT: Slide in the incoming scene from the top border. More... | |
class | TransitionShrinkGrow |
Shrink the outgoing scene while grow the incoming scene. More... | |
class | TransitionFlipX |
TransitionFlipX: Flips the screen horizontally. More... | |
class | TransitionFlipY |
TransitionFlipY: Flips the screen vertically. More... | |
class | TransitionFlipAngular |
TransitionFlipAngular: Flips the screen half horizontally and half vertically. More... | |
class | TransitionZoomFlipX |
TransitionZoomFlipX: Flips the screen horizontally doing a zoom out/in The front face is the outgoing scene and the back face is the incoming scene. More... | |
class | TransitionZoomFlipY |
TransitionZoomFlipY: Flips the screen vertically doing a little zooming out/in The front face is the outgoing scene and the back face is the incoming scene. More... | |
class | TransitionZoomFlipAngular |
TransitionZoomFlipAngular: Flips the screen half horizontally and half vertically doing a little zooming out/in. More... | |
class | TransitionFade |
TransitionFade: Fade out the outgoing scene and then fade in the incoming scene. More... | |
class | TransitionCrossFade |
TransitionCrossFade: Cross fades two scenes using the RenderTexture object. More... | |
class | TransitionTurnOffTiles |
TransitionTurnOffTiles: Turn off the tiles of the outgoing scene in random order. More... | |
class | TransitionSplitCols |
TransitionSplitCols: The odd columns goes upwards while the even columns goes downwards. More... | |
class | TransitionSplitRows |
TransitionSplitRows: The odd rows goes to the left while the even rows goes to the right. More... | |
class | TransitionFadeTR |
TransitionFadeTR: Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner. More... | |
class | TransitionFadeBL |
TransitionFadeBL: Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner. More... | |
class | TransitionFadeUp |
TransitionFadeUp: Fade the tiles of the outgoing scene from the bottom to the top. More... | |
class | TransitionFadeDown |
TransitionFadeDown: Fade the tiles of the outgoing scene from the top to the bottom. More... | |
class | TransitionPageTurn |
A transition which peels back the bottom right hand corner of a scene to transition to the scene beneath it simulating a page turn. More... | |
class | TransitionProgress |
A base class of progress transition. More... | |
class | TransitionProgressRadialCCW |
TransitionRadialCCW transition. More... | |
class | TransitionProgressRadialCW |
TransitionRadialCW transition. More... | |
class | TransitionProgressHorizontal |
TransitionProgressHorizontal transition. More... | |
class | TransitionProgressVertical |
TransitionProgressVertical transition. More... | |
class | TransitionProgressInOut |
TransitionProgressInOut transition. More... | |
class | TransitionProgressOutIn |
TransitionProgressOutIn transition. More... | |
class | Texture2D |
Texture2D class. More... | |
class | TextureAtlas |
A class that implements a Texture Atlas. More... | |
class | TextureCache |
Singleton that handles the loading of textures. More... | |
Macros | |
#define | AX_FAST_TILEMAP_32_BIT_INDICES 1 |
! | |
Functions | |
PolygonInfo & | operator= (const PolygonInfo &other) |
Copy the member of the other PolygonInfo. | |
void | setQuad (V3F_C4B_T2F_Quad *quad) |
set the data to be a pointer to a quad the member verts will not be released when this PolygonInfo destructs as the verts memory are managed by other objects | |
void | setQuads (V3F_C4B_T2F_Quad *quads, int numberOfQuads) |
set the data to be a pointer to a number of Quads the member verts will not be released when this PolygonInfo destructs as the verts memory are managed by other objects | |
void | setTriangles (const TrianglesCommand::Triangles &triangles) |
set the data to be a pointer to a triangles the member verts will not be released when this PolygonInfo destructs as the verts memory are managed by other objects | |
unsigned int | getVertCount () const |
get vertex count | |
unsigned int | getTrianglesCount () const |
get triangles count | |
float | getArea () const |
get sum of all triangle area size | |
AutoPolygon (std::string_view filename) | |
create an AutoPolygon and initialize it with an image file the image must be a 32bit PNG for current version 3.7 | |
~AutoPolygon () | |
Destructor of AutoPolygon. | |
std::vector< Vec2 > | trace (const ax::Rect &rect, float threshold=0.0f) |
trace all the points along the outline of the image, | |
std::vector< Vec2 > | reduce (const std::vector< Vec2 > &points, const Rect &rect, float epsilon=2.0f) |
reduce the amount of points so its faster for GPU to process and draw based on Ramer-Douglas-Peucker algorithm | |
std::vector< Vec2 > | expand (const std::vector< Vec2 > &points, const Rect &rect, float epsilon) |
expand the points along their edge, useful after you reduce the points that cuts into the sprite using ClipperLib | |
TrianglesCommand::Triangles | triangulate (const std::vector< Vec2 > &points) |
Triangulate the input points into triangles for rendering using poly2tri. | |
void | calculateUV (const Rect &rect, V3F_C4B_T2F *verts, ssize_t count) |
calculate the UV coordinates for each points based on a texture rect | |
PolygonInfo | generateTriangles (const Rect &rect=Rect::ZERO, float epsilon=2.0f, float threshold=0.05f) |
a helper function, packing trace, reduce, expand, triangulate and calculate uv in one function | |
static PolygonInfo | generatePolygon (std::string_view filename, const Rect &rect=Rect::ZERO, float epsilon=2.0f, float threshold=0.05f) |
a helper function, packing autoPolygon creation, trace, reduce, expand, triangulate and calculate uv in one function | |
bool | isScreenPointInRect (const Vec2 &pt, const Camera *camera, const Mat4 &w2l, const Rect &rect, Vec3 *p) |
This is a helper function, checks a GL screen point is in content rectangle space. | |
Creators | |
PolygonInfo () | |
Creates an empty Polygon info. | |
PolygonInfo (const PolygonInfo &other) | |
Create an polygoninfo from the data of another Polygoninfo. | |
#define AX_FAST_TILEMAP_32_BIT_INDICES 1 |
!
!! uncomment if you want reduce bandwidth of GPU, then the tiled layer size will be limited to 128x128
PolygonInfo | ( | ) |
Creates an empty Polygon info.
PolygonInfo | ( | const PolygonInfo & | other | ) |
Create an polygoninfo from the data of another Polygoninfo.
other | another PolygonInfo to be copied |
PolygonInfo & operator= | ( | const PolygonInfo & | other | ) |
Copy the member of the other PolygonInfo.
other | another PolygonInfo to be copied |
void setQuad | ( | V3F_C4B_T2F_Quad * | quad | ) |
set the data to be a pointer to a quad the member verts will not be released when this PolygonInfo destructs as the verts memory are managed by other objects
quad | a pointer to the V3F_C4B_T2F_Quad object |
void setQuads | ( | V3F_C4B_T2F_Quad * | quads, |
int | numberOfQuads ) |
set the data to be a pointer to a number of Quads the member verts will not be released when this PolygonInfo destructs as the verts memory are managed by other objects
quad | a pointer to the V3F_C4B_T2F_Quad quads |
void setTriangles | ( | const TrianglesCommand::Triangles & | triangles | ) |
set the data to be a pointer to a triangles the member verts will not be released when this PolygonInfo destructs as the verts memory are managed by other objects
triangles | a pointer to the TrianglesCommand::Triangles object |
unsigned int getVertCount | ( | ) | const |
get vertex count
unsigned int getTrianglesCount | ( | ) | const |
get triangles count
float getArea | ( | ) | const |
get sum of all triangle area size
AutoPolygon | ( | std::string_view | filename | ) |
create an AutoPolygon and initialize it with an image file the image must be a 32bit PNG for current version 3.7
filename | a path to image file, e.g., "scene1/monster.png". |
trace all the points along the outline of the image,
rect | a texture rect for specify an area of the image |
threshold | the value when alpha is greater than this value will be counted as opaque, default to 0.0 |
std::vector< Vec2 > reduce | ( | const std::vector< Vec2 > & | points, |
const Rect & | rect, | ||
float | epsilon = 2.0f ) |
reduce the amount of points so its faster for GPU to process and draw based on Ramer-Douglas-Peucker algorithm
points | a vector of Vec2 points as input |
rect | a texture rect for specify an area of the image to avoid over reduction |
epsilon | the perpendicular distance where points smaller than this value will be discarded |
expand the points along their edge, useful after you reduce the points that cuts into the sprite using ClipperLib
points | a vector of Vec2 points as input |
rect | a texture rect for specify an area of the image, the expanded points will be clamped in this rect, ultimately resulting in a quad if the expansion is too great |
epsilon | the distance which the edges will expand |
TrianglesCommand::Triangles triangulate | ( | const std::vector< Vec2 > & | points | ) |
Triangulate the input points into triangles for rendering using poly2tri.
points | a vector of vec2 points as input |
void calculateUV | ( | const Rect & | rect, |
V3F_C4B_T2F * | verts, | ||
ssize_t | count ) |
calculate the UV coordinates for each points based on a texture rect
rect | a texture rect to specify where to map the UV |
verts | a pointer to the verts array, served both as input and output verts |
count | the count for the verts array TrianglesCommand::Triangles myPolygons = ap.triangulate(myPoints);
ap.calculateUV(rect, myPolygons.verts, 20);
V3F_C4B_T2F * verts Vertex data pointer. Definition TrianglesCommand.h:64 |
PolygonInfo generateTriangles | ( | const Rect & | rect = Rect::ZERO, |
float | epsilon = 2.0f, | ||
float | threshold = 0.05f ) |
a helper function, packing trace, reduce, expand, triangulate and calculate uv in one function
rect | texture rect, use Rect::ZERO for the size of the texture, default is Rect::ZERO |
epsilon | the value used to reduce and expand, default to 2.0 |
threshold | the value where bigger than the threshold will be counted as opaque, used in trace |
|
static |
a helper function, packing autoPolygon creation, trace, reduce, expand, triangulate and calculate uv in one function
filename | A path to image file, e.g., "scene1/monster.png". |
rect | texture rect, use Rect::ZERO for the size of the texture, default is Rect::ZERO |
epsilon | the value used to reduce and expand, default to 2.0 |
threshold | the value where bigger than the threshold will be counted as opaque, used in trace |
bool isScreenPointInRect | ( | const Vec2 & | pt, |
const Camera * | camera, | ||
const Mat4 & | w2l, | ||
const Rect & | rect, | ||
Vec3 * | p ) |
This is a helper function, checks a GL screen point is in content rectangle space.
The content rectangle defined by origin(0,0) and content size. This function convert GL screen point to near and far planes as points Pn and Pf, then calculate the intersect point P which the line PnPf intersect with content rectangle. If P in content rectangle means this node be hit.
pt | The point in GL screen space. |
camera | Which camera used to unproject pt to near/far planes. |
w2l | World to local transform matrix, used to convert Pn and Pf to rectangle space. |
rect | The test rectangle in local space. @parma p Point to a Vec3 for store the intersect point, if don't need them set to nullptr. |