/* * Part of LaGUI demonstration programs * Copyright (C) 2022-2023 Wu Yiming * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "la_5.h" extern LA MAIN; void DataPanel(laUiList *uil, laPropPack *This, laPropPack *DetachedProps, laColumn *UNUSED, int context){ laColumn* c=laFirstColumn(uil); laShowItem(uil,c,0,"la.differences"); laShowItem(uil,c,0,"tns.world"); laShowItem(uil,c,0,"la"); } int RegisterEverything(){ laRegisterUiTemplate("panel_data", "Data", DataPanel, 0, 0,0, 0,0,20); tnsObject* s=tnsCreateRootObject("My Root"); tnsObject* o=tnsCreateLight(s,"Sun",10,10,10,1,1); tnsVector3d target={0,0,0}, up={0,0,1}; tnsLookAt(o,target,up); tnsObject* mo=tnsCreateMeshPlane(s,"Plane", 0,0,0, 1); //tnsMeshEnterEditMode(mo); //tnsMeshLeaveEditMode(mo); //tnsCreateMeshPlane(s,"Plane", 0,0,10, 10); s=tnsCreateRootObject("My Root 0"); mo=tnsCreateMeshPlane(s,"Plane", 0,0,0, 1); } int main(int argc, char *argv[]){ laInitArguments ia={0}; laSetCompleteInitArguments(&ia); laProcessInitArguments(argc,argv,&ia); laGetReadyWith(&ia); RegisterEverything(); laRefreshUDFRegistries(); // Use this to save and load preference when exit and during start up // laEnsureUserPreferences(); laSaveProp("tns.world"); laAddRootDBInst("tns"); laWindow* w = laDesignWindow(-1,-1,800,600); laLayout* l = laDesignLayout(w, "Scene"); laBlock* b = l->FirstBlock; laSplitBlockHorizon(b,0.7); laCreatePanel(b->B2, "panel_data"); laCreatePanel(b->B2, "LAUI_animation_actions"); laSplitBlockVertical(b->B1,0.6); laCreatePanel(b->B1->B1, "LAUI_scene"); laCreatePanel(b->B1->B2, "LAUI_animation_action_channels"); laStartWindow(w); laMainLoop(); return 0; }