gramods
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gramods::gmGraphics::ObjRenderer::Impl Struct Reference
Collaboration diagram for gramods::gmGraphics::ObjRenderer::Impl:
Collaboration graph
[legend]

Classes

struct  MyHash
 
struct  uniforms
 

Public Types

typedef std::unordered_map< std::array< int, 3 >, size_t, MyHashindex_map_t
 

Public Member Functions

void load_data ()
 
void setup ()
 
bool read_obj (std::vector< GLfloat > &vertices, std::vector< GLfloat > &normals, std::vector< GLfloat > &tcoords, std::vector< GLint > &mtls)
 
void addTriangle (std::vector< GLfloat > &vertices, std::vector< GLfloat > &normals, std::vector< GLfloat > &tcoords, std::vector< GLint > &mtls, index_map_t &index_map, const tinyobj::attrib_t &attrib, const tinyobj::mesh_t &mesh)
 
Material makeMaterial (const tinyobj::material_t &mat)
 
void render (const Camera &camera, const Eigen::Affine3f &Mm)
 
void getNearFar (const Camera &camera, const Eigen::Affine3f &Mm, float &near, float &far)
 
void teardown ()
 
std::vector< float > getIntersections (const IntersectionLine &line)
 

Public Attributes

GLuint vertex_shader_id = 0
 
GLuint fragment_shader_id = 0
 
GLuint program_id = 0
 
GLuint vao_id = 0
 
GLuint vbo_id [4] = { 0, 0, 0, 0 }
 
std::vector< Materialmaterials
 
std::vector< std::vector< GLuint > > triangle_indices
 
std::unordered_map< GLint, uniformsloc
 
std::vector< GLfloat > vertices
 
std::vector< GLfloat > normals
 
std::vector< GLfloat > tcoords
 
std::vector< GLint > mtls
 
std::optional< AABBbounds
 
std::filesystem::path file
 
std::filesystem::path tex_root_path
 
bool recenter = false
 
bool is_setup = false
 
bool is_functional = false
 

Static Public Attributes

static const std::string vertex_shader_code
 
static const std::string fragment_shader_code
 
static const std::string mapper_pattern
 

The documentation for this struct was generated from the following file: