Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::TriAccel Struct Reference

Pre-computed triangle representation based on Ingo Wald's TriAccel layout. More...

#include <mitsuba/render/triaccel.h>

Public Member Functions

int load (const Point &A, const Point &B, const Point &C)
 Construct from vertex data. Returns '1' if there was a failure. More...
 
FINLINE bool rayIntersect (const Ray &ray, Float mint, Float maxt, Float &u, Float &v, Float &t) const
 Fast ray-triangle intersection test. More...
 

Public Attributes

uint32_t k
 
Float n_u
 
Float n_v
 
Float n_d
 
Float a_u
 
Float a_v
 
Float b_nu
 
Float b_nv
 
Float c_nu
 
Float c_nv
 
uint32_t shapeIndex
 
uint32_t primIndex
 

Detailed Description

Pre-computed triangle representation based on Ingo Wald's TriAccel layout.

Fits into three 16-byte cache lines if single precision floats are used. The k parameter is also used for classification during kd-tree construction.

Member Function Documentation

int mitsuba::TriAccel::load ( const Point A,
const Point B,
const Point C 
)
inline

Construct from vertex data. Returns '1' if there was a failure.

FINLINE bool mitsuba::TriAccel::rayIntersect ( const Ray ray,
Float  mint,
Float  maxt,
Float u,
Float v,
Float t 
) const

Fast ray-triangle intersection test.

Member Data Documentation

Float mitsuba::TriAccel::a_u
Float mitsuba::TriAccel::a_v
Float mitsuba::TriAccel::b_nu
Float mitsuba::TriAccel::b_nv
Float mitsuba::TriAccel::c_nu
Float mitsuba::TriAccel::c_nv
uint32_t mitsuba::TriAccel::k
Float mitsuba::TriAccel::n_d
Float mitsuba::TriAccel::n_u
Float mitsuba::TriAccel::n_v
uint32_t mitsuba::TriAccel::primIndex
uint32_t mitsuba::TriAccel::shapeIndex

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