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

Manages character customisation options (skin, face, hair, etc.). More...

#include <CharDetails.h>

Inheritance diagram for CharDetails:
[legend]
Collaboration diagram for CharDetails:
[legend]

Classes

class  CustomizationElements
 
class  TextureCustomization
 

Public Types

enum  BaseSectionType {
  SkinBaseType = 0 , FaceBaseType = 1 , FacialHairBaseType = 2 , HairBaseType = 3 ,
  UnderwearBaseType = 4 , Custom1BaseType = 5 , Custom2BaseType = 6 , Custom3BaseType = 7
}
 
enum  SectionType {
  SkinType = 0 , FaceType = 1 , FacialHairType = 2 , HairType = 3 ,
  UnderwearType = 4 , SkinTypeHD = 5 , FaceTypeHD = 6 , FacialHairTypeHD = 7 ,
  HairTypeHD = 8 , UnderwearTypeHD = 9 , Custom1Type = 11 , Custom1TypeHD = 12 ,
  Custom2Type = 13 , Custom2TypeHD = 14 , Custom3Type = 15 , Custom3TypeHD = 16
}
 
enum  CustomizationType {
  SKIN_COLOR = 0 , FACE = 1 , FACIAL_CUSTOMIZATION_STYLE = 2 , FACIAL_CUSTOMIZATION_COLOR = 3 ,
  ADDITIONAL_FACIAL_CUSTOMIZATION = 4 , CUSTOM1_STYLE = 5 , CUSTOM1_COLOR = 8 , CUSTOM2_STYLE = 6 ,
  CUSTOM3_STYLE = 7
}
 

Public Member Functions

 CharDetails ()
 
void save (pugi::xml_node &parentNode)
 
void load (const std::string &filepath)
 
void reset (WoWModel *m=nullptr)
 
void randomise ()
 
uint get (uint chrCustomizationOptionID) const
 
void set (uint chrCustomizationOptionID, uint chrCustomizationChoiceID)
 
std::vector< uintgetCustomizationChoices (const uint chrCustomizationOptionID)
 
void setDemonHunterMode (bool val)
 
bool isDemonHunter () const
 
void refresh ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
virtual ~Observable ()
 
void attach (Observer *)
 Subscribe an observer to receive events from this object.
 
void detach (Observer *)
 Unsubscribe an observer.
 

Public Attributes

EyeGlowTypes eyeGlowType
 
bool showUnderwear
 
bool showEars
 
bool showHair
 
bool showFacialHair
 
bool showFeet
 
bool autoHideGeosetsForHeadItems
 
bool isNPC
 
std::map< uint, uintgeosets
 
std::vector< TextureCustomizationtextures
 

Private Member Functions

void fillCustomizationMap ()
 
void fillCustomizationMapForOption (uint chrCustomizationOption)
 
void rebuildAllCustomizationElements ()
 
void refreshGeosets ()
 
void refreshTextures ()
 
void refreshSkinnedModels ()
 

Static Private Member Functions

static int bitMaskToSectionType (int mask)
 

Private Attributes

WoWModelmodel_
 
bool isDemonHunter_
 
std::map< uint, uintcurrentCustomization_
 
std::map< uint, std::vector< uint > > choicesPerOptionMap_
 
std::set< uintdefaultOptionIds_
 
std::map< uint, CustomizationElementscustomizationElementsPerOption_
 
std::vector< std::pair< uint, std::pair< uint, uint > > > models_
 

Additional Inherited Members

- Protected Member Functions inherited from Observable
void notify (Event &)
 Broadcast an event to all attached observers.
 

Detailed Description

Manages character customisation options (skin, face, hair, etc.).

Maintains the current selection indices for each customisation slot and notifies observers when selections change so textures can be rebuilt.

Definition at line 29 of file CharDetails.h.

Member Enumeration Documentation

◆ BaseSectionType

Enumerator
SkinBaseType 
FaceBaseType 
FacialHairBaseType 
HairBaseType 
UnderwearBaseType 
Custom1BaseType 
Custom2BaseType 
Custom3BaseType 

Definition at line 35 of file CharDetails.h.

◆ CustomizationType

Enumerator
SKIN_COLOR 
FACE 
FACIAL_CUSTOMIZATION_STYLE 
FACIAL_CUSTOMIZATION_COLOR 
ADDITIONAL_FACIAL_CUSTOMIZATION 
CUSTOM1_STYLE 
CUSTOM1_COLOR 
CUSTOM2_STYLE 
CUSTOM3_STYLE 

Definition at line 68 of file CharDetails.h.

◆ SectionType

Enumerator
SkinType 
FaceType 
FacialHairType 
HairType 
UnderwearType 
SkinTypeHD 
FaceTypeHD 
FacialHairTypeHD 
HairTypeHD 
UnderwearTypeHD 
Custom1Type 
Custom1TypeHD 
Custom2Type 
Custom2TypeHD 
Custom3Type 
Custom3TypeHD 

Definition at line 48 of file CharDetails.h.

