TrinityCore
VMAP::WorldModel Class Reference

#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 setFlags (ModelFlags flags)
 
void setRootWmoID (uint32 id)
 
bool IntersectRay (const G3D::Ray &ray, float &distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags) const
 
bool GetLocationInfo (const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, GroupLocationInfo &info) const
 
bool writeFile (const std::string &filename)
 
bool readFile (const std::string &filename)
 
bool IsM2 () const
 
std::vector< GroupModel > const & getGroupModels () const
 
std::string const & GetName () const
 
void SetName (std::string newName)
 

Protected Attributes

EnumFlag< ModelFlagsFlags
 
uint32 RootWMOID
 
std::vector< GroupModelgroupModels
 
BIH groupTree
 
std::string name
 

Detailed Description

Holds a model (converted M2 or WMO) in its original coordinate space

Definition at line 115 of file WorldModel.h.

Constructor & Destructor Documentation

◆ WorldModel()

VMAP::WorldModel::WorldModel ( )
inline

Definition at line 118 of file WorldModel.h.

Member Function Documentation

◆ getGroupModels()

std::vector< GroupModel > const & VMAP::WorldModel::getGroupModels ( ) const
inline

Definition at line 129 of file WorldModel.h.

+ Here is the caller graph for this function:

◆ GetLocationInfo()

bool VMAP::WorldModel::GetLocationInfo ( const G3D::Vector3 &  p,
const G3D::Vector3 &  down,
float &  dist,
GroupLocationInfo info 
) const

Definition at line 525 of file WorldModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetName()

std::string const & VMAP::WorldModel::GetName ( ) const
inline

Definition at line 130 of file WorldModel.h.

+ Here is the caller graph for this function:

◆ IntersectRay()

bool VMAP::WorldModel::IntersectRay ( const G3D::Ray &  ray,
float &  distance,
bool  stopAtFirstHit,
ModelIgnoreFlags  ignoreFlags 
) const

Definition at line 468 of file WorldModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsM2()

bool VMAP::WorldModel::IsM2 ( ) const
inline

Definition at line 128 of file WorldModel.h.

+ Here is the caller graph for this function:

◆ readFile()

bool VMAP::WorldModel::readFile ( const std::string &  filename)

Definition at line 580 of file WorldModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFlags()

void VMAP::WorldModel::setFlags ( ModelFlags  flags)
inline

Definition at line 122 of file WorldModel.h.

+ Here is the caller graph for this function:

◆ setGroupModels()

void VMAP::WorldModel::setGroupModels ( std::vector< GroupModel > &  models)

pass group models to WorldModel and create BIH. Passed vector is swapped with old geometry!

Definition at line 448 of file WorldModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetName()

void VMAP::WorldModel::SetName ( std::string  newName)
inline

Definition at line 131 of file WorldModel.h.

+ Here is the caller graph for this function:

◆ setRootWmoID()

void VMAP::WorldModel::setRootWmoID ( uint32  id)
inline

Definition at line 123 of file WorldModel.h.

+ Here is the caller graph for this function:

◆ writeFile()

bool VMAP::WorldModel::writeFile ( const std::string &  filename)

Definition at line 542 of file WorldModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ Flags

EnumFlag<ModelFlags> VMAP::WorldModel::Flags
protected

Definition at line 133 of file WorldModel.h.

◆ groupModels

std::vector<GroupModel> VMAP::WorldModel::groupModels
protected

Definition at line 135 of file WorldModel.h.

◆ groupTree

BIH VMAP::WorldModel::groupTree
protected

Definition at line 136 of file WorldModel.h.

◆ name

std::string VMAP::WorldModel::name
protected

Definition at line 137 of file WorldModel.h.

◆ RootWMOID

uint32 VMAP::WorldModel::RootWMOID
protected

Definition at line 134 of file WorldModel.h.


The documentation for this class was generated from the following files: