FastUIDraw
Public Member Functions | Public Attributes | List of all members
fastuidraw::TessellatedPath::join Class Reference

Represents the geometric data for a join. More...

#include <tessellated_path.hpp>

Public Member Functions

 join (void)
 
 join (const segment &into_join, const segment &from_join)
 
vec2 enter_join_normal (void) const
 
vec2 leaving_join_normal (void) const
 

Public Attributes

unsigned int m_contour_id
 
float m_contour_length
 
float m_distance_from_contour_start
 
float m_distance_from_previous_join
 
unsigned int m_edge_into_join_id
 
unsigned int m_edge_leaving_join_id
 
vec2 m_enter_join_unit_vector
 
float m_join_angle
 
float m_lambda
 
vec2 m_leaving_join_unit_vector
 
float m_miter_distance
 
vec2 m_position
 

Detailed Description

Represents the geometric data for a join.

Definition at line 438 of file tessellated_path.hpp.

Constructor & Destructor Documentation

◆ join() [1/2]

fastuidraw::TessellatedPath::join::join ( void  )
inline

Default ctor that does NOT initialize any of the fields of join

Definition at line 445 of file tessellated_path.hpp.

◆ join() [2/2]

fastuidraw::TessellatedPath::join::join ( const segment into_join,
const segment from_join 
)

Ctor that initializes the values of a join to be the values of where two segment values meet.

Parameters
into_jointhe segment value into the join, it is required that into_join.m_end_pt has the same value as from_join.m_start_pt
from_jointhe segment value leaving from the join, it is required that into_join.m_end_pt has the same value as from_join.m_start_pt

Member Function Documentation

◆ enter_join_normal()

vec2 fastuidraw::TessellatedPath::join::enter_join_normal ( void  ) const
inline

Gives the normal vector to going into the join

Definition at line 544 of file tessellated_path.hpp.

◆ leaving_join_normal()

vec2 fastuidraw::TessellatedPath::join::leaving_join_normal ( void  ) const
inline

Gives the normal vector to leaving from the join

Definition at line 553 of file tessellated_path.hpp.

Member Data Documentation

◆ m_contour_id

unsigned int fastuidraw::TessellatedPath::join::m_contour_id

Gives the contour from which the join originates, following the same convention as segment::m_contour_id.

Definition at line 497 of file tessellated_path.hpp.

◆ m_contour_length

float fastuidraw::TessellatedPath::join::m_contour_length

Length of the contour on which the join resides.

Definition at line 490 of file tessellated_path.hpp.

◆ m_distance_from_contour_start

float fastuidraw::TessellatedPath::join::m_distance_from_contour_start

Gives the distance of the join from the start of the -contour- on which the point resides.

Definition at line 485 of file tessellated_path.hpp.

◆ m_distance_from_previous_join

float fastuidraw::TessellatedPath::join::m_distance_from_previous_join

Gives the distance of the join from the previous join.

Definition at line 479 of file tessellated_path.hpp.

◆ m_edge_into_join_id

unsigned int fastuidraw::TessellatedPath::join::m_edge_into_join_id

Gives the interpolator that goes into the join, following the same convention as segment::m_edge_id.

Definition at line 504 of file tessellated_path.hpp.

◆ m_edge_leaving_join_id

unsigned int fastuidraw::TessellatedPath::join::m_edge_leaving_join_id

Gives the interpolator that leaves the join, following the same convention as segment::m_edge_id.

Definition at line 511 of file tessellated_path.hpp.

◆ m_enter_join_unit_vector

vec2 fastuidraw::TessellatedPath::join::m_enter_join_unit_vector

Gives the unit-vector of the path entering the join.

Definition at line 469 of file tessellated_path.hpp.

◆ m_join_angle

float fastuidraw::TessellatedPath::join::m_join_angle

This gives the angle (in degrees) between the start and end points of the join.

Definition at line 538 of file tessellated_path.hpp.

◆ m_lambda

float fastuidraw::TessellatedPath::join::m_lambda

When stroking a join, one needs to know what side of the edge gets the join. For example a bevel join is formed by the triangle formed from the three points: the outer edge at the join of the segment going into the join, the outer edge of the segment leaving the join and the point where the segments meet. The value of lambda() gives the sign to apply to enter_join_normal() and leaving_join_normal() to get the unit vector from where the segments meet to the outer edge.

Definition at line 524 of file tessellated_path.hpp.

◆ m_leaving_join_unit_vector

vec2 fastuidraw::TessellatedPath::join::m_leaving_join_unit_vector

Gives the unit-vector of the path leaving the join.

Definition at line 474 of file tessellated_path.hpp.

◆ m_miter_distance

float fastuidraw::TessellatedPath::join::m_miter_distance

If this join is realized as a miter-join, returns the distance from the point of the join (i.e. where the segments intersect) to the tip of the miter join. If the path enter and leaving the join are parallel or anti-parallel, then return -1.0.

Definition at line 532 of file tessellated_path.hpp.

◆ m_position

vec2 fastuidraw::TessellatedPath::join::m_position

Gives the position of the join

Definition at line 464 of file tessellated_path.hpp.


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