diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-11-19 20:20:33 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-11-19 20:20:33 +0100 |
commit | b4d6ca277aef81a49e3654a3eec131ea621da991 (patch) | |
tree | 0fab0b7393f63a2baead5915e64b03d71c3173fd /src/common/Collision/Models/ModelInstance.cpp | |
parent | 225a1bbf7dabdc318bd340e15afa7378a7622612 (diff) |
Core/vmaps: Removed vmap lookup functions duplicating functionality of each other
(cherry picked from commit 45ee989c70682c001d4467d97bf1ecedcf7dbcc3)
Diffstat (limited to 'src/common/Collision/Models/ModelInstance.cpp')
-rw-r--r-- | src/common/Collision/Models/ModelInstance.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/common/Collision/Models/ModelInstance.cpp b/src/common/Collision/Models/ModelInstance.cpp index 616488bd9a1..32415be8fc0 100644 --- a/src/common/Collision/Models/ModelInstance.cpp +++ b/src/common/Collision/Models/ModelInstance.cpp @@ -63,40 +63,6 @@ namespace VMAP return hit; } - void ModelInstance::intersectPoint(const G3D::Vector3& p, AreaInfo &info) const - { - if (!iModel) - { -#ifdef VMAP_DEBUG - std::cout << "<object not loaded>\n"; -#endif - return; - } - - // M2 files don't contain area info, only WMO files - if (flags & MOD_M2) - return; - if (!iBound.contains(p)) - return; - // child bounds are defined in object space: - Vector3 pModel = iInvRot * (p - iPos) * iInvScale; - Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f); - float zDist; - if (iModel->IntersectPoint(pModel, zDirModel, zDist, info)) - { - Vector3 modelGround = pModel + zDist * zDirModel; - // Transform back to world space. Note that: - // Mat * vec == vec * Mat.transpose() - // and for rotation matrices: Mat.inverse() == Mat.transpose() - float world_Z = ((modelGround * iInvRot) * iScale + iPos).z; - if (info.ground_Z < world_Z) - { - info.ground_Z = world_Z; - info.adtId = adtId; - } - } - } - bool ModelInstance::GetLocationInfo(const G3D::Vector3& p, LocationInfo &info) const { if (!iModel) |