Scene Class Reference
A base class of the scene. More...
#include <scene.h>
Inheritance diagram for Scene:
Public Member Functions | |
LM_INTERFACE_CLASS (Scene, Component, 10) | |
LM_DISABLE_COPY_AND_MOVE (Scene) | |
LM_INTERFACE_F (0, Initialize, bool(const PropertyNode *, Assets *, Accel *)) | |
Initialize the scene. More... | |
LM_INTERFACE_F (1, Intersect, bool(const Ray &ray, Intersection &)) | |
Intersection query. More... | |
LM_INTERFACE_F (2, IntersectWithRange, bool(const Ray &ray, Intersection &isect, Float minT, Float maxT)) | |
LM_INTERFACE_F (3, PrimitiveByID, const Primitive *(const std::string &)) | |
Get a primitive by ID. More... | |
LM_INTERFACE_F (4, NumPrimitives, int()) | |
Get the number of primitives. | |
LM_INTERFACE_F (5, PrimitiveAt, const Primitive *(int index)) | |
Get a primitive by index. More... | |
LM_INTERFACE_F (6, Sensor, const Primitive *()) | |
Get a sensor primitive. | |
LM_INTERFACE_F (7, SampleEmitter, const Primitive *(int type, Float u)) | |
LM_INTERFACE_F (8, EvaluateEmitterPDF, Float(const Primitive *primitive)) | |
LM_INTERFACE_F (9, GetBound, Bound()) | |
Compute the bound of the scene. | |
auto | Visible (const Vec3 &p1, const Vec3 &p2) const -> bool |
Public Member Functions inherited from SIMDAlignedType | |
void * | operator new (std::size_t size) throw (std::bad_alloc) |
void | operator delete (void *p) |
Detailed Description
A base class of the scene.
Member Function Documentation
Scene::LM_INTERFACE_F | ( | 0 | , |
Initialize | , | ||
bool(const PropertyNode *, Assets *, Accel *) | |||
) |
Initialize the scene.
Initializes the scene from the given property of the scene configuration file.
Scene::LM_INTERFACE_F | ( | 1 | , |
Intersect | , | ||
bool(const Ray &ray, Intersection &) | |||
) |
Intersection query.
The function checks if ray
hits with the scene. Returns true
if the ray intersected, otherwise returns false
. The information on the hit point is stored in the intersection data.
- Parameters
-
ray Ray. isect Intersection data.
- Return values
-
true Intersected with the scene. false Not intersected with the scene.
Scene::LM_INTERFACE_F | ( | 3 | , |
PrimitiveByID | , | ||
const Primitive * | const std::string & | ||
) |
Scene::LM_INTERFACE_F | ( | 5 | , |
PrimitiveAt | , | ||
const Primitive * | int index | ||
) |
Get a primitive by index.
- Parameters
-
index Index of a primitive.