Class FilterContext | Terrain Tools | 3.0.2-preview.3
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
    Namespace: UnityEditor.Experimental.TerrainAPI
    Syntax
    public class FilterContext : IDisposable

    Constructors

    FilterContext(GraphicsFormat, Vector3, Single, Single)

    Constructor The brush position The brush size The brush rotation

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

    Properties

    brushPos

    The position of the brush in world space coordinates

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

    brushRotation

    The rotation of the brush in degrees

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

    brushSize

    The size of the brush in world space units

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

    floatProperties

    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

    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

    A collection of common RenderTextures that are used during Filter composition

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

    targetFormat

    The GraphicsFormat that will be used for 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

    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()

    Dispose method for this class

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Overridable Dispose method for this class. Override this if you create a class that derives from FilterContext Whether or not resources should be disposed

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

    ReleaseRTHandles()

    Release gathered RenderTexture resources

    Declaration
    public void ReleaseRTHandles()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • 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 18 October 2023