Terrain Rasterizer
Conversion of GPS data into 2.5D topographic maps
Loading...
Searching...
No Matches
BoundingBox Struct Reference

Represents a 2D axis-aligned bounding box. More...

#include <quadtree.hpp>

Collaboration diagram for BoundingBox:
Collaboration graph

Public Member Functions

bool contains (double x, double y) const
 Checks if a point is within the bounding box.
 
bool intersects (const BoundingBox &other) const
 Checks if this bounding box intersects with another.
 

Public Attributes

double minX
 
double minY
 
double maxX
 
double maxY
 

Detailed Description

Represents a 2D axis-aligned bounding box.

Member Function Documentation

◆ contains()

bool BoundingBox::contains ( double  x,
double  y 
) const

Checks if a point is within the bounding box.

Parameters
xX coordinate of the point.
yY coordinate of the point.
Returns
true if the point is inside, false otherwise.

◆ intersects()

bool BoundingBox::intersects ( const BoundingBox other) const

Checks if this bounding box intersects with another.

Parameters
otherThe other bounding box.
Returns
true if they intersect, false otherwise.

The documentation for this struct was generated from the following files: