Lightmetrica
0.0.1.50dbee3 (yosakoi)
|
Public Member Functions | |
LM_COMPONENT_IMPL_DEF ("perspective") | |
virtual bool | Load (const ConfigNode &node, const Assets &assets) override |
virtual bool | SampleDirection (const GeneralizedBSDFSampleQuery &query, const SurfaceGeometry &geom, GeneralizedBSDFSampleResult &result) const override |
virtual Math::Vec3 | SampleAndEstimateDirection (const GeneralizedBSDFSampleQuery &query, const SurfaceGeometry &geom, GeneralizedBSDFSampleResult &result) const override |
virtual bool | SampleAndEstimateDirectionBidir (const GeneralizedBSDFSampleQuery &query, const SurfaceGeometry &geom, GeneralizedBSDFSampleBidirResult &result) const override |
virtual Math::Vec3 | EvaluateDirection (const GeneralizedBSDFEvaluateQuery &query, const SurfaceGeometry &geom) const override |
virtual Math::PDFEval | EvaluateDirectionPDF (const GeneralizedBSDFEvaluateQuery &query, const SurfaceGeometry &geom) const override |
virtual int | BSDFTypes () const override |
virtual void | SamplePosition (const Math::Vec2 &sample, SurfaceGeometry &geom, Math::PDFEval &pdf) const override |
virtual Math::Vec3 | EvaluatePosition (const SurfaceGeometry &geom) const override |
virtual Math::PDFEval | EvaluatePositionPDF (const SurfaceGeometry &geom) const override |
virtual void | RegisterPrimitives (const std::vector< Primitive * > &primitives) override |
virtual void | PostConfigure (const Scene &scene) override |
virtual EmitterShape * | CreateEmitterShape () const override |
virtual AABB | GetAABB () const override |
virtual bool | RayToRasterPosition (const Math::Vec3 &p, const Math::Vec3 &d, Math::Vec2 &rasterPos) const override |
virtual Film * | GetFilm () const override |
Public Member Functions inherited from Camera | |
LM_ASSET_INTERFACE_DEF ("camera","cameras") | |
LM_ASSET_DEPENDENCIES ("film") | |
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) |
Perspective camera. A camera with perspective projection. a.k.a. pinhole camera.
|
inlineoverridevirtual |
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.
|
inlineoverridevirtual |
Get associated emitter shapes. Some emitter is associated with intersectable shapes (e.g., sphere for environment lights) in order to integrate emitters with BPT based rendering techniques. Ownership of the created instance is delegated to the caller.
Implements Emitter.
|
overridevirtual |
Evaluate generalized BSDF.
query | Query structure. |
geom | Surface geometry. |
Implements GeneralizedBSDF.
|
overridevirtual |
Evaluate directional PDF.
query | Query structure. |
geom | Surface geometry. |
Implements GeneralizedBSDF.
|
overridevirtual |
Evaluate the positional component of the emitted quantity.
geom | Surface geometry. |
Implements Emitter.
|
overridevirtual |
|
inlineoverridevirtual |
|
overridevirtual |
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.
|
inlineoverridevirtual |
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
Sample and estimate direction. Computes f_s / p_{^}.
query | Query structure. |
geom | Surface geometry. |
result | Sampled result. |
Implements GeneralizedBSDF.
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
Sample a position on the light.
sample | Position sample. |
geom | Surface geometry at sampled position #geom.p. |
Evaluated PDF (area measure). |
Implements Emitter.