Constructor & Destructor Documentation

◆ CharDetails()

CharDetails::CharDetails ( )

Definition at line 12 of file CharDetails.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ bitMaskToSectionType()

int CharDetails::bitMaskToSectionType ( int  mask)
staticprivate

Definition at line 388 of file CharDetails.cpp.

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

◆ fillCustomizationMap()

void CharDetails::fillCustomizationMap ( )
private

Definition at line 144 of file CharDetails.cpp.

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

◆ fillCustomizationMapForOption()

void CharDetails::fillCustomizationMapForOption ( uint  chrCustomizationOption)
private

Definition at line 188 of file CharDetails.cpp.

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

◆ get()

uint CharDetails::get ( uint  chrCustomizationOptionID) const

Definition at line 262 of file CharDetails.cpp.

Here is the call graph for this function:

◆ getCustomizationChoices()

std::vector< uint > CharDetails::getCustomizationChoices ( const uint  chrCustomizationOptionID)

Definition at line 251 of file CharDetails.cpp.

Here is the call graph for this function:

◆ isDemonHunter()

bool CharDetails::isDemonHunter ( ) const
inline

Definition at line 113 of file CharDetails.h.

Here is the caller graph for this function:

◆ load()

void CharDetails::load ( const std::string &  filepath)

Definition at line 40 of file CharDetails.cpp.

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

◆ randomise()

void CharDetails::randomise ( )

Definition at line 139 of file CharDetails.cpp.

Here is the call graph for this function:

◆ rebuildAllCustomizationElements()

void CharDetails::rebuildAllCustomizationElements ( )
private

Definition at line 270 of file CharDetails.cpp.

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

◆ refresh()

void CharDetails::refresh ( )

Definition at line 404 of file CharDetails.cpp.

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

◆ refreshGeosets()

void CharDetails::refreshGeosets ( )
private

Definition at line 412 of file CharDetails.cpp.

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

◆ refreshSkinnedModels()

void CharDetails::refreshSkinnedModels ( )
private

Definition at line 496 of file CharDetails.cpp.

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

◆ refreshTextures()

void CharDetails::refreshTextures ( )
private

Definition at line 467 of file CharDetails.cpp.

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

◆ reset()

void CharDetails::reset ( WoWModel m = nullptr)

Definition at line 90 of file CharDetails.cpp.

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

◆ save()

void CharDetails::save ( pugi::xml_node &  parentNode)

Definition at line 20 of file CharDetails.cpp.

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

◆ set()

void CharDetails::set ( uint  chrCustomizationOptionID,
uint  chrCustomizationChoiceID 
)

Definition at line 227 of file CharDetails.cpp.

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

◆ setDemonHunterMode()

void CharDetails::setDemonHunterMode ( bool  val)
inline

Definition at line 112 of file CharDetails.h.

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

Member Data Documentation

◆ autoHideGeosetsForHeadItems

bool CharDetails::autoHideGeosetsForHeadItems

Definition at line 93 of file CharDetails.h.

◆ choicesPerOptionMap_

std::map<uint, std::vector<uint> > CharDetails::choicesPerOptionMap_
private

Definition at line 147 of file CharDetails.h.

◆ currentCustomization_

std::map<uint, uint> CharDetails::currentCustomization_
private

Definition at line 123 of file CharDetails.h.

◆ customizationElementsPerOption_

std::map<uint, CustomizationElements> CharDetails::customizationElementsPerOption_
private

Definition at line 151 of file CharDetails.h.

◆ defaultOptionIds_

std::set<uint> CharDetails::defaultOptionIds_
private

Definition at line 149 of file CharDetails.h.

◆ eyeGlowType

EyeGlowTypes CharDetails::eyeGlowType

Definition at line 91 of file CharDetails.h.

◆ geosets

std::map<uint, uint> CharDetails::geosets

Definition at line 97 of file CharDetails.h.

◆ isDemonHunter_

bool CharDetails::isDemonHunter_
private

Definition at line 121 of file CharDetails.h.

◆ isNPC

bool CharDetails::isNPC

Definition at line 95 of file CharDetails.h.

◆ model_

WoWModel* CharDetails::model_
private

Definition at line 120 of file CharDetails.h.

◆ models_

std::vector<std::pair<uint, std::pair<uint, uint> > > CharDetails::models_
private

Definition at line 153 of file CharDetails.h.

◆ showEars

bool CharDetails::showEars

Definition at line 93 of file CharDetails.h.

◆ showFacialHair

bool CharDetails::showFacialHair

Definition at line 93 of file CharDetails.h.

◆ showFeet

bool CharDetails::showFeet

Definition at line 93 of file CharDetails.h.

◆ showHair

bool CharDetails::showHair

Definition at line 93 of file CharDetails.h.

◆ showUnderwear

bool CharDetails::showUnderwear

Definition at line 93 of file CharDetails.h.

◆ textures

std::vector<TextureCustomization> CharDetails::textures

Definition at line 98 of file CharDetails.h.


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