Accel Class Reference
An interface for the acceleration structure. More...
#include <accel.h>
Inheritance diagram for Accel:
Public Member Functions | |
LM_INTERFACE_CLASS (Accel, Configurable, 2) | |
LM_DISABLE_COPY_AND_MOVE (Accel) | |
LM_INTERFACE_F (0, Build, bool(const Scene *scene)) | |
Build the acceleration structure. More... | |
LM_INTERFACE_F (1, Intersect, bool(const Scene *scene, const Ray &ray, Intersection &isect, Float minT, Float maxT)) | |
Intersection query with triangles. More... | |
Public Member Functions inherited from Configurable | |
LM_INTERFACE_CLASS (Configurable, Component, 1) | |
LM_DISABLE_COPY_AND_MOVE (Configurable) | |
LM_INTERFACE_F (0, Initialize, bool(const PropertyNode *prop)) | |
Initialize the configurable component. More... | |
Public Member Functions inherited from SIMDAlignedType | |
void * | operator new (std::size_t size) throw (std::bad_alloc) |
void | operator delete (void *p) |
Detailed Description
An interface for the acceleration structure.
Member Function Documentation
Accel::LM_INTERFACE_F | ( | 0 | , |
Build | , | ||
bool(const Scene *scene) | |||
) |
Build the acceleration structure.
Some scene may have an acceleration structure for the optimization. The function is automatically called by the Asset::Load function.
- Parameters
-
scene Loaded scene.
- Return values
-
true Succeeded to build. false Failed to build.
Accel::LM_INTERFACE_F | ( | 1 | , |
Intersect | , | ||
bool(const Scene *scene, const Ray &ray, Intersection &isect, Float minT, Float maxT) | |||
) |
Intersection query with triangles.
The function checks if ray
hits with the scene. This function is supposed to be accelerated by spatial acceleration structure. When intersected, information on the hit point is stored in the intersection data. The intersection is valid only with the range of the distance between minT
and maxT
.
- Parameters
-
scene Scene. ray Ray. isect Intersection data. minT Minimum range of the distance. minT Maximum range of the distance.
- Return values
-
true Intersected with the scene. false Not intersected with the scene.