FastUIDraw
Classes | Public Member Functions | List of all members
fastuidraw::PathContour::interpolator_generic Class Referenceabstract

Interpolator generic implements tessellation by recursion and relying on analytic derivative provided by derived class. More...

#include <path.hpp>

Inheritance diagram for fastuidraw::PathContour::interpolator_generic:
Inheritance graph
[legend]

Classes

class  tessellated_region
 

Public Member Functions

 interpolator_generic (PathContour &contour, const vec2 &end, enum PathEnums::edge_type_t tp)
 
virtual unsigned int minimum_tessellation_recursion (void) const =0
 
virtual reference_counted_ptr< tessellation_stateproduce_tessellation (const TessellatedPath::TessellationParams &tess_params, TessellatedPath::SegmentStorage *out_data, float *out_max_distance) const
 
virtual void tessellate (reference_counted_ptr< tessellated_region > in_region, reference_counted_ptr< tessellated_region > *out_regionA, reference_counted_ptr< tessellated_region > *out_regionB, vec2 *out_p) const =0
 
- Public Member Functions inherited from fastuidraw::PathContour::interpolator_base
 interpolator_base (PathContour &contour, const vec2 &end, enum PathEnums::edge_type_t tp)
 
virtual enum return_code add_to_builder (ShaderFilledPath::Builder *builder, float tol) const
 
virtual void approximate_bounding_box (Rect *out_bb) const =0
 
virtual reference_counted_ptr< interpolator_basedeep_copy (PathContour &contour) const =0
 
enum PathEnums::edge_type_t edge_type (void) const
 
const vec2end_pt (void) const
 
virtual bool is_flat (void) const =0
 
const vec2start_pt (void) const
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

Interpolator generic implements tessellation by recursion and relying on analytic derivative provided by derived class.

Definition at line 249 of file path.hpp.

Constructor & Destructor Documentation

◆ interpolator_generic()

fastuidraw::PathContour::interpolator_generic::interpolator_generic ( PathContour contour,
const vec2 end,
enum PathEnums::edge_type_t  tp 
)
inline

Ctor.

Parameters
contourPathContour to which the interpolator is added, the start point of the interpolator will be ending point of PathContour::prev_interpolator().
endend point of the edge of this interpolator
tpnature the edge represented by this interpolator_base

Definition at line 293 of file path.hpp.

Member Function Documentation

◆ minimum_tessellation_recursion()

virtual unsigned int fastuidraw::PathContour::interpolator_generic::minimum_tessellation_recursion ( void  ) const
pure virtual

To be implemented by a derived class to return a reasonable lower bound on the needed number of times the edge should be cut in half in order to capture its shape.

Implemented in fastuidraw::PathContour::bezier.

◆ produce_tessellation()

virtual reference_counted_ptr<tessellation_state> fastuidraw::PathContour::interpolator_generic::produce_tessellation ( const TessellatedPath::TessellationParams tess_params,
TessellatedPath::SegmentStorage out_data,
float *  out_max_distance 
) const
virtual

To be implemented by a derived class to produce the arc-tessellation from start_pt() to end_pt(). In addition, for recursive tessellation, returns the tessellation state to be queried for recursion depth and reused to refine the tessellation. If the tessellation routine is not recursive in nature, return nullptr.

Parameters
tess_paramstessellation parameters
out_datalocation to which to write the tessellations
out_max_distancelocation to which to write an upperbound for the distance between the curve and the tesseallation approximation.

Implements fastuidraw::PathContour::interpolator_base.

◆ tessellate()

virtual void fastuidraw::PathContour::interpolator_generic::tessellate ( reference_counted_ptr< tessellated_region in_region,
reference_counted_ptr< tessellated_region > *  out_regionA,
reference_counted_ptr< tessellated_region > *  out_regionB,
vec2 out_p 
) const
pure virtual

To be implemented by a derived to assist in recursive tessellation.

Parameters
in_regionregion to divide in half, a nullptr value indicates that the region is the entire interpolator.
out_regionAlocation to which to write the first half
out_regionBlocation to which to write the second half
out_plocation to which to write the position of the point on the curve in the middle (with repsect to time) of in_region

Implemented in fastuidraw::PathContour::bezier.


The documentation for this class was generated from the following file: