|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | + |
| 4 | +using JSONREADER = System.Text.Json.Utf8JsonReader; |
| 5 | +using JSONWRITER = System.Text.Json.Utf8JsonWriter; |
| 6 | +using FIELDINFO = SharpGLTF.Reflection.FieldInfo; |
| 7 | +using SharpGLTF.Schema2; |
| 8 | + |
| 9 | +namespace SharpGLTF.ThirdParty |
| 10 | +{ |
| 11 | + partial class SpzGaussianSplatsCompression |
| 12 | + { |
| 13 | + private MeshPrimitive meshPrimitive; |
| 14 | + |
| 15 | + internal SpzGaussianSplatsCompression(MeshPrimitive meshPrimitive) |
| 16 | + { |
| 17 | + this.meshPrimitive = meshPrimitive; |
| 18 | + } |
| 19 | + |
| 20 | + public int BufferViewIndex |
| 21 | + { |
| 22 | + get => _bufferView; |
| 23 | + set |
| 24 | + { |
| 25 | + _bufferView = value; |
| 26 | + } |
| 27 | + } |
| 28 | + } |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + /// <summary> |
| 34 | + /// Compressed data for SPZ primitive. |
| 35 | + /// </summary> |
| 36 | +#if NET6_0_OR_GREATER |
| 37 | + [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)] |
| 38 | +#endif |
| 39 | + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("SharpGLTF.CodeGen", "1.0.0.0")] |
| 40 | + partial class SpzGaussianSplatsCompression : ExtraProperties |
| 41 | + { |
| 42 | + |
| 43 | + #region reflection |
| 44 | + |
| 45 | + public new const string SCHEMANAME = "KHR_spz_gaussian_splats_compression"; |
| 46 | + protected override string GetSchemaName() => SCHEMANAME; |
| 47 | + |
| 48 | + protected override IEnumerable<string> ReflectFieldsNames() |
| 49 | + { |
| 50 | + yield return "bufferView"; |
| 51 | + foreach (var f in base.ReflectFieldsNames()) yield return f; |
| 52 | + } |
| 53 | + protected override bool TryReflectField(string name, out FIELDINFO value) |
| 54 | + { |
| 55 | + switch (name) |
| 56 | + { |
| 57 | + case "bufferView": value = FIELDINFO.From("bufferView", this, instance => instance._bufferView); return true; |
| 58 | + default: return base.TryReflectField(name, out value); |
| 59 | + } |
| 60 | + } |
| 61 | + |
| 62 | + #endregion |
| 63 | + |
| 64 | + #region data |
| 65 | + |
| 66 | + private Int32 _bufferView; |
| 67 | + |
| 68 | + #endregion |
| 69 | + |
| 70 | + #region serialization |
| 71 | + |
| 72 | + protected override void SerializeProperties(JSONWRITER writer) |
| 73 | + { |
| 74 | + base.SerializeProperties(writer); |
| 75 | + SerializeProperty(writer, "bufferView", _bufferView); |
| 76 | + } |
| 77 | + |
| 78 | + protected override void DeserializeProperty(string jsonPropertyName, ref JSONREADER reader) |
| 79 | + { |
| 80 | + switch (jsonPropertyName) |
| 81 | + { |
| 82 | + case "bufferView": DeserializePropertyValue<SpzGaussianSplatsCompression, Int32>(ref reader, this, out _bufferView); break; |
| 83 | + default: base.DeserializeProperty(jsonPropertyName, ref reader); break; |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + #endregion |
| 88 | + |
| 89 | + } |
| 90 | +} |
0 commit comments