// TODO: move bounds data to parent node and remove it from leafs?
float mins[3];
float maxs[3];
- // node indexes of children (always > this node's index)
- int front;
- int back;
- // interval of children
- float frontmin; // children[0]
- float backmax; // children[1]
- // BIH_UNORDERED uses this for a list of leafindex (all >= 0), -1 = end of list
- int children[BIH_MAXUNORDEREDCHILDREN];
+ union {
+ struct{
+ // node indexes of children (always > this node's index)
+ int front;
+ int back;
+ // interval of children
+ float frontmin; // children[0]
+ float backmax; // children[1]
+ };
+ // BIH_UNORDERED uses this for a list of leafindex (all >= 0), -1 = end of list
+ int children[BIH_MAXUNORDEREDCHILDREN];
+ };
}
bih_node_t;