/
stud_22-365
/
GLXEngine
Обзор
Документация
Войти
/
stud_22-365
/
GLXEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/Demos/rendering/invariance/fInvarianceC.cpp
49 строк
2 KB
glscene
Update
18 сен 2024, 19:16
18 сен 2024, 19:16
5c21251
Код
Авторство
О чём код?
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "fInvarianceC.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "GLS.BaseClasses" #pragma link "GLS.Coordinates" #pragma link "GLS.GeomObjects" #pragma link "GLS.Material" #pragma link "GLS.Objects" #pragma link "GLS.Scene" #pragma link "GLS.SceneViewer" #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::FormCreate(TObject *Sender) { TFileName Path = GetCurrentAssetPath(); SetCurrentDir(Path + "\\texture"); GLMaterialLibrary->TexturePaths = GetCurrentDir(); } //--------------------------------------------------------------------------- void __fastcall TForm1::GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y) { if (Shift.Contains(ssLeft)) GLCamera->MoveAroundTarget(my-Y, mx-X); if (Shift.Contains(ssRight)) GLCamera->MoveTargetInEyeSpace((Y-my)*0.05, (mx-X)*0.05, 0); mx = X; my = Y; } //--------------------------------------------------------------------------- void __fastcall TForm1::GLSceneViewer1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { mx = X; my = Y; } //---------------------------------------------------------------------------