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 DtRwObjectTypeList & passableObjectTypes);
38 
47  virtual bool findFirstObstructionInLane(const DtRoadSegment* startSegment,
48  const int roadLaneNum,
49  const double positionAlongLane,
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 
71 protected:
77  virtual bool findNearestObstructionInSegment(const DtRoadSegment* segment,
78  const int roadLaneNum,
79  const double distFromSegStart, const double testDistance,
80  DtRailObstructionPtr& obstruction,
81  std::vector<std::vector<DtVector> > & debugBoxes,
82  bool debug = false) const;
83 
89  virtual bool findNearestObstructionUpstreamInSegment(const DtRoadSegment* segment,
90  double testAltitude, const int roadLaneNum,
91  const double distFromSegStart, const double testDistance,
92  DtRailObstructionPtr& obstruction,
93  std::vector<std::vector<DtVector> > & debugBoxes,
94  bool debug = false) const;
95 
99  void getBoxPointsFromVolume(Dt3dBoundingVolume& volume,
100  DtVector& refPoint, DtDcm& orientation,
101  std::vector<std::vector<DtVector> >& outputList) const;
102 
103 private:
105 
108  DtRoadObstructionFinder& operator=(const DtRoadObstructionFinder& orig);
110 
111 protected:
116 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtCollisionDetector * myCollisionDetector
Definition: roadObstructionFinder.h:113
DtLocalObject * myHostEntity
Definition: roadObstructionFinder.h:114
class DtRwObjectTypeList:
Definition: rwObjectTypeList.h:30
bool myDrivingOnLeft
Definition: roadObstructionFinder.h:115
const DtSimulationServices * mySimulationServices
Definition: roadObstructionFinder.h:112
The DtCollisionDetector is a class used to detect collisions between a specified list of obstructions...
Definition: collisionDetector.h:54
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Description of one segment of a road.
Definition: roadSegment.h:394
An object containing functions to find obstructions in road segments in a road path; part of a DtRoad...
Definition: roadObstructionFinder.h:30
DtBoost::shared_ptr< DtRailObstruction > DtRailObstructionPtr
Definition: railObstructionInfo.h:78
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

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)