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

Detailed description

This class provides utilities to view a VTL-mesh, i.e. a collection of mesh-based VTLs. Particularly, it provides methods to sample a given VTL, and methods to locate/map a VTL from a given mesh point.

#include <vtl_mesh_view.h>

Public Methods

FERMAT_HOST_DEVICE VTLMeshView (const uint32 _n_vtls, const VTL *_vtls, const UVBvhView &_uvbvh, const MeshView &_mesh, const MipMapView *_textures)
 
FERMAT_HOST_DEVICE void sample (const uint32 vtl_idx, const cugar::Vector2f vtl_uv, uint32_t *prim_id, cugar::Vector2f *uv, VertexGeometry *geom, float *pdf, Edf *edf) const
 
FERMAT_HOST_DEVICE uint32 map (const uint32_t prim_id, const cugar::Vector2f &uv, const VertexGeometry &geom, float *pdf, Edf *edf) const
 
FERMAT_HOST_DEVICE uint32 vtl_count () const
 
FERMAT_HOST_DEVICE VTL get_vtl (const uint32 i) const
 

Public Members

uint32 n_vtls
 
const VTLvtls
 
UVBvhView uvbvh
 
MeshView mesh
 
const MipMapViewtextures
 

Member Function Documentation

◆ map()

FERMAT_HOST_DEVICE uint32 VTLMeshView::map ( const uint32_t  prim_id,
const cugar::Vector2f uv,
const VertexGeometry geom,
float *  pdf,
Edf edf 
) const
inline

map a (prim,uv) pair and its surface element to the corresponding VTL/EDF/pdf NOTE: the returned pdf here is only relative to the VTL, i.e. it doesn't account for the probability of sampling that VTL, since the sampling policy is not controlled by this class and intentionally left outside of it.

◆ sample()

FERMAT_HOST_DEVICE void VTLMeshView::sample ( const uint32  vtl_idx,
const cugar::Vector2f  vtl_uv,
uint32_t *  prim_id,
cugar::Vector2f uv,
VertexGeometry geom,
float *  pdf,
Edf edf 
) const
inline

sample a point on a given VTL


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