CPP02 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Point.hpp ファイル

Header file for the Point class representing a 2D point with Fixed coordinates. [詳解]

#include "Fixed.hpp"
Point.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 に定義があります。

関数詳解

◆ bsp()

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.

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.

引数
aThe first vertex of the triangle.
bThe second vertex of the triangle.
cThe third vertex of the triangle.
pointThe point to check if it's inside the triangle.
戻り値
True if the point is strictly inside the triangle, false otherwise.

bsp.cpp51 行目に定義があります。