![]() |
TrinityCore
|
#include <WorldModel.h>
Public Types | |
| enum | InsideResult { INSIDE = 0 , MAYBE_INSIDE = 1 , ABOVE = 2 , OUT_OF_BOUNDS = -1 } |
Public Member Functions | |
| GroupModel () | |
| GroupModel (GroupModel const &other) | |
| GroupModel (uint32 mogpFlags, uint32 groupWMOID, G3D::AABox const &bound) | |
| ~GroupModel () | |
| void | setMeshData (std::vector< G3D::Vector3 > &&vert, std::vector< MeshTriangle > &&tri) |
| pass mesh data to object and create BIH. | |
| void | setLiquidData (WmoLiquid *liquid) |
| bool | IntersectRay (const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const |
| InsideResult | IsInsideObject (G3D::Ray const &ray, float &z_dist) const |
| bool | GetLiquidLevel (const G3D::Vector3 &pos, float &liqHeight) const |
| uint32 | GetLiquidType () const |
| bool | writeToFile (FILE *wf) |
| bool | readFromFile (FILE *rf) |
| G3D::AABox const & | GetBound () const |
| G3D::AABox const & | GetMeshTreeBound () const |
| uint32 | GetMogpFlags () const |
| uint32 | GetWmoID () const |
| std::vector< G3D::Vector3 > const & | GetVertices () const |
| std::vector< MeshTriangle > const & | GetTriangles () const |
| WmoLiquid const * | GetLiquid () const |
Protected Attributes | |
| G3D::AABox | iBound |
| uint32 | iMogpFlags |
| uint32 | iGroupWMOID |
| std::vector< G3D::Vector3 > | vertices |
| std::vector< MeshTriangle > | triangles |
| BIH | meshTree |
| WmoLiquid * | iLiquid |
holding additional info for WMO group files
Definition at line 74 of file WorldModel.h.
| Enumerator | |
|---|---|
| INSIDE | |
| MAYBE_INSIDE | |
| ABOVE | |
| OUT_OF_BOUNDS | |
Definition at line 87 of file WorldModel.h.
|
inline |
Definition at line 77 of file WorldModel.h.
| VMAP::GroupModel::GroupModel | ( | GroupModel const & | other | ) |
Definition at line 285 of file WorldModel.cpp.
References iLiquid.
|
inline |
Definition at line 79 of file WorldModel.h.
|
inline |
Definition at line 81 of file WorldModel.h.
|
inline |
Definition at line 93 of file WorldModel.h.
Referenced by BoundsTrait< VMAP::GroupModel >::getBounds().
|
inline |
Definition at line 99 of file WorldModel.h.
| bool VMAP::GroupModel::GetLiquidLevel | ( | const G3D::Vector3 & | pos, |
| float & | liqHeight | ||
| ) | const |
Definition at line 455 of file WorldModel.cpp.
References VMAP::WmoLiquid::GetLiquidHeight(), and iLiquid.
Referenced by VMAP::ModelInstance::GetLiquidLevel(), and GameObjectModel::GetLiquidLevel().
| uint32 VMAP::GroupModel::GetLiquidType | ( | ) | const |
Definition at line 462 of file WorldModel.cpp.
References VMAP::WmoLiquid::GetType(), and iLiquid.
Referenced by VMAP::VMapManager::getAreaAndLiquidData().
|
inline |
Definition at line 94 of file WorldModel.h.
|
inline |
Definition at line 95 of file WorldModel.h.
Referenced by VMAP::VMapManager::getAreaAndLiquidData().
|
inline |
Definition at line 98 of file WorldModel.h.
|
inline |
Definition at line 97 of file WorldModel.h.
|
inline |
Definition at line 96 of file WorldModel.h.
Referenced by VMAP::VMapManager::getAreaAndLiquidData().
| bool VMAP::GroupModel::IntersectRay | ( | const G3D::Ray & | ray, |
| float & | distance, | ||
| bool | stopAtFirstHit | ||
| ) | const |
Definition at line 403 of file WorldModel.cpp.
References VMAP::GModelRayCallback::hit, BIH::intersectRay(), meshTree, triangles, and vertices.
Referenced by IsInsideObject(), and VMAP::WModelRayCallBack::operator()().
| GroupModel::InsideResult VMAP::GroupModel::IsInsideObject | ( | G3D::Ray const & | ray, |
| float & | z_dist | ||
| ) | const |
Definition at line 422 of file WorldModel.cpp.
References ABOVE, BIH::bound(), iBound, INSIDE, IntersectRay(), VMAP::IsInsideOrAboveBound(), MAYBE_INSIDE, meshTree, OUT_OF_BOUNDS, and triangles.
| bool VMAP::GroupModel::readFromFile | ( | FILE * | rf | ) |
Definition at line 347 of file WorldModel.cpp.
References iBound, iGroupWMOID, iLiquid, iMogpFlags, meshTree, VMAP::readChunk(), BIH::readFromFile(), VMAP::WmoLiquid::readFromFile(), triangles, and vertices.
|
inline |
Definition at line 85 of file WorldModel.h.
| void VMAP::GroupModel::setMeshData | ( | std::vector< G3D::Vector3 > && | vert, |
| std::vector< MeshTriangle > && | tri | ||
| ) |
pass mesh data to object and create BIH.
Definition at line 293 of file WorldModel.cpp.
References BIH::build(), meshTree, triangles, and vertices.
| bool VMAP::GroupModel::writeToFile | ( | FILE * | wf | ) |
Definition at line 301 of file WorldModel.cpp.
References VMAP::WmoLiquid::GetFileSize(), iBound, iGroupWMOID, iLiquid, iMogpFlags, meshTree, triangles, vertices, VMAP::WmoLiquid::writeToFile(), and BIH::writeToFile().
|
protected |
Definition at line 101 of file WorldModel.h.
Referenced by IsInsideObject(), readFromFile(), and writeToFile().
|
protected |
Definition at line 103 of file WorldModel.h.
Referenced by readFromFile(), and writeToFile().
|
protected |
Definition at line 107 of file WorldModel.h.
Referenced by GetLiquidLevel(), GetLiquidType(), GroupModel(), readFromFile(), and writeToFile().
|
protected |
Definition at line 102 of file WorldModel.h.
Referenced by readFromFile(), and writeToFile().
|
protected |
Definition at line 106 of file WorldModel.h.
Referenced by IntersectRay(), IsInsideObject(), readFromFile(), setMeshData(), and writeToFile().
|
protected |
Definition at line 105 of file WorldModel.h.
Referenced by IntersectRay(), IsInsideObject(), readFromFile(), setMeshData(), and writeToFile().
|
protected |
Definition at line 104 of file WorldModel.h.
Referenced by IntersectRay(), readFromFile(), setMeshData(), and writeToFile().