• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision1846 (tree)
Zeit2023-01-26 02:49:02
Autorhgtterry

Log Message

GameDirectorSB 25-01-23 Dimensions

Ändern Zusammenfassung

Diff

--- Anim19_OSDN/SB_Dimensions.cpp (revision 1845)
+++ Anim19_OSDN/SB_Dimensions.cpp (revision 1846)
@@ -108,7 +108,7 @@
108108 style->Colors[ImGuiCol_Button] = ImVec4(0.8f, 0.8f, 0.8f, 1);
109109
110110 //--------------------------------------- Rotation
111- ImGui::SameLine(0.0f);
111+ ImGui::SameLine();
112112
113113 if (Show_Rotation == 1)
114114 {
@@ -129,7 +129,7 @@
129129 style->Colors[ImGuiCol_Button] = ImVec4(0.8f, 0.8f, 0.8f, 1);
130130
131131 //--------------------------------------- Scale
132- ImGui::SameLine(0.0f);
132+ ImGui::SameLine();
133133
134134 if (Show_Scale == 1)
135135 {
@@ -329,7 +329,7 @@
329329 }
330330 }
331331
332- ImGui::SameLine(0.0f, spacingX);
332+ ImGui::SameLine();
333333 if (ImGui::ArrowButton("##rightXX", ImGuiDir_Right))
334334 {
335335 if (App->SBC_Scene->Scene_Loaded == 1)
@@ -389,9 +389,14 @@
389389 Ogre::Vector3 Centre = App->SBC_Object->Get_BoundingBox_World_Centre(Index);
390390
391391 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
392+ UpDate_Physics_And_Visuals(Index);
392393 }
394+ else
395+ {
396+ App->SBC_Visuals->MarkerBB_Addjust(Index);
397+ }
393398
394- UpDate_Physics_And_Visuals(Index);
399+
395400 }
396401
397402 // *************************************************************************
@@ -554,7 +559,7 @@
554559 }
555560 }
556561
557- ImGui::SameLine(0.0f, spacingX);
562+ ImGui::SameLine();
558563 if (ImGui::ArrowButton("##rightSX", ImGuiDir_Right))
559564 {
560565 if (App->SBC_Scene->Scene_Loaded == 1)
@@ -637,10 +642,10 @@
637642 {
638643 App->SBC_Scene->B_Object[Index]->Phys_Body->getCollisionShape()->setLocalScaling(btVector3(Scale.x, Scale.y, Scale.z));
639644 App->SBC_Scene->B_Object[Index]->Physics_Scale = Scale;
640-
645+ UpDate_Physics_And_Visuals(Index);
641646 }
642647
643- UpDate_Physics_And_Visuals(Index);
648+ App->SBC_Visuals->MarkerBB_Addjust(Index);
644649 }
645650
646651 // *************************************************************************
@@ -710,7 +715,7 @@
710715 RotationX_Selected = 0;
711716 RotationY_Selected = 0;
712717 }
713- // ----------------------------------------------------------------------------- Scale
718+ // ----------------------------------------------------------------------------- Rotation
714719
715720 ImGui::Indent();
716721
@@ -742,10 +747,12 @@
742747 float z = App->SBC_Scene->B_Object[Index]->Physics_Quat.z;
743748
744749 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setRotation(btQuaternion(x, y, z, w));
750+
751+ UpDate_Physics_And_Visuals(Index);
745752 }
746-
747- UpDate_Physics_And_Visuals(Index);
748-
753+
754+ App->SBC_Visuals->MarkerBB_Addjust(Index);
755+
749756 }
750757
751758 if (RotationY_Selected == 1)
@@ -765,10 +772,12 @@
765772 float z = App->SBC_Scene->B_Object[Index]->Physics_Quat.z;
766773
767774 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setRotation(btQuaternion(x, y, z, w));
775+
776+ UpDate_Physics_And_Visuals(Index);
768777 }
769-
770- UpDate_Physics_And_Visuals(Index);
771-
778+
779+ App->SBC_Visuals->MarkerBB_Addjust(Index);
780+
772781 }
773782
774783 if (RotationZ_Selected == 1)
@@ -788,16 +797,19 @@
788797 float z = App->SBC_Scene->B_Object[Index]->Physics_Quat.z;
789798
790799 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setRotation(btQuaternion(x, y, z, w));
800+
801+ UpDate_Physics_And_Visuals(Index);
791802 }
803+
804+ App->SBC_Visuals->MarkerBB_Addjust(Index);
805+
792806
793- UpDate_Physics_And_Visuals(Index);
794-
795807 }
796808
797809 }
798810 }
799811
800- ImGui::SameLine(0.0f, spacingX);
812+ ImGui::SameLine();
801813 if (ImGui::ArrowButton("##rightRX", ImGuiDir_Right))
802814 {
803815 if (App->SBC_Scene->Scene_Loaded == 1)
@@ -820,10 +832,12 @@
820832 float z = App->SBC_Scene->B_Object[Index]->Physics_Quat.z;
821833
822834 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setRotation(btQuaternion(x, y, z, w));
835+
836+ UpDate_Physics_And_Visuals(Index);
823837 }
824-
825- UpDate_Physics_And_Visuals(Index);
826-
838+
839+ App->SBC_Visuals->MarkerBB_Addjust(Index);
840+
827841 }
828842
829843 if (RotationY_Selected == 1)
@@ -843,10 +857,13 @@
843857 float z = App->SBC_Scene->B_Object[Index]->Physics_Quat.z;
844858
845859 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setRotation(btQuaternion(x, y, z, w));
860+
861+ UpDate_Physics_And_Visuals(Index);
846862 }
863+
864+ App->SBC_Visuals->MarkerBB_Addjust(Index);
865+
847866
848- UpDate_Physics_And_Visuals(Index);
849-
850867 }
851868
852869 if (RotationZ_Selected == 1)
@@ -866,10 +883,12 @@
866883 float z = App->SBC_Scene->B_Object[Index]->Physics_Quat.z;
867884
868885 App->SBC_Scene->B_Object[Index]->Phys_Body->getWorldTransform().setRotation(btQuaternion(x, y, z, w));
886+
887+ UpDate_Physics_And_Visuals(Index);
869888 }
870-
871- UpDate_Physics_And_Visuals(Index);
872-
889+
890+ App->SBC_Visuals->MarkerBB_Addjust(Index);
891+
873892 }
874893
875894 }
@@ -977,12 +996,17 @@
977996 App->SBC_Scene->B_Area[Index]->Area_Node->setPosition(Pos);
978997 App->SBC_Scene->B_Area[Index]->Mesh_Pos = Pos;
979998
980- Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
981-
982- App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
983-
984- App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
999+ if (App->SBC_Scene->B_Object[Index]->Phys_Body)
1000+ {
1001+ Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1002+ App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1003+ App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1004+ }
1005+
1006+ App->SBC_Visuals->MarkerBB_Addjust(Index);
1007+
9851008 }
1009+
9861010
9871011 if (PosY_Selected == 1)
9881012 {
@@ -990,10 +1014,15 @@
9901014 App->SBC_Scene->B_Area[Index]->Area_Node->setPosition(Pos);
9911015 App->SBC_Scene->B_Area[Index]->Mesh_Pos = Pos;
9921016
993- Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
994-
995- App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
996- App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1017+ if (App->SBC_Scene->B_Object[Index]->Phys_Body)
1018+ {
1019+ Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1020+ App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1021+ App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1022+ }
1023+
1024+ App->SBC_Visuals->MarkerBB_Addjust(Index);
1025+
9971026 }
9981027
9991028 if (PosZ_Selected == 1)
@@ -1002,15 +1031,20 @@
10021031 App->SBC_Scene->B_Area[Index]->Area_Node->setPosition(Pos);
10031032 App->SBC_Scene->B_Area[Index]->Mesh_Pos = Pos;
10041033
1005- Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1006-
1007- App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1008- App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1034+ if (App->SBC_Scene->B_Object[Index]->Phys_Body)
1035+ {
1036+ Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1037+ App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1038+ App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1039+ }
1040+
1041+ App->SBC_Visuals->MarkerBB_Addjust(Index);
1042+
10091043 }
10101044 }
10111045 }
10121046
1013- ImGui::SameLine(0.0f, spacingX);
1047+ ImGui::SameLine();
10141048 if (ImGui::ArrowButton("##rightXX", ImGuiDir_Right))
10151049 {
10161050 if (App->SBC_Scene->Scene_Loaded == 1)
@@ -1021,10 +1055,15 @@
10211055 App->SBC_Scene->B_Area[Index]->Area_Node->setPosition(Pos);
10221056 App->SBC_Scene->B_Area[Index]->Mesh_Pos = Pos;
10231057
1024- Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1025-
1026- App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1027- App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1058+ if (App->SBC_Scene->B_Object[Index]->Phys_Body)
1059+ {
1060+ Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1061+ App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1062+ App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1063+ }
1064+
1065+ App->SBC_Visuals->MarkerBB_Addjust(Index);
1066+
10281067 }
10291068
10301069 if (PosY_Selected == 1)
@@ -1033,10 +1072,15 @@
10331072 App->SBC_Scene->B_Area[Index]->Area_Node->setPosition(Pos);
10341073 App->SBC_Scene->B_Area[Index]->Mesh_Pos = Pos;
10351074
1036- Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1037-
1038- App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1039- App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1075+ if (App->SBC_Scene->B_Object[Index]->Phys_Body)
1076+ {
1077+ Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1078+ App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1079+ App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1080+ }
1081+
1082+ App->SBC_Visuals->MarkerBB_Addjust(Index);
1083+
10401084 }
10411085
10421086 if (PosZ_Selected == 1)
@@ -1045,10 +1089,16 @@
10451089 App->SBC_Scene->B_Area[Index]->Area_Node->setPosition(Pos);
10461090 App->SBC_Scene->B_Area[Index]->Mesh_Pos = Pos;
10471091
1048- Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
10491092
1050- App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1051- App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1093+ if (App->SBC_Scene->B_Object[Index]->Phys_Body)
1094+ {
1095+ Ogre::Vector3 Centre = App->SBC_Com_Area->Get_BoundingBox_World_Centre(Index);
1096+ App->SBC_Scene->B_Area[Index]->Phys_Body->getWorldTransform().setOrigin(btVector3(Centre.x, Centre.y, Centre.z));
1097+ App->SBC_Com_Area->UpDate_Physics_And_Visuals(Index);
1098+ }
1099+
1100+ App->SBC_Visuals->MarkerBB_Addjust(Index);
1101+
10521102 }
10531103 }
10541104 }
@@ -1221,7 +1271,7 @@
12211271 }
12221272 }
12231273
1224- ImGui::SameLine(0.0f, spacingX);
1274+ ImGui::SameLine();
12251275 if (ImGui::ArrowButton("##rightRX", ImGuiDir_Right))
12261276 {
12271277 if (App->SBC_Scene->Scene_Loaded == 1)
@@ -1448,7 +1498,7 @@
14481498 }
14491499 }
14501500
1451- ImGui::SameLine(0.0f, spacingX);
1501+ ImGui::SameLine();
14521502 if (ImGui::ArrowButton("##rightSX", ImGuiDir_Right))
14531503 {
14541504 if (App->SBC_Scene->Scene_Loaded == 1)
Show on old repository browser