VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
baseFeatureConverter.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include <deque>
10 
12 #include <features/query.h>
13 #include "features/areaFeature.h"
14 #include <list>
15 
16 class DtTerrainInterface;
17 
19 namespace BHAVE
20 {
21  typedef void (*DtProcessBoundingPolygonCallbackFcn)(const std::deque<DtPoint>& points, unsigned int terrainType, void* usr);
22 
24  {
25  public:
35  DtBaseFeatureConverter(DtTerrainInterface* terrainInterface,
36  const std::string& featureType,
37  unsigned int terrainType,
38  bool isGeocentric = false);
39 
40  virtual ~DtBaseFeatureConverter();
41 
50  virtual void init(DtTerrainProcessPolygonsBox& box);
51 
59  virtual bool processAllBoundingPolygons(DtProcessBoundingPolygonCallbackFcn func, void* usr) = 0;
60 
63  virtual bool isValidBoundingPolygon(const std::deque<DtPoint>& points) const;
64 
65  virtual DtTerrainInterface* terrainInterface() const { return myTerrainInterface; }
66  virtual unsigned int terrainType() const { return myTerrainType; }
67  virtual std::string featureType() const { return myFeatureType; }
68  virtual const MAKVRinTerra::DtFeatureGeometry& geometry() const { return myGeometry; }
69  virtual bool isGeocentric() const { return myIsGeocentric; }
70 
71  protected:
73  std::string myFeatureType;
75  unsigned int myTerrainType;
76 
78  };
79 
81 
83  {
84  public:
85  DtAreaFeatureConverter(DtTerrainInterface* terrainInterface,
86  const std::string& featureType,
87  unsigned int terrainType,
88  bool isGeocentric = false);
89 
90  virtual ~DtAreaFeatureConverter();
91 
92  virtual void init(DtTerrainProcessPolygonsBox& box);
93  virtual bool processAllBoundingPolygons(DtProcessBoundingPolygonCallbackFcn func, void* usr);
94 
97  virtual void operator()(const MAKVRinTerra::DtAreaFeature& feature);
98 
99  protected:
100  std::list< std::deque<DtPoint> > myObstacles;
101  };
102 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)