RuntimeSprings Class

Summary

Manages jobs that execute a spring simulation.
Assembly
FlexiMotion.dll
Namespace
FlexiMotion
Interfaces
  • IDisposable
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IDisposable"] Type["RuntimeSprings"] class Type type-node

Syntax

public class RuntimeSprings : IDisposable

Constructors

Name Summary
RuntimeSprings(SpringDetails[], Transform[], float[], JobModifierGroup) Creates a new FlexiMotion.RuntimeSprings.

Fields

Name Constant Value Summary
ApplyTailPositionsJob
A job which rotates the FlexiMotion.RuntimeSprings.SpringTransforms according to the FlexiMotion.RuntimeSprings.TailPositions.
DefaultTailLength 0.1
The default length of to use for a tail if there is no child object.
static
Modifiers
Objects which modify the simulation.
ParentRotationsJob
A job which reads the rotations of FlexiMotion.RuntimeSprings.SpringParentTransforms for later use.
SpringDetails
The details of each spring.
SpringJob
The main spring simulation job.
SpringParentTransforms
The parents of the FlexiMotion.RuntimeSprings.SpringTransforms.
SpringTransforms
The UnityEngine.Transform accessors for each spring.
TailOrigins
The starting details of each spring's tail.
TailPositions
The current position of each spring's tail.
TailPreviousPositions
The previous position of each spring's tail from last update.
TailRadii
The collision radius of each spring's tail.

Methods

Name Value Summary
Dispose() void
Disposes everything allocated by this simulation.
DrawGizmos() void
Draws scene gizmos representing the current state of this simulation.
DrawGizmos(Color) void
Draws scene gizmos representing the current state of this simulation.
GetTailLocalPosition(Transform) Vector3
Returns the local position of the `transform`'s first child.
static
ScheduleJob(float, int, JobHandle) JobHandle
Schedules jobs to update the simulation.
ScheduleRecenterSprings(JobHandle) JobHandle
Schedules a FlexiMotion.Jobs.RecenterSpringsJob.
ScheduleResetSprings(JobHandle) JobHandle
Schedules a FlexiMotion.Jobs.ResetSpringsJob.
ScheduleResetTransforms(JobHandle) JobHandle
Schedules an FlexiMotion.Jobs.ApplyRotationsJob to return all springs to their starting rotations.

Extension Methods

Name Value Summary
LogTemp<RuntimeSprings>(Object) T
Debug.Log(message, context) with an [System.ObsoleteAttribute] warning so you remember to remove any calls.
SafeGetHashCode<RuntimeSprings>() int
Uses System.Collections.Generic.EqualityComparer`1.Default to get a hash code.