Arty
Public Types | Public Member Functions | Public Attributes | List of all members
Scene Struct Reference

Public Types

template<typename T >
using unique_vector = std::vector< std::unique_ptr< T > >
 

Public Member Functions

Hit intersect (const Ray &ray) const
 
bool occluded (const Ray &ray) const
 Returns true if the given ray hits the scene.
 
const Materialmaterial (const Hit &hit) const
 Returns the material associated with a hit point.
 
SurfaceParams surface_params (const Ray &ray, const Hit &hit) const
 Returns the surface parameters for a hit point.
 

Public Attributes

std::unique_ptr< Cameracamera
 
size_t width
 
size_t height
 
unique_vector< Bsdfbsdfs
 
unique_vector< Lightlights
 
unique_vector< Texturetextures
 
std::vector< Materialmaterials
 
Bvh bvh
 
std::vector< float3vertices
 
std::vector< float2texcoords
 
std::vector< float3normals
 
std::vector< uint32_t > indices
 
std::vector< float3face_normals
 

Member Function Documentation

◆ intersect()

Hit Scene::intersect ( const Ray ray) const
inline

Returns the intersection point between a ray and the scene. If not intersection is found, hit.tri == -1.


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