![]() |
TrinityCore
|
#include <DynamicTree.h>
Public Member Functions | |
| DynamicMapTree () | |
| ~DynamicMapTree () | |
| bool | isInLineOfSight (G3D::Vector3 const &startPos, G3D::Vector3 const &endPos, PhaseShift const &phaseShift) const |
| bool | getIntersectionTime (G3D::Ray const &ray, G3D::Vector3 const &endPos, PhaseShift const &phaseShift, float &maxDist) const |
| bool | getObjectHitPos (G3D::Vector3 const &startPos, G3D::Vector3 const &endPos, G3D::Vector3 &resultHitPos, float modifyDist, PhaseShift const &phaseShift) const |
| float | getHeight (float x, float y, float z, float maxSearchDist, PhaseShift const &phaseShift) const |
| bool | getAreaAndLiquidData (float x, float y, float z, PhaseShift const &phaseShift, Optional< uint8 > reqLiquidType, VMAP::AreaAndLiquidData &data) const |
| void | insert (GameObjectModel const &) |
| void | remove (GameObjectModel const &) |
| bool | contains (GameObjectModel const &) const |
| void | balance () |
| void | update (uint32 diff) |
| std::span< GameObjectModel const *const > | getModelsInGrid (uint32 gx, uint32 gy) const |
Private Attributes | |
| std::unique_ptr< DynTreeImpl > | impl |
Definition at line 41 of file DynamicTree.h.
| DynamicMapTree::DynamicMapTree | ( | ) |
Definition at line 102 of file DynamicTree.cpp.
|
default |
| void DynamicMapTree::balance | ( | ) |
Definition at line 121 of file DynamicTree.cpp.
References impl.
| bool DynamicMapTree::contains | ( | GameObjectModel const & | mdl | ) | const |
Definition at line 116 of file DynamicTree.cpp.
References impl.
| bool DynamicMapTree::getAreaAndLiquidData | ( | float | x, |
| float | y, | ||
| float | z, | ||
| PhaseShift const & | phaseShift, | ||
| Optional< uint8 > | reqLiquidType, | ||
| VMAP::AreaAndLiquidData & | data | ||
| ) | const |
Definition at line 260 of file DynamicTree.cpp.
References VMAP::AreaAndLiquidData::areaInfo, VMAP::VMapFactory::createOrGetVMapManager(), VMAP::AreaAndLiquidData::floorZ, DynamicTreeLocationInfoCallback::GetHitModel(), GameObjectModel::GetLiquidLevel(), DynamicTreeLocationInfoCallback::GetLocationInfo(), GameObjectModel::GetNameSetId(), VMAP::LocationInfo::ground_Z, VMAP::LocationInfo::hitModel, impl, VMAP::AreaAndLiquidData::liquidInfo, and VMAP::LocationInfo::rootId.
Referenced by TerrainInfo::GetAreaInfo(), and TerrainInfo::GetFullTerrainStatusForPosition().
| float DynamicMapTree::getHeight | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | maxSearchDist, | ||
| PhaseShift const & | phaseShift | ||
| ) | const |
Definition at line 247 of file DynamicTree.cpp.
References DynamicTreeIntersectionCallback::didHit(), and impl.
Referenced by TerrainInfo::GetWaterOrGroundLevel().
| bool DynamicMapTree::getIntersectionTime | ( | G3D::Ray const & | ray, |
| G3D::Vector3 const & | endPos, | ||
| PhaseShift const & | phaseShift, | ||
| float & | maxDist | ||
| ) | const |
Definition at line 185 of file DynamicTree.cpp.
References DynamicTreeIntersectionCallback::didHit(), and impl.
Referenced by getObjectHitPos().
| std::span< GameObjectModel const *const > DynamicMapTree::getModelsInGrid | ( | uint32 | gx, |
| uint32 | gy | ||
| ) | const |
Definition at line 284 of file DynamicTree.cpp.
References impl.
| bool DynamicMapTree::getObjectHitPos | ( | G3D::Vector3 const & | startPos, |
| G3D::Vector3 const & | endPos, | ||
| G3D::Vector3 & | resultHitPos, | ||
| float | modifyDist, | ||
| PhaseShift const & | phaseShift | ||
| ) | const |
Definition at line 195 of file DynamicTree.cpp.
References ASSERT, and getIntersectionTime().
Referenced by Map::getObjectHitPos().
| void DynamicMapTree::insert | ( | GameObjectModel const & | mdl | ) |
Definition at line 106 of file DynamicTree.cpp.
References impl.
| bool DynamicMapTree::isInLineOfSight | ( | G3D::Vector3 const & | startPos, |
| G3D::Vector3 const & | endPos, | ||
| PhaseShift const & | phaseShift | ||
| ) | const |
Definition at line 233 of file DynamicTree.cpp.
References DynamicTreeLosCallback::didHit(), and impl.
Referenced by Map::isInLineOfSight().
| void DynamicMapTree::remove | ( | GameObjectModel const & | mdl | ) |
Definition at line 111 of file DynamicTree.cpp.
References impl.
| void DynamicMapTree::update | ( | uint32 | diff | ) |
|
private |
Definition at line 43 of file DynamicTree.h.
Referenced by balance(), contains(), getAreaAndLiquidData(), getHeight(), getIntersectionTime(), getModelsInGrid(), insert(), isInLineOfSight(), remove(), and update().