VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
terrainReasoner.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
8 #include "matrix/vlVector.h"
9 #include <vector>
10 using namespace std;
11 
12 class DtPhysicalWorld;
13 class DtLocalVertexList;
15 class DtIntMatrix;
16 class DtArea;
17 class DtTopoPoint;
18 
98 
100 {
102  double viewPct;
104  double coverPct;
105 };
106 
109  vector<DtViewCoverPosition> positions;
110  double viewPctAvg;
111  double coverPctAvg;
112  double overallPctAvg;
113 };
114 
116 {
117 public:
118  typedef DtTerrainReasoner* (*DtTerrainReasonerCreatorFcn)(DtPhysicalWorld& physicalWorld);
119 
120 protected:
121  explicit DtTerrainReasoner(DtPhysicalWorld& physicalWorld);
122 
125  DtTerrainReasoner(const DtTerrainReasoner& other);
126  DtTerrainReasoner& operator=(const DtTerrainReasoner& other);
128 
129 public:
130  virtual ~DtTerrainReasoner();
131 
133  static DtTerrainReasoner* instance();
134 
136  static DtTerrainReasoner* createInstance(DtPhysicalWorld& physicalWorld);
137 
139  static DtTerrainReasoner* creator(DtPhysicalWorld& physicalWorld);
140 
169  bool findHilltopsInArea(
170  const DtLocalVertexList& areaVertices,
171  double gridResolutionMeters,
172  double prominenceMeters,
173  double prominenceRangeMeters,
174  vector<DtVector>& foundHilltopsLocal,
175  string* queryString = NULL,
176  string* problemDescription = NULL);
177 
225  bool findPositionGroup(
226  const DtLocalVertexList& targetsAreaVertices,
227  unsigned int targetsAreaSampleCount,
228  double targetsHeightMeters,
229  double viewHeightMeters,
230  double coverHeightMeters,
231  const DtVector& pivotLocal,
232  double forwardRangeMeters,
233  double backwardRangeMeters,
234  double lateralRangeMeters,
235  double verticalIntervalMeters,
236  double maxSlopeDegrees,
237  double lateralIntervalMeters,
238  double positionsLateralSpacingMeters,
239  unsigned int positionsCount,
240  vector<DtViewCoverPosition>& foundPositions,
241  string* queryString = NULL,
242  string* problemDescription = NULL);
243 
287  bool findPosition(
288  const DtLocalVertexList& targetsAreaVertices,
289  unsigned int targetsAreaSampleCount,
290  double targetsHeightMeters,
291  double viewHeightMeters,
292  double coverHeightMeters,
293  const DtVector& pivotLocal,
294  double forwardRangeMeters,
295  double backwardRangeMeters,
296  double verticalIntervalMeters,
297  double maxSlopeDegrees,
298  DtViewCoverPosition& foundPosition,
299  string* queryString = NULL,
300  string* problemDescription = NULL);
301 
361  bool findPositionGroupsInArea(
362  const DtLocalVertexList& searchAreaVertices,
363  double gridResolutionMeters,
364  double prominenceMeters,
365  double prominenceRangeMeters,
366  const DtLocalVertexList& targetsAreaVertices,
367  unsigned int targetsAreaSampleCount,
368  double targetsHeightMeters,
369  double viewHeightMeters,
370  double coverHeightMeters,
371  double forwardRangeMeters,
372  double backwardRangeMeters,
373  double lateralRangeMeters,
374  double verticalIntervalMeters,
375  double maxSlopeDegrees,
376  double lateralIntervalMeters,
377  double positionsLateralSpacingMeters,
378  unsigned int positionsCount,
379  vector<DtViewCoverPositionGroup>& foundPositionGroups,
380  string* queryString = NULL,
381  string* problemDescription = NULL);
382 
438  bool findRidgedPositionGroupsInArea(
439  const DtLocalVertexList& searchAreaVertices,
440  const DtLocalVertexList& targetsAreaVertices,
441  unsigned int targetsAreaSampleCount,
442  double targetsHeightMeters,
443  double viewHeightMeters,
444  double coverHeightMeters,
445  double coverRangeMeters,
446  double lateralRangeMeters,
447  double lateralIntervalMeters,
448  double verticalRangeMeters,
449  double verticalIntervalMeters,
450  double maxSlopeDegrees,
451  double positionsLateralSpacingMeters,
452  unsigned int positionsCount,
453  vector<DtViewCoverPositionGroup>& foundPositionGroups,
454  string* queryString = NULL,
455  string* problemDescription = NULL);
456 
457 private:
458  void findPositionGroupWithHostQuery(
459  const DtLocalVertexList& targetsAreaVertices,
460  unsigned int targetsAreaSampleCount,
461  double targetsHeightMeters,
462  double viewHeightMeters,
463  double coverHeightMeters,
464  const DtVector& pivotLocal,
465  unsigned int forwardRangeMeters,
466  unsigned int backwardRangeMeters,
467  unsigned int lateralRangeMeters,
468  unsigned int verticalIntervalMeters,
469  double maxSlopeDegrees,
470  unsigned int lateralIntervalMeters,
471  unsigned int positionsLateralSpacingMeters,
472  unsigned int positionsCount,
473  DtHostQueryImplementation& hostQuery,
474  vector<DtViewCoverPosition>& foundPositions);
475  void BuildHeightGrid(double fromX, double fromY, double toX, double toY, int intervalMeters,
476  const DtHostQueryImplementation& hostQuery, DtIntMatrix& grid);
477  void CovertToArea(const DtLocalVertexList& areaVertices, DtHostQueryImplementation& hostQuery, DtArea& area);
478  bool ValidateNoOverlap(string functionName, const DtArea& searchArea, const DtArea& targetArea, string* problemDescription);
479  string ValidationMessage(string functionName, bool isError, string offendingParameterName,
480  double offendingParameterValue, string description);
481  string ValidationMessage(string functionName, bool isError, string offendingParameterName,
482  string description);
483  bool ValidateAreaVertices(string functionName, const DtLocalVertexList& areaVertices, string name, string* problemDescription);
484  bool ValidateGreaterThanZero(string functionName, double value, string name, string* problemDescription);
485  bool ValidateLessThan(string functionName,
486  double value, string name,
487  double refValue, string refName,
488  string* problemDescription);
489  bool ValidateNotLessThan(string functionName,
490  double value, string name,
491  double refValue, string refName,
492  string* problemDescription,
493  bool isError=true);
494  bool ValidateGreaterThan(string functionName,
495  double value, string name,
496  double refValue, string refName,
497  string* problemDescription);
498  bool ValidateNotGreaterThan(string functionName,
499  double value, string name,
500  double refValue, string refName,
501  string* problemDescription,
502  bool isError = true);
503  bool ValidateLocatedOutside(string functionName, const DtArea& targetsArea, const DtTopoPoint& pt, string* problemDescription);
504  bool ValidateCoverNotLessThanView(string functionName, double coverHeightMeters, double viewHeightMeters, string* problemDescription);
505 protected:
507 
508  static DtTerrainReasonerCreatorFcn TheCreatorFcn;
510 };
511 
double viewPctAvg
Definition: terrainReasoner.h:110
Definition: hostQueryImplementation.h:10
Definition: terrainReasoner.h:115
DtVector pivotPointLocal
Definition: terrainReasoner.h:108
DtPhysicalWorld & myPhysicalWorld
Definition: terrainReasoner.h:506
double coverPctAvg
Average of viewPct values from all positions.
Definition: terrainReasoner.h:111
This class represents a topographic coordinate. It has the exact same interface as DtVector...
Definition: terrainReasonerAlgos.h:14
double coverPct
Definition: terrainReasoner.h:104
DtVector viewPointLocal
Definition: terrainReasoner.h:101
static DtTerrainReasonerCreatorFcn TheCreatorFcn
Definition: terrainReasoner.h:508
DtVector coverPointLocal
100 means ViewPoint has line-of-sight to entire targets area.
Definition: terrainReasoner.h:103
The DtPhysicalWorld is the primary interface to and manager of all of the &quot;physical&quot; aspects of the s...
Definition: physicalWorld.h:102
vector< DtViewCoverPosition > positions
Definition: terrainReasoner.h:109
double viewPct
Definition: terrainReasoner.h:102
Definition: terrainUtility.h:14
#define DT_DLL_terrainReasoning
This file is used to determine how to build.
Definition: terrainReasoningDefines.h:25
this interface defines terrain reasoning queries providing tactical analysis of terrain ( DtPhysicalW...
Definition: terrainReasoner.h:99
double overallPctAvg
Average of coverPct values from all positions.
Definition: terrainReasoner.h:112
Definition: terrainReasoner.h:107
class DtLocalVertexList:
Definition: localVertexList.h:20
Definition: terrainUtility.h:23
static DtTerrainReasoner * TheInstance
Definition: terrainReasoner.h:509

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)