Skip to content

Instantly share code, notes, and snippets.

struct ParametricOctreeTraverser {
Octree& octree;
// An Efficient Parametric Algorithm for Octree Traversal
// J. Revelles, C.Ure ̃na, M.Lastra
// http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=F6810427A1DC4136D615FBD178C1669C?doi=10.1.1.29.987&rep=rep1&type=pdf
static constexpr int3 child_offset_lut[8] = {
int3(0,0,0),
int3(1,0,0),
#include "camera.hpp"
#include "../input.hpp"
#include "assert.h"
void Camera_View::calc_frustrum () {
// frustrum_corners set to cam space by perspective_matrix() or orthographic_matrix()
for (int i=0; i<8; ++i)
frustrum.corners[i] = cam_to_world * frustrum.corners[i];