VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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. This class finds obstructions along rail segment lists, and provides details of these obstructions.

Public Member Functions

 DtRoadObstructionFinder (const DtSimulationServices *objMgr, DtLocalObject *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
 
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
 

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
 
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
 
void getBoxPointsFromVolume (Dt3dBoundingVolume &volume, DtVector &refPoint, DtDcm &orientation, std::vector< std::vector< DtVector > > &outputList) const
 

Protected Attributes

const DtSimulationServicesmySimulationServices
 
DtCollisionDetectormyCollisionDetector
 
DtLocalObjectmyHostEntity
 
bool myDrivingOnLeft
 

Private Member Functions

 DtRoadObstructionFinder ()
 
 DtRoadObstructionFinder (const DtRoadObstructionFinder &orig)
 
DtRoadObstructionFinderoperator= (const DtRoadObstructionFinder &orig)
 

Constructor & Destructor Documentation

DtRoadObstructionFinder::DtRoadObstructionFinder ( const DtSimulationServices objMgr,
DtLocalObject hostEntity,
bool  drivingOnLeft 
)
virtual DtRoadObstructionFinder::~DtRoadObstructionFinder ( )
virtual
DtRoadObstructionFinder::DtRoadObstructionFinder ( )
private

Not implemented.

DtRoadObstructionFinder::DtRoadObstructionFinder ( const DtRoadObstructionFinder orig)
private

Not implemented.

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

Not implemented.

Member Data Documentation

const DtSimulationServices* DtRoadObstructionFinder::mySimulationServices
protected
DtCollisionDetector* DtRoadObstructionFinder::myCollisionDetector
protected
DtLocalObject* DtRoadObstructionFinder::myHostEntity
protected
bool DtRoadObstructionFinder::myDrivingOnLeft
protected

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

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)