Search Results for

    Show / Hide Table of Contents

    Struct Movement

    A struct that can move objects along specific paths in space.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Danmokou.DMath
    Assembly: cs.temp.dll.dll
    Syntax
    public struct Movement

    Constructors

    Movement(VTP)

    Declaration
    public Movement(VTP path)
    Parameters
    Type Name Description
    VTP path

    Movement(VTP, Vector2, Single)

    Declaration
    public Movement(VTP vtp, Vector2 rootPos, float ang)
    Parameters
    Type Name Description
    VTP vtp
    Vector2 rootPos
    System.Single ang

    Movement(VTP, Vector2, V2RV2)

    Create a movement configuration.

    Declaration
    public Movement(VTP path, Vector2 parentLoc, V2RV2 localLoc)
    Parameters
    Type Name Description
    VTP path

    Movement descriptor

    Vector2 parentLoc

    Global location of parent. Set to zero if using a transform parent

    V2RV2 localLoc

    Location of this relative to parent. Only distinguished from parent for applying modifiers.

    Movement(Vector2, Single)

    Declaration
    public Movement(Vector2 loc, float angleDeg)
    Parameters
    Type Name Description
    Vector2 loc
    System.Single angleDeg

    Movement(Vector2, V2RV2)

    Create a shell velocity configuration with no movement.

    Declaration
    public Movement(Vector2 parentLoc, V2RV2 localPos)
    Parameters
    Type Name Description
    Vector2 parentLoc

    Global location of parent. Set to zero if using a transform parent

    V2RV2 localPos

    Location of this relative to parent

    Movement(Vector2, Vector2)

    Declaration
    public Movement(Vector2 loc, Vector2 dir)
    Parameters
    Type Name Description
    Vector2 loc
    Vector2 dir

    Fields

    angle

    Declaration
    public float angle
    Field Value
    Type Description
    System.Single

    cos_rot

    Declaration
    public float cos_rot
    Field Value
    Type Description
    System.Single

    flipX

    Declaration
    public float flipX
    Field Value
    Type Description
    System.Single

    flipY

    Declaration
    public float flipY
    Field Value
    Type Description
    System.Single

    rootPos

    Declaration
    public Vector2 rootPos
    Field Value
    Type Description
    Vector2

    sin_rot

    Declaration
    public float sin_rot
    Field Value
    Type Description
    System.Single

    Properties

    Direction

    Declaration
    public readonly Vector2 Direction { get; }
    Property Value
    Type Description
    Vector2

    None

    Declaration
    public static readonly Movement None { get; }
    Property Value
    Type Description
    Movement

    Methods

    FlipX()

    Declaration
    public void FlipX()

    FlipY()

    Declaration
    public void FlipY()

    IsEmpty()

    Declaration
    public bool IsEmpty()
    Returns
    Type Description
    System.Boolean

    UpdateDeltaAssignDelta(ref ParametricInfo, ref Vector3, in Single)

    Update a BPI according to the velocity description. Doesn't calculate normalized direction.
    Assigns delta, but if the inner VTP is two-dimensional, it may not assign the z-dimension.

    Declaration
    public void UpdateDeltaAssignDelta(ref ParametricInfo bpi, ref Vector3 delta, in float dT)
    Parameters
    Type Name Description
    ParametricInfo bpi

    Parametric info

    Vector3 delta

    The delta moved this update (assigned in addition to BPI.loc)

    System.Single dT

    Delta time

    UpdateDeltaNoTime(in BulletManager.SimpleBulletCollection.VelocityUpdateState)

    Declaration
    public void UpdateDeltaNoTime(in BulletManager.SimpleBulletCollection.VelocityUpdateState st)
    Parameters
    Type Name Description
    BulletManager.SimpleBulletCollection.VelocityUpdateState st

    UpdateDeltaNoTime(Ex)

    Declaration
    public Ex UpdateDeltaNoTime(Ex st)
    Parameters
    Type Name Description
    Ex st
    Returns
    Type Description
    Ex

    UpdateZero(ref ParametricInfo)

    Initialize a parametric info container. bpi.t should contain the desired starting time of the container. This function will set it to zero and incrementally update it until it reaches its initial value.

    Declaration
    public Vector2 UpdateZero(ref ParametricInfo bpi)
    Parameters
    Type Name Description
    ParametricInfo bpi

    Parametric info

    Returns
    Type Description
    Vector2

    Direction to face

    WithNoMovement()

    Declaration
    public readonly Movement WithNoMovement()
    Returns
    Type Description
    Movement
    In This Article
    Back to top Generated by DocFX