Ocean
Loading...
Searching...
No Matches
SceneTracker6DOF.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_DEVICES_SCENE_TRACKER_6DOF_H
9#define META_OCEAN_DEVICES_SCENE_TRACKER_6DOF_H
10
13
14#include "ocean/base/Frame.h"
15
17#include "ocean/math/Box3.h"
18#include "ocean/math/Plane3.h"
19
20namespace Ocean
21{
22
23namespace Devices
24{
25
26// Forward declaration.
28
29/**
30 * Definition of a smart object reference for a 6-DOF scene tracker.
31 * @see SceneTracker6DOF.
32 * @ingroup devices
33 */
35
36/**
37 * This class implements the base for all 6-DOF scene trackers.
38 * Scene trackers provides 6-DOF transformations in combination with scene elements like point clouds, meshes, planes, or other content from the environment.
39 * @ingroup devices
40 */
41class OCEAN_DEVICES_EXPORT SceneTracker6DOF : virtual public Tracker6DOF
42{
43 public:
44
45 /**
46 * This class implements the base class of all scene elements.
47 */
49 {
50 public:
51
52 /**
53 * Definition of individual types of scene elements.
54 */
55 enum SceneElementType : uint32_t
56 {
57 /// The scene element is invalid.
59 /// The scene element contains 3D object points.
61 /// The scene element contains 2D/3D correspondences.
63 /// The scene element contains 3D planes.
65 /// The scene element contains 3D meshes.
67 /// The scene element contains depth information.
69 /// The scene element contains room objects.
71 };
72
73 public:
74
75 /**
76 * Destructs a scene element.
77 */
78 virtual ~SceneElement() = default;
79
80 /**
81 * Returns the type of this scene element.
82 * @return The scene element type
83 */
85
86 protected:
87
88 /**
89 * Creates a default scene element with specified type.
90 * @param sceneElementType The type of the new scene element
91 */
92 explicit inline SceneElement(const SceneElementType sceneElementType);
93
94 protected:
95
96 /// The type of the scene element.
98 };
99
100 /**
101 * Definition of a scene element holding 3D object points.
102 * Each 3D object point may be associated with a corresponding object point id.
103 */
105 {
106 public:
107
108 /**
109 * Creates a new SceneElement object for 3D object points.
110 * @param objectPoints The 3D object points, at least one
111 * @param objectPointIds Optional ids of the object points, one for each 3D object point, empty if unknown
112 */
114
115 /**
116 * Returns the 3D object points of this scene element.
117 * @return The scene element's object points
118 */
119 inline const Vectors3& objectPoints() const;
120
121 /**
122 * Returns the unique ids of the object points if known.
123 * @return The object point ids, empty if unknown
124 */
125 inline const Indices64& objectPointIds() const;
126
127 protected:
128
129 /// The 3D object points of this scene element.
131
132 /// The unique ids of this scene element.
134 };
135
136 /**
137 * This class implements a scene element holding 2D/3D feature correspondences.
138 */
140 {
141 public:
142
143 /**
144 * Creates a new scene element for 2D/3D correspondences.
145 * @param objectPoints The 3D object points of the correspondences, at least one
146 * @param imagePoints The 2D image points of the correspondences, one for each 3D object point
147 * @param objectPointIds The optional ids of the object points, one for each 3D obect point, or empty if unknown
148 */
150
151 /**
152 * Returns the 3D object points of this scene element.
153 * @return The scene element's 3D object points
154 */
155 inline const Vectors3& objectPoints() const;
156
157 /**
158 * Returns the 2D image points of this scene element.
159 * @return The scene element's image points, one for each 3D object point
160 */
161 inline const Vectors2& imagePoints() const;
162
163 /**
164 * Returns the unique object point ids.
165 * @return The object point ids, empty if unknown
166 */
167 inline const Indices64& objectPointIds() const;
168
169 protected:
170
171 /// The 3D object points of this scene element.
173
174 /// The 2D image points of this scene element, one for each 3D object point.
176
177 /// The unique ids of the 3D object points, if known.
179 };
180
181 /**
182 * This class implements a scene element holding 3D planes.
183 */
185 {
186 public:
187
188 /**
189 * This class stores the relevant information of a 3D plane.
190 * Most properties of the class (e.g., vertices, bounding box) are defined in relation to the plane's coordinate system.<br>
191 * The plane's normal is identical to the y-axis of the plane's coordinate system.
192 */
193 class Plane
194 {
195 public:
196
197 /**
198 * Definition of individual plane types.
199 */
200 enum PlaneType : uint32_t
201 {
202 /// The plane type is unknown.
204 /// The plane is horizontal and perpendicular to gravity (e.g., a floor/ceiling plane).
206 /// The plane is vertical and parallel to gravity (e.g., a wall plane).
208 };
209
210 public:
211
212 /**
213 * Creates a new plane object.
214 * @param planeId The plane's unique id, must be valid
215 * @param planeType The type of the plane
216 * @param world_T_plane The transformation between plane and world, with y-axis identical to the plane's normal, must be valid
217 * @param boundingBox The bounding box of the plane, defined in the plane's coordinate system, must be valid
218 * @param boundaryVertices The vertices of the boundary of the plane, defined in the plane's coordinate system
219 */
220 inline Plane(const Index32 planeId, const PlaneType planeType, const HomogenousMatrix4& world_T_plane, const Box3& boundingBox, Vectors3&& boundaryVertices);
221
222 /**
223 * Creates a new plane object.
224 * @param planeId The plane's unique id, must be valid
225 * @param planeType The type of the plane
226 * @param world_T_plane The transformation between plane and world, with y-axis identical to the plane's normal, must be valid
227 * @param boundingBox The bounding box of the plane, defined in the plane's coordinate system, must be valid
228 * @param vertices The plane's vertices, defined in the plane's coordinate system, at least 3
229 * @param textureCoordinates The vertices' texture coordinates, one for each vertex, empty if unknown
230 * @param triangleIndices The indices of the vertices representing the plane's surface triangles, three indices define one triangle, always a multiple of three
231 * @param boundaryVertices The vertices of the boundary of the plane, defined in the plane's coordinate system
232 */
233 inline Plane(const Index32 planeId, const PlaneType planeType, const HomogenousMatrix4& world_T_plane, const Box3& boundingBox, Vectors3&& vertices, Vectors2&& textureCoordinates, Indices32&& triangleIndices, Vectors3&& boundaryVertices);
234
235 /**
236 * Returns the unique id of the plane.
237 * @return The plane's unique id
238 */
239 inline Index32 planeId() const;
240
241 /**
242 * Returns the type of the plane.
243 * @return The plane's type
244 */
245 inline PlaneType planeType() const;
246
247 /**
248 * Returns the transformation of the plane in relation to world.
249 * The plane's normal is identical to the y-axis of the plane's coordinate system.
250 * @return The transformation between plane and world
251 */
252 inline const HomogenousMatrix4& world_T_plane() const;
253
254 /**
255 * Returns the 3D plane as defined in world.
256 * @return The plane object which can be used e.g. for advanced math calculations, defined in world
257 */
258 inline Plane3 worldPlane() const;
259
260 /**
261 * Returns the plane's bounding box (the extent of the plane).
262 * @return The bounding box of the plane, defined in the plane's coordinate system
263 */
264 inline const Box3& boundingBox() const;
265
266 /**
267 * Returns the vertices representing the plane.
268 * @return The plane's vertices, defined in the plane's coordinate system, empty if unknown
269 */
270 inline const Vectors3& vertices() const;
271
272 /**
273 * Returns the texture coordinates of the vertices, if known.
274 * @return The vertices' texture coordinates, one for each vertex, empty if unknown
275 */
276 inline const Vectors2& textureCoordinates() const;
277
278 /**
279 * Returns the indices of the vertices representing the plane's surface triangles, three indices define one triangle, always a multiple of three.
280 * @return The indices of the plane's triangles, empty if unknown
281 */
282 inline const Indices32& triangleIndices() const;
283
284 /**
285 * Returns the vertices of the boundary of the plane.
286 * @return The plane's boundary vertices, defined in the plane's coordinate system
287 */
288 inline const Vectors3& boundaryVertices() const;
289
290 protected:
291
292 /// The unique id of this plane.
294
295 /// The type of the plane.
297
298 /// The transformation between plane and world, with y-axis as the plane's normal.
300
301 /// The bounding box of the plane, defined in the plane's origin.
303
304 /// The vertices representing the plane, defined in the plane's coordinate system.
306
307 /// The vertices' texture coordinates, one for each vertex, empty if unknown.
309
310 /// The indices of the vertices representing the plane's surface triangles, three indices define one triangle, always a multiple of three.
312
313 /// The vertices of the boundaries of the plane, defined in the plane's coordinate system.
315 };
316
317 /**
318 * Definition of a vector holding planes.
319 */
320 using Planes = std::vector<Plane>;
321
322 public:
323
324 /**
325 * Creates a new scene element object with several given planes.
326 * @param planes The planes of the new scene element, at least one
327 */
328 explicit inline SceneElementPlanes(Planes&& planes);
329
330 /**
331 * Returns all planes of this scene element object, may be empty.
332 * @return The scene element's planes
333 */
334 inline const Planes& planes() const;
335
336 protected:
337
338 /// The planes stores in this scene element object.
340 };
341
342 /**
343 * This class implements a scene element holding 3D meshes.
344 */
346 {
347 public:
348
349 /**
350 * This class stores the relevant information of a 3D mesh.
351 * Most properties of the class (e.g., vertices, bounding box) are defined in relation to the mesh's coordinate system.<br>
352 */
353 class Mesh
354 {
355 public:
356
357 /**
358 * Definition of individual face types.
359 */
360 enum FaceType : uint8_t
361 {
362 /// The face type is unknown.
364 /// The face is representing a wall.
366 /// The face is representing a floor.
368 /// The face is representing a ceiling.
370 /// The face is representing a table.
372 /// The face is representing a seat.
374 /// The face is representing a window.
376 /// The face is representing a door.
378 /// The exlusive end value.
380 };
381
382 /**
383 * Definition of a vector holding face types.
384 */
385 using FaceTypes = std::vector<FaceType>;
386
387 public:
388
389 /**
390 * Creates a new mesh object.
391 * @param meshId The mesh's unique id, must be valid
392 * @param world_T_mesh The transformation between mesh and world, must be valid
393 * @param vertices The mesh's vertices, defined in the mesh's coordinate system, at least 3
394 * @param perVertexNormals The per-vertex normals of the mesh's faces, defined in the mesh's coordinate system, one for each vertex
395 * @param triangleIndices The indices of the vertices representing the mesh's surface triangles, three indices define one triangle, always a multiple of three
396 * @param faceTypes Optional face types of the mesh, one for each triangle, empty if unknown
397 */
399
400 /**
401 * Returns the unique id of the mesh.
402 * @return The mesh's unique id
403 */
404 inline Index32 meshId() const;
405
406 /**
407 * Returns the transformation of the mesh in relation to world.
408 * @return The transformation between mesh and world
409 */
410 inline const HomogenousMatrix4& world_T_mesh() const;
411
412 /**
413 * Returns the vertices representing the mesh.
414 * @return The mesh's vertices, defined in the mesh's coordinate system
415 */
416 inline const Vectors3& vertices() const;
417
418 /**
419 * Returns the per-vertex normals of the mesh's faces.
420 * @return The mesh's normals, defined in the mesh's coordinate system, one for each vertex
421 */
422 inline const Vectors3& perVertexNormals() const;
423
424 /**
425 * Returns the indices of the vertices representing the mesh's surface triangles, three indices define one triangle, always a multiple of three.
426 * @return The indices of the mesh's triangles, empty if unknown
427 */
428 inline const Indices32& triangleIndices() const;
429
430 /**
431 * Returns the face types of the mesh, one for each triangle, empty if unknown.
432 * @return The mesh's face types, empty if unknown
433 */
434 inline const FaceTypes& faceTypes() const;
435
436 protected:
437
438 /// The unique id of this mesh.
440
441 /// The transformation between mesh and world.
443
444 /// The vertices representing the mesh, defined in the mesh's coordinate system.
446
447 /// The per-vertex normals of the mesh, one for each vertex.
449
450 /// The indices of the vertices representing the mesh's surface triangles, three indices define one triangle, always a multiple of three.
452
453 /// The face types of the mesh, one for each triangle, empty if unknown.
455 };
456
457 /**
458 * Definition of a shared pointer for Mesh objects.
459 */
460 using SharedMesh = std::shared_ptr<Mesh>;
461
462 /**
463 * Definition of a vector holding meshes.
464 */
465 using SharedMeshes = std::vector<SharedMesh>;
466
467 public:
468
469 /**
470 * Creates a new scene element object with several given meshes.
471 * @param meshes The meshes of the new scene element, at least one
472 */
473 explicit inline SceneElementMeshes(SharedMeshes meshes);
474
475 /**
476 * Returns all meshes of this scene element object, may be empty.
477 * @return The scene element's meshes
478 */
479 inline const SharedMeshes& meshes() const;
480
481 protected:
482
483 /// The meshes stores in this scene element object.
485 };
486
487 /**
488 * This class implements a scene element holding depth information.
489 */
491 {
492 public:
493
494 /**
495 * Creates a new scene element object with depth information.
496 * @param camera The camera profile defining the projection of the depth image, must be valid
497 * @param device_T_depth The transformation between depth image and device, must be valid
498 * @param depth The depth image, must be valid
499 * @param confidence The confidence map, one entry for each pixel in the depth image, nullptr if unknown
500 */
501 inline SceneElementDepth(SharedAnyCamera camera, const HomogenousMatrix4& device_T_depth, std::shared_ptr<Frame> depth, std::shared_ptr<Frame> confidence = nullptr);
502
503 /**
504 * Returns the camera profile of the depth image.
505 * @return The depth image's camera profile
506 */
507 inline SharedAnyCamera camera() const;
508
509 /**
510 * Returns the transformation between depth image and the device.
511 * @return The scene element's transformation between depth image and device
512 */
513 inline const HomogenousMatrix4& device_T_depth() const;
514
515 /**
516 * Returns the depth image.
517 * @param confidence Optional returning confidence map, will be invalid if unknown; nullptr if not of interest
518 * @return The scene element's depth image
519 */
520 inline std::shared_ptr<Frame> depth(std::shared_ptr<Frame>* confidence = nullptr) const;
521
522 protected:
523
524 /// The camera profile defining the projection of the depth image.
526
527 /// The transformation between depth image and the device.
529
530 /// The scene element's depth image.
531 std::shared_ptr<Frame> depth_;
532
533 /// The scene element's confidence map, one entry for each pixel in the depth image, if known.
534 std::shared_ptr<Frame> confidence_;
535 };
536
537 /**
538 * This class implements a scene element holding room objects.
539 */
541 {
542 public:
543
544 /**
545 * This class implemenets the base class for all room objects.
546 */
547 class OCEAN_DEVICES_EXPORT RoomObject
548 {
549 public:
550
551 /**
552 * Definition of individual room object types.
553 */
554 enum ObjectType : uint32_t
555 {
556 /// Undefined type.
558 /// The object is a planar room object.
560 /// The object is a volumetric room object.
562 };
563
564 protected:
565
566 /**
567 * Creates a new room object.
568 * @param objectType The type of the object, must be valid
569 * @param identifier The unique identifier of the object
570 * @param confidence The confidence of the object, with range [0, 1], higher is better
571 * @param world_T_object The transformation between object and world, must be valid
572 * @param dimension The dimension of the object
573 */
574 inline RoomObject(const ObjectType objectType, std::string&& identifier, const float confidence, const HomogenousMatrix4& world_T_object, const Vector3& dimension);
575
576 public:
577
578 /**
579 * Returns the type of this object.
580 * @return The object's type
581 */
582 inline ObjectType objectType() const;
583
584 /**
585 * Returns the unique identifier of this object.
586 * @return The object's identifier
587 */
588 inline const std::string& identifier() const;
589
590 /**
591 * Returns the confidence of this object.
592 * @return The object's confidence, with range [0, 1], higher is better
593 */
594 inline float confidence() const;
595
596 /**
597 * Returns the transformation between this object and world.
598 * @return The object's transformation
599 */
600 inline const HomogenousMatrix4& world_T_object() const;
601
602 /**
603 * Sets or updates the transformation between this object and world.
604 * @param world_T_object The transformation to be set, must be valid
605 */
606 inline void setWorld_T_object(const HomogenousMatrix4& world_T_object);
607
608 /**
609 * Returns the dimension of this object.
610 * @return The object's dimension
611 */
612 inline const Vector3& dimension() const;
613
614 /**
615 * Translates the type of an object to a readable string.
616 * @param objectType The object type to translate
617 * @return The readable string
618 */
619 static std::string translateObjectType(const ObjectType objectType);
620
621 /**
622 * Translates the readable string of an object type to an object type value.
623 * @param objectType The readable string to translate
624 * @return The object type value, OT_UNDEFINED if invalid
625 */
626 static ObjectType translateObjectType(const std::string& objectType);
627
628 protected:
629
630 /// The type of this object.
632
633 /// The unique identifier of this object.
634 std::string identifier_;
635
636 /// The confidence of this object, with range [0, 1], higher is better.
637 float confidence_ = 0.0f;
638
639 /// The transformation between this object and world.
641
642 /// The dimension of this object.
644 };
645
646 /**
647 * This class implements a room object which is planar/flat.
648 */
649 class OCEAN_DEVICES_EXPORT PlanarRoomObject : public RoomObject
650 {
651 public:
652
653 /**
654 * Definition of individual types of planar objects.
655 */
656 enum PlanarType : uint32_t
657 {
658 /// The type is unknown.
660 /// The object is a planar wall.
662 /// The object is a door.
664 /// The object is a window.
666 /// The object is an opening.
668 /// The object is a floor.
670 /// The end type.
672 };
673
674 public:
675
676 /**
677 * Creates a new room object.
678 * @param identifier The unique identifier of the object
679 * @param planarType The type of the planar object, must be valid
680 * @param confidence The confidence of the object, with range [0, 1], higher is better
681 * @param world_T_object The transformation between object and world, must be valid
682 * @param dimension The dimension of the object
683 */
684 inline PlanarRoomObject(std::string&& identifier, const PlanarType planarType, const float confidence, const HomogenousMatrix4& world_T_object, const Vector3& dimension);
685
686 /**
687 * Returns the planar type of this object.
688 * @return The object's planar type
689 */
690 inline PlanarType planarType() const;
691
692 /**
693 * Translates the planar type to a readable string.
694 * @param planarType The type to translate
695 * @return The translated type
696 */
697 static std::string translatePlanarType(const PlanarType planarType);
698
699 /**
700 * Translates the readable stirng of a planar type to the corresponding value.
701 * @param planarType The type to translate
702 * @return The translated type
703 */
704 static PlanarType translatePlanarType(const std::string& planarType);
705
706 protected:
707
708 /// The planar type of this object.
710 };
711
712 /**
713 * This class implements a room object which is volumetric.
714 */
715 class OCEAN_DEVICES_EXPORT VolumetricRoomObject : public RoomObject
716 {
717 public:
718
719 /**
720 * Definition of individual types of volumetric objects.
721 */
722 enum VolumetricType : uint32_t
723 {
724 /// The type is unknown.
726 /// The object is a storage.
728 /// The object is a refrigerator.
730 /// The object is a stove.
732 /// The object is a bed.
734 /// The object is a sink.
736 /// The object is a washer/driver.
738 /// The object is a toilet.
740 /// The object is a bathtub.
742 /// The object is an oven.
744 /// The object is a dishwasher.
746 /// The object is a table.
748 /// The object is a sofa.
750 /// The object is a char.
752 /// The object is a fire place.
754 /// The object is a television.
756 /// The object is stairs.
758 /// The end type.
760 };
761
762 protected:
763
764 /**
765 * Definition of an unordered map mapping readable strings to volumetric types.
766 */
767 using VolumetricTypeMap = std::unordered_map<std::string, VolumetricType>;
768
769 public:
770
771 /**
772 * Creates a new room object.
773 * @param identifier The unique identifier of the object
774 * @param volumetricType The type of the volumetric object, must be valid
775 * @param confidence The confidence of the object, with range [0, 1], higher is better
776 * @param world_T_object The transformation between object and world, must be valid
777 * @param dimension The dimension of the object
778 */
780
781 /**
782 * Returns the volumetric type of this object.
783 * @return The object's volumetric type
784 */
785 inline VolumetricType volumetricType() const;
786
787 /**
788 * Translates the volumetric type to a readable string.
789 * @param volumetricType The volumetric type to translate
790 * @return The translated type
791 */
793
794 /**
795 * Translates the readable string of a volumetric type to the corresponding value.
796 * @param volumetricType The volumetric type to translate
797 * @return The translated type
798 */
800
801 protected:
802
803 /// The volumetric type of this object.
805 };
806
807 /**
808 * Definition of a shared pointer holding a room object.
809 */
810 using SharedRoomObject = std::shared_ptr<RoomObject>;
811
812 /**
813 * Definition of a shared pointer holding a planar room object.
814 */
815 using SharedPlanarRoomObject = std::shared_ptr<PlanarRoomObject>;
816
817 /**
818 * Definition of a shared pointer holding a volumetric room object.
819 */
820 using SharedVolumetricRoomObject = std::shared_ptr<VolumetricRoomObject>;
821
822 /**
823 * Definition of a vector holding room objects.
824 */
825 using SharedRoomObjects = std::vector<SharedRoomObject>;
826
827 /**
828 * Definition of a vector holding planar room objects.
829 */
830 using SharedPlanarRoomObjects = std::vector<SharedPlanarRoomObject>;
831
832 /**
833 * Definition of a vector holding volumetric room objects.
834 */
835 using SharedVolumetricRoomObjects = std::vector<SharedVolumetricRoomObject>;
836
837 /**
838 * Definition of an unordered set holding object identifiers.
839 */
840 using RoomObjectIdentifierSet = std::unordered_set<std::string>;
841
842 /**
843 * Definitio of an unordered map mapping object identifiers to room objects.
844 */
845 using RoomObjectMap = std::unordered_map<std::string, SharedRoomObject>;
846
847 public:
848
849 /**
850 * Creates a new scene element object with several given room objects.
851 * @param roomObjectMap The room objects of the new scene element, may be empty.
852 * @param addedRoomObjects The identifiers of all added room objects
853 * @param removedRoomObjects The identifiers of all removed room objects
854 * @param changedRoomObjects The identifiers of all changed room objects
855 * @param updatedRoomObjects The identifiers of all updated room objects
856 */
858
859 /**
860 * Returns all room objects of this scene element object, may be empty.
861 * @return The scene element's room objects
862 */
863 inline const RoomObjectMap& roomObjectMap() const;
864
865 /**
866 * Returns the identifiers of all room object which have been added.
867 * @return Added room objects
868 */
869 inline const RoomObjectIdentifierSet& addedRoomObjects() const;
870
871 /**
872 * Returns the identifiers of all room object which have been removed.
873 * @return Removed room objects
874 */
875 inline const RoomObjectIdentifierSet& removedRoomObjects() const;
876
877 /**
878 * Returns the identifiers of all room object which have been changed.
879 * @return Changed room objects
880 */
881 inline const RoomObjectIdentifierSet& changedRoomObjects() const;
882
883 /**
884 * Returns the identifiers of all room object which have been updated.
885 * @return Updated room objects
886 */
887 inline const RoomObjectIdentifierSet& updatedRoomObjects() const;
888
889 protected:
890
891 /// The room objects in this scene element object.
893
894 /// The identifiers of all added room objects.
896
897 /// The identifiers of all removed room objects.
899
900 /// The identifiers of all changed room objects.
902
903 /// The identifiers of all changed room objects.
905 };
906
907 /**
908 * Definition of a shared pointer holding a scene element.
909 */
910 using SharedSceneElement = std::shared_ptr<SceneElement>;
911
912 /**
913 * Definition of a vector holding scene elements.
914 */
915 using SharedSceneElements = std::vector<SharedSceneElement>;
916
917 /**
918 * Definition of a sample holding one single 6DOF tracker measurement.
919 */
920 class OCEAN_DEVICES_EXPORT SceneTracker6DOFSample : virtual public Tracker6DOFSample
921 {
922 public:
923
924 /**
925 * Creates a new 6DOF tracker sample.
926 * @param timestamp Sample timestamp
927 * @param referenceSystem Tracking reference system used by the underlying tracker
928 * @param objectIds Measurement unit object ids each id corresponds to a different orientation and position measurement
929 * @param orientations Sample orientation measurements
930 * @param positions Sample position measurements in meter
931 * @param sceneElements The scene elements of the new sample
932 * @param metadata Optional metadata of the new sample
933 */
935
936 /**
937 * Creates a new 6DOF tracker sample.
938 * @param timestamp Sample timestamp
939 * @param referenceSystem Tracking reference system used by the underlying tracker
940 * @param objectIds Measurement unit object ids each id corresponds to a different orientation and position measurement
941 * @param orientations Sample orientation measurements
942 * @param positions Sample position measurements in meter
943 * @param sceneElements The scene elements of the new sample
944 * @param metadata Optional metadata of the new sample
945 */
947
948 /**
949 * Returns the scene elements of this sample.
950 * Scene elements can be invalid in case a pure 6-DOF pose is provided.
951 * @return The sample's scene elements, some may be invalid
952 */
953 inline const SharedSceneElements& sceneElements() const;
954
955 protected:
956
957 /// The scene elements.
959 };
960
961 /**
962 * Definition of a smart object reference for 6-DOF scene tracker samples.
963 */
965
966 public:
967
968 /**
969 * Exports the determined scene elements.
970 * @param format The format of the exported data
971 * @param outputStream The output stream to which the data will be exported
972 * @param options Optional options to configure the export result
973 * @return True, if succeeded; False, if not supported
974 */
975 virtual bool exportSceneElements(const std::string& format, std::ostream& outputStream, const std::string& options = std::string()) const;
976
977 /**
978 * Definition of this device type.
979 */
981
982 protected:
983
984 /**
985 * Creates a new 6-DOF scene tracker object.
986 * @param name The name of the 6DOF tracker, must be valid
987 */
988 explicit SceneTracker6DOF(const std::string& name);
989
990 /**
991 * Destructs a 6-DOF tracker object.
992 */
994};
995
1001
1006
1015
1021
1026
1038
1044
1050
1055
1066
1072 vertices_(std::move(vertices)),
1076{
1077 ocean_assert(world_T_plane_.isValid());
1078 ocean_assert(boundingBox_.isValid());
1079 ocean_assert(textureCoordinates_.empty() || textureCoordinates_.size() == vertices_.size());
1080 ocean_assert(triangleIndices_.empty() || triangleIndices_.size() % 3 == 0);
1081}
1082
1087
1092
1094{
1095 ocean_assert(world_T_plane_.isValid());
1096 return world_T_plane_;
1097}
1098
1100{
1101 ocean_assert(world_T_plane_.isValid());
1102
1103 ocean_assert(world_T_plane_.yAxis().isUnit());
1104 return Plane3(world_T_plane_.translation(), world_T_plane_.yAxis());
1105}
1106
1108{
1109 ocean_assert(boundingBox_.isValid());
1110 return boundingBox_;
1111}
1112
1114{
1115 return vertices_;
1116}
1117
1122
1127
1132
1135 planes_(std::move(planes))
1136{
1137 ocean_assert(!planes_.empty());
1138}
1139
1144
1146 meshId_(meshId),
1148 vertices_(std::move(vertices)),
1151 faceTypes_(std::move(faceTypes))
1152{
1153 ocean_assert(triangleIndices_.size() % 3 == 0);
1154 ocean_assert(vertices_.size() == perVertexNormals_.size());
1155
1156 ocean_assert(faceTypes_.empty() || faceTypes_.size() == triangleIndices_.size() / 3);
1157}
1158
1163
1168
1170{
1171 return vertices_;
1172}
1173
1178
1183
1188
1191 meshes_(std::move(meshes))
1192{
1193 ocean_assert(!meshes_.empty());
1194}
1195
1200
1203 identifier_(std::move(identifier)),
1207{
1208 ocean_assert(objectType != OT_UNDEFINED);
1209 ocean_assert(!identifier_.empty());
1210 ocean_assert(confidence >= 0.0f && confidence <= 1.0f);
1211 ocean_assert(world_T_object_.isValid());
1212}
1213
1218
1220{
1221 return identifier_;
1222}
1223
1228
1233
1239
1244
1251
1256
1263
1268
1279
1284
1289
1294
1299
1304
1305inline SceneTracker6DOF::SceneElementDepth::SceneElementDepth(SharedAnyCamera camera, const HomogenousMatrix4& device_T_depth, std::shared_ptr<Frame> depth, std::shared_ptr<Frame> confidence) :
1307 camera_(std::move(camera)),
1309 depth_(std::move(depth)),
1310 confidence_(std::move(confidence))
1311{
1312 ocean_assert(camera_ && depth_ && device_T_depth_.isValid());
1313}
1314
1316{
1317 ocean_assert(camera_);
1318 return camera_;
1319}
1320
1322{
1323 ocean_assert(device_T_depth_.isValid());
1324 return device_T_depth_;
1325}
1326
1327inline std::shared_ptr<Frame> SceneTracker6DOF::SceneElementDepth::depth(std::shared_ptr<Frame>* confidence) const
1328{
1329 if (confidence != nullptr)
1330 {
1331 *confidence = confidence_;
1332 }
1333
1334 ocean_assert(depth_);
1335 return depth_;
1336}
1337
1342
1347
1348}
1349
1350}
1351
1352#endif // META_OCEAN_DEVICES_SCENE_TRACKER_6DOF_H
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
@ DEVICE_TRACKER
Tracker device.
Definition devices/Device.h:46
const std::string & name() const
Returns the name of this device.
Definition devices/Device.h:340
const ObjectIds & objectIds() const
Returns the sample object ids specifying possible different measurement units.
Definition Measurement.h:519
const Metadata & metadata() const
Returns the metadata of this sample.
Definition Measurement.h:524
const Timestamp & timestamp() const
Returns the sample timestamp.
Definition Measurement.h:509
std::unordered_map< std::string, Value > Metadata
Definition of an unordered map mapping keys to values.
Definition Measurement.h:62
StackHeapVector< ObjectId, 1 > ObjectIds
Definition of a vector holding object ids.
Definition Measurement.h:52
const Orientations & orientations() const
Returns the 3DOF orientation measurement values.
Definition OrientationTracker3DOF.h:127
StackHeapVector< Quaternion, 1 > Orientations
Definition of a vector holding orientation values.
Definition OrientationTracker3DOF.h:52
StackHeapVector< Vector3, 1 > Positions
Definition of a vector holding position values.
Definition PositionTracker3DOF.h:52
const Positions & positions() const
Returns all 3DOF position measurement values.
Definition PositionTracker3DOF.h:127
SharedAnyCamera camera() const
Returns the camera profile of the depth image.
Definition SceneTracker6DOF.h:1315
SceneElementDepth(SharedAnyCamera camera, const HomogenousMatrix4 &device_T_depth, std::shared_ptr< Frame > depth, std::shared_ptr< Frame > confidence=nullptr)
Creates a new scene element object with depth information.
Definition SceneTracker6DOF.h:1305
SharedAnyCamera camera_
The camera profile defining the projection of the depth image.
Definition SceneTracker6DOF.h:525
HomogenousMatrix4 device_T_depth_
The transformation between depth image and the device.
Definition SceneTracker6DOF.h:528
const HomogenousMatrix4 & device_T_depth() const
Returns the transformation between depth image and the device.
Definition SceneTracker6DOF.h:1321
std::shared_ptr< Frame > depth_
The scene element's depth image.
Definition SceneTracker6DOF.h:531
std::shared_ptr< Frame > depth(std::shared_ptr< Frame > *confidence=nullptr) const
Returns the depth image.
Definition SceneTracker6DOF.h:1327
std::shared_ptr< Frame > confidence_
The scene element's confidence map, one entry for each pixel in the depth image, if known.
Definition SceneTracker6DOF.h:534
SceneElementFeatureCorrespondences(Vectors3 &&objectPoints, Vectors2 &&imagePoints, Indices64 &&objectPointIds=Indices64())
Creates a new scene element for 2D/3D correspondences.
Definition SceneTracker6DOF.h:1027
Vectors3 objectPoints_
The 3D object points of this scene element.
Definition SceneTracker6DOF.h:172
const Vectors2 & imagePoints() const
Returns the 2D image points of this scene element.
Definition SceneTracker6DOF.h:1045
Vectors2 imagePoints_
The 2D image points of this scene element, one for each 3D object point.
Definition SceneTracker6DOF.h:175
Indices64 objectPointIds_
The unique ids of the 3D object points, if known.
Definition SceneTracker6DOF.h:178
const Indices64 & objectPointIds() const
Returns the unique object point ids.
Definition SceneTracker6DOF.h:1051
const Vectors3 & objectPoints() const
Returns the 3D object points of this scene element.
Definition SceneTracker6DOF.h:1039
SceneElementType
Definition of individual types of scene elements.
Definition SceneTracker6DOF.h:56
@ SET_ROOM
The scene element contains room objects.
Definition SceneTracker6DOF.h:70
@ SET_INVALID
The scene element is invalid.
Definition SceneTracker6DOF.h:58
@ SET_DEPTH
The scene element contains depth information.
Definition SceneTracker6DOF.h:68
@ SET_PLANES
The scene element contains 3D planes.
Definition SceneTracker6DOF.h:64
@ SET_OBJECT_POINTS
The scene element contains 3D object points.
Definition SceneTracker6DOF.h:60
@ SET_MESHES
The scene element contains 3D meshes.
Definition SceneTracker6DOF.h:66
@ SET_FEATURE_CORRESPONDENCES
The scene element contains 2D/3D correspondences.
Definition SceneTracker6DOF.h:62
virtual ~SceneElement()=default
Destructs a scene element.
SceneElementType sceneElementType() const
Returns the type of this scene element.
Definition SceneTracker6DOF.h:1002
SceneElement(const SceneElementType sceneElementType)
Creates a default scene element with specified type.
Definition SceneTracker6DOF.h:996
SceneElementType sceneElementType_
The type of the scene element.
Definition SceneTracker6DOF.h:97
const Indices32 & triangleIndices() const
Returns the indices of the vertices representing the mesh's surface triangles, three indices define o...
Definition SceneTracker6DOF.h:1179
const Vectors3 & vertices() const
Returns the vertices representing the mesh.
Definition SceneTracker6DOF.h:1169
const FaceTypes & faceTypes() const
Returns the face types of the mesh, one for each triangle, empty if unknown.
Definition SceneTracker6DOF.h:1184
Index32 meshId() const
Returns the unique id of the mesh.
Definition SceneTracker6DOF.h:1159
FaceTypes faceTypes_
The face types of the mesh, one for each triangle, empty if unknown.
Definition SceneTracker6DOF.h:454
FaceType
Definition of individual face types.
Definition SceneTracker6DOF.h:361
@ FT_FLOOR
The face is representing a floor.
Definition SceneTracker6DOF.h:367
@ FT_SEAT
The face is representing a seat.
Definition SceneTracker6DOF.h:373
@ FT_TABLE
The face is representing a table.
Definition SceneTracker6DOF.h:371
@ FT_END
The exlusive end value.
Definition SceneTracker6DOF.h:379
@ FT_WALL
The face is representing a wall.
Definition SceneTracker6DOF.h:365
@ FT_DOOR
The face is representing a door.
Definition SceneTracker6DOF.h:377
@ FT_CEILING
The face is representing a ceiling.
Definition SceneTracker6DOF.h:369
@ FT_UNKNOWN
The face type is unknown.
Definition SceneTracker6DOF.h:363
@ FT_WINDOW
The face is representing a window.
Definition SceneTracker6DOF.h:375
Mesh(const Index32 meshId, const HomogenousMatrix4 &world_T_mesh, Vectors3 &&vertices, Vectors3 &&perVertexNormals, Indices32 &&triangleIndices, FaceTypes &&faceTypes=FaceTypes())
Creates a new mesh object.
Definition SceneTracker6DOF.h:1145
Indices32 triangleIndices_
The indices of the vertices representing the mesh's surface triangles, three indices define one trian...
Definition SceneTracker6DOF.h:451
Vectors3 perVertexNormals_
The per-vertex normals of the mesh, one for each vertex.
Definition SceneTracker6DOF.h:448
Index32 meshId_
The unique id of this mesh.
Definition SceneTracker6DOF.h:439
const Vectors3 & perVertexNormals() const
Returns the per-vertex normals of the mesh's faces.
Definition SceneTracker6DOF.h:1174
HomogenousMatrix4 world_T_mesh_
The transformation between mesh and world.
Definition SceneTracker6DOF.h:442
Vectors3 vertices_
The vertices representing the mesh, defined in the mesh's coordinate system.
Definition SceneTracker6DOF.h:445
std::vector< FaceType > FaceTypes
Definition of a vector holding face types.
Definition SceneTracker6DOF.h:385
const HomogenousMatrix4 & world_T_mesh() const
Returns the transformation of the mesh in relation to world.
Definition SceneTracker6DOF.h:1164
std::shared_ptr< Mesh > SharedMesh
Definition of a shared pointer for Mesh objects.
Definition SceneTracker6DOF.h:460
const SharedMeshes & meshes() const
Returns all meshes of this scene element object, may be empty.
Definition SceneTracker6DOF.h:1196
SceneElementMeshes(SharedMeshes meshes)
Creates a new scene element object with several given meshes.
Definition SceneTracker6DOF.h:1189
SharedMeshes meshes_
The meshes stores in this scene element object.
Definition SceneTracker6DOF.h:484
std::vector< SharedMesh > SharedMeshes
Definition of a vector holding meshes.
Definition SceneTracker6DOF.h:465
const Indices64 & objectPointIds() const
Returns the unique ids of the object points if known.
Definition SceneTracker6DOF.h:1022
const Vectors3 & objectPoints() const
Returns the 3D object points of this scene element.
Definition SceneTracker6DOF.h:1016
Indices64 objectPointIds_
The unique ids of this scene element.
Definition SceneTracker6DOF.h:133
SceneElementObjectPoints(Vectors3 &&objectPoints, Indices64 &&objectPointIds=Indices64())
Creates a new SceneElement object for 3D object points.
Definition SceneTracker6DOF.h:1007
Vectors3 objectPoints_
The 3D object points of this scene element.
Definition SceneTracker6DOF.h:130
This class stores the relevant information of a 3D plane.
Definition SceneTracker6DOF.h:194
HomogenousMatrix4 world_T_plane_
The transformation between plane and world, with y-axis as the plane's normal.
Definition SceneTracker6DOF.h:299
Indices32 triangleIndices_
The indices of the vertices representing the plane's surface triangles, three indices define one tria...
Definition SceneTracker6DOF.h:311
Vectors3 vertices_
The vertices representing the plane, defined in the plane's coordinate system.
Definition SceneTracker6DOF.h:305
PlaneType planeType() const
Returns the type of the plane.
Definition SceneTracker6DOF.h:1088
PlaneType
Definition of individual plane types.
Definition SceneTracker6DOF.h:201
@ PT_VERTICAL
The plane is vertical and parallel to gravity (e.g., a wall plane).
Definition SceneTracker6DOF.h:207
@ PT_HORIZONTAL
The plane is horizontal and perpendicular to gravity (e.g., a floor/ceiling plane).
Definition SceneTracker6DOF.h:205
@ PT_UNKNOWN
The plane type is unknown.
Definition SceneTracker6DOF.h:203
Box3 boundingBox_
The bounding box of the plane, defined in the plane's origin.
Definition SceneTracker6DOF.h:302
Index32 planeId_
The unique id of this plane.
Definition SceneTracker6DOF.h:293
Vectors2 textureCoordinates_
The vertices' texture coordinates, one for each vertex, empty if unknown.
Definition SceneTracker6DOF.h:308
const Vectors3 & boundaryVertices() const
Returns the vertices of the boundary of the plane.
Definition SceneTracker6DOF.h:1128
const Indices32 & triangleIndices() const
Returns the indices of the vertices representing the plane's surface triangles, three indices define ...
Definition SceneTracker6DOF.h:1123
const Vectors3 & vertices() const
Returns the vertices representing the plane.
Definition SceneTracker6DOF.h:1113
Index32 planeId() const
Returns the unique id of the plane.
Definition SceneTracker6DOF.h:1083
Vectors3 boundaryVertices_
The vertices of the boundaries of the plane, defined in the plane's coordinate system.
Definition SceneTracker6DOF.h:314
const Box3 & boundingBox() const
Returns the plane's bounding box (the extent of the plane).
Definition SceneTracker6DOF.h:1107
const Vectors2 & textureCoordinates() const
Returns the texture coordinates of the vertices, if known.
Definition SceneTracker6DOF.h:1118
PlaneType planeType_
The type of the plane.
Definition SceneTracker6DOF.h:296
Plane(const Index32 planeId, const PlaneType planeType, const HomogenousMatrix4 &world_T_plane, const Box3 &boundingBox, Vectors3 &&boundaryVertices)
Creates a new plane object.
Definition SceneTracker6DOF.h:1056
Plane3 worldPlane() const
Returns the 3D plane as defined in world.
Definition SceneTracker6DOF.h:1099
const HomogenousMatrix4 & world_T_plane() const
Returns the transformation of the plane in relation to world.
Definition SceneTracker6DOF.h:1093
std::vector< Plane > Planes
Definition of a vector holding planes.
Definition SceneTracker6DOF.h:320
Planes planes_
The planes stores in this scene element object.
Definition SceneTracker6DOF.h:339
SceneElementPlanes(Planes &&planes)
Creates a new scene element object with several given planes.
Definition SceneTracker6DOF.h:1133
const Planes & planes() const
Returns all planes of this scene element object, may be empty.
Definition SceneTracker6DOF.h:1140
This class implements a room object which is planar/flat.
Definition SceneTracker6DOF.h:650
PlanarType
Definition of individual types of planar objects.
Definition SceneTracker6DOF.h:657
@ PT_OPENING
The object is an opening.
Definition SceneTracker6DOF.h:667
@ PT_FLOOR
The object is a floor.
Definition SceneTracker6DOF.h:669
@ PT_END
The end type.
Definition SceneTracker6DOF.h:671
@ PT_WINDOW
The object is a window.
Definition SceneTracker6DOF.h:665
@ PT_UNKNOWN
The type is unknown.
Definition SceneTracker6DOF.h:659
@ PT_WALL
The object is a planar wall.
Definition SceneTracker6DOF.h:661
@ PT_DOOR
The object is a door.
Definition SceneTracker6DOF.h:663
static std::string translatePlanarType(const PlanarType planarType)
Translates the planar type to a readable string.
PlanarRoomObject(std::string &&identifier, const PlanarType planarType, const float confidence, const HomogenousMatrix4 &world_T_object, const Vector3 &dimension)
Creates a new room object.
Definition SceneTracker6DOF.h:1245
PlanarType planarType() const
Returns the planar type of this object.
Definition SceneTracker6DOF.h:1252
PlanarType planarType_
The planar type of this object.
Definition SceneTracker6DOF.h:709
static PlanarType translatePlanarType(const std::string &planarType)
Translates the readable stirng of a planar type to the corresponding value.
This class implemenets the base class for all room objects.
Definition SceneTracker6DOF.h:548
static ObjectType translateObjectType(const std::string &objectType)
Translates the readable string of an object type to an object type value.
float confidence_
The confidence of this object, with range [0, 1], higher is better.
Definition SceneTracker6DOF.h:637
float confidence() const
Returns the confidence of this object.
Definition SceneTracker6DOF.h:1224
ObjectType objectType_
The type of this object.
Definition SceneTracker6DOF.h:631
HomogenousMatrix4 world_T_object_
The transformation between this object and world.
Definition SceneTracker6DOF.h:640
static std::string translateObjectType(const ObjectType objectType)
Translates the type of an object to a readable string.
std::string identifier_
The unique identifier of this object.
Definition SceneTracker6DOF.h:634
ObjectType objectType() const
Returns the type of this object.
Definition SceneTracker6DOF.h:1214
RoomObject(const ObjectType objectType, std::string &&identifier, const float confidence, const HomogenousMatrix4 &world_T_object, const Vector3 &dimension)
Creates a new room object.
Definition SceneTracker6DOF.h:1201
const Vector3 & dimension() const
Returns the dimension of this object.
Definition SceneTracker6DOF.h:1240
void setWorld_T_object(const HomogenousMatrix4 &world_T_object)
Sets or updates the transformation between this object and world.
Definition SceneTracker6DOF.h:1234
Vector3 dimension_
The dimension of this object.
Definition SceneTracker6DOF.h:643
const HomogenousMatrix4 & world_T_object() const
Returns the transformation between this object and world.
Definition SceneTracker6DOF.h:1229
const std::string & identifier() const
Returns the unique identifier of this object.
Definition SceneTracker6DOF.h:1219
ObjectType
Definition of individual room object types.
Definition SceneTracker6DOF.h:555
@ OT_PLANAR
The object is a planar room object.
Definition SceneTracker6DOF.h:559
@ OT_UNDEFINED
Undefined type.
Definition SceneTracker6DOF.h:557
@ OT_VOLUMETRIC
The object is a volumetric room object.
Definition SceneTracker6DOF.h:561
static VolumetricType translateVolumetricType(const std::string &volumetricType)
Translates the readable string of a volumetric type to the corresponding value.
VolumetricType
Definition of individual types of volumetric objects.
Definition SceneTracker6DOF.h:723
@ VT_END
The end type.
Definition SceneTracker6DOF.h:759
@ VT_REFRIGERATOR
The object is a refrigerator.
Definition SceneTracker6DOF.h:729
@ VT_SOFA
The object is a sofa.
Definition SceneTracker6DOF.h:749
@ VT_STORAGE
The object is a storage.
Definition SceneTracker6DOF.h:727
@ VT_FIREPLACE
The object is a fire place.
Definition SceneTracker6DOF.h:753
@ VT_SINK
The object is a sink.
Definition SceneTracker6DOF.h:735
@ VT_TOILET
The object is a toilet.
Definition SceneTracker6DOF.h:739
@ VT_STOVE
The object is a stove.
Definition SceneTracker6DOF.h:731
@ VT_WASHER_DRYER
The object is a washer/driver.
Definition SceneTracker6DOF.h:737
@ VT_DISHWASHER
The object is a dishwasher.
Definition SceneTracker6DOF.h:745
@ VT_BATHTUB
The object is a bathtub.
Definition SceneTracker6DOF.h:741
@ VT_TABLE
The object is a table.
Definition SceneTracker6DOF.h:747
@ VT_CHAIR
The object is a char.
Definition SceneTracker6DOF.h:751
@ VT_BED
The object is a bed.
Definition SceneTracker6DOF.h:733
@ VT_OVEN
The object is an oven.
Definition SceneTracker6DOF.h:743
@ VT_TELEVISION
The object is a television.
Definition SceneTracker6DOF.h:755
@ VT_STAIRS
The object is stairs.
Definition SceneTracker6DOF.h:757
@ VT_UNKNOWN
The type is unknown.
Definition SceneTracker6DOF.h:725
static std::string translateVolumetricType(const VolumetricType volumetricType)
Translates the volumetric type to a readable string.
VolumetricType volumetricType_
The volumetric type of this object.
Definition SceneTracker6DOF.h:804
std::unordered_map< std::string, VolumetricType > VolumetricTypeMap
Definition of an unordered map mapping readable strings to volumetric types.
Definition SceneTracker6DOF.h:767
VolumetricRoomObject(std::string &&identifier, const VolumetricType volumetricType, float confidence, const HomogenousMatrix4 &world_T_object, const Vector3 &dimension)
Creates a new room object.
Definition SceneTracker6DOF.h:1257
VolumetricType volumetricType() const
Returns the volumetric type of this object.
Definition SceneTracker6DOF.h:1264
std::unordered_map< std::string, SharedRoomObject > RoomObjectMap
Definitio of an unordered map mapping object identifiers to room objects.
Definition SceneTracker6DOF.h:845
RoomObjectMap roomObjectMap_
The room objects in this scene element object.
Definition SceneTracker6DOF.h:892
RoomObjectIdentifierSet updatedRoomObjects_
The identifiers of all changed room objects.
Definition SceneTracker6DOF.h:904
SceneElementRoom(RoomObjectMap &&roomObjectMap, RoomObjectIdentifierSet &&addedRoomObjects, RoomObjectIdentifierSet &&removedRoomObjects, RoomObjectIdentifierSet &&changedRoomObjects, RoomObjectIdentifierSet &&updatedRoomObjects)
Creates a new scene element object with several given room objects.
Definition SceneTracker6DOF.h:1269
RoomObjectIdentifierSet addedRoomObjects_
The identifiers of all added room objects.
Definition SceneTracker6DOF.h:895
std::unordered_set< std::string > RoomObjectIdentifierSet
Definition of an unordered set holding object identifiers.
Definition SceneTracker6DOF.h:840
std::vector< SharedVolumetricRoomObject > SharedVolumetricRoomObjects
Definition of a vector holding volumetric room objects.
Definition SceneTracker6DOF.h:835
std::vector< SharedPlanarRoomObject > SharedPlanarRoomObjects
Definition of a vector holding planar room objects.
Definition SceneTracker6DOF.h:830
RoomObjectIdentifierSet removedRoomObjects_
The identifiers of all removed room objects.
Definition SceneTracker6DOF.h:898
std::shared_ptr< PlanarRoomObject > SharedPlanarRoomObject
Definition of a shared pointer holding a planar room object.
Definition SceneTracker6DOF.h:815
const RoomObjectIdentifierSet & removedRoomObjects() const
Returns the identifiers of all room object which have been removed.
Definition SceneTracker6DOF.h:1290
const RoomObjectMap & roomObjectMap() const
Returns all room objects of this scene element object, may be empty.
Definition SceneTracker6DOF.h:1280
const RoomObjectIdentifierSet & addedRoomObjects() const
Returns the identifiers of all room object which have been added.
Definition SceneTracker6DOF.h:1285
std::shared_ptr< VolumetricRoomObject > SharedVolumetricRoomObject
Definition of a shared pointer holding a volumetric room object.
Definition SceneTracker6DOF.h:820
RoomObjectIdentifierSet changedRoomObjects_
The identifiers of all changed room objects.
Definition SceneTracker6DOF.h:901
std::vector< SharedRoomObject > SharedRoomObjects
Definition of a vector holding room objects.
Definition SceneTracker6DOF.h:825
std::shared_ptr< RoomObject > SharedRoomObject
Definition of a shared pointer holding a room object.
Definition SceneTracker6DOF.h:810
const RoomObjectIdentifierSet & updatedRoomObjects() const
Returns the identifiers of all room object which have been updated.
Definition SceneTracker6DOF.h:1300
const RoomObjectIdentifierSet & changedRoomObjects() const
Returns the identifiers of all room object which have been changed.
Definition SceneTracker6DOF.h:1295
SceneTracker6DOFSample(const Timestamp &timestamp, const ReferenceSystem referenceSystem, const ObjectIds &objectIds, const Orientations &orientations, const Positions &positions, const SharedSceneElements &sceneElements, const Metadata &metadata=Metadata())
Creates a new 6DOF tracker sample.
SharedSceneElements sceneElements_
The scene elements.
Definition SceneTracker6DOF.h:958
const SharedSceneElements & sceneElements() const
Returns the scene elements of this sample.
Definition SceneTracker6DOF.h:1338
SceneTracker6DOFSample(const Timestamp &timestamp, const ReferenceSystem referenceSystem, ObjectIds &&objectIds, Orientations &&orientations, Positions &&positions, SharedSceneElements &&sceneElements, Metadata &&metadata=Metadata())
Creates a new 6DOF tracker sample.
This class implements the base for all 6-DOF scene trackers.
Definition SceneTracker6DOF.h:42
~SceneTracker6DOF() override
Destructs a 6-DOF tracker object.
SceneTracker6DOF(const std::string &name)
Creates a new 6-DOF scene tracker object.
std::vector< SharedSceneElement > SharedSceneElements
Definition of a vector holding scene elements.
Definition SceneTracker6DOF.h:915
static DeviceType deviceTypeSceneTracker6DOF()
Definition of this device type.
Definition SceneTracker6DOF.h:1343
virtual bool exportSceneElements(const std::string &format, std::ostream &outputStream, const std::string &options=std::string()) const
Exports the determined scene elements.
std::shared_ptr< SceneElement > SharedSceneElement
Definition of a shared pointer holding a scene element.
Definition SceneTracker6DOF.h:910
SmartObjectRef< SceneTracker6DOFSample, Sample > SceneTracker6DOFSampleRef
Definition of a smart object reference for 6-DOF scene tracker samples.
Definition SceneTracker6DOF.h:964
This class implements a smart device reference.
Definition DeviceRef.h:36
Tracker6DOFSample(const Timestamp &timestamp, const ReferenceSystem referenceSystem, const ObjectIds &objectIds, const Orientations &orientations, const Positions &positions, const Metadata &metadata=Metadata())
Creates a new 6DOF tracker sample.
Tracker6DOF(const std::string &name)
Creates a new 6DOF tracker object.
ReferenceSystem referenceSystem() const
Returns the reference system of the tracker.
Definition devices/Tracker.h:330
@ SCENE_TRACKER_6DOF
6DOF scene tracker.
Definition devices/Tracker.h:56
ReferenceSystem
Definition of different tracking reference system.
Definition devices/Tracker.h:74
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition SmartObjectRef.h:90
This class implements a timestamp.
Definition Timestamp.h:64
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
std::vector< Index64 > Indices64
Definition of a vector holding 64 bit index values.
Definition Base.h:108
SmartDeviceRef< SceneTracker6DOF > SceneTracker6DOFRef
Definition of a smart object reference for a 6-DOF scene tracker.
Definition SceneTracker6DOF.h:34
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition Vector2.h:64
PlaneT3< Scalar > Plane3
Definition of the Plane3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single ...
Definition Plane3.h:31
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
std::shared_ptr< AnyCamera > SharedAnyCamera
Definition of a shared pointer holding an AnyCamera object with Scalar precision.
Definition AnyCamera.h:61
VectorT3< Scalar > Vector3
Definition of a 3D vector.
Definition Vector3.h:29
BoxT3< Scalar > Box3
Definition of the Box3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single or...
Definition Box3.h:28
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition Vector3.h:65
Namespace of the Devices library.
Definition AccelerationSensor3DOF.h:24
The namespace covering the entire Ocean framework.
Definition Accessor.h:15