VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
roadObstructionFinder.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 6 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 
10 #pragma once
11 
13 #include "vrfutil/railSegment.h"
14 #include "vrfmodel/roadSegment.h"
15 #include <list>
19 
20 #include <matrix/vlVector.h>
21 
24 class DtLocalObject;
25 
31 {
32 public:
33 
34  DtRoadObstructionFinder(const DtSimulationServices* objMgr, DtLocalObject* hostEntity, bool drivingOnLeft);
35  virtual ~DtRoadObstructionFinder();
36 
37  virtual void init(const DtRwEntityTypeList & passableObjectTypes);
38 
47  virtual bool findFirstObstructionInLane(const DtRoadSegment* startSegment,
48  const int roadLaneNum,
49  const double frontBumperPositionAlongLane,
50  double lookDistance, DtRailObstructionPtr& result,
51  std::vector<std::vector<DtVector> > & debugBoxes,
52  bool debug = false) const;
53 
64  virtual bool findFirstObstructionUpstreamInLane(const DtRoadSegment* startSegment,
65  const int roadLaneNum,
66  const double positionAlongLane,
67  double lookDistance, DtRailObstructionPtr& result,
68  std::vector<std::vector<DtVector> > & debugBoxes,
69  bool debug = false) const;
70 
76  virtual bool findImmediateObstruction(double& obstacleDistance, std::vector<DtVector>& debugLocations,
77  std::vector<std::vector<DtVector>>& debugBoxes, bool debug = false) const;
78 
79 
80 
81 protected:
87  virtual bool findNearestObstructionInSegment(const DtRoadSegment* segment,
88  const int roadLaneNum,
89  const double distFromSegStart, const double testDistance,
90  DtRailObstructionPtr& obstruction,
91  std::vector<std::vector<DtVector> > & debugBoxes,
92  bool debug = false) const;
93 
99  virtual bool findNearestObstructionUpstreamInSegment(const DtRoadSegment* segment,
100  double testAltitude, const int roadLaneNum,
101  const double distFromSegStart, const double testDistance,
102  DtRailObstructionPtr& obstruction,
103  std::vector<std::vector<DtVector> > & debugBoxes,
104  bool debug = false) const;
105 
109  void getBoxPointsFromVolume(const Dt3dBoundingVolume& volume,
110  const DtVector& refPoint, const DtDcm& orientation,
111  std::vector<std::vector<DtVector> >& outputList) const;
112 
113 private:
115 
118  DtRoadObstructionFinder& operator=(const DtRoadObstructionFinder& orig);
120 
121 protected:
126 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtCollisionDetector * myCollisionDetector
Definition: roadObstructionFinder.h:123
class DtRwEntityTypeList:
Definition: rwEntityTypeList.h:23
std::shared_ptr< DtRailObstruction > DtRailObstructionPtr
Definition: railObstructionInfo.h:78
DtLocalObject * myHostEntity
Definition: roadObstructionFinder.h:124
bool myDrivingOnLeft
Definition: roadObstructionFinder.h:125
const DtSimulationServices * mySimulationServices
Definition: roadObstructionFinder.h:122
The DtCollisionDetector is a class used to detect collisions between a specified list of obstructions...
Definition: collisionDetector.h:57
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Description of one segment of a road.
Definition: roadSegment.h:408
An object containing functions to find obstructions in road segments in a road path; part of a DtRoad...
Definition: roadObstructionFinder.h:30
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)