Nebula
Loading...
Searching...
No Matches
primitivenode.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
10#include "modelnode.h"
13#include "shaderstatenode.h"
14#include "coregraphics/mesh.h"
15namespace Models
16{
18{
19public:
23 virtual ~PrimitiveNode();
24
28 uint GetMeshIndex() const { return this->loadContext.meshIndex;}
32 CoreGraphics::MeshId GetMesh() const { return this->mesh; }
34 Resources::ResourceId GetMeshResource() const { return this->res; }
35
36
37protected:
38 friend class ModelLoader;
39
41 virtual bool Load(const Util::FourCC& fourcc, const Util::StringAtom& tag, const Ptr<IO::BinaryReader>& reader, bool immediate) override;
43 virtual void Unload() override;
44
46 virtual void OnFinishedLoading(ModelStreamingData* streamingData) override;
47
49 Resources::ResourceId res;
51
57
64};
65
66} // namespace Models
Code
index types enum
Definition indextype.h:22
Defines a group of primitives as a subset of a vertex buffer and index buffer plus the primitive topo...
Definition primitivegroup.h:20
Code
enumeration
Definition primitivetopology.h:23
Definition modelloader.h:27
Util::StringAtom tag
Definition modelnode.h:110
Definition primitivenode.h:18
const CoreGraphics::PrimitiveGroup & GetPrimitiveGroup() const
Get primitive group.
Definition primitivenode.h:30
struct Models::PrimitiveNode::LoadContext loadContext
Resources::ResourceId res
Definition primitivenode.h:49
CoreGraphics::MeshId mesh
Definition primitivenode.h:50
uint GetPrimitiveGroupIndex() const
Get the nodes primitive group index.
Definition primitivenode.h:26
CoreGraphics::BufferId vbo
Definition primitivenode.h:58
virtual ~PrimitiveNode()
destructor
Definition primitivenode.cc:30
PrimitiveNode()
constructor
Definition primitivenode.cc:19
Resources::ResourceName meshResource
Definition primitivenode.h:48
CoreGraphics::PrimitiveTopology::Code topology
Definition primitivenode.h:61
CoreGraphics::MeshId GetMesh() const
Get primitives mesh id.
Definition primitivenode.h:32
IndexT baseVboOffset
Definition primitivenode.h:59
Resources::ResourceId GetMeshResource() const
Get mesh resource.
Definition primitivenode.h:34
virtual void Unload() override
unload data
Definition primitivenode.cc:69
IndexT attributesVboOffset
Definition primitivenode.h:59
CoreGraphics::IndexType::Code indexType
Definition primitivenode.h:60
CoreGraphics::VertexLayoutId vertexLayout
Definition primitivenode.h:63
CoreGraphics::PrimitiveGroup primGroup
Definition primitivenode.h:62
virtual void OnFinishedLoading(ModelStreamingData *streamingData) override
called once when all pending resource have been loaded
Definition primitivenode.cc:78
IndexT iboOffset
Definition primitivenode.h:59
uint GetMeshIndex() const
Get the mesh index.
Definition primitivenode.h:28
CoreGraphics::BufferId ibo
Definition primitivenode.h:58
Definition shaderstatenode.h:19
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
Definition buffer.h:23
Definition mesh.h:29
Definition vertexlayout.h:16
Definition model.h:54
Definition primitivenode.h:53
uint16 meshIndex
Definition primitivenode.h:54
uint16 primIndex
Definition primitivenode.h:55
unsigned int uint
Definition types.h:31
uint16_t uint16
Definition types.h:40
int IndexT
Definition types.h:48