Cogs.Core
Source
Systems
Geometry
InstancedMeshBuilderSystem.h
1
#pragma once
2
3
#include "Systems/ComponentSystem.h"
4
5
#include "Foundation/Memory/MemoryBuffer.h"
6
7
#include "Components/Geometry/InstancedMeshBuilderComponent.h"
8
9
namespace
Cogs::Core
10
{
11
class
Context;
12
13
struct
InstancedMeshBuilderData
14
{
15
Memory::MemoryBuffer
matrices;
16
MeshHandle
instanceMesh =
MeshHandle::NoHandle
;
17
size_t
viewStateHash = 0;
18
size_t
instanceCount = 0;
19
bool
dynamicScaling =
false
;
20
bool
useMatrix =
false
;
21
bool
usePositions =
false
;
22
bool
useColors =
false
;
23
};
24
25
class
InstancedMeshBuilderSystem
:
public
ComponentSystemWithDataPool
<InstancedMeshBuilderComponent, InstancedMeshBuilderData>
26
{
27
public
:
28
InstancedMeshBuilderSystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
ComponentSystemWithDataPool
(allocator, capacity) {}
29
30
void
update
(
Context
*
context
);
31
};
32
}
Cogs::Core::ComponentSystemBase::context
Context * context
Pointer to the Context instance the system lives in.
Definition:
ComponentSystem.h:136
Cogs::Core::ComponentSystemBase::update
void update()
Updates the system state to that of the current frame.
Definition:
ComponentSystem.h:65
Cogs::Core::ComponentSystemWithDataPool
Component system with parallel data per component stored in a pool similar to how the components them...
Definition:
ComponentSystem.h:365
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::InstancedMeshBuilderSystem
Definition:
InstancedMeshBuilderSystem.h:26
Cogs::Memory::Allocator
Base allocator implementation.
Definition:
Allocator.h:30
Cogs::Memory::MemoryBuffer
Definition:
MemoryBuffer.h:23
Cogs::Core
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Definition:
ComponentFunctions.h:10
Cogs::SizeType
ComponentIndex SizeType
Type used to track the size of pools.
Definition:
Component.h:19
Cogs::Core::InstancedMeshBuilderData
Definition:
InstancedMeshBuilderSystem.h:14
Cogs::Core::ResourceHandle_t< Mesh >
Cogs::Core::ResourceHandle_t< Mesh >::NoHandle
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.
Definition:
ResourceHandle.h:193
Generated by
1.9.6