You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
678 B
Plaintext
36 lines
678 B
Plaintext
2 weeks ago
|
/******************************************************************************/
|
||
|
/*
|
||
|
Project - MudBun
|
||
|
Publisher - Long Bunny Labs
|
||
|
http://LongBunnyLabs.com
|
||
|
Author - Ming-Lun "Allen" Chou
|
||
|
http://AllenChou.net
|
||
|
*/
|
||
|
/******************************************************************************/
|
||
|
|
||
|
#ifndef MUDBUN_AABB_TREE_DEFS
|
||
|
#define MUDBUN_AABB_TREE_DEFS
|
||
|
|
||
|
#define kAabbTreeNodeStackSize (16) // max possible tree height allowed
|
||
|
|
||
|
struct Aabb
|
||
|
{
|
||
|
float3 boundsMin;
|
||
|
float3 boundsMax;
|
||
|
};
|
||
|
|
||
|
struct AabbNode
|
||
|
{
|
||
|
Aabb aabb;
|
||
|
int iParent;
|
||
|
int iChildA;
|
||
|
int iChildB;
|
||
|
int iData;
|
||
|
};
|
||
|
|
||
|
StructuredBuffer<AabbNode> aabbTree;
|
||
|
int aabbRoot;
|
||
|
|
||
|
#endif
|
||
|
|