![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "WorldModel.h"
Public Types | |
| enum | InsideResult { INSIDE = 0 , MAYBE_INSIDE = 1 , ABOVE = 2 , OUT_OF_BOUNDS = -1 } |
Public Member Functions | |
| GroupModel () | |
| GroupModel (const GroupModel &other) | |
| GroupModel (uint32 mogpFlags, uint32 groupWMOID, const G3D::AABox &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 {0} |
| uint32 | iGroupWMOID {0} |
| std::vector< G3D::Vector3 > | vertices |
| std::vector< MeshTriangle > | triangles |
| BIH | meshTree |
| WmoLiquid * | iLiquid {nullptr} |
holding additional info for WMO group files
|
inline |
| VMAP::GroupModel::GroupModel | ( | const GroupModel & | other | ) |
References iLiquid.
|
inline |
|
inline |
| bool VMAP::GroupModel::GetLiquidLevel | ( | const G3D::Vector3 & | pos, |
| float & | liqHeight | ||
| ) | const |
References VMAP::WmoLiquid::GetLiquidHeight(), and iLiquid.
Referenced by VMAP::ModelInstance::GetLiquidLevel(), and GameObjectModel::GetLiquidLevel().
| uint32 VMAP::GroupModel::GetLiquidType | ( | ) | const |
References VMAP::WmoLiquid::GetType(), and iLiquid.
Referenced by DynamicMapTree::GetAreaAndLiquidData(), and VMAP::VMapMgr2::GetAreaAndLiquidData().
| void VMAP::GroupModel::GetMeshData | ( | std::vector< G3D::Vector3 > & | outVertices, |
| std::vector< MeshTriangle > & | outTriangles, | ||
| WmoLiquid *& | liquid | ||
| ) |
|
inline |
References BIH::bound(), and meshTree.
|
inline |
References iMogpFlags.
Referenced by DynamicMapTree::GetAreaAndLiquidData(), and VMAP::VMapMgr2::GetAreaAndLiquidData().
|
inline |
References iGroupWMOID.
Referenced by DynamicMapTree::GetAreaAndLiquidData(), and VMAP::VMapMgr2::GetAreaAndLiquidData().
| bool VMAP::GroupModel::IntersectRay | ( | const G3D::Ray & | ray, |
| float & | distance, | ||
| bool | stopAtFirstHit | ||
| ) | const |
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 |
References ABOVE, BIH::bound(), iBound, INSIDE, IntersectRay(), VMAP::IsInsideOrAboveBound(), MAYBE_INSIDE, meshTree, OUT_OF_BOUNDS, and triangles.
| bool VMAP::GroupModel::readFromFile | ( | FILE * | rf | ) |
References iBound, iGroupWMOID, iLiquid, iMogpFlags, meshTree, VMAP::readChunk(), BIH::readFromFile(), VMAP::WmoLiquid::readFromFile(), triangles, and vertices.
|
inline |
| 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!
References BIH::build(), meshTree, triangles, and vertices.
| bool VMAP::GroupModel::writeToFile | ( | FILE * | wf | ) |
References VMAP::WmoLiquid::GetFileSize(), iBound, iGroupWMOID, iLiquid, iMogpFlags, meshTree, triangles, vertices, VMAP::WmoLiquid::writeToFile(), and BIH::writeToFile().
|
protected |
Referenced by GetBound(), IsInsideObject(), readFromFile(), and writeToFile().
|
protected |
Referenced by GetWmoID(), readFromFile(), and writeToFile().
|
protected |
Referenced by GetLiquidLevel(), GetLiquidType(), GetMeshData(), GroupModel(), readFromFile(), setLiquidData(), writeToFile(), and ~GroupModel().
|
protected |
Referenced by GetMogpFlags(), readFromFile(), and writeToFile().
|
protected |
Referenced by GetMeshTreeBound(), IntersectRay(), IsInsideObject(), readFromFile(), setMeshData(), and writeToFile().
|
protected |
Referenced by GetMeshData(), IntersectRay(), IsInsideObject(), readFromFile(), setMeshData(), and writeToFile().
|
protected |
Referenced by GetMeshData(), IntersectRay(), readFromFile(), setMeshData(), and writeToFile().