VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osgEarthFeatureSet.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include <features/feature.h>
9 #include <features/featureSet.h>
10 
11 #include <osgEarth/Map>
12 #include <osgEarthFeatures/FeatureSource>
13 #include <osgEarthSymbology/Query>
14 #include <osgEarth/MapNode>
15 
16 namespace MAKVRinTerra
17 {
19  {
20  public:
21  typedef osg::ref_ptr<osgEarth::Features::Feature> OsgEarthFeaturePtr;
22 
23  static DtFeatureGeometry::GeometryVector ConvertGeometry(
24  const osgEarth::Symbology::Geometry* geom, const DtProj& proj);
25 
27 
28  unsigned numberOfAttributes(const Key::String&) const;
29 
30  boost::optional<Attribute> attribute(const Key &) const;
31 
32  DtFeatureGeometry geometry() const;
33 
34  void forEachAttribute(ForEachFunction) const;
35 
36  DetachCallback addDeleteCallback(const DeleteCallback&) const
37  {
38  return DetachCallback();
39  }
40 
41  bool isDeleted() const
42  {
43  return false;
44  }
45 
46  protected:
49 
50  typedef osgEarth::Features::AttributeTable AttributeTable;
51  typedef std::map<Key::String, AttributeTable::value_type::second_type> StringAttributeTable;
53  };
54 
56  {
57  public:
59 
60  DtFeatureGeometry geometry() const;
61 
62  protected:
64  };
65 
67  {
68  public:
69  typedef std::set<DtFeature::Key> AttributeSet;
70 
71  static DtFeatureSet* Make(osg::ref_ptr<osgEarth::Features::FeatureSource> featureSource);
72 
73  explicit DtOsgEarthFeatureSet(osg::ref_ptr<osgEarth::Features::FeatureSource> featureSource);
74 
75  std::string label() const;
76  void forEachFeatureParallel(const ForEachFunction&) const;
77  DetachCallback forEachFeatureAsync(const ForEachFunction&) const;
78  DtFeatureSet* filter(
79  const DtQuery&, const boost::optional<DtFeatureGeometry>&, DtLoadType) const;
80  DtFeatureSet* clone() const;
81  bool loaded(double) const;
82  DetachCallback addLoadedCallback(const LoadedCallback&) const;
83  bool elided() const;
84  bool empty() const;
85 
86  protected:
88  DtOsgEarthFeatureSet(const DtOsgEarthFeatureSet&, boost::optional<DtFeatureGeometry>);
89 
90  osg::ref_ptr<osgEarth::Features::FeatureSource> myFeatureSource;
93  boost::optional<DtFeatureGeometry> myGeometryFilter;
94  osgEarth::Features::Query myQuery;
96  };
97 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)