public static Offset <Vector3Partial> ToFlatBufferPartial(this System.Numerics.Vector3 vector, FlatBufferBuilder builder) { Vector3Partial.StartVector3Partial(builder); Vector3Partial.AddX(builder, Float.CreateFloat(builder, vector.X)); Vector3Partial.AddY(builder, Float.CreateFloat(builder, vector.Y)); Vector3Partial.AddZ(builder, Float.CreateFloat(builder, vector.Z)); return(Vector3Partial.EndVector3Partial(builder)); }
public Offset <Vector3Partial> ToFlatBuffer(FlatBufferBuilder builder) { Vector3Partial.StartVector3Partial(builder); if (X.HasValue) { Vector3Partial.AddX(builder, Float.CreateFloat(builder, X.Value)); } if (Y.HasValue) { Vector3Partial.AddY(builder, Float.CreateFloat(builder, Y.Value)); } if (Z.HasValue) { Vector3Partial.AddZ(builder, Float.CreateFloat(builder, Z.Value)); } return(Vector3Partial.EndVector3Partial(builder)); }