mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-03 17:51:54 +00:00
Reformat code with clang format
This commit is contained in:
@ -7,8 +7,8 @@
|
||||
bool operator==(const ObjVertex& lhs, const ObjVertex& rhs)
|
||||
{
|
||||
return std::fabs(lhs.coordinates[0] - rhs.coordinates[0]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.coordinates[1] - rhs.coordinates[1]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.coordinates[2] - rhs.coordinates[2]) < std::numeric_limits<float>::epsilon();
|
||||
&& std::fabs(lhs.coordinates[1] - rhs.coordinates[1]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.coordinates[2] - rhs.coordinates[2]) < std::numeric_limits<float>::epsilon();
|
||||
}
|
||||
|
||||
bool operator!=(const ObjVertex& lhs, const ObjVertex& rhs)
|
||||
@ -24,8 +24,8 @@ bool operator<(const ObjVertex& lhs, const ObjVertex& rhs)
|
||||
bool operator==(const ObjNormal& lhs, const ObjNormal& rhs)
|
||||
{
|
||||
return std::fabs(lhs.normal[0] - rhs.normal[0]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.normal[1] - rhs.normal[1]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.normal[2] - rhs.normal[2]) < std::numeric_limits<float>::epsilon();
|
||||
&& std::fabs(lhs.normal[1] - rhs.normal[1]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.normal[2] - rhs.normal[2]) < std::numeric_limits<float>::epsilon();
|
||||
}
|
||||
|
||||
bool operator!=(const ObjNormal& lhs, const ObjNormal& rhs)
|
||||
@ -40,8 +40,7 @@ bool operator<(const ObjNormal& lhs, const ObjNormal& rhs)
|
||||
|
||||
bool operator==(const ObjUv& lhs, const ObjUv& rhs)
|
||||
{
|
||||
return std::fabs(lhs.uv[0] - rhs.uv[0]) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.uv[1] - rhs.uv[1]) < std::numeric_limits<float>::epsilon();
|
||||
return std::fabs(lhs.uv[0] - rhs.uv[0]) < std::numeric_limits<float>::epsilon() && std::fabs(lhs.uv[1] - rhs.uv[1]) < std::numeric_limits<float>::epsilon();
|
||||
}
|
||||
|
||||
bool operator!=(const ObjUv& lhs, const ObjUv& rhs)
|
||||
|
@ -48,4 +48,4 @@ struct MtlMaterial
|
||||
std::string colorMapName;
|
||||
std::string normalMapName;
|
||||
std::string specularMapName;
|
||||
};
|
||||
};
|
||||
|
@ -50,8 +50,8 @@ void XModelMaterial::ApplyDefaults()
|
||||
bool operator==(const VertexMergerPos& lhs, const VertexMergerPos& rhs)
|
||||
{
|
||||
const auto coordinatesMatch = std::fabs(lhs.x - rhs.x) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.y - rhs.y) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.z - rhs.z) < std::numeric_limits<float>::epsilon();
|
||||
&& std::fabs(lhs.y - rhs.y) < std::numeric_limits<float>::epsilon()
|
||||
&& std::fabs(lhs.z - rhs.z) < std::numeric_limits<float>::epsilon();
|
||||
|
||||
if (!coordinatesMatch || lhs.weightCount != rhs.weightCount)
|
||||
return false;
|
||||
|
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "Utils/DistinctMapper.h"
|
||||
#include "Math/Quaternion.h"
|
||||
#include "Utils/DistinctMapper.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
struct XModelObject
|
||||
{
|
||||
@ -64,22 +64,28 @@ struct XModelMaterial
|
||||
float ambientColor[4];
|
||||
float incandescence[4];
|
||||
float coeffs[2];
|
||||
struct {
|
||||
|
||||
struct
|
||||
{
|
||||
float x;
|
||||
int y;
|
||||
} glow;
|
||||
|
||||
struct
|
||||
{
|
||||
int x;
|
||||
float y;
|
||||
} refractive;
|
||||
|
||||
float specularColor[4];
|
||||
float reflectiveColor[4];
|
||||
|
||||
struct
|
||||
{
|
||||
int x;
|
||||
float y;
|
||||
} reflective;
|
||||
|
||||
float blinn[2];
|
||||
float phong;
|
||||
std::string colorMapName;
|
||||
@ -100,4 +106,4 @@ struct VertexMergerPos
|
||||
friend bool operator<(const VertexMergerPos& lhs, const VertexMergerPos& rhs);
|
||||
};
|
||||
|
||||
typedef DistinctMapper<VertexMergerPos> VertexMerger;
|
||||
typedef DistinctMapper<VertexMergerPos> VertexMerger;
|
||||
|
Reference in New Issue
Block a user