mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
38 lines
842 B
C++
38 lines
842 B
C++
#ifndef MESH_H
|
|
#define MESH_H
|
|
|
|
#include <string>
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "Scene.h"
|
|
|
|
/**
|
|
* @brief The Mesh class creates a Primitive node from a PLY File
|
|
*
|
|
* PLY - Polygon File Format
|
|
* Also known as the Stanford Triangle Format
|
|
* http://paulbourke.net/dataformats/ply/
|
|
*/
|
|
class Mesh : public Primitive {
|
|
|
|
public:
|
|
Mesh(const std::string& path, const std::string& texture = "");
|
|
~Mesh();
|
|
|
|
void init () override;
|
|
void draw (glm::mat4 modelview, glm::mat4 projection) override;
|
|
void accept (Visitor& v) override;
|
|
// void update (float dt) override;
|
|
|
|
inline std::string getResource() const { return resource_; }
|
|
inline std::string getTexture() const { return texturefilename_; }
|
|
|
|
protected:
|
|
std::string resource_;
|
|
std::string texturefilename_;
|
|
uint textureindex_;
|
|
|
|
};
|
|
|
|
#endif // MESH_H
|