TerrainDemo.CDLOD.SelectedNode.GetBoundingBox C# (CSharp) Méthode

GetBoundingBox() public méthode

public GetBoundingBox ( Vector3 &terrainOffset, float patchScale, float heightScale, Microsoft.Xna.Framework.BoundingBox &boundingBox ) : void
terrainOffset Vector3
patchScale float
heightScale float
boundingBox Microsoft.Xna.Framework.BoundingBox
Résultat void
        public void GetBoundingBox(ref Vector3 terrainOffset, float patchScale, float heightScale, out BoundingBox boundingBox)
        {
            boundingBox = new BoundingBox();

            boundingBox.Min.X = X * patchScale + terrainOffset.X;
            boundingBox.Min.Y = MinHeight * heightScale + terrainOffset.Y;
            boundingBox.Min.Z = Y * patchScale + terrainOffset.Z;

            boundingBox.Max.X = (X + Size) * patchScale + terrainOffset.X;
            boundingBox.Max.Y = MaxHeight * heightScale + terrainOffset.Y;
            boundingBox.Max.Z = (Y + Size) * patchScale + terrainOffset.Z;
        }
SelectedNode