Visualization Library 2.0.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::ObjMesh Class Reference

Represents a Wavefront OBJ mesh. See also ObjLoader. More...

#include <ioOBJ.hpp>

+ Inheritance diagram for vl::ObjMesh:

Public Member Functions

void setMaterial (ObjMaterial *mat)
 The material associated to this mesh. More...
 
const ObjMaterialmaterial () const
 The material associated to this mesh. More...
 
const std::vector< int > & facePositionIndex () const
 Index into ObjLoader::vertexArray() vector. More...
 
const std::vector< int > & faceNormalIndex () const
 Index into ObjLoader::normalArray() vector. More...
 
const std::vector< int > & faceTexCoordIndex () const
 Index into ObjLoader::texCoordsArray() vector. More...
 
const std::vector< int > & face_type () const
 Each entry represents a face, the number represents how many vertices the face has. More...
 
ObjMaterialmaterial ()
 The material associated to this mesh. More...
 
std::vector< int > & facePositionIndex ()
 Index into ObjLoader::vertexArray() vector. More...
 
std::vector< int > & faceNormalIndex ()
 Index into ObjLoader::normalArray() vector. More...
 
std::vector< int > & faceTexCoordIndex ()
 Index into ObjLoader::texCoordsArray() vector. More...
 
std::vector< int > & face_type ()
 Each entry represents a face, the number represents how many vertices the face has. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

ref< ObjMaterialmMaterial
 
std::vector< int > mFace_icoords
 
std::vector< int > mFace_inormals
 
std::vector< int > mFace_itexcoords
 
std::vector< int > mFace_type
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

Represents a Wavefront OBJ mesh. See also ObjLoader.

Definition at line 298 of file ioOBJ.hpp.

Member Function Documentation

◆ face_type() [1/2]

const std::vector<int>& vl::ObjMesh::face_type ( ) const
inline

Each entry represents a face, the number represents how many vertices the face has.

The for each vertex of each face there is an index in facePositionIndex(), faceNormalIndex(), faceTexCoordIndex()

Definition at line 316 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ face_type() [2/2]

std::vector<int>& vl::ObjMesh::face_type ( )
inline

Each entry represents a face, the number represents how many vertices the face has.

The for each vertex of each face there is an index in facePositionIndex(), faceNormalIndex(), faceTexCoordIndex()

Definition at line 328 of file ioOBJ.hpp.

◆ faceNormalIndex() [1/2]

const std::vector<int>& vl::ObjMesh::faceNormalIndex ( ) const
inline

Index into ObjLoader::normalArray() vector.

Definition at line 311 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ faceNormalIndex() [2/2]

std::vector<int>& vl::ObjMesh::faceNormalIndex ( )
inline

Index into ObjLoader::normalArray() vector.

Definition at line 323 of file ioOBJ.hpp.

◆ facePositionIndex() [1/2]

const std::vector<int>& vl::ObjMesh::facePositionIndex ( ) const
inline

Index into ObjLoader::vertexArray() vector.

Definition at line 309 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ facePositionIndex() [2/2]

std::vector<int>& vl::ObjMesh::facePositionIndex ( )
inline

Index into ObjLoader::vertexArray() vector.

Definition at line 321 of file ioOBJ.hpp.

◆ faceTexCoordIndex() [1/2]

const std::vector<int>& vl::ObjMesh::faceTexCoordIndex ( ) const
inline

Index into ObjLoader::texCoordsArray() vector.

Definition at line 313 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ faceTexCoordIndex() [2/2]

std::vector<int>& vl::ObjMesh::faceTexCoordIndex ( )
inline

Index into ObjLoader::texCoordsArray() vector.

Definition at line 325 of file ioOBJ.hpp.

◆ material() [1/2]

const ObjMaterial* vl::ObjMesh::material ( ) const
inline

The material associated to this mesh.

Definition at line 307 of file ioOBJ.hpp.

◆ material() [2/2]

ObjMaterial* vl::ObjMesh::material ( )
inline

The material associated to this mesh.

Definition at line 319 of file ioOBJ.hpp.

◆ setMaterial()

void vl::ObjMesh::setMaterial ( ObjMaterial mat)
inline

The material associated to this mesh.

Definition at line 304 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

Member Data Documentation

◆ mFace_icoords

std::vector<int> vl::ObjMesh::mFace_icoords
protected

Definition at line 332 of file ioOBJ.hpp.

◆ mFace_inormals

std::vector<int> vl::ObjMesh::mFace_inormals
protected

Definition at line 333 of file ioOBJ.hpp.

◆ mFace_itexcoords

std::vector<int> vl::ObjMesh::mFace_itexcoords
protected

Definition at line 334 of file ioOBJ.hpp.

◆ mFace_type

std::vector<int> vl::ObjMesh::mFace_type
protected

Definition at line 335 of file ioOBJ.hpp.

◆ mMaterial

ref<ObjMaterial> vl::ObjMesh::mMaterial
protected

Definition at line 331 of file ioOBJ.hpp.


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