mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-05 10:59:48 +00:00
mesh encapsulation done
This commit is contained in:
@@ -32,14 +32,14 @@ namespace RAY::Drawables::Drawables3D
|
||||
this->setTextureToMaterial(texture->first, texture->second);
|
||||
}
|
||||
|
||||
Model::Model(const Mesh &mesh,
|
||||
Model::Model(const Mesh::AMesh &mesh,
|
||||
std::optional<std::pair<MaterialType, std::string>> texture,
|
||||
const RAY::Vector3 &scale,
|
||||
const RAY::Vector3 &position,
|
||||
const RAY::Vector3 &rotationAxis,
|
||||
float rotationAngle)
|
||||
: ADrawable3D(position, WHITE),
|
||||
_model(std::make_shared<::Model>(LoadModelFromMesh(mesh))),
|
||||
_model(std::make_shared<::Model>(LoadModelFromMesh(*mesh.getRaylibMesh()))),
|
||||
_rotationAxis(rotationAxis),
|
||||
_rotationAngle(rotationAngle),
|
||||
_scale(scale)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Model/ModelAnimation.hpp"
|
||||
#include "Shaders/Shaders.hpp"
|
||||
#include <raylib.h>
|
||||
#include "Meshes/AMesh.hpp"
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
#include "Utils/Cache.hpp"
|
||||
@@ -36,7 +37,7 @@ namespace RAY::Drawables::Drawables3D {
|
||||
|
||||
//! @brief Create an model, loading a file
|
||||
//! @param mesh: mesh to load
|
||||
Model(const Mesh &mesh,
|
||||
Model(const Mesh::AMesh &mesh,
|
||||
std::optional<std::pair<MaterialType, std::string>> texture = std::nullopt,
|
||||
const RAY::Vector3 &scale = RAY::Vector3(1, 1, 1),
|
||||
const RAY::Vector3 &position = {0, 0, 0},
|
||||
|
||||
Reference in New Issue
Block a user