idTech4.Collision.idCollisionModelManager.GetNodeBounds_R C# (CSharp) Method

GetNodeBounds_R() private method

private GetNodeBounds_R ( idBounds &bounds, CollisionModelNode node ) : void
bounds idBounds
node CollisionModelNode
return void
		private void GetNodeBounds_R(ref idBounds bounds, CollisionModelNode node)
		{
			while(true)
			{
				foreach(CollisionModelPolygon poly in node.Polygons)
				{
					bounds.AddPoint(poly.Bounds.Min);
					bounds.AddPoint(poly.Bounds.Max);
				}

				foreach(CollisionModelBrush brush in node.Brushes)
				{
					bounds.AddPoint(brush.Bounds.Min);
					bounds.AddPoint(brush.Bounds.Max);
				}

				if(node.PlaneType == -1)
				{
					break;
				}

				GetNodeBounds_R(ref bounds, node.Children[1]);
				node = node.Children[0];
			}
		}