/****************************************************************************
This file is part of GLC-Player.
Copyright (C) 2007-2008 Laurent Ribon (laumaya@users.sourceforge.net)
Version 2.2.0, packaged on July 2010.
http://www.glc-player.net
GLC-Player 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 2 of the License, or
(at your option) any later version.
GLC-Player 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 GLC-Player; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*****************************************************************************/
#include "glc_player.h"
#include "ui_class/SettingsDialog.h"
#include "ui_class/AboutPlayer.h"
#include "AlbumFile.h"
#include "ui_class/EditCamera.h"
#include "ui_class/SelectionProperty.h"
#include "ui_class/EditLightDialog.h"
#include "ui_class/AlbumManagerView.h"
#include "ui_class/ModelManagerView.h"
#include "ui_class/InstanceProperty.h"
#include "UserInterfaceSate.h"
#include "ui_class/MaterialProperty.h"
#include "ui_class/ChooseShaderDialog.h"
#include "ui_class/ListOfMaterial.h"
#include "ui_class/OpenAlbumOption.h"
#include "ui_class/SendFilesDialog.h"
#include "ui_class/ScreenshotDialog.h"
#include "ui_class/MultiScreenshotsDialog.h"
#include "ui_class/ExportWebDialog.h"
#include "ui_class/LeftSideDock.h"
#include "ui_class/ExportProgressDialog.h"
#include <GLC_Exception>
#include <GLC_State>
#include <GLC_Plane>
#include <GLC_OctreeNode>
#include <GLC_Mesh>
#include <SaveFileThread.h>
glc_player::glc_player(QWidget *parent)
: QMainWindow(parent)
, m_OpenglView(this)
, m_CurrentPath(QDir::homePath())
, m_CurrentAlbumPath(QDir::homePath())
, m_pProgressBar(new QProgressBar())
, m_pQErrorMessage(NULL)
, m_RecentFilesList()
, m_RecentAlbumsList()
, m_CurrentFileName()
, m_CurrentAlbumName()
, m_OpenFileThread(GLC_Factory::instance(m_OpenglView.context()))
, m_FileEntryHash()
, m_modelName()
, m_FileLoadingInProgress(false)
, m_ListLoadingInProgress(false)
, m_ContinuListLoading(true)
, m_MakeFirstFileCurrent(true)
, m_pCurrentSelections(NULL)
, m_dislayInfoPanel()
, m_pSelectionProperty(NULL)
, m_pEditLightDialog(NULL)
, m_QuitConfirmation()
, m_pLeftSideDock(NULL)
, m_pAlbumManagerView(NULL)
, m_pModelManagerView(NULL)
, m_pInstanceProperty(NULL)
, m_pInstancePropertyVis(NULL)
, m_pMaterialProperty(NULL)
, m_pChooseShaderDialog(NULL)
, m_pListOfMaterial(NULL)
, m_pOpenAlbumOption(NULL)
, m_pSendFilesDialog(NULL)
, m_pScreenshotDialog(NULL)
, m_pMultiScreenshotsDialog(NULL)
, m_pExportWebDialog(NULL)
, m_UseSelectionShader(true)
, m_UseVbo(-1)
, m_UseShader(-1)
, m_DefaultLodValue(10)
, m_UsePixelCulling(true)
, m_PixelCullingSize(6)
, m_UseFrustumCulling(true)
, m_UseSpacePartion(true)
, m_UseOctreeBoundingBox(false)
, m_OctreeDepth(3)
, m_ClipBoard(0, NULL)
{
ui.setupUi(this);
//setUnifiedTitleAndToolBarOnMac(true);
setCentralWidget(&m_OpenglView);
m_OpenglView.setFocusPolicy(Qt::StrongFocus);
// Album management dock area
m_pAlbumManagerView= new AlbumManagerView(&m_OpenglView, &m_FileEntryHash, ui.albumManagementWindow);
m_pModelManagerView= new ModelManagerView(&m_OpenglView, ui.action_Property, ui.actionHide_unselected, ui.actionCopy, ui.actionPaste, &m_ClipBoard, ui.albumManagementWindow);
connect(m_pModelManagerView, SIGNAL(currentModelProperties()), m_pAlbumManagerView, SLOT(modelProperties()));
// LeftSideDock
m_pLeftSideDock= new LeftSideDock(m_pAlbumManagerView, m_pModelManagerView, &m_FileEntryHash, ui.albumManagementWindow);
ui.albumManagementWindow->setWidget(m_pLeftSideDock);
readSettings();
GLC_3DViewInstance::setGlobalDefaultLod(m_DefaultLodValue);
createRecentFileActionsArray();
updateRecentsFiles();
createRecentAlbumActionsArray();
updateRecentsAlbums();
// Default lighting
m_OpenglView.getLight()->setTwoSided(ui.actionTwo_sided_Lightning->isChecked());
// Display info panel
m_OpenglView.setDisplayInfoPanel(m_dislayInfoPanel);
// Resize Texture cache limite to 128 Mo
QGLContext::setTextureCacheLimit(256 * 1024);
// Accept drop event
m_OpenglView.setAcceptDrops(false);
setAcceptDrops(true);
// Set the current file name
addToRecentFiles(m_CurrentFileName);
// Status bar
ui.statusbar->addPermanentWidget(m_pProgressBar);
m_pProgressBar->hide();
connect(&m_OpenglView, SIGNAL(currentQuantum(int)), this, SLOT(updateProgressBar(int)), Qt::QueuedConnection);
// QAction Signals and slots connection
// Signals from the view
connect(&m_OpenglView, SIGNAL(updateSelection(PointerViewInstanceHash*)), this, SLOT(updateSelection(PointerViewInstanceHash*)));
connect(&m_OpenglView, SIGNAL(unselectAll()), this, SLOT(unselectAll()));
connect(&m_OpenglView, SIGNAL(hideInfoPanel()), this, SLOT(hideInfoPanel()));
connect(&m_OpenglView, SIGNAL(glInitialed()), this, SLOT(glInitialed()));
//Menu File
connect(ui.actionNew_Model, SIGNAL(triggered()), this , SLOT(newModel()));
connect(ui.action_NewAlbum, SIGNAL(triggered()), this , SLOT(newAlbum()));
connect(ui.action_OpenAlbum, SIGNAL(triggered()), this , SLOT(openAlbum()));
connect(ui.action_SaveAlbum, SIGNAL(triggered()), this , SLOT(saveAlbum()));
connect(ui.action_SaveAlbumAs, SIGNAL(triggered()), this , SLOT(saveAlbumAs()));
connect(ui.action_Open, SIGNAL(triggered()), this, SLOT(open()));
connect(ui.action_Quit, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
connect(ui.actionExport_To_Folder, SIGNAL(triggered()), this, SLOT(sendToFolder()));
connect(ui.actionExport_to_web, SIGNAL(triggered()), this, SLOT(exportToWeb()));
connect(ui.actionExport_current_Model, SIGNAL(triggered()), this, SLOT(exportCurrentModel()));
// Menu edit
connect(ui.actionSelectAll, SIGNAL(triggered()), &m_OpenglView, SLOT(selectAll()));
connect(ui.actionUnselectAll, SIGNAL(triggered()), &m_OpenglView, SLOT(unselectAllSlot()));
connect(ui.action_Property, SIGNAL(triggered()), this, SLOT(instanceProperty()));
connect(ui.actionAssign_Shader, SIGNAL(triggered()), this, SLOT(assignShader()));
//Menu Window
connect(ui.action_AlbumManagement, SIGNAL(triggered()), this, SLOT(albumManagementVisibilityToggle()));
connect(ui.albumManagementWindow, SIGNAL(visibilityChanged(bool)), this, SLOT(albumManagementVisibilityChanged(bool)));
connect(ui.action_CameraProperty, SIGNAL(triggered()), this, SLOT(cameraPropertyVisibilityToggle()));
connect(ui.cameraProperties, SIGNAL(visibilityChanged(bool)), this, SLOT(cameraPropertyVisibilityChanged(bool)));
connect(ui.action_SelectionProperty, SIGNAL(triggered()), this, SLOT(selectionPropertyVisibilityToggle()));
connect(ui.selectionDockWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(selectionPropertyVisibilityChanged(bool)));
//Menu View
connect(ui.actionChange_UP_Vector, SIGNAL(triggered()), &m_OpenglView, SLOT(changeDefaultUp()));
connect(ui.action_Reframe, SIGNAL(triggered()), this, SLOT(reframe()));
connect(ui.actionReframeOnSelection, SIGNAL(triggered()), &m_OpenglView, SLOT(reframeOnSelection()));
QActionGroup* pGroup= new QActionGroup(this);
pGroup->addAction(ui.actionTrackball);
pGroup->addAction(ui.actionTurnTable);
pGroup->addAction(ui.actionFly);
ui.actionTrackball->setChecked(true);
connect(ui.actionTrackball, SIGNAL(triggered()), this, SLOT(changeCurrentMoverToTrackBall()));
connect(ui.actionTurnTable, SIGNAL(triggered()), this, SLOT(changeCurrentMoverToTurnTable()));
connect(ui.actionFly, SIGNAL(triggered()), this, SLOT(changeCurrentMoverToFly()));
pGroup= new QActionGroup(this);
pGroup->addAction(ui.actionPerspective);
pGroup->addAction(ui.actionParallel);
ui.actionPerspective->se
没有合适的资源?快使用搜索试试~ 我知道了~
GLC_Player_src_2.2.0.zip_GLC Player linux_GLC_Playe_GLC_Player _
共191个文件
png:83个
cpp:33个
h:32个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 196 浏览量
2022-09-24
02:43:17
上传
评论
收藏 1.03MB ZIP 举报
温馨提示
嵌入式下的3D播放器支持多种多样的3d文件播放
资源推荐
资源详情
资源评论
收起资源包目录
GLC_Player_src_2.2.0.zip_GLC Player linux_GLC_Playe_GLC_Player _ (191个子文件)
glc_player.cpp 85KB
OpenglView.cpp 37KB
AlbumFile.cpp 26KB
ExportToWeb.cpp 25KB
ModelStructure.cpp 21KB
SendFilesDialog.cpp 20KB
MultiScreenshotsDialog.cpp 19KB
AlbumManagerView.cpp 19KB
ExportWebDialog.cpp 16KB
SettingsDialog.cpp 15KB
ScreenshotDialog.cpp 12KB
FileEntry.cpp 11KB
MaterialProperty.cpp 11KB
ListOfMaterial.cpp 9KB
EditLightDialog.cpp 6KB
MultiShotsOpenglView.cpp 6KB
ModelProperties.cpp 5KB
EditCamera.cpp 4KB
ModelManagerView.cpp 4KB
InstanceProperty.cpp 4KB
MaterialOpenglView.cpp 3KB
SelectionProperty.cpp 3KB
ChooseShaderDialog.cpp 3KB
EditPositionDialog.cpp 3KB
main.cpp 3KB
LeftSideDock.cpp 3KB
OpenFileThread.cpp 3KB
OpenAlbumOption.cpp 2KB
ExportProgressDialog.cpp 2KB
SaveFileThread.cpp 2KB
FileOpenFilter.cpp 2KB
UserInterfaceSate.cpp 1KB
AboutPlayer.cpp 1KB
goochShading.frag 794B
toon.frag 757B
minnaert.frag 577B
select.frag 355B
glc_player.h 11KB
OpenglView.h 10KB
FileEntry.h 8KB
AlbumManagerView.h 7KB
ModelStructure.h 6KB
ExportToWeb.h 5KB
AlbumFile.h 4KB
MultiScreenshotsDialog.h 4KB
SettingsDialog.h 4KB
ScreenshotDialog.h 4KB
ExportWebDialog.h 4KB
InstanceProperty.h 3KB
ModelManagerView.h 3KB
MaterialProperty.h 3KB
MultiShotsOpenglView.h 3KB
SendFilesDialog.h 3KB
EditLightDialog.h 3KB
ListOfMaterial.h 3KB
UserInterfaceSate.h 3KB
LeftSideDock.h 3KB
SelectionProperty.h 3KB
ChooseShaderDialog.h 2KB
MaterialOpenglView.h 2KB
EditCamera.h 2KB
ModelProperties.h 2KB
OpenFileThread.h 2KB
OpenAlbumOption.h 2KB
SaveFileThread.h 2KB
EditPositionDialog.h 2KB
ExportProgressDialog.h 2KB
FileOpenFilter.h 2KB
AboutPlayer.h 1KB
Logo.icns 195KB
glc_player.ico 132KB
Info.plist 3KB
Info_mac.plist 3KB
default_background.png 106KB
NoShow_background.png 88KB
Splash.png 77KB
SnapShoot.png 12KB
LogoError80x80.png 8KB
Logo80x80.png 7KB
LogoError70x70.png 7KB
Logo70x70.png 6KB
LogoError60x60.png 5KB
Wire.png 5KB
GlSetting.png 5KB
Orbit.png 5KB
ModelProperties.png 5KB
Center.png 5KB
Globe.png 5KB
Refresh.png 5KB
OpenAlbum.png 5KB
InstanceProperties.png 5KB
Zoom.png 5KB
FitSelected.png 5KB
GLC_logo_blanc.png 5KB
Logo60x60.png 5KB
FullScreen.png 5KB
SaveAs.png 5KB
Points.png 5KB
Save.png 4KB
Shading.png 4KB
共 191 条
- 1
- 2
资源评论
- 万仞桂瑶2023-08-24总算找到了想要的资源,搞定遇到的大问题,赞赞赞!
四散
- 粉丝: 49
- 资源: 1万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功