FastUIDraw
Classes | Public Types | Public Member Functions | Friends | List of all members
fastuidraw::PartitionedTessellatedPath Class Reference

A PartitionedTessellatedPath represents partitioning a TessellatedPath for quick computation of what TessellatedPath::segment intersect a region. More...

#include <partitioned_tessellated_path.hpp>

Inheritance diagram for fastuidraw::PartitionedTessellatedPath:
Inheritance graph
[legend]

Classes

class  Subset
 A Subset represents a handle to a portion of a PartitionedTessellatedPath. The handle is invalid once the PartitionedTessellatedPath from which it comes goes out of scope. Do not save these handle values without also saving a handle of the PartitionedTessellatedPath from which they come. More...
 
class  SubsetSelection
 

Public Types

typedef TessellatedPath::cap cap
 
typedef TessellatedPath::join join
 
typedef TessellatedPath::segment segment
 
typedef TessellatedPath::segment_chain segment_chain
 

Public Member Functions

 PartitionedTessellatedPath (c_array< const segment_chain > chains, c_array< const join > joins, c_array< const cap > caps)
 
c_array< const capcaps (void) const
 
bool has_arcs (void) const
 
c_array< const joinjoins (void) const
 
unsigned int number_subsets (void) const
 
Subset root_subset (void) const
 
void select_subsets (c_array< const vec3 > clip_equations, const float3x3 &clip_matrix_local, const vec2 &one_pixel_width, c_array< const float > geometry_inflation, bool select_miter_joins, SubsetSelection &dst) const
 
Subset subset (unsigned int I) const
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Friends

class TessellatedPath
 

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

A PartitionedTessellatedPath represents partitioning a TessellatedPath for quick computation of what TessellatedPath::segment intersect a region.

The partitioning creates reectangular regions of the source TessellatedPath that are disjoint. One side effect of that is that a TessellatedPath::segment value from the source TessellatedPath may be split into multiple TessellatedPath::segment values.

Definition at line 50 of file partitioned_tessellated_path.hpp.

Member Typedef Documentation

◆ cap

A cap is the same as found in TessellatedPath

Definition at line 72 of file partitioned_tessellated_path.hpp.

◆ join

A join is the same as found in TessellatedPath

Definition at line 67 of file partitioned_tessellated_path.hpp.

◆ segment

A segment is the same as found in TessellatedPath

Definition at line 57 of file partitioned_tessellated_path.hpp.

◆ segment_chain

A segment_chain is the same as found in TessellatedPath

Definition at line 62 of file partitioned_tessellated_path.hpp.

Constructor & Destructor Documentation

◆ PartitionedTessellatedPath()

fastuidraw::PartitionedTessellatedPath::PartitionedTessellatedPath ( c_array< const segment_chain chains,
c_array< const join joins,
c_array< const cap caps 
)

Constuct a PartitionedTessellatedPath from arrays of segment_chain, join and caps values. Values are -COPIED- from the passed arrays.

Parameters
chainssegment chain values to copy and partition
joinsjoin values to copy and partition
capscap values to copy and partition

Member Function Documentation

◆ caps()

c_array<const cap> fastuidraw::PartitionedTessellatedPath::caps ( void  ) const

Returns the caps of the path.

◆ has_arcs()

bool fastuidraw::PartitionedTessellatedPath::has_arcs ( void  ) const

Returns true if any of the segment values of any of the segment_chain values of any of the Subset::segment_chains() has segment::m_type equal to TessellatedPath::arc_segment.

◆ joins()

c_array<const join> fastuidraw::PartitionedTessellatedPath::joins ( void  ) const

Returns the joins of the path.

◆ number_subsets()

unsigned int fastuidraw::PartitionedTessellatedPath::number_subsets ( void  ) const

Returns the number of Subset objects of the StrokedPath.

◆ root_subset()

Subset fastuidraw::PartitionedTessellatedPath::root_subset ( void  ) const

Returns the root-subset of the StrokedPath, this is the Subset that includes the entire StrokedPath.

◆ select_subsets()

void fastuidraw::PartitionedTessellatedPath::select_subsets ( c_array< const vec3 clip_equations,
const float3x3 clip_matrix_local,
const vec2 one_pixel_width,
c_array< const float >  geometry_inflation,
bool  select_miter_joins,
SubsetSelection dst 
) const

Given a set of clip equations in clip coordinates and a tranformation from local coordiante to clip coordinates, compute what Subset are not completely culled by the clip equations.

Parameters
clip_equationsarray of clip equations
clip_matrix_local3x3 transformation from local (x, y, 1) coordinates to clip coordinates.
one_pixel_widthholds the size of a single pixel in normalized device coordinates
geometry_inflationamount path geometry is inflated, array is indexed by the enumeration PathEnums::path_geometry_inflation_index_t
select_miter_joinsif true, when selecting what joins are in the area, enlarge the join footprint for if the joins are stroked as a type of miter join.
[out]dstlocation to which to write the subset-selection.

◆ subset()

Subset fastuidraw::PartitionedTessellatedPath::subset ( unsigned int  I) const

Return the named Subset object of the StrokedPath.


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