VEX Engine
Retro looking game engine made in vulkan mostly because i wanted to understand it better.
Loading...
Searching...
No Matches
ModelObject.hpp
Go to the documentation of this file.
1
6
7#pragma once
8#include "GameObject.hpp"
10#include "components/ErrorUtils.hpp"
11
12
13namespace vex {
15 class ModelObject : public GameObject {
16 public:
18 ModelObject(Engine& engine, const std::string& name, MeshComponent meshComponent = MeshComponent{}, TransformComponent transformComponent = TransformComponent{})
19 : GameObject(engine, name) {
20 AddComponent(TransformComponent{transformComponent});
21 AddComponent(MeshComponent{meshComponent});
22 }
23
24 ~ModelObject() override {
25 log("Model destructor called");
26 }
27 };
28}
Contains basic components like transform, camera, name components..
This file defines the GameObject class.
Class for interaction with engine systems.
Definition Engine.hpp:47
GameObject(Engine &engine, const std::string &name)
Default constructor for GameObject.
void AddComponent(const T &comp)
Function that adds a component to the GameObject.
ModelObject(Engine &engine, const std::string &name, MeshComponent meshComponent=MeshComponent{}, TransformComponent transformComponent=TransformComponent{})
Constructor for ModelObject class. As said earlier, ModelObject can only be created by Model Creators...
~ModelObject() override
Destructor for ModelObject class.
void VEX_EXPORT log(const char *fmt,...)
Logs a formatted message.
Struct containing raw meshData, mesh id, texture paths and material properties. It just template and ...
Struct containing transform data and methods.