Skip to content

Commit ff1ecbf

Browse files
committed
コメント追記
1 parent 4063b03 commit ff1ecbf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/mesh_writer/fbx_writer.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ namespace plateau::meshWriter {
5252
case geometry::CoordinateSystem::ENU:
5353
axis_system = FbxAxisSystem(
5454
FbxAxisSystem::EUpVector::eZAxis,
55-
FbxAxisSystem::EFrontVector::eParityOdd,
56-
FbxAxisSystem::eRightHanded);
55+
FbxAxisSystem::EFrontVector::eParityOdd, // X,Y,ZからUp軸を除いて、残った2軸のうち前者ならParityEven, 後者ならParityOdd
56+
FbxAxisSystem::eRightHanded); // フレミングの法則の要領で中指を折ったとき、親指がX、人差し指がY、中指がZ。左右どちらの手に合うか。
5757
break;
5858
case geometry::CoordinateSystem::ESU:
5959
axis_system = FbxAxisSystem(
@@ -74,6 +74,11 @@ namespace plateau::meshWriter {
7474
FbxAxisSystem::eLeftHanded);
7575
break;
7676
}
77+
// 座標軸の向きをFBXファイルに書き込みます。
78+
// これを確認するには、FBXをASCIIフォーマットで出力してテキストエディタで開き、
79+
// GlobalSettingsのPropertiesのAxis系プロパティを確認します。
80+
// これにより、どの座標軸で書き出したとしてもアプリケーションにFBXをインポートするときに向き補正が働き、
81+
// 同じ向きに読み込めるはずです(非推奨の左手座標系は除く)。
7782
fbx_scene->GetGlobalSettings().SetAxisSystem(axis_system);
7883

7984
// create scene info

0 commit comments

Comments
 (0)