Lightmetrica
0.0.1.50dbee3 (yosakoi)
|
Public Member Functions | |
LM_COMPONENT_IMPL_DEF ("bvh") | |
virtual bool | Build () override |
virtual bool | IntersectTriangles (Ray &ray, Intersection &isect) const override |
virtual AABB | GetAABBTriangles () const override |
virtual boost::signals2::connection | Connect_ReportBuildProgress (const std::function< void(double, bool)> &func) override |
virtual bool | Configure (const ConfigNode &node) override |
Public Member Functions inherited from Scene | |
LM_COMPONENT_INTERFACE_DEF ("scene") | |
LM_PUBLIC_API void | Load (Primitives *primitives) |
LM_PUBLIC_API bool | PostConfigure () |
LM_PUBLIC_API bool | Intersect (Ray &ray, Intersection &isect) const |
LM_PUBLIC_API const Camera * | MainCamera () const |
LM_PUBLIC_API const Light * | SampleLightSelection (Math::Vec2 &lightSampleP, Math::PDFEval &selectionPdf) const |
LM_PUBLIC_API const Light * | SampleLightSelection (const Math::Float &lightSample, Math::PDFEval &selectionPdf) const |
LM_PUBLIC_API Math::PDFEval | LightSelectionPdf () const |
LM_PUBLIC_API AABB | GetAABB () const |
Public Member Functions inherited from Component | |
virtual std::string | ComponentInterfaceTypeName () const =0 |
virtual std::string | ComponentImplTypeName () const =0 |
Public Member Functions inherited from SIMDAlignedType | |
void * | operator new (std::size_t size) throw (std::bad_alloc) |
void | operator delete (void *p) |
Additional Inherited Members | |
Protected Member Functions inherited from Scene | |
void | StoreIntersectionFromBarycentricCoords (unsigned int primitiveIndex, unsigned int triangleIndex, const Ray &ray, const Math::Vec2 &b, Intersection &isect) const |
Protected Attributes inherited from Scene | |
std::unique_ptr< Primitives > | primitives |
BVH scene. Naive bounding volume hierarchy implementation. Based on pbrt's BVH implementation.
|
overridevirtual |
|
inlineoverridevirtual |
Configure the scene.
node | XML node for the configuration. |
true | Succeeded to configure the scene. |
false | Failed to configure the scene. |
Implements Scene.
|
inlineoverridevirtual |
Connect to ReportBuildProgress signal. The signal is emitted when the progress of asset loading is changed.
func | Slot function. |
Implements Scene.
|
inlineoverridevirtual |
|
overridevirtual |
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.
ray | Ray. |
isect | Intersection data. |
true | Intersected with the scene. |
false | Not intersected with the scene. |
Implements Scene.