GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Represents a sprite to be displayed on the screen. More...
#include <Sprite.h>
Public Member Functions | |
void | SetImageName (const gd::String &image_) |
Change the name of the sprite image. | |
const gd::String & | GetImageName () const |
Get the name of the sprite image. | |
gd::String & | GetImageName () |
Get the name of the sprite image. | |
std::vector< Polygon2d > | GetCollisionMask () const |
Get the collision mask (custom or automatically generated owing to IsFullImageCollisionMask()) More... | |
std::vector< Polygon2d > & | GetCustomCollisionMask () |
Get the custom collision mask. | |
const std::vector< Polygon2d > & | GetCustomCollisionMask () const |
Get the custom collision mask. | |
void | SetCustomCollisionMask (const std::vector< Polygon2d > &collisionMask) |
Set the custom collision mask. Call then SetFullImageCollisionMask(false) to use it. | |
bool | IsFullImageCollisionMask () const |
Return true if the collision mask is a bounding box, false if a custom collision mask is used. | |
void | SetFullImageCollisionMask (bool enabled) |
Un/set use of the custom collision mask. | |
std::vector< Point > & | GetAllNonDefaultPoints () |
Return all points, excluding origin and center. | |
const std::vector< Point > & | GetAllNonDefaultPoints () const |
Return all points, excluding origin and center. | |
void | AddPoint (const Point &point) |
Add a point. | |
void | DelPoint (const gd::String &name) |
Delete a point. | |
const Point & | GetPoint (const gd::String &name) const |
Get the specified point. | |
Point & | GetPoint (const gd::String &name) |
Get the specified point. | |
bool | HasPoint (const gd::String &name) const |
Return true if the point exists. | |
const Point & | GetOrigin () const |
Return Origin point. | |
Point & | GetOrigin () |
Return Origin point. | |
const Point & | GetCenter () const |
Return Center point. More... | |
Point & | GetCenter () |
Return Center point. More... | |
bool | IsDefaultCenterPoint () const |
Return true if the center point is automatically computed. | |
bool | SetDefaultCenterPoint (bool enabled) |
Un/set center as being automatically computed. | |
Represents a sprite to be displayed on the screen.
|
inline |
Return Center point.
|
inline |
Return Center point.
std::vector< Polygon2d > gd::Sprite::GetCollisionMask | ( | ) | const |
Get the collision mask (custom or automatically generated owing to IsFullImageCollisionMask())