VR-Forces Developer's Guide
 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) 2022 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>
17 
20 
21 #include <vector>
22 
23 #include <matrix/vlVector.h>
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtIntersectorsContainer;
29  class DtCoordinateSystem;
30 
35  {
36  public:
38 #if 0
39  DtSimpleIntersectorResult( double cx, double cy, double cz,
40  double cnormalX, double cnormalY, double cnormalZ,
41  const DtUniqueID& cid, unsigned int celementType);
42 #endif
44  DtSimpleIntersectorResult& operator=( const DtSimpleIntersectorResult& orig );
45 
46  public:
47  // Actually a DtElementEntry::ElementType
48  unsigned int elementType;
49  };
50 
57  {
58  public:
60  static DtSimpleIntersector& instance(DtDe& de);
61 
63  static void registerInstance(DtDe& de, DtSimpleIntersector* anInstance);
64 
66  virtual ~DtSimpleIntersector();
67 
70  virtual double heightAboveTerrain(
71  const DtVector& loc,
74  bool useHighLod=false,
75  bool includeEntities=false,
76  std::vector<DtElementID>* ignoreList=0
77  );
78 
79  virtual double heightAboveTerrain(
80  DtElementID element,
83  bool useHighLod=false,
84  bool includeEntities=false,
85  std::vector<DtElementID>* ignoreList=0
86  );
87 
91  virtual double heightOfTerrain(
92  const DtVector& loc,
95  bool useHighLod=false);
96 
100  virtual bool hasLineOfSight(
101  const DtVector& fromLoc,
102  const DtVector& toLoc,
105  bool useHighLod=false,
106  bool includeEntities=false,
107  std::vector<DtElementID>* ignoreList=0);
108 
109  virtual bool hasLineOfSight(
110  DtElementID fromElem,
111  DtElementID toElem,
114  bool useHighLod=false,
115  bool includeEntities=false,
116  std::vector<DtElementID>* ignoreList=0);
117 
118  protected:
120 
122  virtual DtUniqueID sceneObjectIdFromElementId(
123  DtElementID element, DtModelSetId modelSet);
124 
126  virtual DtVector positionFromSceneObjectId(DtUniqueID sceneObjectId);
127 
130  virtual bool getTerrainIntersection(
131  const DtVector& loc,
132  DtIntersectorResult& result,
134  bool useHighLod=false,
135  bool includeEntities=false,
136  std::vector<DtElementID>* ignoreList=0);
137 
138  virtual void fillInElementType(DtSimpleIntersectorResult& result);
139 
141  virtual void slot_coordinateSystemChanged();
142 
143 
144  protected:
146  DtIntersectorsContainer* myIntersectors = nullptr;
147 
149 
152  DtCoordinateSystem* myCoordinateSystem = nullptr;
153 
154  };
155 }
DtDe & myDe
Definition: DtSimpleIntersector.h:145
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Utility class that contains intersectors for all model sets in the system (3d, xr, 2d) Use an object of this class when all models sets can be possibly needed. When you know which model set you need, you can just use the DtIntersectorCreator to create an intersector for a model set Models sets corresponding to 3d, xr and 2d are created by default (these correspond to values of 0, 1 and 5) Additional model sets can be registered with DtIntersectorsContainer::registerModelSet.
Definition: DtIntersectorsContainer.h:37
Descriptor for a single intersection result.
Definition: DtIntersectorResult.h:21
DtSimpleIntersectorResult is the DtSimpleIntersector-specific result class. It adds the element type ...
Definition: DtSimpleIntersector.h:34
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
DtSignalConnectionManager myConnections
Definition: DtSimpleIntersector.h:148
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv:DtIntersector class.
unsigned int elementType
Definition: DtSimpleIntersector.h:48
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSimpleIntersector is a higher-level intersector class which adds functions for line of sight...
Definition: DtSimpleIntersector.h:56
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
Base class to provide boost signal/slot management.
Contains makVrv::DtUniqueID type.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtModelSetId
Definition: DtModelSetEnums.h:19
Contains various enum classes relating to model sets.
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)