#pragma once

#include "EngineFrame/Component/Component.h"
#include "Tool/TransformT.h"

class RenderBase : public Component
{

public:
    struct RenderGuidanceInfo
    {
        SDL_Rect rect;
        float rotation;
        SDL_RendererFlip flip = SDL_FLIP_NONE;
        VecPos AnchorPos;
        bool Visible = true;
        bool IsInScreen;
    };

public:
    RenderBase(/* args */);
    ~RenderBase();

public:
    void Init() override;

    void Update(float deltaTime) override;
    void Render() override;

public:
public:
    // 设置迭代的坐标
    void SetIterationPos(VecFPos pos) override;
    // 设置迭代的缩放
    void SetIterationScale(VecFPos scale) override;
    // 设置迭代的旋转角度
    void SetIterationRotation(float angle) override;

    // 设置坐标
    void SetPos(VecFPos pos) override;
    // 设置缩放
    void SetScale(VecFPos scale) override;
    // 设置旋转角度
    void SetRotation(float angle) override;
    // 设置中心点
    void SetAnchor(VecFPos anchor) override;

    // 计算渲染信息
    void CalcRenderInfo() override;
};
