Fix Intersect and add sort the list each time we add something to it.
This commit is contained in:
@@ -15,14 +15,15 @@
|
||||
class Intersect
|
||||
{
|
||||
private:
|
||||
Intersection *list;
|
||||
Intersection **list;
|
||||
uint32_t num;
|
||||
uint32_t allocated;
|
||||
public:
|
||||
Intersect();
|
||||
~Intersect();
|
||||
void add(Intersection i);
|
||||
int count() { return this->num; };
|
||||
Intersection operator[](const int p) { return this->list[p]; }
|
||||
Intersection operator[](const int p) { return *this->list[p]; }
|
||||
Intersection hit();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user