Пример #1
0
        public void Update(Vector3 node)
        {
            if (!initialized)
            {
                topRightCorner = new Vector3BB(node);
                bottomLeftCorner = new Vector3BB(node);
                initialized = true;
            }

            if (node.x > topRightCorner.x)
            {
                topRightCorner.x = node.x;
            }
            if (node.z > topRightCorner.z)
            {
                topRightCorner.z = node.z;
            }
            if (node.x < bottomLeftCorner.x)
            {
                bottomLeftCorner.x = node.x;
            }
            if (node.z < bottomLeftCorner.z)
            {
                bottomLeftCorner.z = node.z;
            }
        }
Пример #2
0
 public BoundingBox(Vector3BB blc, Vector3BB trc)
 {
     bottomLeftCorner = blc;
     topRightCorner = trc;
 }