Graphics: Add origin to all sprite-based renderables (and made it a factor)
This commit is contained in:
@@ -33,6 +33,8 @@ namespace Nz
|
||||
inline const Corner& GetBottomRightCorner() const;
|
||||
const std::shared_ptr<MaterialInstance>& GetMaterial(std::size_t i = 0) const override;
|
||||
std::size_t GetMaterialCount() const override;
|
||||
inline const Vector2f& GetOrigin() const;
|
||||
inline const Vector2f& GetSize() const;
|
||||
inline const Corner& GetTopLeftCorner() const;
|
||||
inline const Rectf& GetTextureCoords() const;
|
||||
Vector3ui GetTextureSize() const;
|
||||
@@ -42,6 +44,7 @@ namespace Nz
|
||||
inline void SetCornersSize(const Vector2f& topLeftSize, const Vector2f& bottomRightSize);
|
||||
inline void SetCornersTextureCoords(const Vector2f& topLeftTextureCoords, const Vector2f& bottomRightTextureCoords);
|
||||
inline void SetMaterial(std::shared_ptr<MaterialInstance> material);
|
||||
inline void SetOrigin(const Vector2f& origin);
|
||||
inline void SetSize(const Vector2f& size);
|
||||
inline void SetTextureCoords(const Rectf& textureCoords);
|
||||
inline void SetTextureRect(const Rectf& textureRect);
|
||||
@@ -65,6 +68,7 @@ namespace Nz
|
||||
Corner m_topLeftCorner;
|
||||
Corner m_bottomRightCorner;
|
||||
Rectf m_textureCoords;
|
||||
Vector2f m_origin;
|
||||
Vector2f m_size;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user