Debian Codegraph @

include/itraceable.h

raw
1 #pragma once
2
3 template<typename Element> class BasicVector3;
4 typedef BasicVector3<double> Vector3;
5 class Ray;
6
7 #include <memory>
8
9 /**
10 * An object supporting this interface provides methods
11 * to run traces against its geometry, e.g. calculating
12 * the intersection point of a given Ray.
13 */
14 class ITraceable
15 {
16 public:
17 /**
18 * Calculates the intersection point of the given Ray with the geometry
19 * of this object. Returns false if the Ray doesn't have an intersection
20 * point, otherwise returns true, in which case the coordinates of the
21 * intersection point are stored in the intersection reference.
22 */
23 virtual bool getIntersection(const Ray& ray, Vector3& intersection) = 0;
24 };
25 typedef std::shared_ptr<ITraceable> ITraceablePtr;