#include <path_component.h>
Public Types | |
using | PointProc = std::function< void(const Point &point)> |
Public Member Functions | |
QuadraticPathComponent () | |
QuadraticPathComponent (Point ap1, Point acp, Point ap2) | |
Point | Solve (Scalar time) const |
Point | SolveDerivative (Scalar time) const |
void | AppendPolylinePoints (Scalar scale_factor, std::vector< Point > &points) const |
void | ToLinearPathComponents (Scalar scale_factor, const PointProc &proc) const |
std::vector< Point > | Extrema () const |
bool | operator== (const QuadraticPathComponent &other) const |
std::optional< Vector2 > | GetStartDirection () const |
std::optional< Vector2 > | GetEndDirection () const |
Public Attributes | |
Point | p1 |
Point | cp |
Point | p2 |
Definition at line 53 of file path_component.h.
using impeller::QuadraticPathComponent::PointProc = std::function<void(const Point& point)> |
Definition at line 83 of file path_component.h.
|
inline |
Definition at line 61 of file path_component.h.
Definition at line 63 of file path_component.h.
void impeller::QuadraticPathComponent::AppendPolylinePoints | ( | Scalar | scale_factor, |
std::vector< Point > & | points | ||
) | const |
std::vector< Point > impeller::QuadraticPathComponent::Extrema | ( | ) | const |
Definition at line 157 of file path_component.cc.
References impeller::CubicPathComponent::Extrema().
std::optional< Vector2 > impeller::QuadraticPathComponent::GetEndDirection | ( | ) | const |
Definition at line 172 of file path_component.cc.
Referenced by impeller::PathComponentEndDirectionVisitor::operator()().
std::optional< Vector2 > impeller::QuadraticPathComponent::GetStartDirection | ( | ) | const |
Definition at line 162 of file path_component.cc.
Referenced by impeller::PathComponentStartDirectionVisitor::operator()().
|
inline |
Definition at line 87 of file path_component.cc.
References cp, p1, p2, impeller::QuadraticSolve(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
Referenced by ToLinearPathComponents().
Definition at line 94 of file path_component.cc.
References cp, p1, p2, impeller::QuadraticSolveDerivative(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
void impeller::QuadraticPathComponent::ToLinearPathComponents | ( | Scalar | scale_factor, |
const PointProc & | proc | ||
) | const |
Definition at line 114 of file path_component.cc.
References impeller::ApproximateParabolaIntegral(), cp, impeller::TPoint< T >::Dot(), impeller::kDefaultCurveTolerance, p1, p2, scale, and Solve().
Referenced by AppendPolylinePoints(), and impeller::CubicPathComponent::ToLinearPathComponents().
Point impeller::QuadraticPathComponent::cp |
Definition at line 57 of file path_component.h.
Referenced by GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), impeller::testing::TEST(), and ToLinearPathComponents().
Point impeller::QuadraticPathComponent::p1 |
Definition at line 55 of file path_component.h.
Referenced by GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), impeller::testing::TEST(), and ToLinearPathComponents().
Point impeller::QuadraticPathComponent::p2 |
Definition at line 59 of file path_component.h.
Referenced by GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), impeller::testing::TEST(), and ToLinearPathComponents().