Description

Generic renderable triangle mesh.

#include <ChOpenGLMesh.h>

Inheritance diagram for chrono::opengl::ChOpenGLMesh:
Collaboration diagram for chrono::opengl::ChOpenGLMesh:

Public Member Functions

bool Initialize (std::vector< glm::vec3 > &vertices, std::vector< glm::vec3 > &normals, std::vector< glm::vec2 > &texcoords, std::vector< GLuint > &indices, ChOpenGLMaterial mat)
 
bool Initialize (chrono::ChTriangleMeshShape *tri_mesh, ChOpenGLMaterial mat)
 
bool PostInitialize ()
 
void Update (std::vector< glm::mat4 > &model)
 
virtual void Draw (const glm::mat4 &projection, const glm::mat4 &view)
 
void TakeDown ()
 
- Public Member Functions inherited from chrono::opengl::ChOpenGLObject
virtual bool Initialize ()
 
virtual bool PostGLInitialize (const GLvoid *ptr, GLsizeiptr size)
 
void AttachShader (ChOpenGLShader *new_shader)
 
- Public Member Functions inherited from chrono::opengl::ChOpenGLBase
bool GLReturnedError (const char *s)
 

Protected Types

typedef ChOpenGLObject super
 

Protected Attributes

std::vector< ChOpenGLVertexAttributesPN > data
 
glm::vec3 ambient
 
glm::vec3 specular
 
glm::vec3 diffuse
 
int size
 
- Protected Attributes inherited from chrono::opengl::ChOpenGLObject
GLuint vertex_array_handle
 
GLuint vertex_data_handle
 
GLuint vertex_element_handle
 
GLuint vertex_ambient_handle
 
GLuint vertex_diffuse_handle
 
GLuint vertex_specular_handle
 
GLuint vertex_model_handle
 
std::vector< GLuint > vertex_indices
 
ChOpenGLShadershader