1 #include "rive/shapes/cubic_mirrored_vertex.hpp"
2 #include "rive/math/vec2d.hpp"
7 static Vec2D get_point(const CubicMirroredVertex& v) { return Vec2D(v.x(), v.y()); }
9 static Vec2D get_vector(const CubicMirroredVertex& v) {
10 return Vec2D(cos(v.rotation()) * v.distance(), sin(v.rotation()) * v.distance());
13 void CubicMirroredVertex::computeIn() { m_InPoint = get_point(*this) - get_vector(*this); }
15 void CubicMirroredVertex::computeOut() { m_OutPoint = get_point(*this) + get_vector(*this); }
17 void CubicMirroredVertex::rotationChanged() {
18 m_InValid = m_OutValid = false;
21 void CubicMirroredVertex::distanceChanged() {
22 m_InValid = m_OutValid = false;