WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ModelLoader Namespace Reference

Functions

std::string wstringToString (const std::wstring &ws)
 Convert a wide string to narrow ASCII (lossy, for display only).
 
WoWModelgetLoadedModel (AppState &app)
 Return the currently loaded WoWModel (first child of root), or nullptr.
 
void resetCameraToModel (OrbitCamera &camera, const WoWModel *model, float fov)
 Reset the orbit camera to frame the given model.
 
void applySkin (WoWModel *model, int skinIndex, AppState &app)
 Apply a creature / item skin variant to the model.
 
void initAnimationControl (WoWModel *model, AppState &app)
 Populate app.animEntries / app.skinEntries from the model.
 
void initCharacterControl (WoWModel *model, AppState &app)
 Populate app.customizationOptions from the model's ChrCustomization DB.
 
void initModelControl (WoWModel *model, AppState &app)
 Populate app.geosetGroups and app.pcrState from the model.
 
static bool correctType (int type, int slot)
 
void rebuildEquipFilteredItems (AppState &app, const ItemDatabase &db)
 
void tryToEquipItem (WoWModel *model, int id, AppState &app, const ItemDatabase &db)
 
void buildItemSets (AppState &app)
 
void rebuildItemSetFilter (AppState &app)
 
void applyItemSet (WoWModel *model, int setId, AppState &app, const ItemDatabase &db)
 
void buildStartOutfits (WoWModel *model, AppState &app)
 
void rebuildStartOutfitFilter (AppState &app)
 
void applyStartOutfit (WoWModel *model, int outfitId, AppState &app, const ItemDatabase &db)
 
void clearModel (AppState &app)
 Tear down the current model and reset related state.
 
void loadModel (GameFile *file, AppState &app, float fov)
 Load a .m2 GameFile, create a WoWModel, attach to root, init controls.
 
void rebuildNpcFilter (AppState &app, const std::vector< NPCRecord > &npcList)
 
void loadNPC (unsigned int creatureID, AppState &app, float fov)
 
void rebuildItemBrowseFilter (AppState &app, const ItemDatabase &db)
 
void loadItemModel (unsigned int itemId, AppState &app, float fov)
 
void buildMountList (AppState &app)
 
void rebuildMountFilter (AppState &app)
 
void mountCharacter (int displayID, GameFile *creatureFile, AppState &app, float fov)
 
void dismountCharacter (AppState &app, float fov)
 

Function Documentation

◆ applyItemSet()

void ModelLoader::applyItemSet ( WoWModel model,
int  setId,
AppState app,
const ItemDatabase db 
)

Definition at line 490 of file ModelLoader.cpp.

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

◆ applySkin()

void ModelLoader::applySkin ( WoWModel model,
int  skinIndex,
AppState app 
)

Apply a creature / item skin variant to the model.

Definition at line 63 of file ModelLoader.cpp.

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

◆ applyStartOutfit()

void ModelLoader::applyStartOutfit ( WoWModel model,
int  outfitId,
AppState app,
const ItemDatabase db 
)

Definition at line 591 of file ModelLoader.cpp.

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

◆ buildItemSets()

void ModelLoader::buildItemSets ( AppState app)

Definition at line 445 of file ModelLoader.cpp.

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

◆ buildMountList()

void ModelLoader::buildMountList ( AppState app)

Definition at line 957 of file ModelLoader.cpp.

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

◆ buildStartOutfits()

void ModelLoader::buildStartOutfits ( WoWModel model,
AppState app 
)

Definition at line 531 of file ModelLoader.cpp.

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

◆ clearModel()

void ModelLoader::clearModel ( AppState app)

Tear down the current model and reset related state.

Definition at line 632 of file ModelLoader.cpp.

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

◆ correctType()

static bool ModelLoader::correctType ( int  type,
int  slot 
)
static

Definition at line 366 of file ModelLoader.cpp.

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

◆ dismountCharacter()

void ModelLoader::dismountCharacter ( AppState app,
float  fov 
)

Definition at line 1149 of file ModelLoader.cpp.

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

◆ getLoadedModel()

WoWModel * ModelLoader::getLoadedModel ( AppState app)

Return the currently loaded WoWModel (first child of root), or nullptr.

Definition at line 38 of file ModelLoader.cpp.

Here is the caller graph for this function:

◆ initAnimationControl()

void ModelLoader::initAnimationControl ( WoWModel model,
AppState app 
)

Populate app.animEntries / app.skinEntries from the model.

Definition at line 80 of file ModelLoader.cpp.

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

◆ initCharacterControl()

void ModelLoader::initCharacterControl ( WoWModel model,
AppState app 
)

Populate app.customizationOptions from the model's ChrCustomization DB.

Definition at line 222 of file ModelLoader.cpp.

Here is the caller graph for this function:

◆ initModelControl()

void ModelLoader::initModelControl ( WoWModel model,
AppState app 
)

Populate app.geosetGroups and app.pcrState from the model.

Definition at line 326 of file ModelLoader.cpp.

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

◆ loadItemModel()

void ModelLoader::loadItemModel ( unsigned int  itemId,
AppState app,
float  fov 
)

Definition at line 883 of file ModelLoader.cpp.

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

◆ loadModel()

void ModelLoader::loadModel ( GameFile file,
AppState app,
float  fov 
)

Load a .m2 GameFile, create a WoWModel, attach to root, init controls.

Definition at line 668 of file ModelLoader.cpp.

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

◆ loadNPC()

void ModelLoader::loadNPC ( unsigned int  creatureID,
AppState app,
float  fov 
)

Definition at line 754 of file ModelLoader.cpp.

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

◆ mountCharacter()

void ModelLoader::mountCharacter ( int  displayID,
GameFile creatureFile,
AppState app,
float  fov 
)

Definition at line 1045 of file ModelLoader.cpp.

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

◆ rebuildEquipFilteredItems()

void ModelLoader::rebuildEquipFilteredItems ( AppState app,
const ItemDatabase db 
)

Definition at line 392 of file ModelLoader.cpp.

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

◆ rebuildItemBrowseFilter()

void ModelLoader::rebuildItemBrowseFilter ( AppState app,
const ItemDatabase db 
)

Definition at line 862 of file ModelLoader.cpp.

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

◆ rebuildItemSetFilter()

void ModelLoader::rebuildItemSetFilter ( AppState app)

Definition at line 471 of file ModelLoader.cpp.

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

◆ rebuildMountFilter()

void ModelLoader::rebuildMountFilter ( AppState app)

Definition at line 1014 of file ModelLoader.cpp.

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

◆ rebuildNpcFilter()

void ModelLoader::rebuildNpcFilter ( AppState app,
const std::vector< NPCRecord > &  npcList 
)

Definition at line 733 of file ModelLoader.cpp.

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

◆ rebuildStartOutfitFilter()

void ModelLoader::rebuildStartOutfitFilter ( AppState app)

Definition at line 572 of file ModelLoader.cpp.

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

◆ resetCameraToModel()

void ModelLoader::resetCameraToModel ( OrbitCamera camera,
const WoWModel model,
float  fov 
)

Reset the orbit camera to frame the given model.

Definition at line 45 of file ModelLoader.cpp.

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

◆ tryToEquipItem()

void ModelLoader::tryToEquipItem ( WoWModel model,
int  id,
AppState app,
const ItemDatabase db 
)

Definition at line 416 of file ModelLoader.cpp.

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

◆ wstringToString()

std::string ModelLoader::wstringToString ( const std::wstring &  ws)

Convert a wide string to narrow ASCII (lossy, for display only).

Definition at line 29 of file ModelLoader.cpp.

Here is the caller graph for this function: