docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AnimationCurveSampler

    Returns random values according to a range and probability distribution denoted by a user provided AnimationCurve. The X axis of the AnimationCurve corresponds to the values this sampler will pick from, and the Y axis corresponds to the relative probability of the values. The relative probabilities (Y axis) do not need to max out at 1, as only the shape of the curve matters. The Y values cannot however be negative.

    Inheritance
    object
    AnimationCurveSampler
    Implements
    ISampler
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.Perception.Randomization.Samplers
    Assembly: solution.dll
    Syntax
    [Serializable]
    public class AnimationCurveSampler : ISampler

    Constructors

    Name Description
    AnimationCurveSampler()

    Constructs a default AnimationCurveSampler

    AnimationCurveSampler(AnimationCurve, int)

    Constructs an AnimationCurveSampler with a given animation curve

    Fields

    Name Description
    distributionCurve

    The Animation Curve associated with this sampler

    numOfSamplesForIntegration

    Number of samples used for integrating over the provided AnimationCurve. The larger the number of samples, the more accurate the resulting probability distribution will be.

    Methods

    Name Description
    Sample()

    Generates one sample

    Validate()

    Validates that the sampler is configured properly

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)