2#ifndef GRAMODS_GRAPHICS_OBJRENDERER
3#define GRAMODS_GRAPHICS_OBJRENDERER
5#include <gmGraphics/Renderer.hh>
6#include <gmGraphics/ImageTexture.hh>
8#include <gmCore/io_eigen.hh>
9#include <gmCore/OFactory.hh>
11BEGIN_NAMESPACE_GMGRAPHICS;
29 Eigen::Vector3f color_ambient;
31 Eigen::Vector3f color_diffuse;
33 Eigen::Vector3f color_specular;
35 Eigen::Vector3f color_emissive;
49 std::shared_ptr<gmGraphics::ImageTexture> texture_ambient = 0;
51 std::shared_ptr<gmGraphics::ImageTexture> texture_diffuse = 0;
53 std::shared_ptr<gmGraphics::ImageTexture> texture_specular = 0;
55 std::shared_ptr<gmGraphics::ImageTexture> texture_emissive = 0;
57 std::shared_ptr<gmGraphics::ImageTexture> texture_alpha = 0;
66 void initialize()
override;
71 void render(
const Camera &camera,
const Eigen::Affine3f &Mm)
override;
79 void getNearFar(
const Camera &camera,
80 const Eigen::Affine3f &Mm,
89 void setFile(std::filesystem::path file);
97 void setRecenter(
bool on);
105 void setMipmaps(
bool on);
110 std::vector<Material> getMaterials()
const;
116 void setMaterials(
const std::vector<Material> &materials);
129 std::unique_ptr<Impl> _impl;
133END_NAMESPACE_GMGRAPHICS;
The base of graphics Camera implementations.
Definition Camera.hh:19
A renderer that draws a Wavefront obj file.
Definition ObjRenderer.hh:17
The base of graphics Renderer implementations.
Definition Renderer.hh:17
Line for intersection with ray or segment.
Definition IntersectionLine.hh:15
Definition ObjRenderer.cpp:30
Data struct for material data used in the obj file rendering.
Definition ObjRenderer.hh:26
float dissolve
Dissolve, i.e.
Definition ObjRenderer.hh:46
float shininess
Shininess, i.e.
Definition ObjRenderer.hh:41