Skip to main content

fcb_core/fb/
geometry_generated.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2
3// @generated
4
5use core::cmp::Ordering;
6use core::mem;
7
8extern crate flatbuffers;
9use self::flatbuffers::{EndianScalar, Follow};
10
11#[deprecated(
12    since = "2.0.0",
13    note = "Use associated constants instead. This will no longer be generated in 2021."
14)]
15pub const ENUM_MIN_SEMANTIC_SURFACE_TYPE: u8 = 0;
16#[deprecated(
17    since = "2.0.0",
18    note = "Use associated constants instead. This will no longer be generated in 2021."
19)]
20pub const ENUM_MAX_SEMANTIC_SURFACE_TYPE: u8 = 18;
21#[deprecated(
22    since = "2.0.0",
23    note = "Use associated constants instead. This will no longer be generated in 2021."
24)]
25#[allow(non_camel_case_types)]
26pub const ENUM_VALUES_SEMANTIC_SURFACE_TYPE: [SemanticSurfaceType; 19] = [
27    SemanticSurfaceType::RoofSurface,
28    SemanticSurfaceType::GroundSurface,
29    SemanticSurfaceType::WallSurface,
30    SemanticSurfaceType::ClosureSurface,
31    SemanticSurfaceType::OuterCeilingSurface,
32    SemanticSurfaceType::OuterFloorSurface,
33    SemanticSurfaceType::Window,
34    SemanticSurfaceType::Door,
35    SemanticSurfaceType::InteriorWallSurface,
36    SemanticSurfaceType::CeilingSurface,
37    SemanticSurfaceType::FloorSurface,
38    SemanticSurfaceType::WaterSurface,
39    SemanticSurfaceType::WaterGroundSurface,
40    SemanticSurfaceType::WaterClosureSurface,
41    SemanticSurfaceType::TrafficArea,
42    SemanticSurfaceType::AuxiliaryTrafficArea,
43    SemanticSurfaceType::TransportationMarking,
44    SemanticSurfaceType::TransportationHole,
45    SemanticSurfaceType::ExtraSemanticSurface,
46];
47
48#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
49#[repr(transparent)]
50pub struct SemanticSurfaceType(pub u8);
51#[allow(non_upper_case_globals)]
52impl SemanticSurfaceType {
53    pub const RoofSurface: Self = Self(0);
54    pub const GroundSurface: Self = Self(1);
55    pub const WallSurface: Self = Self(2);
56    pub const ClosureSurface: Self = Self(3);
57    pub const OuterCeilingSurface: Self = Self(4);
58    pub const OuterFloorSurface: Self = Self(5);
59    pub const Window: Self = Self(6);
60    pub const Door: Self = Self(7);
61    pub const InteriorWallSurface: Self = Self(8);
62    pub const CeilingSurface: Self = Self(9);
63    pub const FloorSurface: Self = Self(10);
64    pub const WaterSurface: Self = Self(11);
65    pub const WaterGroundSurface: Self = Self(12);
66    pub const WaterClosureSurface: Self = Self(13);
67    pub const TrafficArea: Self = Self(14);
68    pub const AuxiliaryTrafficArea: Self = Self(15);
69    pub const TransportationMarking: Self = Self(16);
70    pub const TransportationHole: Self = Self(17);
71    pub const ExtraSemanticSurface: Self = Self(18);
72
73    pub const ENUM_MIN: u8 = 0;
74    pub const ENUM_MAX: u8 = 18;
75    pub const ENUM_VALUES: &'static [Self] = &[
76        Self::RoofSurface,
77        Self::GroundSurface,
78        Self::WallSurface,
79        Self::ClosureSurface,
80        Self::OuterCeilingSurface,
81        Self::OuterFloorSurface,
82        Self::Window,
83        Self::Door,
84        Self::InteriorWallSurface,
85        Self::CeilingSurface,
86        Self::FloorSurface,
87        Self::WaterSurface,
88        Self::WaterGroundSurface,
89        Self::WaterClosureSurface,
90        Self::TrafficArea,
91        Self::AuxiliaryTrafficArea,
92        Self::TransportationMarking,
93        Self::TransportationHole,
94        Self::ExtraSemanticSurface,
95    ];
96    /// Returns the variant's name or "" if unknown.
97    pub fn variant_name(self) -> Option<&'static str> {
98        match self {
99            Self::RoofSurface => Some("RoofSurface"),
100            Self::GroundSurface => Some("GroundSurface"),
101            Self::WallSurface => Some("WallSurface"),
102            Self::ClosureSurface => Some("ClosureSurface"),
103            Self::OuterCeilingSurface => Some("OuterCeilingSurface"),
104            Self::OuterFloorSurface => Some("OuterFloorSurface"),
105            Self::Window => Some("Window"),
106            Self::Door => Some("Door"),
107            Self::InteriorWallSurface => Some("InteriorWallSurface"),
108            Self::CeilingSurface => Some("CeilingSurface"),
109            Self::FloorSurface => Some("FloorSurface"),
110            Self::WaterSurface => Some("WaterSurface"),
111            Self::WaterGroundSurface => Some("WaterGroundSurface"),
112            Self::WaterClosureSurface => Some("WaterClosureSurface"),
113            Self::TrafficArea => Some("TrafficArea"),
114            Self::AuxiliaryTrafficArea => Some("AuxiliaryTrafficArea"),
115            Self::TransportationMarking => Some("TransportationMarking"),
116            Self::TransportationHole => Some("TransportationHole"),
117            Self::ExtraSemanticSurface => Some("ExtraSemanticSurface"),
118            _ => None,
119        }
120    }
121}
122impl core::fmt::Debug for SemanticSurfaceType {
123    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
124        if let Some(name) = self.variant_name() {
125            f.write_str(name)
126        } else {
127            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
128        }
129    }
130}
131impl<'a> flatbuffers::Follow<'a> for SemanticSurfaceType {
132    type Inner = Self;
133    #[inline]
134    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
135        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
136        Self(b)
137    }
138}
139
140impl flatbuffers::Push for SemanticSurfaceType {
141    type Output = SemanticSurfaceType;
142    #[inline]
143    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
144        unsafe {
145            flatbuffers::emplace_scalar::<u8>(dst, self.0);
146        }
147    }
148}
149
150impl flatbuffers::EndianScalar for SemanticSurfaceType {
151    type Scalar = u8;
152    #[inline]
153    fn to_little_endian(self) -> u8 {
154        self.0.to_le()
155    }
156    #[inline]
157    #[allow(clippy::wrong_self_convention)]
158    fn from_little_endian(v: u8) -> Self {
159        let b = u8::from_le(v);
160        Self(b)
161    }
162}
163
164impl<'a> flatbuffers::Verifiable for SemanticSurfaceType {
165    #[inline]
166    fn run_verifier(
167        v: &mut flatbuffers::Verifier,
168        pos: usize,
169    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
170        use self::flatbuffers::Verifiable;
171        u8::run_verifier(v, pos)
172    }
173}
174
175impl flatbuffers::SimpleToVerifyInSlice for SemanticSurfaceType {}
176#[deprecated(
177    since = "2.0.0",
178    note = "Use associated constants instead. This will no longer be generated in 2021."
179)]
180pub const ENUM_MIN_GEOMETRY_TYPE: u8 = 0;
181#[deprecated(
182    since = "2.0.0",
183    note = "Use associated constants instead. This will no longer be generated in 2021."
184)]
185pub const ENUM_MAX_GEOMETRY_TYPE: u8 = 7;
186#[deprecated(
187    since = "2.0.0",
188    note = "Use associated constants instead. This will no longer be generated in 2021."
189)]
190#[allow(non_camel_case_types)]
191pub const ENUM_VALUES_GEOMETRY_TYPE: [GeometryType; 8] = [
192    GeometryType::MultiPoint,
193    GeometryType::MultiLineString,
194    GeometryType::MultiSurface,
195    GeometryType::CompositeSurface,
196    GeometryType::Solid,
197    GeometryType::MultiSolid,
198    GeometryType::CompositeSolid,
199    GeometryType::GeometryInstance,
200];
201
202#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
203#[repr(transparent)]
204pub struct GeometryType(pub u8);
205#[allow(non_upper_case_globals)]
206impl GeometryType {
207    pub const MultiPoint: Self = Self(0);
208    pub const MultiLineString: Self = Self(1);
209    pub const MultiSurface: Self = Self(2);
210    pub const CompositeSurface: Self = Self(3);
211    pub const Solid: Self = Self(4);
212    pub const MultiSolid: Self = Self(5);
213    pub const CompositeSolid: Self = Self(6);
214    pub const GeometryInstance: Self = Self(7);
215
216    pub const ENUM_MIN: u8 = 0;
217    pub const ENUM_MAX: u8 = 7;
218    pub const ENUM_VALUES: &'static [Self] = &[
219        Self::MultiPoint,
220        Self::MultiLineString,
221        Self::MultiSurface,
222        Self::CompositeSurface,
223        Self::Solid,
224        Self::MultiSolid,
225        Self::CompositeSolid,
226        Self::GeometryInstance,
227    ];
228    /// Returns the variant's name or "" if unknown.
229    pub fn variant_name(self) -> Option<&'static str> {
230        match self {
231            Self::MultiPoint => Some("MultiPoint"),
232            Self::MultiLineString => Some("MultiLineString"),
233            Self::MultiSurface => Some("MultiSurface"),
234            Self::CompositeSurface => Some("CompositeSurface"),
235            Self::Solid => Some("Solid"),
236            Self::MultiSolid => Some("MultiSolid"),
237            Self::CompositeSolid => Some("CompositeSolid"),
238            Self::GeometryInstance => Some("GeometryInstance"),
239            _ => None,
240        }
241    }
242}
243impl core::fmt::Debug for GeometryType {
244    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
245        if let Some(name) = self.variant_name() {
246            f.write_str(name)
247        } else {
248            f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
249        }
250    }
251}
252impl<'a> flatbuffers::Follow<'a> for GeometryType {
253    type Inner = Self;
254    #[inline]
255    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
256        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
257        Self(b)
258    }
259}
260
261impl flatbuffers::Push for GeometryType {
262    type Output = GeometryType;
263    #[inline]
264    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
265        unsafe {
266            flatbuffers::emplace_scalar::<u8>(dst, self.0);
267        }
268    }
269}
270
271impl flatbuffers::EndianScalar for GeometryType {
272    type Scalar = u8;
273    #[inline]
274    fn to_little_endian(self) -> u8 {
275        self.0.to_le()
276    }
277    #[inline]
278    #[allow(clippy::wrong_self_convention)]
279    fn from_little_endian(v: u8) -> Self {
280        let b = u8::from_le(v);
281        Self(b)
282    }
283}
284
285impl<'a> flatbuffers::Verifiable for GeometryType {
286    #[inline]
287    fn run_verifier(
288        v: &mut flatbuffers::Verifier,
289        pos: usize,
290    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
291        use self::flatbuffers::Verifiable;
292        u8::run_verifier(v, pos)
293    }
294}
295
296impl flatbuffers::SimpleToVerifyInSlice for GeometryType {}
297// struct TransformationMatrix, aligned to 8
298#[repr(transparent)]
299#[derive(Clone, Copy, PartialEq)]
300pub struct TransformationMatrix(pub [u8; 128]);
301impl Default for TransformationMatrix {
302    fn default() -> Self {
303        Self([0; 128])
304    }
305}
306impl core::fmt::Debug for TransformationMatrix {
307    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
308        f.debug_struct("TransformationMatrix")
309            .field("m00", &self.m00())
310            .field("m01", &self.m01())
311            .field("m02", &self.m02())
312            .field("m03", &self.m03())
313            .field("m10", &self.m10())
314            .field("m11", &self.m11())
315            .field("m12", &self.m12())
316            .field("m13", &self.m13())
317            .field("m20", &self.m20())
318            .field("m21", &self.m21())
319            .field("m22", &self.m22())
320            .field("m23", &self.m23())
321            .field("m30", &self.m30())
322            .field("m31", &self.m31())
323            .field("m32", &self.m32())
324            .field("m33", &self.m33())
325            .finish()
326    }
327}
328
329impl flatbuffers::SimpleToVerifyInSlice for TransformationMatrix {}
330impl<'a> flatbuffers::Follow<'a> for TransformationMatrix {
331    type Inner = &'a TransformationMatrix;
332    #[inline]
333    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
334        unsafe { <&'a TransformationMatrix>::follow(buf, loc) }
335    }
336}
337impl<'a> flatbuffers::Follow<'a> for &'a TransformationMatrix {
338    type Inner = &'a TransformationMatrix;
339    #[inline]
340    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
341        unsafe { flatbuffers::follow_cast_ref::<TransformationMatrix>(buf, loc) }
342    }
343}
344impl<'b> flatbuffers::Push for TransformationMatrix {
345    type Output = TransformationMatrix;
346    #[inline]
347    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
348        let src = unsafe {
349            ::core::slice::from_raw_parts(
350                self as *const TransformationMatrix as *const u8,
351                <Self as flatbuffers::Push>::size(),
352            )
353        };
354        dst.copy_from_slice(src);
355    }
356    #[inline]
357    fn alignment() -> flatbuffers::PushAlignment {
358        flatbuffers::PushAlignment::new(8)
359    }
360}
361
362impl<'a> flatbuffers::Verifiable for TransformationMatrix {
363    #[inline]
364    fn run_verifier(
365        v: &mut flatbuffers::Verifier,
366        pos: usize,
367    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
368        use self::flatbuffers::Verifiable;
369        v.in_buffer::<Self>(pos)
370    }
371}
372
373impl<'a> TransformationMatrix {
374    #[allow(clippy::too_many_arguments)]
375    pub fn new(
376        m00: f64,
377        m01: f64,
378        m02: f64,
379        m03: f64,
380        m10: f64,
381        m11: f64,
382        m12: f64,
383        m13: f64,
384        m20: f64,
385        m21: f64,
386        m22: f64,
387        m23: f64,
388        m30: f64,
389        m31: f64,
390        m32: f64,
391        m33: f64,
392    ) -> Self {
393        let mut s = Self([0; 128]);
394        s.set_m00(m00);
395        s.set_m01(m01);
396        s.set_m02(m02);
397        s.set_m03(m03);
398        s.set_m10(m10);
399        s.set_m11(m11);
400        s.set_m12(m12);
401        s.set_m13(m13);
402        s.set_m20(m20);
403        s.set_m21(m21);
404        s.set_m22(m22);
405        s.set_m23(m23);
406        s.set_m30(m30);
407        s.set_m31(m31);
408        s.set_m32(m32);
409        s.set_m33(m33);
410        s
411    }
412
413    pub fn m00(&self) -> f64 {
414        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
415        // Safety:
416        // Created from a valid Table for this object
417        // Which contains a valid value in this slot
418        EndianScalar::from_little_endian(unsafe {
419            core::ptr::copy_nonoverlapping(
420                self.0[0..].as_ptr(),
421                mem.as_mut_ptr() as *mut u8,
422                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
423            );
424            mem.assume_init()
425        })
426    }
427
428    pub fn set_m00(&mut self, x: f64) {
429        let x_le = x.to_little_endian();
430        // Safety:
431        // Created from a valid Table for this object
432        // Which contains a valid value in this slot
433        unsafe {
434            core::ptr::copy_nonoverlapping(
435                &x_le as *const _ as *const u8,
436                self.0[0..].as_mut_ptr(),
437                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
438            );
439        }
440    }
441
442    pub fn m01(&self) -> f64 {
443        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
444        // Safety:
445        // Created from a valid Table for this object
446        // Which contains a valid value in this slot
447        EndianScalar::from_little_endian(unsafe {
448            core::ptr::copy_nonoverlapping(
449                self.0[8..].as_ptr(),
450                mem.as_mut_ptr() as *mut u8,
451                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
452            );
453            mem.assume_init()
454        })
455    }
456
457    pub fn set_m01(&mut self, x: f64) {
458        let x_le = x.to_little_endian();
459        // Safety:
460        // Created from a valid Table for this object
461        // Which contains a valid value in this slot
462        unsafe {
463            core::ptr::copy_nonoverlapping(
464                &x_le as *const _ as *const u8,
465                self.0[8..].as_mut_ptr(),
466                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
467            );
468        }
469    }
470
471    pub fn m02(&self) -> f64 {
472        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
473        // Safety:
474        // Created from a valid Table for this object
475        // Which contains a valid value in this slot
476        EndianScalar::from_little_endian(unsafe {
477            core::ptr::copy_nonoverlapping(
478                self.0[16..].as_ptr(),
479                mem.as_mut_ptr() as *mut u8,
480                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
481            );
482            mem.assume_init()
483        })
484    }
485
486    pub fn set_m02(&mut self, x: f64) {
487        let x_le = x.to_little_endian();
488        // Safety:
489        // Created from a valid Table for this object
490        // Which contains a valid value in this slot
491        unsafe {
492            core::ptr::copy_nonoverlapping(
493                &x_le as *const _ as *const u8,
494                self.0[16..].as_mut_ptr(),
495                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
496            );
497        }
498    }
499
500    pub fn m03(&self) -> f64 {
501        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
502        // Safety:
503        // Created from a valid Table for this object
504        // Which contains a valid value in this slot
505        EndianScalar::from_little_endian(unsafe {
506            core::ptr::copy_nonoverlapping(
507                self.0[24..].as_ptr(),
508                mem.as_mut_ptr() as *mut u8,
509                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
510            );
511            mem.assume_init()
512        })
513    }
514
515    pub fn set_m03(&mut self, x: f64) {
516        let x_le = x.to_little_endian();
517        // Safety:
518        // Created from a valid Table for this object
519        // Which contains a valid value in this slot
520        unsafe {
521            core::ptr::copy_nonoverlapping(
522                &x_le as *const _ as *const u8,
523                self.0[24..].as_mut_ptr(),
524                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
525            );
526        }
527    }
528
529    pub fn m10(&self) -> f64 {
530        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
531        // Safety:
532        // Created from a valid Table for this object
533        // Which contains a valid value in this slot
534        EndianScalar::from_little_endian(unsafe {
535            core::ptr::copy_nonoverlapping(
536                self.0[32..].as_ptr(),
537                mem.as_mut_ptr() as *mut u8,
538                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
539            );
540            mem.assume_init()
541        })
542    }
543
544    pub fn set_m10(&mut self, x: f64) {
545        let x_le = x.to_little_endian();
546        // Safety:
547        // Created from a valid Table for this object
548        // Which contains a valid value in this slot
549        unsafe {
550            core::ptr::copy_nonoverlapping(
551                &x_le as *const _ as *const u8,
552                self.0[32..].as_mut_ptr(),
553                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
554            );
555        }
556    }
557
558    pub fn m11(&self) -> f64 {
559        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
560        // Safety:
561        // Created from a valid Table for this object
562        // Which contains a valid value in this slot
563        EndianScalar::from_little_endian(unsafe {
564            core::ptr::copy_nonoverlapping(
565                self.0[40..].as_ptr(),
566                mem.as_mut_ptr() as *mut u8,
567                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
568            );
569            mem.assume_init()
570        })
571    }
572
573    pub fn set_m11(&mut self, x: f64) {
574        let x_le = x.to_little_endian();
575        // Safety:
576        // Created from a valid Table for this object
577        // Which contains a valid value in this slot
578        unsafe {
579            core::ptr::copy_nonoverlapping(
580                &x_le as *const _ as *const u8,
581                self.0[40..].as_mut_ptr(),
582                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
583            );
584        }
585    }
586
587    pub fn m12(&self) -> f64 {
588        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
589        // Safety:
590        // Created from a valid Table for this object
591        // Which contains a valid value in this slot
592        EndianScalar::from_little_endian(unsafe {
593            core::ptr::copy_nonoverlapping(
594                self.0[48..].as_ptr(),
595                mem.as_mut_ptr() as *mut u8,
596                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
597            );
598            mem.assume_init()
599        })
600    }
601
602    pub fn set_m12(&mut self, x: f64) {
603        let x_le = x.to_little_endian();
604        // Safety:
605        // Created from a valid Table for this object
606        // Which contains a valid value in this slot
607        unsafe {
608            core::ptr::copy_nonoverlapping(
609                &x_le as *const _ as *const u8,
610                self.0[48..].as_mut_ptr(),
611                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
612            );
613        }
614    }
615
616    pub fn m13(&self) -> f64 {
617        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
618        // Safety:
619        // Created from a valid Table for this object
620        // Which contains a valid value in this slot
621        EndianScalar::from_little_endian(unsafe {
622            core::ptr::copy_nonoverlapping(
623                self.0[56..].as_ptr(),
624                mem.as_mut_ptr() as *mut u8,
625                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
626            );
627            mem.assume_init()
628        })
629    }
630
631    pub fn set_m13(&mut self, x: f64) {
632        let x_le = x.to_little_endian();
633        // Safety:
634        // Created from a valid Table for this object
635        // Which contains a valid value in this slot
636        unsafe {
637            core::ptr::copy_nonoverlapping(
638                &x_le as *const _ as *const u8,
639                self.0[56..].as_mut_ptr(),
640                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
641            );
642        }
643    }
644
645    pub fn m20(&self) -> f64 {
646        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
647        // Safety:
648        // Created from a valid Table for this object
649        // Which contains a valid value in this slot
650        EndianScalar::from_little_endian(unsafe {
651            core::ptr::copy_nonoverlapping(
652                self.0[64..].as_ptr(),
653                mem.as_mut_ptr() as *mut u8,
654                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
655            );
656            mem.assume_init()
657        })
658    }
659
660    pub fn set_m20(&mut self, x: f64) {
661        let x_le = x.to_little_endian();
662        // Safety:
663        // Created from a valid Table for this object
664        // Which contains a valid value in this slot
665        unsafe {
666            core::ptr::copy_nonoverlapping(
667                &x_le as *const _ as *const u8,
668                self.0[64..].as_mut_ptr(),
669                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
670            );
671        }
672    }
673
674    pub fn m21(&self) -> f64 {
675        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
676        // Safety:
677        // Created from a valid Table for this object
678        // Which contains a valid value in this slot
679        EndianScalar::from_little_endian(unsafe {
680            core::ptr::copy_nonoverlapping(
681                self.0[72..].as_ptr(),
682                mem.as_mut_ptr() as *mut u8,
683                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
684            );
685            mem.assume_init()
686        })
687    }
688
689    pub fn set_m21(&mut self, x: f64) {
690        let x_le = x.to_little_endian();
691        // Safety:
692        // Created from a valid Table for this object
693        // Which contains a valid value in this slot
694        unsafe {
695            core::ptr::copy_nonoverlapping(
696                &x_le as *const _ as *const u8,
697                self.0[72..].as_mut_ptr(),
698                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
699            );
700        }
701    }
702
703    pub fn m22(&self) -> f64 {
704        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
705        // Safety:
706        // Created from a valid Table for this object
707        // Which contains a valid value in this slot
708        EndianScalar::from_little_endian(unsafe {
709            core::ptr::copy_nonoverlapping(
710                self.0[80..].as_ptr(),
711                mem.as_mut_ptr() as *mut u8,
712                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
713            );
714            mem.assume_init()
715        })
716    }
717
718    pub fn set_m22(&mut self, x: f64) {
719        let x_le = x.to_little_endian();
720        // Safety:
721        // Created from a valid Table for this object
722        // Which contains a valid value in this slot
723        unsafe {
724            core::ptr::copy_nonoverlapping(
725                &x_le as *const _ as *const u8,
726                self.0[80..].as_mut_ptr(),
727                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
728            );
729        }
730    }
731
732    pub fn m23(&self) -> f64 {
733        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
734        // Safety:
735        // Created from a valid Table for this object
736        // Which contains a valid value in this slot
737        EndianScalar::from_little_endian(unsafe {
738            core::ptr::copy_nonoverlapping(
739                self.0[88..].as_ptr(),
740                mem.as_mut_ptr() as *mut u8,
741                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
742            );
743            mem.assume_init()
744        })
745    }
746
747    pub fn set_m23(&mut self, x: f64) {
748        let x_le = x.to_little_endian();
749        // Safety:
750        // Created from a valid Table for this object
751        // Which contains a valid value in this slot
752        unsafe {
753            core::ptr::copy_nonoverlapping(
754                &x_le as *const _ as *const u8,
755                self.0[88..].as_mut_ptr(),
756                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
757            );
758        }
759    }
760
761    pub fn m30(&self) -> f64 {
762        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
763        // Safety:
764        // Created from a valid Table for this object
765        // Which contains a valid value in this slot
766        EndianScalar::from_little_endian(unsafe {
767            core::ptr::copy_nonoverlapping(
768                self.0[96..].as_ptr(),
769                mem.as_mut_ptr() as *mut u8,
770                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
771            );
772            mem.assume_init()
773        })
774    }
775
776    pub fn set_m30(&mut self, x: f64) {
777        let x_le = x.to_little_endian();
778        // Safety:
779        // Created from a valid Table for this object
780        // Which contains a valid value in this slot
781        unsafe {
782            core::ptr::copy_nonoverlapping(
783                &x_le as *const _ as *const u8,
784                self.0[96..].as_mut_ptr(),
785                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
786            );
787        }
788    }
789
790    pub fn m31(&self) -> f64 {
791        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
792        // Safety:
793        // Created from a valid Table for this object
794        // Which contains a valid value in this slot
795        EndianScalar::from_little_endian(unsafe {
796            core::ptr::copy_nonoverlapping(
797                self.0[104..].as_ptr(),
798                mem.as_mut_ptr() as *mut u8,
799                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
800            );
801            mem.assume_init()
802        })
803    }
804
805    pub fn set_m31(&mut self, x: f64) {
806        let x_le = x.to_little_endian();
807        // Safety:
808        // Created from a valid Table for this object
809        // Which contains a valid value in this slot
810        unsafe {
811            core::ptr::copy_nonoverlapping(
812                &x_le as *const _ as *const u8,
813                self.0[104..].as_mut_ptr(),
814                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
815            );
816        }
817    }
818
819    pub fn m32(&self) -> f64 {
820        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
821        // Safety:
822        // Created from a valid Table for this object
823        // Which contains a valid value in this slot
824        EndianScalar::from_little_endian(unsafe {
825            core::ptr::copy_nonoverlapping(
826                self.0[112..].as_ptr(),
827                mem.as_mut_ptr() as *mut u8,
828                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
829            );
830            mem.assume_init()
831        })
832    }
833
834    pub fn set_m32(&mut self, x: f64) {
835        let x_le = x.to_little_endian();
836        // Safety:
837        // Created from a valid Table for this object
838        // Which contains a valid value in this slot
839        unsafe {
840            core::ptr::copy_nonoverlapping(
841                &x_le as *const _ as *const u8,
842                self.0[112..].as_mut_ptr(),
843                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
844            );
845        }
846    }
847
848    pub fn m33(&self) -> f64 {
849        let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
850        // Safety:
851        // Created from a valid Table for this object
852        // Which contains a valid value in this slot
853        EndianScalar::from_little_endian(unsafe {
854            core::ptr::copy_nonoverlapping(
855                self.0[120..].as_ptr(),
856                mem.as_mut_ptr() as *mut u8,
857                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
858            );
859            mem.assume_init()
860        })
861    }
862
863    pub fn set_m33(&mut self, x: f64) {
864        let x_le = x.to_little_endian();
865        // Safety:
866        // Created from a valid Table for this object
867        // Which contains a valid value in this slot
868        unsafe {
869            core::ptr::copy_nonoverlapping(
870                &x_le as *const _ as *const u8,
871                self.0[120..].as_mut_ptr(),
872                core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
873            );
874        }
875    }
876}
877
878pub enum MaterialMappingOffset {}
879#[derive(Copy, Clone, PartialEq)]
880
881pub struct MaterialMapping<'a> {
882    pub _tab: flatbuffers::Table<'a>,
883}
884
885impl<'a> flatbuffers::Follow<'a> for MaterialMapping<'a> {
886    type Inner = MaterialMapping<'a>;
887    #[inline]
888    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
889        Self {
890            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
891        }
892    }
893}
894
895impl<'a> MaterialMapping<'a> {
896    pub const VT_THEME: flatbuffers::VOffsetT = 4;
897    pub const VT_SOLIDS: flatbuffers::VOffsetT = 6;
898    pub const VT_SHELLS: flatbuffers::VOffsetT = 8;
899    pub const VT_VERTICES: flatbuffers::VOffsetT = 10;
900    pub const VT_VALUE: flatbuffers::VOffsetT = 12;
901
902    #[inline]
903    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
904        MaterialMapping { _tab: table }
905    }
906    #[allow(unused_mut)]
907    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
908        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
909        args: &'args MaterialMappingArgs<'args>,
910    ) -> flatbuffers::WIPOffset<MaterialMapping<'bldr>> {
911        let mut builder = MaterialMappingBuilder::new(_fbb);
912        if let Some(x) = args.value {
913            builder.add_value(x);
914        }
915        if let Some(x) = args.vertices {
916            builder.add_vertices(x);
917        }
918        if let Some(x) = args.shells {
919            builder.add_shells(x);
920        }
921        if let Some(x) = args.solids {
922            builder.add_solids(x);
923        }
924        if let Some(x) = args.theme {
925            builder.add_theme(x);
926        }
927        builder.finish()
928    }
929
930    #[inline]
931    pub fn theme(&self) -> Option<&'a str> {
932        // Safety:
933        // Created from valid Table for this object
934        // which contains a valid value in this slot
935        unsafe {
936            self._tab
937                .get::<flatbuffers::ForwardsUOffset<&str>>(MaterialMapping::VT_THEME, None)
938        }
939    }
940    #[inline]
941    pub fn solids(&self) -> Option<flatbuffers::Vector<'a, u32>> {
942        // Safety:
943        // Created from valid Table for this object
944        // which contains a valid value in this slot
945        unsafe {
946            self._tab
947                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
948                    MaterialMapping::VT_SOLIDS,
949                    None,
950                )
951        }
952    }
953    #[inline]
954    pub fn shells(&self) -> Option<flatbuffers::Vector<'a, u32>> {
955        // Safety:
956        // Created from valid Table for this object
957        // which contains a valid value in this slot
958        unsafe {
959            self._tab
960                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
961                    MaterialMapping::VT_SHELLS,
962                    None,
963                )
964        }
965    }
966    #[inline]
967    pub fn vertices(&self) -> Option<flatbuffers::Vector<'a, u32>> {
968        // Safety:
969        // Created from valid Table for this object
970        // which contains a valid value in this slot
971        unsafe {
972            self._tab
973                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
974                    MaterialMapping::VT_VERTICES,
975                    None,
976                )
977        }
978    }
979    #[inline]
980    pub fn value(&self) -> Option<u32> {
981        // Safety:
982        // Created from valid Table for this object
983        // which contains a valid value in this slot
984        unsafe { self._tab.get::<u32>(MaterialMapping::VT_VALUE, None) }
985    }
986}
987
988impl flatbuffers::Verifiable for MaterialMapping<'_> {
989    #[inline]
990    fn run_verifier(
991        v: &mut flatbuffers::Verifier,
992        pos: usize,
993    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
994        use self::flatbuffers::Verifiable;
995        v.visit_table(pos)?
996            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("theme", Self::VT_THEME, false)?
997            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
998                "solids",
999                Self::VT_SOLIDS,
1000                false,
1001            )?
1002            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1003                "shells",
1004                Self::VT_SHELLS,
1005                false,
1006            )?
1007            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1008                "vertices",
1009                Self::VT_VERTICES,
1010                false,
1011            )?
1012            .visit_field::<u32>("value", Self::VT_VALUE, false)?
1013            .finish();
1014        Ok(())
1015    }
1016}
1017pub struct MaterialMappingArgs<'a> {
1018    pub theme: Option<flatbuffers::WIPOffset<&'a str>>,
1019    pub solids: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1020    pub shells: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1021    pub vertices: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1022    pub value: Option<u32>,
1023}
1024impl<'a> Default for MaterialMappingArgs<'a> {
1025    #[inline]
1026    fn default() -> Self {
1027        MaterialMappingArgs {
1028            theme: None,
1029            solids: None,
1030            shells: None,
1031            vertices: None,
1032            value: None,
1033        }
1034    }
1035}
1036
1037pub struct MaterialMappingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1038    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1039    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1040}
1041impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MaterialMappingBuilder<'a, 'b, A> {
1042    #[inline]
1043    pub fn add_theme(&mut self, theme: flatbuffers::WIPOffset<&'b str>) {
1044        self.fbb_
1045            .push_slot_always::<flatbuffers::WIPOffset<_>>(MaterialMapping::VT_THEME, theme);
1046    }
1047    #[inline]
1048    pub fn add_solids(&mut self, solids: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1049        self.fbb_
1050            .push_slot_always::<flatbuffers::WIPOffset<_>>(MaterialMapping::VT_SOLIDS, solids);
1051    }
1052    #[inline]
1053    pub fn add_shells(&mut self, shells: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1054        self.fbb_
1055            .push_slot_always::<flatbuffers::WIPOffset<_>>(MaterialMapping::VT_SHELLS, shells);
1056    }
1057    #[inline]
1058    pub fn add_vertices(&mut self, vertices: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1059        self.fbb_
1060            .push_slot_always::<flatbuffers::WIPOffset<_>>(MaterialMapping::VT_VERTICES, vertices);
1061    }
1062    #[inline]
1063    pub fn add_value(&mut self, value: u32) {
1064        self.fbb_
1065            .push_slot_always::<u32>(MaterialMapping::VT_VALUE, value);
1066    }
1067    #[inline]
1068    pub fn new(
1069        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1070    ) -> MaterialMappingBuilder<'a, 'b, A> {
1071        let start = _fbb.start_table();
1072        MaterialMappingBuilder {
1073            fbb_: _fbb,
1074            start_: start,
1075        }
1076    }
1077    #[inline]
1078    pub fn finish(self) -> flatbuffers::WIPOffset<MaterialMapping<'a>> {
1079        let o = self.fbb_.end_table(self.start_);
1080        flatbuffers::WIPOffset::new(o.value())
1081    }
1082}
1083
1084impl core::fmt::Debug for MaterialMapping<'_> {
1085    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1086        let mut ds = f.debug_struct("MaterialMapping");
1087        ds.field("theme", &self.theme());
1088        ds.field("solids", &self.solids());
1089        ds.field("shells", &self.shells());
1090        ds.field("vertices", &self.vertices());
1091        ds.field("value", &self.value());
1092        ds.finish()
1093    }
1094}
1095pub enum TextureMappingOffset {}
1096#[derive(Copy, Clone, PartialEq)]
1097
1098pub struct TextureMapping<'a> {
1099    pub _tab: flatbuffers::Table<'a>,
1100}
1101
1102impl<'a> flatbuffers::Follow<'a> for TextureMapping<'a> {
1103    type Inner = TextureMapping<'a>;
1104    #[inline]
1105    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1106        Self {
1107            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1108        }
1109    }
1110}
1111
1112impl<'a> TextureMapping<'a> {
1113    pub const VT_THEME: flatbuffers::VOffsetT = 4;
1114    pub const VT_SOLIDS: flatbuffers::VOffsetT = 6;
1115    pub const VT_SHELLS: flatbuffers::VOffsetT = 8;
1116    pub const VT_SURFACES: flatbuffers::VOffsetT = 10;
1117    pub const VT_STRINGS: flatbuffers::VOffsetT = 12;
1118    pub const VT_VERTICES: flatbuffers::VOffsetT = 14;
1119
1120    #[inline]
1121    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1122        TextureMapping { _tab: table }
1123    }
1124    #[allow(unused_mut)]
1125    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1126        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1127        args: &'args TextureMappingArgs<'args>,
1128    ) -> flatbuffers::WIPOffset<TextureMapping<'bldr>> {
1129        let mut builder = TextureMappingBuilder::new(_fbb);
1130        if let Some(x) = args.vertices {
1131            builder.add_vertices(x);
1132        }
1133        if let Some(x) = args.strings {
1134            builder.add_strings(x);
1135        }
1136        if let Some(x) = args.surfaces {
1137            builder.add_surfaces(x);
1138        }
1139        if let Some(x) = args.shells {
1140            builder.add_shells(x);
1141        }
1142        if let Some(x) = args.solids {
1143            builder.add_solids(x);
1144        }
1145        if let Some(x) = args.theme {
1146            builder.add_theme(x);
1147        }
1148        builder.finish()
1149    }
1150
1151    #[inline]
1152    pub fn theme(&self) -> Option<&'a str> {
1153        // Safety:
1154        // Created from valid Table for this object
1155        // which contains a valid value in this slot
1156        unsafe {
1157            self._tab
1158                .get::<flatbuffers::ForwardsUOffset<&str>>(TextureMapping::VT_THEME, None)
1159        }
1160    }
1161    #[inline]
1162    pub fn solids(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1163        // Safety:
1164        // Created from valid Table for this object
1165        // which contains a valid value in this slot
1166        unsafe {
1167            self._tab
1168                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1169                    TextureMapping::VT_SOLIDS,
1170                    None,
1171                )
1172        }
1173    }
1174    #[inline]
1175    pub fn shells(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1176        // Safety:
1177        // Created from valid Table for this object
1178        // which contains a valid value in this slot
1179        unsafe {
1180            self._tab
1181                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1182                    TextureMapping::VT_SHELLS,
1183                    None,
1184                )
1185        }
1186    }
1187    #[inline]
1188    pub fn surfaces(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1189        // Safety:
1190        // Created from valid Table for this object
1191        // which contains a valid value in this slot
1192        unsafe {
1193            self._tab
1194                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1195                    TextureMapping::VT_SURFACES,
1196                    None,
1197                )
1198        }
1199    }
1200    #[inline]
1201    pub fn strings(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1202        // Safety:
1203        // Created from valid Table for this object
1204        // which contains a valid value in this slot
1205        unsafe {
1206            self._tab
1207                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1208                    TextureMapping::VT_STRINGS,
1209                    None,
1210                )
1211        }
1212    }
1213    #[inline]
1214    pub fn vertices(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1215        // Safety:
1216        // Created from valid Table for this object
1217        // which contains a valid value in this slot
1218        unsafe {
1219            self._tab
1220                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1221                    TextureMapping::VT_VERTICES,
1222                    None,
1223                )
1224        }
1225    }
1226}
1227
1228impl flatbuffers::Verifiable for TextureMapping<'_> {
1229    #[inline]
1230    fn run_verifier(
1231        v: &mut flatbuffers::Verifier,
1232        pos: usize,
1233    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1234        use self::flatbuffers::Verifiable;
1235        v.visit_table(pos)?
1236            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("theme", Self::VT_THEME, false)?
1237            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1238                "solids",
1239                Self::VT_SOLIDS,
1240                false,
1241            )?
1242            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1243                "shells",
1244                Self::VT_SHELLS,
1245                false,
1246            )?
1247            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1248                "surfaces",
1249                Self::VT_SURFACES,
1250                false,
1251            )?
1252            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1253                "strings",
1254                Self::VT_STRINGS,
1255                false,
1256            )?
1257            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1258                "vertices",
1259                Self::VT_VERTICES,
1260                false,
1261            )?
1262            .finish();
1263        Ok(())
1264    }
1265}
1266pub struct TextureMappingArgs<'a> {
1267    pub theme: Option<flatbuffers::WIPOffset<&'a str>>,
1268    pub solids: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1269    pub shells: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1270    pub surfaces: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1271    pub strings: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1272    pub vertices: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1273}
1274impl<'a> Default for TextureMappingArgs<'a> {
1275    #[inline]
1276    fn default() -> Self {
1277        TextureMappingArgs {
1278            theme: None,
1279            solids: None,
1280            shells: None,
1281            surfaces: None,
1282            strings: None,
1283            vertices: None,
1284        }
1285    }
1286}
1287
1288pub struct TextureMappingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1289    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1290    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1291}
1292impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TextureMappingBuilder<'a, 'b, A> {
1293    #[inline]
1294    pub fn add_theme(&mut self, theme: flatbuffers::WIPOffset<&'b str>) {
1295        self.fbb_
1296            .push_slot_always::<flatbuffers::WIPOffset<_>>(TextureMapping::VT_THEME, theme);
1297    }
1298    #[inline]
1299    pub fn add_solids(&mut self, solids: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1300        self.fbb_
1301            .push_slot_always::<flatbuffers::WIPOffset<_>>(TextureMapping::VT_SOLIDS, solids);
1302    }
1303    #[inline]
1304    pub fn add_shells(&mut self, shells: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1305        self.fbb_
1306            .push_slot_always::<flatbuffers::WIPOffset<_>>(TextureMapping::VT_SHELLS, shells);
1307    }
1308    #[inline]
1309    pub fn add_surfaces(&mut self, surfaces: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1310        self.fbb_
1311            .push_slot_always::<flatbuffers::WIPOffset<_>>(TextureMapping::VT_SURFACES, surfaces);
1312    }
1313    #[inline]
1314    pub fn add_strings(&mut self, strings: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1315        self.fbb_
1316            .push_slot_always::<flatbuffers::WIPOffset<_>>(TextureMapping::VT_STRINGS, strings);
1317    }
1318    #[inline]
1319    pub fn add_vertices(&mut self, vertices: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1320        self.fbb_
1321            .push_slot_always::<flatbuffers::WIPOffset<_>>(TextureMapping::VT_VERTICES, vertices);
1322    }
1323    #[inline]
1324    pub fn new(
1325        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1326    ) -> TextureMappingBuilder<'a, 'b, A> {
1327        let start = _fbb.start_table();
1328        TextureMappingBuilder {
1329            fbb_: _fbb,
1330            start_: start,
1331        }
1332    }
1333    #[inline]
1334    pub fn finish(self) -> flatbuffers::WIPOffset<TextureMapping<'a>> {
1335        let o = self.fbb_.end_table(self.start_);
1336        flatbuffers::WIPOffset::new(o.value())
1337    }
1338}
1339
1340impl core::fmt::Debug for TextureMapping<'_> {
1341    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1342        let mut ds = f.debug_struct("TextureMapping");
1343        ds.field("theme", &self.theme());
1344        ds.field("solids", &self.solids());
1345        ds.field("shells", &self.shells());
1346        ds.field("surfaces", &self.surfaces());
1347        ds.field("strings", &self.strings());
1348        ds.field("vertices", &self.vertices());
1349        ds.finish()
1350    }
1351}
1352pub enum GeometryOffset {}
1353#[derive(Copy, Clone, PartialEq)]
1354
1355pub struct Geometry<'a> {
1356    pub _tab: flatbuffers::Table<'a>,
1357}
1358
1359impl<'a> flatbuffers::Follow<'a> for Geometry<'a> {
1360    type Inner = Geometry<'a>;
1361    #[inline]
1362    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1363        Self {
1364            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1365        }
1366    }
1367}
1368
1369impl<'a> Geometry<'a> {
1370    pub const VT_TYPE_: flatbuffers::VOffsetT = 4;
1371    pub const VT_LOD: flatbuffers::VOffsetT = 6;
1372    pub const VT_SOLIDS: flatbuffers::VOffsetT = 8;
1373    pub const VT_SHELLS: flatbuffers::VOffsetT = 10;
1374    pub const VT_SURFACES: flatbuffers::VOffsetT = 12;
1375    pub const VT_STRINGS: flatbuffers::VOffsetT = 14;
1376    pub const VT_BOUNDARIES: flatbuffers::VOffsetT = 16;
1377    pub const VT_SEMANTICS: flatbuffers::VOffsetT = 18;
1378    pub const VT_SEMANTICS_OBJECTS: flatbuffers::VOffsetT = 20;
1379    pub const VT_MATERIAL: flatbuffers::VOffsetT = 22;
1380    pub const VT_TEXTURE: flatbuffers::VOffsetT = 24;
1381
1382    #[inline]
1383    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1384        Geometry { _tab: table }
1385    }
1386    #[allow(unused_mut)]
1387    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1388        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1389        args: &'args GeometryArgs<'args>,
1390    ) -> flatbuffers::WIPOffset<Geometry<'bldr>> {
1391        let mut builder = GeometryBuilder::new(_fbb);
1392        if let Some(x) = args.texture {
1393            builder.add_texture(x);
1394        }
1395        if let Some(x) = args.material {
1396            builder.add_material(x);
1397        }
1398        if let Some(x) = args.semantics_objects {
1399            builder.add_semantics_objects(x);
1400        }
1401        if let Some(x) = args.semantics {
1402            builder.add_semantics(x);
1403        }
1404        if let Some(x) = args.boundaries {
1405            builder.add_boundaries(x);
1406        }
1407        if let Some(x) = args.strings {
1408            builder.add_strings(x);
1409        }
1410        if let Some(x) = args.surfaces {
1411            builder.add_surfaces(x);
1412        }
1413        if let Some(x) = args.shells {
1414            builder.add_shells(x);
1415        }
1416        if let Some(x) = args.solids {
1417            builder.add_solids(x);
1418        }
1419        if let Some(x) = args.lod {
1420            builder.add_lod(x);
1421        }
1422        builder.add_type_(args.type_);
1423        builder.finish()
1424    }
1425
1426    #[inline]
1427    pub fn type_(&self) -> GeometryType {
1428        // Safety:
1429        // Created from valid Table for this object
1430        // which contains a valid value in this slot
1431        unsafe {
1432            self._tab
1433                .get::<GeometryType>(Geometry::VT_TYPE_, Some(GeometryType::MultiPoint))
1434                .unwrap()
1435        }
1436    }
1437    #[inline]
1438    pub fn lod(&self) -> Option<&'a str> {
1439        // Safety:
1440        // Created from valid Table for this object
1441        // which contains a valid value in this slot
1442        unsafe {
1443            self._tab
1444                .get::<flatbuffers::ForwardsUOffset<&str>>(Geometry::VT_LOD, None)
1445        }
1446    }
1447    #[inline]
1448    pub fn solids(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1449        // Safety:
1450        // Created from valid Table for this object
1451        // which contains a valid value in this slot
1452        unsafe {
1453            self._tab
1454                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1455                    Geometry::VT_SOLIDS,
1456                    None,
1457                )
1458        }
1459    }
1460    #[inline]
1461    pub fn shells(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1462        // Safety:
1463        // Created from valid Table for this object
1464        // which contains a valid value in this slot
1465        unsafe {
1466            self._tab
1467                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1468                    Geometry::VT_SHELLS,
1469                    None,
1470                )
1471        }
1472    }
1473    #[inline]
1474    pub fn surfaces(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1475        // Safety:
1476        // Created from valid Table for this object
1477        // which contains a valid value in this slot
1478        unsafe {
1479            self._tab
1480                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1481                    Geometry::VT_SURFACES,
1482                    None,
1483                )
1484        }
1485    }
1486    #[inline]
1487    pub fn strings(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1488        // Safety:
1489        // Created from valid Table for this object
1490        // which contains a valid value in this slot
1491        unsafe {
1492            self._tab
1493                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1494                    Geometry::VT_STRINGS,
1495                    None,
1496                )
1497        }
1498    }
1499    #[inline]
1500    pub fn boundaries(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1501        // Safety:
1502        // Created from valid Table for this object
1503        // which contains a valid value in this slot
1504        unsafe {
1505            self._tab
1506                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1507                    Geometry::VT_BOUNDARIES,
1508                    None,
1509                )
1510        }
1511    }
1512    #[inline]
1513    pub fn semantics(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1514        // Safety:
1515        // Created from valid Table for this object
1516        // which contains a valid value in this slot
1517        unsafe {
1518            self._tab
1519                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1520                    Geometry::VT_SEMANTICS,
1521                    None,
1522                )
1523        }
1524    }
1525    #[inline]
1526    pub fn semantics_objects(
1527        &self,
1528    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SemanticObject<'a>>>> {
1529        // Safety:
1530        // Created from valid Table for this object
1531        // which contains a valid value in this slot
1532        unsafe {
1533            self._tab.get::<flatbuffers::ForwardsUOffset<
1534                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SemanticObject>>,
1535            >>(Geometry::VT_SEMANTICS_OBJECTS, None)
1536        }
1537    }
1538    #[inline]
1539    pub fn material(
1540        &self,
1541    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MaterialMapping<'a>>>> {
1542        // Safety:
1543        // Created from valid Table for this object
1544        // which contains a valid value in this slot
1545        unsafe {
1546            self._tab.get::<flatbuffers::ForwardsUOffset<
1547                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MaterialMapping>>,
1548            >>(Geometry::VT_MATERIAL, None)
1549        }
1550    }
1551    #[inline]
1552    pub fn texture(
1553        &self,
1554    ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<TextureMapping<'a>>>> {
1555        // Safety:
1556        // Created from valid Table for this object
1557        // which contains a valid value in this slot
1558        unsafe {
1559            self._tab.get::<flatbuffers::ForwardsUOffset<
1560                flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<TextureMapping>>,
1561            >>(Geometry::VT_TEXTURE, None)
1562        }
1563    }
1564}
1565
1566impl flatbuffers::Verifiable for Geometry<'_> {
1567    #[inline]
1568    fn run_verifier(
1569        v: &mut flatbuffers::Verifier,
1570        pos: usize,
1571    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1572        use self::flatbuffers::Verifiable;
1573        v.visit_table(pos)?
1574            .visit_field::<GeometryType>("type_", Self::VT_TYPE_, false)?
1575            .visit_field::<flatbuffers::ForwardsUOffset<&str>>("lod", Self::VT_LOD, false)?
1576            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1577                "solids",
1578                Self::VT_SOLIDS,
1579                false,
1580            )?
1581            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1582                "shells",
1583                Self::VT_SHELLS,
1584                false,
1585            )?
1586            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1587                "surfaces",
1588                Self::VT_SURFACES,
1589                false,
1590            )?
1591            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1592                "strings",
1593                Self::VT_STRINGS,
1594                false,
1595            )?
1596            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1597                "boundaries",
1598                Self::VT_BOUNDARIES,
1599                false,
1600            )?
1601            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1602                "semantics",
1603                Self::VT_SEMANTICS,
1604                false,
1605            )?
1606            .visit_field::<flatbuffers::ForwardsUOffset<
1607                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SemanticObject>>,
1608            >>("semantics_objects", Self::VT_SEMANTICS_OBJECTS, false)?
1609            .visit_field::<flatbuffers::ForwardsUOffset<
1610                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MaterialMapping>>,
1611            >>("material", Self::VT_MATERIAL, false)?
1612            .visit_field::<flatbuffers::ForwardsUOffset<
1613                flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<TextureMapping>>,
1614            >>("texture", Self::VT_TEXTURE, false)?
1615            .finish();
1616        Ok(())
1617    }
1618}
1619pub struct GeometryArgs<'a> {
1620    pub type_: GeometryType,
1621    pub lod: Option<flatbuffers::WIPOffset<&'a str>>,
1622    pub solids: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1623    pub shells: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1624    pub surfaces: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1625    pub strings: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1626    pub boundaries: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1627    pub semantics: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1628    pub semantics_objects: Option<
1629        flatbuffers::WIPOffset<
1630            flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SemanticObject<'a>>>,
1631        >,
1632    >,
1633    pub material: Option<
1634        flatbuffers::WIPOffset<
1635            flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MaterialMapping<'a>>>,
1636        >,
1637    >,
1638    pub texture: Option<
1639        flatbuffers::WIPOffset<
1640            flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<TextureMapping<'a>>>,
1641        >,
1642    >,
1643}
1644impl<'a> Default for GeometryArgs<'a> {
1645    #[inline]
1646    fn default() -> Self {
1647        GeometryArgs {
1648            type_: GeometryType::MultiPoint,
1649            lod: None,
1650            solids: None,
1651            shells: None,
1652            surfaces: None,
1653            strings: None,
1654            boundaries: None,
1655            semantics: None,
1656            semantics_objects: None,
1657            material: None,
1658            texture: None,
1659        }
1660    }
1661}
1662
1663pub struct GeometryBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1664    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1665    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1666}
1667impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GeometryBuilder<'a, 'b, A> {
1668    #[inline]
1669    pub fn add_type_(&mut self, type_: GeometryType) {
1670        self.fbb_
1671            .push_slot::<GeometryType>(Geometry::VT_TYPE_, type_, GeometryType::MultiPoint);
1672    }
1673    #[inline]
1674    pub fn add_lod(&mut self, lod: flatbuffers::WIPOffset<&'b str>) {
1675        self.fbb_
1676            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_LOD, lod);
1677    }
1678    #[inline]
1679    pub fn add_solids(&mut self, solids: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1680        self.fbb_
1681            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_SOLIDS, solids);
1682    }
1683    #[inline]
1684    pub fn add_shells(&mut self, shells: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1685        self.fbb_
1686            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_SHELLS, shells);
1687    }
1688    #[inline]
1689    pub fn add_surfaces(&mut self, surfaces: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1690        self.fbb_
1691            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_SURFACES, surfaces);
1692    }
1693    #[inline]
1694    pub fn add_strings(&mut self, strings: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1695        self.fbb_
1696            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_STRINGS, strings);
1697    }
1698    #[inline]
1699    pub fn add_boundaries(
1700        &mut self,
1701        boundaries: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>,
1702    ) {
1703        self.fbb_
1704            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_BOUNDARIES, boundaries);
1705    }
1706    #[inline]
1707    pub fn add_semantics(
1708        &mut self,
1709        semantics: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>,
1710    ) {
1711        self.fbb_
1712            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_SEMANTICS, semantics);
1713    }
1714    #[inline]
1715    pub fn add_semantics_objects(
1716        &mut self,
1717        semantics_objects: flatbuffers::WIPOffset<
1718            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SemanticObject<'b>>>,
1719        >,
1720    ) {
1721        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1722            Geometry::VT_SEMANTICS_OBJECTS,
1723            semantics_objects,
1724        );
1725    }
1726    #[inline]
1727    pub fn add_material(
1728        &mut self,
1729        material: flatbuffers::WIPOffset<
1730            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<MaterialMapping<'b>>>,
1731        >,
1732    ) {
1733        self.fbb_
1734            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_MATERIAL, material);
1735    }
1736    #[inline]
1737    pub fn add_texture(
1738        &mut self,
1739        texture: flatbuffers::WIPOffset<
1740            flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<TextureMapping<'b>>>,
1741        >,
1742    ) {
1743        self.fbb_
1744            .push_slot_always::<flatbuffers::WIPOffset<_>>(Geometry::VT_TEXTURE, texture);
1745    }
1746    #[inline]
1747    pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GeometryBuilder<'a, 'b, A> {
1748        let start = _fbb.start_table();
1749        GeometryBuilder {
1750            fbb_: _fbb,
1751            start_: start,
1752        }
1753    }
1754    #[inline]
1755    pub fn finish(self) -> flatbuffers::WIPOffset<Geometry<'a>> {
1756        let o = self.fbb_.end_table(self.start_);
1757        flatbuffers::WIPOffset::new(o.value())
1758    }
1759}
1760
1761impl core::fmt::Debug for Geometry<'_> {
1762    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1763        let mut ds = f.debug_struct("Geometry");
1764        ds.field("type_", &self.type_());
1765        ds.field("lod", &self.lod());
1766        ds.field("solids", &self.solids());
1767        ds.field("shells", &self.shells());
1768        ds.field("surfaces", &self.surfaces());
1769        ds.field("strings", &self.strings());
1770        ds.field("boundaries", &self.boundaries());
1771        ds.field("semantics", &self.semantics());
1772        ds.field("semantics_objects", &self.semantics_objects());
1773        ds.field("material", &self.material());
1774        ds.field("texture", &self.texture());
1775        ds.finish()
1776    }
1777}
1778pub enum SemanticObjectOffset {}
1779#[derive(Copy, Clone, PartialEq)]
1780
1781pub struct SemanticObject<'a> {
1782    pub _tab: flatbuffers::Table<'a>,
1783}
1784
1785impl<'a> flatbuffers::Follow<'a> for SemanticObject<'a> {
1786    type Inner = SemanticObject<'a>;
1787    #[inline]
1788    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1789        Self {
1790            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
1791        }
1792    }
1793}
1794
1795impl<'a> SemanticObject<'a> {
1796    pub const VT_TYPE_: flatbuffers::VOffsetT = 4;
1797    pub const VT_ATTRIBUTES: flatbuffers::VOffsetT = 6;
1798    pub const VT_CHILDREN: flatbuffers::VOffsetT = 8;
1799    pub const VT_PARENT: flatbuffers::VOffsetT = 10;
1800    pub const VT_EXTENSION_TYPE: flatbuffers::VOffsetT = 12;
1801
1802    #[inline]
1803    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1804        SemanticObject { _tab: table }
1805    }
1806    #[allow(unused_mut)]
1807    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1808        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1809        args: &'args SemanticObjectArgs<'args>,
1810    ) -> flatbuffers::WIPOffset<SemanticObject<'bldr>> {
1811        let mut builder = SemanticObjectBuilder::new(_fbb);
1812        if let Some(x) = args.extension_type {
1813            builder.add_extension_type(x);
1814        }
1815        if let Some(x) = args.parent {
1816            builder.add_parent(x);
1817        }
1818        if let Some(x) = args.children {
1819            builder.add_children(x);
1820        }
1821        if let Some(x) = args.attributes {
1822            builder.add_attributes(x);
1823        }
1824        builder.add_type_(args.type_);
1825        builder.finish()
1826    }
1827
1828    #[inline]
1829    pub fn type_(&self) -> SemanticSurfaceType {
1830        // Safety:
1831        // Created from valid Table for this object
1832        // which contains a valid value in this slot
1833        unsafe {
1834            self._tab
1835                .get::<SemanticSurfaceType>(
1836                    SemanticObject::VT_TYPE_,
1837                    Some(SemanticSurfaceType::RoofSurface),
1838                )
1839                .unwrap()
1840        }
1841    }
1842    #[inline]
1843    pub fn attributes(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1844        // Safety:
1845        // Created from valid Table for this object
1846        // which contains a valid value in this slot
1847        unsafe {
1848            self._tab
1849                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1850                    SemanticObject::VT_ATTRIBUTES,
1851                    None,
1852                )
1853        }
1854    }
1855    #[inline]
1856    pub fn children(&self) -> Option<flatbuffers::Vector<'a, u32>> {
1857        // Safety:
1858        // Created from valid Table for this object
1859        // which contains a valid value in this slot
1860        unsafe {
1861            self._tab
1862                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1863                    SemanticObject::VT_CHILDREN,
1864                    None,
1865                )
1866        }
1867    }
1868    #[inline]
1869    pub fn parent(&self) -> Option<u32> {
1870        // Safety:
1871        // Created from valid Table for this object
1872        // which contains a valid value in this slot
1873        unsafe { self._tab.get::<u32>(SemanticObject::VT_PARENT, None) }
1874    }
1875    #[inline]
1876    pub fn extension_type(&self) -> Option<&'a str> {
1877        // Safety:
1878        // Created from valid Table for this object
1879        // which contains a valid value in this slot
1880        unsafe {
1881            self._tab
1882                .get::<flatbuffers::ForwardsUOffset<&str>>(SemanticObject::VT_EXTENSION_TYPE, None)
1883        }
1884    }
1885}
1886
1887impl flatbuffers::Verifiable for SemanticObject<'_> {
1888    #[inline]
1889    fn run_verifier(
1890        v: &mut flatbuffers::Verifier,
1891        pos: usize,
1892    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1893        use self::flatbuffers::Verifiable;
1894        v.visit_table(pos)?
1895            .visit_field::<SemanticSurfaceType>("type_", Self::VT_TYPE_, false)?
1896            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
1897                "attributes",
1898                Self::VT_ATTRIBUTES,
1899                false,
1900            )?
1901            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
1902                "children",
1903                Self::VT_CHILDREN,
1904                false,
1905            )?
1906            .visit_field::<u32>("parent", Self::VT_PARENT, false)?
1907            .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1908                "extension_type",
1909                Self::VT_EXTENSION_TYPE,
1910                false,
1911            )?
1912            .finish();
1913        Ok(())
1914    }
1915}
1916pub struct SemanticObjectArgs<'a> {
1917    pub type_: SemanticSurfaceType,
1918    pub attributes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1919    pub children: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1920    pub parent: Option<u32>,
1921    pub extension_type: Option<flatbuffers::WIPOffset<&'a str>>,
1922}
1923impl<'a> Default for SemanticObjectArgs<'a> {
1924    #[inline]
1925    fn default() -> Self {
1926        SemanticObjectArgs {
1927            type_: SemanticSurfaceType::RoofSurface,
1928            attributes: None,
1929            children: None,
1930            parent: None,
1931            extension_type: None,
1932        }
1933    }
1934}
1935
1936pub struct SemanticObjectBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1937    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1938    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1939}
1940impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SemanticObjectBuilder<'a, 'b, A> {
1941    #[inline]
1942    pub fn add_type_(&mut self, type_: SemanticSurfaceType) {
1943        self.fbb_.push_slot::<SemanticSurfaceType>(
1944            SemanticObject::VT_TYPE_,
1945            type_,
1946            SemanticSurfaceType::RoofSurface,
1947        );
1948    }
1949    #[inline]
1950    pub fn add_attributes(
1951        &mut self,
1952        attributes: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1953    ) {
1954        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1955            SemanticObject::VT_ATTRIBUTES,
1956            attributes,
1957        );
1958    }
1959    #[inline]
1960    pub fn add_children(&mut self, children: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>) {
1961        self.fbb_
1962            .push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticObject::VT_CHILDREN, children);
1963    }
1964    #[inline]
1965    pub fn add_parent(&mut self, parent: u32) {
1966        self.fbb_
1967            .push_slot_always::<u32>(SemanticObject::VT_PARENT, parent);
1968    }
1969    #[inline]
1970    pub fn add_extension_type(&mut self, extension_type: flatbuffers::WIPOffset<&'b str>) {
1971        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1972            SemanticObject::VT_EXTENSION_TYPE,
1973            extension_type,
1974        );
1975    }
1976    #[inline]
1977    pub fn new(
1978        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1979    ) -> SemanticObjectBuilder<'a, 'b, A> {
1980        let start = _fbb.start_table();
1981        SemanticObjectBuilder {
1982            fbb_: _fbb,
1983            start_: start,
1984        }
1985    }
1986    #[inline]
1987    pub fn finish(self) -> flatbuffers::WIPOffset<SemanticObject<'a>> {
1988        let o = self.fbb_.end_table(self.start_);
1989        flatbuffers::WIPOffset::new(o.value())
1990    }
1991}
1992
1993impl core::fmt::Debug for SemanticObject<'_> {
1994    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1995        let mut ds = f.debug_struct("SemanticObject");
1996        ds.field("type_", &self.type_());
1997        ds.field("attributes", &self.attributes());
1998        ds.field("children", &self.children());
1999        ds.field("parent", &self.parent());
2000        ds.field("extension_type", &self.extension_type());
2001        ds.finish()
2002    }
2003}
2004pub enum GeometryInstanceOffset {}
2005#[derive(Copy, Clone, PartialEq)]
2006
2007pub struct GeometryInstance<'a> {
2008    pub _tab: flatbuffers::Table<'a>,
2009}
2010
2011impl<'a> flatbuffers::Follow<'a> for GeometryInstance<'a> {
2012    type Inner = GeometryInstance<'a>;
2013    #[inline]
2014    unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2015        Self {
2016            _tab: unsafe { flatbuffers::Table::new(buf, loc) },
2017        }
2018    }
2019}
2020
2021impl<'a> GeometryInstance<'a> {
2022    pub const VT_TRANSFORMATION: flatbuffers::VOffsetT = 4;
2023    pub const VT_TEMPLATE: flatbuffers::VOffsetT = 6;
2024    pub const VT_BOUNDARIES: flatbuffers::VOffsetT = 8;
2025
2026    #[inline]
2027    pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2028        GeometryInstance { _tab: table }
2029    }
2030    #[allow(unused_mut)]
2031    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2032        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2033        args: &'args GeometryInstanceArgs<'args>,
2034    ) -> flatbuffers::WIPOffset<GeometryInstance<'bldr>> {
2035        let mut builder = GeometryInstanceBuilder::new(_fbb);
2036        if let Some(x) = args.boundaries {
2037            builder.add_boundaries(x);
2038        }
2039        builder.add_template(args.template);
2040        if let Some(x) = args.transformation {
2041            builder.add_transformation(x);
2042        }
2043        builder.finish()
2044    }
2045
2046    #[inline]
2047    pub fn transformation(&self) -> Option<&'a TransformationMatrix> {
2048        // Safety:
2049        // Created from valid Table for this object
2050        // which contains a valid value in this slot
2051        unsafe {
2052            self._tab
2053                .get::<TransformationMatrix>(GeometryInstance::VT_TRANSFORMATION, None)
2054        }
2055    }
2056    #[inline]
2057    pub fn template(&self) -> u32 {
2058        // Safety:
2059        // Created from valid Table for this object
2060        // which contains a valid value in this slot
2061        unsafe {
2062            self._tab
2063                .get::<u32>(GeometryInstance::VT_TEMPLATE, Some(0))
2064                .unwrap()
2065        }
2066    }
2067    #[inline]
2068    pub fn boundaries(&self) -> Option<flatbuffers::Vector<'a, u32>> {
2069        // Safety:
2070        // Created from valid Table for this object
2071        // which contains a valid value in this slot
2072        unsafe {
2073            self._tab
2074                .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
2075                    GeometryInstance::VT_BOUNDARIES,
2076                    None,
2077                )
2078        }
2079    }
2080}
2081
2082impl flatbuffers::Verifiable for GeometryInstance<'_> {
2083    #[inline]
2084    fn run_verifier(
2085        v: &mut flatbuffers::Verifier,
2086        pos: usize,
2087    ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2088        use self::flatbuffers::Verifiable;
2089        v.visit_table(pos)?
2090            .visit_field::<TransformationMatrix>("transformation", Self::VT_TRANSFORMATION, false)?
2091            .visit_field::<u32>("template", Self::VT_TEMPLATE, false)?
2092            .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>(
2093                "boundaries",
2094                Self::VT_BOUNDARIES,
2095                false,
2096            )?
2097            .finish();
2098        Ok(())
2099    }
2100}
2101pub struct GeometryInstanceArgs<'a> {
2102    pub transformation: Option<&'a TransformationMatrix>,
2103    pub template: u32,
2104    pub boundaries: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
2105}
2106impl<'a> Default for GeometryInstanceArgs<'a> {
2107    #[inline]
2108    fn default() -> Self {
2109        GeometryInstanceArgs {
2110            transformation: None,
2111            template: 0,
2112            boundaries: None,
2113        }
2114    }
2115}
2116
2117pub struct GeometryInstanceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2118    fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2119    start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2120}
2121impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GeometryInstanceBuilder<'a, 'b, A> {
2122    #[inline]
2123    pub fn add_transformation(&mut self, transformation: &TransformationMatrix) {
2124        self.fbb_.push_slot_always::<&TransformationMatrix>(
2125            GeometryInstance::VT_TRANSFORMATION,
2126            transformation,
2127        );
2128    }
2129    #[inline]
2130    pub fn add_template(&mut self, template: u32) {
2131        self.fbb_
2132            .push_slot::<u32>(GeometryInstance::VT_TEMPLATE, template, 0);
2133    }
2134    #[inline]
2135    pub fn add_boundaries(
2136        &mut self,
2137        boundaries: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>,
2138    ) {
2139        self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2140            GeometryInstance::VT_BOUNDARIES,
2141            boundaries,
2142        );
2143    }
2144    #[inline]
2145    pub fn new(
2146        _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2147    ) -> GeometryInstanceBuilder<'a, 'b, A> {
2148        let start = _fbb.start_table();
2149        GeometryInstanceBuilder {
2150            fbb_: _fbb,
2151            start_: start,
2152        }
2153    }
2154    #[inline]
2155    pub fn finish(self) -> flatbuffers::WIPOffset<GeometryInstance<'a>> {
2156        let o = self.fbb_.end_table(self.start_);
2157        flatbuffers::WIPOffset::new(o.value())
2158    }
2159}
2160
2161impl core::fmt::Debug for GeometryInstance<'_> {
2162    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2163        let mut ds = f.debug_struct("GeometryInstance");
2164        ds.field("transformation", &self.transformation());
2165        ds.field("template", &self.template());
2166        ds.field("boundaries", &self.boundaries());
2167        ds.finish()
2168    }
2169}