![]() |
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. Passed vectors get get swapped with old geometry! | |
| 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 |
| void | getMeshData (std::vector< G3D::Vector3 > &outVertices, std::vector< MeshTriangle > &outTriangles, WmoLiquid *&liquid) |
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 290 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().
| bool VMAP::GroupModel::GetLiquidLevel | ( | const G3D::Vector3 & | pos, |
| float & | liqHeight | ||
| ) | const |
Definition at line 461 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 468 of file WorldModel.cpp.
References VMAP::WmoLiquid::GetType(), and iLiquid.
Referenced by DynamicMapTree::getAreaAndLiquidData(), and VMAP::VMapManager2::getAreaAndLiquidData().
| void VMAP::GroupModel::getMeshData | ( | std::vector< G3D::Vector3 > & | outVertices, |
| std::vector< MeshTriangle > & | outTriangles, | ||
| WmoLiquid *& | liquid | ||
| ) |
Definition at line 475 of file WorldModel.cpp.
|
inline |
Definition at line 94 of file WorldModel.h.
|
inline |
Definition at line 95 of file WorldModel.h.
Referenced by DynamicMapTree::getAreaAndLiquidData(), and VMAP::VMapManager2::getAreaAndLiquidData().
|
inline |
Definition at line 96 of file WorldModel.h.
Referenced by DynamicMapTree::getAreaAndLiquidData(), and VMAP::VMapManager2::getAreaAndLiquidData().
| bool VMAP::GroupModel::IntersectRay | ( | const G3D::Ray & | ray, |
| float & | distance, | ||
| bool | stopAtFirstHit | ||
| ) | const |
Definition at line 409 of file WorldModel.cpp.
References VMAP::GModelRayCallback::hit, BIH::intersectRay(), meshTree, triangles, and vertices.
Referenced by IsInsideObject().
| GroupModel::InsideResult VMAP::GroupModel::IsInsideObject | ( | G3D::Ray const & | ray, |
| float & | z_dist | ||
| ) | const |
Definition at line 428 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 352 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. Passed vectors get get swapped with old geometry!
Definition at line 298 of file WorldModel.cpp.
References BIH::build(), meshTree, triangles, and vertices.
| bool VMAP::GroupModel::writeToFile | ( | FILE * | wf | ) |
Definition at line 306 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 99 of file WorldModel.h.
Referenced by IsInsideObject(), readFromFile(), and writeToFile().
|
protected |
Definition at line 101 of file WorldModel.h.
Referenced by readFromFile(), and writeToFile().
|
protected |
Definition at line 105 of file WorldModel.h.
Referenced by GetLiquidLevel(), GetLiquidType(), getMeshData(), GroupModel(), readFromFile(), and writeToFile().
|
protected |
Definition at line 100 of file WorldModel.h.
Referenced by readFromFile(), and writeToFile().
|
protected |
Definition at line 104 of file WorldModel.h.
Referenced by IntersectRay(), IsInsideObject(), readFromFile(), setMeshData(), and writeToFile().
|
protected |
Definition at line 103 of file WorldModel.h.
Referenced by getMeshData(), IntersectRay(), IsInsideObject(), readFromFile(), setMeshData(), and writeToFile().
|
protected |
Definition at line 102 of file WorldModel.h.
Referenced by getMeshData(), IntersectRay(), readFromFile(), setMeshData(), and writeToFile().