animation/beziercurve: add getter for control points (hyprwm/Hyprland#10413)

Signed-off-by: boundlessvoid <boundlessvoid0@gmail.com>
This commit is contained in:
boundlessvoid 2025-06-26 20:12:23 +02:00
parent 6ee59e4eb8
commit d3675116ac
No known key found for this signature in database
GPG key ID: 700FA1007884C6E0
2 changed files with 7 additions and 0 deletions

View file

@ -20,6 +20,9 @@ namespace Hyprutils {
float getXForT(float const& t) const;
float getYForPoint(float const& x) const;
/* this INCLUDES the 0,0 and 1,1 points. */
const std::vector<Hyprutils::Math::Vector2D>& getControlPoints() const;
private:
/* this INCLUDES the 0,0 and 1,1 points. */
std::vector<Hyprutils::Math::Vector2D> m_vPoints;

View file

@ -76,3 +76,7 @@ float CBezierCurve::getYForPoint(float const& x) const {
return LOWERPOINT->y + ((UPPERPOINT->y - LOWERPOINT->y) * PERCINDELTA);
}
const std::vector<Hyprutils::Math::Vector2D>& CBezierCurve::getControlPoints() const {
return m_vPoints;
}