Moving from gitlab
This commit is contained in:
27
includes/Model.hpp
Normal file
27
includes/Model.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
namespace rl {
|
||||
#include "raylib.h"
|
||||
}
|
||||
|
||||
namespace Ley {
|
||||
|
||||
class Model {
|
||||
private:
|
||||
Model(const std::string &obj_path, const std::string &texture_path);
|
||||
public:
|
||||
static Model create(const std::string &obj_path, const std::string &texture_path);
|
||||
~Model();
|
||||
void setPosition(rl::Vector3 position) { _position = position; }
|
||||
rl::Vector3 getPosition() const { return _position; }
|
||||
rl::Model getModel() const { return _model; }
|
||||
void Draw(rl::Color color) const { rl::DrawModel(_model, _position, 1.0f, color); }
|
||||
private:
|
||||
rl::Model _model;
|
||||
rl::Texture2D _texture;
|
||||
rl::Vector3 _position;
|
||||
std::string _obj_path;
|
||||
std::string _texture_path;
|
||||
};
|
||||
} // namespace Ley
|
||||
Reference in New Issue
Block a user