GeometryDataLoadStore.hh 2.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/***********************************************************************
 * Copyright 2011-2012 Computer Graphics Group RWTH Aachen University. *
 * All rights reserved.                                                *
 * Distributed under the terms of the MIT License (see LICENSE.TXT).   *
 **********************************************************************/

#ifndef ACGL_OPENGL_DATA_GEOMETRYDATALOADSTORE_HH
#define ACGL_OPENGL_DATA_GEOMETRYDATALOADSTORE_HH

/**
 * Helper function for writing the contents of a TextureData object into a file
 * and loading them from a file.
 */

#include <ACGL/ACGL.hh>
#include <ACGL/OpenGL/Data/GeometryData.hh>

#include <string>

namespace ACGL{
namespace OpenGL{

///////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                               generic load/save
///////////////////////////////////////////////////////////////////////////////////////////////////

27
//! Generic load function that will use one of the loading functions below based on the file ending
28
29
30
31
32
33
SharedGeometryData loadGeometryData(const std::string& _filename);

///////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                           library specific load
///////////////////////////////////////////////////////////////////////////////////////////////////

34
35
36
//! Loads from a Wavefront OBJ file. If _computeNormals and the mesh had no normals stored,
//! face normals are computed from the geometry
SharedGeometryData loadGeometryDataFromOBJ(const std::string& _filename, bool _computeNormals = true);
37

38
39
40
41
//! Loads from a VirtualAachen project (VAP) file. If _computeNormals and the mesh had no normals stored,
//! face normals are computed from the geometry
SharedGeometryData loadGeometryDataFromVAP(const std::string& _filename, bool _computeNormals = true);

42
43
44
45
46
47
48
49
///////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                           library specific save
///////////////////////////////////////////////////////////////////////////////////////////////////

} // OpenGL
} // ACGL

#endif // ACGL_OPENGL_DATA_GEOMETRYDATALOADSTORE_HH