Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Loads a Wavefront OBJ file. More...
#include <ioOBJ.hpp>
Public Member Functions | |
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. More... | |
void | loadObjMaterials (VirtualFile *file, std::vector< ObjMaterial > &materials) |
Loads a Wavefront MTL file. More... | |
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 |
ref< ResourceDatabase > ObjLoader::loadOBJ | ( | VirtualFile * | file | ) |
Loads a Wavefront OBJ file.
file | The OBJ file to be loaded |
Definition at line 303 of file ioOBJ.cpp.
References vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::at(), vl::Image::bitsPerPixel(), vl::VirtualFile::close(), vl::Image::convertFormat(), vl::Image::convertType(), vl::defFileSystem(), vl::Shader::disable(), vl::Geometry::drawCalls(), vl::EN_ALPHA_TEST, vl::EN_BLEND, vl::EN_CULL_FACE, vl::EN_DEPTH_TEST, vl::EN_LIGHTING, vl::Shader::enable(), vl::Log::error(), vl::String::extractPath(), vl::ObjMesh::face_type(), vl::ObjMesh::faceNormalIndex(), vl::ObjMesh::facePositionIndex(), vl::ObjMesh::faceTexCoordIndex(), vl::FU_GEQUAL, vl::ref< T >::get(), vl::Texture::getTexParameter(), vl::Shader::gocAlphaFunc(), vl::Shader::gocLightModel(), vl::Shader::gocMaterial(), vl::Shader::gocTextureImageUnit(), vl::Image::height(), vl::IF_RGBA, vl::BufferedStream< Element_Type, Chunk_Size >::inputFile(), vl::IT_UNSIGNED_BYTE, vl::ObjMaterial::ka(), vl::ObjMaterial::kd(), vl::ObjMaterial::ke(), vl::ObjMaterial::ks(), vl::loadImage(), vl::FileSystem::locateFile(), vl::ObjMaterial::map_d(), vl::ObjMaterial::map_Kd(), vl::ObjMaterial::ns(), NULL, vl::Object::objectName(), vl::OM_ReadOnly, vl::VirtualFile::open(), vl::VirtualFile::path(), vl::ObjTexture::path(), vl::Image::pixels(), vl::Texture::prepareTexture2D(), vl::Log::print(), vl::PT_TRIANGLES, vl::TextStream::readLine(), vl::Image::requiredMemory(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::resize(), vl::ResourceDatabase::resources(), vl::AlphaFunc::set(), vl::Material::setAmbient(), vl::Material::setDiffuse(), vl::Actor::setEffect(), vl::Material::setEmission(), vl::TexParameter::setMagFilter(), vl::ObjMesh::setMaterial(), vl::TexParameter::setMinFilter(), vl::Geometry::setNormalArray(), vl::Object::setObjectName(), vl::Material::setShininess(), vl::Material::setSpecular(), vl::Geometry::setTexCoordArray(), vl::TextureImageUnit::setTexture(), vl::LightModel::setTwoSide(), vl::Geometry::setVertexArray(), vl::Effect::shader(), vl::TF_RGBA, vl::String::toStdString(), vl::TPF_LINEAR, vl::TPF_LINEAR_MIPMAP_LINEAR, vl::ObjMaterial::tr(), vl::String::trim(), vl::String::trimStdString(), vl::ObjTexture::valid(), VL_CHECK, VL_TRAP, vl::Log::warning(), and vl::Image::width().
Referenced by vl::loadOBJ().
void ObjLoader::loadObjMaterials | ( | VirtualFile * | file, |
std::vector< ObjMaterial > & | materials | ||
) |
Loads a Wavefront MTL file.
file | The MTL file to be loaded |
materials | Is filled with the loaded materials |
Definition at line 194 of file ioOBJ.cpp.
References vl::Vector3< T_Scalar >::b(), vl::String::empty(), vl::Log::error(), vl::String::field(), vl::Vector3< T_Scalar >::g(), vl::ObjTexture::ObjTexture(), vl::ObjTexture::parseLine(), vl::VirtualFile::path(), vl::Vector3< T_Scalar >::r(), vl::TextStream::readLine(), vl::String::startsWith(), vl::String::toDouble(), vl::String::toFloat(), vl::String::toInt(), vl::String::toStdString(), and vl::String::trim().
|
inline |
|
inline |
Definition at line 354 of file ioOBJ.hpp.
References vl::loadOBJ().
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:52.
© Copyright Michele Bosi. All rights reserved.