diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 72384d7a..34d33e5e 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -3804,7 +3804,8 @@ struct ModelToggles FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_VIVE_EMULATION = 16, VT_TOE_SNAP = 18, VT_FOOT_PLANT = 20, - VT_SELF_LOCALIZATION = 22 + VT_SELF_LOCALIZATION = 22, + VT_USE_POSITION = 24 }; flatbuffers::Optional extended_spine() const { return GetOptional(VT_EXTENDED_SPINE); @@ -3836,6 +3837,9 @@ struct ModelToggles FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { flatbuffers::Optional self_localization() const { return GetOptional(VT_SELF_LOCALIZATION); } + flatbuffers::Optional use_position() const { + return GetOptional(VT_USE_POSITION); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_EXTENDED_SPINE, 1) && @@ -3848,6 +3852,7 @@ struct ModelToggles FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_TOE_SNAP, 1) && VerifyField(verifier, VT_FOOT_PLANT, 1) && VerifyField(verifier, VT_SELF_LOCALIZATION, 1) && + VerifyField(verifier, VT_USE_POSITION, 1) && verifier.EndTable(); } }; @@ -3886,6 +3891,9 @@ struct ModelTogglesBuilder { void add_self_localization(bool self_localization) { fbb_.AddElement(ModelToggles::VT_SELF_LOCALIZATION, static_cast(self_localization)); } + void add_use_position(bool use_position) { + fbb_.AddElement(ModelToggles::VT_USE_POSITION, static_cast(use_position)); + } explicit ModelTogglesBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -3908,8 +3916,10 @@ inline flatbuffers::Offset CreateModelToggles( flatbuffers::Optional vive_emulation = flatbuffers::nullopt, flatbuffers::Optional toe_snap = flatbuffers::nullopt, flatbuffers::Optional foot_plant = flatbuffers::nullopt, - flatbuffers::Optional self_localization = flatbuffers::nullopt) { + flatbuffers::Optional self_localization = flatbuffers::nullopt, + flatbuffers::Optional use_position = flatbuffers::nullopt) { ModelTogglesBuilder builder_(_fbb); + if(use_position) { builder_.add_use_position(*use_position); } if(self_localization) { builder_.add_self_localization(*self_localization); } if(foot_plant) { builder_.add_foot_plant(*foot_plant); } if(toe_snap) { builder_.add_toe_snap(*toe_snap); } diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java index ad1aca8f..828f1612 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java @@ -38,6 +38,8 @@ public final class ModelToggles extends Table { public boolean footPlant() { int o = __offset(20); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public boolean hasSelfLocalization() { return 0 != __offset(22); } public boolean selfLocalization() { int o = __offset(22); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasUsePosition() { return 0 != __offset(24); } + public boolean usePosition() { int o = __offset(24); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public static int createModelToggles(FlatBufferBuilder builder, boolean extendedSpine, @@ -49,8 +51,10 @@ public static int createModelToggles(FlatBufferBuilder builder, boolean viveEmulation, boolean toeSnap, boolean footPlant, - boolean selfLocalization) { - builder.startTable(10); + boolean selfLocalization, + boolean usePosition) { + builder.startTable(11); + ModelToggles.addUsePosition(builder, usePosition); ModelToggles.addSelfLocalization(builder, selfLocalization); ModelToggles.addFootPlant(builder, footPlant); ModelToggles.addToeSnap(builder, toeSnap); @@ -64,7 +68,7 @@ public static int createModelToggles(FlatBufferBuilder builder, return ModelToggles.endModelToggles(builder); } - public static void startModelToggles(FlatBufferBuilder builder) { builder.startTable(10); } + public static void startModelToggles(FlatBufferBuilder builder) { builder.startTable(11); } public static void addExtendedSpine(FlatBufferBuilder builder, boolean extendedSpine) { builder.addBoolean(0, extendedSpine, false); } public static void addExtendedPelvis(FlatBufferBuilder builder, boolean extendedPelvis) { builder.addBoolean(1, extendedPelvis, false); } public static void addExtendedKnee(FlatBufferBuilder builder, boolean extendedKnee) { builder.addBoolean(2, extendedKnee, false); } @@ -75,6 +79,7 @@ public static int createModelToggles(FlatBufferBuilder builder, public static void addToeSnap(FlatBufferBuilder builder, boolean toeSnap) { builder.addBoolean(7, toeSnap, false); } public static void addFootPlant(FlatBufferBuilder builder, boolean footPlant) { builder.addBoolean(8, footPlant, false); } public static void addSelfLocalization(FlatBufferBuilder builder, boolean selfLocalization) { builder.addBoolean(9, selfLocalization, false); } + public static void addUsePosition(FlatBufferBuilder builder, boolean usePosition) { builder.addBoolean(10, usePosition, false); } public static int endModelToggles(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -112,6 +117,8 @@ public void unpackTo(ModelTogglesT _o) { _o.setFootPlant(_oFootPlant); Boolean _oSelfLocalization = hasSelfLocalization() ? selfLocalization() : null; _o.setSelfLocalization(_oSelfLocalization); + Boolean _oUsePosition = hasUsePosition() ? usePosition() : null; + _o.setUsePosition(_oUsePosition); } public static int pack(FlatBufferBuilder builder, ModelTogglesT _o) { if (_o == null) return 0; @@ -126,7 +133,8 @@ public static int pack(FlatBufferBuilder builder, ModelTogglesT _o) { _o.getViveEmulation(), _o.getToeSnap(), _o.getFootPlant(), - _o.getSelfLocalization()); + _o.getSelfLocalization(), + _o.getUsePosition()); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java index 6531aaf4..33d38d48 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java @@ -18,6 +18,7 @@ public class ModelTogglesT { private Boolean toeSnap; private Boolean footPlant; private Boolean selfLocalization; + private Boolean usePosition; public Boolean getExtendedSpine() { return extendedSpine; } @@ -59,6 +60,10 @@ public class ModelTogglesT { public void setSelfLocalization(Boolean selfLocalization) { this.selfLocalization = selfLocalization; } + public Boolean getUsePosition() { return usePosition; } + + public void setUsePosition(Boolean usePosition) { this.usePosition = usePosition; } + public ModelTogglesT() { this.extendedSpine = null; @@ -71,6 +76,7 @@ public ModelTogglesT() { this.toeSnap = null; this.footPlant = null; this.selfLocalization = null; + this.usePosition = null; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt index c6fafa67..d8223ee0 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/settings/ModelToggles.kt @@ -69,6 +69,11 @@ class ModelToggles : Table() { val o = __offset(22) return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null } + val usePosition : Boolean? + get() { + val o = __offset(24) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else null + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -80,8 +85,9 @@ class ModelToggles : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createModelToggles(builder: FlatBufferBuilder, extendedSpine: Boolean?, extendedPelvis: Boolean?, extendedKnee: Boolean?, forceArmsFromHmd: Boolean?, floorClip: Boolean?, skatingCorrection: Boolean?, viveEmulation: Boolean?, toeSnap: Boolean?, footPlant: Boolean?, selfLocalization: Boolean?) : Int { - builder.startTable(10) + fun createModelToggles(builder: FlatBufferBuilder, extendedSpine: Boolean?, extendedPelvis: Boolean?, extendedKnee: Boolean?, forceArmsFromHmd: Boolean?, floorClip: Boolean?, skatingCorrection: Boolean?, viveEmulation: Boolean?, toeSnap: Boolean?, footPlant: Boolean?, selfLocalization: Boolean?, usePosition: Boolean?) : Int { + builder.startTable(11) + usePosition?.run { addUsePosition(builder, usePosition) } selfLocalization?.run { addSelfLocalization(builder, selfLocalization) } footPlant?.run { addFootPlant(builder, footPlant) } toeSnap?.run { addToeSnap(builder, toeSnap) } @@ -95,7 +101,7 @@ class ModelToggles : Table() { return endModelToggles(builder) } @JvmStatic - fun startModelToggles(builder: FlatBufferBuilder) = builder.startTable(10) + fun startModelToggles(builder: FlatBufferBuilder) = builder.startTable(11) @JvmStatic fun addExtendedSpine(builder: FlatBufferBuilder, extendedSpine: Boolean) = builder.addBoolean(0, extendedSpine, false) @JvmStatic @@ -117,6 +123,8 @@ class ModelToggles : Table() { @JvmStatic fun addSelfLocalization(builder: FlatBufferBuilder, selfLocalization: Boolean) = builder.addBoolean(9, selfLocalization, false) @JvmStatic + fun addUsePosition(builder: FlatBufferBuilder, usePosition: Boolean) = builder.addBoolean(10, usePosition, false) + @JvmStatic fun endModelToggles(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs index a7416f7e..946782a2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs @@ -36,6 +36,7 @@ impl<'a> ModelToggles<'a> { pub const VT_TOE_SNAP: flatbuffers::VOffsetT = 18; pub const VT_FOOT_PLANT: flatbuffers::VOffsetT = 20; pub const VT_SELF_LOCALIZATION: flatbuffers::VOffsetT = 22; + pub const VT_USE_POSITION: flatbuffers::VOffsetT = 24; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -47,6 +48,7 @@ impl<'a> ModelToggles<'a> { args: &'args ModelTogglesArgs ) -> flatbuffers::WIPOffset> { let mut builder = ModelTogglesBuilder::new(_fbb); + if let Some(x) = args.use_position { builder.add_use_position(x); } if let Some(x) = args.self_localization { builder.add_self_localization(x); } if let Some(x) = args.foot_plant { builder.add_foot_plant(x); } if let Some(x) = args.toe_snap { builder.add_toe_snap(x); } @@ -131,6 +133,13 @@ impl<'a> ModelToggles<'a> { // which contains a valid value in this slot unsafe { self._tab.get::(ModelToggles::VT_SELF_LOCALIZATION, None)} } + #[inline] + pub fn use_position(&self) -> Option { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ModelToggles::VT_USE_POSITION, None)} + } } impl flatbuffers::Verifiable for ModelToggles<'_> { @@ -150,6 +159,7 @@ impl flatbuffers::Verifiable for ModelToggles<'_> { .visit_field::("toe_snap", Self::VT_TOE_SNAP, false)? .visit_field::("foot_plant", Self::VT_FOOT_PLANT, false)? .visit_field::("self_localization", Self::VT_SELF_LOCALIZATION, false)? + .visit_field::("use_position", Self::VT_USE_POSITION, false)? .finish(); Ok(()) } @@ -165,6 +175,7 @@ pub struct ModelTogglesArgs { pub toe_snap: Option, pub foot_plant: Option, pub self_localization: Option, + pub use_position: Option, } impl<'a> Default for ModelTogglesArgs { #[inline] @@ -180,6 +191,7 @@ impl<'a> Default for ModelTogglesArgs { toe_snap: None, foot_plant: None, self_localization: None, + use_position: None, } } } @@ -230,6 +242,10 @@ impl<'a: 'b, 'b> ModelTogglesBuilder<'a, 'b> { self.fbb_.push_slot_always::(ModelToggles::VT_SELF_LOCALIZATION, self_localization); } #[inline] + pub fn add_use_position(&mut self, use_position: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_USE_POSITION, use_position); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelTogglesBuilder<'a, 'b> { let start = _fbb.start_table(); ModelTogglesBuilder { @@ -257,6 +273,7 @@ impl core::fmt::Debug for ModelToggles<'_> { ds.field("toe_snap", &self.toe_snap()); ds.field("foot_plant", &self.foot_plant()); ds.field("self_localization", &self.self_localization()); + ds.field("use_position", &self.use_position()); ds.finish() } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts index 558a13d5..3aa37afd 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts @@ -75,8 +75,13 @@ selfLocalization():boolean|null { return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; } +usePosition():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 24); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + static startModelToggles(builder:flatbuffers.Builder) { - builder.startObject(10); + builder.startObject(11); } static addExtendedSpine(builder:flatbuffers.Builder, extendedSpine:boolean) { @@ -119,12 +124,16 @@ static addSelfLocalization(builder:flatbuffers.Builder, selfLocalization:boolean builder.addFieldInt8(9, +selfLocalization, 0); } +static addUsePosition(builder:flatbuffers.Builder, usePosition:boolean) { + builder.addFieldInt8(10, +usePosition, 0); +} + static endModelToggles(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } -static createModelToggles(builder:flatbuffers.Builder, extendedSpine:boolean|null, extendedPelvis:boolean|null, extendedKnee:boolean|null, forceArmsFromHmd:boolean|null, floorClip:boolean|null, skatingCorrection:boolean|null, viveEmulation:boolean|null, toeSnap:boolean|null, footPlant:boolean|null, selfLocalization:boolean|null):flatbuffers.Offset { +static createModelToggles(builder:flatbuffers.Builder, extendedSpine:boolean|null, extendedPelvis:boolean|null, extendedKnee:boolean|null, forceArmsFromHmd:boolean|null, floorClip:boolean|null, skatingCorrection:boolean|null, viveEmulation:boolean|null, toeSnap:boolean|null, footPlant:boolean|null, selfLocalization:boolean|null, usePosition:boolean|null):flatbuffers.Offset { ModelToggles.startModelToggles(builder); if (extendedSpine !== null) ModelToggles.addExtendedSpine(builder, extendedSpine); @@ -146,6 +155,8 @@ static createModelToggles(builder:flatbuffers.Builder, extendedSpine:boolean|nul ModelToggles.addFootPlant(builder, footPlant); if (selfLocalization !== null) ModelToggles.addSelfLocalization(builder, selfLocalization); + if (usePosition !== null) + ModelToggles.addUsePosition(builder, usePosition); return ModelToggles.endModelToggles(builder); } @@ -160,7 +171,8 @@ unpack(): ModelTogglesT { this.viveEmulation(), this.toeSnap(), this.footPlant(), - this.selfLocalization() + this.selfLocalization(), + this.usePosition() ); } @@ -176,6 +188,7 @@ unpackTo(_o: ModelTogglesT): void { _o.toeSnap = this.toeSnap(); _o.footPlant = this.footPlant(); _o.selfLocalization = this.selfLocalization(); + _o.usePosition = this.usePosition(); } } @@ -190,7 +203,8 @@ constructor( public viveEmulation: boolean|null = null, public toeSnap: boolean|null = null, public footPlant: boolean|null = null, - public selfLocalization: boolean|null = null + public selfLocalization: boolean|null = null, + public usePosition: boolean|null = null ){} @@ -205,7 +219,8 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { this.viveEmulation, this.toeSnap, this.footPlant, - this.selfLocalization + this.selfLocalization, + this.usePosition ); } } diff --git a/schema/settings/model.fbs b/schema/settings/model.fbs index 84bc0615..f02ad06d 100644 --- a/schema/settings/model.fbs +++ b/schema/settings/model.fbs @@ -12,6 +12,7 @@ table ModelToggles{ toe_snap: bool = null; foot_plant: bool = null; self_localization: bool = null; + use_position: bool = null; } /// Settings for the skeletal model that are ratios.