MCPcopy Create free account
hub / github.com/demoth/jake2 / HeadnodeForBox

Method HeadnodeForBox

qcommon/src/main/java/jake2/qcommon/CM.java:892–907  ·  view source on GitHub ↗

To keep everything totally uniform, bounding boxes are turned into small BSP trees instead of being compared directly.

(float[] mins, float[] maxs)

Source from the content-addressed store, hash-verified

890 /** To keep everything totally uniform, bounding boxes are turned into small
891 * BSP trees instead of being compared directly. */
892 public int HeadnodeForBox(float[] mins, float[] maxs) {
893 box_planes[0].dist = maxs[0];
894 box_planes[1].dist = -maxs[0];
895 box_planes[2].dist = mins[0];
896 box_planes[3].dist = -mins[0];
897 box_planes[4].dist = maxs[1];
898 box_planes[5].dist = -maxs[1];
899 box_planes[6].dist = mins[1];
900 box_planes[7].dist = -mins[1];
901 box_planes[8].dist = maxs[2];
902 box_planes[9].dist = -maxs[2];
903 box_planes[10].dist = mins[2];
904 box_planes[11].dist = -mins[2];
905
906 return box_headnode;
907 }
908
909 /** Recursively searches the leaf number that contains the 3d point. */
910 private int CM_PointLeafnum_r(float[] p, int num) {

Callers 2

ClipMoveToEntitiesMethod · 0.80
SV_HullForEntityMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected