forked from ImJsaw/Mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8608dfe
Showing
507 changed files
with
236,576 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/.vs | ||
*.exe | ||
*.metagen | ||
*.pdb | ||
*.obj | ||
/OpenMesh_EX/Debug |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
include (ACGCommon) | ||
|
||
if ( NOT DEFINED BUILD_APPS ) | ||
set( BUILD_APPS true CACHE BOOL "Enable or disable building of apps" ) | ||
endif() | ||
|
||
if ( BUILD_APPS ) | ||
|
||
# Only build and fixbundle apps, when we are building OpenMesh standalone | ||
if(${PROJECT_NAME} MATCHES "OpenMesh") | ||
|
||
if ( WIN32 AND OPENMESH_BUILD_SHARED ) | ||
add_definitions(-DOPENMESHDLL ) | ||
endif() | ||
|
||
add_subdirectory (Dualizer) | ||
add_subdirectory (Decimating/commandlineDecimater) | ||
add_subdirectory (Smoothing) | ||
add_subdirectory (Subdivider/commandlineSubdivider) | ||
add_subdirectory (Subdivider/commandlineAdaptiveSubdivider) | ||
add_subdirectory (mconvert) | ||
add_subdirectory (VDProgMesh/mkbalancedpm) | ||
add_subdirectory (VDProgMesh/Analyzer) | ||
|
||
# Add non ui apps as dependency before fixbundle | ||
if ( WIN32 ) | ||
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" ) | ||
# let bundle generation depend on all targets | ||
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer ) | ||
endif() | ||
endif() | ||
|
||
# Add non ui apps as dependency before fixbundle | ||
if ( APPLE) | ||
# let bundle generation depend on all targets | ||
add_dependencies (fixbundle commandlineDecimater Dualizer mconvert Smoothing commandlineAdaptiveSubdivider commandlineSubdivider mkbalancedpm Analyzer ) | ||
endif() | ||
|
||
|
||
# find needed packages for gui applications | ||
find_package (OpenGL) | ||
find_package (GLUT) | ||
|
||
# try to use QT5 if possible otherwise stick to QT4 | ||
set (FORCE_QT4 OFF CACHE BOOL "Use Qt4 even if Qt5 was found") | ||
|
||
# For the apps, we need qt and opengl to build them | ||
if (NOT QT5_FOUND AND NOT FORCE_QT4) | ||
acg_qt5 () | ||
endif() | ||
if (NOT QT5_FOUND AND NOT QT4_FOUND) | ||
find_package (Qt4 COMPONENTS QtCore QtGui ) | ||
|
||
set (QT_USE_QTOPENGL 1) | ||
|
||
include (${QT_USE_FILE}) | ||
endif () | ||
|
||
if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles") | ||
message(WARNING "GUI Apps are not build with mingw. (TODO)") | ||
endif() | ||
|
||
# check for OpenGL and GLUT as our required dependencies | ||
if ((QT5_FOUND OR QT4_FOUND) AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" ) | ||
|
||
add_subdirectory (Decimating/DecimaterGui) | ||
add_subdirectory (QtViewer) | ||
add_subdirectory (Subdivider/SubdividerGui) | ||
add_subdirectory (ProgViewer) | ||
add_subdirectory (VDProgMesh/Synthesizer) | ||
|
||
|
||
# Add ui apps as dependency before fixbundle | ||
if ( WIN32 AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles") | ||
# let bundle generation depend on all targets | ||
add_dependencies (fixbundle DecimaterGui ProgViewer QtViewer SubdividerGui Synthesizer) | ||
endif() | ||
|
||
# Add ui apps as dependency before fixbundle | ||
if ( APPLE) | ||
# let bundle generation depend on all targets | ||
add_dependencies (fixbundle DecimaterGui ProgViewer QtViewer SubdividerGui Synthesizer) | ||
endif() | ||
|
||
if ( WIN32 ) | ||
FILE(GLOB files_install_app_dlls "${CMAKE_BINARY_DIR}/Build/*.dll" ) | ||
INSTALL(FILES ${files_install_app_dlls} DESTINATION . ) | ||
endif() | ||
|
||
else () # QT ,Opengl or glut not found | ||
|
||
if (NOT QT4_FOUND AND NOT QT5_FOUND) | ||
message ("QT 4 and 5 not found! Skipping some apps.") | ||
endif () | ||
|
||
if (NOT OPENGL_FOUND) | ||
message ("OpengGL not found! Skipping some apps.") | ||
endif () | ||
|
||
if (NOT GLUT_FOUND) | ||
message ("GLUT not found! Skipping some apps.") | ||
endif () | ||
|
||
endif () | ||
|
||
endif() # Project is OpenMesh standalone | ||
|
||
else (BUILD_APPS) | ||
|
||
message ("Building Apps disabled by user.") | ||
|
||
endif (BUILD_APPS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* ========================================================================= * | ||
* * | ||
* OpenMesh * | ||
* Copyright (c) 2001-2015, RWTH-Aachen University * | ||
* Department of Computer Graphics and Multimedia * | ||
* All rights reserved. * | ||
* www.openmesh.org * | ||
* * | ||
*---------------------------------------------------------------------------* | ||
* This file is part of OpenMesh. * | ||
*---------------------------------------------------------------------------* | ||
* * | ||
* Redistribution and use in source and binary forms, with or without * | ||
* modification, are permitted provided that the following conditions * | ||
* are met: * | ||
* * | ||
* 1. Redistributions of source code must retain the above copyright notice, * | ||
* this list of conditions and the following disclaimer. * | ||
* * | ||
* 2. Redistributions in binary form must reproduce the above copyright * | ||
* notice, this list of conditions and the following disclaimer in the * | ||
* documentation and/or other materials provided with the distribution. * | ||
* * | ||
* 3. Neither the name of the copyright holder nor the names of its * | ||
* contributors may be used to endorse or promote products derived from * | ||
* this software without specific prior written permission. * | ||
* * | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * | ||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * | ||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER * | ||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * | ||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * | ||
* * | ||
* ========================================================================= */ | ||
|
||
/*===========================================================================*\ | ||
* * | ||
* $Revision$ * | ||
* $Date$ * | ||
* * | ||
\*===========================================================================*/ | ||
|
||
#ifndef CMDOPTION | ||
#define CMDOPTION | ||
|
||
template <typename T> | ||
class CmdOption | ||
{ | ||
public: | ||
|
||
typedef T value_type; | ||
|
||
CmdOption(const T& _val) : val_(_val), valid_(true), enabled_(false) { } | ||
CmdOption() : val_(T()),valid_(false), enabled_(false) { } | ||
|
||
// has been set and has a value | ||
bool is_valid(void) const { return valid_; } | ||
bool has_value(void) const { return is_valid(); } | ||
|
||
// has been set and may have an value (check with is_valid()) | ||
bool is_enabled() const { return enabled_; } | ||
|
||
void enable() { enabled_ = true; } | ||
|
||
CmdOption& operator = ( const T& _val ) | ||
{ | ||
val_ = _val; | ||
valid_=true; | ||
enable(); | ||
return *this; | ||
} | ||
|
||
operator T () const { return val_; } | ||
// operator const T& () const { return val_; } | ||
|
||
operator T* () const { return is_valid() ? &val_ : NULL; } | ||
|
||
private: | ||
|
||
T val_; | ||
bool valid_; | ||
bool enabled_; | ||
|
||
private: // non-copyable | ||
|
||
CmdOption(const CmdOption&); | ||
CmdOption& operator = ( const CmdOption& ); | ||
|
||
}; | ||
|
||
template < typename T > | ||
std::ostream& operator << ( std::ostream& _os, CmdOption<T>& _opt ) | ||
{ | ||
_os << (T&)_opt; | ||
return _os; | ||
} | ||
|
||
#endif |
54 changes: 54 additions & 0 deletions
54
OpenMesh-5.2/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
include (ACGCommon) | ||
|
||
include_directories ( | ||
../../../.. | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${GLUT_INCLUDE_DIR} | ||
${QT_INCLUDE_DIR} | ||
) | ||
|
||
|
||
set (targetName DecimaterGui) | ||
|
||
# source code directories | ||
set (directories | ||
../../QtViewer | ||
../ | ||
) | ||
|
||
# collect all header and source files | ||
acg_append_files (headers "*.hh" ${directories}) | ||
|
||
set (sources | ||
../../QtViewer/QGLViewerWidget.cc | ||
../../QtViewer/MeshViewerWidgetT.cc | ||
../DecimaterViewerWidget.cc | ||
../decimaterviewer.cc | ||
) | ||
|
||
# remove template cc files from source file list | ||
acg_drop_templates (sources) | ||
|
||
# genereate uic and moc targets | ||
if(QT5_FOUND) | ||
acg_qt5_automoc (moc_targets ${headers}) | ||
else() | ||
acg_qt4_automoc (moc_targets ${headers}) | ||
endif() | ||
|
||
if (WIN32) | ||
acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets}) | ||
# link to qtmain library to get WinMain function for a non terminal app | ||
target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY}) | ||
else () | ||
acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets}) | ||
endif () | ||
|
||
target_link_libraries (${targetName} | ||
OpenMeshCore | ||
OpenMeshTools | ||
${QT_LIBRARIES} | ||
${OPENGL_LIBRARIES} | ||
${GLUT_LIBRARIES} | ||
) | ||
|
24 changes: 24 additions & 0 deletions
24
OpenMesh-5.2/src/OpenMesh/Apps/Decimating/DecimaterGui/DecimaterGui.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
################################################################################ | ||
# | ||
################################################################################ | ||
|
||
include( $$TOPDIR/qmake/all.include ) | ||
|
||
Application() | ||
|
||
INCLUDEPATH += ../../.. | ||
|
||
Application() | ||
glew() | ||
glut() | ||
openmesh() | ||
|
||
DIRECTORIES = ../../QtViewer ../ | ||
|
||
# Input | ||
HEADERS += $$getFilesFromDir($$DIRECTORIES,*.hh) | ||
SOURCES += ../../QtViewer/QGLViewerWidget.cc ../../QtViewer/MeshViewerWidgetT.cc ../DecimaterViewerWidget.cc | ||
SOURCES += ../decimaterviewer.cc | ||
|
||
|
||
################################################################################ |
Oops, something went wrong.