VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtSimpleIntersector.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
10 
11 #pragma once
12 
13 #include <vrvCore/vrvCore.h>
14 #include <vrvCore/DtUniqueID.h>
15 #include <vrvCore/DtIntersector.h>
16 
18 
19 #include <vector>
20 
21 #include <matrix/vlVector.h>
22 
23 namespace makVrv
24 {
25  class DtDe;
26 
31  {
32  public:
34 #if 0
35  DtSimpleIntersectorResult( double cx, double cy, double cz,
36  double cnormalX, double cnormalY, double cnormalZ,
37  const DtUniqueID& cid, unsigned int celementType);
38 #endif
40  DtSimpleIntersectorResult& operator=( const DtSimpleIntersectorResult& orig );
41 
42  public:
43  // Actually a DtElementEntry::ElementType
44  unsigned int elementType;
45  };
46 
53  {
54  public:
56  static DtSimpleIntersector& instance(DtDe& de);
57 
59  static void registerInstance(DtDe& de, DtSimpleIntersector* anInstance);
60 
62  virtual ~DtSimpleIntersector();
63 
66  virtual double heightAboveTerrain(
67  const DtVector& loc,
69  int modelSet=0,
70  bool useHighLod=false,
71  bool includeEntities=false,
72  std::vector<DtElementID>* ignoreList=0
73  );
74 
75  virtual double heightAboveTerrain(
76  DtElementID element,
78  int modelSet=0,
79  bool useHighLod=false,
80  bool includeEntities=false,
81  std::vector<DtElementID>* ignoreList=0
82  );
83 
85  virtual double heightOfTerrain(
86  const DtVector& loc,
88  int modelSet=0,
89  bool useHighLod=false);
90 
94  virtual bool hasLineOfSight(
95  const DtVector& fromLoc,
96  const DtVector& toLoc,
98  int modelSet=0,
99  bool useHighLod=false,
100  bool includeEntities=false,
101  std::vector<DtElementID>* ignoreList=0);
102 
103  virtual bool hasLineOfSight(
104  DtElementID fromElem,
105  DtElementID toElem,
107  int modelSet=0,
108  bool useHighLod=false,
109  bool includeEntities=false,
110  std::vector<DtElementID>* ignoreList=0);
111 
112  protected:
114 
116  virtual DtUniqueID sceneObjectIdFromElementId(
117  DtElementID element, int modelSet);
118 
120  virtual DtVector positionFromSceneObjectId(DtUniqueID sceneObjectId);
121 
124  virtual bool getTerrainIntersection(
125  const DtVector& loc,
126  DtIntersectorResult& result,
127  int modelSet=0,
128  bool useHighLod=false,
129  bool includeEntities=false,
130  std::vector<DtElementID>* ignoreList=0);
131 
132  virtual void fillInElementType(DtSimpleIntersectorResult& result);
133 
134  protected:
136 
137  };
138 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)