|
VR-Engage
2.2
|
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) | |
| DtLadderLocator & | operator= (const DtLadderLocator &orig) |
| makVre::DtLadderLocator::DtLadderLocator | ( | DtVrfNavAreaManager & | navAreaManager, |
| const DtString & | navigationProfile ) |
Constructor with navigation area manager and profile.
| navAreaManager | Reference to the simulation manager's navigation area manager |
| navigationProfile | The 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=().
|
virtual |
Virtual destructor.
Cleans up resources used by the ladder locator.
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
|
private |
Copy constructor (not implemented)
| orig | The source locator to copy from |
Copy constructor is private and not implemented to prevent copying.
References DtLadderLocator().
|
virtual |
Sets the area to search for nearby ladders.
| localPosition | The center position of the search area in local coordinates |
| range | The 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.
|
virtual |
Finds the nearest ladder and its access point.
| physicalWorld | Reference to the physical world for terrain queries |
| ladder | Reference to a ladder object to be filled with the found ladder data |
| ladderAccessPoint | Reference to a vector to be filled with the nearest access point |
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.
|
private |
Assignment operator (not implemented)
| orig | The source locator to copy from |
Assignment operator is private and not implemented to prevent assignment.
References DtLadderLocator().
|
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.
|
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.
|
protected |
Origin of the current search area.
The center position of the current ladder search area in local coordinates.
|
protected |
Radius of the current search area.
The radius in meters defining the current ladder search area.