CGAL 6.0 - 2D Straight Skeleton and Polygon Offsetting
Loading...
Searching...
No Matches
CGAL::Trisegment_2< K, Segment > Class Template Reference

#include <CGAL/Trisegment_2.h>

Definition

template<typename K, typename Segment>
class CGAL::Trisegment_2< K, Segment >

A straight skeleton event is the simultaneous collision of three offsetted oriented straight line segments e0*,e1*,e2* (e* denotes an offsetted edge).

This record stores the segments corresponding to the INPUT edges (e0,e1,e2) whose offsets intersect at the event along with their collinearity.

If the event is an edge-event, then e0*->e1*->e2* must be consecutive right before the event so that after the event e0* and e2* become consecutive. Thus, there are offset vertices (e0*,e1*) and (e1*,e2*) in the offset polygon which do not necessarily exist in the original polygon.

If the event is a split-event, e0*->e1* must be consecutive right before the event so that after the event e0*->right(e2*) and left(e2*)->e1* become consecutive. Thus, there is an offset vertex (e0*,e1*) in the offset polygon which does not necessarily exist in the original polygon.

The offset vertices (e0*,e1*) and (e1*,e2*) are called the left and right seeds for the event. A seed is a contour node if the vertex is already present in the input polygon, otherwise is a skeleton node. If a seed is a skeleton node it is produced by a previous event so it is itself defined as a trisegment, thus, a trisegment is actually a node in a binary tree.

Since trisegments are tree nodes they must always be handled via the nested smart pointer type Self_ptr.

Template Parameters
Kmust be a model of Kernel
Segmentmust be a model of Kernel::Segment_2
Note
Objects of this type should be constructed using the traits' functor Construct_ss_trisegment_2 (see the concept StraightSkeletonBuilderTraits_2).
See also
PolygonOffsetBuilderTraits_2

Public Types

typedef K::FT FT
 the field type
 

Public Member Functions

const Segment & e0 () const
 returns e0.
 
const Segment & e1 () const
 returns e1.
 
const Segment & e2 () const
 returns e2.
 
const FTw0 () const
 returns the weight of the edge e0.
 
const FTw1 () const
 returns the weight of the edge e1.
 
const FTw2 () const
 returns the weight of the edge e1.