From 7ae98f1edc518c281507455a221ac4e7dc340383 Mon Sep 17 00:00:00 2001
From: Linoal <1321932+linoal@users.noreply.github.com>
Date: Mon, 21 Oct 2024 15:41:06 +0900
Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E3=81=98=E3=82=B5=E3=83=96=E3=83=A1?=
=?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A5=E3=82=92=E7=B5=90=E5=90=88=E3=81=99?=
=?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=81=A7=E3=80=81=E3=82=B5=E3=83=96?=
=?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=B7=E3=83=A5=E3=81=8C=E6=AC=A0=E3=81=91?=
=?UTF-8?q?=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82=E3=82=8B=E3=81=AE?=
=?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(#259)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 同じサブメッシュを結合する処理で、サブメッシュが欠ける場合があるのを修正
* github actions対応
* 同上
---
.github/actions/upload-dll/action.yml | 6 ++--
.github/actions/upload-mobile-dlls/action.yml | 4 +--
.../upload-dlls-older-visual-studio.yml | 2 +-
.github/workflows/upload-dlls.yml | 4 +--
.idea/vcs.xml | 2 ++
src/polygon_mesh/sub_mesh.cpp | 28 ++-----------------
6 files changed, 12 insertions(+), 34 deletions(-)
diff --git a/.github/actions/upload-dll/action.yml b/.github/actions/upload-dll/action.yml
index c7239ded..aed8d2e6 100644
--- a/.github/actions/upload-dll/action.yml
+++ b/.github/actions/upload-dll/action.yml
@@ -44,7 +44,7 @@ runs:
- name: Upload DLL for Windows
if: runner.os == 'Windows'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: libplateau-windows
path: D:\a\output
@@ -78,14 +78,14 @@ runs:
- name: Upload DLL(so) for Ubuntu
if: runner.os == 'Linux'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: libplateau-${{matrix.os}}
path: ${{env.HOME}}/output/
- name: Upload DLL(dylib) for MacOS
if: runner.os == 'MacOS'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: libplateau-${{matrix.os}}-${{matrix.arch}}
path: ${{env.HOME}}/output/
diff --git a/.github/actions/upload-mobile-dlls/action.yml b/.github/actions/upload-mobile-dlls/action.yml
index 4436b12c..e9d4b53c 100644
--- a/.github/actions/upload-mobile-dlls/action.yml
+++ b/.github/actions/upload-mobile-dlls/action.yml
@@ -93,14 +93,14 @@ runs:
- name: Upload framework for Android
if: runner.os == 'Linux'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: libplateau-android-dll
path: ${{github.workspace}}/out/build/x64-Release/src/libplateau.so
- name: Upload framework for iOS
if: runner.os == 'MacOS'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: libplateau-ios-dll
# path: ${{github.workspace}}/out/build/x64-Release/src/Release-iphoneos/plateau.framework/*
diff --git a/.github/workflows/upload-dlls-older-visual-studio.yml b/.github/workflows/upload-dlls-older-visual-studio.yml
index 94f9c020..edbb7047 100644
--- a/.github/workflows/upload-dlls-older-visual-studio.yml
+++ b/.github/workflows/upload-dlls-older-visual-studio.yml
@@ -108,7 +108,7 @@ jobs:
cp ~/a/libplateau-macos-14-arm64/*.a ~/a/plateau-plugins/static-libs/macos/arm64
- name: upload artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: all-libraries
path: ~/a/plateau-plugins
diff --git a/.github/workflows/upload-dlls.yml b/.github/workflows/upload-dlls.yml
index e5009c41..b0190b43 100644
--- a/.github/workflows/upload-dlls.yml
+++ b/.github/workflows/upload-dlls.yml
@@ -79,7 +79,7 @@ jobs:
steps:
- name: download-all-artifacts
- uses: actions/download-artifact@v2
+ uses: actions/download-artifact@v4
with:
path: ~/a
@@ -112,7 +112,7 @@ jobs:
cp ~/a/libplateau-macos-14-arm64/*.a ~/a/plateau-plugins/static-libs/macos/arm64
- name: upload artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: all-libraries
path: ~/a/plateau-plugins
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 57d9b2b4..be1ca900 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -15,6 +15,8 @@
+
+
diff --git a/src/polygon_mesh/sub_mesh.cpp b/src/polygon_mesh/sub_mesh.cpp
index b650898d..20ec39be 100644
--- a/src/polygon_mesh/sub_mesh.cpp
+++ b/src/polygon_mesh/sub_mesh.cpp
@@ -104,37 +104,13 @@ namespace plateau::polygonMesh {
bool SubMesh::isAppearanceEqual(const plateau::polygonMesh::SubMesh& other) const {
- // 留意: ここを編集するときは、SubMeshCompareByAppearance::operator() も対応するように編集してください。
- if(getGameMaterialID() != other.getGameMaterialID()) return false;
-
- // ゲームマテリアルIDがセットされているなら、他のすべてに優先してこれだけで比較します。
- if(getGameMaterialID() >= 0){
- return true;
- }
-
-
- if(getTexturePath() != other.getTexturePath()) return false;
- const auto mat_s = getMaterial();
- const auto mat_o = other.getMaterial();
- if(mat_s.get() == mat_o.get()) return true;
- if(!mat_s && mat_o) return false;
- if(mat_s && !mat_o) return false;
- if(mat_s->getDiffuse() != mat_o->getDiffuse()) return false;
- if(mat_s->getEmissive() != mat_o->getEmissive()) return false;
- if(mat_s->getSpecular() != mat_o->getSpecular()) return false;
- if(mat_s->getAmbientIntensity() != mat_o->getAmbientIntensity()) return false;
- if(mat_s->getShininess() != mat_o->getShininess()) return false;
- if(mat_s->getTransparency() != mat_o->getTransparency()) return false;
- if(mat_s->isSmooth() != mat_o->isSmooth()) return false;
- return true;
+ SubMeshCompareByAppearance comp;
+ return comp(*this, other) == false && comp(other, *this) == false;
}
bool SubMeshCompareByAppearance::operator()(const plateau::polygonMesh::SubMesh& lhs,
const plateau::polygonMesh::SubMesh& rhs) const {
- // 留意: ここを編集するときは、SubMesh::isAppearanceEqual も対応するように編集してください。
- // lhsがrhsよりも小さい場合にtrueを返します。等しい場合はfalseです。
-
// gameMaterialの比較
if(lhs.getGameMaterialID() != rhs.getGameMaterialID()) return lhs.getGameMaterialID() < rhs.getGameMaterialID();