Fermat
Public Methods | Public Members | List of all members
Light Struct Reference

Detailed description

Base light interface.

This class implements "software" inheritance by dispatching its methods to implementations provided by its derived classes. This is useful to allow this class to avoid virtual method calls, and hence allow it to work both on the host and the device. Note that since the methods are manually dispatched, all calls can be inlined.

#include <lights.h>

Inheritance diagram for Light:
DirectionalLight DiskLight MeshLight

Public Methods

FERMAT_HOST_DEVICE Light (LightType _type)
 
FERMAT_HOST_DEVICE bool sample (const float *Z, uint32_t *prim_id, cugar::Vector2f *uv, VertexGeometry *geom, float *pdf, Edf *edf) const
 
FERMAT_HOST_DEVICE bool sample (const cugar::Vector3f p, const float *Z, uint32_t *prim_id, cugar::Vector2f *uv, VertexGeometry *geom, float *pdf, Edf *edf) const
 
FERMAT_HOST_DEVICE void intersect (const Ray ray, float2 *uv, float *t) const
 
FERMAT_HOST_DEVICE void map (const uint32_t prim_id, const cugar::Vector2f &uv, VertexGeometry *geom, float *pdf, Edf *edf) const
 
FERMAT_HOST_DEVICE void map (const uint32_t prim_id, const cugar::Vector2f &uv, const VertexGeometry &geom, float *pdf, Edf *edf) const
 

Public Members

LightType type
 

The documentation for this struct was generated from the following file: