Nebula
Loading...
Searching...
No Matches
characternode.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
14#include "coregraphics/shader.h"
15#include "coregraphics/buffer.h"
16
17//------------------------------------------------------------------------------
18namespace Models
19{
21{
22public:
26 virtual ~CharacterNode();
27
29 void OnResourcesLoaded();
31 bool Load(const Util::FourCC& fourcc, const Util::StringAtom& tag, const Ptr<IO::BinaryReader>& reader, bool immediate) override;
32
34 void Discard() override;
35
37 //const Ptr<Character>& GetCharacter() const;
40
42 const Resources::ResourceId GetAnimationResourceId() const;
43
45 bool GetImplicitHierarchyActivation() const override;
46
47private:
49 //virtual Ptr<Models::ModelNodeInstance> RecurseCreateNodeInstanceHierarchy(const Ptr<Models::ModelInstance>& modelInst, const Ptr<Models::ModelNodeInstance>& parentNodeInst=0);
50
51protected:
52
59 Resources::ResourceId managedAnimResource;
60 Resources::ResourceId managedVariationResource;
61
65};
66
67//------------------------------------------------------------------------------
70inline const Resources::ResourceName&
72{
73 return this->animResId;
74}
75
76//------------------------------------------------------------------------------
79inline const Resources::ResourceId
84
85//------------------------------------------------------------------------------
88inline bool
90{
91 return true;
92}
93
94
95} // namespace Characters
96//------------------------------------------------------------------------------
97
Definition characternode.h:21
CharacterNode()
constructor
Definition characternode.cc:23
const Resources::ResourceName & GetAnimResource() const
get the owned character object
Definition characternode.h:71
Resources::ResourceName variationResId
Definition characternode.h:57
void Discard() override
discard node
Definition characternode.cc:42
IndexT skeletonIndex
Definition characternode.h:56
CoreGraphics::ShaderId sharedShader
Definition characternode.h:62
virtual ~CharacterNode()
destructor
Definition characternode.cc:32
IndexT cboIndex
Definition characternode.h:64
bool GetImplicitHierarchyActivation() const override
character nodes should not create the hierarchy implicitly
Definition characternode.h:89
Resources::ResourceName animResId
recursively create model node instance and child model node instances
Definition characternode.h:53
Resources::ResourceId managedAnimResource
Definition characternode.h:59
CoreGraphics::BufferId cbo
Definition characternode.h:63
Util::StringAtom tag
Definition characternode.h:58
IndexT animIndex
Definition characternode.h:54
void OnResourcesLoaded()
called when resources have loaded
Definition characternode.cc:55
const Resources::ResourceId GetAnimationResourceId() const
get the character's animation resource
Definition characternode.h:80
Resources::ResourceName skeletonResId
Definition characternode.h:55
Resources::ResourceId managedVariationResource
Definition characternode.h:60
Definition transformnode.h:15
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
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
A shader represents an entire shader resource, containing several stages and programs.
Definition buffer.h:23
Definition shader.h:51
int IndexT
Definition types.h:48