19class VisibilityContext;
36 void Setup()
override;
49 void Unload(
const Resources::ResourceId
id)
override;
59#define IMPLEMENT_NODE_ALLOCATOR(FourCC, Type) \
60 nodeConstructors.Add(FourCC, []() -> Models::ModelNode* { \
61 Models::ModelNode* node = (Models::ModelNode*)Memory::Alloc(Memory::ObjectHeap, sizeof(Models::Type)); \
62 new (node) Models::Type; \
Definition characternode.h:21
Definition characterskinnode.h:19
Definition modelcontext.h:58
Definition modelloader.h:27
ResourceStreamOutput StreamResource(const ResourceLoadJob &job) override
Stream texture.
Definition modelloader.cc:198
ModelLoader()
constructor
Definition modelloader.cc:24
ResourceLoader::ResourceInitOutput InitializeResource(const ResourceLoadJob &job, const Ptr< IO::Stream > &stream) override
perform actual load, override in subclass
Definition modelloader.cc:61
void Unload(const Resources::ResourceId id) override
unload resource
Definition modelloader.cc:180
Util::Dictionary< Util::FourCC, std::function< Models::ModelNode *()> > nodeConstructors
used for looking up constructors
Definition modelloader.h:57
void Setup() override
setup resource loader, initiates the placeholder and error resources if valid
Definition modelloader.cc:41
uint LodMask(const _StreamData &stream, float lod, bool async) const override
Create load mask based on LOD.
Definition modelloader.cc:215
virtual ~ModelLoader()
destructor
Definition modelloader.cc:32
__DeclareClass(ModelLoader)
friend class Visibility::VisibilityContext
Definition modelloader.h:44
Definition modelnode.h:54
Definition particlesystemnode.h:23
Definition primitivenode.h:18
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition resourceloader.h:60
bool async
Definition resourceloader.h:291
Nebula's dynamic array class.
Definition array.h:60
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
A four-character-code is a quasi-human-readable 32-bit-id.
Definition fourcc.h:19
A model resource consists of nodes, each of which inhibit some information read from an ....
Definition model.cc:10
const Util::Array< Models::ModelNode * > & ModelGetNodes(const ModelId id)
Get model nodes.
Definition model.cc:41
Implements a resource loader for models.
Definition modelcontext.h:35
Definition resourceloader.h:134
Definition resourceloader.h:140
Definition resourceloader.h:164
Definition resourceloader.h:151
unsigned int uint
Definition types.h:31