public GetPosition ( int i, int j, |
||
i | int | Index in the first dimension. |
j | int | Index in the second dimension. |
transform | Transform to apply to the vertex. | |
position | Vector3 | Transformed position of the vertex at the given indices. |
리턴 | 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);
}