VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtLadderLocator Class Reference

Detailed Description

This class provides functionality to locate the nearest ladder and determine the optimal access points (points at which a human could mount or dismount a ladder). It works with the navigation system to find and prepare ladder data for use by human entities that need to climb ladders in the simulation.

#include <ladderLocator.h>

Public Member Functions

 DtLadderLocator (DtVrfNavAreaManager &navAreaManager, const DtString &navigationProfile)
 
virtual ~DtLadderLocator ()
 
virtual void setSearchArea (const DtVector &localPosition, double range)
 
virtual bool findNearestLadder (const DtPhysicalWorld &physicalWorld, DtLadder &ladder, DtVector &ladderAccessPoint) const
 

Protected Attributes

DtVrfNavAreaManager & myNavAreaManager
 
DtString myNavigationProfile
 
DtVector mySearchAreaOrigin
 
double mySearchAreaRadius
 

Private Member Functions

 DtLadderLocator ()
 
 DtLadderLocator (const DtLadderLocator &orig)
 
DtLadderLocatoroperator= (const DtLadderLocator &orig)
 

Constructor & Destructor Documentation

◆ DtLadderLocator() [1/3]

makVre::DtLadderLocator::DtLadderLocator ( DtVrfNavAreaManager & navAreaManager,
const DtString & navigationProfile )

Constructor with navigation area manager and profile.

Parameters
navAreaManagerReference to the simulation manager's navigation area manager
navigationProfileThe string name of the navigation profile

Creates a new ladder locator with the specified navigation area manager and profile. The navigation profile is typically available in the parameter entry for a given entity type (e.g., "lifeform") and determines navigational capabilities.

Referenced by DtLadderLocator(), and operator=().

◆ ~DtLadderLocator()

virtual makVre::DtLadderLocator::~DtLadderLocator ( )
virtual

Virtual destructor.

Cleans up resources used by the ladder locator.

◆ DtLadderLocator() [2/3]

makVre::DtLadderLocator::DtLadderLocator ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

◆ DtLadderLocator() [3/3]

makVre::DtLadderLocator::DtLadderLocator ( const DtLadderLocator & orig)
private

Copy constructor (not implemented)

Parameters
origThe source locator to copy from

Copy constructor is private and not implemented to prevent copying.

References DtLadderLocator().

Member Function Documentation

◆ setSearchArea()

virtual void makVre::DtLadderLocator::setSearchArea ( const DtVector & localPosition,
double range )
virtual

Sets the area to search for nearby ladders.

Parameters
localPositionThe center position of the search area in local coordinates
rangeThe search radius in meters

Defines the area in which to search for ladders. This can be called repeatedly to change the search area as needed, such as when the entity moves to a new location. The search area is defined as a sphere with the specified position as its center and the specified range as its radius.

◆ findNearestLadder()

virtual bool makVre::DtLadderLocator::findNearestLadder ( const DtPhysicalWorld & physicalWorld,
DtLadder & ladder,
DtVector & ladderAccessPoint ) const
virtual

Finds the nearest ladder and its access point.

Parameters
physicalWorldReference to the physical world for terrain queries
ladderReference to a ladder object to be filled with the found ladder data
ladderAccessPointReference to a vector to be filled with the nearest access point
Returns
True if a ladder was found within the search area, false otherwise

Searches for the nearest ladder within the previously set search area. If a ladder is found, the ladder parameter is filled with the ladder data, and the ladderAccessPoint parameter is filled with the coordinates of the nearest point at which an entity could access (mount/dismount) the ladder.

◆ operator=()

DtLadderLocator & makVre::DtLadderLocator::operator= ( const DtLadderLocator & orig)
private

Assignment operator (not implemented)

Parameters
origThe source locator to copy from
Returns
Reference to this locator after assignment

Assignment operator is private and not implemented to prevent assignment.

References DtLadderLocator().

Member Data Documentation

◆ myNavAreaManager

DtVrfNavAreaManager& makVre::DtLadderLocator::myNavAreaManager
protected

Reference to the navigation area manager.

Cached reference to the navigation area manager that provides access to navigation areas and ladders in the simulation.

◆ myNavigationProfile

DtString makVre::DtLadderLocator::myNavigationProfile
protected

Navigation profile for ladder searches.

The navigation profile to use in searches, typically available in the object parameter entry for a given entity type (e.g., "lifeform"). This determines which navigation areas are accessible to the entity.

◆ mySearchAreaOrigin

DtVector makVre::DtLadderLocator::mySearchAreaOrigin
protected

Origin of the current search area.

The center position of the current ladder search area in local coordinates.

◆ mySearchAreaRadius

double makVre::DtLadderLocator::mySearchAreaRadius
protected

Radius of the current search area.

The radius in meters defining the current ladder search area.


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