Phyzix
Loading...
Searching...
No Matches
LineSegmentBoundary.h
1//
2// Created by shams on 8/8/24.
3//
4
5#ifndef PHYZIX_LINESEGMENTBOUNDARY_H
6#define PHYZIX_LINESEGMENTBOUNDARY_H
7
8
9#include "Boundary.h"
10
12public:
13 float x1;
14 float y1;
15 float x2;
16 float y2;
17
18 RuntimeBaseType getBaseType() const override {
19 return RuntimeBaseType::LINE_SEGMENT_BOUNDARY;
20 }
21
22 LineSegmentBoundary(float x1, float y1, float x2, float y2): x1(x1), y1(y1), x2(x2), y2(y2) {}
23
25};
26
27
28#endif //PHYZIX_LINESEGMENTBOUNDARY_H
An abstract class to represent a boundary.
Definition Boundary.h:45
Definition LineSegmentBoundary.h:11
BoundaryIntersectionResult intersects(Boundary *o) override
A pure virtual function to check if the boundary intersects with another boundary.
Definition LineSegmentBoundary.cpp:10
Enum class to identify the base type of a class for runtime type identification.
A struct to hold the result of a possible intersection between two boundaries.
Definition Boundary.h:30