Search Results for

    Show / Hide Table of Contents

    Class LightRandom

    Lightweight random class.

    Inheritance
    object
    LightRandom
    Namespace: Evergine.Framework.Particles.Random
    Assembly: Evergine.Framework.dll
    Syntax
    public abstract class LightRandom

    Constructors

    LightRandom(uint)

    Initializes a new instance of the LightRandom class.

    Declaration
    public LightRandom(uint seed)
    Parameters
    Type Name Description
    uint seed

    The seed.

    Fields

    Seed

    The random seed.

    Declaration
    public uint Seed
    Field Value
    Type Description
    uint

    Methods

    CreateRandom(RandomPrecissionEnum)

    Creates a random object.

    Declaration
    public static LightRandom CreateRandom(RandomPrecissionEnum randomPrecision)
    Parameters
    Type Name Description
    RandomPrecissionEnum randomPrecision

    The random precision mode.

    Returns
    Type Description
    LightRandom

    The random object.

    InUnitCircle()

    Generates a 3D vector on the surface of a circle with radius 1, with a uniform distribution.

    Declaration
    public Vector3 InUnitCircle()
    Returns
    Type Description
    Vector3

    A Vector3D.

    InUnitSphere()

    Generates a 3D vector inside a radius-1 sphere with uniform distribution.

    Declaration
    public Vector3 InUnitSphere()
    Returns
    Type Description
    Vector3

    A Vector3D.

    NextFloat()

    Gets the next random float.

    Declaration
    public float NextFloat()
    Returns
    Type Description
    float

    Random float.

    NextFloat(ref uint)

    Gets the next random float.

    Declaration
    public float NextFloat(ref uint seed)
    Parameters
    Type Name Description
    uint seed

    The seed.

    Returns
    Type Description
    float

    A random float.

    NextUInt()

    Gets the next random unsigned integer.

    Declaration
    public uint NextUInt()
    Returns
    Type Description
    uint

    A random unsigned integer.

    NextUInt(ref uint)

    Gets the next random unsigned integer.

    Declaration
    public abstract uint NextUInt(ref uint seed)
    Parameters
    Type Name Description
    uint seed

    The seed for the random generator.

    Returns
    Type Description
    uint

    A random unsigned integer.

    OnUnitCircle()

    Generates a 3D vector in a radius 1 circle circumference with a uniform distribution.

    Declaration
    public Vector3 OnUnitCircle()
    Returns
    Type Description
    Vector3

    A Vector3D.

    OnUnitSphere()

    Generates a 3D vector on the surface of a sphere with a radius of 1, with a uniform distribution.

    Declaration
    public Vector3 OnUnitSphere()
    Returns
    Type Description
    Vector3

    A Vector3D.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX