11 #include "GDCore/Extensions/Builtin/SpriteExtension/Point.h"
12 #include "GDCore/Extensions/Builtin/SpriteExtension/Polygon2d.h"
13 #include "GDCore/String.h"
52 std::vector<Polygon2d> GetCollisionMask()
const;
58 return customCollisionMask;
65 return customCollisionMask;
72 void SetCustomCollisionMask(
const std::vector<Polygon2d>& collisionMask);
79 return fullImageCollisionMask;
86 fullImageCollisionMask = enabled;
104 void AddPoint(
const Point& point);
160 bool SetDefaultCenterPoint(
bool enabled);
165 bool fullImageCollisionMask;
168 std::vector<Polygon2d> customCollisionMask;
170 std::vector<Point> points;
173 bool automaticCentre;
Named point used by Sprite.
Definition: Point.h:16
Represents a sprite to be displayed on the screen.
Definition: Sprite.h:25
std::vector< Polygon2d > & GetCustomCollisionMask()
Get the custom collision mask.
Definition: Sprite.h:57
void SetImageName(const gd::String &image_)
Change the name of the sprite image.
Definition: Sprite.h:33
Point & GetOrigin()
Return Origin point.
Definition: Sprite.h:134
bool IsDefaultCenterPoint() const
Return true if the center point is automatically computed.
Definition: Sprite.h:155
const gd::String & GetImageName() const
Get the name of the sprite image.
Definition: Sprite.h:38
bool IsFullImageCollisionMask() const
Return true if the collision mask is a bounding box, false if a custom collision mask is used.
Definition: Sprite.h:78
Point & GetCenter()
Return Center point.
Definition: Sprite.h:150
gd::String & GetImageName()
Get the name of the sprite image.
Definition: Sprite.h:43
const std::vector< Polygon2d > & GetCustomCollisionMask() const
Get the custom collision mask.
Definition: Sprite.h:64
const Point & GetOrigin() const
Return Origin point.
Definition: Sprite.h:129
void SetFullImageCollisionMask(bool enabled)
Un/set use of the custom collision mask.
Definition: Sprite.h:85
const std::vector< Point > & GetAllNonDefaultPoints() const
Return all points, excluding origin and center.
Definition: Sprite.h:97
const Point & GetCenter() const
Return Center point.
Definition: Sprite.h:142
std::vector< Point > & GetAllNonDefaultPoints()
Return all points, excluding origin and center.
Definition: Sprite.h:92
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24