Axiom.SceneManagers.Octree.TerrainRenderable.GetNormalAt C# (CSharp) Метод

GetNormalAt() публичный Метод

public GetNormalAt ( float x, float z, Vector3 &result ) : void
x float
z float
result Vector3
Результат void
		public void GetNormalAt( float x, float z, out Vector3 result )
		{
			Vector3 here, left, down;
			here.x = x;
			here.y = GetHeightAt( x, z );
			here.z = z;

			left.x = x - 1;
			left.y = GetHeightAt( x - 1, z );
			left.z = z;

			down.x = x;
			down.y = GetHeightAt( x, z + 1 );
			down.z = z + 1;

			left = left - here;

			down = down - here;

			left.Normalize();
			down.Normalize();

			result = left.Cross( down );
			result.Normalize();
		}