Struct Engine::FrameData¶
ClassList > Engine > FrameData
Represents an individual frame rectangle in a spritesheet and optional pivot offset.
#include <Animation.hpp>
Public Attributes¶
| Type | Name |
|---|---|
| float | pivotX = 0.0f |
| float | pivotY = 0.0f |
| raylib::Rectangle | rect |
Public Functions¶
| Type | Name |
|---|---|
| FrameData () = default Default constructor initializing an empty frame. |
|
| FrameData (const raylib::Rectangle & r, float px=0.0f, float py=0.0f) Constructs frame data using a Raylib rectangle and optional pivots. |
|
| FrameData (float x, float y, float w, float h, float px=0.0f, float py=0.0f) Constructs frame data using raw coordinates and dimensions. |
Public Attributes Documentation¶
variable pivotX¶
Horizontal alignment offset relative to the entity's position.
variable pivotY¶
Vertical alignment offset relative to the entity's position.
variable rect¶
Sub-rectangle within the texture atlas (x, y, width, height).
Public Functions Documentation¶
function FrameData [⅓]¶
Default constructor initializing an empty frame.
function FrameData [⅔]¶
Constructs frame data using a Raylib rectangle and optional pivots.
Parameters:
rSub-rectangle within the texture.pxHorizontal pivot offset.pyVertical pivot offset.
function FrameData [3/3]¶
Constructs frame data using raw coordinates and dimensions.
Parameters:
xX coordinate of the top-left corner in the texture.yY coordinate of the top-left corner in the texture.wWidth of the frame rectangle.hHeight of the frame rectangle.pxHorizontal pivot offset.pyVertical pivot offset.
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Components/Animation.hpp