AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "WorldModel.h"
Public Member Functions | |
WorldModel () | |
void | setGroupModels (std::vector< GroupModel > &models) |
pass group models to WorldModel and create BIH. Passed vector is swapped with old geometry! More... | |
void | setRootWmoID (uint32 id) |
bool | IntersectRay (const G3D::Ray &ray, float &distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags) const |
bool | IntersectPoint (const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, AreaInfo &info) const |
bool | GetLocationInfo (const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, LocationInfo &info) const |
bool | writeFile (const std::string &filename) |
bool | readFile (const std::string &filename) |
void | GetGroupModels (std::vector< GroupModel > &outGroupModels) |
Public Attributes | |
uint32 | Flags |
Protected Attributes | |
uint32 | RootWMOID {0} |
std::vector< GroupModel > | groupModels |
BIH | groupTree |
Holds a model (converted M2 or WMO) in its original coordinate space
|
inline |
void VMAP::WorldModel::GetGroupModels | ( | std::vector< GroupModel > & | outGroupModels | ) |
References groupModels.
Referenced by MMAP::TerrainBuilder::loadVMap().
bool VMAP::WorldModel::GetLocationInfo | ( | const G3D::Vector3 & | p, |
const G3D::Vector3 & | down, | ||
float & | dist, | ||
LocationInfo & | info | ||
) | const |
References groupModels, groupTree, VMAP::WModelAreaCallback::hit, VMAP::LocationInfo::hitModel, BIH::intersectPoint(), VMAP::LocationInfo::rootId, RootWMOID, and VMAP::WModelAreaCallback::zDist.
Referenced by VMAP::ModelInstance::GetLocationInfo(), and GameObjectModel::GetLocationInfo().
bool VMAP::WorldModel::IntersectPoint | ( | const G3D::Vector3 & | p, |
const G3D::Vector3 & | down, | ||
float & | dist, | ||
AreaInfo & | info | ||
) | const |
References VMAP::AreaInfo::flags, VMAP::AreaInfo::groupId, groupModels, groupTree, VMAP::WModelAreaCallback::hit, BIH::intersectPoint(), VMAP::AreaInfo::result, VMAP::AreaInfo::rootId, RootWMOID, and VMAP::WModelAreaCallback::zDist.
Referenced by VMAP::ModelInstance::intersectPoint(), and GameObjectModel::IntersectPoint().
bool VMAP::WorldModel::IntersectRay | ( | const G3D::Ray & | ray, |
float & | distance, | ||
bool | stopAtFirstHit, | ||
ModelIgnoreFlags | ignoreFlags | ||
) | const |
References Flags, groupModels, groupTree, VMAP::WModelRayCallBack::hit, BIH::intersectRay(), VMAP::M2, VMAP::MOD_M2, and VMAP::Nothing.
Referenced by VMAP::ModelInstance::intersectRay(), and GameObjectModel::intersectRay().
bool VMAP::WorldModel::readFile | ( | const std::string & | filename | ) |
References groupModels, groupTree, VMAP::readChunk(), BIH::readFromFile(), RootWMOID, and VMAP::VMAP_MAGIC.
Referenced by VMAP::VMapMgr2::acquireModelInstance().
void VMAP::WorldModel::setGroupModels | ( | std::vector< GroupModel > & | models | ) |
pass group models to WorldModel and create BIH. Passed vector is swapped with old geometry!
References BIH::build(), groupModels, and groupTree.
Referenced by VMAP::TileAssembler::convertRawFile().
|
inline |
bool VMAP::WorldModel::writeFile | ( | const std::string & | filename | ) |
References groupModels, groupTree, RootWMOID, VMAP::VMAP_MAGIC, and BIH::writeToFile().
Referenced by VMAP::TileAssembler::convertRawFile().
uint32 VMAP::WorldModel::Flags |
Referenced by VMAP::VMapMgr2::acquireModelInstance(), and IntersectRay().
|
protected |
Referenced by GetGroupModels(), GetLocationInfo(), IntersectPoint(), IntersectRay(), readFile(), setGroupModels(), and writeFile().
|
protected |
Referenced by GetLocationInfo(), IntersectPoint(), IntersectRay(), readFile(), setGroupModels(), and writeFile().
|
protected |
Referenced by GetLocationInfo(), IntersectPoint(), readFile(), setRootWmoID(), and writeFile().