Nebula
Loading...
Searching...
No Matches
model.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
10//------------------------------------------------------------------------------
11#include "ids/id.h"
12#include "ids/idallocator.h"
14#include "core/rttimacros.h"
16#include <functional>
17namespace Models
18{
19
20class ModelNode;
21
23
35
43
44enum class LoadBits
45{
46 NoBits = N_BIT(0),
47 MeshBit = N_BIT(1),
48 AnimBit = N_BIT(2),
50};
52
58
64
70
72const ModelId CreateModel(const ModelCreateInfo& info);
74void DestroyModel(const ModelId id);
75
80
81enum
82{
85};
86
87typedef Ids::IdAllocator<
92} // namespace Models
An ID allocator associates an id with a slice in an N number of arrays.
Definition idallocator.h:39
Nebula's bounding box class.
Definition bbox.h:24
Nebula's dynamic array class.
Definition array.h:60
A model resource consists of nodes, each of which inhibit some information read from an ....
Definition model.cc:10
@ Model_Nodes
Definition model.h:84
@ Model_BoundingBox
Definition model.h:83
void DestroyModel(const ModelId id)
discard model (resource)
Definition model.cc:31
const Math::bbox & ModelGetBoundingBox(const ModelId id)
Get model bounding box.
Definition model.cc:50
ModelAllocator modelAllocator
Definition model.cc:12
const ModelId CreateModel(const ModelCreateInfo &info)
create model (resource)
Definition model.cc:17
NodeBits
Definition model.h:37
@ NoBits
Definition model.h:38
@ HasTransformBit
Definition model.h:39
@ HasStateBit
Definition model.h:40
const Util::Array< Models::ModelNode * > & ModelGetNodes(const ModelId id)
Get model nodes.
Definition model.cc:41
Ids::IdAllocator< Math::bbox, Util::Array< Models::ModelNode * > > ModelAllocator
Definition model.h:90
LoadBits
Definition model.h:45
NodeType
Definition model.h:25
@ TransformNodeType
Definition model.h:27
@ CharacterNodeType
Definition model.h:26
@ NumNodeTypes
Definition model.h:33
@ CharacterSkinNodeType
Definition model.h:31
@ PrimitiveNodeType
Definition model.h:29
@ ShaderStateNodeType
Definition model.h:28
@ ParticleSystemNodeType
Definition model.h:30
#define RESOURCE_ID_TYPE(type)
Definition resourceid.h:41
#define __ImplementEnumBitOperators(type)
This defines the macros for Nebula's RTTI mechanism (__DeclareClass, __ImplementClass,...
Describes a range allocated by the Memory::RangeAllocator.
Definition model.h:66
Util::Array< Models::ModelNode * > nodes
Definition model.h:68
Math::bbox boundingBox
Definition model.h:67
Definition model.h:22
Definition model.h:54
LoadBits requiredBits
Definition model.h:55
LoadBits loadedBits
Definition model.h:56
Definition model.h:60
SizeT end
Definition model.h:62
Memory::RangeAllocation allocation
Definition model.h:61
SizeT begin
Definition model.h:62
#define N_BIT(x)
Definition types.h:86
int SizeT
Definition types.h:49