BEPUphysics.CollisionShapes.TerrainShape.GetPosition C# (CSharp) Method

GetPosition() public method

Gets the world space position of a vertex in the terrain at the given indices.
public GetPosition ( int i, int j, AffineTransform &transform, Vector3 &position ) : void
i int Index in the first dimension.
j int Index in the second dimension.
transform BEPUutilities.AffineTransform Transform to apply to the vertex.
position Vector3 Transformed position of the vertex at the given indices.
return void
        public void GetPosition(int i, int j, ref AffineTransform transform, out Vector3 position)
        {
            if (i <= 0)
                i = 0;
            else if (i >= heights.GetLength(0))
                i = heights.GetLength(0) - 1;
            if (j <= 0)
                j = 0;
            else if (j >= heights.GetLength(1))
                j = heights.GetLength(1) - 1;
#if !WINDOWS
            position = new Vector3();
#endif
            position.X = i;
            position.Y = heights[i, j];
            position.Z = j;
            AffineTransform.Transform(ref position, ref transform, out position);


        }