DHART
Loading...
Searching...
No Matches
nanort.h File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <limits>
#include <memory>
#include <queue>
#include <string>
#include <vector>
+ Include dependency graph for nanort.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nanort::StackAllocator< T, stack_capacity >
 
struct  nanort::StackAllocator< T, stack_capacity >::Source
 
struct  nanort::StackAllocator< T, stack_capacity >::rebind< U >
 
class  nanort::StackContainer< TContainerType, stack_capacity >
 
class  nanort::StackVector< T, stack_capacity >
 
class  nanort::real3< T >
 
class  nanort::Ray< T >
 
class  nanort::BVHNode< T >
 
class  nanort::IntersectComparator< H >
 
struct  nanort::BVHBuildOptions< T >
 BVH build option. More...
 
class  nanort::BVHBuildStatistics
 BVH build statistics. More...
 
class  nanort::BVHTraceOptions
 BVH trace option. More...
 
class  nanort::BBox< T >
 Bounding box. More...
 
class  nanort::NodeHit< T >
 Hit class for traversing nodes. More...
 
class  nanort::NodeHitComparator< T >
 Comparator object for NodeHit. More...
 
class  nanort::BVHAccel< T >
 Bounding Volume Hierarchy acceleration. More...
 
class  nanort::TriangleSAHPred< T >
 
class  nanort::TriangleMesh< T >
 
class  nanort::TriangleIntersection< T >
 
class  nanort::TriangleIntersector< T, H >
 
struct  nanort::TriangleIntersector< T, H >::RayCoeff
 
struct  nanort::BinBuffer
 

Namespaces

namespace  nanort
 

Macros

#define NANORT_H_
 
#define kNANORT_MAX_STACK_DEPTH   (512)
 
#define kNANORT_MIN_PRIMITIVES_FOR_PARALLEL_BUILD   (1024 * 8)
 
#define kNANORT_SHALLOW_DEPTH   (4)
 

Enumerations

enum  nanort::RayType {
  nanort::RAY_TYPE_NONE = 0x0 , nanort::RAY_TYPE_PRIMARY = 0x1 , nanort::RAY_TYPE_SECONDARY = 0x2 , nanort::RAY_TYPE_DIFFUSE = 0x4 ,
  nanort::RAY_TYPE_REFLECTION = 0x8 , nanort::RAY_TYPE_REFRACTION = 0x10
}
 

Functions

template<typename T >
real3< T > nanort::operator* (T f, const real3< T > &v)
 
template<typename T >
real3< T > nanort::vneg (const real3< T > &rhs)
 
template<typename T >
nanort::vlength (const real3< T > &rhs)
 
template<typename T >
real3< T > nanort::vnormalize (const real3< T > &rhs)
 
template<typename T >
real3< T > nanort::vcross (const real3< T > a, const real3< T > b)
 
template<typename T >
nanort::vdot (const real3< T > a, const real3< T > b)
 
template<typename T >
real3< T > nanort::vsafe_inverse (const real3< T > v)
 
template<typename real >
const real * nanort::get_vertex_addr (const real *p, const size_t idx, const size_t stride_bytes)
 
template<class T >
const T & nanort::safemin (const T &a, const T &b)
 
template<class T >
const T & nanort::safemax (const T &a, const T &b)
 
template<typename T >
nanort::CalculateSurfaceArea (const real3< T > &min, const real3< T > &max)
 
template<typename T >
void nanort::GetBoundingBoxOfTriangle (real3< T > *bmin, real3< T > *bmax, const T *vertices, const unsigned int *faces, unsigned int index)
 
template<typename T , class P >
void nanort::ContributeBinBuffer (BinBuffer *bins, const real3< T > &scene_min, const real3< T > &scene_max, unsigned int *indices, unsigned int left_idx, unsigned int right_idx, const P &p)
 
template<typename T >
nanort::SAH (size_t ns1, T leftArea, size_t ns2, T rightArea, T invS, T Taabb, T Ttri)
 
template<typename T >
bool nanort::FindCutFromBinBuffer (T *cut_pos, int *minCostAxis, const BinBuffer *bins, const real3< T > &bmin, const real3< T > &bmax, size_t num_primitives, T costTaabb)
 
template<typename T , class P >
void nanort::ComputeBoundingBox (real3< T > *bmin, real3< T > *bmax, const unsigned int *indices, unsigned int left_index, unsigned int right_index, const P &p)
 
template<typename T >
void nanort::GetBoundingBox (real3< T > *bmin, real3< T > *bmax, const std::vector< BBox< T > > &bboxes, unsigned int *indices, unsigned int left_index, unsigned int right_index)
 
template<typename T >
bool nanort::IntersectRayAABB (T *tminOut, T *tmaxOut, T min_t, T max_t, const T bmin[3], const T bmax[3], real3< T > ray_org, real3< T > ray_inv_dir, int ray_dir_sign[3])
 
template<>
bool nanort::IntersectRayAABB< float > (float *tminOut, float *tmaxOut, float min_t, float max_t, const float bmin[3], const float bmax[3], real3< float > ray_org, real3< float > ray_inv_dir, int ray_dir_sign[3])
 
template<>
bool nanort::IntersectRayAABB< double > (double *tminOut, double *tmaxOut, double min_t, double max_t, const double bmin[3], const double bmax[3], real3< double > ray_org, real3< double > ray_inv_dir, int ray_dir_sign[3])
 

Class Documentation

◆ nanort::StackAllocator::rebind

struct nanort::StackAllocator::rebind
template<typename T, size_t stack_capacity>
template<typename U>
struct nanort::StackAllocator< T, stack_capacity >::rebind< U >

Definition at line 174 of file nanort.h.

Class Members
typedef StackAllocator< U, stack_capacity > other

◆ nanort::TriangleIntersection

class nanort::TriangleIntersection
template<typename T = float>
class nanort::TriangleIntersection< T >

Definition at line 972 of file nanort.h.

+ Collaboration diagram for nanort::TriangleIntersection< T >:
Class Members
unsigned int prim_id
T t
T u
T v

◆ nanort::TriangleIntersector::RayCoeff

struct nanort::TriangleIntersector::RayCoeff
template<typename T = float, class H = TriangleIntersection<T>>
struct nanort::TriangleIntersector< T, H >::RayCoeff

Definition at line 995 of file nanort.h.

+ Collaboration diagram for nanort::TriangleIntersector< T, H >::RayCoeff:
Class Members
int kx
int ky
int kz
T Sx
T Sy
T Sz

Macro Definition Documentation

◆ kNANORT_MAX_STACK_DEPTH

#define kNANORT_MAX_STACK_DEPTH   (512)

Definition at line 70 of file nanort.h.

◆ kNANORT_MIN_PRIMITIVES_FOR_PARALLEL_BUILD

#define kNANORT_MIN_PRIMITIVES_FOR_PARALLEL_BUILD   (1024 * 8)

Definition at line 71 of file nanort.h.

◆ kNANORT_SHALLOW_DEPTH

#define kNANORT_SHALLOW_DEPTH   (4)

Definition at line 72 of file nanort.h.

◆ NANORT_H_

#define NANORT_H_

Definition at line 38 of file nanort.h.