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

Scene-graph node that attaches a Displayable to a parent bone slot. More...

#include <Attachment.h>

Collaboration diagram for Attachment:
[legend]

Public Member Functions

 Attachment (Attachment *parent, Displayable *model, int id, int slot)
 
 ~Attachment ()
 
void setup ()
 
void setupParticle ()
 
AttachmentaddChild (std::string fn, int id, int slot)
 
AttachmentaddChild (Displayable *disp, int id, int slot)
 
void delSlot (int slot)
 
void delChildren ()
 
void draw ()
 
void drawParticles ()
 
void tick (float dt)
 
void setModel (Displayable *newmodel)
 
Displayablemodel () const
 

Public Attributes

Attachmentparent
 
std::vector< Attachment * > children
 
int id
 
int slot
 

Private Attributes

Displayablemodel_
 

Detailed Description

Scene-graph node that attaches a Displayable to a parent bone slot.

Forms a tree of model attachments (e.g. character → weapon → enchant glow). Each node owns its children and delegates draw/tick calls down the tree.

Definition at line 20 of file Attachment.h.

Constructor & Destructor Documentation

◆ Attachment()

Attachment::Attachment ( Attachment parent,
Displayable model,
int  id,
int  slot 
)

Definition at line 13 of file Attachment.cpp.

Here is the call graph for this function:

◆ ~Attachment()

Attachment::~Attachment ( )

Definition at line 19 of file Attachment.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addChild() [1/2]

Attachment * Attachment::addChild ( Displayable disp,
int  id,
int  slot 
)

Definition at line 109 of file Attachment.cpp.

◆ addChild() [2/2]

Attachment * Attachment::addChild ( std::string  fn,
int  id,
int  slot 
)

Definition at line 95 of file Attachment.cpp.

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

◆ delChildren()

void Attachment::delChildren ( )

Definition at line 117 of file Attachment.cpp.

Here is the caller graph for this function:

◆ delSlot()

void Attachment::delSlot ( int  slot)

Definition at line 129 of file Attachment.cpp.

Here is the caller graph for this function:

◆ draw()

void Attachment::draw ( )

Definition at line 29 of file Attachment.cpp.

Here is the call graph for this function:

◆ drawParticles()

void Attachment::drawParticles ( )

Definition at line 45 of file Attachment.cpp.

Here is the call graph for this function:

◆ model()

Displayable * Attachment::model ( ) const
inline

Definition at line 38 of file Attachment.h.

Here is the caller graph for this function:

◆ setModel()

void Attachment::setModel ( Displayable newmodel)

Definition at line 138 of file Attachment.cpp.

Here is the caller graph for this function:

◆ setup()

void Attachment::setup ( )

Definition at line 79 of file Attachment.cpp.

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

◆ setupParticle()

void Attachment::setupParticle ( )

Definition at line 87 of file Attachment.cpp.

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

◆ tick()

void Attachment::tick ( float  dt)

Definition at line 71 of file Attachment.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ children

std::vector<Attachment*> Attachment::children

Definition at line 42 of file Attachment.h.

◆ id

int Attachment::id

Definition at line 44 of file Attachment.h.

◆ model_

Displayable* Attachment::model_
private

Definition at line 48 of file Attachment.h.

◆ parent

Attachment* Attachment::parent

Definition at line 40 of file Attachment.h.

◆ slot

int Attachment::slot

Definition at line 45 of file Attachment.h.


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