Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type C ¶
var ( AilaC C = C{ Internal: 1.2, Leaf: 1, Object: 0, } // The internally cached node heuristic may differ from the heuristic as // strictly defined by the MacDonald and Booth paper. We are making the // tree heuristic here independent of the cached heuristic in order to // have comparable tree costs across different node heuristic // strategies. SA = hyperrectangle.SA )
func (C) SAH ¶
SAH returns the surface area heuristic as defined in MacDonald and Booth 1990.
The total heuristic is comprised of three separate components -- the cost of the internal nodes, the cost of the leaves, and the cost of testing for intersections. We use track these via ci, cl, and co respectively.
Per Aila et al., a "normal" SAH value is around 100.
N.B.: SAH assumes the local subtree has up-to-date AABB bounding boxes and heuristic caches.
Click to show internal directories.
Click to hide internal directories.