A base class of the scene. More...

#include <scene.h>

Inheritance diagram for Scene:
Component SIMDAlignedType

Public Member Functions

 LM_INTERFACE_CLASS (Scene, Component, 10)
 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

Initialize  ,
bool(const PropertyNode *, Assets *, Accel *)   

Initialize the scene.

Initializes the scene from the given property of the scene configuration file.

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.

isectIntersection data.
Return values
trueIntersected with the scene.
falseNot intersected with the scene.
PrimitiveByID  ,
const Primitive const std::string & 

Get a primitive by ID.

idID of a primitive.
PrimitiveAt  ,
const Primitive int index 

Get a primitive by index.

indexIndex of a primitive.