Struct TrajectoryModel | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct TrajectoryModel

    Namespace: Unity.Kinematica
    Syntax
    public struct TrajectoryModel

    Properties

    Array

    Allows direct access to the trajectory array.

    Declaration
    public MemoryArray<AffineTransform> Array { get; }
    Property Value
    Type Description
    MemoryArray<AffineTransform>

    Memory array that references the trajectory array.

    Item[Int32]

    Allows access to a single element of the trajectory.

    Declaration
    public AffineTransform this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index
    Property Value
    Type Description
    AffineTransform

    TrajectoryLength

    Denotes the length of the trajectory.

    Declaration
    public int TrajectoryLength { get; }
    Property Value
    Type Description
    Int32

    Methods

    Display(AffineTransform, Color)

    Displays the trajectory model in world space.

    Declaration
    public void Display(AffineTransform worldRootTransform, Color color)
    Parameters
    Type Name Description
    AffineTransform worldRootTransform

    Anchor transform to be used as a reference for the trajectory display.

    Color color

    The color to be used for the trajectory display.

    GetRootVelocity(Single, Single)

    Calculates the root velocity along the current trajectory at a sampling time in seconds passed as argument.

    Declaration
    public float3 GetRootVelocity(float sampleTimeInSeconds, float timeHorizon)
    Parameters
    Type Name Description
    Single sampleTimeInSeconds

    The sampling time in seconds.

    Single timeHorizon

    Time horizon in seconds over which the velocity should be approximated.

    Returns
    Type Description
    float3

    Velocity in meters per second subject to the sampling time passed as argument.

    KeepPastTrajectoryInWorldSpace(AffineTransform)

    Adjust the past trajectory so that trajectory points conserve their world transform after the root transform has been modified.

    Declaration
    public void KeepPastTrajectoryInWorldSpace(AffineTransform rootDeltaTransform)
    Parameters
    Type Name Description
    AffineTransform rootDeltaTransform

    RootTransformAtTime(Single)

    Calculates a root transform along the current trajectory at a sampling time in seconds passed as argument.

    Declaration
    public AffineTransform RootTransformAtTime(float sampleTimeInSeconds)
    Parameters
    Type Name Description
    Single sampleTimeInSeconds

    The sampling time in seconds.

    Returns
    Type Description
    AffineTransform

    Memory array that references the trajectory array.

    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