27 lines
643 B
C++
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
|