/
Ivanoff
/
KMiVVR
Обзор
Документация
Войти
/
Ivanoff
/
KMiVVR
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
3/fMatEditor.cpp
61 строка
2 KB
ivanoff
lab
20 дек 2024, 10:14
20 дек 2024, 10:14
f5dd62a
Код
Авторство
О чём код?
//--------------------------------------------------------------------------- #include <vcl.h> #include <tchar.h> #include <math.h> #include <JPEG.hpp> #pragma hdrstop #include "fMatEditor.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "GLS.Texture" #pragma link "GLS.Cadencer" #pragma link "GLS.Coordinates" #pragma link "GLS.Objects" #pragma link "GLS.SceneViewer" #pragma link "GLS.Material" #pragma resource "*.dfm" TForm1* Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) {} //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- void __fastcall TForm1::FormCreate(TObject *Sender) { SetCurrentDir(ParamStr(0)); } void __fastcall TForm1::GLCadencer1Progress( TObject* Sender, const double deltaTime, const double newTime) { double a = DegToRad(newTime * 60); //GLCube1->Position->SetPoint(1.5 * cos(a), 1.5 * sin(a), 1.5 * sin(a)); GLCube1->PitchAngle = a * 10; a = a + M_PI / 2; //GLSphere1->Position->SetPoint(1.5 * cos(a), 1.5 * sin(a), 1.5 * sin(a)); Earth->PitchAngle = a * 10; } //--------------------------------------------------------------------------- void __fastcall TForm1::miTextureClick(TObject* Sender) { OpenDialog1->InitialDir = ExtractFileDir(Application->ExeName); if (OpenDialog1->Execute()) { GLCube1->Material->Texture->Image->LoadFromFile(OpenDialog1->FileName); } } //--------------------------------------------------------------------------- void __fastcall TForm1::N4Click(TObject* Sender) { if (OpenDialog1->Execute()) { Earth->Material->Texture->Image->LoadFromFile( OpenDialog1->FileName); } } //---------------------------------------------------------------------------