5#ifndef PHYZIX_BOUNDARY_H
6#define PHYZIX_BOUNDARY_H
11#include "app/lib/rtti.h"
50 return RuntimeBaseType::BOUNDARY;
68 for(
int i = 0; i < b1.
count; ++i) {
69 for (
int j = i; j < b2.
count; ++j) {
71 if (intersection.intersected)
76 return {
false,
Vector(0,0)};
An abstract class to represent a boundary.
Definition Boundary.h:45
static BoundaryIntersectionResult intersects(Boundaries b1, Boundaries b2)
A static function to check if two boundaries (list) intersect.
Definition Boundary.h:67
float e
Definition Boundary.h:47
virtual BoundaryIntersectionResult intersects(Boundary *other)=0
A pure virtual function to check if the boundary intersects with another boundary.
Base class for runtime type identification.
Definition rtti.h:38
Enum class to identify the base type of a class for runtime type identification.
A struct to hold a list of boundaries.
Definition Boundary.h:21
Boundary ** list
Definition Boundary.h:22
uint16_t count
Definition Boundary.h:23
A struct to hold the result of a possible intersection between two boundaries.
Definition Boundary.h:30
bool intersected
Definition Boundary.h:32
Boundary * it
Definition Boundary.h:36
Boundary * other
Definition Boundary.h:38
Vector normal
Definition Boundary.h:34