53 virtual bool build() {
return false; }
decimal keepAllBeforeTriangle(std::list< Intersection > ¤tIntersections, decimal currentTmin)
Keep all intersections encountered before intersecting a visible shape and before reaching currentTmi...
Accelerator()
Constructors.
virtual ~Accelerator()
Destructor.
BBox globalBox
Global bounding box.
decimal keepFirst(std::list< Intersection > ¤tIntersections, decimal currentTmin)
Keep only the first intersection encountered before reaching currentTmin and return its corresponding...
virtual decimal traverse(Ray *r, std::list< Intersection > &result) const
Run this accelerator.
Accelerator(std::vector< Shape *> *_shapes, BBox &_globalBox)
decimal keepAllBeforeVisible(std::list< Intersection > ¤tIntersections, decimal currentTmin)
Keep all intersections encountered before intersecting a triangle and before reaching currentTmin...
void defineLeafFunction()
To define leaf function.
std::vector< Shape * > * shapes
Vector of pointers to shapes.
Accelerator(const Accelerator &other)
Copy constructor.
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
virtual bool build()
Build this accelerator.
leafTreatment::treatment intersectionChoice
Intersection choice.
Definition of a bounding box which is aligned along the axis (BBox AABB).
leafTreatment::treatment getIntersectionChoice()
Get/Set the Intersection choice.
decimal(* pLeafTreatmentFunction)(std::list< Intersection > &, decimal)
Pointer to the treatment function of leaf.
Base class for accelerators.
decimal keepAll(std::list< Intersection > ¤tIntersections, decimal currentTmin)
Keep all intersections before reaching currentTmin and return the tmin of the first one encountered...
void setIntersectionChoice(leafTreatment::treatment _intersectionChoice=leafTreatment::FIRST)