P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
RayMesh.hpp
Go to the documentation of this file.
1
10
11#ifndef RAYMESH_HPP_
12#define RAYMESH_HPP_
13
14//Raylib (without conflict)
15#include "RaylibAliases.hpp"
16
17//Interface
18#include "IMesh.hpp"
19
26class RayMesh : public graphic::IMesh {
27
28 public:
29 RayMesh(std::string path) {
30 _model = raylib::LoadModel(path.c_str());
31 _boundingBox = raylib::GetModelBoundingBox(_model);
32 }
33
35 raylib::UnloadModel(_model);
36 }
37
38 bool isReady() const override {
39 return _model.meshCount > 0;
40 }
41
42 raylib::Model &handle() {
43 return _model;
44 }
45
46 raylib::BoundingBox boundingBox() const {
47 return _boundingBox;
48 }
49
50 private:
51 raylib::Model _model;
52 raylib::BoundingBox _boundingBox;
53};
54
56
57#endif /* !RAYMESH_HPP_ */
bool isReady() const override
notice if the mesh is ready
Definition RayMesh.hpp:38
~RayMesh()
Definition RayMesh.hpp:34
raylib::Model & handle()
Definition RayMesh.hpp:42
RayMesh(std::string path)
Definition RayMesh.hpp:29
raylib::BoundingBox boundingBox() const
Definition RayMesh.hpp:46
Loaded geometry (vertices/faces), independent of any IModel instance built from it - deleting every I...
Definition IMesh.hpp:24