Azmyth.Assets.World.LoadVoxel C# (CSharp) Method

LoadVoxel() public method

public LoadVoxel ( int x, int y, int z, TerrainChunk chunk = null ) : TerrainTile
x int
y int
z int
chunk TerrainChunk
return TerrainTile
        public TerrainTile LoadVoxel(int x, int y, int z, TerrainChunk chunk = null)
        {
            TerrainTile tile = null;

            tile = new TerrainTile(chunk);

            tile.X = x;
            tile.Y = y;
            tile.Z = z;

            tile.Height = (float)Math.Round(m_terrain.GetHeight(x, y));
            tile.m_value = (float)m_terrain.GetValue(x, y);

            tile.Bounds = new RectangleF(x, y, 1, 1);

            tile.Terrain = GetTerrainType(x, y);

            tile.m_temp = Math.Abs(Math.Round(m_tempurature.GetHeight(x, y), 0));
            tile.m_tempVal = m_tempurature.GetValue(x, y, z);

            return tile;
        }