TrinityCore
Loading...
Searching...
No Matches
GameObjectModel Class Reference

#include <GameObjectModel.h>

Public Member Functions

const G3D::AABox & getBounds () const
 
 ~GameObjectModel ()
 
uint32 GetDisplayId () const
 
G3D::Vector3 const & GetPosition () const
 
G3D::Quat GetRotation () const
 
G3D::Matrix3 const & GetInvRot () const
 
int64 GetPackedRotation () const
 
float GetScale () const
 
void EnableCollision (bool enable)
 
bool IsCollisionEnabled () const
 
void DisableLosBlocking (bool enable)
 
bool IsLosBlockingDisabled () const
 
void IncludeInNavMesh (bool enable)
 
bool IsIncludedInNavMesh () const
 
bool IsMapObject () const
 
uint8 GetNameSetId () const
 
bool IntersectRay (G3D::Ray const &ray, float &maxDist, bool stopAtFirstHit, PhaseShift const &phaseShift, VMAP::ModelIgnoreFlags ignoreFlags) const
 
bool GetLocationInfo (G3D::Vector3 const &point, VMAP::LocationInfo &info, PhaseShift const &phaseShift) const
 
bool GetLiquidLevel (G3D::Vector3 const &point, VMAP::GroupModel const *model, float &liqHeight) const
 
bool UpdatePosition ()
 
std::shared_ptr< VMAP::WorldModel const > GetWorldModel () const
 

Static Public Member Functions

static std::unique_ptr< GameObjectModel > Create (std::unique_ptr< GameObjectModelOwnerBase > modelOwner, std::string const &dataPath)
 

Private Member Functions

 GameObjectModel ()
 
bool initialize (std::unique_ptr< GameObjectModelOwnerBase > modelOwner, std::string const &dataPath)
 

Private Attributes

bool iCollisionEnabled
 Is model ignored in all checks.
 
bool iLosBlockingDisabled
 Is model ignored during line of sight checks (but is always included in location/height checks)
 
bool iIncludeInNavMesh
 Is model included when generating navigation mesh.
 
G3D::AABox iBound
 
G3D::Matrix3 iInvRot
 
G3D::Vector3 iPos
 
float iInvScale
 
float iScale
 
std::shared_ptr< VMAP::WorldModel > iModel
 
std::unique_ptr< GameObjectModelOwnerBase > owner
 

Detailed Description

Definition at line 62 of file GameObjectModel.h.

Constructor & Destructor Documentation

◆ GameObjectModel()

GameObjectModel::GameObjectModel ( )
inlineprivate

Definition at line 64 of file GameObjectModel.h.

Referenced by Create().

◆ ~GameObjectModel()

GameObjectModel::~GameObjectModel ( )
default

Member Function Documentation

◆ Create()

std::unique_ptr< GameObjectModel > GameObjectModel::Create ( std::unique_ptr< GameObjectModelOwnerBase >  modelOwner,
std::string const &  dataPath 
)
static

Definition at line 143 of file GameObjectModel.cpp.

References GameObjectModel().

Referenced by GameObject::CreateModel().

◆ DisableLosBlocking()

void GameObjectModel::DisableLosBlocking ( bool  enable)
inline

Definition at line 80 of file GameObjectModel.h.

◆ EnableCollision()

void GameObjectModel::EnableCollision ( bool  enable)
inline

Definition at line 78 of file GameObjectModel.h.

◆ getBounds()

const G3D::AABox & GameObjectModel::getBounds ( ) const
inline

◆ GetDisplayId()

uint32 GameObjectModel::GetDisplayId ( ) const
inline

Definition at line 70 of file GameObjectModel.h.

Referenced by MMAP::DynamicTileBuilder::BuildTile().

◆ GetInvRot()

G3D::Matrix3 const & GameObjectModel::GetInvRot ( ) const
inline

Definition at line 73 of file GameObjectModel.h.

◆ GetLiquidLevel()

bool GameObjectModel::GetLiquidLevel ( G3D::Vector3 const &  point,
VMAP::GroupModel const *  model,
float &  liqHeight 
) const

◆ GetLocationInfo()

◆ GetNameSetId()

uint8 GameObjectModel::GetNameSetId ( ) const
inline

Definition at line 85 of file GameObjectModel.h.

