CPP02 1.0
|
Header file for the Point class representing a 2D point with Fixed coordinates. [詳解]
#include "Fixed.hpp"
クラス | |
class | Point |
関数 | |
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. | |
Header file for the Point class representing a 2D point with Fixed coordinates.
This class defines a 2D point with constant x and y coordinates of type Fixed. It includes constructors for default initialization, initialization with float values, and copy construction, as well as a copy assignment operator and a destructor. Accessor methods are provided to retrieve the x and y coordinates. Additionally, it declares the bsp function for checking if a point is inside a triangle.
Point.hpp に定義があります。
Determines if a point is strictly inside a triangle defined by three other points.
The point is inside if it lies on the same side of each of the three lines formed by the triangle's edges. Points on the edges or vertices are considered outside.
a | The first vertex of the triangle. |
b | The second vertex of the triangle. |
c | The third vertex of the triangle. |
point | The point to check if it's inside the triangle. |