PositionRecorder
A class in Root.Township, the global namespace.
Ring buffer of recent position and rotation records for an ImpactTool, which Impactor reads to sweep hits. Pooled through PickupTypeSettings.GetPositionRecorder.
- Listed in Global namespace: P
Constructors
| Member | What it is |
|---|---|
PositionRecorder() | Creates a PositionRecorder with default values. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private static float inverseLerp | 1 minus smoothLerp. |
private bool isAround | True once the buffer has wrapped at least once. |
private int nextIndex | Index the next record is written to. |
private PositionRecord[] positionArray | The record buffer, sized by PickupTypeSettings.ImpactorArraySize. |
private static float smoothLerp | PickupTypeSettings.SmoothLerp, read once for all recorders. |
Properties
| Member | What it is |
|---|---|
IEnumerable<PositionRecord> Positions { get; } | The valid records in array order (not oldest first once the buffer has wrapped). |
1 private and internal property
Methods
1 private and internal method
Used in
Members of other types that take, return or hold a PositionRecorder: