csharp
public static class MathCodecVectors and rotations, packed the way a network wants them rather than the way memory does.
No guide page documents this yet — the page shows what the code says about itself.
Fields and properties (2)
public const int RotationBitsHow many bits each of the three sent components of a rotation costs.
public static QuantizeRange RotationRangeThe range the three sent components of a rotation live in.
Methods (8)
public static void WriteVector3(this ref BitWriter writer, in Vector3 value, in QuantizeRange range)Writes a position, each axis quantized into the same range.
public static bool TryReadVector3(this ref BitReader reader, in QuantizeRange range, out Vector3 value)Reads a position.
public static void WriteVector3(this ref BitWriter writer, in Vector3 value)Writes a vector as three whole floats, for one with no declared range.
public static bool TryReadVector3(this ref BitReader reader, out Vector3 value)Reads a vector written as three whole floats.
public static void WriteRotation(this ref BitWriter writer, in Quaternion value)Writes a rotation in 32 bits, by not sending the component it can work out.
public static uint PackRotation(in Quaternion value)The same 32 bits, as a value rather than as a write.
public static Quaternion UnpackRotation(uint packed)Turns a packed rotation back into one.
public static bool TryReadRotation(this ref BitReader reader, out Quaternion value)Reads a rotation written by WriteRotation.
Used by (9)
- BitExactnessTestsVixen.Net.Tests
- MotionTestsVixen.Net.Tests
- NetworkBonesApplySystemVixen.Net.Animation
- NetworkBonesCaptureSystemVixen.Net.Animation
- NetworkBonesTestsVixen.Net.Animation.Tests
- NetworkTransformReplicatorVixen.Net
- RotationCodecVixen.Net.Engine
- Vector3CodecVixen.Net.Engine
- Vixen_Net_Generators_Tests_GeneratedPoseReplicatorVixen.Net.Generators.Tests