Nebula
Loading...
Searching...
No Matches
characterskinnode.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "primitivenode.h"
12#include "characternode.h"
14
15//------------------------------------------------------------------------------
16namespace Models
17{
19{
20public:
24 virtual ~CharacterSkinNode();
25
27 void ReserveFragments(SizeT numFragments);
29 void AddFragment(IndexT primGroupIndex, const Util::Array<IndexT>& jointPalette);
31 SizeT GetNumFragments() const;
33 IndexT GetFragmentPrimGroupIndex(IndexT fragmentIndex) const;
35 const Util::Array<IndexT>& GetFragmentJointPalette(IndexT fragmentIndex) const;
36
37private:
48
49protected:
51
53 virtual bool Load(const Util::FourCC& fourcc, const Util::StringAtom& tag, const Ptr<IO::BinaryReader>& reader, bool immediate) override;
55 virtual void OnFinishedLoading(ModelStreamingData* streamingData) override;
56
58};
59
60//------------------------------------------------------------------------------
63inline SizeT
65{
66 return this->skinFragments.Size();
67}
68
69//------------------------------------------------------------------------------
72inline IndexT
74{
75 return this->skinFragments[fragmentIndex].primGroupIndex;
76}
77
78//------------------------------------------------------------------------------
81inline const Util::Array<IndexT>&
83{
84 return this->skinFragments[fragmentIndex].jointPalette;
85}
86
87} // namespace Characters
88//------------------------------------------------------------------------------
Assumes control over the character animation functionalities of a model if it contains a character de...
Definition charactercontext.h:58
a skin fragment
Definition characterskinnode.h:40
IndexT primGroupIndex
Definition characterskinnode.h:45
Util::Array< IndexT > jointPalette
Definition characterskinnode.h:46
Fragment()
constructor
Definition characterskinnode.h:43
Definition characterskinnode.h:19
void AddFragment(IndexT primGroupIndex, const Util::Array< IndexT > &jointPalette)
add a fragment (consisting of a mesh group index and a joint palette)
Definition characterskinnode.cc:99
virtual void OnFinishedLoading(ModelStreamingData *streamingData) override
called when loading finished
Definition characterskinnode.cc:74
CharacterSkinNode()
constructor
Definition characterskinnode.cc:23
SizeT GetNumFragments() const
get number of skin fragments
Definition characterskinnode.h:64
virtual ~CharacterSkinNode()
destructor
Definition characterskinnode.cc:32
void ReserveFragments(SizeT numFragments)
reserve fragments (call before adding fragments)
Definition characterskinnode.cc:89
IndexT GetFragmentPrimGroupIndex(IndexT fragmentIndex) const
get primitive group index of a fragment
Definition characterskinnode.h:73
const Util::Array< IndexT > & GetFragmentJointPalette(IndexT fragmentIndex) const
get joint palette of a fragment
Definition characterskinnode.h:82
Util::Array< Fragment > skinFragments
Definition characterskinnode.h:57
Util::StringAtom tag
Definition modelnode.h:110
Definition primitivenode.h:18
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
A four-character-code is a quasi-human-readable 32-bit-id.
Definition fourcc.h:19
A StringAtom.
Definition stringatom.h:22
A model resource consists of nodes, each of which inhibit some information read from an ....
Definition model.cc:10
Definition model.h:54
static const int InvalidIndex
Definition types.h:54
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48