VR-Forces 4.1 Class Documentation
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 class DtVector;
22 
23 namespace makVrv
24 {
25  class DtDe;
26 
31  {
32  public:
34  DtSimpleIntersectorResult( double cx, double cy, double cz,
35  double cnormalX, double cnormalY, double cnormalZ,
36  const DtUniqueID& cid, unsigned int celementType);
37 
40 
41  public:
42  // Actually a DtElementEntry::ElementType
43  unsigned int elementType;
44  };
45 
52  {
53  public:
55  static DtSimpleIntersector& instance(DtDe& de);
56 
58  static void registerInstance(DtDe& de, DtSimpleIntersector* anInstance);
59 
61  virtual ~DtSimpleIntersector();
62 
65  virtual double heightAboveTerrain(
66  const DtVector& loc,
68  int modelSet=0,
69  bool useHighLod=false,
70  bool includeEntities=false,
71  std::vector<DtElementID>* ignoreList=0
72  );
73 
74  virtual double heightAboveTerrain(
75  DtElementID element,
77  int modelSet=0,
78  bool useHighLod=false,
79  bool includeEntities=false,
80  std::vector<DtElementID>* ignoreList=0
81  );
82 
84  virtual double heightOfTerrain(
85  const DtVector& loc,
87  int modelSet=0,
88  bool useHighLod=false);
89 
93  virtual bool hasLineOfSight(
94  const DtVector& fromLoc,
95  const DtVector& toLoc,
97  int modelSet=0,
98  bool useHighLod=false,
99  bool includeEntities=false,
100  std::vector<DtElementID>* ignoreList=0);
101 
102  virtual bool hasLineOfSight(
103  DtElementID fromElem,
104  DtElementID toElem,
106  int modelSet=0,
107  bool useHighLod=false,
108  bool includeEntities=false,
109  std::vector<DtElementID>* ignoreList=0);
110 
111  protected:
113 
115  virtual DtUniqueID sceneObjectIdFromElementId(
116  DtElementID element, int modelSet);
117 
119  virtual DtVector positionFromSceneObjectId(DtUniqueID sceneObjectId);
120 
123  virtual bool getTerrainIntersection(
124  const DtVector& loc,
125  DtIntersectorResult& result,
126  int modelSet=0,
127  bool useHighLod=false,
128  bool includeEntities=false,
129  std::vector<DtElementID>* ignoreList=0);
130 
131  virtual void fillInElementType(DtSimpleIntersectorResult& result);
132 
133  protected:
135 
136  };
137 }

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)