Conscience Core
CscWorldPlace.h
Go to the documentation of this file.
1 //
2 // CscEnvironmentPlaceModel.h
3 // ConscienceRobotManager
4 //
5 // Created by Conscience_Hazar on 05/03/2019.
6 // Copyright © 2019 IliesZaoui. All rights reserved.
7 //
8 
9 #ifndef CscWorldPlace_h
10 #define CscWorldPlace_h
11 
13 #include "Axiomes/Csc3dTypes.h"
15 
16 using std::vector; using std::string;
17 
18 #define PLACE_LOCATION_TAG_ENTITY_BASE "entityBase"
19 
20 class MissingGeolocationTagsException : public exception {
21 public:
22  MissingGeolocationTagsException(const string &errorMessage) noexcept : errorMessage(errorMessage){};
23 
24  const char *what() const noexcept override {
25  return errorMessage.c_str();
26  }
27 
28  ~MissingGeolocationTagsException() noexcept override = default;
29 
30 private:
31  const string errorMessage;
32 };
33 
35 private:
36  string placeModelId;
37  string placeOwner;
38  const bool useConscienceCoordinateSystem;
39 
40 protected:
41  const CscPoint3d &getBaseRotation() const override;
42 
43 public:
47  inline static const CscPoint3d *placeDaeToCscEulerXYZ = new CscPoint3d(0.0,-M_PI,-M_PI_2);
48 
49  string getModelId() const;
50  const string &getModelOwner() const;
51  bool getUseConscienceCoordinateSystem() const;
52 
53  CscWorldPlace * clone();
54 
55  CscPoint3d getMinPositionInWorldCoordinates() const override;
56 
57 
58  bool hasModelId(int modelId);
59  bool hasModelId(const string &modelId);
60 
62 
64  const string &placeModelId,
65  const string &name,
66  CscPoint3d * position,
67  CscPoint3d * rotation,
68  const string &placeOwner,
69  const float mass,
70  vector<CscWorldElementPart *> * parts = nullptr,
71  vector<CscPoint3d *> * positions = nullptr,
72  vector<CscPoint3d *> * normals = nullptr,
73  vector<CscPolygon *> * polygons = nullptr,
74  vector<const CscLocationTag *> * locationTags = nullptr,
75  const float minX = 0,
76  const float minY = 0,
77  const float minZ = 0,
78  const float depth = 0,
79  const float height = 0,
80  const float width = 0,
81  const bool useConscienceCoordianteSystem = false);
82 
83 
87  CscPoint3d *calculatePositionFromGps(double lat, double lng);
88 };
89 
90 #endif
MissingGeolocationTagsException
Definition: CscWorldPlace.h:20
conscience_core::axiomes::CscPoint3d
The CscPoint3d class represents a point in three-dimensional space. It is primarily used to denote a ...
Definition: Csc3dTypes.h:24
CscWorldElement.h
MissingGeolocationTagsException::~MissingGeolocationTagsException
~MissingGeolocationTagsException() noexcept override=default
CscMotionType.h
CscWorldElement
Definition: CscWorldElement.h:23
Csc3dTypes.h
MissingGeolocationTagsException::what
const char * what() const noexcept override
Definition: CscWorldPlace.h:24
CscMotionType
CscMotionType
Definition: CscMotionType.h:12
CscWorldPlace
Definition: CscWorldPlace.h:34
MissingGeolocationTagsException::MissingGeolocationTagsException
MissingGeolocationTagsException(const string &errorMessage) noexcept
Definition: CscWorldPlace.h:22
MotionTypeNormal
@ MotionTypeNormal
Definition: CscMotionType.h:13
conscience_utils::Cartography::calculatePositionFromGps
CscPoint3d * calculatePositionFromGps(double lat, double lng, double latCornerBLScene, double longCornerBLScene, double latCornerBRScene, double longCornerBRScene, double latCornerTLScene, double longCornerTLScene, double latCornerTRScene, double longCornerTRScene)
Definition: CscCartography.cpp:131