-
Notifications
You must be signed in to change notification settings - Fork 0
/
MPI_IntersectPolyLineVisitor.cpp
46 lines (34 loc) · 1.31 KB
/
MPI_IntersectPolyLineVisitor.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// MPI_IntersectPolyLineVisitor.cpp
//
#include "MPI_IntersectPolyLineVisitor.h"
#include "MPI_Segment.h"
#include "MPI_SegmentIntersectionVisitor.h"
#include "MPI_RemovalStroke.h"
#include "MPI_PlayheadStroke.h"
MPI_IntersectPolyLineVisitor::MPI_IntersectPolyLineVisitor( MPI_SegmentIntersectionVisitor &segmentintersectionvisitor ) :
segmentintersectionvisitor_( segmentintersectionvisitor )
{
// empty
}
void MPI_IntersectPolyLineVisitor::visitParticleStroke( MPI_ParticleStroke& polyline ) const
{
visitIntersectionPolyLine( polyline );
}
void MPI_IntersectPolyLineVisitor::visitRemovalStroke( MPI_RemovalStroke& polyline ) const
{
visitIntersectionPolyLine( polyline );
}
void MPI_IntersectPolyLineVisitor::visitPlayheadStroke( MPI_PlayheadStroke& polyline ) const
{
visitIntersectionPolyLine( polyline );
}
void MPI_IntersectPolyLineVisitor::visitIntersectionPolyLine( MPI_IntersectionPolyLine& polyline ) const
{
// this is a private helper method; MPI_IntersectionPolyLine doesn't have
// an entry in the polyline visitors since it's an abstract base class and
// can't be instantiated.
if ( segmentintersectionvisitor_.getSegment().getBoundingBox().overlaps( polyline.getBoundingBox() ) )
polyline.visitSegments( segmentintersectionvisitor_ );
}
// vim:sw=4:et:cindent: