2025-05-15 10:55:59 +02:00
|
|
|
#ifndef POINT_HPP
|
|
|
|
|
#define POINT_HPP
|
|
|
|
|
|
|
|
|
|
#include "Fixed.hpp"
|
|
|
|
|
|
|
|
|
|
class Point {
|
|
|
|
|
private:
|
|
|
|
|
const Fixed x;
|
|
|
|
|
const Fixed y;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Point();
|
|
|
|
|
Point(float x, float y);
|
|
|
|
|
Point(Point const &other);
|
|
|
|
|
Point &operator=(const Point &other);
|
|
|
|
|
~Point();
|
|
|
|
|
|
2025-05-20 13:34:30 +02:00
|
|
|
Fixed getX() const;
|
|
|
|
|
Fixed getY() const;
|
2025-05-15 10:55:59 +02:00
|
|
|
|
2025-05-20 13:34:30 +02:00
|
|
|
static Fixed triangleArea(Point const &a, Point const &b, Point const &c);
|
2025-05-15 10:55:59 +02:00
|
|
|
};
|
|
|
|
|
|
2025-05-20 13:34:30 +02:00
|
|
|
std::ostream &operator<<(std::ostream &stream, const Point &point);
|
|
|
|
|
|
2025-05-15 10:55:59 +02:00
|
|
|
bool bsp(Point const a, Point const b, Point const c, Point const point);
|
|
|
|
|
|
|
|
|
|
#endif
|