Graphics/Sprite: Add Origin parameter
Allows you to change center of translation/rotation/scale Former-commit-id: 6045c6f78ec81db54629883927a203e8c50bb561 [formerly 8ab1e1e5785a9be67b76364f62fe4b767dca341f] [formerly f17a5c8c4d5e5cef8dd4ee76734609a6651384e7 [formerly 4a932134b130d64deb88f018332f5414b1370435]] Former-commit-id: 8311f12a2e6a28bec5e22f5ca5ce7d3f551d52ba [formerly 412800a9b5afb15fb21f2428e2e9b3b9eb34c0ab] Former-commit-id: 80d03c5581adbe47ccbe33649787a5698774cdd3
This commit is contained in:
@@ -38,12 +38,14 @@ namespace Nz
|
||||
|
||||
inline const Color& GetColor() const;
|
||||
inline const MaterialRef& GetMaterial() const;
|
||||
inline const Vector3f& GetOrigin() const;
|
||||
inline const Vector2f& GetSize() const;
|
||||
inline const Rectf& GetTextureCoords() const;
|
||||
|
||||
inline void SetColor(const Color& color);
|
||||
inline void SetDefaultMaterial();
|
||||
inline void SetMaterial(MaterialRef material, bool resizeSprite = true);
|
||||
inline void SetOrigin(const Vector3f& origin);
|
||||
inline void SetSize(const Vector2f& size);
|
||||
inline void SetSize(float sizeX, float sizeY);
|
||||
inline void SetTexture(TextureRef texture, bool resizeSprite = true);
|
||||
@@ -67,6 +69,7 @@ namespace Nz
|
||||
MaterialRef m_material;
|
||||
Rectf m_textureCoords;
|
||||
Vector2f m_size;
|
||||
Vector3f m_origin;
|
||||
|
||||
static SpriteLibrary::LibraryMap s_library;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user