public static void TransformAABBTree(AABBTree tree, Matrix transform) { TransformAABBNode(tree.Root, transform); }
public static void Render(AABBTree tree, Matrix world, Matrix view, Matrix proj, RenderContext render_context, Color color) { RenderNode(tree.Root, world, view, proj, render_context, color); }
public static float LongestLeafCornerLength(AABBTree tree) { List<AABBNode> leafs = new List<AABBNode>(); AABBHelper.Leafs(tree.Root, leafs); if (leafs.Count == 0) { //>) return -1f; } float longest_length = 0f; for (int i = 0; i < leafs.Count; i++) { BoundingBox box = leafs[i].BBox; Vector3[] corners = box.GetCorners(); for (int j = 0; j < corners.Length; j++) { Vector3 to_corner = corners[j]; float length = to_corner.Length(); if (length > longest_length) { longest_length = length; } } } return longest_length; }