28 lines
436 B
C
28 lines
436 B
C
|
#pragma once
|
||
|
|
||
|
#include "AbstractGeometricItem.h"
|
||
|
#include "Point.h"
|
||
|
|
||
|
class LineSegment : public AbstractGeometricItem
|
||
|
{
|
||
|
public:
|
||
|
LineSegment(PointPtr p0, PointPtr p1);
|
||
|
|
||
|
static std::shared_ptr<LineSegment> Create(PointPtr p0, PointPtr p1);
|
||
|
|
||
|
double getLength() const;
|
||
|
|
||
|
Point* getPoint0() const;
|
||
|
|
||
|
Point* getPoint1() const;
|
||
|
|
||
|
void Sample(Grid* grid) const
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
PointPtr mP0;
|
||
|
PointPtr mP1;
|
||
|
};
|