Search Results for

    Show / Hide Table of Contents

    Class Vector3Extensions

    Inheritance
    object
    Vector3Extensions
    Namespace: TetraCreations.Core
    Assembly: cs.temp.dll.dll
    Syntax
    public static class Vector3Extensions

    Methods

    Add(Vector3, float, float, float)

    Increase/Decrease any point in the vector (x, y, z) without changing the others.

    Declaration
    public static Vector3 Add(this Vector3 vector, float x = 0, float y = 0, float z = 0)
    Parameters
    Type Name Description
    Vector3 vector
    float x
    float y
    float z
    Returns
    Type Description
    Vector3

    Copy(Vector3)

    Returns a copy of the Vector3

    Declaration
    public static Vector3 Copy(this Vector3 vector)
    Parameters
    Type Name Description
    Vector3 vector
    Returns
    Type Description
    Vector3

    GetPointOnUnitSphereCap(Quaternion, float)

    Get a random point on a sphare cap, limited by an angle

    Declaration
    public static Vector3 GetPointOnUnitSphereCap(Quaternion targetDirection, float angle)
    Parameters
    Type Name Description
    Quaternion targetDirection
    float angle
    Returns
    Type Description
    Vector3

    GetPointOnUnitSphereCap(Vector3, float)

    Get a random point on a sphare cap, limited by an angle using Quaternion.LookRotation(targetDirection) as target direction

    Declaration
    public static Vector3 GetPointOnUnitSphereCap(Vector3 targetDirection, float angle)
    Parameters
    Type Name Description
    Vector3 targetDirection
    float angle
    Returns
    Type Description
    Vector3

    Log(Vector3, string)

    Show the Vector3 values in the console

    Declaration
    public static void Log(this Vector3 vector, string prefix = "Vector3")
    Parameters
    Type Name Description
    Vector3 vector
    string prefix

    Text to show before the values

    ToString(Vector3)

    Converts a Vector3 to a string in X, Y, Z format

    Declaration
    public static string ToString(this Vector3 vector)
    Parameters
    Type Name Description
    Vector3 vector
    Returns
    Type Description
    string

    With(Vector3, float?, float?, float?)

    Returns a new Vector3 while changing/keeping any value from the original vector (x, y, z).

    Declaration
    public static Vector3 With(this Vector3 vector, float? x = null, float? y = null, float? z = null)
    Parameters
    Type Name Description
    Vector3 vector
    float? x
    float? y
    float? z
    Returns
    Type Description
    Vector3
    In This Article
    Back to top Tetra Creations documentation