OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::shapes::ObjMesh Class Reference

Class providing attributes and instructions for drawing of mesh loaded from obj. More...

#include </home/chochlik/devel/oglplus/include/oglplus/shapes/obj_mesh.hpp>

Inherits oglplus::shapes::DrawingInstructionWriter, and oglplus::shapes::DrawMode.

Inherited by oglplus::ArrowShape, and oglplus::ObjShape.

Public Types

typedef VertexAttribsInfo
< ObjMesh
VertexAttribs
 Vertex attribute information for this shape builder. More...
 
typedef std::vector< GLuint > IndexArray
 The type of the index container returned by Indices()
 

Public Member Functions

FaceOrientation FaceWinding (void) const
 Returns the winding direction of faces.
 
template<typename T >
GLuint Positions (std::vector< T > &dest) const
 Makes the vertex positions and returns the number of values per vertex.
 
template<typename T >
GLuint Normals (std::vector< T > &dest) const
 Makes the vertex normals and returns the number of values per vertex.
 
template<typename T >
GLuint Tangents (std::vector< T > &dest) const
 Makes the vertex tangents and returns the number of values per vertex.
 
template<typename T >
GLuint Bitangents (std::vector< T > &dest) const
 Makes the vertex bi-tangents and returns the number of values per vertex.
 
template<typename T >
GLuint TexCoordinates (std::vector< T > &dest) const
 Makes the texture coordinates returns the number of values per vertex.
 
template<typename T >
GLuint MaterialNumbers (std::vector< T > &dest) const
 Makes the material numbers returns the number of values per vertex.
 
const std::string & MaterialName (GLuint mat_num) const
 Returns the name of the i-th material.
 
bool QueryMeshIndex (const std::string &name, GLuint &index) const
 Queries the index of the mesh with the specified name.
 
GLuint GetMeshIndex (const std::string &name) const
 Gets the index of the mesh with the specified name, throws on error.
 
template<typename T >
void BoundingSphere (oglplus::Sphere< T > &bounding_sphere) const
 Queries the bounding sphere coordinates and dimensions.
 
IndexArray Indices (Default=Default()) const
 Returns element indices that are used with the drawing instructions.
 
DrawingInstructions Instructions (PrimitiveType primitive) const
 Returns the instructions for rendering of faces.
 
DrawingInstructions Instructions (Default=Default()) const
 Returns the instructions for rendering of faces.
 

Detailed Description

Class providing attributes and instructions for drawing of mesh loaded from obj.

Examples:
standalone/020_oglplus_oalplus.cpp.

Member Typedef Documentation

Vertex attribute information for this shape builder.

ObjMesh provides build functions for the following named vertex attributes:

  • "Position" the vertex positions
  • "Normal" the vertex normals
  • "Tangent" the vertex tangents
  • "TexCoords" the vertex texture coordinates
  • "Material" the vertex material numbers

The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/shapes/obj_mesh.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).