Lightmetrica
0.0.1.50dbee3 (yosakoi)
|
Public Member Functions | |
LM_COMPONENT_IMPL_DEF ("thinlens") | |
virtual bool | Load (const ConfigNode &node, const Assets &assets) |
virtual bool | SampleDirection (const GeneralizedBSDFSampleQuery &query, const SurfaceGeometry &geom, GeneralizedBSDFSampleResult &result) const |
virtual Math::Vec3 | SampleAndEstimateDirection (const GeneralizedBSDFSampleQuery &query, const SurfaceGeometry &geom, GeneralizedBSDFSampleResult &result) const |
virtual bool | SampleAndEstimateDirectionBidir (const GeneralizedBSDFSampleQuery &query, const SurfaceGeometry &geom, GeneralizedBSDFSampleBidirResult &result) const |
virtual Math::Vec3 | EvaluateDirection (const GeneralizedBSDFEvaluateQuery &query, const SurfaceGeometry &geom) const |
virtual Math::PDFEval | EvaluateDirectionPDF (const GeneralizedBSDFEvaluateQuery &query, const SurfaceGeometry &geom) const |
virtual bool | Degenerated () const |
virtual int | BSDFTypes () const |
virtual void | SamplePosition (const Math::Vec2 &sample, SurfaceGeometry &geom, Math::PDFEval &pdf) const |
virtual Math::Vec3 | EvaluatePosition (const SurfaceGeometry &geom) const |
virtual Math::PDFEval | EvaluatePositionPDF (const SurfaceGeometry &geom) const |
virtual void | RegisterPrimitives (const std::vector< Primitive * > &primitives) |
virtual bool | RayToRasterPosition (const Math::Vec3 &p, const Math::Vec3 &d, Math::Vec2 &rasterPos) const |
virtual Film * | GetFilm () const |
Public Member Functions inherited from Camera | |
LM_ASSET_INTERFACE_DEF ("camera","cameras") | |
LM_ASSET_DEPENDENCIES ("film") | |
Public Member Functions inherited from Emitter | |
virtual void | PostConfigure (const Scene &scene)=0 |
virtual EmitterShape * | CreateEmitterShape () const =0 |
virtual AABB | GetAABB () const =0 |
Public Member Functions inherited from Asset | |
LM_PUBLIC_API std::string | ID () const |
LM_HIDDEN_API void | SetID (const std::string &id) |
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) |
Thin-lens camera. A camera with depth of field support.
|
inlinevirtual |
Check if generalized BSDF is directionally degenerated. e.g. specular BSDFs or directional light
true | The BSDF is directionally degenerated. |
false | The BSDF is not directionally degenerated. |
Get generalized BSDF type. If the generalized BSDF has multiple types, e.g. SpecularReflection and SpecularReflection, a bitmask of these types are returned.
Implements GeneralizedBSDF.
|
virtual |
Evaluate generalized BSDF.
query | Query structure. |
geom | Surface geometry. |
Implements GeneralizedBSDF.
|
virtual |
Evaluate directional PDF.
query | Query structure. |
geom | Surface geometry. |
Implements GeneralizedBSDF.
|
virtual |
Evaluate the positional component of the emitted quantity.
geom | Surface geometry. |
Implements Emitter.
|
virtual |
|
inlinevirtual |
|
virtual |
Load an asset. Configure and initialize the asset by the XML elements given by #node. Some assets have references to the other assets, so #assets is also required. Dependent asset must be loaded beforehand.
node | XML node for the configuration. |
assets | Asset manager. |
true | Succeeded to load. |
false | Failed to load. |
Implements Asset.
|
virtual |
Convert a ray to a raster position. The function calculates the raster position from the outgoing ray. Returns false if calculated raster position is the outside of [0, 1]^2.
p | Position on the camera. |
d | Outgoing direction from #p. |
rasterPos | Raster position. |
Implements Camera.
|
virtual |
Register an reference to the primitive. Some implementation of camera needs transformed mesh information for sampling. The function registers the reference to the primitive. The function is internally called.
primitives | An list instances of the primitive. |
Implements Emitter.
|
virtual |
Sample and estimate direction. Computes f_s / p_{^}.
query | Query structure. |
geom | Surface geometry. |
result | Sampled result. |
Implements GeneralizedBSDF.
|
inlinevirtual |
Sample and estimate direction bidirectionally. In addition to SampleAndEstimateDirection, this function calculates values in the opposite direction. This function is introduced in order to avoid nasty precision problem with specular BSDFs.
query | Query structure. |
geom | Surface geometry. |
weights | Estimate. |
results | Sampled results. |
true | Succeeded to sample. |
false | Failed to sample. |
Implements GeneralizedBSDF.
|
virtual |
Sample outgoing vector. Given the input direction originated from the point on the surface #wi, the function samples outgoing vector #wo from the suited distribution in the solid angle measure.
query | Query structure. |
geom | Surface geometry. |
result | Sampled result. |
true | Succeeded to sample #wo. |
false | Failed to sample #wo. |
Implements GeneralizedBSDF.
|
virtual |
Sample a position on the light.
sample | Position sample. |
geom | Surface geometry at sampled position #geom.p. |
Evaluated PDF (area measure). |
Implements Emitter.