Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -10,40 +10,40 @@
#include <vector>
#include <map>
namespace tinyobj {
namespace tinyobj
{
typedef struct
{
std::string name;
std::string name;
float ambient[3];
float diffuse[3];
float specular[3];
float transmittance[3];
float emission[3];
float shininess;
float ambient[3];
float diffuse[3];
float specular[3];
float transmittance[3];
float emission[3];
float shininess;
float transparency;
std::string ambient_texname;
std::string diffuse_texname;
std::string specular_texname;
std::string normal_texname;
std::map<std::string, std::string> unknown_parameter;
std::string ambient_texname;
std::string diffuse_texname;
std::string specular_texname;
std::string normal_texname;
std::map<std::string, std::string> unknown_parameter;
} material_t;
typedef struct
{
std::vector<float> positions;
std::vector<float> normals;
std::vector<float> texcoords;
std::vector<unsigned int> indices;
std::vector<float> positions;
std::vector<float> normals;
std::vector<float> texcoords;
std::vector<unsigned int> indices;
} mesh_t;
typedef struct
{
std::string name;
material_t material;
mesh_t mesh;
std::string name;
material_t material;
mesh_t mesh;
} shape_t;
/// Loads .obj from a file.
@@ -52,10 +52,10 @@ typedef struct
/// Returns empty string when loading .obj success.
/// 'mtl_basepath' is optional, and used for base path for .mtl file.
std::string LoadObj(
std::vector<shape_t>& shapes, // [output]
const char* filename,
const char* mtl_basepath = NULL);
std::vector<shape_t>& shapes, // [output]
const char* filename,
const char* mtl_basepath = NULL);
};
}; // namespace tinyobj
#endif // _TINY_OBJ_LOADER_H