Quantum 3
3.1.0
Per-tick history entry of a QuantumEntityView, see QuantumEntityViewTransformHistory. A union: the 2d components overlay the 3d component, Type selects which one is stored, so a 2d entry does not pay for the 3d component and both transform types share one buffer. More...
Public Member Functions | |
| void | GetErrorTo (in QuantumEntityViewTransformData corrected, out Vector3 positionError, out Quaternion rotationError) |
| The visual error between this entry, the version that has been displayed, and corrected , the re-simulated version of the same tick. Expressed in Unity space, so it can be added to the view's error. More... | |
Static Public Member Functions | |
| static QuantumEntityViewTransformData | From2D (int frame, in Transform2D transform, bool hasVertical, in Transform2DVertical vertical) |
| An entry holding a Quantum.Transform2D and optionally a Quantum.Transform2DVertical already read out of a frame. More... | |
| static QuantumEntityViewTransformData | From3D (int frame, in Transform3D transform) |
| An entry holding a Quantum.Transform3D already read out of a frame. More... | |
| static QuantumEntityViewTransformData | ReadFrom (Frame frame, EntityRef entity, QuantumEntityViewTransformType type) |
| Read the transform components of entity out of frame . More... | |
Public Attributes | |
| int | Frame |
| The frame number this data came from. More... | |
| bool | Has2DVertical |
| Has 2d vertical component. More... | |
| bool | IsValid |
| Has valid and useable data. More... | |
| Transform2D | Transform2D |
| The transform 2d component, valid when Type is QuantumEntityViewTransformType.Transform2D. More... | |
| Transform2DVertical | Transform2DVertical |
| The transform 2d vertical component, valid when Has2DVertical is set. More... | |
| Transform3D | Transform3D |
| The transform 3d component, valid when Type is QuantumEntityViewTransformType.Transform3D. More... | |
| QuantumEntityViewTransformType | Type |
| Which transform component this entry holds. More... | |
Per-tick history entry of a QuantumEntityView, see QuantumEntityViewTransformHistory. A union: the 2d components overlay the 3d component, Type selects which one is stored, so a 2d entry does not pay for the 3d component and both transform types share one buffer.
The layout requires Transform2D.SIZE + Transform2DVertical.SIZE <= Transform3D.SIZE, otherwise the vertical component overlaps Frame. Pinned by TestQuantumEntityViewTransformBuffer.DataLayoutKeepsThe2DOverlayClearOfTheTrailingFields.
|
inlinestatic |
Read the transform components of entity out of frame .
| frame | The frame to read from. |
| entity | The entity to read. |
| type | Which transform component to read, the entry is not valid for QuantumEntityViewTransformType.None. |
|
inlinestatic |
An entry holding a Quantum.Transform3D already read out of a frame.
| frame | The frame number the transform came from. |
| transform | The transform component. |
|
inlinestatic |
An entry holding a Quantum.Transform2D and optionally a Quantum.Transform2DVertical already read out of a frame.
| frame | The frame number the transforms came from. |
| transform | The transform component. |
| hasVertical | Whether vertical is set. |
| vertical | The vertical component, ignored when hasVertical is false. |
|
inline |
The visual error between this entry, the version that has been displayed, and corrected , the re-simulated version of the same tick. Expressed in Unity space, so it can be added to the view's error.
| corrected | The re-simulated version of the same tick, must have the same Type. |
| positionError | Displayed position minus corrected position. |
| rotationError | The rotation that turns the corrected rotation into the displayed one. |
| Transform2D Quantum.QuantumEntityViewTransformData.Transform2D |
The transform 2d component, valid when Type is QuantumEntityViewTransformType.Transform2D.
| Transform2DVertical Quantum.QuantumEntityViewTransformData.Transform2DVertical |
The transform 2d vertical component, valid when Has2DVertical is set.
| Transform3D Quantum.QuantumEntityViewTransformData.Transform3D |
The transform 3d component, valid when Type is QuantumEntityViewTransformType.Transform3D.
| int Quantum.QuantumEntityViewTransformData.Frame |
The frame number this data came from.
| QuantumEntityViewTransformType Quantum.QuantumEntityViewTransformData.Type |
Which transform component this entry holds.
| bool Quantum.QuantumEntityViewTransformData.Has2DVertical |
Has 2d vertical component.
| bool Quantum.QuantumEntityViewTransformData.IsValid |
Has valid and useable data.