mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 07:00:10 +01:00
animation/beziercurve: add getter for control points (hyprwm/Hyprland#10413)
Signed-off-by: boundlessvoid <boundlessvoid0@gmail.com>
This commit is contained in:
parent
6ee59e4eb8
commit
d3675116ac
2 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue