VR-Forces 4.1 Class Documentation
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 
14 #include <boost/shared_ptr.hpp>
15 
16 #include <luabind/luabind.hpp>
17 
18 class DtSimManager;
19 
26 {
27 public:
30 
33 
36 
37  DtLuaFeatureSet& operator=(const DtLuaFeatureSet &orig);
38 
40  virtual ~DtLuaFeatureSet();
41 
43  DtLuaFeatureSet getFeaturesWithinArea(luabind::object const& points, luabind::object const& attributes);
44 
47  DtLuaFeatureSet getFeaturesWithinRange(const DtLocation3D&, double range, luabind::object const& attributes);
48 
49 public:
51 
53  virtual void setSimManager(DtSimManager* simManager);
54 
55  virtual DtString objectType() const;
56 
59 
62  bool deserialize(const DtString& data);
63 
65  static DtAsciiSerializable* creator();
66 
67 public:
70 
72  bool getIsLoaded() const;
73 
75  int getFeatureCount();
76 
79  bool getIsPointFeature(int);
80 
83  bool getIsLinearFeature(int);
84 
87  bool getIsArealFeature(int);
88 
91  std::string getFeatureType(int);
92 
95  std::vector<std::string> getFeatureAttributeNames(int);
96 
98  bool getHasAttributeNamed(int, const std::string);
99 
102  DtLocation3D getLocation3D(int);
103 
106  std::vector<DtLocation3D> getLocations3D(int);
107 
110  static luabind::object getFeatureAttributeValue(DtLuaFeatureSet&, int, const std::string, lua_State*);
111 
113  MAKVRinTerra::DtFeature::CPtr feature(int);
115 
116 protected:
118  virtual MAKVRinTerra::DtQuery generateQuery(const MAKVRinTerra::DtFeatureGeometry&, luabind::object const& attributes);
119 
121  virtual void gatherFeatures(const MAKVRinTerra::DtFeature&);
122 
125  virtual void testLoaded();
126 
127 protected:
128  boost::shared_ptr<MAKVRinTerra::DtFeatureSet> myFeatureSet;
130 
132  std::vector<DtLocation3D> myLocations;
133  double myRange;
134  std::map<std::string, std::string> myAttributes;
135 
137  typedef std::vector<MAKVRinTerra::DtFeature::CPtr> Features;
139 };
140 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)