VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
luaFeatureGeometry.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrfLua/vrfLuaDefines.h>
13 
15 #include <features/proj.h>
16 
17 #include "vrfutil/scriptGeometry.h"
19 #include <vrfutil/objectCounter.h>
20 
26  : public DtAsciiSerializable
27 #ifdef DtObjectDebugger_Enable
28  , public DtObjectDebugger<DtLuaFeatureGeometry>
29 #endif
30 {
31 public:
32  MAKVRinTerra::DtFeatureGeometry geometry() const;
33 
34  std::string type() const;
35  std::string description() const;
36  std::string toWKT() const;
37 
38  bool isValid() const;
39  bool isEmpty() const;
40 
41  bool isPoint() const;
42  bool isPath() const;
43  bool isArea() const;
44  bool isUnknown() const;
45 
46  unsigned dimension() const;
47  unsigned numberOfPoints() const;
48  unsigned numberOfGeometries() const;
49 
50  DtLuaFeatureGeometry simplify(double tolerance) const;
51 
52  std::vector<DtLocation3D> points() const;
53  std::vector<DtLocation3D> pointsWithHeight() const;
54  std::vector<DtLocation3D> pointsWithoutHeight() const;
55  DtLocation3D singlePointWithHeight(bool& valid) const;
56 
57  std::vector<DtLuaFeatureGeometry> subGeometries() const;
58 
59  bool equals(DtLuaFeatureGeometry g) const;
60  bool intersects(DtLuaFeatureGeometry g) const;
61  bool overlaps(DtLuaFeatureGeometry g) const;
62  bool crosses(DtLuaFeatureGeometry g) const;
63  bool covers(DtLuaFeatureGeometry g) const;
64  bool within(DtLuaFeatureGeometry g) const;
65  bool touches(DtLuaFeatureGeometry g) const;
66  bool contains(DtLuaFeatureGeometry g) const;
67 
68  DtLuaFeatureGeometry extent() const;
69 
70  double length() const;
71  double area() const;
72 
73  DtLuaFeatureGeometry centroid() const;
74 
75  double distanceTo(DtLuaFeatureGeometry g) const;
76 
77  DtLuaFeatureGeometry unionWith(DtLuaFeatureGeometry g) const;
78  DtLuaFeatureGeometry intersectionWith(DtLuaFeatureGeometry g) const;
79  DtLuaFeatureGeometry differenceWith(DtLuaFeatureGeometry g) const;
80  DtLuaFeatureGeometry buffer(double width) const;
81  DtLuaFeatureGeometry convexHull() const;
82  DtLuaFeatureGeometry boundary() const;
83  DtLuaFeatureGeometry closestPointTo(DtLuaFeatureGeometry g, double& distanceTo) const;
84 
85  DtLuaFeatureGeometry asArea() const;
86 
87  void prepare();
88 
89  static DtAsciiSerializable* creator();
90 
91  explicit DtLuaFeatureGeometry(
92  const MAKVRinTerra::DtProj& local,
94 
95  explicit DtLuaFeatureGeometry(
96  const MAKVRinTerra::DtProj::CPtr& local,
98 
99  virtual DtString objectType() const;
100 
102  virtual DtString serialize();
103 
106  virtual bool deserialize(const DtString& data);
107 
108 protected:
110 
113 };
114 
116 DT_DLL_vrfLua std::ostream& operator<<(std::ostream& stream, const DtLuaFeatureGeometry& vec);
117 
Definition: asciiSerializable.h:34
virtual bool deserialize(const DtString &)=0
This function should take the string that was serialized via serialize() and fill this object with th...
Default on in debug, off in release.
Definition: objectCounter.h:31
MAKVRinTerra::DtProj::CPtr myLocalProj
Definition: luaFeatureGeometry.h:111
DT_DLL_features std::ostream & operator<<(std::ostream &, const DtFeatureTransform &)
std::ostream output.
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
Represents some coordinate system. The terms &quot;coordinate system&quot;, &quot;projection&quot;, &quot;spatial reference&quot;...
Definition: proj.h:44
Represents a feature geometry.
Definition: luaFeatureGeometry.h:25
MAKVRinTerra::DtFeatureGeometry myGeometry
Definition: luaFeatureGeometry.h:112
#define DT_DLL_vrfLua
This file is used to determine how to build.
Definition: vrfLuaDefines.h:25
boost::shared_ptr< const DtProj > CPtr
Definition: proj.h:48
virtual DtString objectType() const =0
Should return the string name of this object. The object name should not be part of the serialization...
voidpf stream
Definition: ioapi.h:39
DT_DLL_vrfutil bool intersects(const DtVector &localPoint1, const DtVector &localPoint2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem)
Returns true if the line segment localPoint1-localPoint2 intersects any line segment in localVert...
Represents a feature geometry.
Definition: featureGeometry.h:39
A location3D is a point in space, i.e. a geocentric coordinate.
Definition: scriptGeometry.h:22

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)