docs.unity3d.com
    Show / Hide Table of Contents

    Class FilterContext

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

    Inheritance
    Object
    FilterContext
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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()
    Implements
    IDisposable.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()
    Back to top
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on Friday, November 3, 2023