You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
603 B

#pragma once
#include "Vector3.h"
class Material;
class LinkedList {
public:
LinkedList* mNext;
LinkedList() {
mNext = nullptr;
}
template<typename T>
T* Next() {
return (T*)mNext;
}
void Append(LinkedList* node) {
if (mNext == nullptr) {
mNext = node;
}
else {
mNext->Append(node);
}
}
};
class Object : public LinkedList{
public:
Geometry *mGeometry;
Material *mMaterial;
Object(Geometry* g, Material* m);
void Set(Geometry* g, Material* m);
bool HitTest(const Ray& input_ray, float min_distance, float max_distance, HitPoint& hit_point);
};