using UnityEngine;
using UnityEngine.TerrainTools;
namespace UnityEditor.TerrainTools
{
///
/// An interface that represent all of the functionality required to render a terrain-brush under the cursor.
///
public interface IBrushRenderUnderCursor : IPaintContextRender
{
///
/// Calculates the brush transform under the cursor (taking into account scattering).
///
/// The brush-transform on the terrain at the specified UV co-ordinates.
/// Returns true if calculated successfully, false otherwise.
bool CalculateBrushTransform(out BrushTransform brushTransform);
///
/// Gets the PaintContext for the height-map at the bounds specified,
/// you need to say whether this is to be writable upon acquisition.
///
/// Determines if we wish to allow writing to the normal-map.
/// The bounds of the height-map to use (in pixels).
/// Extra padding on the bounds specified.
/// Returns the paint context created.
PaintContext AcquireHeightmap(bool writable, Rect boundsInTerrainSpace, int extraBorderPixels = 0);
///
/// Gets the PaintContext for the texture-map at the bounds specified,
/// you need to say whether this is to be writable upon acquisition.
///
/// Determines if we wish to allow writing to the normal-map.
/// The bounds of the texture-map to use (in pixels).
/// The terrain layer to acquire the texture-map for.
/// Extra padding on the bounds specified.
/// Returns the paint context created.
PaintContext AcquireTexture(bool writable, Rect boundsInTerrainSpace, TerrainLayer layer, int extraBorderPixels = 0);
///
/// Gets the PaintContext for the normal-map at the bounds specified,
/// you need to say whether this is to be writable upon acquisition.
///
/// Determines if we wish to allow writing to the normal-map.
/// The bounds of the normal-map to use (in pixels).
/// Extra padding on the bounds specified.
/// Returns the paint context created.
PaintContext AcquireNormalmap(bool writable, Rect boundsInTerrainSpace, int extraBorderPixels = 0);
///
/// Gets the PaintContext for the holes at the bounds specified,
/// you need to say whether this is to be writable upon acquisition.
///
/// Determines if we wish to allow writing to the normal-map.
/// The bounds of the normal-map to use (in pixels).
/// Extra padding on the bounds specified.
/// Returns the paint context created.
PaintContext AquireHolesTexture(bool writable, Rect boundsInTerrainSpace, int extraBorderPixels = 0);
///
/// Releases the PaintContext specified, if this was made writable when
/// acquired then we write back into the texture at this point.
///
/// The paint context to be released.
void Release(PaintContext paintContext);
}
///
/// An interface that represent the brush renderers preview under the cursor.
///
public interface IBrushRenderPreviewUnderCursor : IBrushRenderUnderCursor, IPaintContextRenderPreview
{
}
}