Files
leyngine/includes/Model.hpp
lejulien c2cc6e22e9 raylib: remove rl namespace
This will allow us to use rlImGUI
2026-02-26 15:28:53 +01:00

27 lines
643 B
C++

#pragma once
#include <string>
#include "raylib.h"
namespace Ley {
class cModel {
private:
cModel(const std::string &obj_path, const std::string &texture_path);
public:
static cModel create(const std::string &obj_path, const std::string &texture_path);
~cModel();
void setPosition(Vector3 position) { _position = position; }
Vector3 getPosition() const { return _position; }
Model getModel() const { return _model; }
void Draw(Color color) const { DrawModel(_model, _position, 1.0f, color); }
private:
Model _model;
Texture2D _texture;
Vector3 _position;
std::string _obj_path;
std::string _texture_path;
};
} // namespace Ley