mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
refactor(Core/Collision): Store collision data on map context (#25049)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <G3D/Matrix3.h>
|
||||
#include <G3D/Ray.h>
|
||||
#include <G3D/Vector3.h>
|
||||
#include <memory>
|
||||
|
||||
namespace VMAP
|
||||
{
|
||||
@@ -63,16 +64,15 @@ namespace VMAP
|
||||
{
|
||||
public:
|
||||
ModelInstance() { }
|
||||
ModelInstance(const ModelSpawn& spawn, WorldModel* model);
|
||||
void setUnloaded() { iModel = nullptr; }
|
||||
ModelInstance(const ModelSpawn& spawn, std::shared_ptr<WorldModel> model);
|
||||
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
|
||||
bool GetLocationInfo(const G3D::Vector3& p, LocationInfo& info) const;
|
||||
bool GetLiquidLevel(const G3D::Vector3& p, LocationInfo& info, float& liqHeight) const;
|
||||
WorldModel* getWorldModel() { return iModel; }
|
||||
WorldModel* getWorldModel() { return iModel.get(); }
|
||||
protected:
|
||||
G3D::Matrix3 iInvRot;
|
||||
float iInvScale{0.0f};
|
||||
WorldModel* iModel{nullptr};
|
||||
std::shared_ptr<WorldModel> iModel;
|
||||
};
|
||||
} // namespace VMAP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user