Apply clang-format
parent
bbcefbd034
commit
52008ec989
|
@ -42,23 +42,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF2_IMPORTER)
|
||||
|
||||
#include "AssetLib/glTF2/glTF2Importer.h"
|
||||
#include "PostProcessing/MakeVerboseFormat.h"
|
||||
#include "AssetLib/glTF2/glTF2Asset.h"
|
||||
#include "PostProcessing/MakeVerboseFormat.h"
|
||||
|
||||
#if !defined(ASSIMP_BUILD_NO_EXPORT)
|
||||
#include "AssetLib/glTF2/glTF2AssetWriter.h"
|
||||
#endif
|
||||
|
||||
#include <assimp/CreateAnimMesh.h>
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
#include <assimp/StringComparison.h>
|
||||
#include <assimp/StringUtils.h>
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/commonMetaData.h>
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
@ -186,7 +186,8 @@ static void SetMaterialTextureProperty(std::vector<int> &embeddedTexIdxs, Asset
|
|||
const ai_real rcos(cos(-transform.mRotation));
|
||||
const ai_real rsin(sin(-transform.mRotation));
|
||||
transform.mTranslation.x = (static_cast<ai_real>(0.5) * transform.mScaling.x) * (-rcos + rsin + 1) + prop.TextureTransformExt_t.offset[0];
|
||||
transform.mTranslation.y = ((static_cast<ai_real>( 0.5 ) * transform.mScaling.y) * (rsin + rcos - 1)) + 1 - transform.mScaling.y - prop.TextureTransformExt_t.offset[1];;
|
||||
transform.mTranslation.y = ((static_cast<ai_real>(0.5) * transform.mScaling.y) * (rsin + rcos - 1)) + 1 - transform.mScaling.y - prop.TextureTransformExt_t.offset[1];
|
||||
;
|
||||
|
||||
mat->AddProperty(&transform, 1, _AI_MATKEY_UVTRANSFORM_BASE, texType, texSlot);
|
||||
}
|
||||
|
@ -305,7 +306,6 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
|
|||
|
||||
aimat->AddProperty(&shadingMode, 1, AI_MATKEY_SHADING_MODEL);
|
||||
|
||||
|
||||
// KHR_materials_sheen
|
||||
if (mat.materialSheen.isPresent) {
|
||||
MaterialSheen &sheen = mat.materialSheen.value;
|
||||
|
@ -436,8 +436,7 @@ aiColor4D* GetVertexColorsForType(Ref<Accessor> input) {
|
|||
for (size_t i = 0; i < input->count; i++) {
|
||||
output[i] = aiColor4D(
|
||||
colors[i].r / max, colors[i].g / max,
|
||||
colors[i].b / max, colors[i].a / max
|
||||
);
|
||||
colors[i].b / max, colors[i].a / max);
|
||||
}
|
||||
delete[] colors;
|
||||
return output;
|
||||
|
@ -1068,8 +1067,7 @@ aiNode *ImportNode(aiScene *pScene, glTF2::Asset &r, std::vector<unsigned int> &
|
|||
|
||||
if (!node.meshes.empty()) {
|
||||
// GLTF files contain at most 1 mesh per node.
|
||||
if (node.meshes.size() > 1)
|
||||
{
|
||||
if (node.meshes.size() > 1) {
|
||||
throw DeadlyImportError("GLTF: Invalid input, found ", node.meshes.size(),
|
||||
" meshes in ", getContextForErrorMessages(node.id, node.name),
|
||||
", but only 1 mesh per node allowed.");
|
||||
|
|
Loading…
Reference in New Issue