VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
luaFeatureSet.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
7 #include <vrfLua/vrfLuaDefines.h>
8 #include <features/featureSet.h>
9 #include <features/query.h>
10 
12 #include "vrfutil/scriptGeometry.h"
13 #include "vrfutil/objectCounter.h"
14 
15 #include <boost/shared_ptr.hpp>
16 
17 #include <luabind/luabind.hpp>
18 
19 class DtSimManager;
20 
27  : public DtAsciiSerializable
28  , public DtObjectDebugger<DtLuaFeatureSet>
29 {
30 public:
33 
36 
39 
40  DtLuaFeatureSet& operator=(const DtLuaFeatureSet &orig);
41 
43  virtual ~DtLuaFeatureSet();
44 
46  DtLuaFeatureSet getFeaturesWithinArea(luabind::object const& points, luabind::object const& attributes);
47 
50  DtLuaFeatureSet getFeaturesWithinRange(const DtLocation3D&, double range, luabind::object const& attributes);
51 
52 public:
54 
56  virtual void setSimManager(DtSimManager* simManager);
57 
58  virtual DtString objectType() const;
59 
62 
65  bool deserialize(const DtString& data);
66 
68  static DtAsciiSerializable* creator();
69 
70 public:
73 
75  bool getIsLoaded() const;
76 
78  int getFeatureCount();
79 
82  bool getIsPointFeature(int);
83 
86  bool getIsLinearFeature(int);
87 
90  bool getIsArealFeature(int);
91 
94  std::string getFeatureType(int);
95 
98  std::vector<std::string> getFeatureAttributeNames(int);
99 
101  bool getHasAttributeNamed(int, const std::string);
102 
105  DtLocation3D getLocation3D(int);
106 
109  std::vector<DtLocation3D> getLocations3D(int);
110 
113  static luabind::object getFeatureAttributeValue(DtLuaFeatureSet&, int, const std::string, lua_State*);
114 
116  MAKVRinTerra::DtFeature::CPtr feature(int);
118 
119 protected:
121  virtual MAKVRinTerra::DtQuery generateQuery(luabind::object const& attributes);
122 
124  virtual void gatherFeatures(const MAKVRinTerra::DtFeature&);
125 
128  virtual void testLoaded();
129 
130 protected:
131  boost::shared_ptr<MAKVRinTerra::DtFeatureSet> myFeatureSet;
133 
135  std::vector<DtLocation3D> myLocations;
136  double myRange;
137  std::map<std::string, std::string> myAttributes;
138 
140  typedef std::vector<MAKVRinTerra::DtFeature::CPtr> Features;
142 };
143 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)