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();