Primitive. More...

#include <primitive.h>

Inheritance diagram for Primitive:
SIMDAlignedType

Public Member Functions

auto Type () const -> int
 Surface interaction type.
 
auto SampleDirection (const Vec2 &u, Float uComp, int queryType, const SurfaceGeometry &geom, const Vec3 &wi, Vec3 &wo) const -> void
 Sample outgoing vector.
 
auto EvaluateDirectionPDF (const SurfaceGeometry &geom, int queryType, const Vec3 &wi, const Vec3 &wo, bool evalDelta) const -> Float
 Evaluate PDF with the direction.
 
auto EvaluateDirection (const SurfaceGeometry &geom, int types, const Vec3 &wi, const Vec3 &wo, TransportDirection transDir, bool evalDelta) const -> SPD
 Evaluate generalized BSDF.
 
auto SamplePosition (const Vec2 &u, SurfaceGeometry &geom) const -> void
 Sample a position on the light.
 
auto EvaluatePositionPDF (const SurfaceGeometry &geom, bool evalDelta) const -> Float
 Evaluate positional PDF.
 
auto EvaluatePosition (const SurfaceGeometry &geom, bool evalDelta) const -> SPD
 Evaluate the positional component of the emitted quantity.
 
- Public Member Functions inherited from SIMDAlignedType
void * operator new (std::size_t size) throw (std::bad_alloc)
 
void operator delete (void *p)
 

Public Attributes

const char * id = nullptr
 
Mat4 transform
 
Mat3 normalTransform
 
const TriangleMeshmesh = nullptr
 
const Emitteremitter = nullptr
 
const BSDFbsdf = nullptr
 

Detailed Description

Primitive.

Primitive is an element of the scene used for managing transformable objects. A primitive corresponds to a node in the scene.

TODO: Redesign sampling related functions.