36 LineSegment(
const double* startPoint,
const double* endPoint, uint32_t dimension);
42 virtual bool operator==(
const LineSegment& p)
const;
52 uint32_t getByteArraySize()
override;
53 void loadFromByteArray(
const uint8_t* data)
override;
54 void storeToByteArray(uint8_t** data, uint32_t& length)
override;
59 bool intersectsShape(
const IShape& in)
const override;
60 bool containsShape(
const IShape& in)
const override;
61 bool touchesShape(
const IShape& in)
const override;
62 void getCenter(
Point& out)
const override;
63 uint32_t getDimension()
const override;
64 void getMBR(
Region& out)
const override;
65 double getArea()
const override;
66 double getMinimumDistance(
const IShape& in)
const override;
68 virtual bool intersectsLineSegment(
const LineSegment& l)
const;
69 virtual bool intersectsRegion(
const Region& p)
const;
70 virtual double getMinimumDistance(
const Point& p)
const;
72 virtual double getRelativeMinimumDistance(
const Point& p)
const;
73 virtual double getRelativeMaximumDistance(
const Region& r)
const;
74 virtual double getAngleOfPerpendicularRay();
76 virtual void makeInfinite(uint32_t dimension);
77 virtual void makeDimension(uint32_t dimension);
80 uint32_t m_dimension{0};
81 double* m_pStartPoint{
nullptr};
82 double* m_pEndPoint{
nullptr};
91 static double doubleAreaTriangle(
const Point& a,
const Point& b,
const Point& c);
95 static bool between(
double a,
double b,
double c);
friend SIDX_DLL std::ostream & operator<<(std::ostream &os, const LineSegment &pt)
SIDX_DLL std::ostream & operator<<(std::ostream &os, const Ball &ball)