VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 
87  virtual double heightOfTerrain(
88  const DtVector& loc,
90  int modelSet=0,
91  bool useHighLod=false);
92 
96  virtual bool hasLineOfSight(
97  const DtVector& fromLoc,
98  const DtVector& toLoc,
100  int modelSet=0,
101  bool useHighLod=false,
102  bool includeEntities=false,
103  std::vector<DtElementID>* ignoreList=0);
104 
105  virtual bool hasLineOfSight(
106  DtElementID fromElem,
107  DtElementID toElem,
109  int modelSet=0,
110  bool useHighLod=false,
111  bool includeEntities=false,
112  std::vector<DtElementID>* ignoreList=0);
113 
114  protected:
116 
118  virtual DtUniqueID sceneObjectIdFromElementId(
119  DtElementID element, int modelSet);
120 
122  virtual DtVector positionFromSceneObjectId(DtUniqueID sceneObjectId);
123 
126  virtual bool getTerrainIntersection(
127  const DtVector& loc,
128  DtIntersectorResult& result,
129  int modelSet=0,
130  bool useHighLod=false,
131  bool includeEntities=false,
132  std::vector<DtElementID>* ignoreList=0);
133 
134  virtual void fillInElementType(DtSimpleIntersectorResult& result);
135 
136  protected:
138 
139  };
140 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)