#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 |
| void | ToLinearPathComponents (Scalar scale, VertexWriter &writer) 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 62 of file path_component.h.
| using impeller::QuadraticPathComponent::PointProc = std::function<void(const Point& point)> |
Definition at line 82 of file path_component.h.
|
inline |
Definition at line 70 of file path_component.h.
Definition at line 72 of file path_component.h.
| void impeller::QuadraticPathComponent::AppendPolylinePoints | ( | Scalar | scale_factor, |
| std::vector< Point > & | points | ||
| ) | const |
Definition at line 171 of file path_component.cc.
References ToLinearPathComponents().
Referenced by impeller::Path::CreatePolyline().
| std::vector< Point > impeller::QuadraticPathComponent::Extrema | ( | ) | const |
Definition at line 190 of file path_component.cc.
References impeller::CubicPathComponent::Extrema().
| std::optional< Vector2 > impeller::QuadraticPathComponent::GetEndDirection | ( | ) | const |
| std::optional< Vector2 > impeller::QuadraticPathComponent::GetStartDirection | ( | ) | const |
|
inline |
Definition at line 147 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 154 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, |
| VertexWriter & | writer | ||
| ) | const |
Definition at line 161 of file path_component.cc.
References impeller::ComputeQuadradicSubdivisions(), p2, scale, Solve(), and impeller::VertexWriter::Write().
| void impeller::QuadraticPathComponent::ToLinearPathComponents | ( | Scalar | scale_factor, |
| const PointProc & | proc | ||
| ) | const |
Definition at line 179 of file path_component.cc.
References impeller::ComputeQuadradicSubdivisions(), p2, and Solve().
Referenced by AppendPolylinePoints(), and impeller::Path::WritePolyline().
| Point impeller::QuadraticPathComponent::cp |
Definition at line 66 of file path_component.h.
Referenced by impeller::ComputeQuadradicSubdivisions(), GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), and impeller::testing::TEST().
| Point impeller::QuadraticPathComponent::p1 |
Definition at line 64 of file path_component.h.
Referenced by impeller::ComputeQuadradicSubdivisions(), GetEndDirection(), GetStartDirection(), operator==(), impeller::PathBuilder::Shift(), Solve(), SolveDerivative(), impeller::testing::TEST(), and impeller::Path::WritePolyline().
| Point impeller::QuadraticPathComponent::p2 |
Definition at line 68 of file path_component.h.
Referenced by impeller::ComputeQuadradicSubdivisions(), GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), impeller::testing::TEST(), and ToLinearPathComponents().