![]() |
Terrain Rasterizer
Conversion of GPS data into 2.5D topographic maps
|
Implementation of the QuadTree for spatial indexing. More...
#include "quadtree.hpp"#include <algorithm>#include <iostream>
Functions | |
| BoundingBox | getTriangleBounds (const Triangle &t, const std::vector< Point > &points) |
| Computes the bounding box of a single triangle. | |
| bool | isPointInTriangle (double px, double py, const Point &p1, const Point &p2, const Point &p3) |
| Checks if a 2D point lies inside a 2D triangle using barycentric coordinates. | |
Implementation of the QuadTree for spatial indexing.
| BoundingBox getTriangleBounds | ( | const Triangle & | t, |
| const std::vector< Point > & | points | ||
| ) |
Computes the bounding box of a single triangle.
| t | The triangle. |
| points | The list of vertex points. |
| bool isPointInTriangle | ( | double | px, |
| double | py, | ||
| const Point & | p1, | ||
| const Point & | p2, | ||
| const Point & | p3 | ||
| ) |
Checks if a 2D point lies inside a 2D triangle using barycentric coordinates.
| px | X coordinate of the point. |
| py | Y coordinate of the point. |
| p1 | First vertex of the triangle. |
| p2 | Second vertex of the triangle. |
| p3 | Third vertex of the triangle. |