Cogs.Core
Source
Components
Core
MeshComponent.h
1
#pragma once
2
3
#include "Resources/Resources.h"
4
5
#include "Foundation/ComponentModel/Component.h"
6
7
namespace
Cogs
8
{
9
namespace
Core
10
{
14
class
MeshComponent
:
public
ComponentModel::Component
15
{
16
public
:
18
static
void
registerType
();
19
29
MeshHandle
meshHandle
=
MeshHandle::NoHandle
;
30
39
COGSCORE_DLL_API
Mesh
*
getMesh
(
class
Context
* context);
40
};
41
}
42
}
43
44
template
<>
inline
Cogs::StringView
getName<Cogs::Core::MeshComponent>() {
return
"MeshComponent"
; }
Cogs::ComponentModel::Component
Base class for Component instances.
Definition:
Component.h:143
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::MeshComponent
Contains a handle to a Mesh resource to use when rendering using the MeshRenderComponent.
Definition:
MeshComponent.h:15
Cogs::Core::MeshComponent::meshHandle
MeshHandle meshHandle
Handle to a Mesh resource to use when rendering.
Definition:
MeshComponent.h:29
Cogs::Core::MeshComponent::registerType
static void registerType()
Register the type in the type system.
Definition:
MeshComponent.cpp:10
Cogs::Core::MeshComponent::getMesh
COGSCORE_DLL_API Mesh * getMesh(class Context *context)
Utility for getting a pointer to the Mesh instance held by the component.
Definition:
MeshComponent.cpp:19
Cogs::StringView
Provides a weakly referenced view over the contents of a string.
Definition:
StringView.h:24
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Cogs::Core::Mesh
Meshes contain streams of vertex data in addition to index data and options defining geometry used fo...
Definition:
Mesh.h:265
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