-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMPI_PolyLinePoint.cpp
More file actions
70 lines (55 loc) · 1.18 KB
/
Copy pathMPI_PolyLinePoint.cpp
File metadata and controls
70 lines (55 loc) · 1.18 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// MPI_PolyLinePoint.cpp
//
#include "MPI_PolyLinePoint.h"
#include "MPI_PolyLinePointVisitor.h"
MPI_PolyLinePoint::MPI_PolyLinePoint( MPI_PolyLine const &owner, MPI_Point2D const &point ) :
owner_(owner),
point_(point)
{
// empty
}
MPI_PolyLinePoint::MPI_PolyLinePoint( MPI_PolyLine const &owner, float x, float y ) :
owner_(owner),
point_(x, y)
{
// empty
}
float MPI_PolyLinePoint::getX( void ) const
{
return point_.getX();
}
float MPI_PolyLinePoint::getY( void ) const
{
return point_.getY();
}
void MPI_PolyLinePoint::setX( float value )
{
point_.setX( value );
}
void MPI_PolyLinePoint::setY( float value )
{
point_.setY( value );
}
MPI_PolyLine const& MPI_PolyLinePoint::getOwner( void ) const
{
return owner_;
}
MPI_Point2D const& MPI_PolyLinePoint::getPoint( void ) const
{
return point_;
}
void MPI_PolyLinePoint::acceptVisitor( MPI_PolyLinePointVisitor const& visitor )
{
visitor.visitPolyLinePoint( *this );
}
void MPI_PolyLinePoint::print( std::ostream &os ) const
{
os << point_;
}
std::ostream &operator<<( std::ostream &os, MPI_PolyLinePoint const &point )
{
point.print(os);
return os;
}
// vim:sw=4:et:cindent: