Components

namespace marengine

Enums

enum EEventType

Values:

enumerator NONE
enumerator RENDERABLE_COLOR_UPDATE
enumerator RENDERABLE_MESH_UPDATE
enumerator RENDERABLE_TEX2D_LOAD
enumerator PYTHONSCRIPT_OPEN
enumerator PYTHONSCRIPT_CREATE_ASSIGN
enumerator PYTHONSCRIPT_ASSIGN
struct CCamera

Public Functions

bool isMainCamera() const

Method checks, if renderCamera is a main one for current scene and returns result.

Return

returns true, if renderCamera instance is main camera for current scene.

Public Members

FRenderCamera renderCamera
std::string id = {"secondary"}
float p_fov = {45.f}
float p_aspectRatio = {4.f / 3.f}
float p_near = {0.01f}
float p_far = {100.0f}
float o_left = {-10.f}
float o_right = {10.f}
float o_top = {10.f}
float o_bottom = {-10.f}
float o_near = {0.01f}
float o_far = {100.0f}
bool Perspective = {true}
struct CEvent

Public Functions

CEvent(EEventType eUpdateType)
CEvent(EEventType eUpdateType, const FFilesystemDialogInfo *pFsDialogInfo)

Public Members

const FFilesystemDialogInfo *pFilesystemDialogInfo = {nullptr}
EEventType eventUpdateType = {EEventType::NONE}
struct CPlayModeStorage

Public Types

enum ComponentType

Values:

enumerator NONE
enumerator TRANSFORM
enumerator RENDERABLE
enumerator POINTLIGHT
typedef std::variant<CTransform, CRenderable, CPointLight> ComponentVariant

Public Members

std::unordered_map<ComponentType, ComponentVariant> components
struct CPointLight

Public Members

FPointLight pointLight
BatchInfo batch
struct BatchInfo

Public Members

ELightBatchType type = {ELightBatchType::NONE}
int8 index = {-1}
struct CPythonScript

Public Members

PythonScript pythonScript
std::string scriptsPath = {}
struct CRenderable

Public Functions

bool isEntityRendered() const
bool isBatchUpdateValid() const

Public Members

maths::vec4 color = {0.5f, 0.5f, 0.5f, 1.f}

Default color, so that every entity that contains CRenderable can be rendered.

MeshInfo mesh
BatchInfo batch
MaterialInfo material
struct BatchInfo

Public Members

EBatchType type = {EBatchType::NONE}

type used to retrieve correct implementation of FMeshBatch from FMeshBatchStorage

int32 index = {-1}

index used to retrieve FMeshBatch, with which CRenderable is rendered.

int32 transformIndex = {-1}

transform index at batch (with this we can update only one transform at batch)

int32 materialIndex = {-1}

material index at batch (with this we can update only one material at batch)

int32 startVert = {-1}
int32 endVert = {-1}
int32 startInd = {-1}
int32 endInd = {-1}
struct MaterialInfo

Public Functions

bool isValid() const

Public Members

EMaterialType type = {EMaterialType::NONE}

type used to retrieve correct implementation of FMaterialProxy from FMaterialStorage

int32 index = {-1}

index used to retrieve assigned to Entity FMaterialProxy from FMaterialStorage

uint32 assetID = {0}

asset ID for more convenient way to retrieve already loaded asset

std::string path = {}
struct MeshInfo

Public Members

std::string path = {}

path used to retrieve external FMeshProxy from FMeshStorage (can be empty if used default Mesh)

EMeshType type = {EMeshType::NONE}

type used to retrieve correct implementation of FMeshProxy from FMeshStorage

int32 index = {-1}

index used to retrieve assigned to Entity FMeshProxy from FMeshStorage (can be -1 if default Mesh used)

uint32 assetID = {0}

asset ID for more convenient way to retrieve already loaded asset

struct CTag

Public Members

std::string tag = {"New Entity"}
struct CTransform

Public Functions

maths::mat4 getTransform() const

Calculates transform matrix from position, rotation and scale vec3’s and returns it.

Return

calculated transform matrix

Public Members

maths::vec3 position = {0.f, 0.f, 0.f}
maths::vec3 rotation = {0.f, 0.f, 0.f}
maths::vec3 scale = {1.f, 1.f, 1.f}