ravens/utils.py
def pixel_to_position(pixel, height, bounds, pixel_size, skip_height=False):
    """Convert from pixel location on heightmap to 3D position."""
    u, v = pixel
    x = bounds[0, 0] + v * pixel_size
    y = bounds[1, 0] + u * pixel_size
    if not skip_height:
        z = bounds[2, 0] + height[u, v]
    else:
        z = 0.0
    return (x, y, z)
Convert from pixel location on heightmap to 3D position.
Convert from pixel location on heightmap to 3D position.
Convert from pixel location on heightmap to 3D position .
def pixel_to_position(pixel, height, bounds, pixel_size, skip_height=False):
    u, v = pixel
    x = bounds[0, 0] + v * pixel_size
    y = bounds[1, 0] + u * pixel_size
    if not skip_height:
        z = bounds[2, 0] + height[u, v]
    else:
        z = 0.0
    return (x, y, z)
def pixel_to_position ( pixel , height , bounds , pixel_size , skip_height = False ) : u , v = pixel x = bounds [ 0 , 0 ] + v * pixel_size y = bounds [ 1 , 0 ] + u * pixel_size if not skip_height : z = bounds [ 2 , 0 ] + height [ u , v ] else : z = 0.0 return ( x , y , z )
Convert from pixel location on heightmap to 3D position.
Convert from pixel location on heightmap to 3D position .
"""Convert from pixel location on heightmap to 3D position."""
pixel
height
bounds
pixel_size
skip_height