# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::ObjLoader Class Reference

Loads a Wavefront OBJ file. More...

`#include <vlOBJ.hpp>`

List of all members.

## Public Member Functions

virtual const char * | className ()
const std::vector< fvec4 > & | vertexArray () const
const std::vector< fvec3 > & | normalArray () const
const std::vector< fvec3 > & | texCoordsArray () const
const std::map< std::string, ref< ObjMaterial > > & | materials () const
const std::vector< ref < ObjMesh > > & | meshes () const
std::vector< fvec4 > & | vertexArray ()
std::vector< fvec3 > & | normalArray ()
std::vector< fvec3 > & | texCoordsArray ()
std::map< std::string, ref < ObjMaterial > > & | materials ()
std::vector< ref< ObjMesh > > & | meshes ()
ref< ResourceDatabase > | loadOBJ (VirtualFile *file)
| Loads a Wavefront OBJ file.
void | loadObjMaterials (VirtualFile *file, std::vector< ObjMaterial > &materials)
| Loads a Wavefront MTL file.

## Protected Attributes

std::vector< fvec4 > | mCoords
std::vector< fvec3 > | mNormals
std::vector< fvec3 > | mTexCoords
std::map< std::string, ref < ObjMaterial > > | mMaterials
std::vector< ref< ObjMesh > > | mMeshes

## Detailed Description

Loads a Wavefront OBJ file.

## Member Function Documentation

virtual const char* vl::ObjLoader::className | ( |  | ) | `[inline, virtual]`

const std::vector<fvec4>& vl::ObjLoader::vertexArray | ( |  | ) | const`[inline]`

const std::vector<fvec3>& vl::ObjLoader::normalArray | ( |  | ) | const`[inline]`

const std::vector<fvec3>& vl::ObjLoader::texCoordsArray | ( |  | ) | const`[inline]`

const std::map< std::string, ref<ObjMaterial> >& vl::ObjLoader::materials | ( |  | ) | const`[inline]`

const std::vector< ref<ObjMesh> >& vl::ObjLoader::meshes | ( |  | ) | const`[inline]`

std::vector<fvec4>& vl::ObjLoader::vertexArray | ( |  | ) | `[inline]`

std::vector<fvec3>& vl::ObjLoader::normalArray | ( |  | ) | `[inline]`

std::vector<fvec3>& vl::ObjLoader::texCoordsArray | ( |  | ) | `[inline]`

std::map< std::string, ref<ObjMaterial> >& vl::ObjLoader::materials | ( |  | ) | `[inline]`

std::vector< ref<ObjMesh> >& vl::ObjLoader::meshes | ( |  | ) | `[inline]`

ref< ResourceDatabase > ObjLoader::loadOBJ | ( | VirtualFile * | file | ) |

Loads a Wavefront OBJ file.

Parameters:

  | file | The OBJ file to be loaded

void ObjLoader::loadObjMaterials | ( | VirtualFile * | file,
|  | std::vector< ObjMaterial > & | materials |
| ) |  |  |

Loads a Wavefront MTL file.

Parameters:

  | file | The MTL file to be loaded
  | materials | Is filled with the loaded materials

## Member Data Documentation

std::vector<fvec4> vl::ObjLoader::mCoords`[protected]`

std::vector<fvec3> vl::ObjLoader::mNormals`[protected]`

std::vector<fvec3> vl::ObjLoader::mTexCoords`[protected]`

std::map< std::string, ref<ObjMaterial> > vl::ObjLoader::mMaterials`[protected]`

std::vector< ref<ObjMesh> > vl::ObjLoader::mMeshes`[protected]`

The documentation for this class was generated from the following files:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/vlOBJ.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/vlOBJ.cpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:47 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.