docs.unity3d.com
    目次を表示する/隠す

    Interface IBrushRenderUnderCursor

    An interface that represent all of the functionality required to render a terrain-brush under the cursor.

    Inherited Members
    IPaintContextRender.SetupTerrainToolMaterialProperties(PaintContext, BrushTransform, Material)
    IPaintContextRender.RenderBrush(PaintContext, Material, Int32)
    Namespace: UnityEditor.TerrainTools
    Syntax
    public interface IBrushRenderUnderCursor : IPaintContextRender, IDisposable

    Methods

    AcquireHeightmap(Boolean, Rect, Int32)

    Gets the PaintContext for the height-map at the bounds specified, you need to say whether this is to be writable upon acquisition.

    Declaration
    PaintContext AcquireHeightmap(bool writable, Rect boundsInTerrainSpace, int extraBorderPixels = 0)
    Parameters
    Type Name Description
    Boolean writable

    Determines if we wish to allow writing to the normal-map.

    Rect boundsInTerrainSpace

    The bounds of the height-map to use (in pixels).

    Int32 extraBorderPixels

    Extra padding on the bounds specified.

    Returns
    Type Description
    PaintContext

    Returns the paint context created.

    AcquireNormalmap(Boolean, Rect, Int32)

    Gets the PaintContext for the normal-map at the bounds specified, you need to say whether this is to be writable upon acquisition.

    Declaration
    PaintContext AcquireNormalmap(bool writable, Rect boundsInTerrainSpace, int extraBorderPixels = 0)
    Parameters
    Type Name Description
    Boolean writable

    Determines if we wish to allow writing to the normal-map.

    Rect boundsInTerrainSpace

    The bounds of the normal-map to use (in pixels).

    Int32 extraBorderPixels

    Extra padding on the bounds specified.

    Returns
    Type Description
    PaintContext

    Returns the paint context created.

    AcquireTexture(Boolean, Rect, TerrainLayer, Int32)

    Gets the PaintContext for the texture-map at the bounds specified, you need to say whether this is to be writable upon acquisition.

    Declaration
    PaintContext AcquireTexture(bool writable, Rect boundsInTerrainSpace, TerrainLayer layer, int extraBorderPixels = 0)
    Parameters
    Type Name Description
    Boolean writable

    Determines if we wish to allow writing to the normal-map.

    Rect boundsInTerrainSpace

    The bounds of the texture-map to use (in pixels).

    TerrainLayer layer

    The terrain layer to acquire the texture-map for.

    Int32 extraBorderPixels

    Extra padding on the bounds specified.

    Returns
    Type Description
    PaintContext

    Returns the paint context created.

    AquireHolesTexture(Boolean, Rect, Int32)

    Gets the PaintContext for the holes at the bounds specified, you need to say whether this is to be writable upon acquisition.

    Declaration
    PaintContext AquireHolesTexture(bool writable, Rect boundsInTerrainSpace, int extraBorderPixels = 0)
    Parameters
    Type Name Description
    Boolean writable

    Determines if we wish to allow writing to the normal-map.

    Rect boundsInTerrainSpace

    The bounds of the normal-map to use (in pixels).

    Int32 extraBorderPixels

    Extra padding on the bounds specified.

    Returns
    Type Description
    PaintContext

    Returns the paint context created.

    CalculateBrushTransform(out BrushTransform)

    Calculates the brush transform under the cursor (taking into account scattering).

    Declaration
    bool CalculateBrushTransform(out BrushTransform brushTransform)
    Parameters
    Type Name Description
    BrushTransform brushTransform

    The brush-transform on the terrain at the specified UV co-ordinates.

    Returns
    Type Description
    Boolean

    Returns true if calculated successfully, false otherwise.

    Release(PaintContext)

    Releases the PaintContext specified, if this was made writable when acquired then we write back into the texture at this point.

    Declaration
    void Release(PaintContext paintContext)
    Parameters
    Type Name Description
    PaintContext paintContext

    The paint context to be released.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)