GetBoundingBox() public method

Gets the bounding box of an element in the data.
public GetBoundingBox ( int triangleIndex, Microsoft.Xna.Framework.BoundingBox &boundingBox ) : void
triangleIndex int Index of the triangle in the data.
boundingBox Microsoft.Xna.Framework.BoundingBox Bounding box of the triangle.
return void
コード例 #1
0
 internal override void Refit(MeshBoundingBoxTreeData data)
 {
     data.GetBoundingBox(LeafIndex, out BoundingBox);
     //Having an ever-so-slight margin allows the hierarchy use a volume metric even for degenerate shapes (consider a flat tessellated plane).
     BoundingBox.Max.X += LeafMargin;
     BoundingBox.Max.Y += LeafMargin;
     BoundingBox.Max.Z += LeafMargin;
     BoundingBox.Min.X -= LeafMargin;
     BoundingBox.Min.Y -= LeafMargin;
     BoundingBox.Min.Z -= LeafMargin;
 }
コード例 #2
0
 internal override void Refit(MeshBoundingBoxTreeData data)
 {
     data.GetBoundingBox(LeafIndex, out BoundingBox);
     //Having an ever-so-slight margin allows the hierarchy use a volume metric even for degenerate shapes (consider a flat tessellated plane).
     BoundingBox.Max.X += LeafMargin;
     BoundingBox.Max.Y += LeafMargin;
     BoundingBox.Max.Z += LeafMargin;
     BoundingBox.Min.X -= LeafMargin;
     BoundingBox.Min.Y -= LeafMargin;
     BoundingBox.Min.Z -= LeafMargin;
 }