VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtRoadObstructionFinder Class Reference

An object containing functions to find obstructions in road segments in a road path; part of a DtRoadMovementController. More...

Public Member Functions

 DtRoadObstructionFinder (DtVrfObjectManager *objMgr, DtPhysicalWorld *world, DtVrfObject *hostEntity, bool drivingOnLeft)
virtual ~DtRoadObstructionFinder ()
virtual void init (const DtRwObjectTypeList &passableObjectTypes)
virtual bool findFirstObstructionInLane (const DtRoadSegment *startSegment, const int roadLaneNum, const double positionAlongLane, double lookDistance, DtRailObstructionPtr &result, std::vector< std::vector< DtVector > > &debugBoxes, bool debug=false) const
 Looks for obstructions along the given road, starting at the provided lane and position in lane for the specified distance along the lane and connecting lanes in downstream segments.
virtual bool findFirstObstructionUpstreamInLane (const DtRoadSegment *startSegment, const int roadLaneNum, const double positionAlongLane, double lookDistance, DtRailObstructionPtr &result, std::vector< std::vector< DtVector > > &debugBoxes, bool debug=false) const
 Looks for obstructions along the given road, starting at the provided local location for the specified distance along the rail.

Protected Member Functions

virtual bool findNearestObstructionInSegment (const DtRoadSegment *segment, const int roadLaneNum, const double distFromSegStart, const double testDistance, DtRailObstructionPtr &obstruction, std::vector< std::vector< DtVector > > &debugBoxes, bool debug=false) const
 Finds all obstructions along the specified segment, in the given lane, starting at distFromSegStart and running for the specified testDistance.
virtual bool findNearestObstructionUpstreamInSegment (const DtRoadSegment *segment, double testAltitude, const int roadLaneNum, const double distFromSegStart, const double testDistance, DtRailObstructionPtr &obstruction, std::vector< std::vector< DtVector > > &debugBoxes, bool debug=false) const
 Finds all obstructions along the specified segment, starting at distFromSegStart, and running for the specified testDistance.
void getBoxPointsFromVolume (Dt3dBoundingVolume &volume, DtVector &refPoint, DtDcm &orientation, std::vector< std::vector< DtVector > > &outputList) const
 Generates the (5) world points defining rectangle that is a horizontal slice through the given volume at the midpoint of the volume.

Protected Attributes

DtVrfObjectManagermyObjectManager
DtPhysicalWorldmyPhysicalWorld
DtCollisionDetectormyCollisionDetector
DtVrfObjectmyHostEntity
bool myDrivingOnLeft

Private Member Functions

 DtRoadObstructionFinder ()
 Not implemented.
 DtRoadObstructionFinder (const DtRoadObstructionFinder &orig)
DtRoadObstructionFinderoperator= (const DtRoadObstructionFinder &orig)

Detailed Description

An object containing functions to find obstructions in road segments in a road path; part of a DtRoadMovementController.

This class finds obstructions along rail segment lists, and provides details of these obstructions.

Constructor & Destructor Documentation

DtRoadObstructionFinder::DtRoadObstructionFinder ( DtVrfObjectManager objMgr,
DtPhysicalWorld world,
DtVrfObject hostEntity,
bool  drivingOnLeft 
)
virtual DtRoadObstructionFinder::~DtRoadObstructionFinder ( )
virtual
DtRoadObstructionFinder::DtRoadObstructionFinder ( )
private

Not implemented.

DtRoadObstructionFinder::DtRoadObstructionFinder ( const DtRoadObstructionFinder orig)
private

Member Function Documentation

virtual void DtRoadObstructionFinder::init ( const DtRwObjectTypeList passableObjectTypes)
virtual
virtual bool DtRoadObstructionFinder::findFirstObstructionInLane ( const DtRoadSegment startSegment,
const int  roadLaneNum,
const double  positionAlongLane,
double  lookDistance,
DtRailObstructionPtr result,
std::vector< std::vector< DtVector > > &  debugBoxes,
bool  debug = false 
) const
virtual

Looks for obstructions along the given road, starting at the provided lane and position in lane for the specified distance along the lane and connecting lanes in downstream segments.

Fills the result rail obstruction object ptr with obstruction information for the first obstacle object found in the lane.

Parameters
resultThis obstruction object is created if there is an obstruction found. If the function returns false, this pointer is not valid.
Returns
True if an obstacle object was found; false otherwise.
virtual bool DtRoadObstructionFinder::findFirstObstructionUpstreamInLane ( const DtRoadSegment startSegment,
const int  roadLaneNum,
const double  positionAlongLane,
double  lookDistance,
DtRailObstructionPtr result,
std::vector< std::vector< DtVector > > &  debugBoxes,
bool  debug = false 
) const
virtual

Looks for obstructions along the given road, starting at the provided local location for the specified distance along the rail.

Fills the result rail obstruction object ptr with obstruction information for the first obstacle object found in the lane.

Parameters
resultThis obstruction object is created if there is an obstruction found. If the function returns false, this pointer is not valid. Note that the myRailObstructionInfo->startBlockDistance in this object is the distance upstream to the front of the obstacle, vs. the distance downstream to the back of the vehicle as in findFirstObstructionInLane.
Returns
True if an obstacle object was found; false otherwise.
virtual bool DtRoadObstructionFinder::findNearestObstructionInSegment ( const DtRoadSegment segment,
const int  roadLaneNum,
const double  distFromSegStart,
const double  testDistance,
DtRailObstructionPtr obstruction,
std::vector< std::vector< DtVector > > &  debugBoxes,
bool  debug = false 
) const
protectedvirtual

Finds all obstructions along the specified segment, in the given lane, starting at distFromSegStart and running for the specified testDistance.

Parameters
obstructionThis obstruction object is created if there is an obstruction found. If the function returns false, this pointer is not valid.
Returns
True if an obstacle object was found; false otherwise.
virtual bool DtRoadObstructionFinder::findNearestObstructionUpstreamInSegment ( const DtRoadSegment segment,
double  testAltitude,
const int  roadLaneNum,
const double  distFromSegStart,
const double  testDistance,
DtRailObstructionPtr obstruction,
std::vector< std::vector< DtVector > > &  debugBoxes,
bool  debug = false 
) const
protectedvirtual

Finds all obstructions along the specified segment, starting at distFromSegStart, and running for the specified testDistance.

Parameters
obstructionThis obstruction object is created if there is an obstruction found. If the function returns false, this pointer is not valid.
Returns
True if an obstacle object was found; false otherwise.
void DtRoadObstructionFinder::getBoxPointsFromVolume ( Dt3dBoundingVolume &  volume,
DtVector refPoint,
DtDcm &  orientation,
std::vector< std::vector< DtVector > > &  outputList 
) const
protected

Generates the (5) world points defining rectangle that is a horizontal slice through the given volume at the midpoint of the volume.

Used to generate a visualization of the volume.

DtRoadObstructionFinder& DtRoadObstructionFinder::operator= ( const DtRoadObstructionFinder orig)
private

Member Data Documentation

DtVrfObjectManager* DtRoadObstructionFinder::myObjectManager
protected
DtPhysicalWorld* DtRoadObstructionFinder::myPhysicalWorld
protected
DtCollisionDetector* DtRoadObstructionFinder::myCollisionDetector
protected
DtVrfObject* DtRoadObstructionFinder::myHostEntity
protected
bool DtRoadObstructionFinder::myDrivingOnLeft
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)