CPP02 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Point.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Point.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/28 17:17:57 by kamitsui #+# #+# */
9/* Updated: 2025/05/06 18:01:05 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
23#ifndef POINT_HPP
24#define POINT_HPP
25
26#include "Fixed.hpp"
27
28class Point {
29 private:
30 const Fixed x;
31 const Fixed y;
32
33 public:
37 Point();
38
42 Point(const float x_val, const float y_val);
43
47 Point(const Point &other);
48
52 Point &operator=(const Point &other);
53
57 ~Point();
58
62 Fixed getX() const;
63
67 Fixed getY() const;
68};
69
73bool bsp(Point const a, Point const b, Point const c, Point const point);
74
75#endif
bool bsp(Point const a, Point const b, Point const c, Point const point)
Determines if a point is strictly inside a triangle defined by three other points.
Definition bsp.cpp:51
ex00 Fixed Class
Definition Fixed.hpp:28
Fixed getY() const
Gets the y-coordinate of the point.
Definition Point.cpp:81
~Point()
Destructor.
Definition Point.cpp:67
Fixed getX() const
Gets the x-coordinate of the point.
Definition Point.cpp:74
Point()
Default constructor.
Definition Point.cpp:30
Point & operator=(const Point &other)
Copy assignment operator.
Definition Point.cpp:57
Header file for the Fixed class representing fixed-point numbers with overloaded operators and min/ma...