Tramway SDK
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tram::AABBTree Class Reference

#include <aabb.h>

Classes

struct  Node
 

Public Member Functions

 AABBTree ()
 
 ~AABBTree ()
 
vec3 GetAABBMin ()
 
vec3 GetAABBMax ()
 
NodeInsertLeaf (uint32_t value, vec3 min, vec3 max)
 
void RemoveLeaf (Node *node)
 
void RemoveHierarchy (Node *node)
 
void FindIntersection (vec3 ray_pos, vec3 ray_dir, Node *node, std::vector< uint32_t > &result)
 
void UpdateParentAABB (Node *node)
 
NodeFindSibling (vec3 min, vec3 max, Node *node)
 
void ValidateTree (Node *node)
 
void ValidateTree (Node *node, size_t num)
 

Static Public Member Functions

static vec3 MergeAABBMin (vec3 a, vec3 b)
 
static vec3 MergeAABBMax (vec3 a, vec3 b)
 
static float AABBVolume (vec3 min, vec3 max)
 
static float AABBSurface (vec3 min, vec3 max)
 
static bool AABBIntersect (vec3 ray_pos, vec3 ray_dir, vec3 min, vec3 max)
 

Public Attributes

Noderoot = new Node {nullptr, nullptr, nullptr, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}}
 

Constructor & Destructor Documentation

◆ AABBTree()

tram::AABBTree::AABBTree ( )
inline

◆ ~AABBTree()

tram::AABBTree::~AABBTree ( )
inline

Member Function Documentation

◆ AABBIntersect()

static bool tram::AABBTree::AABBIntersect ( vec3  ray_pos,
vec3  ray_dir,
vec3  min,
vec3  max 
)
inlinestatic

◆ AABBSurface()

static float tram::AABBTree::AABBSurface ( vec3  min,
vec3  max 
)
inlinestatic

◆ AABBVolume()

static float tram::AABBTree::AABBVolume ( vec3  min,
vec3  max 
)
inlinestatic

◆ FindIntersection()

void tram::AABBTree::FindIntersection ( vec3  ray_pos,
vec3  ray_dir,
Node node,
std::vector< uint32_t > &  result 
)
inline

◆ FindSibling()

Node * tram::AABBTree::FindSibling ( vec3  min,
vec3  max,
Node node 
)
inline

◆ GetAABBMax()

vec3 tram::AABBTree::GetAABBMax ( )
inline

◆ GetAABBMin()

vec3 tram::AABBTree::GetAABBMin ( )
inline

◆ InsertLeaf()

Node * tram::AABBTree::InsertLeaf ( uint32_t  value,
vec3  min,
vec3  max 
)
inline

◆ MergeAABBMax()

static vec3 tram::AABBTree::MergeAABBMax ( vec3  a,
vec3  b 
)
inlinestatic

◆ MergeAABBMin()

static vec3 tram::AABBTree::MergeAABBMin ( vec3  a,
vec3  b 
)
inlinestatic

◆ RemoveHierarchy()

void tram::AABBTree::RemoveHierarchy ( Node node)
inline

◆ RemoveLeaf()

void tram::AABBTree::RemoveLeaf ( Node node)
inline

◆ UpdateParentAABB()

void tram::AABBTree::UpdateParentAABB ( Node node)
inline

◆ ValidateTree() [1/2]

void tram::AABBTree::ValidateTree ( Node node)
inline

◆ ValidateTree() [2/2]

void tram::AABBTree::ValidateTree ( Node node,
size_t  num 
)
inline

Member Data Documentation

◆ root

Node* tram::AABBTree::root = new Node {nullptr, nullptr, nullptr, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}}

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