Referenced by DynamicMapTree::getAreaAndLiquidData().

◆ GetPackedRotation()

int64 GameObjectModel::GetPackedRotation ( ) const
inline

Definition at line 74 of file GameObjectModel.h.

Referenced by MMAP::DynamicTileBuilder::BuildTile().

◆ GetPosition()

G3D::Vector3 const & GameObjectModel::GetPosition ( ) const
inline

◆ GetRotation()

G3D::Quat GameObjectModel::GetRotation ( ) const
inline

Definition at line 72 of file GameObjectModel.h.

◆ GetScale()

float GameObjectModel::GetScale ( ) const
inline

Definition at line 75 of file GameObjectModel.h.

Referenced by MMAP::DynamicTileBuilder::BuildTile().

◆ GetWorldModel()

std::shared_ptr< VMAP::WorldModel const > GameObjectModel::GetWorldModel ( ) const
inline

Definition at line 95 of file GameObjectModel.h.

◆ IncludeInNavMesh()

void GameObjectModel::IncludeInNavMesh ( bool  enable)
inline

Definition at line 82 of file GameObjectModel.h.

◆ initialize()

bool GameObjectModel::initialize ( std::unique_ptr< GameObjectModelOwnerBase >  modelOwner,
std::string const &  dataPath 
)
private

◆ IntersectRay()

bool GameObjectModel::IntersectRay ( G3D::Ray const &  ray,
float &  maxDist,
bool  stopAtFirstHit,
PhaseShift const &  phaseShift,
VMAP::ModelIgnoreFlags  ignoreFlags 
) const

◆ IsCollisionEnabled()

bool GameObjectModel::IsCollisionEnabled ( ) const
inline

Definition at line 79 of file GameObjectModel.h.

Referenced by GetLocationInfo(), and IntersectRay().

◆ IsIncludedInNavMesh()

bool GameObjectModel::IsIncludedInNavMesh ( ) const
inline

Definition at line 83 of file GameObjectModel.h.

◆ IsLosBlockingDisabled()

bool GameObjectModel::IsLosBlockingDisabled ( ) const
inline

Definition at line 81 of file GameObjectModel.h.

Referenced by DynamicTreeLosCallback::operator()().

◆ IsMapObject()

bool GameObjectModel::IsMapObject ( ) const

Definition at line 152 of file GameObjectModel.cpp.

References iModel.

Referenced by GetLocationInfo().

◆ UpdatePosition()

bool GameObjectModel::UpdatePosition ( )

Definition at line 229 of file GameObjectModel.cpp.

References iBound, iInvRot, iModel, iPos, iScale, model_list, owner, and TC_LOG_ERROR.

Member Data Documentation

◆ iBound

G3D::AABox GameObjectModel::iBound
private

Definition at line 103 of file GameObjectModel.h.

Referenced by GetLocationInfo(), initialize(), IntersectRay(), and UpdatePosition().

◆ iCollisionEnabled

bool GameObjectModel::iCollisionEnabled
private

Is model ignored in all checks.

Definition at line 100 of file GameObjectModel.h.

◆ iIncludeInNavMesh

bool GameObjectModel::iIncludeInNavMesh
private

Is model included when generating navigation mesh.

Definition at line 102 of file GameObjectModel.h.

◆ iInvRot

G3D::Matrix3 GameObjectModel::iInvRot
private

◆ iInvScale

float GameObjectModel::iInvScale
private

Definition at line 106 of file GameObjectModel.h.

Referenced by GetLiquidLevel(), GetLocationInfo(), initialize(), and IntersectRay().

◆ iLosBlockingDisabled

bool GameObjectModel::iLosBlockingDisabled
private

Is model ignored during line of sight checks (but is always included in location/height checks)

Definition at line 101 of file GameObjectModel.h.

◆ iModel

std::shared_ptr<VMAP::WorldModel> GameObjectModel::iModel
private

◆ iPos

G3D::Vector3 GameObjectModel::iPos
private

◆ iScale

float GameObjectModel::iScale
private

◆ owner

std::unique_ptr<GameObjectModelOwnerBase> GameObjectModel::owner
private

Definition at line 109 of file GameObjectModel.h.

Referenced by GetLocationInfo(), initialize(), IntersectRay(), and UpdatePosition().


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