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

    Class FilterContext

    Provides information for generating images based on Terrain texture data ie. procedural brush masks.

    Inheritance
    Object
    FilterContext
    Namespace: UnityEditor.TerrainTools
    Syntax
    public class FilterContext : IDisposable

    Constructors

    FilterContext(GraphicsFormat, Vector3, Single, Single)

    Initializes and returns an instance of FiterContext.

    Declaration
    public FilterContext(GraphicsFormat targetFormat, Vector3 brushPos, float brushSize, float brushRotation)
    Parameters
    Type Name Description
    GraphicsFormat targetFormat

    The target GraphicsFormat that will be used for Filter evaluation.

    Vector3 brushPos

    The brush position.

    Single brushSize

    The brush size.

    Single brushRotation

    The brush rotation.

    Properties

    brushPos

    Gets and sets the position of the brush in world space coordinates.

    Declaration
    public Vector3 brushPos { get; }
    Property Value
    Type Description
    Vector3

    brushRotation

    Gets and sets the rotation of the brush in degrees.

    Declaration
    public float brushRotation { get; }
    Property Value
    Type Description
    Single

    brushSize

    Gets and sets the size of the brush in world space units.

    Declaration
    public float brushSize { get; }
    Property Value
    Type Description
    Single

    diffuseTextures

    Gets and sets terrain layer diffuse textures

    Declaration
    public TerrainLayer[] diffuseTextures { get; }
    Property Value
    Type Description
    TerrainLayer[]

    floatProperties

    Gets and sets a collection of common floating-point values that are used during Filter composition.

    Declaration
    public Dictionary<string, float> floatProperties { get; }
    Property Value
    Type Description
    Dictionary<String, Single>

    intProperties

    Gets and sets a collection of common integer values that are used during Filter composition.

    Declaration
    public Dictionary<string, int> intProperties { get; }
    Property Value
    Type Description
    Dictionary<String, Int32>

    rtHandleCollection

    Gets and sets a collection of common RenderTextures that are used during Filter composition.

    Declaration
    public RTHandleCollection rtHandleCollection { get; }
    Property Value
    Type Description
    RTHandleCollection

    targetFormat

    Gets and sets a GraphicsFormat that is used for the destination RenderTextures when a FilterStack is evaluated. This is used for some validation without the need for actual RenderTextures.

    Declaration
    public GraphicsFormat targetFormat { get; }
    Property Value
    Type Description
    GraphicsFormat

    vectorProperties

    Gets and sets a collection of common vector values that are used during Filter composition.

    Declaration
    public Dictionary<string, Vector4> vectorProperties { get; }
    Property Value
    Type Description
    Dictionary<String, Vector4>

    Methods

    Dispose()

    Disposes render textures within the handle collection.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposes render textures within the handle collection.

    Declaration
    public virtual void Dispose(bool dispose)
    Parameters
    Type Name Description
    Boolean dispose

    Whether or not resources should be disposed.

    Remarks

    Override this method if you create a class that derives from FilterContext.

    ReleaseRTHandles()

    Releases gathered RenderTexture resources.

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