• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision1845 (tree)
Zeit2023-01-26 01:41:17
Autorhgtterry

Log Message

GameDirectorSB 25-01-23 Light Entity

Ändern Zusammenfassung

Diff

--- Anim19_OSDN/SB_Com_Lights.cpp (revision 1844)
+++ Anim19_OSDN/SB_Com_Lights.cpp (revision 1845)
@@ -109,8 +109,8 @@
109109 Object->S_Light[0]->light = App->SBC_Ogre->mSceneMgr->createLight(buf);
110110
111111 Object->S_Light[0]->light->setType(Light::LT_SPOTLIGHT);
112- Object->S_Light[0]->light->setDiffuseColour(ColourValue::White);
113- Object->S_Light[0]->light->setSpecularColour(ColourValue::White);
112+ Object->S_Light[0]->light->setDiffuseColour(0, 0, 1.0);
113+ Object->S_Light[0]->light->setSpecularColour(0, 0, 1.0);
114114 Object->S_Light[0]->light->setSpotlightRange(Degree(5), Degree(10));
115115
116116 Ogre::SceneNode* PartNode = App->SBC_Ogre->mSceneMgr->getRootSceneNode()->createChildSceneNode();
@@ -123,12 +123,12 @@
123123
124124 Object->Object_Node = PartNode;
125125
126- //Object->Object_Node->setDirection(0, -1, 0);
126+ //Object->Object_Node->setDirection(-1, 1, -1);
127127 //spotLightNode->setPosition(Vector3(200, 200, 0));
128128
129129 Object->Object_Node->setScale(Object->Mesh_Scale);
130130 Object->Object_Node->setOrientation(Object->Mesh_Quat);
131- Object->Object_Node->setScale(0.02, 0.02, 0.02);
131+ //Object->Object_Node->setScale(0.02, 0.02, 0.02);
132132 }
133133
134134
--- Anim19_OSDN/SB_Properties.cpp (revision 1844)
+++ Anim19_OSDN/SB_Properties.cpp (revision 1845)
@@ -1255,10 +1255,14 @@
12551255
12561256 char chr_PosX[100];
12571257 sprintf(chr_PosX, "%.3f", App->SBC_Scene->B_Object[index]->Mesh_Pos.x);
1258+
12581259 char chr_PosY[100];
12591260 sprintf(chr_PosY, "%.3f", App->SBC_Scene->B_Object[index]->Mesh_Pos.y);
12601261
1261- const int NUM_ITEMS = 5;
1262+ char chr_Outer[100];
1263+ sprintf(chr_Outer, "%.3f", App->SBC_Scene->B_Object[index]->S_Light[0]->light->getSpotlightOuterAngle().valueDegrees());
1264+
1265+ const int NUM_ITEMS = 6;
12621266 const int NUM_COLS = 2;
12631267 string grid[NUM_COLS][NUM_ITEMS]; // string table
12641268 LV_ITEM pitem;
@@ -1270,6 +1274,7 @@
12701274 grid[0][2] = " ", grid[1][2] = " ";
12711275 grid[0][3] = "PosX", grid[1][3] = chr_PosX;
12721276 grid[0][4] = "PosY", grid[1][4] = chr_PosY;
1277+ grid[0][5] = "Outer", grid[1][5] = chr_Outer;
12731278
12741279 ListView_DeleteAllItems(Properties_hLV);
12751280
@@ -1434,7 +1439,28 @@
14341439 Update_ListView_Lights();
14351440 }
14361441
1442+ result = strcmp(btext, "Outer");
1443+ if (result == 0)
1444+ {
14371445
1446+ App->SBC_Gui_Dialogs->Start_Dialog_Float(1, App->SBC_Scene->B_Object[Index]->S_Light[0]->light->getSpotlightOuterAngle().valueDegrees(), "Outer");
1447+
1448+ while (App->SBC_Gui_Dialogs->Show_Dialog_Float == 1)
1449+ {
1450+ App->SBC_Gui_Dialogs->BackGround_Render_Loop();
1451+
1452+ App->SBC_Scene->B_Object[Index]->S_Light[0]->light->setSpotlightRange(Degree(5), Degree(App->SBC_Gui_Dialogs->m_Dialog_Float));
1453+
1454+ //App->SBC_Scene->B_Object[Index]->Mesh_Pos.y = App->SBC_Gui_Dialogs->m_Dialog_Float;
1455+ //App->SBC_Scene->B_Object[Index]->Object_Node->setPosition(App->SBC_Scene->B_Object[Index]->Mesh_Pos);
1456+
1457+ }
1458+
1459+ App->Disable_Panels(false);
1460+
1461+ Update_ListView_Lights();
1462+ }
1463+
14381464 }
14391465
14401466 // *************************************************************************
Show on old repository browser