diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 03ee7cf..0000000 --- a/.gitignore +++ /dev/null @@ -1,265 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -**/build*/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -project.fragment.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -#*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Qt Temperary Files -**/GeneratedFiles/ \ No newline at end of file diff --git a/README.md b/README.md index 395a7e6..a11bb98 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,3 @@ Based on our paradigm, by simply adding and deleting edges,handles can be create TopMod demonstrates practical examples of topology changes based on this new paradigm and show that the new paradigm is convenient, effective, efficient, and friendly to subdivision surfaces. Please visit the new TopMod homepage at http://sites.google.com/site/topmod3d to find out more. - diff --git a/topmodx/Info.plist b/topmodx/Info.plist deleted file mode 100644 index e26b129..0000000 --- a/topmodx/Info.plist +++ /dev/null @@ -1,53 +0,0 @@ - - - - - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - dlfl - - CFBundleTypeIconFile - dlfl.icns - CFBundleTypeName - DLFL Model File - CFBundleTypeOSTypes - - DLFL - - LSIsAppleDefaultForType - Yes - - - CFBundleTypeExtensions - - obj - - CFBundleTypeIconFile - obj.icns - CFBundleTypeName - Wavefront OBJ - CFBundleTypeOSTypes - - OBJ - - LSIsAppleDefaultForType - Yes - - - CFBundleExecutable - TopMod - CFBundleGetInfoString - Created by Qt/QMake - CFBundleIconFile - topmod.icns - CFBundlePackageType - APPL - CFBundleSignature - TopM - NOTE - Please, do NOT change this file -- It was generated by Qt/QMake. - - diff --git a/topmodx/TopMod.sln b/topmodx/TopMod.sln deleted file mode 100644 index fbbfc8a..0000000 --- a/topmodx/TopMod.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26430.16 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vecmat", "vecmat.vcxproj", "{98695EF0-A067-47D9-B871-CBD07EF4262F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dlflcore", "dlflcore.vcxproj", "{21FAE003-7A9D-45AF-B52B-F758C7B29F0F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dlflaux", "dlflaux.vcxproj", "{1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopMod", "TopMod.vcxproj", "{4604FB24-8A63-465C-9359-CF6771566421}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Debug|x64.ActiveCfg = Debug|x64 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Debug|x64.Build.0 = Debug|x64 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Debug|x86.ActiveCfg = Debug|Win32 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Debug|x86.Build.0 = Debug|Win32 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Release|x64.ActiveCfg = Release|x64 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Release|x64.Build.0 = Release|x64 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Release|x86.ActiveCfg = Release|Win32 - {98695EF0-A067-47D9-B871-CBD07EF4262F}.Release|x86.Build.0 = Release|Win32 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Debug|x64.ActiveCfg = Debug|x64 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Debug|x64.Build.0 = Debug|x64 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Debug|x86.ActiveCfg = Debug|Win32 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Debug|x86.Build.0 = Debug|Win32 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Release|x64.ActiveCfg = Release|x64 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Release|x64.Build.0 = Release|x64 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Release|x86.ActiveCfg = Release|Win32 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F}.Release|x86.Build.0 = Release|Win32 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Debug|x64.ActiveCfg = Debug|x64 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Debug|x64.Build.0 = Debug|x64 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Debug|x86.ActiveCfg = Debug|Win32 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Debug|x86.Build.0 = Debug|Win32 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Release|x64.ActiveCfg = Release|x64 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Release|x64.Build.0 = Release|x64 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Release|x86.ActiveCfg = Release|Win32 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7}.Release|x86.Build.0 = Release|Win32 - {4604FB24-8A63-465C-9359-CF6771566421}.Debug|x64.ActiveCfg = Debug|x64 - {4604FB24-8A63-465C-9359-CF6771566421}.Debug|x64.Build.0 = Debug|x64 - {4604FB24-8A63-465C-9359-CF6771566421}.Debug|x86.ActiveCfg = Debug|x64 - {4604FB24-8A63-465C-9359-CF6771566421}.Release|x64.ActiveCfg = Release|x64 - {4604FB24-8A63-465C-9359-CF6771566421}.Release|x64.Build.0 = Release|x64 - {4604FB24-8A63-465C-9359-CF6771566421}.Release|x86.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/topmodx/TopMod.vcxproj b/topmodx/TopMod.vcxproj deleted file mode 100644 index 72564f6..0000000 --- a/topmodx/TopMod.vcxproj +++ /dev/null @@ -1,465 +0,0 @@ - - - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - Moc%27ing BasicsMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - Moc%27ing BasicsMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ConicalMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ConicalMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing editor.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing editor.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ExperimentalModes.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ExperimentalModes.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ExtrusionsMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ExtrusionsMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing GLWidget.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing GLWidget.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing HighgenusMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing HighgenusMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - - - - - - - - - - - - - - - Moc%27ing MainWindow.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - Moc%27ing MainWindow.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing PythonHighlighter.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing PythonHighlighter.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing qshortcutdialog.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing qshortcutdialog.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing qshortcutmanager.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing qshortcutmanager.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing RemeshingMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing RemeshingMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing stylesheeteditor.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing stylesheeteditor.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - - - - - - - - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing TexturingMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing TexturingMode.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing TopMod.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing TopMod.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing TopModPreferences.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing TopModPreferences.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB "-I." "-I.\include" "-I.\include\Graphics" "-I.\include\Light" "-I.\include\vecmat" "-I.\include\dlflcore" "-I.\include\dlflaux" "-I.\include\verse" "-I.\src" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" - - - - - - - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - - - - - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - - - - - - - - %(FullPath);.\images\prim_cube.png;.\images\prim_dodecahedron.png;.\images\prim_geodesic.png;.\images\prim_icosahedron.png;.\images\prim_octahedron.png;.\images\prim_soccerball.png;.\images\prim_tetrahedron.png;.\images\mode_basics.png;.\images\mode_highgenus.png;.\images\mode_remeshing.png;.\images\mode_extrusion.png;.\images\mode_texturing.png;.\images\hide_scripteditor.png;.\images\clear_scriptinput.png;.\images\clear_scriptoutput.png;.\images\run_script.png;.\images\sculpting-cutfaces.png;.\images\sculpting-cutedges.png;.\images\sculpting-cutvertices.png;.\images\selection-options.png;.\images\color-fill.png;.\lang\topmod_ca.ts;.\lang\topmod_en.ts;.\lang\topmod_es.ts;.\lang\topmod_de.ts;.\lang\topmod_tr.ts;.\lang\topmod_fr.ts;.\lang\topmod_it.ts;.\lang\topmod_hi.ts;.\qss\modo.qss;.\qss\default.qss;.\objs\cube.obj;.\objs\octahedron.obj;.\objs\tetrahedron.obj;.\objs\dodecahedron.obj;.\objs\icosahedron.obj;.\objs\soccerball.obj;.\objs\geodesicdome.obj;.\images\placeholder.png;.\images\insert_edge.png;.\images\insert_edge.gif;.\images\delete_edge.png;.\images\connect_edges.png;.\images\collapse_edge.png;.\images\splice_corners.png;.\images\transforms.png;.\images\subdivide_edge.png;.\images\undo.png;.\images\redo.png;.\images\extrude_doosabin.png;.\images\extrude_cubical.png;.\images\extrude_dodecahedral.png;.\images\extrude_icosahedral.png;.\images\extrude_octahedral.png;.\images\extrude_stellate.png;.\images\extrude_doublestellate.png;.\images\extrude_dome.png;.\images\extrude_spiral.png;.\images\highgenus_addholehandle.png;.\images\highgenus_addholehandlecv.png;.\images\highgenus_addhandlesi.png;.\images\highgenus_rindthickness.png;.\images\highgenus_rindscaling.png;.\images\highgenus_column.png;.\images\highgenus_wireframe.png;.\images\highgenus_multifacehandle.png;.\images\highgenus_mengersponge.png;.\images\highgenus_sierpinsky.png;.\images\doosabin_extrude.png;.\images\open.png;.\images\saveas.png;.\images\splash.png;.\images\topmod.png;.\images\tutorial_01.png;.\images\tutorial_02.png;.\images\tutorial_03.png;.\images\tutorial_04.png;.\images\tutorial_05.png;.\images\tutorial_06.png;.\images\tutorial_07.png;.\images\camera-photo.png;.\images\image-x-generic.png;.\images\selection-mask-vertices.png;.\images\selection-mask-faces.png;.\images\selection-mask-edges.png;.\images\selection-mask-corners.png;.\images\document-save-as.png;.\images\document-save.png;.\images\edit-redo.png;.\images\edit-undo.png;.\images\folder.png;.\images\help-browser.png;.\images\package-x-generic.png;.\images\preferences-system.png;.\images\utilities-terminal.png;.\images\view-fullscreen.png;.\images\applications-internet.png;.\images\accessories-text-editor.png;.\lang\topmod_en.qm;.\lang\topmod_es.qm;.\lang\topmod_fr.qm;.\lang\topmod_it.qm;.\lang\topmod_de.qm;.\lang\topmod_tr.qm;.\lang\topmod_ca.qm;.\lang\topmod_hi.qm;.\images\commandcompleter.png;%(AdditionalInputs) - Rcc%27ing %(Identity)... - .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) - "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp - %(FullPath);.\images\prim_cube.png;.\images\prim_dodecahedron.png;.\images\prim_geodesic.png;.\images\prim_icosahedron.png;.\images\prim_octahedron.png;.\images\prim_soccerball.png;.\images\prim_tetrahedron.png;.\images\mode_basics.png;.\images\mode_highgenus.png;.\images\mode_remeshing.png;.\images\mode_extrusion.png;.\images\mode_texturing.png;.\images\hide_scripteditor.png;.\images\clear_scriptinput.png;.\images\clear_scriptoutput.png;.\images\run_script.png;.\images\sculpting-cutfaces.png;.\images\sculpting-cutedges.png;.\images\sculpting-cutvertices.png;.\images\selection-options.png;.\images\color-fill.png;.\lang\topmod_ca.ts;.\lang\topmod_en.ts;.\lang\topmod_es.ts;.\lang\topmod_de.ts;.\lang\topmod_tr.ts;.\lang\topmod_fr.ts;.\lang\topmod_it.ts;.\lang\topmod_hi.ts;.\qss\modo.qss;.\qss\default.qss;.\objs\cube.obj;.\objs\octahedron.obj;.\objs\tetrahedron.obj;.\objs\dodecahedron.obj;.\objs\icosahedron.obj;.\objs\soccerball.obj;.\objs\geodesicdome.obj;.\images\placeholder.png;.\images\insert_edge.png;.\images\insert_edge.gif;.\images\delete_edge.png;.\images\connect_edges.png;.\images\collapse_edge.png;.\images\splice_corners.png;.\images\transforms.png;.\images\subdivide_edge.png;.\images\undo.png;.\images\redo.png;.\images\extrude_doosabin.png;.\images\extrude_cubical.png;.\images\extrude_dodecahedral.png;.\images\extrude_icosahedral.png;.\images\extrude_octahedral.png;.\images\extrude_stellate.png;.\images\extrude_doublestellate.png;.\images\extrude_dome.png;.\images\extrude_spiral.png;.\images\highgenus_addholehandle.png;.\images\highgenus_addholehandlecv.png;.\images\highgenus_addhandlesi.png;.\images\highgenus_rindthickness.png;.\images\highgenus_rindscaling.png;.\images\highgenus_column.png;.\images\highgenus_wireframe.png;.\images\highgenus_multifacehandle.png;.\images\highgenus_mengersponge.png;.\images\highgenus_sierpinsky.png;.\images\doosabin_extrude.png;.\images\open.png;.\images\saveas.png;.\images\splash.png;.\images\topmod.png;.\images\tutorial_01.png;.\images\tutorial_02.png;.\images\tutorial_03.png;.\images\tutorial_04.png;.\images\tutorial_05.png;.\images\tutorial_06.png;.\images\tutorial_07.png;.\images\camera-photo.png;.\images\image-x-generic.png;.\images\selection-mask-vertices.png;.\images\selection-mask-faces.png;.\images\selection-mask-edges.png;.\images\selection-mask-corners.png;.\images\document-save-as.png;.\images\document-save.png;.\images\edit-redo.png;.\images\edit-undo.png;.\images\folder.png;.\images\help-browser.png;.\images\package-x-generic.png;.\images\preferences-system.png;.\images\utilities-terminal.png;.\images\view-fullscreen.png;.\images\applications-internet.png;.\images\accessories-text-editor.png;.\lang\topmod_en.qm;.\lang\topmod_es.qm;.\lang\topmod_fr.qm;.\lang\topmod_it.qm;.\lang\topmod_de.qm;.\lang\topmod_tr.qm;.\lang\topmod_ca.qm;.\lang\topmod_hi.qm;.\images\commandcompleter.png;%(AdditionalInputs) - Rcc%27ing %(Identity)... - .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) - "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp - - - - {4604FB24-8A63-465C-9359-CF6771566421} - Qt4VSv1.0 - 8.1 - - - - Application - v141 - - - Application - v141 - - - - - - - - $(SolutionDir)\$(Platform)\$(Configuration)\ - $(SolutionDir)\tmp\$(Platform)\$(Configuration)\ - - - $(SolutionDir)\$(Platform)\$(Configuration)\ - $(SolutionDir)\tmp\$(Platform)\$(Configuration)\ - - - - UNICODE;WIN32;WIN64;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;%(PreprocessorDefinitions) - .;./include;./include/Graphics;./include/Light;./include/vecmat;./include/dlflcore;./include/dlflaux;./include/verse;./src;.\GeneratedFiles;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtOpenGL;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtXml;%(AdditionalIncludeDirectories) - Disabled - ProgramDatabase - MultiThreadedDebugDLL - true - - - Windows - $(OutDir)\$(ProjectName).exe - ./lib;./lib/$(Configuration);$(QTDIR)\lib;C:/Python27/libs;%(AdditionalLibraryDirectories) - true - vecmat.lib;dlflcore.lib;dlflaux.lib;opengl32.lib;glu32.lib;Python27.lib;qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5OpenGLd.lib;Qt5Widgetsd.lib;Qt5Xmld.lib;%(AdditionalDependencies) - - - _CONSOLE;UNICODE;WIN32;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) - - - - - UNICODE;WIN32;WIN64;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_XML_LIB;%(PreprocessorDefinitions) - .;./include;./include/Graphics;./include/Light;./include/vecmat;./include/dlflcore;./include/dlflaux;./include/verse;./src;.\GeneratedFiles;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtOpenGL;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtXml;%(AdditionalIncludeDirectories) - - MultiThreadedDLL - true - - - Windows - $(OutDir)\$(ProjectName).exe - ./lib;./lib/$(Configuration);$(QTDIR)\lib;C:/Python27/libs;%(AdditionalLibraryDirectories) - false - vecmat.lib;dlflcore.lib;dlflaux.lib;opengl32.lib;glu32.lib;Python27.lib;qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5OpenGL.lib;opengl32.lib;glu32.lib;Qt5Widgets.lib;Qt5Xml.lib;%(AdditionalDependencies) - - - _CONSOLE;UNICODE;WIN32;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - - - - - - - - - - - \ No newline at end of file diff --git a/topmodx/TopMod.vcxproj.filters b/topmodx/TopMod.vcxproj.filters deleted file mode 100644 index 5453a63..0000000 --- a/topmodx/TopMod.vcxproj.filters +++ /dev/null @@ -1,445 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} - qrc;* - false - - - {99349809-55BA-4b9d-BF79-8FDBB0286EB3} - ui - - - {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} - qrc;* - false - - - {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} - moc;h;cpp - False - - - {d80f9e14-dbf5-4bef-bceb-e6f97ca07763} - - - {8f802ddd-3fa3-49f6-aab3-7cd65fd8098c} - - - {008f8f7a-ef35-4e55-8914-0efb401517cf} - - - {028b6a82-a726-40bd-915e-da7d9e0bd4df} - - - {18b793ae-791c-4b74-a7ad-9693af8088f4} - - - {deedbcb1-fef6-44b7-8328-5801e34f6e98} - - - {6ec50b37-52bb-4d7c-8d46-fc1901b7c9be} - - - {a43a7c51-6d55-4886-b9da-6602b939fbcd} - - - {5ee777c2-690b-4c84-acb5-482175300c90} - - - - - Source Files\include - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Generated Files - - - Source Files - - - Source Files - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Generated Files\Debug - - - Generated Files\Release - - - Source Files\Renderer - - - Source Files\Renderer - - - - - Header Files\Base - - - Header Files\Base - - - Header Files\Base - - - Header Files\Base - - - Header Files\Graphics - - - Header Files\Graphics - - - Header Files\Graphics - - - Header Files\Graphics - - - Header Files\Graphics - - - Header Files\Graphics - - - Header Files\include - - - Header Files\Light - - - Header Files\Light - - - Header Files\Light - - - Header Files\Light - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Generated Files - - - Generated Files - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - Header Files\Renderer - - - - - Resource Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Form Files - - - Form Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/topmodx/application.qrc b/topmodx/application.qrc deleted file mode 100644 index 8aea3f7..0000000 --- a/topmodx/application.qrc +++ /dev/null @@ -1,132 +0,0 @@ - - - images/prim_cube.png - images/prim_dodecahedron.png - images/prim_geodesic.png - images/prim_icosahedron.png - images/prim_octahedron.png - images/prim_soccerball.png - images/prim_tetrahedron.png - images/mode_basics.png - images/mode_highgenus.png - images/mode_remeshing.png - images/mode_extrusion.png - images/mode_texturing.png - images/hide_scripteditor.png - images/clear_scriptinput.png - images/clear_scriptoutput.png - images/run_script.png - images/sculpting-cutfaces.png - images/sculpting-cutedges.png - images/sculpting-cutvertices.png - images/selection-options.png - images/color-fill.png - - lang/topmod_ca.ts - lang/topmod_en.ts - lang/topmod_es.ts - lang/topmod_de.ts - lang/topmod_tr.ts - lang/topmod_fr.ts - lang/topmod_it.ts - lang/topmod_hi.ts - - qss/modo.qss - qss/default.qss - objs/cube.obj - objs/octahedron.obj - objs/tetrahedron.obj - objs/dodecahedron.obj - objs/icosahedron.obj - objs/soccerball.obj - objs/geodesicdome.obj - images/placeholder.png - images/insert_edge.png - images/insert_edge.gif - images/delete_edge.png - images/connect_edges.png - images/collapse_edge.png - images/splice_corners.png - images/transforms.png - images/subdivide_edge.png - images/undo.png - images/redo.png - images/extrude_doosabin.png - images/extrude_cubical.png - images/extrude_dodecahedral.png - images/extrude_icosahedral.png - images/extrude_octahedral.png - images/extrude_stellate.png - images/extrude_doublestellate.png - images/extrude_dome.png - images/extrude_spiral.png - images/highgenus_addholehandle.png - images/highgenus_addholehandlecv.png - images/highgenus_addhandlesi.png - images/highgenus_rindthickness.png - images/highgenus_rindscaling.png - images/highgenus_column.png - images/highgenus_wireframe.png - images/highgenus_multifacehandle.png - images/highgenus_mengersponge.png - images/highgenus_sierpinsky.png - images/doosabin_extrude.png - images/open.png - images/saveas.png - images/splash.png - images/topmod.png - images/tutorial_01.png - images/tutorial_02.png - images/tutorial_03.png - images/tutorial_04.png - images/tutorial_05.png - images/tutorial_06.png - images/tutorial_07.png - images/camera-photo.png - images/image-x-generic.png - - - - images/selection-mask-vertices.png - images/selection-mask-faces.png - images/selection-mask-edges.png - images/selection-mask-corners.png - - images/document-save-as.png - images/document-save.png - images/edit-redo.png - images/edit-undo.png - images/folder.png - images/help-browser.png - images/package-x-generic.png - images/preferences-system.png - images/utilities-terminal.png - images/view-fullscreen.png - images/applications-internet.png - images/accessories-text-editor.png - - - lang/topmod_en.qm - lang/topmod_es.qm - lang/topmod_fr.qm - lang/topmod_it.qm - lang/topmod_de.qm - lang/topmod_tr.qm - lang/topmod_ca.qm - lang/topmod_hi.qm - images/commandcompleter.png - - \ No newline at end of file diff --git a/topmodx/dlflaux.vcxproj b/topmodx/dlflaux.vcxproj deleted file mode 100644 index 76ff631..0000000 --- a/topmodx/dlflaux.vcxproj +++ /dev/null @@ -1,155 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {1C5A1BCD-B74A-43DB-910D-28ACC4AE88F7} - vecmat - 10.0.15063.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - StaticLibrary - true - v141 - MultiByte - - - StaticLibrary - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)lib\$(Configuration)\ - $(SolutionDir)\tmp\$(ProjectName)\$(Platform)\$(Configuration)\ - - - $(SolutionDir)lib\$(Configuration)\ - $(SolutionDir)\tmp\$(ProjectName)\$(Platform)\$(Configuration)\ - - - - Level3 - Disabled - true - ./include;./include/vecmat;./include/dlflcore - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - - - Level3 - Disabled - true - ./include; - - - - - Level3 - MaxSpeed - true - true - true - ./include; - MultiThreadedDLL - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - ./include;./include/vecmat;./include/dlflcore - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/topmodx/dlflaux.vcxproj.filters b/topmodx/dlflaux.vcxproj.filters deleted file mode 100644 index 0340f2f..0000000 --- a/topmodx/dlflaux.vcxproj.filters +++ /dev/null @@ -1,81 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/topmodx/dlflcore.vcxproj b/topmodx/dlflcore.vcxproj deleted file mode 100644 index 7426d8e..0000000 --- a/topmodx/dlflcore.vcxproj +++ /dev/null @@ -1,154 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {21FAE003-7A9D-45AF-B52B-F758C7B29F0F} - vecmat - 10.0.15063.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - StaticLibrary - true - v141 - MultiByte - - - StaticLibrary - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)lib\$(Configuration)\ - $(SolutionDir)\tmp\$(ProjectName)\$(Platform)\$(Configuration)\ - - - $(SolutionDir)lib\$(Configuration)\ - $(SolutionDir)\tmp\$(ProjectName)\$(Platform)\$(Configuration)\ - - - - Level3 - Disabled - true - ./include;./include/vecmat - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - - - Level3 - Disabled - true - ./include; - - - - - Level3 - MaxSpeed - true - true - true - ./include; - MultiThreadedDLL - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - ./include;./include/vecmat - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/topmodx/dlflcore.vcxproj.filters b/topmodx/dlflcore.vcxproj.filters deleted file mode 100644 index bd78faa..0000000 --- a/topmodx/dlflcore.vcxproj.filters +++ /dev/null @@ -1,78 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/topmodx/doc/Doxyfile b/topmodx/doc/Doxyfile deleted file mode 100644 index d703b2a..0000000 --- a/topmodx/doc/Doxyfile +++ /dev/null @@ -1,271 +0,0 @@ -# Doxyfile 1.5.2 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = TopMod -PROJECT_NUMBER = 2.0 -OUTPUT_DIRECTORY = /Users/dvmorris/topmod2/topmodx/doc/html -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = /Applications/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../ -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py -RECURSIVE = YES -EXCLUDE = ../include/arcball \ - ../include/verse \ - EXCLUDE_SYMLINKS \ - = \ - YES -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */.svn/* \ - */TopMod/* \ - */doc/* - */.m/* - */.obj/* - */.dlfl/* -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = ./ -HTML_FILE_EXTENSION = .html -HTML_HEADER = header.html -HTML_FOOTER = footer.html -HTML_STYLESHEET = style.css -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -MSCGEN_PATH = /Applications/Doxygen.app/Contents/Resources/ -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = /Applications/Doxygen.app/Contents/Resources/ -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/topmodx/doc/footer.html b/topmodx/doc/footer.html deleted file mode 100644 index bec6be6..0000000 --- a/topmodx/doc/footer.html +++ /dev/null @@ -1,12 +0,0 @@ -
-
Generated on $date for $projectname by  -doxygen 1.5.2
- - - - - \ No newline at end of file diff --git a/topmodx/doc/header.html b/topmodx/doc/header.html deleted file mode 100644 index 125e6e9..0000000 --- a/topmodx/doc/header.html +++ /dev/null @@ -1,25 +0,0 @@ - - -$projectname Developer Docs - $title - - - - - -
-
- - -
-
- diff --git a/topmodx/doc/logo.png b/topmodx/doc/logo.png deleted file mode 100644 index 3dec08e..0000000 Binary files a/topmodx/doc/logo.png and /dev/null differ diff --git a/topmodx/doc/makedox.sh b/topmodx/doc/makedox.sh deleted file mode 100644 index 6ab8cc0..0000000 --- a/topmodx/doc/makedox.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -echo "Running Doxygen..." -#run doxygen using Doxyfile for configuration -#in order to run doxygen on OS/X, install it using -# 'sudo port install doxygen' -doxygen - -echo "Zipping up html directory..." -#zip up the contents of the html directory so it can be uploaded to the server -tar -czvf doc.tar.gz ./html - -#send to server using scp -echo "Uploading to server, it should ask for the server password..." -scp doc.tar.gz unclehor@unclehorrid.com:/home/unclehor/public_html/ends170/topmod/doc/ - -echo "cd public_html/ends170/topmod/doc && tar -xzvf doc.tar.gz ./ && mv html/* ./ && exit" - -# login to server and go to the doc directory -ssh unclehor@unclehorrid.com - - -# cd public_html/ends170/topmod/doc - -# untar it into the ./html directory -# tar -xzvf doc.tar.gz ./ -# move the files up a directory -# not sure if there is a way to do this thing -# without needing to do that every time.. -# mv html/* ./ - -# end the ssh session -# exit - - -# the script stops once you get into the ssh session -# not sure how to fix this but for now just copy paste this line: -# cd public_html/ends170/topmod/doc && tar -xzvf doc.tar.gz ./ && mv html/* ./ && exit - diff --git a/topmodx/doc/style.css b/topmodx/doc/style.css deleted file mode 100644 index 2dcd9d6..0000000 --- a/topmodx/doc/style.css +++ /dev/null @@ -1,470 +0,0 @@ -/*new header to conform to wordpress custom template */ -#header{width:200px;height:110px;float:left;margin:0;padding:0;} -#header h1.blogtitle{font-family:Arial, Helvetica, sans-serif;color:#fff;margin:0;padding:4px 0 0;} -#header p.desc{font-family:Verdana, Arial, Helvetica, sans-serif;color:#fff;font-size:11px;margin:0;padding:0;} - -/* also stuff from blog template */ -body{font-family:Geneva, Arial, Helvetica, sans-serif;font-size:14px;background-color:#fff;background-image:url('topbck.png');background-repeat:repeat-x;color:#666;margin:0;padding:0;} -#wrap{width:980px;margin:0 auto;padding:0;} -#top{height:130px;width:980px;clear:both;margin:0 auto;padding:0;} -h2,h3{font-size:16px;font-weight:700;margin:0;padding:0;} -h3{margin-top:20px;} -h2{font-size:24px;margin-bottom:20px;} -h4{font-size:14px;} - -/*navigation styles for doxygen pags*/ -#main{width:980px;margin:10px auto;padding:0;} -#header{width:200px;height:110px;float:left;margin:0;padding:0;} -#tnav{height:110px;width:700px;float:right;margin:0;padding:0;} -ul.tnav{height:110px;line-height:110px;float:right;list-style:none;font-size:11px;text-transform:uppercase;margin:0;padding:0;} -ul.tnav li{float:left !important;list-style-type:none;margin:0;padding:0;} -ul.tnav li a,ul.tnav li a:link,ul.tnav li a:visited{background:#3e4651;color:#fff;float:left;display:block;text-decoration:none;padding:0 10px;} -ul.tnav li a:hover,ul.tnav li a:active{background:#586373;color:#fff;text-decoration:none;} -ul.tnav li.current_page_item a{text-decoration:none;background:#586373;color:#fff;} -ul.tnav li ul{float:left;margin:0;padding:0;} - - -H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { -font-family: Geneva, Arial, Helvetica, sans-serif; -} -TD { -font-size: 90%; -} -H1 { -text-align: center; -font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { font-weight: bold } -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.nav { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} -A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} -A.codeRef:link { font-weight: normal; color: #0000FF} -A.codeRef:visited { font-weight: normal; color: #0000FF} -A:hover { text-decoration: none; /*background-color: #f2f2ff */} -/*a.blogtitle:hover{background-color:#000;}*/ -DL.el { margin-left: -1cm } -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { background: #e8eef2; - font-weight: bold; -} -HR { height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -.directory { font-size: 9pt; font-weight: bold; } -.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } -.directory > h3 { margin-top: 0; } -.directory p { margin: 0px; white-space: nowrap; } -.directory div { display: none; margin: 0px; } -.directory img { vertical-align: -30%; } - -/* tabs styles */ - -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - border-bottom : 1px solid #84B0C7; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, div.tabs A:active, -{ - color: #1A419D; -} -DIV.tabs A:hover{ color:#6995c2; } - -DIV.tabs SPAN -{ - float : left; - display : block; - padding : 2px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-weight : bold; - text-decoration : none; -} - -DIV.tabs LI.current A -{ - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - padding-bottom : 6px; -} - -DIV.nav -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} -.tabs{ float:right;width:230px;margin:0;padding:0; } - -.tabs ul{list-style-type:none;line-height:200%;font-size:13px;margin:0 auto;padding:0;} -.tabs ul li{list-style-type:none;margin:0 0 20px;padding:0;} diff --git a/topmodx/doc/topbck.png b/topmodx/doc/topbck.png deleted file mode 100644 index 8692b49..0000000 Binary files a/topmodx/doc/topbck.png and /dev/null differ diff --git a/topmodx/images/accessories-text-editor.png b/topmodx/images/accessories-text-editor.png deleted file mode 100644 index c6b6285..0000000 Binary files a/topmodx/images/accessories-text-editor.png and /dev/null differ diff --git a/topmodx/images/accessories-text-editor.svg b/topmodx/images/accessories-text-editor.svg deleted file mode 100644 index aa7188e..0000000 --- a/topmodx/images/accessories-text-editor.svg +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Text Editor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/applications-internet.png b/topmodx/images/applications-internet.png deleted file mode 100644 index 096e848..0000000 Binary files a/topmodx/images/applications-internet.png and /dev/null differ diff --git a/topmodx/images/applications-internet.svg b/topmodx/images/applications-internet.svg deleted file mode 100644 index 5717807..0000000 --- a/topmodx/images/applications-internet.svg +++ /dev/null @@ -1,621 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Internet Category - - - Jakub Steiner - - - - - Tuomas Kuosmanen - - - - http://jimmac.musichall.cz - - - internet - tools - applications - category - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/applications-system.png b/topmodx/images/applications-system.png deleted file mode 100644 index 565f406..0000000 Binary files a/topmodx/images/applications-system.png and /dev/null differ diff --git a/topmodx/images/camera-photo.png b/topmodx/images/camera-photo.png deleted file mode 100644 index ffbffc7..0000000 Binary files a/topmodx/images/camera-photo.png and /dev/null differ diff --git a/topmodx/images/clear_scriptinput.png b/topmodx/images/clear_scriptinput.png deleted file mode 100644 index 313ef95..0000000 Binary files a/topmodx/images/clear_scriptinput.png and /dev/null differ diff --git a/topmodx/images/clear_scriptoutput.png b/topmodx/images/clear_scriptoutput.png deleted file mode 100644 index e85e442..0000000 Binary files a/topmodx/images/clear_scriptoutput.png and /dev/null differ diff --git a/topmodx/images/collapse_edge.png b/topmodx/images/collapse_edge.png deleted file mode 100644 index 1511b18..0000000 Binary files a/topmodx/images/collapse_edge.png and /dev/null differ diff --git a/topmodx/images/color-fill.png b/topmodx/images/color-fill.png deleted file mode 100644 index b1dc5ef..0000000 Binary files a/topmodx/images/color-fill.png and /dev/null differ diff --git a/topmodx/images/commandcompleter.png b/topmodx/images/commandcompleter.png deleted file mode 100644 index 3c09549..0000000 Binary files a/topmodx/images/commandcompleter.png and /dev/null differ diff --git a/topmodx/images/commandcompleter.psd b/topmodx/images/commandcompleter.psd deleted file mode 100644 index 687c53e..0000000 Binary files a/topmodx/images/commandcompleter.psd and /dev/null differ diff --git a/topmodx/images/conical-convexhull.png b/topmodx/images/conical-convexhull.png deleted file mode 100644 index e1c55f7..0000000 Binary files a/topmodx/images/conical-convexhull.png and /dev/null differ diff --git a/topmodx/images/connect_edges.png b/topmodx/images/connect_edges.png deleted file mode 100644 index e3e014a..0000000 Binary files a/topmodx/images/connect_edges.png and /dev/null differ diff --git a/topmodx/images/delete_edge.png b/topmodx/images/delete_edge.png deleted file mode 100644 index 8aec9b6..0000000 Binary files a/topmodx/images/delete_edge.png and /dev/null differ diff --git a/topmodx/images/document-new.png b/topmodx/images/document-new.png deleted file mode 100644 index e6d64bb..0000000 Binary files a/topmodx/images/document-new.png and /dev/null differ diff --git a/topmodx/images/document-save-as.png b/topmodx/images/document-save-as.png deleted file mode 100644 index 5c9f6b3..0000000 Binary files a/topmodx/images/document-save-as.png and /dev/null differ diff --git a/topmodx/images/document-save-as.svg b/topmodx/images/document-save-as.svg deleted file mode 100644 index 09fa340..0000000 --- a/topmodx/images/document-save-as.svg +++ /dev/null @@ -1,661 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Save As - - - Jakub Steiner - - - - - hdd - hard drive - save as - io - store - - - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/document-save.png b/topmodx/images/document-save.png deleted file mode 100644 index db5c52b..0000000 Binary files a/topmodx/images/document-save.png and /dev/null differ diff --git a/topmodx/images/document-save.svg b/topmodx/images/document-save.svg deleted file mode 100644 index 6be29c4..0000000 --- a/topmodx/images/document-save.svg +++ /dev/null @@ -1,617 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Save - - - Jakub Steiner - - - - - hdd - hard drive - save - io - store - - - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/doosabin_extrude.png b/topmodx/images/doosabin_extrude.png deleted file mode 100644 index 0d29adc..0000000 Binary files a/topmodx/images/doosabin_extrude.png and /dev/null differ diff --git a/topmodx/images/edit-redo.png b/topmodx/images/edit-redo.png deleted file mode 100644 index 3eb7b05..0000000 Binary files a/topmodx/images/edit-redo.png and /dev/null differ diff --git a/topmodx/images/edit-redo.svg b/topmodx/images/edit-redo.svg deleted file mode 100644 index 44bdb40..0000000 --- a/topmodx/images/edit-redo.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Edit Redo - - - edit - redo - again - reapply - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/edit-select-all.png b/topmodx/images/edit-select-all.png deleted file mode 100644 index 107fc60..0000000 Binary files a/topmodx/images/edit-select-all.png and /dev/null differ diff --git a/topmodx/images/edit-undo.png b/topmodx/images/edit-undo.png deleted file mode 100644 index 61b2ce9..0000000 Binary files a/topmodx/images/edit-undo.png and /dev/null differ diff --git a/topmodx/images/edit-undo.svg b/topmodx/images/edit-undo.svg deleted file mode 100644 index ba1d1f5..0000000 --- a/topmodx/images/edit-undo.svg +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Edit Undo - - - edit - undo - revert - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/extrude_cubical.png b/topmodx/images/extrude_cubical.png deleted file mode 100644 index e201c0b..0000000 Binary files a/topmodx/images/extrude_cubical.png and /dev/null differ diff --git a/topmodx/images/extrude_dodecahedral.png b/topmodx/images/extrude_dodecahedral.png deleted file mode 100644 index 352aefd..0000000 Binary files a/topmodx/images/extrude_dodecahedral.png and /dev/null differ diff --git a/topmodx/images/extrude_dome.png b/topmodx/images/extrude_dome.png deleted file mode 100644 index 9093d6d..0000000 Binary files a/topmodx/images/extrude_dome.png and /dev/null differ diff --git a/topmodx/images/extrude_doosabin.png b/topmodx/images/extrude_doosabin.png deleted file mode 100644 index c59d1ce..0000000 Binary files a/topmodx/images/extrude_doosabin.png and /dev/null differ diff --git a/topmodx/images/extrude_doublestellate.png b/topmodx/images/extrude_doublestellate.png deleted file mode 100644 index 9563554..0000000 Binary files a/topmodx/images/extrude_doublestellate.png and /dev/null differ diff --git a/topmodx/images/extrude_icosahedral.png b/topmodx/images/extrude_icosahedral.png deleted file mode 100644 index 305dfda..0000000 Binary files a/topmodx/images/extrude_icosahedral.png and /dev/null differ diff --git a/topmodx/images/extrude_octahedral.png b/topmodx/images/extrude_octahedral.png deleted file mode 100644 index fe0609b..0000000 Binary files a/topmodx/images/extrude_octahedral.png and /dev/null differ diff --git a/topmodx/images/extrude_spiral.png b/topmodx/images/extrude_spiral.png deleted file mode 100644 index 91429ff..0000000 Binary files a/topmodx/images/extrude_spiral.png and /dev/null differ diff --git a/topmodx/images/extrude_stellate.png b/topmodx/images/extrude_stellate.png deleted file mode 100644 index 7dfeabe..0000000 Binary files a/topmodx/images/extrude_stellate.png and /dev/null differ diff --git a/topmodx/images/folder-open.png b/topmodx/images/folder-open.png deleted file mode 100644 index eb65de2..0000000 Binary files a/topmodx/images/folder-open.png and /dev/null differ diff --git a/topmodx/images/folder.png b/topmodx/images/folder.png deleted file mode 100644 index 0171b09..0000000 Binary files a/topmodx/images/folder.png and /dev/null differ diff --git a/topmodx/images/folder.svg b/topmodx/images/folder.svg deleted file mode 100644 index 2027f56..0000000 --- a/topmodx/images/folder.svg +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Folder Icon - - - - Jakub Steiner - - - - http://jimmac.musichall.cz - - - folder - directory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/help-browser.png b/topmodx/images/help-browser.png deleted file mode 100644 index d60425f..0000000 Binary files a/topmodx/images/help-browser.png and /dev/null differ diff --git a/topmodx/images/help-browser.svg b/topmodx/images/help-browser.svg deleted file mode 100644 index 669dda3..0000000 --- a/topmodx/images/help-browser.svg +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Help Browser - 2005-11-06 - - - Tuomas Kuosmanen - - - - - help - browser - documentation - docs - man - info - - - - - - Jakub Steiner, Andreas Nilsson - - - http://tigert.com - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/hide_scripteditor.png b/topmodx/images/hide_scripteditor.png deleted file mode 100644 index fbedcf3..0000000 Binary files a/topmodx/images/hide_scripteditor.png and /dev/null differ diff --git a/topmodx/images/highgenus_addhandlesi.png b/topmodx/images/highgenus_addhandlesi.png deleted file mode 100644 index b84ad8c..0000000 Binary files a/topmodx/images/highgenus_addhandlesi.png and /dev/null differ diff --git a/topmodx/images/highgenus_addholehandle.png b/topmodx/images/highgenus_addholehandle.png deleted file mode 100644 index dfd074b..0000000 Binary files a/topmodx/images/highgenus_addholehandle.png and /dev/null differ diff --git a/topmodx/images/highgenus_addholehandlecv.png b/topmodx/images/highgenus_addholehandlecv.png deleted file mode 100644 index 217cb50..0000000 Binary files a/topmodx/images/highgenus_addholehandlecv.png and /dev/null differ diff --git a/topmodx/images/highgenus_column.png b/topmodx/images/highgenus_column.png deleted file mode 100644 index fdf6b2f..0000000 Binary files a/topmodx/images/highgenus_column.png and /dev/null differ diff --git a/topmodx/images/highgenus_mengersponge.png b/topmodx/images/highgenus_mengersponge.png deleted file mode 100644 index 601b132..0000000 Binary files a/topmodx/images/highgenus_mengersponge.png and /dev/null differ diff --git a/topmodx/images/highgenus_multifacehandle.png b/topmodx/images/highgenus_multifacehandle.png deleted file mode 100644 index 46760eb..0000000 Binary files a/topmodx/images/highgenus_multifacehandle.png and /dev/null differ diff --git a/topmodx/images/highgenus_rind.png b/topmodx/images/highgenus_rind.png deleted file mode 100644 index 34e3540..0000000 Binary files a/topmodx/images/highgenus_rind.png and /dev/null differ diff --git a/topmodx/images/highgenus_rindscaling.png b/topmodx/images/highgenus_rindscaling.png deleted file mode 100644 index c3c8984..0000000 Binary files a/topmodx/images/highgenus_rindscaling.png and /dev/null differ diff --git a/topmodx/images/highgenus_rindthickness.png b/topmodx/images/highgenus_rindthickness.png deleted file mode 100644 index 0c6a3dc..0000000 Binary files a/topmodx/images/highgenus_rindthickness.png and /dev/null differ diff --git a/topmodx/images/highgenus_sierpinsky.png b/topmodx/images/highgenus_sierpinsky.png deleted file mode 100644 index 08ae696..0000000 Binary files a/topmodx/images/highgenus_sierpinsky.png and /dev/null differ diff --git a/topmodx/images/highgenus_wireframe.png b/topmodx/images/highgenus_wireframe.png deleted file mode 100644 index b4dd39c..0000000 Binary files a/topmodx/images/highgenus_wireframe.png and /dev/null differ diff --git a/topmodx/images/image-x-generic.png b/topmodx/images/image-x-generic.png deleted file mode 100644 index 6f118cd..0000000 Binary files a/topmodx/images/image-x-generic.png and /dev/null differ diff --git a/topmodx/images/insert_edge.gif b/topmodx/images/insert_edge.gif deleted file mode 100644 index 7afc740..0000000 Binary files a/topmodx/images/insert_edge.gif and /dev/null differ diff --git a/topmodx/images/insert_edge.mng b/topmodx/images/insert_edge.mng deleted file mode 100644 index 4a348fd..0000000 Binary files a/topmodx/images/insert_edge.mng and /dev/null differ diff --git a/topmodx/images/insert_edge.png b/topmodx/images/insert_edge.png deleted file mode 100644 index 6309e89..0000000 Binary files a/topmodx/images/insert_edge.png and /dev/null differ diff --git a/topmodx/images/internet-web-browser.png b/topmodx/images/internet-web-browser.png deleted file mode 100644 index 10d2ed4..0000000 Binary files a/topmodx/images/internet-web-browser.png and /dev/null differ diff --git a/topmodx/images/mode_basics.png b/topmodx/images/mode_basics.png deleted file mode 100644 index 2a63196..0000000 Binary files a/topmodx/images/mode_basics.png and /dev/null differ diff --git a/topmodx/images/mode_extrusion.png b/topmodx/images/mode_extrusion.png deleted file mode 100644 index a2fce76..0000000 Binary files a/topmodx/images/mode_extrusion.png and /dev/null differ diff --git a/topmodx/images/mode_highgenus.png b/topmodx/images/mode_highgenus.png deleted file mode 100644 index 5fb3dd3..0000000 Binary files a/topmodx/images/mode_highgenus.png and /dev/null differ diff --git a/topmodx/images/mode_remeshing.png b/topmodx/images/mode_remeshing.png deleted file mode 100644 index ebc21b8..0000000 Binary files a/topmodx/images/mode_remeshing.png and /dev/null differ diff --git a/topmodx/images/mode_texturing.png b/topmodx/images/mode_texturing.png deleted file mode 100644 index 162e8e8..0000000 Binary files a/topmodx/images/mode_texturing.png and /dev/null differ diff --git a/topmodx/images/network.png b/topmodx/images/network.png deleted file mode 100644 index 9024dbe..0000000 Binary files a/topmodx/images/network.png and /dev/null differ diff --git a/topmodx/images/open.png b/topmodx/images/open.png deleted file mode 100644 index dfd93c9..0000000 Binary files a/topmodx/images/open.png and /dev/null differ diff --git a/topmodx/images/package-x-generic.png b/topmodx/images/package-x-generic.png deleted file mode 100644 index 4b55b50..0000000 Binary files a/topmodx/images/package-x-generic.png and /dev/null differ diff --git a/topmodx/images/package-x-generic.svg b/topmodx/images/package-x-generic.svg deleted file mode 100644 index dced3c4..0000000 --- a/topmodx/images/package-x-generic.svg +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Package - - - Jakub Steiner - - - http://jimmac.musichall.cz/ - - - package - archive - tarball - tar - bzip - gzip - zip - arj - tar - jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/placeholder.png b/topmodx/images/placeholder.png deleted file mode 100644 index d99af71..0000000 Binary files a/topmodx/images/placeholder.png and /dev/null differ diff --git a/topmodx/images/preferences-system.png b/topmodx/images/preferences-system.png deleted file mode 100644 index 6e52db7..0000000 Binary files a/topmodx/images/preferences-system.png and /dev/null differ diff --git a/topmodx/images/preferences-system.svg b/topmodx/images/preferences-system.svg deleted file mode 100644 index a6183e8..0000000 --- a/topmodx/images/preferences-system.svg +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Preferences System - - - preferences - settings - control panel - tweaks - system - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/prim_cube.png b/topmodx/images/prim_cube.png deleted file mode 100644 index 7c5f2e2..0000000 Binary files a/topmodx/images/prim_cube.png and /dev/null differ diff --git a/topmodx/images/prim_dodecahedron.png b/topmodx/images/prim_dodecahedron.png deleted file mode 100644 index c312caa..0000000 Binary files a/topmodx/images/prim_dodecahedron.png and /dev/null differ diff --git a/topmodx/images/prim_geodesic.png b/topmodx/images/prim_geodesic.png deleted file mode 100644 index 0a083e1..0000000 Binary files a/topmodx/images/prim_geodesic.png and /dev/null differ diff --git a/topmodx/images/prim_icosahedron.png b/topmodx/images/prim_icosahedron.png deleted file mode 100644 index 3f29cb7..0000000 Binary files a/topmodx/images/prim_icosahedron.png and /dev/null differ diff --git a/topmodx/images/prim_octahedron.png b/topmodx/images/prim_octahedron.png deleted file mode 100644 index fb510c9..0000000 Binary files a/topmodx/images/prim_octahedron.png and /dev/null differ diff --git a/topmodx/images/prim_soccerball.png b/topmodx/images/prim_soccerball.png deleted file mode 100644 index 31db944..0000000 Binary files a/topmodx/images/prim_soccerball.png and /dev/null differ diff --git a/topmodx/images/prim_tetrahedron.png b/topmodx/images/prim_tetrahedron.png deleted file mode 100644 index a8e4c0b..0000000 Binary files a/topmodx/images/prim_tetrahedron.png and /dev/null differ diff --git a/topmodx/images/printer.svg b/topmodx/images/printer.svg deleted file mode 100644 index 017f0e8..0000000 --- a/topmodx/images/printer.svg +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Printer - - - Jakub Steiner - - - - http://jimmac.musichall.cz - - - printer - local - laser - bubblejet - inkjet - print - output - cups - lpd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/redo.png b/topmodx/images/redo.png deleted file mode 100644 index 48117b8..0000000 Binary files a/topmodx/images/redo.png and /dev/null differ diff --git a/topmodx/images/run_script.png b/topmodx/images/run_script.png deleted file mode 100644 index 0c3f021..0000000 Binary files a/topmodx/images/run_script.png and /dev/null differ diff --git a/topmodx/images/saveas.png b/topmodx/images/saveas.png deleted file mode 100644 index 4f7d907..0000000 Binary files a/topmodx/images/saveas.png and /dev/null differ diff --git a/topmodx/images/sculpting-cutedges.png b/topmodx/images/sculpting-cutedges.png deleted file mode 100644 index 21a3c6e..0000000 Binary files a/topmodx/images/sculpting-cutedges.png and /dev/null differ diff --git a/topmodx/images/sculpting-cutfaces.png b/topmodx/images/sculpting-cutfaces.png deleted file mode 100644 index 0d3957f..0000000 Binary files a/topmodx/images/sculpting-cutfaces.png and /dev/null differ diff --git a/topmodx/images/sculpting-cutvertices.png b/topmodx/images/sculpting-cutvertices.png deleted file mode 100644 index e6a9822..0000000 Binary files a/topmodx/images/sculpting-cutvertices.png and /dev/null differ diff --git a/topmodx/images/selection-mask-corners.png b/topmodx/images/selection-mask-corners.png deleted file mode 100644 index fdd2581..0000000 Binary files a/topmodx/images/selection-mask-corners.png and /dev/null differ diff --git a/topmodx/images/selection-mask-edges.png b/topmodx/images/selection-mask-edges.png deleted file mode 100644 index 7e84315..0000000 Binary files a/topmodx/images/selection-mask-edges.png and /dev/null differ diff --git a/topmodx/images/selection-mask-faces.png b/topmodx/images/selection-mask-faces.png deleted file mode 100644 index 327e788..0000000 Binary files a/topmodx/images/selection-mask-faces.png and /dev/null differ diff --git a/topmodx/images/selection-mask-vertices.png b/topmodx/images/selection-mask-vertices.png deleted file mode 100644 index 0d7368d..0000000 Binary files a/topmodx/images/selection-mask-vertices.png and /dev/null differ diff --git a/topmodx/images/selection-options.png b/topmodx/images/selection-options.png deleted file mode 100644 index f328150..0000000 Binary files a/topmodx/images/selection-options.png and /dev/null differ diff --git a/topmodx/images/splash.png b/topmodx/images/splash.png deleted file mode 100644 index eff9e1f..0000000 Binary files a/topmodx/images/splash.png and /dev/null differ diff --git a/topmodx/images/splash.psd b/topmodx/images/splash.psd deleted file mode 100644 index e31dbbd..0000000 Binary files a/topmodx/images/splash.psd and /dev/null differ diff --git a/topmodx/images/splice_corners.png b/topmodx/images/splice_corners.png deleted file mode 100644 index b2847f2..0000000 Binary files a/topmodx/images/splice_corners.png and /dev/null differ diff --git a/topmodx/images/subdivide_edge.png b/topmodx/images/subdivide_edge.png deleted file mode 100644 index 04ab775..0000000 Binary files a/topmodx/images/subdivide_edge.png and /dev/null differ diff --git a/topmodx/images/system-search.svg b/topmodx/images/system-search.svg deleted file mode 100644 index f2573ff..0000000 --- a/topmodx/images/system-search.svg +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/topmod.png b/topmodx/images/topmod.png deleted file mode 100644 index ec71d92..0000000 Binary files a/topmodx/images/topmod.png and /dev/null differ diff --git a/topmodx/images/transforms.png b/topmodx/images/transforms.png deleted file mode 100644 index 203d954..0000000 Binary files a/topmodx/images/transforms.png and /dev/null differ diff --git a/topmodx/images/tutorial_01.png b/topmodx/images/tutorial_01.png deleted file mode 100644 index 6b8e156..0000000 Binary files a/topmodx/images/tutorial_01.png and /dev/null differ diff --git a/topmodx/images/tutorial_02.png b/topmodx/images/tutorial_02.png deleted file mode 100644 index 7cc49cf..0000000 Binary files a/topmodx/images/tutorial_02.png and /dev/null differ diff --git a/topmodx/images/tutorial_03.png b/topmodx/images/tutorial_03.png deleted file mode 100644 index 587bdb7..0000000 Binary files a/topmodx/images/tutorial_03.png and /dev/null differ diff --git a/topmodx/images/tutorial_04.png b/topmodx/images/tutorial_04.png deleted file mode 100644 index add1f84..0000000 Binary files a/topmodx/images/tutorial_04.png and /dev/null differ diff --git a/topmodx/images/tutorial_05.png b/topmodx/images/tutorial_05.png deleted file mode 100644 index 8afb2e7..0000000 Binary files a/topmodx/images/tutorial_05.png and /dev/null differ diff --git a/topmodx/images/tutorial_06.png b/topmodx/images/tutorial_06.png deleted file mode 100644 index 599dea1..0000000 Binary files a/topmodx/images/tutorial_06.png and /dev/null differ diff --git a/topmodx/images/tutorial_07.png b/topmodx/images/tutorial_07.png deleted file mode 100644 index c904fd4..0000000 Binary files a/topmodx/images/tutorial_07.png and /dev/null differ diff --git a/topmodx/images/undo.png b/topmodx/images/undo.png deleted file mode 100644 index b162cc5..0000000 Binary files a/topmodx/images/undo.png and /dev/null differ diff --git a/topmodx/images/utilities-terminal.png b/topmodx/images/utilities-terminal.png deleted file mode 100644 index f86c784..0000000 Binary files a/topmodx/images/utilities-terminal.png and /dev/null differ diff --git a/topmodx/images/utilities-terminal.svg b/topmodx/images/utilities-terminal.svg deleted file mode 100644 index 2197700..0000000 --- a/topmodx/images/utilities-terminal.svg +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Terminal - 2005-10-15 - - - Andreas Nilsson - - - - - terminal - emulator - term - command line - - - - - - Jakub Steiner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/images/view-fullscreen.png b/topmodx/images/view-fullscreen.png deleted file mode 100644 index 00e6b83..0000000 Binary files a/topmodx/images/view-fullscreen.png and /dev/null differ diff --git a/topmodx/images/view-fullscreen.svg b/topmodx/images/view-fullscreen.svg deleted file mode 100644 index 2d61d91..0000000 --- a/topmodx/images/view-fullscreen.svg +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - View Fullscreen - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/topmodx/include/Base/BaseObject.h b/topmodx/include/Base/BaseObject.h deleted file mode 100644 index f0ff06c..0000000 --- a/topmodx/include/Base/BaseObject.h +++ /dev/null @@ -1,196 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -// $Id: BaseObject.hh,v 1.5 2002/10/25 15:59:19 vinod Exp $ - -#ifndef _OBJECT_HH_ - -#define _OBJECT_HH_ - -// Abstract base class for all classes -// Can use this class to build container classes, which use object pointers -// So the same container classes can be used with any derived classes also -// without need for additional code - share the same code - -// BaseObject has no member data. It only has protected constructors (to prevent -// instantiation), virtual destructors and an assignment operator - -#include - -#include - -class BaseObject; -typedef BaseObject * BaseObjectPtr; - -class BaseObject -{ -protected: - - // Default constructor - protected to prevent instantiation - BaseObject() - { - // Nothing to do - } - - // Copy constructor - protected to prevent instantiation - BaseObject(const BaseObject&) - { - // Nothing to do - } - -public: - - // Assignment operator - BaseObject& operator = (const BaseObject&) - { - // Nothing to do - - return *this; - } - - // Destructor - virtual ~BaseObject() - { - // Nothing to do - } - - // Derived class should give a meaningful implementation - // for the following functions. - // Classes such as List which use BaseObject pointers - // will use these functions, for memory management - // These functions may be made pure virtual later - - // Make a copy of the BaseObject and return a pointer to the new one - virtual BaseObjectPtr copy(void) const = 0; -}; - -// A reference class for use in container classes -// Based on http://www.cs.southwestern.edu/~owensb/Algo/STL/ref2.html - -class BaseObjectReference -{ -protected: - - BaseObjectPtr referent; // What does this object refer to? - bool owner; // Does this object owns the referent? - -public: - - //--- Constructors ---// - - BaseObjectReference() - : referent(nullptr), owner(true) - { - } - - BaseObjectReference(const BaseObject& obj) - : referent(obj.copy()), owner(true) - { - } - - BaseObjectReference(BaseObjectPtr obj) - : referent(obj), owner(false) - { - } - - BaseObjectReference(const BaseObjectReference& ref) - : referent(ref.referent), owner(ref.owner) - { - if (owner && ref.referent) referent = ref.referent->copy(); - } - - //--- Destructor ---// - - ~BaseObjectReference() - { - if (owner) delete referent; - } - - //--- Assignment operator ---// - - BaseObjectReference& operator = (const BaseObjectReference& ref) - { - if (owner) delete referent; - owner = true; - if (ref.referent) referent = ref.referent->copy(); - return (*this); - } - - //--- Operators ---// - - BaseObjectPtr operator -> () const - { - return referent; - } - - operator BaseObject& () const - { - return *referent; - } - - operator BaseObject * () const - { - return referent; - } - - BaseObject& operator * () const - { - return *referent; - } -}; - -#endif // #ifndef _OBJECT_HH_ - -// $Log: BaseObject.hh,v $ -// Revision 1.5 2002/10/25 15:59:19 vinod -// Removed namespace reference -// -// Revision 1.4 2002/10/25 15:40:47 vinod -// Added preprocessor directies for conditional includes depending on compiler -// -// Revision 1.3 2000/07/20 00:44:36 vinod -// Added BaseObjectReference class -// -// Revision 1.2 2000/02/15 21:57:39 vinod -// Remove unused parameters -// -// Revision 1.1 2000/02/09 21:17:46 vinod -// Moved into Base directory -// -// Revision 1.2 1999/10/18 05:33:26 vinod -// Added typedef. Made copy function const qualified -// -// Revision 1.1.1.1 1999/01/30 22:31:19 vinod -// Utility Classes -// -// Revision 1.1 1998/12/13 21:31:32 vinod -// Abstract Base class -// -// Revision 1.1.1.1 1998/05/03 21:44:53 vinod -// Utility classes, container classes -// diff --git a/topmodx/include/Base/Constants.h b/topmodx/include/Base/Constants.h deleted file mode 100644 index 34c6603..0000000 --- a/topmodx/include/Base/Constants.h +++ /dev/null @@ -1,45 +0,0 @@ -// $Id: Constants.hh,v 1.1 2000/02/09 21:17:47 vinod Exp $ - -#ifndef _CONSTANTS_HH_ - -#define _CONSTANTS_HH_ - -// Predefined constants, and macros -// To change the values of some of these macros, define them before including -// this file. Or dont include this file at all and define them on your own - -// Zero '0' value to be used for comparison and assignment -#ifndef ZERO -#define ZERO 1.0e-10 -#endif - -// float infinity to be used for comparison and assignment -#ifndef FLT_INF -#define FLT_INF 1.0e35 -#endif - -// double infinity to be used for comparison and assignment -#ifndef DBL_INF -#define DBL_INF 1.0e100 -#endif - -#ifndef M_PI -#define M_PI 3.14159265358979323846 // pi -#endif - -#ifndef M_SQRT1_2 -#define M_SQRT1_2 0.707106781186547524401 // 1/sqrt(2) -#endif - -#endif // #ifndef _CONSTANTS_HH_ - -// $Log: Constants.hh,v $ -// Revision 1.1 2000/02/09 21:17:47 vinod -// Moved into Base directory -// -// Revision 1.1.1.1 1999/01/30 22:31:18 vinod -// Utility Classes -// -// Revision 1.2 1999/01/30 21:20:00 vinod -// *** empty log message *** -// diff --git a/topmodx/include/Base/Inlines.h b/topmodx/include/Base/Inlines.h deleted file mode 100644 index 7656ca3..0000000 --- a/topmodx/include/Base/Inlines.h +++ /dev/null @@ -1,346 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -// $Id: Inlines.hh,v 1.4 2002/10/25 15:40:47 vinod Exp $ - -#ifndef _INLINES_HH_ - -#define _INLINES_HH_ - -// Frequently used operations defined as inline functions - -#include "Constants.h" -#include - -typedef unsigned int uint; - - -//--- Inline absolute value functions ---// - -#ifndef _INLINE_ABS_ - -#define _INLINE_ABS_ - -inline int Abs(int x) -{ - return (x < 0) ? -x : x; -} - -inline float Abs(float x) -{ - return (x < 0.0) ? -x : x; -} - -inline double Abs(double x) -{ - return (x < 0.0) ? -x : x; -} - -#endif // #ifndef _INLINE_ABS_ - - - -//--- Checking against zero ---// - -#ifndef _INLINE_ZERO_CHECKS_ - -#define _INLINE_ZERO_CHECKS_ - -inline bool isNonZero(int num) -{ - return ((num != 0) ? true : false); -} - -inline bool isNonZero(double num) -{ - return (((num < -ZERO) || (num > ZERO)) ? true : false); -} - -#endif // #ifndef _INLINE_ZERO_CHECKS_ - - - -//--- Floating point comparison ---// - -#ifndef _INLINE_FP_EQUAL_ - -#define _INLINE_FP_EQUAL_ - -inline bool areEqual(float x1, float x2) -{ - return ((Abs(x1 - x2) < ZERO) ? true : false); -} - -inline bool areEqual(double x1, double x2) -{ - return ((Abs(x1 - x2) < ZERO) ? true : false); -} - -#endif // #ifndef _INLINE_FP_EQUAL_ - - - -//--- Checking for odd and even numbers ---// - -#ifndef _INLINE_ODD_EVEN_ - -#define _INLINE_ODD_EVEN_ - -inline bool isOdd(int num) -{ - return ((num % 2) ? true : false); -} - -inline bool isEven(int num) -{ - return ((num % 2) ? false : true); -} - -inline bool isOdd(uint num) -{ - return ((num % 2) ? true : false); -} - -inline bool isEven(uint num) -{ - return ((num % 2) ? false : true); -} - -#endif // #ifndef _INLINE_ODD_EVEN_ - - -//--- Mathematical subroutines ---// - -#ifndef _INLINE_MATH_ - -#define _INLINE_MATH_ - -inline int sqr(int x) -{ - return x*x; -} - -inline int cube(int x) -{ - return x*x*x; -} - -inline uint sqr(uint x) -{ - return x*x; -} - -inline uint cube(uint x) -{ - return x*x*x; -} - -inline float sqr(float x) -{ - return x*x; -} - -inline float cube(float x) -{ - return x*x*x; -} - -inline double sqr(double x) -{ - return x*x; -} - -inline double cube(double x) -{ - return x*x*x; -} - -#endif // #ifndef _INLINE_MATH_ - -//--- Swap two numbers ---// - -#ifndef _INLINE_SWAP_ - -#define _INLINE_SWAP_ - -inline void swap(int& x, int& y) -{ - int t = x; x = y; y = t; -} - -inline void swap(uint& x, uint& y) -{ - uint t = x; x = y; y = t; -} - -inline void swap(float& x, float& y) -{ - float t = x; x = y; y = t; -} - -inline void swap(double& x, double& y) -{ - double t = x; x = y; y = t; -} - -#endif // #ifndef _INLINE_SWAP_ - - - -//--- Conversion between radians and angles ---// - -#ifndef _INLINE_DEG_RAD_ - -#define _INLINE_DEG_RAD_ - -inline float deg2rad(float deg) -{ - return deg*M_PI / 180.0; -} - -inline double deg2rad(double deg) -{ - return deg*M_PI / 180.0; -} - -inline float rad2deg(float rad) -{ - return rad*180.0 / M_PI; -} - -inline double rad2deg(double rad) -{ - return rad*180.0 / M_PI; -} - -#endif // #ifndef _INLINE_DEG_RAD_ - - - -//--- Sign of numbers ---// - -#ifndef _INLINE_SIGN_ - -#define _INLINE_SIGN_ - -inline int sign(int x) -{ - return ((x < 0) ? -1 : ((x > 0) ? 1 : 0)); -} - -inline float sign(float x) -{ - return ((x < 0.0) ? -1.0 : ((x > 0.0) ? 1.0 : 0.0)); -} - -inline double sign(double x) -{ - return ((x < 0.0) ? -1.0 : ((x > 0.0) ? 1.0 : 0.0)); -} - -// For matrices - sign of cofactor. 1 if i+j is even, -1 if i+j is odd -inline int cofsign(int i, int j) -{ - return (((i + j) % 2) ? -1 : 1); -} - -inline int cofsign(uint i, uint j) -{ - return (((i + j) % 2) ? -1 : 1); -} - -#endif // #ifndef _INLINE_SIGN_ - - -//--- Wrap a given integer to lie between 0 and size-1 ---// -// Assumes that the specified size is > 0 - -#ifndef _INLINE_WRAP_ - -#define _INLINE_WRAP_ - -inline int wrap(int i, int size) -{ - int retval = (i%size); - return ((retval >= 0) ? retval : size + retval); -} - -#endif // #ifndef _INLINE_WRAP_ - - -#endif // #ifndef _INLINES_HH_ - -// $Log: Inlines.hh,v $ -// Revision 1.4 2002/10/25 15:40:47 vinod -// Added preprocessor directies for conditional includes depending on compiler -// -// Revision 1.3 2000/04/19 06:48:17 vinod -// Removed unecessary wrap overload. Bug fix on #ifndef -// -// Revision 1.2 2000/04/18 05:44:41 vinod -// Added wrap function -// -// Revision 1.1 2000/02/09 21:17:47 vinod -// Moved into Base directory -// -// Revision 1.11 2000/02/09 06:42:13 vinod -// Added macros to prevent multiple definitions of specific blocks of fns -// -// Revision 1.10 2000/02/04 21:47:11 vinod -// Added Abs and areEqual functions -// -// Revision 1.9 2000/01/21 18:42:54 vinod -// *** empty log message *** -// -// Revision 1.8 1999/10/18 04:35:01 vinod -// Added cofsign function -// -// Revision 1.7 1999/04/30 05:34:45 vinod -// Made sign functions inline -// -// Revision 1.6 1999/04/30 05:29:48 vinod -// Added sign functions -// -// Revision 1.5 1999/04/03 21:40:54 vinod -// Added functions for conversion between degrees and radians -// -// Revision 1.4 1999/04/02 07:34:59 vinod -// Added functions to check odd/even nos -// -// Revision 1.3 1999/04/01 06:46:29 vinod -// Added swap functions -// -// Revision 1.2 1999/02/11 07:20:39 vinod -// Made functions actually inline -// -// Revision 1.1.1.1 1999/01/30 22:31:19 vinod -// Utility Classes -// -// Revision 1.4 1999/01/30 21:19:44 vinod -// *** empty log message *** -// diff --git a/topmodx/include/Base/StreamIO.h b/topmodx/include/Base/StreamIO.h deleted file mode 100644 index 0fb5f7f..0000000 --- a/topmodx/include/Base/StreamIO.h +++ /dev/null @@ -1,216 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -// $Id: StreamIO.hh,v 1.9 2003/10/22 02:10:26 vinod Exp $ - -#ifndef _STREAMIO_HH_ - -#define _STREAMIO_HH_ - -// Miscellaneous functions for operating on IO streams in C++ - -#include -#include -#include - -using namespace std; - -inline void removeWhiteSpace(istream& i) -{ - char c; - - while (i) - { - i.get(c); - if (c != ' ' && c != '\t' && c != '\n') - { - i.putback(c); - break; - } - } -} - -inline void removeSpaces(istream& i) -{ - char c; - - while (i) - { - i.get(c); - if (c != ' ') - { - i.putback(c); - break; - } - } -} - -inline void removeSpacesAndTabs(istream& i) -{ - char c; - - while (i) - { - i.get(c); - if (c != ' ' && c != '\t') - { - i.putback(c); - break; - } - } -} - -inline bool readTillEOL(istream& i) -{ - // Read till newline character occurs or EOF is reached - // newline character is also read from the stream - // Returns false if EOF is reached before EOL, true otherwise - char c; - - i.get(c); - while (i && c != '\n') - i.get(c); - if (c == '\n') return true; - return false; -} - -inline bool readTill(istream& i, char c) -{ - // Read till specified character occurs or EOL/EOF is reached - // Specified character is left in the stream - // If EOF/EOL occurs before c, returns false, true otherwise - char ic = i.peek(); - while (i && ic != c && ic != '\n') - { - i.get(ic); ic = i.peek(); - } - if (ic == c) return true; - return false; -} - -inline bool readTillNumeric(istream& i) -{ - // Read till a numeric digit (0-9) occurs or EOL/EOF is reached - // If EOL/EOF is reached before a digit occurs, returns false - // and leaves the EOL/EOF character in i. If a digit is reached - // returns true and leaves the digit in i - char ic = i.peek(); - while (i && !isdigit(ic) && ic != '\n') - { - i.get(ic); ic = i.peek(); - } - if (isdigit(ic)) return true; - return false; -} - -inline bool readTillDigit(istream& i) -{ - // Read till a digit or plus/minus sign occurs or EOL/EOF is reached - // If EOL/EOF is reached before a digit occurs, returns false - // and leaves the EOL/EOF character in i. If a digit is reached - // returns true and leaves the digit in i - char ic = i.peek(); - while (i && !isdigit(ic) && ic != '+' && ic != '-' && ic != '\n') - { - i.get(ic); ic = i.peek(); - } - if (isdigit(ic) || ic == '+' || ic == '-') return true; - return false; -} - -inline bool readTillFloat(istream& i) -{ - // Same as previous subroutine, except that '.' is also allowed - char ic = i.peek(); - while (i && !isdigit(ic) && ic != '+' && ic != '-' && ic != '.' && ic != '\n') - { - i.get(ic); ic = i.peek(); - } - if (isdigit(ic) || ic == '+' || ic == '-' || ic == '.') return true; - return false; -} - -inline int strcasecmp(const char *a, const char *b) -{ - int ca, cb; - do - { - ca = (unsigned char)*a++; - cb = (unsigned char)*b++; - ca = tolower(toupper(ca)); - cb = tolower(toupper(cb)); - } while (ca == cb && ca != '\0'); - return ca - cb; -} - -#endif // #ifndef _STREAMIO_HH_ - -// $Log: StreamIO.hh,v $ -// Revision 1.9 2003/10/22 02:10:26 vinod -// Moved using namespace std line into ifndef so it is included only for GNU compilers -// -// Revision 1.8 2003/10/22 01:22:07 vinod -// Added namespace specification -// -// Revision 1.7 2002/10/25 15:40:47 vinod -// Added preprocessor directies for conditional includes depending on compiler -// -// Revision 1.6 2000/07/20 00:45:20 vinod -// Added readTillNumeric -// -// Revision 1.5 2000/04/20 04:23:01 vinod -// Fixed readTillDigit and readTillFloat to recognize plus/minus signs also -// -// Revision 1.4 2000/04/19 20:42:44 vinod -// Added readTillFloat -// -// Revision 1.3 2000/04/19 19:32:15 vinod -// Modified readTill functions to return a true/false -// Added readTillDigit function -// -// Revision 1.2 2000/03/23 05:08:02 vinod -// Added readTill function to read till a given character -// -// Revision 1.1 2000/02/09 21:17:47 vinod -// Moved into Base directory -// -// Revision 1.4 1999/10/08 22:25:34 vinod -// Added readTillEOL -// -// Revision 1.3 1999/02/13 07:55:56 vinod -// Added 2 new functions, changed removeWhiteSpace to remove newlines and tabs also -// -// Revision 1.2 1999/02/11 07:20:39 vinod -// Made functions actually inline -// -// Revision 1.1.1.1 1999/01/30 22:31:19 vinod -// Utility Classes -// -// Revision 1.2 1999/01/30 21:19:46 vinod -// *** empty log message *** -// diff --git a/topmodx/include/Camera2.cc b/topmodx/include/Camera2.cc deleted file mode 100644 index c215fc2..0000000 --- a/topmodx/include/Camera2.cc +++ /dev/null @@ -1,667 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "Camera2.hh" - -/*! -* -* \class Camera2 -* \brief Camera class from Chris Root used as an alternative to the original TopMod camera class -* -* has an error when the aim and position vectors are not at the same y-value. \todo fix the camera2 class up vector problem -* -*/ - -float DeltaAzim; -float DeltaElev; -float LocalDeltaAzim; -float LocalDeltaElev; - -int MouseStartX; -int MouseStartY; -int MousePrevX; -int MousePrevY; - -float epsilon = 0.0001; - -GLdouble MvMatrix[16]; -GLdouble ProjMatrix[16]; -GLint ViewPort[4]; - -int CameraMode = INACTIVE; - -Vector3d PrevMousePos; - -/*! -* -* \brief rotate a vector around the X-axis -* -* @param v the vector to rotate -* @param degree amount of degrees to rotate about the Y-axis -* -*/ -void RotateX(Vector3d *v, float degree){ - float c=cos(3.1415926*degree/180); - float s=sin(3.1415926*degree/180); - float v1=(*v)[1]*c-(*v)[2]*s; - float v2=(*v)[1]*s+(*v)[2]*c; - (*v)[1]=v1; (*v)[2]=v2; -} - -/*! -* -* \brief rotate a vector around the Y-axis -* -* @param v the vector to rotate -* @param degree amount of degrees to rotate about the Y-axis -* -*/ -void RotateY(Vector3d *v, float degree){ - float c=cos(3.1415926*degree/180); - float s=sin(3.1415926*degree/180); - float v0=(*v)[0]*c+(*v)[2]*s; - float v2=-(*v)[0]*s+(*v)[2]*c; - (*v)[0]=v0; (*v)[2]=v2; -} - -/*! -* -* ArbitraryRotate() - rotate around an arbitrary coordinate system specified by -* -* @param U the up vector -* @param V not sure -* @param W not sure -* @param degreeX amount of degrees to rotate about the Y-axis -* @param degreeY amount of degrees to rotate about the Y-axis -* @param point the new position of the camera passed by reference -* @param aim the camera aim vector -*/ -void ArbitraryRotate(Vector3d U, Vector3d V, Vector3d W, float degreeX, float degreeY, Vector3d& point, Vector3d aim) { - float cx=cos(M_PI*degreeX/180); - float sx=sin(M_PI*degreeX/180); - float cy=cos(M_PI*degreeY/180); - float sy=sin(M_PI*degreeY/180); - - Matrix4x4 trans; - // Vector4d(double val1, double val2, double val3, double val4) - - trans.set( Vector4d(1.f, 0.f, 0.f, -aim[0]), - Vector4d(0.f, 1.f, 0.f, -aim[1]), - Vector4d(0.f, 0.f, 1.f, -aim[2]), - Vector4d(0.f, 0.f, 0.f, 1.f)); - - Matrix4x4 mat; - mat.set( Vector4d(U[0], U[1], U[2], 0.f), - Vector4d(V[0], V[1], V[2], 0.f), - Vector4d(W[0], W[1], W[2], 0.f), - Vector4d(0.f, 0.f, 0.f, 1.f) ); - - Matrix4x4 rot; - Vector4d pos(point[0], point[1], point[2], 1); - - pos = trans*pos; - - pos = mat*pos; - - rot.set( Vector4d(1, 0, 0, 0), - Vector4d(0, cx, sx, 0), - Vector4d(0, -sx, cx, 0), - Vector4d(0, 0, 0, 1) ); - - pos = rot*pos; - - rot.set( Vector4d(cy, 0, sy,0), - Vector4d(0, 1, 0,0), - Vector4d(-sy, 0, cy,0), - Vector4d(0, 0, 0, 1) ); - - pos = rot*pos; - - pos = inverse( mat ) * pos; - - pos = inverse( trans) * pos; - - point.set( pos[0], pos[1], pos[2] ); - -} - - - - -/*! -* \brief default constructor... sets position to 0, 0, 5, aimed at the origin with the up vector set to the y axis -*/ -Camera2::Camera2() -: mousex(0), mousey(0), pickw(0), pickh(0), viewport(NULL), pickmode(false) { - - Pos.set(0, 5, 15); - Aim.set(0, 5, 0); - Up.set(0, 1, 0); - - // set default view volume - NearPlane = 1.0; - FarPlane = 1000.0; - Fov = 60.0; - - Initialize(); -} - -/*! -* \brief constructor to set a camera to a desired orientation -* -* @param P position in 3D -* @param A the aim coordinate -* @param U the up vector -* -*/ -Camera2::Camera2(Vector3d P, Vector3d A, Vector3d U) -: mousex(0), mousey(0), pickw(0), pickh(0), viewport(NULL), pickmode(false) { - - Vector3d dir = A-P; - normalize( dir ); - Vector3d up = U; - normalize( up ); - float dot = dir*up; - - // up vector and aim vector aren't perpendicular - if (fabs(dot) > epsilon) { - fprintf (stderr, "Improper camera orientation. Can't create camera!\n"); - this->~Camera2(); - return; - } else if (dir[2] != 0.0) { - up[2] = -(up[0]*dir[0] + up[1]*dir[1])/dir[2]; - } - - Pos = P; - Aim = A; - Up = up; - - // set default view volume - NearPlane = 1.0; - FarPlane = 1000.0; - Fov = 60.0; - - Initialize(); -} - -/*! -* \brief Constructor setting up camera orientation and view volume -* -* @param P is position in 3D -* @param A is aim coordinate in 3D -* @param U is up vector -* @param Near is near clipping plane -* @param Far is far clipping plane -* @param ViewAngle is field of view angle in degrees -* -*/ -Camera2::Camera2( Vector3d P, Vector3d A, Vector3d U, float Near, float Far, float ViewAngle) - : mousex(0), mousey(0), pickw(0), pickh(0), viewport(NULL), pickmode(false) { - - Vector3d aMinusP = A-P; - normalize( aMinusP ); - Vector3d Up = U; - - // orientation of camera isn't perpendicular - if( aMinusP*Up > epsilon) { - fprintf (stderr, "Improper camera orientation. Can't create camera!\n"); - this->~Camera2(); - return; - } - - Pos = P; - Aim = A; - - NearPlane = Near; - FarPlane = Far; - Fov = ViewAngle; - - Initialize(); -} - - -/*! -* \brief Initialize routine setting up defaults -*/ -void Camera2::Initialize() { - Vector3d tmp, tmp1, tmp2; - Vector3d axisOrigin, updatePos; - float dist; - - DefaultPos = Pos; - DefaultAim = Aim; - DefaultUp = Up; - - // find the angle around the x axis - updatePos = Pos - Aim; - axisOrigin.set(updatePos[0], 0, 0); - Vector3d t = axisOrigin - updatePos; - dist = sqrt(t.lengthsqr()); - tmp1.set(updatePos[0], 0, dist); - - tmp = updatePos; - normalize(tmp); - normalize(tmp1); - - CurrentElev = rad2deg( acos(tmp*tmp1) ); - - // find the angle around the y axis - axisOrigin.set(0, updatePos[1], 0); - t = axisOrigin - updatePos; - dist = sqrt(t.lengthsqr()); - // dist = sqrt(lengthsqr(axisOrigin-updatePos)); - - tmp2.set(0, updatePos[1], dist); - normalize(tmp2); - - CurrentAzim = 360.0 - rad2deg(acos( tmp2*tmp) ); - - DefaultElev = CurrentElev; - DefaultAzim = CurrentAzim; - -} - -/*! -* \brief set functions for Pos vector -* -* \note be careful with these because if you set either of them which causes the -* orientation of the camera to be un-orthogonal, then you'll see problems.just -* remember that (Aim - Pos).normalize() % Up == 0, or you'll see problems -* -*/ -void Camera2::SetPos(Vector3d P) { - Pos = P; -} - -/*! -* \brief set functions for Aim vector -* -* \note be careful with these because if you set either of them which causes the -* orientation of the camera to be un-orthogonal, then you'll see problems.just -* remember that (Aim - Pos).normalize() % Up == 0, or you'll see problems -* -*/ -void Camera2::SetAim(Vector3d A) { - Aim = A; -} - -/*! -* \brief set functions for Up vector -* -* \note be careful with these because if you set either of them which causes the -* orientation of the camera to be un-orthogonal, then you'll see problems.just -* remember that (Aim - Pos).normalize() % Up == 0, or you'll see problems -* -*/ -void Camera2::SetUp(Vector3d U) { - Up = U; -} - -/*! -* \brief sets the near and far clipping planes for the camera view -*/ -void Camera2::SetClippingPlanes(float Near, float Far) { - NearPlane = Near; - FarPlane = Far; -} - -/*! -* \brief sets the field of view of the camera, -* -* @param ViewAngle is in degrees -* -*/ -void Camera2::SetFOV(float ViewAngle) { - Fov = ViewAngle; -} - -/*! -* \brief resets the camera to its original orientation -*/ -void Camera2::Reset() { - Pos = DefaultPos; - Aim = DefaultAim; - Up = DefaultUp; - - CurrentElev = DefaultElev; - CurrentAzim = DefaultAzim; -} - -/*! -* \brief sets the camera's aim to be the given vector NewAim -*/ -void Camera2::SetCenterOfFocus(Vector3d NewAim) { - Vector3d dif = NewAim - Aim; - - Aim = NewAim; - Pos = Pos + dif; -} - -/*! -* \brief Enter selection mode and set the pick region for doing selection -* -* @param x x-coordinate of mouse -* @param y y-coordinate of mouse -* @param w width of the selection region -* @param h height of the selection region -* @param vp the viewport to select from -* -*/ -void Camera2::enterSelectionMode(double x, double y, double w, double h, GLint * vp) { - mousex = x; mousey = y; pickw = w; pickh = h; viewport = vp; - pickmode = true; -} - -/*! -* \brief no longer in selection (or picking) mode -*/ -void Camera2::leaveSelectionMode(void) { - pickmode = false; viewport = NULL; -} - -/*! -* \brief function to use the camera as the opengl camera -* -* @param W width of the viewport window -* @param H height of the viewport window -* -*/ -void Camera2::PerspectiveDisplay(int W, int H) { - // set up the projection matrix - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if ( pickmode ){ - gluPickMatrix(mousex, mousey, pickw, pickh, viewport); - } - gluPerspective(Fov, (float) W/(float) H, NearPlane, FarPlane); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity( ); - gluLookAt(Pos[0], Pos[1], Pos[2], Aim[0], Aim[1], Aim[2], Up[0], Up[1], Up[2]); -} - -/*! -* \brief function that handles mouse events -* -* @param button which button was pressed or released -* @param state was the mouse pressed, released or dragged? -* @param x the global x position of the mouse event -* @param y the global y position of the mouse event -* @param delta the amount the scroll wheel was moved if any -* -*/ -void Camera2::HandleMouseEvent(Qt::MouseButton button, QEvent::Type state, int x, int y, int delta) { - float realy; - double wx, wy, wz; - - // check to see if the ALT key has been used - // int modstate = SDL_GetModState( ); - - if (state == QEvent::MouseButtonRelease && CameraMode != INACTIVE) { - // update the elevation and roll of the camera - CurrentElev += DeltaElev; - CurrentAzim += DeltaAzim; - - //printf("%f %f\n", CurrentElev, CurrentAzim); - - // reset the change in elevation and roll of the camera - DeltaElev = DeltaAzim = 0.0; - - CameraMode = INACTIVE; - } - else if (state == QEvent::MouseButtonPress && QApplication::keyboardModifiers() == Qt::AltModifier ) { - // set the new mouse state - MouseStartX = MousePrevX = x; - MouseStartY = MousePrevY = y; - - // alt key and mouse button have been pressed, camera will move - - switch (button) { - case Qt::LeftButton: - // rotating camera - CameraMode = ROTATE; - break; - case Qt::MidButton: - if( QApplication::keyboardModifiers() == Qt::ShiftModifier ) { // Stupid little hack since Mac makes alt+LMB == MMB - CameraMode = ROTATE; - break; - } - // translating camera: - CameraMode = TRANSLATE; - - // get the modelview and projection matrices for projection - // of the mouse's cursor into 3D - glGetIntegerv(GL_VIEWPORT, ViewPort); - glGetDoublev(GL_MODELVIEW_MATRIX, MvMatrix); - glGetDoublev(GL_PROJECTION_MATRIX, ProjMatrix); - - // viewport[3] is height of window in pixels - realy = ViewPort[3] - y - 1; - - // project the aim of the camera into window coordinates - // only concerned about getting the depth (wz) from here - gluProject( Aim[0], Aim[1], Aim[2], MvMatrix, ProjMatrix, ViewPort, &wx, &wy, &wz); - - double mp0, mp1, mp2; - mp0 = PrevMousePos[0]; mp1 = PrevMousePos[1]; mp2 = PrevMousePos[2]; - - // from the depth found from the previous call, project the - // mouse coordinates into 3D coordinates - gluUnProject((GLfloat)x,(GLfloat)realy,wz,MvMatrix,ProjMatrix,ViewPort,&mp0, &mp1, &mp2); - - PrevMousePos[0] = (float) mp0; - PrevMousePos[1] = (float) mp1; - PrevMousePos[2] = (float) mp2; - break; - - case Qt::RightButton: - // zooming camera: - CameraMode = ZOOM; - break; - }// end switch (button) -} -else if (state == QEvent::MouseButtonPress && QApplication::keyboardModifiers() == (Qt::AltModifier | Qt::ShiftModifier) ) { - switch(button){ - case Qt::LeftButton: - // translating camera: - CameraMode = TRANSLATE; - - // get the modelview and projection matrices for projection - // of the mouse's cursor into 3D - glGetIntegerv(GL_VIEWPORT, ViewPort); - glGetDoublev(GL_MODELVIEW_MATRIX, MvMatrix); - glGetDoublev(GL_PROJECTION_MATRIX, ProjMatrix); - - // viewport[3] is height of window in pixels - realy = ViewPort[3] - y - 1; - - // project the aim of the camera into window coordinates - // only concerned about getting the depth (wz) from here - gluProject( Aim[0], Aim[1], Aim[2], MvMatrix, ProjMatrix, ViewPort, &wx, &wy, &wz); - - double mp0, mp1, mp2; - mp0 = PrevMousePos[0]; mp1 = PrevMousePos[1]; mp2 = PrevMousePos[2]; - - // from the depth found from the previous call, project the - // mouse coordinates into 3D coordinates - gluUnProject((GLfloat)x,(GLfloat)realy,wz,MvMatrix,ProjMatrix,ViewPort,&mp0, &mp1, &mp2); - - PrevMousePos[0] = (float) mp0; - PrevMousePos[1] = (float) mp1; - PrevMousePos[2] = (float) mp2; - break; - }; -} -} - -/*! -* \brief function that handles mouse scroll wheel events -* -* @param delta the amount the scroll wheel moved in degrees. i think. -* -*/ -void Camera2::HandleMouseWheel(int delta){ - // mouse wheel scrolled, sent delta in 1/8ths of a degree - // camera is zooming in - float z = (float) delta/3000.0; - - Vector3d dir = Aim - Pos; - - if (sqrt(dir.lengthsqr()) < 0.1 && z > 0) { - // move the aim position too when you get in really close - z *= 10.0; - Aim = Aim + z*dir; - } - // update the new position - Pos = Pos + z*dir; -} - -/*! -* \brief function that handles mouse movements -* -* @param x the global x position of the mouse event -* @param y the global y position of the mouse event -* -*/ -void Camera2::HandleMouseMotion(int x, int y ) { - int mouse_dx, mouse_dy, d; - float z; - Vector3d MousePos, dir; - Vector3d WindowX, WindowY, WindowZ; - float realy; - double wx, wy, wz; - - if (CameraMode != INACTIVE) { - - // find the greates change in mouse position - mouse_dx = x - MousePrevX; - mouse_dy = y - MousePrevY; - - if (abs(mouse_dx) > abs(mouse_dy)) - d = mouse_dx; - else - d = mouse_dy; - - switch (CameraMode) { - case ZOOM: - // camera is zooming in - z = (float) d/100.0; - - dir = Aim - Pos; - - if (sqrt(dir.lengthsqr()) < 0.1 && z > 0) { - // move the aim position too when you get in really close - z *= 10.0; - Aim = Aim + z*dir; - } - - // update the new position - Pos = Pos + z*dir; - break; - case ROTATE: - // camera is rotating - // get rate of change in screen coordinates from when the - // mouse was first pressed - DeltaAzim = ((float) (x - MouseStartX))/3.0; - DeltaElev = ((float) (y - MouseStartY))/3.0; - - // get rate of change in screen coordinate from prev mouse pos - LocalDeltaAzim = ((float) mouse_dx)/3.0; - LocalDeltaElev = ((float) mouse_dy)/3.0; - - // rotate the window coordinate system by the rate of change - // from the onset of the mouse event - - // got this small section of code from Dr. House - WindowX.set(1, 0, 0); - WindowY.set(0, 1, 0); - - RotateX(&WindowX, CurrentElev+DeltaElev); - RotateY(&WindowX, CurrentAzim+DeltaAzim); - WindowX[2] = -WindowX[2]; - - RotateX(&WindowY, CurrentElev+DeltaElev); - RotateY(&WindowY, CurrentAzim+DeltaAzim); - WindowY[2] = -WindowY[2]; - - WindowZ = WindowX%WindowY; - normalize(WindowZ); - - ArbitraryRotate(WindowX, WindowY, WindowZ, - LocalDeltaElev, 0, Pos, Aim); - - ArbitraryRotate(Vector3d(1, 0, 0), Vector3d(0, 1, 0), - Vector3d(0, 0, 1), 0, -LocalDeltaAzim, Pos, Aim); - - Up = WindowY; - normalize(Up); - - break; - case TRANSLATE: - // camera is translating - realy = ViewPort[3] - y - 1; - - gluProject( Aim[0], Aim[1], Aim[2], MvMatrix, ProjMatrix, ViewPort, &wx, &wy, &wz); - - double mp0, mp1, mp2; - mp0 = MousePos[0]; mp1 = MousePos[1]; mp2 = MousePos[2]; - - gluUnProject((GLfloat) x, (GLfloat) realy, wz, MvMatrix, ProjMatrix, ViewPort,&mp0, &mp1, &mp2); - - MousePos[0] = (float) mp0; - MousePos[1] = (float) mp1; - MousePos[2] = (float) mp2; - - // move both the camera position and its aim coordinate - dir = MousePos - PrevMousePos; - Pos = Pos - dir; - Aim = Aim - dir; - - PrevMousePos = MousePos; - break; - } - - MousePrevX = x; - MousePrevY = y; - } -} - -/*! -* \brief equals operator -*/ -const Camera2& Camera2::operator=(const Camera2& Cam) { - Aim = Cam.Aim; - Pos = Cam.Pos; - Up = Cam.Up; - - return *this; -} diff --git a/topmodx/include/Camera2.h b/topmodx/include/Camera2.h deleted file mode 100644 index 70e9e79..0000000 --- a/topmodx/include/Camera2.h +++ /dev/null @@ -1,120 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _CAMERA_HH -#define _CAMERA_HH - -#include -#include - -#ifdef __APPLE__ -#include -#include -#else -#include -#include -#endif -#include -#include -#include -#include "Base/Inlines.hh" - -#define INACTIVE 0 -#define TRANSLATE 1 -#define ROTATE 2 -#define ZOOM 3 - -void ArbitraryRotate(Vector3d U, Vector3d V, Vector3d W, float degreeX, float degreeY, Vector3d& point, Vector3d aim); - -class Camera2 { -private: - Vector3d DefaultPos; //!< used if the camera is reset to its initial Position - Vector3d DefaultAim; //!< used if the camera is reset to its initial Aim - Vector3d DefaultUp; //!< used if the camera is reset to its initial Up vector - - float DefaultAzim; //!< used if the camera is reset to its initial azimuth - float DefaultElev; //!< used if the camera is reset to its initial elevation - - float CurrentAzim; //!< the current Azimuth - float CurrentElev; //!< current elevation - - void Initialize(); - - // For GL selection mode - double mousex, mousey, pickw, pickh; //!< Selection region for gluPickMatrix - GLint * viewport; //!< The viewport - bool pickmode; //!< Are we in selection mode? - - char* m_name; //!< does the camera have a name? -public: - Vector3d Pos; //!< the camera's position in world space - Vector3d Aim; //!< the camera's aim vector, almost always 0,0,0 - Vector3d Up; //!< up vector must be perpendicular to position-aim - - float NearPlane; //!< does the camera have a name? - float FarPlane; //!< does the camera have a name? - float Fov; //!< does the camera have a name? - - Camera2(); //!< default constructor - - Camera2(Vector3d P, Vector3d A, Vector3d U); //!< constructor setting up camera orientation - - Camera2(Vector3d P, Vector3d A, Vector3d U, float Near, float Far, float ViewAngle); //!< Constructor setting up camera orientation and view volume - - void SetClippingPlanes(float Near, float Far); //!< sets the clipping planes of the view volume - - void SetFOV(float ViewAngle); //!< sets the FOV, ViewAngle should be in degrees - - void SetPos(Vector3d P); //!< set routine for Position Vector - void SetAim(Vector3d A); //!< set routine for the Aim Vector - void SetUp(Vector3d U); //!< set routine for the Up Vector - inline Vector3d getPos() { return Pos; }; //!< get routine for Position Vector - inline Vector3d getAim(){ return Aim; }; //!< get routine for the Aim Vector - inline Vector3d getUp(){ return Up; }; //!< get routine for the Up Vector - - void Reset(); //!< reset the camera to its initial position - - void SetCenterOfFocus(Vector3d NewAim); //!< focus camera to some input aim position - - void PerspectiveDisplay(int W, int H); - - void HandleMouseEvent(Qt::MouseButton button, QEvent::Type state, int x, int y, int delta = 0); - void HandleMouseWheel(int delta); - void HandleMouseMotion(int x, int y ); - - const Camera2& operator=(const Camera2& cam); - - inline void setName( char* name ) { m_name = name; }; - inline char* getName( ) { return m_name; }; - - void enterSelectionMode(double x, double y, double w, double h, GLint * vp); //!< \brief for OpenGL selection - void leaveSelectionMode(void); //!< \brief for OpenGL selection - -}; - -#endif //!< _CAMERA_H diff --git a/topmodx/include/Camera3.cc b/topmodx/include/Camera3.cc deleted file mode 100644 index 81c935a..0000000 --- a/topmodx/include/Camera3.cc +++ /dev/null @@ -1,371 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -#include "Camera3.h" - -/* ***************** CAMERA *********************/ -Camera::Camera() - : mousex(0), mousey(0), pickw(0), pickh(0) - , viewport(nullptr), pickmode(false) -{ - EYE.set(0, 0, 10); - CENTER.set(0, 0, 0); - UP.set(0, 1, 0); - HOMEEYE = EYE; - HOMECENTER = CENTER; - HOMEUP = UP; - MOUSE.set(0, 0, 0); - ALT_DOWN = SHIFT_DOWN = 0; - CONSTRAINED_AXIS.set(0, 0, 0); -} - -Camera::Camera(Vector3d eye, Vector3d center, Vector3d up) - : mousex(0), mousey(0), pickw(0), pickh(0) - , viewport(nullptr), pickmode(false) -{ - Vector3d looking = normalized(center - eye); - UP = normalized(up); - HOMEUP = UP; - UP = normalized(up - (up*looking)*looking); - EYE = eye; - HOMEEYE = EYE; - CENTER = center; - HOMECENTER = CENTER; - MOUSE.set(0, 0, 0); - ALT_DOWN = SHIFT_DOWN = 0; - CONSTRAINED_AXIS.set(0, 0, 0); -} - -void Camera::Reset() -{ - EYE = HOMEEYE; - CENTER = HOMECENTER; - UP = HOMEUP; -} - -void Camera::HandleMouseEvent(Qt::MouseButton button, QEvent::Type state, int x, int y) -{ - - MOUSE.set(x, y, 0); - MOUSEBUTTON = button; - CONSTRAINED_AXIS.set(0, 0, 0); - // int mod = glutGetModifiers(); - if (QApplication::keyboardModifiers() == Qt::AltModifier) - { - ALT_DOWN = 1; - SHIFT_DOWN = 0; - } - else if (QApplication::keyboardModifiers() == (Qt::AltModifier | Qt::ShiftModifier)) - { - ALT_DOWN = 1; - SHIFT_DOWN = 1; - } - else - { - ALT_DOWN = 0; - SHIFT_DOWN = 0; - } - if (state == QEvent::MouseButtonRelease) - { - ALT_DOWN = 0; - SHIFT_DOWN = 0; - } -} - -void Camera::SetCamera() -{ - gluLookAt(EYE[0], EYE[1], EYE[2], CENTER[0], CENTER[1], CENTER[2], UP[0], UP[1], UP[2]); -} - - -/* ***************** ORTHO CAM ************************/ - -void OrthoCamera::DrawGrid(int size, int spacing) -{ - - Vector3d looking = EYE - CENTER; - Vector3d RIGHT = normalized(UP%looking); - glDisable(GL_LIGHTING); - glBegin(GL_LINES); - glColor3f(.7, .7, .7); - for (int i = -size; i <= size; i += spacing) - { - Vector3d p1 = i*RIGHT + size*UP; - Vector3d p2 = i*RIGHT - size*UP; - Vector3d p3 = i*UP + size*RIGHT; - Vector3d p4 = i*UP - size*RIGHT; - glVertex3f(p1[0], p1[1], p1[2]); - glVertex3f(p2[0], p2[1], p2[2]); - glVertex3f(p3[0], p3[1], p3[2]); - glVertex3f(p4[0], p4[1], p4[2]); - } - glEnd(); - glEnable(GL_LIGHTING); - -} - -OrthoCamera::OrthoCamera(unsigned char axis) -{ - - switch (axis) - { - case 'x': - EYE.set(1, 0, 0); - CENTER.set(0, 0, 0); - UP.set(0, 1, 0); - break; - case 'y': - EYE.set(0, 10, 0); - CENTER.set(0, 0, 0); - UP.set(0, 0, 1); - break; - case 'z': - EYE.set(0, 0, 1); - CENTER.set(0, 0, 0); - UP.set(0, 1, 0); - break; - default: - break; - } - HOMEEYE = EYE; - HOMECENTER = CENTER; - HOMEUP = UP; - zoom = 5; -} - -void OrthoCamera::SetProjection(int WinX, int WinY) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - float aspect = WinX / (float)WinY; - if (pickmode) - { - gluPickMatrix(mousex, mousey, pickw, pickh, viewport); - } - glOrtho(-zoom*aspect, zoom*aspect, -zoom, zoom, -10, 10); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - SetCamera(); -} - - - -void OrthoCamera::HandleMouseMotion(int x, int y, int WinX, int WinY) -{ - if (ALT_DOWN == 1) - { - Vector3d looking = EYE - CENTER; - Vector3d RIGHT = normalized(UP%looking); - float dist = norm(looking); - float viewWidth = dist; - float pixelToWorld = 2 * zoom / WinY; - - if (MOUSEBUTTON == Qt::LeftButton) - { - // rotation not allowed in 2D - } - - else if (MOUSEBUTTON == Qt::MidButton) - { - CENTER = CENTER - RIGHT*(x - MOUSE[0])*pixelToWorld + UP*(y - MOUSE[1])*pixelToWorld; - EYE = EYE - RIGHT*(x - MOUSE[0])*pixelToWorld + UP*(y - MOUSE[1])*pixelToWorld; - } - - else if (MOUSEBUTTON == Qt::RightButton) - { - zoom -= (x - MOUSE[0] + y - MOUSE[1])*pixelToWorld; - } - } - - MOUSE[0] = x; - MOUSE[1] = y; -} - -void OrthoCamera::HandleMouseWheel(int delta, int WinX, int WinY) -{ - - Vector3d looking = EYE - CENTER; - float dist = norm(looking); - float viewWidth = dist; - float pixelToWorld = 2 * zoom / WinY; - - zoom -= (delta)*pixelToWorld; -} - -/*! -* \brief Enter selection mode and set the pick region for doing selection -* -* @param x x-coordinate of mouse -* @param y y-coordinate of mouse -* @param w width of the selection region -* @param h height of the selection region -* @param vp the viewport to select from -* -*/ -void OrthoCamera::enterSelectionMode(double x, double y, double w, double h, GLint * vp) -{ - mousex = x; mousey = y; pickw = w; pickh = h; viewport = vp; - pickmode = true; -} - -/*! -* \brief no longer in selection (or picking) mode -*/ -void OrthoCamera::leaveSelectionMode(void) -{ - pickmode = false; viewport = nullptr; -} - -/********************* PERSP CAM **********************/ - -void PerspCamera::DrawGrid(int size, int spacing) -{ - glDisable(GL_LIGHTING); - glBegin(GL_LINES); - for (int i = -size; i <= size; i += spacing) - { - glColor3f(.7, .7, .7); - glVertex3f(i, 0, size); - glVertex3f(i, 0, -size); - glVertex3f(-size, 0, i); - glVertex3f(size, 0, i); - } - glEnd(); - glEnable(GL_LIGHTING); -} - -void PerspCamera::SetProjection(int WinX, int WinY) -{ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (pickmode) - { - gluPickMatrix(mousex, mousey, pickw, pickh, viewport); - } - gluPerspective(FOV, WinX / (float)WinY, nearplane, farplane); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - SetCamera(); -} - - -void PerspCamera::HandleMouseMotion(int x, int y, int WinX, int WinY) -{ - if (ALT_DOWN == 1) - { - Vector3d looking = EYE - CENTER; - Vector3d RIGHT = normalized(UP%looking); - float dist = norm(looking); - float viewWidth = dist; - float pixelToWorld = viewWidth / WinY; - Vector3d AXIS; - if (MOUSEBUTTON == Qt::LeftButton) - { - // if(SHIFT_DOWN==1) { - // if(norm(CONSTRAINED_AXIS)==0){ - // if(abs(x-MOUSE[0])>abs(y-MOUSE[1])) - // CONSTRAINED_AXIS=HOMEUP; - // else - // CONSTRAINED_AXIS=RIGHT; - // } - // AXIS=((x-MOUSE[0])*UP*CONSTRAINED_AXIS+(y-MOUSE[1])*RIGHT*CONSTRAINED_AXIS)*normalized(CONSTRAINED_AXIS); - // } - // else - //if shift is pressed then do a pan - if (SHIFT_DOWN == 1) - { - CENTER = CENTER - RIGHT*(x - MOUSE[0])*pixelToWorld + UP*(y - MOUSE[1])*pixelToWorld; - EYE = EYE - RIGHT*(x - MOUSE[0])*pixelToWorld + UP*(y - MOUSE[1])*pixelToWorld; - } - else - { - AXIS = normalized((x - MOUSE[0])*UP + (y - MOUSE[1])*RIGHT); - - Vector3d RtRot = normalized(AXIS%looking); - float omega = -.005; - float mouseDist = sqrt((x - MOUSE[0])*(x - MOUSE[0]) + (y - MOUSE[1])*(y - MOUSE[1])); - EYE = looking*cos(omega*mouseDist) + norm(looking)*RtRot*sin(omega*mouseDist); - EYE = EYE + CENTER; - RIGHT = normalized(RIGHT - (RIGHT*HOMEUP)*HOMEUP); - UP = -normalized(RIGHT % looking); - } - } - - else if (MOUSEBUTTON == Qt::MidButton) - { - CENTER = CENTER - RIGHT*(x - MOUSE[0])*pixelToWorld + UP*(y - MOUSE[1])*pixelToWorld; - EYE = EYE - RIGHT*(x - MOUSE[0])*pixelToWorld + UP*(y - MOUSE[1])*pixelToWorld; - } - - else if (MOUSEBUTTON == Qt::RightButton) - EYE = EYE - (normalized(looking))*(x - MOUSE[0] + y - MOUSE[1])*pixelToWorld; - } - MOUSE[0] = x; - MOUSE[1] = y; - -} - -void PerspCamera::HandleMouseWheel(int delta, int WinX, int WinY) -{ - Vector3d looking = EYE - CENTER; - float dist = norm(looking); - float viewWidth = dist; - float pixelToWorld = viewWidth / WinY; - - EYE = EYE - (normalized(looking))*(delta)*pixelToWorld; -} - -/*! -* \brief Enter selection mode and set the pick region for doing selection -* -* @param x x-coordinate of mouse -* @param y y-coordinate of mouse -* @param w width of the selection region -* @param h height of the selection region -* @param vp the viewport to select from -* -*/ -void PerspCamera::enterSelectionMode(double x, double y, double w, double h, GLint * vp) -{ - mousex = x; mousey = y; pickw = w; pickh = h; viewport = vp; - pickmode = true; -} - -/*! -* \brief no longer in selection (or picking) mode -*/ -void PerspCamera::leaveSelectionMode(void) -{ - pickmode = false; viewport = nullptr; -} diff --git a/topmodx/include/Camera3.h b/topmodx/include/Camera3.h deleted file mode 100644 index 53dc42e..0000000 --- a/topmodx/include/Camera3.h +++ /dev/null @@ -1,168 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef Camera3_H -#define Camera3_H - -#include -#include - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -#include -// #include -// #include "Base/Inlines.h" - -/* ******************* Camera ************************ - Base class for camera - - You should create a camera either of type PerspCamera or OrthoCamera - depending on the type of projection you want. In both cases you can - call an empty default constructor, or a constructor to specify a - specific Eye, Center and Up vector of your choice - - Perspective cameras also can have their fieldofview (FOV), and near - and far clipping planes specified in the constructor if you don't like - the defaults - - Orthographic cameras can only move and zoom. The zoom is controlled - by the zoom parameter, not the distance from the EYE to the CENTER. - This can be set in the constructor as well, or with the SetZoom() function - - Also, Orthographic cameras have a constructor that lets you pass a - character for default 'x', 'y', and 'z' axes. - - Note that the constructor does NOT check to see if the up vector - is perpendicular to the looking vector, but fortunately - OpenGL is pretty robust about this. -*/ - -class Camera -{ -public: - Camera(); - Camera(Vector3d eye,Vector3d center,Vector3d up); - ~Camera(){}; - void setEye(Vector3d eye){EYE=eye; HOMEEYE=eye;}; - void setCenter(Vector3d center){CENTER=center; HOMECENTER=center;}; - void setUp(Vector3d up){UP=up; HOMEUP=up;}; - Vector3d getEye(){ return EYE; }; - Vector3d getCenter(){ return CENTER; }; - Vector3d getUp(){ return UP; }; - void Reset(); - void HandleMouseEvent(Qt::MouseButton button, QEvent::Type state, int x, int y); - void SetCamera(); - - virtual void DrawGrid(int size, int spacing)=0; - virtual void SetProjection(int WinX, int WinY)=0; - virtual void HandleMouseMotion(int x, int y, int WinX, int WinY)=0; - virtual void HandleMouseWheel(int delta, int WinX, int WinY)=0; - virtual void enterSelectionMode(double x, double y, double w, double h, GLint * vp)=0; - virtual void leaveSelectionMode()=0; //!< \brief for OpenGL selection - - -protected: - Vector3d EYE; - Vector3d CENTER; - Vector3d UP; - Vector3d HOMEEYE; - Vector3d HOMECENTER; - Vector3d HOMEUP; - - Vector3d MOUSE; - Qt::MouseButton MOUSEBUTTON; - int ALT_DOWN; - int SHIFT_DOWN; - Vector3d CONSTRAINED_AXIS; - - // For GL selection mode - double mousex, mousey, pickw, pickh; //!< Selection region for gluPickMatrix - GLint * viewport; //!< The viewport - bool pickmode; //!< Are we in selection mode? - -}; - - -class OrthoCamera : public Camera -{ -public: - OrthoCamera():zoom(5), Camera(){}; - OrthoCamera(unsigned char axis); - OrthoCamera(Vector3d eye, Vector3d center, Vector3d up):zoom(5),Camera(eye,center,up){}; - OrthoCamera(Vector3d eye, Vector3d center, Vector3d up, float z):zoom(z),Camera(eye,center,up){}; - ~OrthoCamera(){}; - - void SetZoom(float z){zoom=z;}; - float GetZoom(){return zoom;}; - - virtual void DrawGrid(int size=500, int spacing=1); - virtual void SetProjection(int WinX, int WinY); - virtual void HandleMouseMotion(int x, int y, int WinX, int WinY); - virtual void HandleMouseWheel(int delta, int WinX, int WinY); - virtual void enterSelectionMode(double x, double y, double w, double h, GLint * vp); - virtual void leaveSelectionMode(); //!< \brief for OpenGL selection - -protected: - float zoom; -}; - - -class PerspCamera : public Camera -{ -public: - PerspCamera():FOV(60),nearplane(0.1),farplane(500),Camera(){}; - PerspCamera(Vector3d eye, Vector3d center, Vector3d up):FOV(60),nearplane(0.1),farplane(500),Camera(eye,center,up){}; - PerspCamera(Vector3d eye, Vector3d center, Vector3d up, float fov, float n, float f):FOV(fov),nearplane(n),farplane(f),Camera(eye,center,up){}; - ~PerspCamera(){}; - - virtual void DrawGrid(int size=10, int spacing=1); - virtual void SetProjection(int WinX, int WinY); - virtual void HandleMouseMotion(int x, int y, int WinX, int WinY); - virtual void HandleMouseWheel(int delta, int WinX, int WinY); - virtual void enterSelectionMode(double x, double y, double w, double h, GLint * vp); - virtual void leaveSelectionMode(); //!< \brief for OpenGL selection - void setNearPlane(float n) { nearplane = n; }; - void setFarPlane(float f) { farplane = f; }; - void setFOV(float f){ FOV = f; }; - -protected: - float FOV; - float nearplane; - float farplane; -}; - -#endif diff --git a/topmodx/include/Graphics/Camera.h b/topmodx/include/Graphics/Camera.h deleted file mode 100644 index 4807c12..0000000 --- a/topmodx/include/Graphics/Camera.h +++ /dev/null @@ -1,289 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Camera.hh,v 2.7 2002/10/25 15:42:05 vinod Exp $ */ - -#ifndef _CAMERA_HH_ - -#define _CAMERA_HH_ - -// Class to encapsulate an OpenGL type camera -// Contains the eye position, point of interest (lookat) and up vector -// along with projection parameters (field-of-view, aspect ratio, near/far) -// Supports both perspective and orthographic projections -// Supports only symmetric-views (along each axis) - -#include -#ifdef __APPLE__ -#include -#else -#include -#endif -#include -#include "../Base/Inlines.h" - -enum ProjectionType { Orthographic=0, Perspective=1 }; - -class Camera -{ -public: - Camera(double aspratio = 1.0) - : center(0, 0, 0), eye(0, 0, 50), up(0, 1, 0), - nearplane(1), farplane(1000), - umin(-1), umax(1), vmin(-1), vmax(1), - fovy(45.0), aspect(aspratio), - projtype(Perspective), dist(50.0), - mousex(0), mousey(0), pickw(0), pickh(0), viewport(nullptr), pickmode(false) - { - } - - Camera(const Camera& cam) - : center(cam.center), eye(cam.eye), up(cam.up), - nearplane(cam.nearplane), farplane(cam.farplane), - umin(cam.umin), umax(cam.umax), vmin(cam.vmin), vmax(cam.vmax), - fovy(cam.fovy), aspect(cam.aspect), - projtype(cam.projtype), dist(cam.dist), - mousex(0), mousey(0), pickw(0), pickh(0), viewport(nullptr), pickmode(false) - { - } - - ~Camera() - { - } - - Camera& operator = (const Camera& cam) - { - center = cam.center; eye = cam.eye; up = cam.up; - nearplane = cam.nearplane; farplane = cam.farplane; - umin = cam.umin; umax = cam.umax; vmin = cam.vmin; vmax = cam.vmax; - fovy = cam.fovy; aspect = cam.aspect; - projtype = cam.projtype; dist = cam.dist; - return (*this); - } - - //--- Member functions ---// - - void toggleProjectionType(void) - { - // Toggle projection type between orthographic and perspective - if (projtype == Perspective) - { - projtype = Orthographic; - - // Use fovy and aspect to compute corresponding umin,vmin,etc. - vmax = dist * tan(deg2rad(fovy / 2.0)); vmin = -vmax; - umax = aspect * vmax; umin = -umax; - } - else - { - projtype = Perspective; - - // Use umin,vmin,etc. to compute corresponding fovy and aspect - fovy = 2.0*rad2deg(atan2(vmax, dist)); - aspect = umax / vmax; - } - } - - void makeOrthographic(void) - { - if (projtype == Perspective) toggleProjectionType(); - } - - void makePerspective(void) - { - if (projtype == Orthographic) toggleProjectionType(); - } - - double distance(void) const - { - return dist; - } - - void setEye(const Vector3d& v) - { - eye = v; dist = norm(eye - center); - } - - void setEye(double x, double y, double z) - { - eye.set(x, y, z); dist = norm(eye - center); - } - - Vector3d getEye() { return eye; } - - void setCenter(const Vector3d& v) - { - center = v; dist = norm(eye - center); - } - Vector3d getCenter() { return center; } - - void setCenter(double x, double y, double z) - { - center.set(x, y, z); dist = norm(eye - center); - } - - void setPos(Vector3d p) { pos = p; } - - Vector3d getPos() { return pos; } - - void setUpVector(const Vector3d& v) - { - up = v; - } - - void setUpVector(double x, double y, double z) - { - up.set(x, y, z); - } - - void setNearFar(double n, double f) - { - nearplane = Abs(n); farplane = Abs(f); - } - - //--- Following are for orthographic projection ---// - - void setOrthographicViewVolume(double uwidth, double vheight, bool adjust = true) - { - umin = -Abs(uwidth) / 2.0; umax = -umin; vmin = -Abs(vheight) / 2.0; vmax = -vmin; - if (adjust) aspect = umax / vmax; - } - - void setUWidth(double uwidth, bool adjust = true) - { - umin = -Abs(uwidth) / 2.0; umax = -umin; - if (adjust) - { - vmax = umax / aspect; vmin = -vmax; - } - } - - void setVHeight(double vheight, bool adjust = true) - { - vmin = -Abs(vheight) / 2.0; vmax = -vmin; - if (adjust) - { - umax = vmax * aspect; umin = -umax; - } - } - - //--- Following are for perspective projection ---// - - void setPerspectiveViewVolume(double angle, double asp) - { - fovy = Abs(angle); aspect = Abs(aspect); - } - - void setAspect(double asp) - { - aspect = Abs(asp); - } - - void setFieldOfViewY(double angle) - { - fovy = Abs(angle); - } - - // Adjust mouse coordinates for proper pan. Assumes input x,y are between -1,1 - // z is not used for computing anything, but depending on the view-vector - // and up-vector, z may be set to get proper panning - void adjust(double& x, double& y, double& z) - { - double tx, ty; - if (projtype == Orthographic) - { - // Orthographic projection - tx = umin*(1.0 - x)*0.5 + umax*(1.0 + x)*0.5; - ty = vmin*(1.0 - y)*0.5 + vmax*(1.0 + y)*0.5; - } - else if (projtype == Perspective) - { - // Perspective projection - tx = x*dist*tan(deg2rad(fovy*aspect*0.5)); - ty = y*dist*tan(deg2rad(fovy*0.5)); - } - // Depending on the view-vector and up-vector, set appropriate coordinates - // view is eye-center, z is along view, x is up % view, y is z % x - Vector3d Z = normalized(eye - center); - Vector3d X = normalized(up) % Z; - Vector3d Y = Z % X; - Vector3d p = tx*X + ty*Y; - p.get(x, y, z); - } - - //--- Enter selection mode and set the pick region for doing selection ---// - void enterSelectionMode(double x, double y, double w, double h, GLint * vp) - { - mousex = x; mousey = y; pickw = w; pickh = h; viewport = vp; - pickmode = true; - } - - void leaveSelectionMode(void) - { - pickmode = false; viewport = nullptr; - } - - //--- Apply the camera transformation ---// - - void applyTransform(void) const - { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (pickmode) - gluPickMatrix(mousex, mousey, pickw, pickh, viewport); - if (projtype == Perspective) gluPerspective(fovy, aspect, nearplane, farplane); - else if (projtype == Orthographic) glOrtho(umin, umax, vmin, vmax, nearplane, farplane); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(eye[0], eye[1], eye[2], center[0], center[1], center[2], up[0], up[1], up[2]); - } - -protected: - Vector3d center; // Point of interest - Vector3d eye; // Eye position - Vector3d up; // Up-vector - double nearplane, farplane; // Near/far clipping planes - - // For orthographic/perspective projection - double umin, umax, vmin, vmax; // Viewing volume - double fovy, aspect; // Y field-of-view, aspect ratio - - ProjectionType projtype; // Type of projection - double dist; // Dist from eye to center - - // For GL selection mode - double mousex, mousey, pickw, pickh; // Selection region for gluPickMatrix - GLint *viewport; // The viewport - bool pickmode; // Are we in selection mode? - - Vector3d pos; //new test by dave - -}; - -#endif /* #ifndef _CAMERA_HH_ */ diff --git a/topmodx/include/Graphics/Color.h b/topmodx/include/Graphics/Color.h deleted file mode 100644 index baa2430..0000000 --- a/topmodx/include/Graphics/Color.h +++ /dev/null @@ -1,301 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Color.hh,v 2.2 2000/04/20 04:16:11 vinod Exp $ */ - -#ifndef _COLOR_HH_ - -#define _COLOR_HH_ - -// Class to encapsulate RGB colors. Uses a Vector3d to store the components -// Has member data which are references to the 3 components -// Provides a function, clamp() to clamp the values to lie between 0 and 1 -// Does not automatically do the clamping. User has to do it explicitly - -#include "../Base/BaseObject.h" -#include "../vecmat/Vector3d.h" -#include "../vecmat/Vector4d.h" -#include "../Base/Inlines.h" - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -class RGBColor; -typedef RGBColor * RGBColorPtr; - -class RGBColor : public BaseObject -{ -public: - // Clamp components to [0,1] - void clamp(void) - { - if (r > 1.0) r = 1.0; - else if (r < 0.0) r = 0.0; - - if (g > 1.0) g = 1.0; - else if (g < 0.0) g = 0.0; - - if (b > 1.0) b = 1.0; - else if (b < 0.0) b = 0.0; - } - -public: - // Default constructor - RGBColor() - : BaseObject(), color(), r(color[0]), g(color[1]), b(color[2]) - { - } - - // 1-arg constructor - RGBColor(const Vector3d& col) - : BaseObject(), color(col), r(color[0]), g(color[1]), b(color[2]) - { - } - - // 1-arg constructor, gray value - RGBColor(double gray) - : BaseObject(), color(gray), r(color[0]), g(color[1]), b(color[2]) - { - } - - // 3-arg constructor - RGBColor(double red, double green, double blue) - : BaseObject(), color(red, green, blue), r(color[0]), g(color[1]), b(color[2]) - { - } - - // Copy constructor - RGBColor(const RGBColor& col) - : BaseObject(col), color(col.color), r(color[0]), g(color[1]), b(color[2]) - { - } - - // Destructor - ~RGBColor() - { - } - - // Assignment operator - RGBColor& operator = (const RGBColor& col) - { - BaseObject::operator = (col); - color = col.color; - return (*this); - } - - // Assignment from a Vector3d - RGBColor& operator = (const Vector3d& col) - { - color = col; - return (*this); - } - - // Assignment from a scalar - gray value - RGBColor& operator = (double gray) - { - color = gray; - return (*this); - } - - // Make a copy - BaseObjectPtr copy(void) const - { - RGBColorPtr newcol = new RGBColor(*this); - return newcol; - } - - void set(double red, double green, double blue) - { - color.set(red, green, blue); - } - - // Comparison - bool operator == (const RGBColor& c) const - { - if (Abs(r - c.r) < 1.0e-3 && - Abs(g - c.g) < 1.0e-3 && - Abs(b - c.b) < 1.0e-3) return true; - return false; - } - - bool operator != (const RGBColor& c) const - { - return !(operator == (c)); - } - - // Arithmetic-assignment operators - // These operators don't clamp the values. User has to do them explicitly - void operator += (const RGBColor& c) - { - color += c.color; - } - - void operator -= (const RGBColor& c) - { - color -= c.color; - } - - void operator *= (double scalar) - { - color *= scalar; - } - - void operator /= (double scalar) - { - color /= scalar; - } - - // Arithmetic operators - RGBColor operator + (const RGBColor& c) const - { - RGBColor sum(*this); sum += c; - return sum; - } - - RGBColor operator - (const RGBColor& c) const - { - RGBColor diff(*this); diff -= c; - return diff; - } - - RGBColor operator * (double scalar) const - { - RGBColor prod(*this); prod *= scalar; - return prod; - } - - friend RGBColor operator * (double scalar, const RGBColor& col) - { - RGBColor prod(col); prod *= scalar; - return prod; - } - - friend RGBColor product(const RGBColor& col1, const RGBColor& col2) - { - RGBColor prod(product(col1.color, col2.color)); - return prod; - } - - RGBColor operator / (double scalar) const - { - RGBColor quot(*this); quot /= scalar; - return quot; - } - - // Luminanace = sum of components - friend double luminance(const RGBColor& c) - { - return (c.r + c.g + c.b); - } - - // I/O stream operators - friend ostream& operator << (ostream& o, const RGBColor& c) - { - o << "(" << c.r << "," << c.g << "," << c.b << ")"; - return o; - } - - friend istream& operator >> (istream& i, RGBColor& c) - { - i >> c.color; - return i; - } - - // Overload OpenGL color function - friend void glColor(const RGBColor& c) - { - glColor3d(c.r, c.g, c.b); - } - -public: - // NOTE: Order Dependency. The line defining color *MUST* be before the line - // defining r,g,b - Vector3d color; // Vector used to store the color - double &r, &g, &b; // References to the 3 components - -}; - -#endif /* #ifndef _COLOR_HH_ */ - - -/* - $Log: Color.hh,v $ - Revision 2.2 2000/04/20 04:16:11 vinod - bug fix in extraction operator - - Revision 2.1 2000/04/20 03:58:59 vinod - Added set func, comparison operators, changed extraction operator - - Revision 2.0 2000/03/12 00:49:30 vinod - Major revision number change - - Revision 1.2 2000/03/03 18:59:41 vinod - None of functions/ctors/ops now automatically clamp - - Revision 1.1 2000/03/03 18:55:19 vinod - Color class, moved from sep dir - - Revision 1.10 2000/02/29 06:33:54 vinod - Fixed const correctness for operators - - Revision 1.9 2000/02/28 22:06:07 vinod - Arithmetic-assignment ops don't clamp, added product fn, Made clamp() public - - Revision 1.8 2000/02/17 05:53:21 vinod - Uses new include file names - - Revision 1.7 2000/02/11 09:43:41 vinod - Bug fix: g and b were not references, because of incorrect declaration - - Revision 1.6 2000/02/11 09:38:09 vinod - Moved clamp() before constructors, some of which now call it - - Revision 1.5 2000/02/08 05:17:06 vinod - Missing GL include. Fixed typos, minor bugs - - Revision 1.4 2000/02/08 04:00:07 vinod - Added assignment from Vector3d andd double operators - - Revision 1.3 2000/02/08 03:57:29 vinod - Added gray-value ctor, pre-mult by scalar - - Revision 1.2 2000/02/07 22:14:53 vinod - Added 3-arg constructor - - Revision 1.1.1.1 2000/02/07 22:08:50 vinod - Color classes - -*/ diff --git a/topmodx/include/Graphics/Grid.h b/topmodx/include/Graphics/Grid.h deleted file mode 100644 index 45d9bdf..0000000 --- a/topmodx/include/Graphics/Grid.h +++ /dev/null @@ -1,234 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Grid.hh,v 2.2 2002/10/25 15:42:05 vinod Exp $ */ - -#ifndef _GRID_HH_ - -#define _GRID_HH_ - -// Class for a grid of lines along one of the three planes -// Uses OpenGL display lists. Spacing and size of grid can be controlled - -// Grid extends from -size/2 to size/2 along both axis in the plane -// No. of squares in a row of the grid is specified by subdiv - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -typedef unsigned int uint; - -enum GridPlane -{ - XY = 0, - YZ = 1, - ZX = 2 -}; - -class Grid -{ -public: - Grid(GridPlane p = ZX, float s = 20.0, uint num = 10) - : plane(p), size(s), subdiv(num), disp_list_id(0), visible(true) - { - disp_list_id = glGenLists(1); - createList(); - } - - Grid(const Grid& grid) - : plane(grid.plane), size(grid.size), subdiv(grid.subdiv), - disp_list_id(0), visible(grid.visible) - { - disp_list_id = glGenLists(1); - createList(); - } - - ~Grid() - { - // Free the associated display list - glDeleteLists(disp_list_id, 1); - } - - void operator = (const Grid& grid) - { - plane = grid.plane; size = grid.size; subdiv = grid.subdiv; - disp_list_id = 0; visible = grid.visible; - createList(); - } - - //--- Member functions ---// - - void setPlane(GridPlane p) // Set the grid plane - { - plane = p; - createList(); - } - - void setSize(float s) // Set the grid size - { - size = s; - createList(); - } - - void setNumSubDivisions(uint num) // Set no. of subdivisions - { - subdiv = num; - createList(); - } - - void set(GridPlane p, float s, uint num) // Set all 3 parameters - { - plane = p; size = s; subdiv = num; - createList(); - } - - void turnOff(void) // Make grid invisible - { - visible = false; - } - - void turnOn(void) // Make grid visible - { - visible = true; - } - - void toggle(void) // Toggle grid visibility - { - if (visible) visible = false; - else visible = true; - } - - // Call this function once for after view has been set-up - // This function must be called for grid to be displayed - void generate(void) // Regenerate display list with a new id - { - glDeleteLists(disp_list_id, 1); - disp_list_id = glGenLists(1); - createList(); - } - - GridPlane getPlane(void) const // Get the grid plane - { - return plane; - } - - float getSize(void) const // Get the grid size - { - return size; - } - - uint getNumSubDivisions(void) const // Get no. of subdivisions - { - return subdiv; - } - - GLuint getDisplayListID(void) const // Get the display list ID - { - return disp_list_id; - } - - void render(void) const // Render the grid - { - if (visible) glCallList(disp_list_id); - } - -protected: - void createList(void); - -protected: - GridPlane plane; // Plane for the grid - float size; // Size (extent of grid) - uint subdiv; // No. of subdivisions - GLuint disp_list_id; // OpenGL display list id - bool visible; // Visibility -}; - -void Grid::createList(void) -{ - int i; - float sx, ex, sy, ey, sz, ez; // Start/end coordinates - float dd, delta; - - glNewList(disp_list_id, GL_COMPILE); - { - dd = size / float(subdiv); - glBegin(GL_LINES); - switch (plane) - { - case XY: - sx = sy = -size / 2.0; ex = ey = -sx; - for (i = 0; i <= subdiv; ++i) - { - delta = float(i)*dd; - glVertex3f(sx + delta, sy, 0.0); glVertex3f(sx + delta, ey, 0.0); - glVertex3f(sx, sy + delta, 0.0); glVertex3f(ex, sy + delta, 0.0); - } - break; - case YZ: - sy = sz = -size / 2.0; ey = ez = -sy; - for (i = 0; i <= subdiv; ++i) - { - delta = i*dd; - glVertex3f(0.0, sy + delta, sz); glVertex3f(0.0, sy + delta, ez); - glVertex3f(0.0, sy, sz + delta); glVertex3f(0.0, ey, sz + delta); - } - break; - case ZX: - sz = sx = -size / 2.0; ez = ex = -sz; - for (i = 0; i <= subdiv; ++i) - { - delta = i*dd; - glVertex3f(sx, 0.0, sz + delta); glVertex3f(ex, 0.0, sz + delta); - glVertex3f(sx + delta, 0.0, sz); glVertex3f(sx + delta, 0.0, ez); - } - break; - } - glEnd(); - } - glEndList(); -} - -#endif /* #ifndef _GRID_HH_ */ - -/* - $Log: Grid.hh,v $ - Revision 2.2 2002/10/25 15:42:05 vinod - Fixed include location for GL headers - - Revision 2.1 2000/04/05 00:27:18 vinod - Grid object class - -*/ diff --git a/topmodx/include/Graphics/Texture.h b/topmodx/include/Graphics/Texture.h deleted file mode 100644 index 5998976..0000000 --- a/topmodx/include/Graphics/Texture.h +++ /dev/null @@ -1,200 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Texture.hh,v 2.3 2000/07/20 23:18:05 vinod Exp $ */ - -#ifndef _TEXTURE_HH_ - -#define _TEXTURE_HH_ - -// Class for using any image supported by SGIs Image Format Library -// as a texture in OpenGL. -// The image is stored in interleaved, unsigned char format, -// with the lower-left corner as the origin - -#include - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -class Texture; -typedef Texture * TexturePtr; - -class Texture -{ -public: - Texture() : pixels(nullptr), dims() - { - } - - Texture(const char * imagefile) - : pixels(nullptr), dims() - { - readTexture(imagefile); - } - - Texture(const Texture& tex) - : pixels(nullptr), dims(tex.dims) - { - if (tex.pixels) - { - pixels = new unsigned char[dims.y*dims.x*dims.c]; - unsigned char * source, *dest; - source = tex.pixels; dest = pixels; - for (int i = 0; i < dims.y*dims.x*dims.c; ++i) - { - *dest = *source; - dest++; source++; - } - } - } - - ~Texture() - { - delete[] pixels; - } - - void operator = (const Texture& tex) - { - reset(); dims = tex.dims; - if (tex.pixels) - { - pixels = new unsigned char[dims.y*dims.x*dims.c]; - unsigned char * source, *dest; - source = tex.pixels; dest = pixels; - for (int i = 0; i < dims.y*dims.x*dims.c; ++i) - { - *dest = *source; - dest++; source++; - } - } - } - - // Delete existing texture stuff - void reset(void) - { - delete[] pixels; pixels = nullptr; - dims = iflSize(); - } - - void readFrom(const char * imagefile) // Read texture from a given file - { - reset(); - readTexture(imagefile); - } - - bool isValid(void) const // Does this object have image data? - { - return (pixels != nullptr); - } - - friend void glTexture(const Texture& tex) - { - // Do a glTexImage2D using the given texture - if (tex.pixels) - { - if (tex.dims.c == 1) - glTexImage2D( - GL_TEXTURE_2D, 0, GL_LUMINANCE, tex.dims.x, tex.dims.y, 0, - GL_LUMINANCE, GL_UNSIGNED_BYTE, tex.pixels); - else if (tex.dims.c == 2) - glTexImage2D( - GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, tex.dims.x, tex.dims.y, 0, - GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, tex.pixels); - else if (tex.dims.c == 3) - glTexImage2D( - GL_TEXTURE_2D, 0, GL_RGB, tex.dims.x, tex.dims.y, 0, - GL_RGB, GL_UNSIGNED_BYTE, tex.pixels); - else if (tex.dims.c == 4) - glTexImage2D( - GL_TEXTURE_2D, 0, GL_RGBA, tex.dims.x, tex.dims.y, 0, - GL_RGBA, GL_UNSIGNED_BYTE, tex.pixels); - } - } - - friend void glTexImage2D(const Texture& tex) // For consistency in notation - { - glTexture(tex); - } - -protected: - // Read the image from the given file - void readTexture(const char * imagefile); - -protected: - unsigned char *pixels; // Pixels in image - iflSize dims; // Image dimensions -}; - -void Texture::readTexture(const char * imagefile) -{ - if (imagefile) - { - iflStatus status; - iflFile * image = iflFile::open(imagefile, O_RDONLY, &status); - if (status == iflOKAY) - { - image->getDimensions(dims); - pixels = new unsigned char[dims.y*dims.x*dims.c]; - - iflConfig config(iflUChar, iflInterleaved, 0, nullptr, 0, iflLowerLeftOrigin); - status = image->getTile(0, 0, 0, dims.x, dims.y, 1, pixels, &config); - if (status != iflOKAY) - { - // reset to initial state - delete[] pixels; pixels = nullptr; - dims = iflSize(); - } - image->close(); - } - } -} - -#endif /* #ifndef _TEXTURE_HH_ */ - - -/* - $Log: Texture.hh,v $ - Revision 2.3 2000/07/20 23:18:05 vinod - Made reset() public - - Revision 2.2 2000/05/16 20:36:05 vinod - Added typedef - - Revision 2.1 2000/04/30 01:19:57 vinod - Texture class using the IFL for reading images - -*/ diff --git a/topmodx/include/Graphics/Transform.h b/topmodx/include/Graphics/Transform.h deleted file mode 100644 index 60772cb..0000000 --- a/topmodx/include/Graphics/Transform.h +++ /dev/null @@ -1,360 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Transform.hh,v 2.2 2000/05/05 20:50:10 vinod Exp $ */ - -#ifndef _TRANSFORM_HH_ - -#define _TRANSFORM_HH_ - -// Class for transformations (translation, scaling, rotation) - -#include "../vecmat/Vector3d.h" -#include "../vecmat/Matrix4x4.h" -#include "../vecmat/Quaternion.h" -#include - -class Transformation; -typedef Transformation *TransformationPtr; - -class Transformation -{ -public: - // Default constructor - Transformation() : transform() - { - } - - // Copy constructor - Transformation(const Transformation& tr) : transform(tr.transform) - { - } - - // Construct from a matrix - Transformation(const Matrix4x4& mat) : transform(mat) - { - } - - // Destructor - ~Transformation() - { - } - - // Assignment operator - Transformation& operator = (const Transformation& tr) - { - transform = tr.transform; - return (*this); - } - - // Static functions to compute translation, rotation and scaling matrices - static Matrix4x4 translation(const Vector3d& t) - { - Matrix4x4 transmat; - transmat[0][3] = t[0]; - transmat[1][3] = t[1]; - transmat[2][3] = t[2]; - return transmat; - } - - static Matrix4x4 translation(double tx, double ty, double tz) - { - Matrix4x4 transmat; - transmat[0][3] = tx; - transmat[1][3] = ty; - transmat[2][3] = tz; - return transmat; - } - - static Matrix4x4 rotationX(double angle) // Rotation about X axis - { - Matrix4x4 rotmat; - double ct = cos(angle), st = sin(angle); - rotmat[0].set(1, 0, 0, 0); - rotmat[1].set(0, ct, -st, 0); - rotmat[2].set(0, st, ct, 0); - rotmat[3].set(0, 0, 0, 1); - return rotmat; - } - - static Matrix4x4 rotationY(double angle) // Rotation about Y axis - { - Matrix4x4 rotmat; - double ct = cos(angle), st = sin(angle); - rotmat[0].set(ct, 0, st, 0); - rotmat[1].set(0, 1, 0, 0); - rotmat[2].set(-st, 0, ct, 0); - rotmat[3].set(0, 0, 0, 1); - return rotmat; - } - - static Matrix4x4 rotationZ(double angle) // Rotation about Z axis - { - Matrix4x4 rotmat; - double ct = cos(angle), st = sin(angle); - rotmat[0].set(ct, -st, 0, 0); - rotmat[1].set(st, ct, 0, 0); - rotmat[2].set(0, 0, 1, 0); - rotmat[3].set(0, 0, 0, 1); - return rotmat; - } - - static Matrix4x4 scaling(const Vector3d& s) - { - Matrix4x4 scmat; - scmat[0][0] = s[0]; - scmat[1][1] = s[1]; - scmat[2][2] = s[2]; - return scmat; - } - - static Matrix4x4 scaling(double sx, double sy, double sz) - { - Matrix4x4 scmat; - scmat[0][0] = sx; - scmat[1][1] = sy; - scmat[2][2] = sz; - return scmat; - } - - // Compute the matrix equivalent to gluLookAt for given eye, center and upvector - static Matrix4x4 lookat(const Vector3d& eye, const Vector3d& center, const Vector3d& up) - { - Matrix4x4 lmat; - Vector3d f = normalized(center - eye); - Vector3d UP = normalized(up); - Vector3d s = normalized(f % UP); - Vector3d u = normalized(s % f); - - lmat[0] = s; - lmat[1] = u; - lmat[2] = -f; - - return lmat; - } - - // Combining two transformations/transformation and matrix - - // Post-multiply with given transformation/matrix - void operator *= (const Transformation& tr) - { - transform *= tr.transform; - } - - void operator *= (const Matrix4x4& mat) - { - transform *= mat; - } - - // Pre-multiply with given transformation/matrix - // The operator chosen is not the most intuitive, but the only one that makes - // some kind of sense - void operator /= (const Transformation& tr) - { - transform = tr.transform * transform; - } - - void operator /= (const Matrix4x4& mat) - { - transform = mat * transform; - } - - Transformation operator * (const Transformation& tr) - { - Transformation newtr(*this); - newtr *= tr; - return newtr; - } - - Transformation operator * (const Matrix4x4& mat) - { - Transformation newtr(*this); - newtr *= mat; - return newtr; - } - - friend Transformation operator * (const Matrix4x4& mat, const Transformation& tr) - { - Transformation newtr(mat); - newtr *= tr; - return newtr; - } - - void invert(void) - { - // Invert the transformation matrix - transform.invert(); - } - - // Apply the transformation matrix to a vector - Vector3d applyTo(const Vector3d& vec) - { - return transform*vec; - } - - // Apply transformations - pre-multiply by corresponding transformation matrices - void translate(const Vector3d& t) - { - transform = Transformation::translation(t) * transform; - } - - void translate(double tx, double ty, double tz) - { - transform = Transformation::translation(tx, ty, tz) * transform; - } - - void rotateX(double angle) - { - transform = Transformation::rotationX(angle) * transform; - } - - void rotateY(double angle) - { - transform = Transformation::rotationY(angle) * transform; - } - - void rotateZ(double angle) - { - transform = Transformation::rotationZ(angle) * transform; - } - - void rotate(const Quaternion& quat) - { - // Rotate according to the rotation specified by the quaternion - transform = quat.toMatrix4() * transform; - } - - void scale(const Vector3d& s) - { - transform = Transformation::scaling(s) * transform; - } - - void scale(double sx, double sy, double sz) - { - transform = Transformation::scaling(sx, sy, sz) * transform; - } - - // Apply transformations - post-multiply - void post_translate(const Vector3d& t) - { - transform *= Transformation::translation(t); - } - - void post_translate(double tx, double ty, double tz) - { - transform *= Transformation::translation(tx, ty, tz); - } - - void post_rotateX(double angle) - { - transform *= Transformation::rotationX(angle); - } - - void post_rotateY(double angle) - { - transform *= Transformation::rotationY(angle); - } - - void post_rotateZ(double angle) - { - transform *= Transformation::rotationZ(angle); - } - - void post_rotate(const Quaternion& quat) - { - // Rotate according to the rotation specified by the quaternion - transform *= quat.toMatrix4(); - } - - void post_scale(const Vector3d& s) - { - transform *= Transformation::scaling(s); - } - - void post_scale(double sx, double sy, double sz) - { - transform *= Transformation::scaling(sx, sy, sz); - } - - // Apply the transformation in OpenGL. Calls only glMultMatrix - void apply(void) const - { - double mat[16]; - transform.fillArrayColumnMajor(mat); - //glMultMatrixd(mat); - } - - void fillArrayColumnMajor(double mat[]) - { - transform.fillArrayColumnMajor(mat); - } - - // Get the transformation matrix - Matrix4x4 matrix(void) - { - return transform; - } - - // Reset the transformation matrix - void reset(void) - { - transform.reset(); - } - - // Set the transformation matrix - void set(const Matrix4x4 mat) - { - transform = mat; - } -public: - // Combined transformation matrix - Matrix4x4 transform; - -}; - -#endif /* #ifndef _TRANSFORM_HH_ */ - - -/* -$Log: Transform.hh,v $ - Revision 2.2 2000/05/05 20:50:10 vinod - Bug fix in rotation matrices : required transform - - Revision 2.1 2000/04/28 22:52:48 vinod - Added Transformation::lookat subroutine, changed Matrix4_4 to Matrix4x4 - - Revision 2.0 2000/03/12 00:49:31 vinod - Major revision number change - - Revision 1.2 2000/03/03 00:50:33 vinod - Remove BaseObject derivation, changed apply to use Column major - - Revision 1.1 2000/03/01 01:38:24 vinod - Transformation class - -*/ diff --git a/topmodx/include/Graphics/VecMatGL.h b/topmodx/include/Graphics/VecMatGL.h deleted file mode 100644 index 1d1f4ca..0000000 --- a/topmodx/include/Graphics/VecMatGL.h +++ /dev/null @@ -1,235 +0,0 @@ -#ifndef _GL_++_HH_ -#define _GL_++_HH_ - -// Wrapper functions which provide an easy interface for using gl functions -// with C++ classes (Vector, Matrix, Quaternion) -// These functions are for convenience only and not necessarily the most efficient - -#include -#include -#include -#include -#include -#include - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -//--- glVertex functions ---// - -inline void glVertex(const Vector2d& vec) -{ - glVertex2dv(vec); -} - -inline void glVertex(const Vector3d& vec) -{ - glVertex3dv(vec); -} - -inline void glVertex(const Vector4d& vec) -{ - glVertex4dv(vec); -} - - -inline void glVertex2(const Vector2d& vec) -{ - glVertex2dv(vec); -} - -inline void glVertex2(const Vector3d& vec) -{ - glVertex2dv(vec); -} - -inline void glVertex2(const Vector4d& vec) -{ - glVertex2dv(vec); -} - - -inline void glVertex3(const Vector2d& vec) -{ - glVertex2dv(Vector3d(vec)); -} - -inline void glVertex3(const Vector3d& vec) -{ - glVertex3dv(vec); -} - -inline void glVertex3(const Vector4d& vec) -{ - glVertex3dv(vec); -} - - -inline void glVertex4(const Vector2d& vec) -{ - glVertex4dv(Vector4d(vec)); -} - -inline void glVertex4(const Vector3d& vec) -{ - glVertex4dv(Vector4d(vec)); -} - -inline void glVertex4(const Vector4d& vec) -{ - glVertex4dv(vec); -} - - -//--- glNormal functions ---// - -inline void glNormal(const Vector2d& vec) -{ - glNormal3dv(Vector3d(vec)); -} - -inline void glNormal(const Vector3d& vec) -{ - glNormal3dv(vec); -} - -inline void glNormal(const Vector4d& vec) -{ - glNormal3dv(vec); -} - - -//--- glColor functions ---// - -inline void glColor(const Vector3d& vec) -{ - glColor3dv(vec); -} - -inline void glColor(const Vector4d& vec) -{ - glColor4dv(vec); -} - - -inline void glColor3(const Vector3d& vec) -{ - glColor3dv(vec); -} - -inline void glColor3(const Vector4d& vec) -{ - glColor3dv(vec); -} - - -inline void glColor4(const Vector3d& vec) -{ - glColor4d(vec[0], vec[1], vec[2], 1.0); -} - -inline void glColor4(const Vector4d& vec) -{ - glColor4dv(vec); -} - - -//--- glTranslate functions ---// - -inline void glTranslate(const Vector2d& vec) -{ - glTranslated(vec[0], vec[1], 0.0); -} - -inline void glTranslate(const Vector3d& vec) -{ - glTranslated(vec[0], vec[1], vec[2]); -} - -inline void glTranslate(const Vector4d& vec) -{ - glTranslated(vec[0], vec[1], vec[2]); -} - - -//--- glScale functions ---// - -inline void glScale(const Vector2d& vec) -{ - glScaled(vec[0], vec[1], 1.0); -} - -inline void glScale(const Vector3d& vec) -{ - glScaled(vec[0], vec[1], vec[2]); -} - -inline void glScale(const Vector4d& vec) -{ - glScaled(vec[0], vec[1], vec[2]); -} - - -//--- glRotate functions ---// - -inline void glRotate(const Vector3d& axis, double angle) -{ - glRotated(angle, axis[0], axis[1], axis[2]); -} - -inline void glRotate(double angle, const Vector3d& axis) -{ - glRotated(angle, axis[0], axis[1], axis[2]); -} - -inline void glRotate(const Vector4d& axisangle) -{ - glRotated(axisangle[3], axisangle[0], axisangle[1], axisangle[2]); -} - -inline void glRotate(const Quaternion& quat) -{ - Vector3d axis; - double angle; - quat.getAxisAndAngle(axis, angle); - glRotated(angle, axis[0], axis[1], axis[2]); -} - - -//--- gl matrix related functions ---// - -inline void glLoadMatrix(const Matrix4x4& mat) -{ - double m[16]; - mat.fillArrayColumnMajor(mat); - glLoadMatrixd(m); -} - -inline void glLoadMatrix(const Matrix3x3& mat) -{ - glLoadMatrix(Matrix4x4(mat)); -} - - -inline void glMultMatrix(const Matrix4x4& mat) -{ - double m[16]; - mat.fillArrayColumnMajor(mat); - glMultMatrix(m); -} - -inline void glMultMatrix(const Matrix3x3& mat) -{ - glMultMatrix(Matrix4x4(mat)); -} - -#endif /* #ifndef _GL_++_HH_ */ - diff --git a/topmodx/include/Light/AmbientLight.h b/topmodx/include/Light/AmbientLight.h deleted file mode 100644 index b616a6c..0000000 --- a/topmodx/include/Light/AmbientLight.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: AmbientLight.hh,v 2.2 2000/03/02 07:43:07 vinod Exp $ */ - -#ifndef _AMBIENT_LIGHT_HH_ - -#define _AMBIENT_LIGHT_HH_ - -// class for ambient light. Derived from class Light -// No additional member data. Doesn't use position data - -#include "Light.h" - -class AmbientLight; -typedef AmbientLight *AmbientLightPtr; - -class AmbientLight : public Light -{ -public: - // Default constructor - AmbientLight() : Light() - { - } - - // 1 argument constructor - specifies color - AmbientLight(const RGBColor& col) : Light(col) - { - } - - // Copy constructur - AmbientLight(const AmbientLight& al) : Light(al) - { - } - - // Destructor - ~AmbientLight() - { - } - - // Assignment operator - AmbientLight& operator = (const AmbientLight& al) - { - Light::operator = (al); - return (*this); - } - - // Make a copy - virtual BaseObjectPtr copy(void) const - { - AmbientLightPtr newal = new AmbientLight(*this); - return newal; - } - - // Type of light - virtual LightType type(void) const - { - return Ambient; - } - - // Does this light illuminate given point? AmbientLight always does - virtual bool illuminates(const Vector3d&) const - { - return true; - } - - // Compute the cosine factor. This is independent point/normal - // 0.5 since we want a equal mix of warm and cool colors - virtual double cosfactor(const Vector3d&, const Vector3d&) const - { - return 0.5; - } - - // Illuminate a given point with a given normal using this light and return color - virtual RGBColor illuminate(const Vector3d&, const Vector3d&) const - { - if (state == false) return RGBColor(0); - return RGBColor((warmcolor.color + coolcolor.color)*(0.5*intensity)); - } - - // Same as above but with specular lighting also - virtual RGBColor illuminate(const Vector3d&, const Vector3d&, const Vector3d&) const - { - if (state == false) return RGBColor(0); - return RGBColor((warmcolor.color + coolcolor.color)*(0.5*intensity)); - } -}; - -#endif /* #ifndef _AMBIENT_LIGHT_HH_ */ - - -/* - $Log: AmbientLight.hh,v $ - Revision 2.2 2000/03/02 07:43:07 vinod - Added illuminates and cosfactor functions - - Revision 2.1 2000/02/29 06:27:10 vinod - Uses intensity now - - Revision 2.0 2000/02/18 01:43:46 vinod - Release 2.0 - - Revision 1.4 2000/02/16 00:46:33 vinod - Correction in color computation - - Revision 1.3 2000/02/14 21:09:13 vinod - Changed color model to use warm and cool colors - - Revision 1.2 2000/02/08 10:24:51 vinod - Changed type to return correct enum - - Revision 1.1.1.1 2000/02/08 02:55:22 vinod - Light classes - -*/ diff --git a/topmodx/include/Light/Light.h b/topmodx/include/Light/Light.h deleted file mode 100644 index 1559483..0000000 --- a/topmodx/include/Light/Light.h +++ /dev/null @@ -1,160 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Light.hh,v 2.4 2002/10/17 06:43:58 vinod Exp $ */ - -#ifndef _LIGHT_HH_ - -#define _LIGHT_HH_ - -// Abstract base class for a generic Light source -// Each light has a warm color, cool color and intensity. The intensity need not -// be used at all. And for lights which have only one color, there is a reference -// variable 'color' which points to the warm color. This can be used without having -// to worry about warm and cool colors -// Every light also has a position (although it might be meaningless for directional lights) -// and a boolean variable which indicates active/inactive state of light - -#include "../Base/BaseObject.h" -#include "../Graphics/Color.h" -#include "../vecmat/Vector3d.h" - -#include - -enum LightType { Ambient = 0, Directional = 1, PtLight = 2, Spot = 3 }; - -class Light; -typedef Light * LightPtr; - -class Light : public BaseObject -{ -public: - // Default constructor - Light() - : BaseObject(), position(0, 0, 0), - warmcolor(1, 1, 1), coolcolor(1, 1, 1), color(warmcolor), - intensity(1), state(true) - { - } - - // 1-arg constructor - Light(const Vector3d& pos) - : BaseObject(), position(pos), - warmcolor(1, 1, 1), coolcolor(1, 1, 1), color(warmcolor), - intensity(1), state(true) - { - } - - // 1-arg constructor. specifies color - Light(const RGBColor& col) - : BaseObject(), position(0, 0, 0), - warmcolor(col), coolcolor(col), color(warmcolor), - intensity(1), state(true) - { - } - - // Copy constructor - Light(const Light& light) - : BaseObject(light), position(light.position), - warmcolor(light.warmcolor), coolcolor(light.coolcolor), color(warmcolor), - intensity(light.intensity), state(light.state) - { - } - - // Destructor - virtual ~Light() - { - } - - // Assignment operator - Light& operator = (const Light& light) - { - BaseObject::operator = (light); - position = light.position; - warmcolor = light.warmcolor; coolcolor = light.coolcolor; - intensity = light.intensity; state = light.state; - return (*this); - } - - // Return type of light. - virtual LightType type(void) const = 0; - - // Does this light illuminate given point? - virtual bool illuminates(const Vector3d& p) const = 0; - - // Compute the cosine factor for given point/normal. Meaningful only for some lights - virtual double cosfactor(const Vector3d& p, const Vector3d& n) const = 0; - - // Illuminate a given point with given normal using this light and return the color - virtual RGBColor illuminate(const Vector3d& p, const Vector3d& n) const = 0; - - // Illuminate a given point with given normal using this light and return the color - // The eye position is also given to allow specular computations - virtual RGBColor illuminate(const Vector3d& p, const Vector3d& n, const Vector3d& e) const = 0; - - -public: - Vector3d position; // Position - - /* NOTE: ORDER DEPENDENCY HERE! 'color' has to come *AFTER* warmcolor */ - RGBColor warmcolor; // Warm color - RGB - RGBColor coolcolor; // Cool color - RGB - RGBColor& color; // Reference to warm color - - double intensity; // Intensity of color - - bool state; // true/1 = on, false/0 = off - -}; - -#endif // #ifndef _LIGHT_HH_ - -/* - $Log: Light.hh,v $ - Revision 2.4 2002/10/17 06:43:58 vinod - Removed ID field and reference to PETComponent - - Revision 2.2 2000/03/02 07:43:07 vinod - Added illuminates and cosfactor functions - - Revision 2.1 2000/02/29 06:26:34 vinod - Added intensity member and a color reference member for single color mode - - Revision 2.0 2000/02/18 01:43:46 vinod - Release 2.0 - - Revision 1.3 2000/02/14 21:09:13 vinod - Changed color model to use warm and cool colors - - Revision 1.2 2000/02/08 10:24:31 vinod - Changed enum for LightType to avoid conflicts with class names - - Revision 1.1.1.1 2000/02/08 02:55:22 vinod - Light classes - -*/ diff --git a/topmodx/include/Light/PointLight.h b/topmodx/include/Light/PointLight.h deleted file mode 100644 index c1e6a03..0000000 --- a/topmodx/include/Light/PointLight.h +++ /dev/null @@ -1,169 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: PointLight.hh,v 1.1 2006/09/04 19:22:53 stuart Exp $ */ - -#ifndef _POINT_LIGHT_HH_ - -#define _POINT_LIGHT_HH_ - -// class for a point light. Derived from class Light -// No additional member data - -#include "Light.h" - -class PointLight; -typedef PointLight *PointLightPtr; - -class PointLight : public Light -{ -public: - - // Default constructor - PointLight() : Light() - { - } - - // 1 argument constructor - PointLight(const Vector3d pos) : Light(pos) - { - } - - // Copy constructor - PointLight(const PointLight& pl) : Light(pl) - { - } - - // Destructor - ~PointLight() - { - } - - // Assignment operator - PointLight& operator = (const PointLight& pl) - { - Light::operator = (pl); - return (*this); - } - - // Make a copy - virtual BaseObjectPtr copy(void) const - { - PointLightPtr newpl = new PointLight(*this); - return newpl; - } - - // Type of light - virtual LightType type(void) const - { - return PtLight; - } - - // Does this light illuminate given point? PointLight always does - virtual bool illuminates(const Vector3d&) const - { - return true; - } - - // Compute the cosine factor for given point/normal - virtual double cosfactor(const Vector3d& p, const Vector3d& n) const - { - Vector3d vec(position - p); normalize(vec); - Vector3d normal(n); normalize(normal); - double cf = sqr((1.0 + vec*normal) / 2.0); - - return cf; - } - - // Illuminate a given point with a given normal using this light and return color - virtual RGBColor illuminate(const Vector3d& p, const Vector3d& n) const - { - if (state == false) return RGBColor(0); - - // Since we don't have eye position do only diffuse computation - double cf = cosfactor(p, n); - RGBColor color; - - color = (warmcolor*cf + coolcolor*(1.0 - cf))*intensity; - return color; - } - - // Same as above but with specular lighting also - virtual RGBColor illuminate(const Vector3d& p, const Vector3d& n, const Vector3d& e) const - { - // float spec=0; - // Vector3d V(e); // normalize(V); - // Vector3d L(position-p); normalize(L); - // Vector3d R(L - 2.0f * (L*N)*N); - // float dot = V*R; - // if (dot > 0) spec = powf( dot, 20 ); - if (state == false) return RGBColor(0); - // For now do only diffuse lighting - return illuminate(p, n); - } -}; - -#endif /* #ifndef _POINT_LIGHT_HH_ */ - - -/* - $Log: PointLight.hh,v $ - Revision 1.1 2006/09/04 19:22:53 stuart - Added includes and libs. - - Revision 2.2 2000/03/02 07:43:19 vinod - Added illuminates and cosfactor functions - - Revision 2.1 2000/02/29 06:26:48 vinod - Uses intensity now - - Revision 2.0 2000/02/18 01:43:47 vinod - Release 2.0 - - Revision 1.7 2000/02/18 01:42:56 vinod - Missing normalize. cosfactor is now squared - - Revision 1.6 2000/02/18 01:19:06 vinod - *** empty log message *** - - Revision 1.5 2000/02/14 21:09:13 vinod - Changed color model to use warm and cool colors - - Revision 1.4 2000/02/11 08:54:26 vinod - Changed n to normal in costheta calculation - - Revision 1.3 2000/02/08 10:27:02 vinod - Minor bug fixes - - Revision 1.2 2000/02/08 10:24:50 vinod - Changed type to return correct enum - - Revision 1.1.1.1 2000/02/08 02:55:22 vinod - Light classes - -*/ diff --git a/topmodx/include/Light/SpotLight.h b/topmodx/include/Light/SpotLight.h deleted file mode 100644 index 3874a9f..0000000 --- a/topmodx/include/Light/SpotLight.h +++ /dev/null @@ -1,188 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: SpotLight.hh,v 2.4 2000/03/02 10:39:57 vinod Exp $ */ - -#ifndef _SPOT_LIGHT_HH_ - -#define _SPOT_LIGHT_HH_ - -// class for a spot light. Derived from class Light -// A spot light has a radius which is the radius of the projected circle - -#include "Light.h" -#include - -class SpotLight; -typedef SpotLight *SpotLightPtr; - -class SpotLight : public Light -{ -public: - - double radius; // Spot light radius - -protected: - - double cutoff; // Radius ratio for constant intensity - // Always between 0 and 1 - -public: - - // Default constructor - SpotLight() : Light(), radius(5.0), cutoff(0.5) - { - } - - // 1 argument constructor - SpotLight(const Vector3d pos) : Light(pos), radius(5.0), cutoff(0.5) - { - } - - // Copy constructor - SpotLight(const SpotLight& sl) : Light(sl), radius(sl.radius), cutoff(sl.cutoff) - { - } - - // Destructor - ~SpotLight() - { - } - - // Assignment operator - SpotLight& operator = (const SpotLight& sl) - { - Light::operator = (sl); radius = sl.radius; cutoff = sl.cutoff; - return (*this); - } - - // Make a copy - virtual BaseObjectPtr copy(void) const - { - SpotLightPtr newsl = new SpotLight(*this); - return newsl; - } - - double getCutoff(void) const - { - return cutoff; - } - - void setCutoff(double c) - { - cutoff = c; - if (cutoff < 0.0) cutoff = 0.0; - else if (cutoff > 1.0) cutoff = 1.0; - } - - // Type of light - virtual LightType type(void) const - { - return Spot; - } - - // Does this light illuminate given point? - // If dist of point is within spot light radius on the ZX plane SpotLight illuminates - virtual bool illuminates(const Vector3d& p) const - { - bool illum = false; - Vector3d vec(position - p); - double dist = sqrt(sqr(vec[0]) + sqr(vec[2])); - - if (dist <= radius) illum = true; - return illum; - } - - // Compute the cosine factor for given point/normal - double cosfactor(const Vector3d& p, const Vector3d& n) const - { - double cf = 0.0; - Vector3d vec(position - p); - double dist = sqrt(sqr(vec[0]) + sqr(vec[2])); - Vector3d normal(n); normalize(normal); - - normalize(vec); - cf = (1.0 + vec*normal) / 2.0; - if (dist > radius) cf = 0.0; - else if (dist > cutoff * radius) - { - cf *= (radius - dist) / (radius - cutoff*radius); - } - return cf; - } - - // Illuminate a given point with a given normal using this light and return color - virtual RGBColor illuminate(const Vector3d& p, const Vector3d& n) const - { - if (state == false) return RGBColor(0); - - // Since we don't have eye position do only diffuse computation - double cf = cosfactor(p, n); - RGBColor color; - - color = (warmcolor*cf + coolcolor*(1.0 - cf))*intensity; - return color; - } - - // Same as above but with specular lighting also - virtual RGBColor illuminate(const Vector3d& p, const Vector3d& n, const Vector3d& e) const - { - // e = e; - if (state == false) return RGBColor(0); - // For now do only diffuse lighting - return illuminate(p, n); - } -}; - -#endif /* #ifndef _SPOT_LIGHT_HH_ */ - - -/* - $Log: SpotLight.hh,v $ - Revision 2.4 2000/03/02 10:39:57 vinod - Distance is now computed as sqrt - - Revision 2.3 2000/03/02 08:48:07 vinod - Typo - - Revision 2.2 2000/03/02 07:43:47 vinod - Added illuminates and cosfactor functions - - Revision 2.1 2000/02/29 06:27:01 vinod - Uses intensity now - - Revision 2.0 2000/02/18 01:43:47 vinod - Release 2.0 - - Revision 1.2 2000/02/18 01:43:07 vinod - Removed unused variable - - Revision 1.1 2000/02/18 01:19:16 vinod - SpotLight class - -*/ diff --git a/topmodx/include/arcball/Arcball.cc b/topmodx/include/arcball/Arcball.cc deleted file mode 100644 index 27a37cb..0000000 --- a/topmodx/include/arcball/Arcball.cc +++ /dev/null @@ -1,454 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Arcball.cc,v 2.2 2000/05/02 19:08:30 vinod Exp $ */ - -#ifdef __APPLE__ -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#endif - -#include "Arcball.hh" - -#define LG_NSEGS 4 -#define NSEGS (1< 1.0e-5 ) - { - p[0] = n[1]; p[1] = -n[0]; - normalize(p); - } - else - { - p[0] = 0; p[1] = 1; - } - m = p % n; - drawAnyArc(p, m); - drawAnyArc(m, -p); -} - - /* - Draw all constraint arcs. - */ -void Arcball :: drawConstraints(void) const -{ - if ( axisSet == NoAxes ) return; - - Vector3d axis; - int i; - - for (i=0; i < 3; ++i) - { - if ( axisIndex != i) - { - if (dragging) continue; - FARCOLOR(); - } - else NEARCOLOR(); - axis = sets[axisSet][i]; - if ( fabs(axis[2]-1.0) < 1.0e-5 ) - unitCircle(); - //drawCircle(0.0, 0.0, 1.0); - else - drawHalfArc(axis); - } -} - - /* - Draw "rubber band" arc during dragging. - */ -void Arcball :: drawDragArc(void) const -{ - if ( dragging ) - { - DRAGCOLOR(); - drawAnyArc(vFrom, vTo); - } -} - -//--- Math subroutines moved here from BallMath ---// - - /* - Convert window coordinates to sphere coordinates. - */ -Vector3d Arcball :: mouseOnSphere(const Vector3d& mouse, const Vector3d& center, double radius) -{ - Vector3d ballMouse; - register double magsqr; - - ballMouse[0] = (mouse[0] - center[0]) / radius; - ballMouse[1] = (mouse[1] - center[1]) / radius; - magsqr = sqr(ballMouse[0]) + sqr(ballMouse[1]); - if (magsqr > 1.0) - { - register double scale = 1.0/sqrt(magsqr); - ballMouse[0] *= scale; ballMouse[1] *= scale; - ballMouse[2] = 0.0; - } - else - { - ballMouse[2] = sqrt(1.0 - magsqr); - } - return ballMouse; -} - - /* - Construct a unit quaternion from two points on unit sphere - */ -Quaternion Arcball :: quatFromBallPoints(const Vector3d& from, const Vector3d& to) -{ - return Quaternion(from % to,from * to); -} - - /* - Convert a unit quaternion to two points on unit sphere - Assumes that the given quaternion is a unit quaternion - */ -void Arcball :: quatToBallPoints(const Quaternion& q, Vector3d& arcFrom, Vector3d& arcTo) -{ - double s; - s = sqrt(sqr(q[0]) + sqr(q[1])); - if (fabs(s) < 1.0e-5) arcFrom.set(0.0, 1.0, 0.0); - else arcFrom.set(-q[1]/s, q[0]/s, 0.0); - - arcTo[0] = q[3]*arcFrom[0] - q[2]*arcFrom[1]; - arcTo[1] = q[3]*arcFrom[1] + q[2]*arcFrom[0]; - arcTo[2] = q[0]*arcFrom[1] - q[1]*arcFrom[0]; - if (q[3] < 0.0) arcFrom *= -1.0; -} - - /* - Force sphere point to be perpendicular to axis. - */ -Vector3d Arcball :: constrainToAxis(const Vector3d& loose, const Vector3d& axis) -{ - Vector3d onPlane; - register float norm; - onPlane = loose - axis * (axis*loose); - norm = normsqr(onPlane); - if (norm > 0.0) - { - if (onPlane[2] < 0.0) onPlane *= -1.0; - onPlane /= sqrt(norm); - } - else if ( fabs(axis[2]-1.0) < 1.0e-5 ) - { - onPlane.set(1.0, 0.0, 0.0); - } - else - { - onPlane.set(-axis[1], axis[0], 0.0); normalize(onPlane); - } - return onPlane; -} - - /* - Find the index of nearest arc of axis set. - */ -int Arcball :: nearestConstraintAxis(const Vector3d& loose, Vector3d * axes, int nAxes) -{ - Vector3d onPlane; - register float max, dot; - register int i, nearest; - max = -1.0; nearest = 0; - for (i=0; i < nAxes; i++) - { - onPlane = constrainToAxis(loose, axes[i]); - dot = onPlane * loose; - if ( dot > max ) - { - max = dot; nearest = i; - } - } - return nearest; -} - - /* - Halve arc between unit vectors v1 and v2. - Assumes that v1 and v3 are unit vectors - */ -Vector3d Arcball :: bisect(const Vector3d& v1, const Vector3d& v2) -{ - Vector3d v = v1 + v2; - float Nv = normsqr(v);; - - if (Nv < 1.0e-5) v.set(0.0,0.0,1.0); - else v /= sqrt(Nv); - return v; -} - - -/* - $Log: Arcball.cc,v $ - Revision 2.2 2000/05/02 19:08:30 vinod - Rotation matrix is now mathematically correct (transpose of GL) - - Revision 2.1 2000/02/10 07:43:25 vinod - Added 2 arg constructor. Changed draw to take no arguments - - Revision 2.0 2000/02/09 04:36:07 vinod - Version change - - Revision 1.5 2000/02/09 04:32:34 vinod - Moved math routines into Arcball class - - Revision 1.4 2000/02/03 22:56:18 vinod - *** empty log message *** - - Revision 1.3 2000/02/01 06:15:40 vinod - Added unitCircle, changed draw routines - - Revision 1.2 2000/01/21 22:12:38 vinod - *** empty log message *** - - Revision 1.1.1.1 2000/01/21 18:37:29 vinod - Arcball Class - -*/ diff --git a/topmodx/include/arcball/Arcball.h b/topmodx/include/arcball/Arcball.h deleted file mode 100644 index dc8e7aa..0000000 --- a/topmodx/include/arcball/Arcball.h +++ /dev/null @@ -1,212 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Arcball.hh,v 2.7 2000/03/03 00:48:47 vinod Exp $ */ - -#ifndef _ARCBALL_HH_ - -#define _ARCBALL_HH_ - -#include "../vecmat/Vector3d.hh" -#include "../vecmat/Quaternion.hh" -#include "../Base/Inlines.hh" -#include -#include "../vecmat/Matrix4x4.hh" - -enum AxisSet { CameraAxes=0, BodyAxes=1, NoAxes=2 }; - -typedef Vector3d * Axes; - -class Arcball -{ - protected : - - Vector3d v3Center; // Center of ball - double dRadius; // Radius of ball - Quaternion qNow, qDown, qDrag; - Vector3d vNow, vDown, vFrom, vTo; - Matrix4_4 mNow; - bool dragging; - Axes sets[2]; - AxisSet axisSet; - int axisIndex; - - public : - - Arcball(); // Default constructor - Arcball(const Vector3d& cen, double rad); // 2 arg constructor - Arcball(const Arcball& ab); // Copy constructor - ~Arcball(); // Destructor - - Arcball& operator = (const Arcball& ab); // Assignment operator - - void place(const Vector3d& cen, double rad) // Place the arcball - { - v3Center = cen; dRadius = rad; - } - - void place(double x, double y, double z, double rad) // Place the arcball - { - v3Center.set(x,y,z); dRadius = rad; - } - - void center(const Vector3d& cen) // Set the center - { - v3Center = cen; - } - - void center(double x, double y, double z) // Set the center - { - v3Center.set(x,y,z); - } - - void radius(double rad) // Set the radius - { - dRadius = rad; - } - - void reset(void) - { - qDown.reset(); qNow.reset(); mNow.reset(); - } - - void mouse(const Vector3d& pos) // Specify mouse position - { - vNow = pos; - } - - void mouse(double x, double y) // Specify mouse position - { - vNow.set(x,y,0); - } - - void useSet(AxisSet set) // Use specified axis set - { - if ( !dragging ) axisSet = set; - } - - void update(void); // Update the quats and matrices - - Vector3d center(void) const // Get the center - { - return v3Center; - } - - double radius(void) const // Get the radius - { - return dRadius; - } - - Matrix4_4 value(void) const // Get the rot matrix - { - return mNow; - } - - Quaternion quat_value(void) const // Get the rot quaternion - { - return qNow; - } - - void beginDrag(void) // Begin a drag - { - dragging = true; vDown = vNow; - } - - void endDrag(void) // End a drag - { - dragging = false; qDown = qNow; - sets[BodyAxes][0] = mNow[0]; - sets[BodyAxes][1] = mNow[1]; - sets[BodyAxes][2] = mNow[2]; - } - - bool isDragging(void) const // Check dragging status - { - return dragging; - } - - // Draw the arcball - void draw(void) const; // Draw the arcball - - private : - - static void drawAnyArc(const Vector3d& from, const Vector3d& to); - static void drawHalfArc(const Vector3d& n); - - void drawConstraints(void) const; - void drawDragArc(void) const; - - protected : - - // Math routines. Moved into class from BallMath - static Vector3d mouseOnSphere(const Vector3d& mouse, const Vector3d& center, double radius); - static Vector3d constrainToAxis(const Vector3d& loose, const Vector3d& axis); - static int nearestConstraintAxis(const Vector3d& loose, Vector3d * axes, int nAxes); - static Quaternion quatFromBallPoints(const Vector3d& from, const Vector3d& to); - static void quatToBallPoints(const Quaternion& q, Vector3d& arcFrom, Vector3d& arcTo); - static Vector3d bisect(const Vector3d& v1, const Vector3d& v2); -}; - -#endif /* #ifndef _ARCBALL_HH_ */ - - -/* - $Log: Arcball.hh,v $ - Revision 2.7 2000/03/03 00:48:47 vinod - Fixed reset() - - Revision 2.6 2000/03/03 00:09:22 vinod - Changed to use new include files - Added reset function - - Revision 2.5 2000/02/10 08:38:01 vinod - Added place, center, mouse functions which take double's - - Revision 2.4 2000/02/10 08:18:04 vinod - Added access functions for center and radius - - Revision 2.3 2000/02/10 07:43:01 vinod - Added 2 arg constructor. - Changed draw to take no arguments. Added comments - - Revision 2.2 2000/02/10 05:43:30 vinod - Added quat_value fn to get value of current Quaternion - - Revision 2.1 2000/02/10 04:47:48 vinod - Added isDragging function - - Revision 2.0 2000/02/09 04:36:08 vinod - Version change - - Revision 1.2 2000/02/09 04:32:34 vinod - Moved math routines into Arcball class - - Revision 1.1.1.1 2000/01/21 18:37:29 vinod - Arcball Class - -*/ diff --git a/topmodx/include/arcball/BallMath.cc b/topmodx/include/arcball/BallMath.cc deleted file mode 100644 index 543bc85..0000000 --- a/topmodx/include/arcball/BallMath.cc +++ /dev/null @@ -1,155 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: BallMath.cc,v 2.0 2000/02/09 04:36:08 vinod Exp $ */ - -#include "BallMath.hh" - - /* - Convert window coordinates to sphere coordinates. - */ -Vector3d mouseOnSphere(const Vector3d& mouse, const Vector3d& center, double radius) -{ - Vector3d ballMouse; - register double magsqr; - - ballMouse[0] = (mouse[0] - center[0]) / radius; - ballMouse[1] = (mouse[1] - center[1]) / radius; - magsqr = sqr(ballMouse[0]) + sqr(ballMouse[1]); - if (magsqr > 1.0) - { - register double scale = 1.0/sqrt(magsqr); - ballMouse[0] *= scale; ballMouse[1] *= scale; - ballMouse[2] = 0.0; - } - else - { - ballMouse[2] = sqrt(1.0 - magsqr); - } - return ballMouse; -} - - /* - Construct a unit quaternion from two points on unit sphere - */ -Quaternion quatFromBallPoints(const Vector3d& from, const Vector3d& to) -{ - return Quaternion(from % to,from * to); -} - - /* - Convert a unit quaternion to two points on unit sphere - Assumes that the given quaternion is a unit quaternion - */ -void quatToBallPoints(const Quaternion& q, Vector3d& arcFrom, Vector3d& arcTo) -{ - double s; - s = sqrt(sqr(q[0]) + sqr(q[1])); - if (fabs(s) < 1.0e-5) arcFrom.set(0.0, 1.0, 0.0); - else arcFrom.set(-q[1]/s, q[0]/s, 0.0); - - arcTo[0] = q[3]*arcFrom[0] - q[2]*arcFrom[1]; - arcTo[1] = q[3]*arcFrom[1] + q[2]*arcFrom[0]; - arcTo[2] = q[0]*arcFrom[1] - q[1]*arcFrom[0]; - if (q[3] < 0.0) arcFrom *= -1.0; -} - - /* - Force sphere point to be perpendicular to axis. - */ -Vector3d constrainToAxis(const Vector3d& loose, const Vector3d& axis) -{ - Vector3d onPlane; - register float norm; - onPlane = loose - axis * (axis*loose); - norm = normsqr(onPlane); - if (norm > 0.0) - { - if (onPlane[2] < 0.0) onPlane *= -1.0; - onPlane /= sqrt(norm); - } - else if ( fabs(axis[2]-1.0) < 1.0e-5 ) - { - onPlane.set(1.0, 0.0, 0.0); - } - else - { - onPlane.set(-axis[1], axis[0], 0.0); normalize(onPlane); - } - return onPlane; -} - - /* - Find the index of nearest arc of axis set. - */ -int nearestConstraintAxis(const Vector3d& loose, Vector3d * axes, int nAxes) -{ - Vector3d onPlane; - register float max, dot; - register int i, nearest; - max = -1.0; nearest = 0; - for (i=0; i < nAxes; i++) - { - onPlane = constrainToAxis(loose, axes[i]); - dot = onPlane * loose; - if ( dot > max ) - { - max = dot; nearest = i; - } - } - return nearest; -} - - /* - Halve arc between unit vectors v1 and v2. - Assumes that v1 and v3 are unit vectors - */ -Vector3d bisect(const Vector3d& v1, const Vector3d& v2) -{ - Vector3d v = v1 + v2; - float Nv = normsqr(v);; - - if (Nv < 1.0e-5) v.set(0.0,0.0,1.0); - else v /= sqrt(Nv); - return v; -} - -/* - $Log: BallMath.cc,v $ - Revision 2.0 2000/02/09 04:36:08 vinod - Version change - - Revision 1.1.1.1 2000/01/21 18:37:29 vinod - Arcball Class - -*/ diff --git a/topmodx/include/arcball/BallMath.h b/topmodx/include/arcball/BallMath.h deleted file mode 100644 index a3de7bd..0000000 --- a/topmodx/include/arcball/BallMath.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: BallMath.hh,v 2.0 2000/02/09 04:36:08 vinod Exp $ */ - -#ifndef _BALL_MATH_HH_ - -#define _BALL_MATH_HH_ - -#include "../vecmat/Vector3d.hh" -#include "../vecmat/Quaternion.hh" -#include "../Base/Inlines.hh" -#include - -Vector3d mouseOnSphere(const Vector3d& mouse, const Vector3d& ballCenter, double ballRadius); -Vector3d constrainToAxis(const Vector3d& loose, const Vector3d& axis); -int nearestConstraintAxis(const Vector3d& loose, Vector3d * axes, int nAxes); -Quaternion quatFromBallPoints(const Vector3d& from, const Vector3d& to); -void quatToBallPoints(const Quaternion& q, Vector3d& arcFrom, Vector3d& arcTo); -Vector3d bisect(const Vector3d& v1, const Vector3d& v2); - -#endif /* #ifndef _BALL_MATH_HH_ */ - -/* - $Log: BallMath.hh,v $ - Revision 2.0 2000/02/09 04:36:08 vinod - Version change - - Revision 1.2 2000/01/21 20:56:37 vinod - Added const modifiers where necessary, to math cc file - - Revision 1.1.1.1 2000/01/21 18:37:29 vinod - Arcball Class - -*/ diff --git a/topmodx/include/arcball/DollyControl.h b/topmodx/include/arcball/DollyControl.h deleted file mode 100644 index 1a9de0c..0000000 --- a/topmodx/include/arcball/DollyControl.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: DollyControl.hh,v 2.2 2000/05/02 19:09:04 vinod Exp $ */ - -#ifndef _DOLLY_CONTROL_HH_ - -#define _DOLLY_CONTROL_HH_ - -// Class for a translation controller - -#include "../vecmat/Vector3d.hh" -#include "../vecmat/Matrix4x4.hh" - -class DollyControl -{ - protected : - - Matrix4x4 mNow; // Current transformation matrix - bool dragging; - double vNow, vDown; // Mouse translations/points - double dNow, dDown; // Current dolly - double scale_factor; // For scaling given coordinate value - - public : - - DollyControl(double sf=1.0) // Default constructor - : mNow(), dragging(false), vNow(), vDown(), dNow(), dDown(), - scale_factor(sf) - {} - - DollyControl(const DollyControl& dc) // Copy constructor - : mNow(dc.mNow), dragging(dc.dragging), vNow(dc.vNow), vDown(dc.vDown), - dNow(dc.dNow), dDown(dc.dDown), scale_factor(dc.scale_factor) - {} - - ~DollyControl() // Destructor - {} - - DollyControl& operator = (const DollyControl& dc) // Assignment operator - { - mNow = dc.mNow; dragging = dc.dragging; vNow = dc.vNow; vDown = dc.vDown; - dNow = dc.dNow; dDown = dc.dDown; scale_factor = dc.scale_factor; - return (*this); - } - - void reset(void) - { - dNow = 0.0; dDown = 0.0 ; mNow.reset(); - } - - void set_scale(double sf) - { - scale_factor = sf; - } - - void reset_scale(void) - { - scale_factor = 1.0; - } - - void mouse(const Vector3d& pos) // Specify mouse position - // only z coordinate is used - { - vNow = scale_factor*pos[2]; - } - - void mouse(double z) // Specify mouse position - { - vNow = scale_factor*z; - } - - Matrix4_4 value(void) const // Get the translation matrix - { - return mNow; - } - - double dolly_value(void) const // Get the dolly value - { - return dNow; - } - - Vector3d dolly_vector(void) const // Get dolly value as vector - // dolly value is in z - { - return Vector3d(0,0,dNow); - } - - void beginDrag(void) // Begin a drag - { - dragging = true; vDown = vNow; - } - - void endDrag(void) // End a drag - { - dragging = false; dDown = dNow; - } - - bool isDragging(void) const // Check dragging status - { - return dragging; - } - - void update(void) // Update the vectors and matrices - { - if ( dragging ) - { - dNow = dDown; dNow += vNow; dNow -= vDown; - - /* - NOTE : Matrix should be transposed before using in OpenGL - */ - mNow[0][3] = 0.0; - mNow[1][3] = 0.0; - mNow[2][3] = dNow; - } - } -}; - -#endif /* #ifndef _DOLLY_CONTROL_HH_ */ - - -/* - $Log: DollyControl.hh,v $ - Revision 2.2 2000/05/02 19:09:04 vinod - Rotation matrix is now mathematically correct (transpose of GL) - - Revision 2.1 2000/03/31 09:10:24 vinod - Dolly (movement along direction of sight) controller - -*/ diff --git a/topmodx/include/arcball/TransControl.h b/topmodx/include/arcball/TransControl.h deleted file mode 100644 index 05e8287..0000000 --- a/topmodx/include/arcball/TransControl.h +++ /dev/null @@ -1,143 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: TransControl.hh,v 2.3 2000/05/02 19:08:58 vinod Exp $ */ - -#ifndef _TRANS_CONTROL_HH_ - -#define _TRANS_CONTROL_HH_ - -// Class for a translation controller - -#include "../vecmat/Vector3d.hh" -#include "../vecmat/Matrix4x4.hh" - -class TransControl -{ - protected : - - Matrix4x4 mNow; // Current transformation matrix - bool dragging; - Vector3d vNow, vDown; // Mouse translations/points - Vector3d tNow, tDown; // Current translation - - public : - - TransControl() // Default constructor - : mNow(), dragging(false), vNow(), vDown(), tNow(), tDown() - {} - - TransControl(const TransControl& tc) // Copy constructor - : mNow(tc.mNow), dragging(tc.dragging), vNow(tc.vNow), vDown(tc.vDown), - tNow(tc.tNow), tDown(tc.tDown) - {} - - ~TransControl() // Destructor - {} - - TransControl& operator = (const TransControl& tc) - { - mNow = tc.mNow; dragging = tc.dragging; vNow = tc.vNow; vDown = tc.vDown; - tNow = tc.tNow; tDown = tc.tDown; - return (*this); - } - - void reset(void) - { - tNow.reset(); tDown.reset(); mNow.reset(); - } - - void mouse(const Vector3d& pos) // Specify mouse position - { - vNow = pos; - } - - void mouse(double x, double y, double z=0.0) // Specify mouse position - { - vNow.set(x,y,z); - } - - Matrix4_4 value(void) const // Get the translation matrix - { - return mNow; - } - - Vector3d trans_value(void) const // Get the translation vector - { - return tNow; - } - - void beginDrag(void) // Begin a drag - { - dragging = true; vDown = vNow; - } - - void endDrag(void) // End a drag - { - dragging = false; tDown = tNow; - } - - bool isDragging(void) const // Check dragging status - { - return dragging; - } - - void update(void) // Update the vectors and matrices - { - if ( dragging ) - { - tNow = tDown; tNow += vNow; tNow -= vDown; - - /* - NOTE : Matrix should be transposed before using in OpenGL - */ - mNow[0][3] = tNow[0]; - mNow[1][3] = tNow[1]; - mNow[2][3] = tNow[2]; - } - } -}; - -#endif /* #ifndef _TRANS_CONTROL_HH_ */ - - -/* - $Log: TransControl.hh,v $ - Revision 2.3 2000/05/02 19:08:58 vinod - Rotation matrix is now mathematically correct (transpose of GL) - - Revision 2.2 2000/03/07 22:41:02 vinod - Added z coord with default 0 to mouse() function - - Revision 2.1 2000/03/03 19:37:45 vinod - Moved from Graphics directory - - Revision 1.1 2000/03/03 00:50:54 vinod - Translation(panning) controller - -*/ diff --git a/topmodx/include/arcball/ZoomControl.h b/topmodx/include/arcball/ZoomControl.h deleted file mode 100644 index ee1b0eb..0000000 --- a/topmodx/include/arcball/ZoomControl.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: ZoomControl.hh,v 2.2 2000/05/02 19:08:48 vinod Exp $ */ - -#ifndef _ZOOM_CONTROL_HH_ - -#define _ZOOM_CONTROL_HH_ - -// Class for a zoom controller -// Implements zooming by scaling in the current XY plane - -#include "../vecmat/Vector3d.hh" -#include "../vecmat/Matrix4x4.hh" -#include "../Base/Inlines.hh" - -class ZoomControl -{ - protected : - - Matrix4x4 mNow; // Current transformation matrix - bool dragging; - double vNowx, vDownx; // Mouse x coordinate - Vector3d zNow, zDown; // Current zoom, etc. - - public : - - ZoomControl() // Default constructor - : mNow(), dragging(false), vNowx(0.0), vDownx(0.0), zNow(1,1,1), zDown(1,1,1) - {} - - ZoomControl(const ZoomControl& tc) // Copy constructor - : mNow(tc.mNow), dragging(tc.dragging), vNowx(tc.vNowx), vDownx(tc.vDownx), - zNow(tc.zNow), zDown(tc.zDown) - {} - - ~ZoomControl() // Destructor - {} - - ZoomControl& operator = (const ZoomControl& tc) - { - mNow = tc.mNow; dragging = tc.dragging; vNowx = tc.vNowx; vDownx = tc.vDownx; - zNow = tc.zNow; zDown = tc.zDown; - return (*this); - } - - void reset(void) - { - zNow.set(1,1,1); zDown.set(1,1,1); mNow.reset(); - } - - void mouse(const Vector3d& pos) // Specify mouse position - { - vNowx = pos[0]; - } - - void mouse(double x, double y, double z=0.0) // Specify mouse position - { - vNowx = x; - } - - void mouse(double x) // Specify mouse x coordinate - { - vNowx = x; - } - - Matrix4_4 value(void) const // Get the translation matrix - { - return mNow; - } - - Vector3d zoom_value(void) const // Get the scale vector - { - return zNow; - } - - void beginDrag(void) // Begin a drag - { - dragging = true; vDownx = vNowx; - } - - void endDrag(void) // End a drag - { - dragging = false; zDown = zNow; - } - - bool isDragging(void) const // Check dragging status - { - return dragging; - } - - void update(void) // Update the vectors and matrices - { - if ( dragging ) - { - zNow = zDown; - - // Mapping between mouse movement and scale change is as follows - // For a mouse movement of 1.0, scale changes by a factor of 2 - // Note: This is in the transformed mouse coordinates (-1 to 1) - // Also only the x mouse coordinate is used - double diff = vNowx - vDownx; - double fact = 1 + Abs(diff); - if ( diff < 0.0 ) zNow /= fact; - else zNow *= fact; - - // All 3 coordinates of the zoom vector are changed to get proper - // view scaling (rotate after zoom, etc.) - - /* - NOTE : Since matrix is diagonal, no transposing required - */ - mNow[0][0] = zNow[0]; - mNow[1][1] = zNow[1]; - mNow[2][2] = zNow[2]; - } - } -}; - -#endif /* #ifndef _ZOOM_CONTROL_HH_ */ - - -/* - $Log: ZoomControl.hh,v $ - Revision 2.2 2000/05/02 19:08:48 vinod - *** empty log message *** - - Revision 2.1 2000/03/20 19:55:05 vinod - Zoom controller using scaling - -*/ diff --git a/topmodx/include/arcball/arcball.pro b/topmodx/include/arcball/arcball.pro deleted file mode 100644 index f9bb0ce..0000000 --- a/topmodx/include/arcball/arcball.pro +++ /dev/null @@ -1,38 +0,0 @@ -TEMPLATE = lib -CONFIG -= qt -CONFIG += opengl -CONFIG += static #dll # build shared library -CONFIG += debug warn_off create_prl -TARGET = arcball - -CONFIG(debug, debug|release) { - LIB_CONF_SUB_DIR = Debug -} else { - LIB_CONF_SUB_DIR = Debug -} -DESTDIR = ../../lib/$${LIB_CONF_SUB_DIR} - -INCLUDEPATH += ../vecmat - -macx { - # compile release + universal binary - #QMAKE_LFLAGS += -F../../lib - #LIBS += -framework vecmat - CONFIG += x86 ppc - #CONFIG += lib_bundle - QMAKE_BUNDLE_EXTENSION = .framework -#} else:unix { - QMAKE_LFLAGS += -L/usr/local/lib -L../../lib/$${LIB_CONF_SUB_DIR} - LIBS += -lvecmat -} - -HEADERS += \ - Arcball.h \ - BallMath.h \ - DollyControl.h \ - TransControl.h \ - ZoomControl.h - -SOURCES += \ - Arcball.cc \ - BallMath.cc diff --git a/topmodx/include/dlflaux/DLFLCast.cc b/topmodx/include/dlflaux/DLFLCast.cc deleted file mode 100644 index 1546480..0000000 --- a/topmodx/include/dlflaux/DLFLCast.cc +++ /dev/null @@ -1,207 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "DLFLCast.h" -#include -#include -#include - -namespace DLFL -{ - -void spheralize(DLFLObjectPtr obj) -{ - DLFLVertexPtrList::iterator vl_first, vl_last; - int num_vertices = 0; - Vector3d center; - DLFLVertexPtr vertexptr; - Vector3d buffer; - - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - while (vl_first != vl_last) - { - vertexptr = (*vl_first); ++vl_first; - - center += vertexptr->coords; - num_vertices++; - } - center /= num_vertices; - - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - while (vl_first != vl_last) - { - vertexptr = (*vl_first); ++vl_first; - - Vector3d new_pos = vertexptr->coords; // This is the old position - - buffer = new_pos - center; - normalize(buffer); - vertexptr->coords = buffer; /*+center;*/ - } -} - -void planarize(DLFLObjectPtr obj) -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr faceptr; - - fl_first = obj->beginFace(); - fl_last = obj->endFace(); - - /* Loop through all faces */ - while (fl_first != fl_last) - { - faceptr = (*fl_first); ++fl_first; - - /* - Find the average normal for the face and the centroid - Store these in the member variables of the face for later use - */ - faceptr->normal = faceptr->computeNormal(); - faceptr->centroid = faceptr->geomCentroid(); - - /* - If the normal and point to define the plane are calculated - using some other method, calculate them and store them in - the 'normal' and 'centroid' member variables in the face - */ - } - - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vertexptr; - DLFLFaceVertexPtrArray fvparray; - Vector3dArray p_array, n_array; // Arrays of point and normals for each face adjacent to a vertex - int num_faces; - - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - /* Loop through all vertices */ - while (vl_first != vl_last) - { - vertexptr = (*vl_first); ++vl_first; - - /* - Get all the corners for this vertex - */ - fvparray.clear(); // The local array must be cleared before calling getFaceVertices - vertexptr->getFaceVertices(fvparray); - num_faces = fvparray.size(); - - /* - Go through the array of face-vertices and find the normal and centroid - for each face - */ - p_array.clear(); n_array.clear(); // The local arrays must be cleared for each Vertex - - // If we resize the array before filling it, we can avoid unnecessary memory allocation - // thus speeding up the process a little bit. - //p_array.resize(num_faces,Vector3d(0)); n_array.resize(num_faces,Vector3d(0)); - p_array.resize(num_faces, Vector3d()); n_array.resize(num_faces, Vector3d()); - for (int i = 0; i getFacePtr(); - - // Get the normal and centroid for this face (which we calculated above) - // and store them in our local arrays - n_array[i] = fp->normal; - p_array[i] = fp->centroid; - //cout << "Before p = " << p_array[i] << " n = " << n_array[i] << endl; - //cout << "After p = " << p_array[i] << " n = " << n_array[i] << endl << endl; - } - - Vector3d new_pos = vertexptr->coords; // This is the old position - - Vector3d buffer1, buffer2; - float t, deltat; int m; - m = 100; t = 0.3; deltat = t / (1.1*m); - for (int j = 0; j 0.000001) - t=(n_array[0]*buffer1)/(n_array[0]*buffer2); - new_pos-=t*buffer2; - - if(num_faces>0) - { - buffer1=new_pos-p_array[1]; - buffer2=n_array[1]-(n_array[0]*n_array[1])*n_array[0]; - if(fabs((buffer2*buffer2))<0.000001) - buffer2=n_array[2]; - t=0; - if(fabs((n_array[1]*buffer2))>0.000001) - t=(n_array[1]*buffer1)/(n_array[1]*buffer2); - new_pos-=t*buffer2; - } - - else if(num_faces>1) - { - buffer1=new_pos-p_array[2]; - buffer2=n_array[0]%n_array[1]; - if(fabs((buffer2*buffer2))<0.000001) - buffer2=n_array[2]-(n_array[0]*n_array[2])*n_array[0]; - else if(fabs((buffer2*buffer2))<0.000001) - buffer2=n_array[2]-(n_array[1]*n_array[2])*n_array[1]; - else if(fabs((buffer2*buffer2))<0.000001) - buffer2=n_array[2]; - t=0; - if(fabs((n_array[2]*buffer2))>0.000001) - t=(n_array[2]*buffer1)/(n_array[2]*buffer2); - new_pos-=t*buffer2; - } - */ - - /* - Use the 2 arrays (n_array and p_array) to compute the new position for this vertex - */ - - vertexptr->coords = new_pos; - } -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLCast.h b/topmodx/include/dlflaux/DLFLCast.h deleted file mode 100644 index 8b80944..0000000 --- a/topmodx/include/dlflaux/DLFLCast.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLCAST_H_ -#define _DLFLCAST_H_ - -#include - -/** -* Cast Objects to primitive shapes. Currently only sphere and plane -**/ -namespace DLFL -{ -void spheralize(DLFLObjectPtr obj); -void planarize(DLFLObjectPtr obj); -} // end namespace - -#endif // _DLFLCAST_H_ diff --git a/topmodx/include/dlflaux/DLFLConnect.cc b/topmodx/include/dlflaux/DLFLConnect.cc deleted file mode 100644 index 1928692..0000000 --- a/topmodx/include/dlflaux/DLFLConnect.cc +++ /dev/null @@ -1,633 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -// Non-inline function definitions for class DLFLObject -// Subroutines that are related to connections between edges/faces - -#include "DLFLConnect.h" -#include -#include - -namespace DLFL -{ - -void connectEdges( - DLFLObjectPtr obj, DLFLEdgePtr eptr1, DLFLFacePtr fptr1, - DLFLEdgePtr eptr2, DLFLFacePtr fptr2, bool check) -{ - // Connect 2 half-edges - - // If given edge is not adjacent to corresponding face, returns without doing anything - DLFLFaceVertexPtr e1fvp1, e1fvp2, e2fvp1, e2fvp2; - - e1fvp1 = eptr1->getFaceVertexPtr(fptr1); - e2fvp1 = eptr2->getFaceVertexPtr(fptr2); - if (e1fvp1 == nullptr || e2fvp1 == nullptr) return; - - e1fvp2 = e1fvp1->next(); e2fvp2 = e2fvp1->next(); - int fid12 = e1fvp2->getFaceID(); - int vid12 = e1fvp2->getVertexID(); - int fid21 = e2fvp1->getFaceID(); - int vid21 = e1fvp2->getVertexID(); - - // Connect e1fvp1 and e2fvp2, e1fvp2 and e2fvp1 - if (check) - { - // First check if there is already an edge between the 2 corners - // This can be done by checking if the 2 corners are adjacent - if ((e1fvp1->next() == e2fvp2) || (e1fvp1->prev() == e2fvp2)) - { - // Edge already exists. Don't insert a new edge - } - else - insertEdge(obj, e1fvp1, e2fvp2); - - if ((e1fvp2->next() == e2fvp1) || (e1fvp2->prev() == e2fvp1)) - { - // Edge already exists. Don't insert a new edge - } - else - insertEdge(obj, e1fvp2, e2fvp1); - } - else - { - insertEdge(obj, e1fvp1, e2fvp2); - insertEdge(obj, e1fvp2, e2fvp1); - } -} - -void connectEdgesWithoutLoopCheck( - DLFLObjectPtr obj, DLFLEdgePtr eptr1, DLFLFacePtr fptr1, - DLFLEdgePtr eptr2, DLFLFacePtr fptr2, bool check) -{ - // Connect 2 half-edges - - // If given edge is not adjacent to corresponding face, returns without doing anything - DLFLFaceVertexPtr c1, c1n, c2, c2n; - - c1 = eptr1->getFaceVertexPtr(fptr1); - c2 = eptr2->getFaceVertexPtr(fptr2); - if (c1 == nullptr || c2 == nullptr) return; - - c1n = c1->next(); c2n = c2->next(); - - // Connect c1 and c2n, c1n and c2 - if (check) - { - // First check if there is already an edge between the 2 corners - // This can be done by checking if the 2 corners are adjacent - if ((c1->next() == c2n) || (c1->prev() == c2n)) - { - // Edge already exists. Don't insert a new edge - } - else - { - insertEdgeWithoutCheck(obj, c1, c2n); // Use version which doesn't check for self loops - } - if ((c1n->next() == c2) || (c1n->prev() == c2)) - { - // Edge already exists. Don't insert a new edge - } - else - { - insertEdgeWithoutCheck(obj, c1n, c2); // Use version which doesn't check for self loops - } - } - else - { - // Use versions which doesn't check for self loops - insertEdgeWithoutCheck(obj, c1, c2n); - insertEdgeWithoutCheck(obj, c1n, c2); - } -} - -void connectFaces(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2) -{ - // Connect two faces using repeated insertEdge operations - // The 2 corners have to belong to different faces - if (coFacial(fvptr1, fvptr2)) return; - - DLFLEdgePtr lastedge; - bool done = false; - DLFLFacePtr fptr1 = fvptr1->getFacePtr(), fptr2; - DLFLMaterialPtr matl = fptr1->material(); - DLFLFaceVertexPtr fvp1, fvp2; - int numsides1, numsides2; - - // Insert an edge between the given corners - lastedge = insertEdgeNonCoFacial(obj, fvptr1, fvptr2, matl); - - while (!done) - { - lastedge->getFaceVertexPointers(fvp1, fvp2); - fptr1 = fvp1->getFacePtr(); fptr2 = fvp2->getFacePtr(); - numsides1 = fptr1->size(); numsides2 = fptr2->size(); - - // Find the face which has more than 4 sides - if (numsides1 > 4) - { - // fptr1 has more than 4 sides. Next edge has to be inserted in this face - fvp2 = fvp1->next(); - fvp2 = fvp2->next(); - fvp1 = fvp1->prev(); - lastedge = insertEdgeCoFacial(obj, fvp1, fvp2, false); - } - else if (numsides2 > 4) - { - // fptr2 has more than 4 sides. Next edge has to be inserted in this face - fvp1 = fvp2->next(); - fvp1 = fvp1->next(); - fvp2 = fvp2->prev(); - lastedge = insertEdgeCoFacial(obj, fvp2, fvp1, false); - } - else - { - // Both faces have <= 4 sides. So we are done - done = true; - } - } -} - -void dualConnectFaces(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2) -{ - // Connect two faces using repeated insertEdge operations - // All newly created faces will be triangles. - // Every vertex in the new face 1 will be connected to 2 adjacent vertices in face 2 - // and every vertex in face 2 will be connected to 2 adjacent vertices in face 1. - // The 2 corners have to belong to different faces - if (coFacial(fvptr1, fvptr2)) return; - - DLFLEdgePtr lastedge; - bool done = false, parity = true; - DLFLFacePtr fptr1 = fvptr1->getFacePtr(), fptr2; - DLFLMaterialPtr matl = fptr1->material(); - DLFLFaceVertexPtr fvp1, fvp2; - int numsides1, numsides2; - - // Insert an edge between the given corners - lastedge = insertEdgeNonCoFacial(obj, fvptr1, fvptr2, matl); - - while (!done) - { - lastedge->getFaceVertexPointers(fvp1, fvp2); - fptr1 = fvp1->getFacePtr(); fptr2 = fvp2->getFacePtr(); - numsides1 = fptr1->size(); numsides2 = fptr2->size(); - - // Find the face which has more than 3 sides - // and insert the next edge in that face. Corners are chosen - // depending on the parity flag - if (numsides1 > 3) - { - // fptr1 has more than 3 sides. Next edge has to be inserted in this face - if (parity) - { - fvp2 = fvp1->next(); fvp2 = fvp2->next(); - } - else - { - fvp2 = fvp1->next(); fvp1 = fvp1->prev(); - } - parity = !parity; - - lastedge = insertEdgeCoFacial(obj, fvp1, fvp2, false); - } - else if (numsides2 > 3) - { - // fptr2 has more than 3 sides. Next edge has to be inserted in this face - if (parity) - { - fvp1 = fvp2->next(); fvp1 = fvp1->next(); - } - else - { - fvp2 = fvp2->prev(); fvp1 = fvp2->next(); - } - parity = !parity; - - lastedge = insertEdgeCoFacial(obj, fvp2, fvp1, false); - } - else - { - // Both faces have <= 3 sides. So we are done - done = true; - } - } -} - -//i'm pretty sure this is our guy -void connectFaces( - DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - int numsegs, int maxconn, double pinch, double pinchCenter, double bubble) -{ - // Connect 2 faces with multiple segments. Intermediate points are calculated - // by linear interpolation between end points using number of segments - if (numsegs == 1) - { - connectFaces(obj, fvptr1, fvptr2); - return; - } - - // Reorder both faces so that they start at the selected corners - // Reverse the second face before reordering for proper connection - DLFLFacePtr f1, f2; - f1 = fvptr1->getFacePtr(); f2 = fvptr2->getFacePtr(); - - if (f1->size() != f2->size()) return; - - f1->reorder(fvptr1); f2->reverse(); f2->reorder(fvptr2); - - // Get the coordinates of the vertices of the 2 faces - Vector3dArray verts1, verts2; - f1->getVertexCoords(verts1); f2->getVertexCoords(verts2); - - // Reverse second face to take it back to it's original order - f2->reverse(); f2->reorder(fvptr2); - - double t, dt = 1.0 / double(numsegs); - - double pinch_scaling = 1; - double bubbleExp = (1 / bubble); - double t2 = 0; double w0, w1, w2; - - Vector3dArray verts; - DLFLFacePtr nf2, nf3; - DLFLFaceVertexPtr nfvp1, nfvp2, nfvp3; - DLFLFacePtrList::reverse_iterator rfirst; - DLFLMaterialPtr matl = f1->material(); - int numverts = verts1.size(); - int numconnected = 0; - - - if (maxconn == -1) maxconn = numsegs; - - nfvp1 = fvptr1; verts.resize(numverts); - - for (int i = 1; i < numsegs; ++i) - { - t = double(i)*dt; - - // Find linearly interpolated resolution parameters - linearInterpolate(verts1, verts2, verts, t); - - //pinching factor - //calculate t2 for bezier curve in pinching - if (t <= pinchCenter) //use the bezier equation for the first portion of the handle - { - t2 = (t / pinchCenter); //t2 goes from 0 to 1 - t2 = pow(t2, bubbleExp); //the bubble factor affects the speed we travel on the bezier curve - w0 = (1 - t2)*(1 - t2); //weight 0 - w1 = (2 * (1 - t2)*t2); //weight 1 - w2 = t2*t2; //weight 2 - pinch_scaling = w0 + (w1 * pinch) + (w2 * pinch); //weighted sum - } - else //use the bezier equation for the second portion of the handle - { - t2 = 1 - ((t - pinchCenter) / (1 - pinchCenter)); //t2 goes from 0 to 1 - t2 = pow(t2, bubbleExp); //the bubble factor affects the speed we travel on the bezier curve - w0 = (1 - t2)*(1 - t2); //weight 0 - w1 = (2 * (1 - t2)*t2); //weight 1 - w2 = t2*t2; //weight 2 - pinch_scaling = w0 + (w1 * pinch) + (w2 * pinch); //weighted sum - } - scale(verts, pinch_scaling); - //translate(verts, Vector3d(0,1,0)); - // Create a new face using computed coordinates - obj->createFace(verts, matl); - - - - // Get the pointers to the newly inserted faces - rfirst = obj->rbeginFace(); - nf2 = (*rfirst); ++rfirst; nf3 = (*rfirst); - - // Get pointers to the first FaceVertex in each of these faces - nfvp2 = nf2->firstVertex(); nfvp3 = nf3->firstVertex(); - - // Connect nf1 and nf2 - if (numconnected < maxconn) - { - ++numconnected; - connectFaces(obj, nfvp1, nfvp2); - } - - // Make nf3 be the new nf1 - nfvp1 = nfvp3; - } - - // Make the last connection - nf2 = f2; nfvp2 = fvptr2; - if (numconnected < maxconn) connectFaces(obj, nfvp1, nfvp2); - -} - -void connectFaces(DLFLObjectPtr obj, DLFLFacePtr fp1, DLFLFacePtr fp2, int numsegs) -{ - // Find 2 closest vertices between the 2 faces - DLFLFaceVertexPtr fvp1, fvp2; - - DLFLFace::findClosestCorners(fp1, fp2, fvp1, fvp2); - - if (fvp1 && fvp2) connectFaces(obj, fvp1, fvp2, numsegs); -} - -void hermiteConnectFaces( - DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - int numsegs, double wt1, double wt2, - int maxconn, int numtwists, - double pinch, double pinchCenter, double bubble) -{ - if (numsegs == 1) - { - connectFaces(obj, fvptr1, fvptr2); - return; - } - - // Do hermite interpolated handle. Centroid is interpolated using hermite interpolation - // Vertices are computed in relation to the centroid with linear interpolation from first - // face to second face - - // Reorder both faces so that they start at the selected corners - // Reverse the second face before reordering for proper connection - DLFLFacePtr f1, f2; - f1 = fvptr1->getFacePtr(); f2 = fvptr2->getFacePtr(); - - if (f1->size() != f2->size()) return; - - f1->reorder(fvptr1); f2->reverse(); f2->reorder(fvptr2); - - // Get the coordinates of the vertices of the 2 faces - Vector3dArray verts1, verts2; - f1->getVertexCoords(verts1); f2->getVertexCoords(verts2); - - // Get the normals to the 2 faces. Second face is already reversed - Vector3d n1, n2; - n1 = f1->computeNormal(); n2 = f2->computeNormal(); - - // Reverse second face to take it back to it's original order - f2->reverse(); f2->reorder(fvptr2); - - - //--- Find interpolation parameters ---// - - // Find and store centroid of 2 polygons - Vector3d cen1 = centroid(verts1), cen2 = centroid(verts2); - - // Translate both polygons to origin - translate(verts1, Vector3d(0, 0, 0)); - translate(verts2, Vector3d(0, 0, 0)); - - // The plane to rotate both polygons to is found as follows. - // Find the vector from the centroid of the second polygon to - // the centroid of the first polygon. This will be the normal - // to the plane - Vector3d rotplane(cen2 - cen1); normalize(rotplane); - rotate(verts1, n1, rotplane); - rotate(verts2, n2, rotplane); - - // The reference X and Y axes are chosen as follows - // x-axis : vector from centroid (origin) to the midpoint of the last edge in the first polygon - // y-axis : use x-axis and normal to the plane (rotplane) to find y axis - // Note that both polygons are already centered at the origin and on the rotation plane - Vector3d xref, yref; - int numverts = verts1.size(); - - xref = (verts1[0] + verts1[numverts - 1]); normalize(xref); - yref = rotplane % xref; - - // If either of the 2 polygons has a normal pointing in exactly the opposite direction - // as the normal to the rotation plane, it can't be rotated to the rotation plane - // and hence the handle can't be created without additional information - if (Abs(n1*rotplane + 1.0) < ZERO || Abs(n2*rotplane + 1.0) < ZERO) - { - cout << "Normals are opposite. Can't create handle!" << endl; - return; - } - - // Resolve both polygons using xref and yref - DoubleArray angle1, angle2, distance1, distance2; - - // resolvePolygon does the resize for the arrays - resolvePolygon(verts1, xref, yref, angle1, distance1); - resolvePolygon(verts2, xref, yref, angle2, distance2); - - // If the angle for the first point in the second polygon is greater than - // the angle for the first point in the first polygon, and the difference - // is greater than pi, subtract 2pi from all angles in second polygon - // to avoid more than 1 twist - if ((angle2[0] - angle1[0]) > M_PI) - { - for (int i = 0; i < angle2.size(); ++i) - angle2[i] -= 2.0*M_PI; - } - - // If we want any extra twists, add multiples of 2pi to second polygon angles - if (numtwists > 0) - { - for (int i = 0; i < angle2.size(); ++i) - angle2[i] += 2.0*M_PI*numtwists; - } - - // Now use the resolution parameters to find intermediate polygons - double t, dt = 1.0 / double(numsegs); - Vector3dArray verts; - DoubleArray angle, distance; - Vector3d p, v, dvdt; - DLFLFacePtr nf2, nf3; - DLFLFaceVertexPtr nfvp1, nfvp2, nfvp3; - DLFLFacePtrList::reverse_iterator rfirst; - DLFLMaterialPtr matl = f1->material(); - int numconnected = 0; - - if (maxconn == -1) maxconn = numsegs; - - nfvp1 = fvptr1; - verts.resize(numverts); angle.resize(numverts); distance.resize(numverts); - - // Multiply the normals by the weights for hermite interpolation - n1 *= wt1; n2 *= wt2; - double curve_length = hermiteCurveLength(cen1, n1, cen2, n2, 8 * numsegs); - double segment_length = curve_length / double(numsegs); - - double pinch_scaling = 1; - double bubbleExp = (1 / bubble); - double t2 = 0; double w0, w1, w2; - - t = 0.0; p = cen1; v = n1; dvdt = 6.0*(cen2 - cen1) - 4.0*n1 - 2.0*n2; - - // pinchCenter, bubble - for (int i = 1; i < numsegs; ++i) - { - //dt = segment_length/(norm(v) + norm(dvdt)*t); - t = double(i)*dt; - - //pinching factor - //calculate t2 for bezier curve in pinching - if (t <= pinchCenter) //use the bezier equation for the first portion of the handle - { - t2 = (t / pinchCenter); //t2 goes from 0 to 1 - t2 = pow(t2, bubbleExp); //the bubble factor affects the speed we travel on the bezier curve - w0 = (1 - t2)*(1 - t2); //weight 0 - w1 = (2 * (1 - t2)*t2); //weight 1 - w2 = t2*t2; //weight 2 - pinch_scaling = w0 + (w1 * pinch) + (w2 * pinch); //weighted sum - } - else //use the bezier equation for the second portion of the handle - { - t2 = 1 - ((t - pinchCenter) / (1 - pinchCenter)); //t2 goes from 0 to 1 - t2 = pow(t2, bubbleExp); //the bubble factor affects the speed we travel on the bezier curve - w0 = (1 - t2)*(1 - t2); //weight 0 - w1 = (2 * (1 - t2)*t2); //weight 1 - w2 = t2*t2; //weight 2 - pinch_scaling = w0 + (w1 * pinch) + (w2 * pinch); //weighted sum - } - - // Find linearly interpolated resolution parameters - linearInterpolate(angle1, angle2, angle, t); - linearInterpolate(distance1, distance2, distance, t); - - // Since angles are stored as differences, except for first angle - // they have to be added to get correct angles - //for (int j=1; j < numverts; ++j) - //angle[j] += angle[j-1]; - - // Reconstruct interpolated polygon using interpolated resolution parameters - reconstructPolygon(verts, xref, yref, angle, distance); - - // Do hermite interpolation on centroids and normals to find interpolated point and normal - hermiteInterpolate(cen1, n1, cen2, n2, p, v, dvdt, t); - - //scale reconstructed polygon by pinching factor - //pinch_scaling=(1-t)*(1-t) + pinch*2*(1-t)*t + t*t; - scale(verts, pinch_scaling); - - // Rotate reconstructed polygon from rotation plane (XY plane) to plane with v as normal - // Rotation is done around centroid of polygon - rotate(verts, rotplane, v); - - // Translate rotated polygon from origin to p - translate(verts, p); - - // Create a new face using computed coordinates - obj->createFace(verts, matl); - - // Get the pointers to the newly inserted faces - rfirst = obj->rbeginFace(); - nf2 = (*rfirst); ++rfirst; nf3 = (*rfirst); - - // Get pointers to the first FaceVertex in each of these faces - nfvp2 = nf2->firstVertex(); nfvp3 = nf3->firstVertex(); - - // Connect nf1 and nf2 - if (numconnected < maxconn) - { - ++numconnected; - connectFaces(obj, nfvp1, nfvp2); - } - - // Make nf3 be the new nf1 - nfvp1 = nfvp3; - } - // Make the last connection - nf2 = f2; nfvp2 = fvptr2; - if (numconnected < maxconn) connectFaces(obj, nfvp1, nfvp2); -} - -void bezierConnectFaces( - DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - int numsegs, double wt1, double wt2) -{ - - // Do hermite interpolated handle. All vertices are interpolated using hermite interpolation - - // Reorder both faces so that they start at the selected corners - // Reverse the second face before reordering for proper connection - DLFLFacePtr f1, f2; - f1 = fvptr1->getFacePtr(); f2 = fvptr2->getFacePtr(); - - if (f1->size() != f2->size()) return; - - f1->reorder(fvptr1); f2->reverse(); f2->reorder(fvptr2); - - // Get the coordinates of the vertices of the 2 faces - Vector3dArray verts1, verts2; - f1->getVertexCoords(verts1); f2->getVertexCoords(verts2); - - // Get the normals to the 2 faces. Second face is already reversed so we don't have - // to fix the normal - Vector3d n1, n2; - n1 = wt1*f1->computeNormal(); n2 = wt2*f2->computeNormal(); - - // Reverse second face to take it back to it's original order - f2->reverse(); f2->reorder(fvptr2); - - // Compute 3 intermediate vertices and create new faces - double t, dt = 1.0 / numsegs; - - - Vector3dArray verts; - Vector3d p, v, dvdt; - int numverts = verts1.size(); - DLFLFacePtr nf2, nf3; - DLFLFaceVertexPtr nfvp1, nfvp2, nfvp3; - DLFLFacePtrList::reverse_iterator rfirst; - - nfvp1 = fvptr1; - verts.resize(numverts); - for (int i = 1; i < numsegs; ++i) - { - t = i*dt; - for (int j = 0; j < numverts; ++j) - hermiteInterpolate(verts1[j], n1, verts2[j], n2, verts[j], v, dvdt, t); - - obj->createFace(verts, f1->material()); - - // Get the pointers to the newly inserted faces - rfirst = obj->rbeginFace(); - nf2 = (*rfirst); ++rfirst; nf3 = (*rfirst); - - // Get pointers to the first FaceVertex in each of these faces - nfvp2 = nf2->firstVertex(); nfvp3 = nf3->firstVertex(); - - // Connect nf1 and nf2 - connectFaces(obj, nfvp1, nfvp2); - - // Make nf3 be the new nf1 - nfvp1 = nfvp3; - } - - // Make the last connection - nf2 = f2; nfvp2 = fvptr2; - connectFaces(obj, nfvp1, nfvp2); -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLConnect.h b/topmodx/include/dlflaux/DLFLConnect.h deleted file mode 100644 index 70cee37..0000000 --- a/topmodx/include/dlflaux/DLFLConnect.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLCONNECT_H_ -#define _DLFLCONNECT_H_ - -// Non-inline function definitions for class DLFLObject -// Subroutines that are related to connections between edges/faces - -#include - -namespace DLFL { - -void connectEdges( - DLFLObjectPtr obj, DLFLEdgePtr eptr1, DLFLFacePtr fptr1, - DLFLEdgePtr eptr2, DLFLFacePtr fptr2, bool check = true); -void connectEdgesWithoutLoopCheck( - DLFLObjectPtr obj, DLFLEdgePtr eptr1, DLFLFacePtr fptr1, - DLFLEdgePtr eptr2, DLFLFacePtr fptr2, bool check = true); -void connectFaces(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2); -void dualConnectFaces(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2); -void connectFaces( - DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - int numsegs, int maxconn = -1, double pinch = 1, double pinchCenter = 0.5, double bubble = 1.0); -void connectFaces(DLFLObjectPtr obj, DLFLFacePtr fp1, DLFLFacePtr fp2, int numsegs = 1); -void hermiteConnectFaces( - DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - int numsegs, double wt1, double wt2, int maxconn = -1, int numtwists = 0, - double pinch = 1, double pinchCenter = 0.5, double bubble = 1.0); -void bezierConnectFaces( - DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - int numsegs, double wt1, double wt2); -} // end namespace - -#endif // _DLFLCONNECT_H_ diff --git a/topmodx/include/dlflaux/DLFLConvexHull.cc b/topmodx/include/dlflaux/DLFLConvexHull.cc deleted file mode 100644 index 3e19dfb..0000000 --- a/topmodx/include/dlflaux/DLFLConvexHull.cc +++ /dev/null @@ -1,284 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -// Source code for DLFLConvexHull class - -#include "DLFLConvexHull.h" -#include "DLFLSubdiv.h" -#include - -namespace DLFL -{ - -long DLFLConvexHull::remove = 1; // Edge needs to be removed -long DLFLConvexHull::border = 2; // Edge is a border edge -long DLFLConvexHull::visible = 1; // Face is visible from new point -long DLFLConvexHull::invisible = 2; // Face is invisible from new point - -// Are the 3 given points colinear? -bool DLFLConvexHull::colinear(const Vector3d& p1, const Vector3d& p2, const Vector3d& p3) -{ - // 3 points are colinear if the area of the triangle formed by them is zero - // The cross product of any two vectors formed by the 3 points determines - // the area of the triangle formed by them - Vector3d v1, v2, area; - v1 = p2 - p1; v2 = p3 - p1; - area = v1 % v2; - if (!isNonZero(area[0]) && !isNonZero(area[1]) && !isNonZero(area[2])) return true; - return false; -} - -// Find sign of volume of tetrahedron formed by given face and given point -// If given face is not a triangle returns 0. -int DLFLConvexHull::volumeSign(DLFLFacePtr face, const Vector3d& p) -{ - if (face) - { - if (face->size() != 3) return 0; - Vector3dArray points; - face->getVertexCoords(points); - - // Create Vector4ds from the points of the face and the new point - Vector4d r1(points[0]), r2(points[1]), r3(points[2]), r4(p); - - // Set last component of all Vector4ds to be 1 - r1[3] = r2[3] = r3[3] = r4[3] = 1.0; - - // Create a 4x4 matrix with the 4 Vector4ds - Matrix4x4 matrix(r1, r2, r3, r4); - - // Find determinant of above matrix. 1/6th of this the volume of the tetrahedron - double volume = determinant(matrix) / 6.0; - int volsign = 0; - if (volume > ZERO) volsign = 1; - else if (volume < -ZERO) volsign = -1; - return volsign; - } - return 0; -} - -bool DLFLConvexHull::doubleTriangle() -{ - InputVertex iv1, iv2, iv3; - DLFLFaceVertexPtrArray fvptrArray; // Esan - int numverts = vertices.size(); - int i; - - i = 0; iv1 = vertices[i]; iv2 = vertices[i + 1]; iv3 = vertices[i + 2]; - while (DLFLConvexHull::colinear(iv1.point, iv2.point, iv3.point)) - { - i++; - if (i + 2 >= numverts) return false; // All points are colinear - } - - // Set the processed flag for the 3 input vertices chosen for initial triangle - vertices[0].processed = vertices[1].processed = vertices[2].processed = true; - - Vector3dArray triangle; - triangle.resize(3); - triangle[0] = iv1.point; triangle[1] = iv2.point; triangle[2] = iv3.point; - - // Create two "twin" faces - createFace(triangle); - - DLFLFacePtr tfp = firstFace(); // Face which is in the given order (iv1,iv2,iv3) - - // Added by Esan - tfp->getCorners(fvptrArray); - (fvptrArray[0]->getVertexPtr())->CHullIndex = vertices[0].index; - (fvptrArray[1]->getVertexPtr())->CHullIndex = vertices[1].index; - (fvptrArray[2]->getVertexPtr())->CHullIndex = vertices[2].index; - // End additions by Esan - - // Find a fourth noncoplanar vertex to form the tetrahedron - for (i = 0; i < numverts; ++i) - { - int volsign = DLFLConvexHull::volumeSign(tfp, vertices[i].point); - if (vertices[i].processed == false && volsign != 0) - { - // Make sure this vertex is the first one added - // Swap this vertex with the vertex at the beginning of the array - // Even if the first vertex in the array is part of the initial triangle, it doesn't - // affect anything, since it's already been processed and will not be considered again - InputVertex temp = vertices[0]; - temp.index = vertices[0].index; // Esan - vertices[0] = vertices[i]; vertices[i] = temp; - vertices[0].index = vertices[i].index; vertices[i].index = temp.index; // Esan - break; - } - } - if (i == numverts) return false; // All points are coplanar - - return true; -} - -bool DLFLConvexHull::addOne(InputVertex& iv) -{ - // Add given vertex to hull - // Assumes that iv has not been processed yet - - Vector3d p = iv.point; - bool foundvisible = false; - - // Mark the faces that are visible from p (iv) - DLFLFacePtrList::iterator ffirst, flast; - DLFLFacePtr fp; - - ffirst = face_list.begin(); flast = face_list.end(); - while (ffirst != flast) - { - fp = (*ffirst); ++ffirst; - if (DLFLConvexHull::volumeSign(fp, p) < 0) - { - fp->flags = DLFLConvexHull::visible; - foundvisible = true; - } - else - fp->flags = DLFLConvexHull::invisible; - } - - // If no faces are visible from p then p is inside the hull - if (foundvisible == false) - { - iv.onhull = false; - return false; - } - - // Mark edges in the interior of visible region for deletion - // Create a new face based on each border edge - // A border edge is one where only one of the adjacent faces is visible - DLFLEdgePtrList::iterator efirst, elast; - DLFLEdgePtr ep; - DLFLFacePtr fp1, fp2; - DLFLEdgePtrList remove_list; // List of edges to be removed - DLFLEdgePtrList border_list; // List of border edges - - efirst = edge_list.begin(); elast = edge_list.end(); - while (efirst != elast) - { - ep = (*efirst); ++efirst; - ep->getFacePointers(fp1, fp2); - if (fp1->flags == DLFLConvexHull::visible && fp2->flags == DLFLConvexHull::visible) - { - // Interior edge : add edge to remove_list - remove_list.push_back(ep); - } - else if (fp1->flags == DLFLConvexHull::visible || fp2->flags == DLFLConvexHull::visible) - { - // Border edge : add edge to border_list - border_list.push_back(ep); - } - } - - // Go through remove_list and remove all edges - while (!remove_list.empty()) - { - ep = remove_list.front(); remove_list.pop_front(); - deleteEdge(this, ep, true); - } - - // Find the face bounded by the border edges - call it the conebase - // This can be done by taking any border edge and finding the face - // adjacent to it which is not invisible. - DLFLFacePtr conebase = nullptr; - - ep = border_list.front(); - ep->getFacePointers(fp1, fp2); - - if (fp1->flags == DLFLConvexHull::invisible) conebase = fp2; - else if (fp2->flags == DLFLConvexHull::invisible) conebase = fp1; - else - { - // This should not happen. Problem somewhere - cout << "Oops! Something went wrong somewhere!" << endl; - return false; - } - - // Subdivide the conebase face using triangles. This will create a new point - // at the centroid, which can then simply be moved to the apex of the cone - subdivideFace(this, conebase, false); - - // The centroid will be the last DLFLVertex in the vertex_list - DLFLVertexPtr apex = vertex_list.back(); - - // Adjust coordinates of the apex to be the new point we are adding to the hull - apex->coords = p; - apex->CHullIndex = iv.index; - - return true; -} - -bool DLFLConvexHull::constructHull() -{ - // Create Initial double-triangle - if (doubleTriangle() == false) - { - cout << "Could not form initial polytope" << endl; - return false; - } - - // Go through list of InputVertices and add ones which have not been processed yet - InputVertex iv; - bool retval = true; // Tells us if any vertex is inside convex hull - for (int i = 0; i < vertices.size(); ++i) - { - iv = vertices[i]; - if (!iv.processed) - { - iv.index = vertices[i].index; // Esan - iv.processed = true; - retval = addOne(iv); - } - } - return retval; -} - -// Create a convex hull from given list of vertices -// Old object is destroyed -bool DLFLConvexHull::createHull(const Vector3dArray& p) -{ - reset(); // Inherited from DLFLObject class - vertices.clear(); vertices.resize(p.size()); - for (int i = 0; i < p.size(); ++i) - { - vertices[i].point = p[i]; - vertices[i].index = i; - vertices[i].processed = false; - } - - bool retval = constructHull(); - - return retval; -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLConvexHull.h b/topmodx/include/dlflaux/DLFLConvexHull.h deleted file mode 100644 index 58b363d..0000000 --- a/topmodx/include/dlflaux/DLFLConvexHull.h +++ /dev/null @@ -1,149 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - - -#ifndef _DLFL_CONVEX_HULL_HH_ -#define _DLFL_CONVEX_HULL_HH_ - -// Classes and subroutines for ConvexHull related operations using DLFL - -#include -#include - -namespace DLFL -{ - -class DLFLConvexHull : public DLFLObject -{ -public: - - // Default constructor - DLFLConvexHull() : DLFLObject(), vertices() - { - } - - // Construct from given array of Vector3ds - DLFLConvexHull(const Vector3dArray& p) : DLFLObject(), vertices() - { - vertices.resize(p.size()); - for (int i = 0; i < (int)p.size(); ++i) - vertices[i].point = p[i]; - } - - // Destructor - ~DLFLConvexHull() {} - - // Create a convex hull from given list of vertices - // Old object is destroyed - bool createHull(const Vector3dArray& p); - - //--- Subroutines for creation of Convex Hull ---// - - // Are the 3 given points co-linear? - static bool colinear(const Vector3d& p1, const Vector3d& p2, const Vector3d& p3); - - // Find sign of volume of tetrahedron formed by given face and given point - // If given face is not a triangle returns 0. - static int volumeSign(DLFLFacePtr face, const Vector3d& p); - - // Create the initial polytope - bool doubleTriangle(); - - - // Construct the hull from given array of points - // Returns false is any of the given points is not on the convex hull - bool constructHull(); - -private: - // Structure for storing the input vertices - struct InputVertex - { - Vector3d point; // Coordinates of point - bool processed; // Has this point been processed? - bool onhull; // Is this point on the hull? - int index; // Used in column modeling - Esan - - InputVertex() : point(), processed(false), onhull(false) - { - } - - InputVertex(const Vector3d& p) - : point(p), processed(false), onhull(false) - { - } - - InputVertex(const InputVertex& iv) - : point(iv.point), processed(iv.processed), onhull(iv.onhull) - { - } - - ~InputVertex() - { - } - - InputVertex& operator = (const InputVertex& iv) - { - point = iv.point; processed = iv.processed; onhull = iv.onhull; - return (*this); - } - }; - - typedef vector InputVertexArray; - typedef list InputVertexList; - - // Add a vertex from the list to the convex hull - bool addOne(InputVertex& iv); - - // Copy constructor - DLFLConvexHull(const DLFLConvexHull& dchull) - : DLFLObject() - , vertices(dchull.vertices) - { - } - - // Assignment operator - DLFLConvexHull& operator = (const DLFLConvexHull& dchull) - { - return (*this); - } - -protected: - - // Bit flags for use during hull construction - static long remove; // Edge needs to be removed - static long border; // Edge is a border edge - static long visible; // Face is visible from new point - static long invisible; // Face is invisible from new point - - InputVertexArray vertices; // Input vertices for hull construction - -}; - -} // end namespace - -#endif /* _DLFL_CONVEX_HULL_HH_ */ diff --git a/topmodx/include/dlflaux/DLFLCrust.cc b/topmodx/include/dlflaux/DLFLCrust.cc deleted file mode 100644 index f30ea17..0000000 --- a/topmodx/include/dlflaux/DLFLCrust.cc +++ /dev/null @@ -1,1360 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -/* - Crust modeling routines for DLFL -*/ -#include "DLFLCrust.h" - -#include -#include -#include "DLFLConvexHull.h" -#include "DLFLConnect.h" -#include "DLFLSubdiv.h" - -namespace DLFL -{ - -/* -Create a crust for this object. -Creates an inner (outer if thickness is negative) surface -duplicating the existing surface and moving every vertex along -the average normal at the vertex for the given distance. -Boolean flag indicates if crust should be of uniform thickness -which means thickness at vertices will be adjusted to account -for normal averaging. -*/ - -void createCrust(const DLFLObjectPtr obj, double thickness, bool uniform) -{ - if (!isNonZero(thickness)) return; - - // Clear the arrays used to store crust modeling information - crustfp1.clear(); crustfp2.clear(); - - // Resize the arrays to appropriate size - crust_num_old_faces = obj->num_faces(); - crustfp1.resize(crust_num_old_faces, nullptr); - crustfp2.resize(crust_num_old_faces, nullptr); - - StringStream dlflstream; // Stream used to duplicate the object - StringStream mtlstream; // Stream used to duplicate the object - - // Write the object in DLFL format with the faces reversed - obj->writeDLFL(dlflstream, mtlstream, true); - - int num_old_verts = obj->num_vertices(); - - // Read back from the stream and append to existing object - obj->readDLFL(dlflstream, mtlstream, false); - - // Fill the arrays storing information for crust modeling - // Since we are traversing the faces, also compute and store - // the normals at corners of each face for use later - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (num_faces < crust_num_old_faces) - { - fp = *fl_first; - crustfp1[num_faces] = fp; fp->makeUnique(); fp->storeNormals(); - ++fl_first; ++num_faces; - } - num_faces = 0; - while (fl_first != fl_last) - { - fp = *fl_first; - crustfp2[num_faces] = fp; fp->makeUnique(); fp->storeNormals(); - ++fl_first; ++num_faces; - } - - // If thickness is negative move the old vertices outward - // Otherwise move the new vertices inward - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vp; - Vector3dArray normals; - Vector3d avenormal, newpos; - double mod_thickness; // Modified thickness for uniform thickness shells - int num_verts = 0; - //negative thickness - if (thickness < 0.0) - { - vl_first = obj->beginVertex(); - while (num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - - // If uniform thickness is required, adjust thickness appropriately - if (uniform) - { - avenormal = vp->getNormals(normals); - mod_thickness = 0.0; - for (int i = 0; i < normals.size(); ++i) - mod_thickness += thickness / (avenormal*normals[i]); - mod_thickness /= normals.size(); - } - else - { - avenormal = vp->averageNormal(); - mod_thickness = thickness; - } - // Negative sign because thickness is negative and normal is outward - // Use the modified thickness - newpos = vp->coords - mod_thickness*avenormal; - vp->coords = newpos; - } - } - //thickness > 0 - else - { - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - advance(vl_first, num_old_verts); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - // If uniform thickness is required, adjust thickness appropriately - if (uniform) - { - avenormal = vp->getNormals(normals); - mod_thickness = 0.0; - for (int i = 0; i < normals.size(); ++i) - mod_thickness += thickness / (avenormal*normals[i]); - mod_thickness /= normals.size(); - } - else - { - avenormal = vp->averageNormal(); - mod_thickness = thickness; - } - // Positive sign because thickness is positive and normal is inward - // Use the modified thickness - newpos = vp->coords + mod_thickness*avenormal; - vp->coords = newpos; - } - } - // Find and store the min. id for the face list - crust_min_face_id = (obj->firstFace())->getID(); -} - -/* -Create a crust for this object. -Creates an inner (outer if scale_factor is negative) surface -duplicating the existing surface and scaling the inner or outer surface -w.r.t centroid of object. -*/ - -void createCrustWithScaling(DLFLObjectPtr obj, double scale_factor) -{ - if (!isNonZero(scale_factor)) return; - - // Clear the arrays used to store crust modeling information - crustfp1.clear(); crustfp2.clear(); - - // Resize the arrays to appropriate size - crust_num_old_faces = obj->num_faces(); - crustfp1.resize(crust_num_old_faces, nullptr); - crustfp2.resize(crust_num_old_faces, nullptr); - - StringStream dlflstream; // Stream used to duplicate the object - StringStream mtlstream; // Stream used to duplicate the object - - // Write the object in DLFL format with the faces reversed - obj->writeDLFL(dlflstream, mtlstream, true); - - int num_old_verts = 0; - Vector3d objcen; - // We need to find the centroid of the object - // We can find num of vertices at the same time - DLFLVertexPtrList::iterator first, last; - first = obj->beginVertex(); last = obj->endVertex(); - objcen.reset(); num_old_verts = 0; - while (first != last) - { - objcen += (*first)->coords; ++first; ++num_old_verts; - } - objcen /= num_old_verts; - - // Read back from the stream and append to existing object - obj->readDLFL(dlflstream, mtlstream, false); - - // Fill the arrays storing information for crust modeling - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (num_faces < crust_num_old_faces) - { - fp = *fl_first; - crustfp1[num_faces] = fp; fp->makeUnique(); - ++fl_first; ++num_faces; - } - num_faces = 0; - while (fl_first != fl_last) - { - fp = *fl_first; - crustfp2[num_faces] = fp; fp->makeUnique(); - ++fl_first; ++num_faces; - } - - // Clamp the scale factor to lie between -1 and 1. If negative use inverse of scale factor - // to get scale factor > 1 - if (scale_factor < -1.0) scale_factor = -1.0; - else if (scale_factor > 1.0) scale_factor = 1.0; - - // If scale_factor is negative scale the old vertices using scale_factor > 1 - // Otherwise scale the new vertices using scale_factor < 1 - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vp; - Vector3d normal, newpos; - int num_verts = 0; - if (scale_factor < 0.0) - { - scale_factor = -1.0 / scale_factor; - vl_first = obj->beginVertex(); - while (num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - newpos = (vp->coords - objcen)*scale_factor + objcen; - vp->coords = newpos; - } - } - else - { - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - advance(vl_first, num_old_verts); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - newpos = (vp->coords - objcen)*scale_factor + objcen; - vp->coords = newpos; - } - } - - // Find and store the min. id for the face list - crust_min_face_id = (obj->firstFace())->getID(); -} - -void cmMakeHole(DLFLObjectPtr obj, DLFLFacePtr fp, bool cleanup) -{ - int index = fp->getID() - crust_min_face_id; - DLFLFacePtr fp1, fp2; - DLFLFaceVertexPtr fvp1, fvp2; - DLFLEdgePtrArray eparray1, eparray2; - - if (index > crust_num_old_faces) index -= crust_num_old_faces; - if (index >= crustfp1.size()) - { - cout << "Index out of range " << index << endl; - return; // This refers to one of the newly created faces - } - fp1 = crustfp1[index]; fp2 = crustfp2[index]; - if (fp1 != nullptr && fp2 != nullptr) - { - fvp1 = fp1->firstVertex(); fvp2 = fp2->firstVertex(); - //fvp2 = fp2->findClosest(fvp1->vertex->coords); - if (cleanup) - { - // Find edges in the 2 faces and store them in the arrays. These - // will be used to cleanup the edges afterwards. - fp1->getEdges(eparray1); fp2->getEdges(eparray2); - } - connectFaces(obj, fvp1, fvp2); - crustfp1[index] = crustfp2[index] = nullptr; // These face pointers are no longer valid - - // Do the cleanup if required - if (cleanup) - { - // Traverse eparray1 in forward direction, eparray2 in reverse direction - int num_edges = eparray1.size(); - DLFLEdgePtr ep1, ep2; - DLFLFacePtr fp11, fp12, fp21, fp22; - for (int i = 0; i < num_edges; ++i) - { - ep1 = eparray1[i]; ep2 = eparray2[num_edges - i - 1]; - ep1->getFacePointers(fp11, fp12); ep2->getFacePointers(fp21, fp22); - if (((fp11 == fp21) && (fp12 == fp22)) || - ((fp11 == fp22) && (fp12 == fp21))) - { - // Both edges are adjacent to the same 2 faces. - // We have an infinitesimally thin face which we want to remove - // We can use either of the 2 faces to do the deletion of the edges - DLFLEdgePtrArray eparray; - - // Get all the edges in one of the faces - fp11->getEdges(eparray); - - // Go through the edges obtained above and delete them - // Point-spheres will be cleaned up by default - for (int j = 0; j < eparray.size(); ++j) - deleteEdge(obj, eparray[j]); - } - } - } - } - else cout << "nullptr pointers found" << endl; - -} - -void createCrustForWireframe(DLFLObjectPtr obj, double thickness) -{ - - bool uniform = true; - - if (!isNonZero(thickness)) return; - - // Clear the arrays used to store crust modeling information - crustfp1.clear(); crustfp2.clear(); - - // Resize the arrays to appropriate size - crust_num_old_faces = obj->num_faces(); - crustfp1.resize(crust_num_old_faces, nullptr); - crustfp2.resize(crust_num_old_faces, nullptr); - - StringStream dlflstream; // Stream used to duplicate the object - StringStream mtlstream; // Stream used to duplicate the object - - // Write the object in DLFL format with the faces reversed - obj->writeDLFL(dlflstream, mtlstream, true); - - int num_old_verts = obj->num_vertices(); - - // Read back from the stream and append to existing object - obj->readDLFL(dlflstream, mtlstream, false); - - // Fill the arrays storing information for crust modeling - // Since we are traversing the faces, also compute and store - // the normals at corners of each face for use later - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (num_faces < crust_num_old_faces) - { - fp = *fl_first; - crustfp1[num_faces] = fp; fp->makeUnique(); fp->storeNormals(); - ++fl_first; ++num_faces; - } - num_faces = 0; - while (fl_first != fl_last) - { - fp = *fl_first; - crustfp2[num_faces] = fp; fp->makeUnique(); fp->storeNormals(); - ++fl_first; ++num_faces; - } - - // If thickness is negative move the old vertices outward - // Otherwise move the new vertices inward - - DLFLVertexPtrList::iterator vl_first, vl_first_old, vl_last; - DLFLVertexPtr vp, vpNew; - Vector3d normal, newpos; - Vector3dArray normals; - Vector3d avenormal; - double mod_thickness; // Modified thickness for uniform thickness shells - int num_verts = 0; - - if (thickness < 0.0) - { - vl_first = obj->beginVertex(); - while (num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - - // If uniform thickness is required, adjust thickness appropriately - if (uniform) - { - avenormal = vp->getNormals(normals); - mod_thickness = 0.0; - for (int i = 0; i < normals.size(); ++i) - mod_thickness += thickness / (avenormal*normals[i]); - mod_thickness /= normals.size(); - } - else - { - avenormal = vp->averageNormal(); - mod_thickness = thickness; - } - // Negative sign because thickness is negative and normal is outward - // Use the modified thickness - newpos = vp->coords - mod_thickness*avenormal; - vp->coords = newpos; - } - } - if (thickness > 0.0) - { - vl_first = obj->beginVertex(); vl_first_old = obj->beginVertex(); - for (int i = 0; i < num_old_verts; i++) - ++vl_first_old; - - while (num_verts < num_old_verts) - { - vpNew = (*vl_first_old); vp = (*vl_first); ++vl_first; ++num_verts; ++vl_first_old; - - DLFLFaceVertexPtrList fvpList; - DLFLFaceVertexPtr fvp1 = nullptr; - DLFLFaceVertexPtr fvp2 = nullptr; - DLFLFaceVertexPtr fvp0 = nullptr; - DLFLFaceVertexPtr fvp3 = nullptr; - DLFLFaceVertexPtr fvp4 = nullptr; - DLFLFaceVertexPtr fvptemp = nullptr; - DLFLFaceVertexPtr fvptemp1 = nullptr; - DLFLFaceVertexPtr fvptemp2 = nullptr; - DLFLFacePtr fphole = nullptr; - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr fp = nullptr; - DLFLEdgePtr ep1, ep0; - Vector3d v0, v1, v2, v3, v4, n1, n2, n3, n4, ntemp; - DLFLFaceVertexPtrList fvplist; - fvplist = vp->getFaceVertexList(); - - // get the face that has the current vertex as one of its vertices - // and is marked for making a hole - DLFLFaceVertexPtrList::iterator first = fvplist.begin(), last = fvplist.end(); - while (first != last) - { - fvptemp = (*first); - fp = fvptemp->getFacePtr(); - - if (fp->getType() == FTHole) - { - fphole = fp; break; - } - ++first; - } - fp = fphole; - - fvp0 = vp->getFaceVertexInFace(fp); - fvp1 = fvp0->next(); - fvp2 = fvp0->prev(); - - // get vertex pointers - // vp1 = fvp1->getVertexPtr(); vp2 = fvp2->getVertexPtr(); - - // Get the two edges originating from the present vertex - ep0 = fvp0->getEdgePtr(); ep1 = fvp2->getEdgePtr(); - - // For the edge starting at v0 to wards v1 - ep0->getFacePointers(fp1, fp2); - - // get the face to NOT be holed - if (fp1->getType() == FTHole) fp = fp2; - else fp = fp1; - - // get the three face vertices - fvptemp = vp->getFaceVertexInFace(fp); - fvptemp1 = fvptemp->next(); - - // get the vertices of the other two vertices in the face - //vptemp1 = fvptemp1->getVertexPtr(); - - fvp3 = fvptemp1; - - // For the edge starting at v1 towards v0 - // Same as before after this - ep1->getFacePointers(fp1, fp2); - if (fp1->getType() == FTHole) fp = fp2; - else fp = fp1; - - fvptemp = vp->getFaceVertexInFace(fp); - fvptemp2 = fvptemp->prev(); - - //vptemp2 = fvptemp2->getVertexPtr(); - fvp4 = fvptemp2; - - // Get the vertex coordinates of the five face vertices found - v0 = fvp0->getVertexCoords(); - v1 = fvp1->getVertexCoords(); - v2 = fvp2->getVertexCoords(); - v3 = fvp3->getVertexCoords(); - v4 = fvp4->getVertexCoords(); - - n1 = normalized((v1 - v0) % (v3 - v0)); - n2 = normalized(n1 % (v1 - v0)); - n3 = normalized((v2 - v0) % (v4 - v0)); - n4 = normalized((v2 - v0) % n3); - normal = normalized(n2 % n4); // normal is the direction in which the new_pos will lie. - - newpos = vpNew->coords - thickness*normal; - vpNew->coords = newpos; - } - // vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - // advance(vl_first,num_old_verts); - // while ( vl_first != vl_last ) { - // vp = (*vl_first); ++vl_first; - // // If uniform thickness is required, adjust thickness appropriately - // if ( uniform ) { - // avenormal = vp->getNormals(normals); - // mod_thickness = 0.0; - // for (int i=0; i < normals.size(); ++i) - // mod_thickness += thickness/(avenormal*normals[i]); - // mod_thickness /= normals.size(); - // } - // else { - // avenormal = vp->averageNormal(); - // mod_thickness = thickness; - // } - // // Positive sign because thickness is positive and normal is inward - // // Use the modified thickness - // newpos = vp->coords + mod_thickness*avenormal; - // vp->coords = newpos; - // } - - } - - // Find and store the min. id for the face list - crust_min_face_id = (obj->firstFace())->getID(); -} - -void createCrustForWireframe2(DLFLObjectPtr obj, double scale_factor) -{ - if (!isNonZero(scale_factor)) return; - - // Clear the arrays used to store crust modeling information - crustfp1.clear(); crustfp2.clear(); - - // Resize the arrays to appropriate size - crust_num_old_faces = obj->num_faces(); - crustfp1.resize(crust_num_old_faces, nullptr); - crustfp2.resize(crust_num_old_faces, nullptr); - - StringStream dlflstream; // Stream used to duplicate the object - StringStream mtlstream; // Stream used to duplicate the object - - // Write the object in DLFL format with the faces reversed - obj->writeDLFL(dlflstream, mtlstream, true); - - int num_old_verts = obj->num_vertices(); - - // Read back from the stream and append to existing object - obj->readDLFL(dlflstream, mtlstream, false); - - // Fill the arrays storing information for crust modeling - // Since we are traversing the faces, also compute and store - // the normals at corners of each face for use later - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (num_faces < crust_num_old_faces) - { - fp = *fl_first; - crustfp1[num_faces] = fp; fp->makeUnique(); fp->storeNormals(); - ++fl_first; ++num_faces; - } - num_faces = 0; - while (fl_first != fl_last) - { - fp = *fl_first; - crustfp2[num_faces] = fp; fp->makeUnique(); fp->storeNormals(); - ++fl_first; ++num_faces; - } - - // If scale_factor is negative move the old vertices outward - // Otherwise move the new vertices inward - - DLFLVertexPtrList::iterator vl_first, vl_first_old; - DLFLVertexPtr vp, vpNew; - Vector3d normal, newpos; - int num_verts = 0; - - if (scale_factor < 0.0) - { - cout << "ERROR: scale_factor should be positive" << endl; - return; - } - if (scale_factor > 0.0) - { - vl_first = obj->beginVertex(); vl_first_old = obj->beginVertex(); - for (int i = 0; i < num_old_verts; i++) - ++vl_first_old; - - while (num_verts < num_old_verts) - { - vpNew = (*vl_first_old); vp = (*vl_first); ++vl_first; ++num_verts; ++vl_first_old; - - DLFLFaceVertexPtrList fvpList; - DLFLFaceVertexPtr fvp1 = nullptr; - DLFLFaceVertexPtr fvp2 = nullptr; - DLFLFaceVertexPtr fvp0 = nullptr; - DLFLFaceVertexPtr fvp3 = nullptr; - DLFLFaceVertexPtr fvp4 = nullptr; - DLFLFaceVertexPtr fvptemp = nullptr; - DLFLFaceVertexPtr fvptemp1 = nullptr; - DLFLFaceVertexPtr fvptemp2 = nullptr; - DLFLFacePtr fphole = nullptr; - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr fp = nullptr; - DLFLEdgePtr ep1 = nullptr; - DLFLEdgePtr ep0 = nullptr; - Vector3d v0, v1, v2, v3, v4, n1, n2, n3, n4, ntemp; - DLFLFaceVertexPtrList fvplist; - fvplist = vp->getFaceVertexList(); - - // get the face that has the current vertex as one of its vertices - // and is marked for making a hole - DLFLFaceVertexPtrList::iterator first = fvplist.begin(), last = fvplist.end(); - while (first != last) - { - fvptemp = (*first); - fp = fvptemp->getFacePtr(); - - if (fp->getType() == FTHole) - { - fphole = fp; break; - } - ++first; - } - fp = fphole; - - fvp0 = vp->getFaceVertexInFace(fp); - fvp1 = fvp0->next(); - fvp2 = fvp0->prev(); - - // get vertex pointers - //vp1 = fvp1->getVertexPtr(); vp2 = fvp2->getVertexPtr(); - - // Get the two edges originating from the present vertex - ep0 = fvp0->getEdgePtr(); ep1 = fvp2->getEdgePtr(); - - // For the edge starting at v0 to wards v1 - ep0->getFacePointers(fp1, fp2); - - // get the face to NOT be holed - if (fp1->getType() == FTHole) fp = fp2; - else fp = fp1; - - // get the three face vertices - fvptemp = vp->getFaceVertexInFace(fp); - fvptemp1 = fvptemp->next(); - - // get the vertices of the other two vertices in the face - //vptemp1 = fvptemp1->getVertexPtr(); - - fvp3 = fvptemp1; - - // For the edge starting at v1 towards v0 - // Same as before after this - ep1->getFacePointers(fp1, fp2); - if (fp1->getType() == FTHole) fp = fp2; - else fp = fp1; - - fvptemp = vp->getFaceVertexInFace(fp); - fvptemp2 = fvptemp->prev(); - - //vptemp2 = fvptemp2->getVertexPtr(); - fvp4 = fvptemp2; - - // Get the vertex coordinates of the five face vertices found - v0 = fvp0->getVertexCoords(); - v1 = fvp1->getVertexCoords(); - v2 = fvp2->getVertexCoords(); - v3 = fvp3->getVertexCoords(); - v4 = fvp4->getVertexCoords(); - - n1 = normalized((v1 - v0) % (v3 - v0)); - n2 = normalized(n1 % (v1 - v0)); - n3 = normalized((v2 - v0) % (v4 - v0)); - n4 = normalized((v2 - v0) % n3); - normal = normalized(n2 % n4); // normal is the direction in which the new_pos will lie. - - //****by dave - experimental - find the centroid of the faces that contain the current vertex - Vector3d vpcen; vpcen.reset(); - // We need to find the centroid of the object - // We can find num of vertices at the same time - DLFLEdgePtrArray eparr; - vpNew->getEdges(eparr); - DLFLEdgePtrArray::iterator it; - for (it = eparr.begin(); it != eparr.end(); it++) - { - // vpcen += (*it)->getMidPoint(true); - vpcen += (*it)->getOtherVertexPointer(vpNew)->coords; - } - vpcen /= eparr.size(); - - newpos = (vpNew->coords - vpcen)*scale_factor * 2 + vpcen; - // newpos = vpNew->coords - scale*normal; - vpNew->coords = newpos; - } - } - - // Find and store the min. id for the face list - crust_min_face_id = (obj->firstFace())->getID(); -} - -void createWireframeWithSegments(DLFLObjectPtr obj, double thickness, int numSides) -{ - DLFLFacePtrArray edge_connect_fparray, temp_face_array; - DLFLEdgePtrArray edge_array, temp_edge_ptr_array; - DLFLFaceVertexPtrArray fvparray; - - DLFLEdgePtrList::iterator el_first, el_last; - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLVertexPtrList::iterator vl_first, vl_last, vl_tempLast; - - DLFLEdgePtr eptr = nullptr; - DLFLEdgePtr eptr_temp1 = nullptr; - DLFLEdgePtr eptr_temp2 = nullptr; - DLFLEdgePtr ep_temp = nullptr; - DLFLVertexPtr vp = nullptr; - DLFLVertexPtr newvptr = nullptr; - DLFLVertexPtr temp_vptr = nullptr; - DLFLVertexPtr VListPtr = nullptr; - DLFLVertexPtr vp1 = nullptr; - DLFLVertexPtr vp2 = nullptr; - DLFLFacePtr tmpfptr1 = nullptr; - DLFLFacePtr fp1_temp = nullptr; - DLFLFacePtr fp2_temp = nullptr; - DLFLFacePtr tmpfptr2 = nullptr; - DLFLFacePtr valOneFace = nullptr; - DLFLFaceVertexPtr tmpfvptr = nullptr; - DLFLFaceVertexPtr tmp_ch_fvp = nullptr; - DLFLFaceVertexPtr dirFvp1 = nullptr; - DLFLFaceVertexPtr dirFvp2 = nullptr; - - Vector3d edgeVector, xyz, dir, edgeVec1, edgeVec2, axis, start_point, faceNormal, P0, P1, P2, normal; - Vector3dArray vertlist, edge_connect_normals, temp_vertlist, temp_chface_vertlist; - - int count = 0, numFvps = 0, edgeID, min_edge_id, index; - float angle, cosT1, cosT2, T1, T2, L, L1, L2; - int numVerts, num_original_edges; - Vector3d zeroVec(0, 0, 0), Xaxis(1, 0, 0), Yaxis(0, 1, 0), vec, PonAxs, vec1, Ndir1, Ndir2, VListVec; - double A[3], B[3], C[3], D[3]; - - bool match, jointCreated, vertListSizeMatch, allFacesMatched; - float dist1, dist, tolerence = 0.0001; - StringStream dlflstream; - StringStream mtlstream; - - obj->writeDLFL(dlflstream, mtlstream, false); - - // Read back from the stream and append to existing object - obj->readDLFL(dlflstream, mtlstream, true); - - num_original_edges = obj->num_edges(); - edge_connect_normals.reserve(2 * num_original_edges); - edge_connect_fparray.reserve(2 * num_original_edges); - min_edge_id = (obj->firstEdge())->getID(); - - //initialize to zeroVec - for (int i = 0; i < 2 * num_original_edges; i++) - { - edge_connect_normals.push_back(zeroVec); - edge_connect_fparray.push_back(nullptr); - } - - el_first = obj->beginEdge(); el_last = obj->endEdge(); - numVerts = obj->num_vertices(); - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - int num = 0; - - while (numgetFaceVertices(fvparray); - float length; - if (fvparray.size() != 1) - { - tmpfvptr = fvparray[0]; - numFvps = fvparray.size(); - fvparray.clear(); - fvparray.push_back(tmpfvptr); - for (int i = 1; i < numFvps; i++) - { - tmpfvptr = tmpfvptr->vnext(); - fvparray.push_back(tmpfvptr); - } - - vp->getEdges(edge_array); - length = -99999; // the largest length for the vertex - - //FIND THE LARGEST DISTANCE FORM THE VERTEX FOR THE NEW FACE TO BE PUT if - for (int i = 0; igetEdgePtr(); - for (int ii = 0; iigetEdgePtr(); - if (eptr_temp1->getID() != eptr_temp2->getID()) - { - edgeVec1 = (eptr_temp1->getOtherVertexPointer(vp))->getCoords() - vp->getCoords(); - edgeVec2 = (eptr_temp2->getOtherVertexPointer(vp))->getCoords() - vp->getCoords(); - edgeVec1 = normalized(edgeVec1); - edgeVec2 = normalized(edgeVec2); - cosT1 = edgeVec1*edgeVec2; //axis; - T1 = acos(cosT1); - L = thickness / tan(T1 / 2); - if (L > length) length = L + fabs(cosT1*thickness) + 0.001*thickness; - }//if - }//for - }//for largest distance - - }// valence 1 - else length = 0; - - for (int i = 0; i < fvparray.size(); i++) - { - double projected_length; - eptr = (fvparray[i])->getEdgePtr(); - edgeID = eptr->getID(); - index = 2 * (edgeID - min_edge_id); - - if (eptr->getType() != ETChull) {/*cout<<"ETChull"<setType(ETChull); - - eptr->getFacePointers(tmpfptr1, tmpfptr2); - edgeVector = normalized((eptr->getOtherVertexPointer(vp))->getCoords() - vp->getCoords()); - axis = edgeVector; - if (fvparray.size() == 1) - { - vec = Xaxis; - if (fabs(axis*vec) == 1) vec = Yaxis; - dir = normalized(edgeVector % vec); - } - else if (fvparray.size() == 2) - dir = (((tmpfptr1)->computeNormal() + (tmpfptr2)->computeNormal()) / 2); - else - { - dirFvp1 = vp->getFaceVertexInFace(tmpfptr1); - dirFvp2 = vp->getFaceVertexInFace(tmpfptr2); - Ndir1 = ((dirFvp1->next())->getVertexCoords() - vp->getCoords()) % - ((dirFvp1->prev())->getVertexCoords() - vp->getCoords()); - Ndir2 = ((dirFvp2->next())->getVertexCoords() - vp->getCoords()) % - ((dirFvp2->prev())->getVertexCoords() - vp->getCoords()); - dir = (normalized(Ndir1) + normalized(Ndir2)) / 2; - } - - //start point with axis translated to origin (+vertex - vertex) - length += 0.0001; - start_point = length*axis + normalized(dir) * thickness + vp->getCoords(); - projected_length = (start_point - vp->getCoords())*axis; - start_point = start_point + ((length)-projected_length) * axis; - PonAxs = vp->getCoords() + (length)* axis; - dir = normalized(start_point - PonAxs); - start_point = PonAxs + dir*thickness; - start_point = start_point - vp->getCoords(); - for (int j = 0; j < numSides; j++) - { - //calculate new point - angle = ((2 * 3.15) / numSides)*j; - Quaternion rot; - rot.setAxisAndAngle(axis, angle); - normalize(rot); - Quaternion rotp; - rotp = rot * start_point * conjugate(rot); - xyz.set(rotp[0], rotp[1], rotp[2]); - - //move back from origin - xyz = xyz + vp->getCoords(); - vertlist.push_back(xyz); //vertlist for vertex convex hull - temp_vertlist.push_back(xyz); //vertlist for each edge face - } - if (fvparray.size() == 1) - { - obj->createFace(temp_vertlist); - fl_last = obj->endFace(); - --fl_last; --fl_last; - valOneFace = *fl_last; - } - normal = axis; - edge_connect_normals[index] = normalized(normal); - temp_vertlist.clear(); - }//for - - //join the corresponding vertices of the new faces created for this vertex - - DLFLConvexHull convexhull; - DLFLFacePtrArray chfparray; - DLFLVertexPtrArray vparray, vparrayOrdered; - DLFLFacePtr chfp = nullptr; - Vector3d sfpn, chfpn; - DLFLFaceVertexPtrArray corners; - IntArray matched_face_indx; - int temp_index; - int num_ch_faces = 0; - int num_ch_verts = 0; - - vertListSizeMatch = false; - jointCreated = false; - - num_ch_verts = fvparray.size()*numSides; - for (int i = 0; i < num_ch_verts; i++) - { - vparrayOrdered.push_back(nullptr); - } - if (fvparray.size() == 1) - { - num_ch_faces = 1; - valOneFace->getCorners(corners); - for (int j = 0; j < corners.size(); j++) - { - temp_vptr = corners[j]->getVertexPtr(); - temp_vptr->CHullIndex = j; - temp_index = temp_vptr->CHullIndex; - vparrayOrdered[temp_index] = temp_vptr; - } - jointCreated = true; - } - else - { - if (!convexhull.createHull(vertlist)) jointCreated = false; - else jointCreated = true; - if (jointCreated) - { - //convexhull.edgeCleanup(); - edgeCleanup(&convexhull); - convexhull.getFaces(chfparray); num_ch_faces = chfparray.size(); - - for (int i = 0; i < num_ch_faces; i++) - { - chfp = chfparray[i]; - chfp->getCorners(corners); - for (int j = 0; j < corners.size(); j++) - { - temp_vptr = corners[j]->getVertexPtr(); - temp_index = temp_vptr->CHullIndex; - vparrayOrdered[temp_index] = temp_vptr; - } - } - } - } - - //FACE MATCHING///////////////////////////////////////// - int num_matches = 0; - double theta = 0; - if (jointCreated) - { - for (int j = 0; j < fvparray.size(); ++j) - { - eptr = (fvparray[j])->getEdgePtr(); - edgeID = eptr->getID(); - index = 2 * (edgeID - min_edge_id); - - if (edge_connect_normals[index + 1] == zeroVec) - index = index; - else index += 1; - - sfpn = edge_connect_normals[index]; - num_matches = 0; - for (int i = 0; i < num_ch_faces; ++i) - { - if (fvparray.size() == 1) chfp = valOneFace; - else chfp = chfparray[i]; - match = false; - if (chfp->size() == numSides) - { - if (vparrayOrdered.size() == fvparray.size()*numSides) - { - chfp->getCorners(corners); - int ii; - ii = j; - VListPtr = vparrayOrdered[ii*numSides]; //first vertex of the face - for (int jj = 0; jj < corners.size(); jj++) - { - if (VListPtr->getID() == corners[jj]->getVertexID()) - { - //match rest of the ch face verts with the vertlist - if (vparrayOrdered[ii*numSides + 1]->getID() == - (corners[jj]->next())->getVertexID()) - { - //go in forward direction - tmp_ch_fvp = (corners[jj]->next())->next(); - for (int kk = 2; kk < numSides; kk++) - { // check rest - if (vparrayOrdered[ii*numSides + kk]->getID() == - tmp_ch_fvp->getVertexID()) - match = true; - tmp_ch_fvp = tmp_ch_fvp->next(); - } - } - else if (vparrayOrdered[ii*numSides + 1]->getID() == - (corners[jj]->prev())->getVertexID()) - { - //go in reverse direction - tmp_ch_fvp = (corners[jj]->prev())->prev(); - for (int kk = 2; kk < numSides; kk++) - { //check rest - if (vparrayOrdered[ii*numSides + kk]->getID() == - tmp_ch_fvp->getVertexID()) - match = true; - tmp_ch_fvp = tmp_ch_fvp->prev(); - } - } - else match = false; //no match - } - }//for - corners.clear(); - vertListSizeMatch = true; - } - else - { - cout << "vertlist size dosent match" << endl; - vertListSizeMatch = false; - } - - if (match) - { - edge_connect_fparray[index] = chfp; - temp_face_array.push_back(chfp); - matched_face_indx.push_back(j); - num_matches++; - }//if - - }//if - temp_chface_vertlist.clear(); - }//for - }//for - } - else - cout << "joint not created for vertex: " << vp->getID() << endl; - - IntArray not_matched_array; - DLFLEdgePtrArray temp_edge_del_array; - int ID, otherID; - allFacesMatched = false; - if (vertListSizeMatch && jointCreated) - { - if (matched_face_indx.size() != fvparray.size()) - allFacesMatched = false; - else - allFacesMatched = true; - - } - else - cout << "vertListSizeMatch not matched for vertex " << vp->getID() << endl; - - if (allFacesMatched && vertListSizeMatch && jointCreated) - { - // all faces shoud be matched now delete the edes that are not required - for (int i = 0; i < temp_face_array.size(); i++) - { - temp_face_array[i]->getEdges(temp_edge_ptr_array); - if (temp_edge_ptr_array.size() == numSides) - { - for (int j = 0; j< numSides; j++) - temp_edge_ptr_array[j]->setType(ETdoNotDelete); - } - else - { - cout << "face dosent have right number of edges" << endl; - return; - } - } - } - else - cout << "something not matched for vertex" << vp->getID() << endl; - - if (allFacesMatched && vertListSizeMatch && jointCreated) - { - //go thru the vertices and get edges and delete the extraneous ones - if (fvparray.size() != 1) - { - DoubleArray edegLen; - double eLen = 999999; - int eInd, Cindex1, Cindex2; - bool doSimilar; - DLFLEdgePtr eMinPtr = nullptr; - - eLen = 999999; - for (int i = 0; i < vparrayOrdered.size(); i++) - { - vparrayOrdered[i]->getEdges(temp_edge_ptr_array); - for (int jj = 0; jj < temp_edge_ptr_array.size(); jj++) - { - temp_edge_ptr_array[jj]->getVertexPointers(vp1, vp2); - - while (vp1->CHullIndex >= numSides) - vp1->CHullIndex -= numSides; - while (vp2->CHullIndex >= numSides) - vp2->CHullIndex -= numSides; - Cindex1 = vp1->CHullIndex; - Cindex2 = vp2->CHullIndex; - - if (temp_edge_ptr_array[jj]->getType() != ETdoNotDelete) - { - if (temp_edge_ptr_array[jj]->length() < eLen) - { - eMinPtr = temp_edge_ptr_array[jj]; - eLen = temp_edge_ptr_array[jj]->length(); - } - } - } - } - eMinPtr->getVertexPointers(vp1, vp2); - Cindex1 = vp1->CHullIndex; - Cindex2 = vp2->CHullIndex; - if (((Cindex1 % 2 == 0) && (Cindex2 % 2 == 0)) || ((Cindex1 % 2 != 0) && (Cindex2 % 2 != 0))) - doSimilar = true; - if (((Cindex1 % 2 == 0) && (Cindex2 % 2 != 0)) || ((Cindex1 % 2 != 0) && (Cindex2 % 2 == 0))) - doSimilar = false; - for (int i = 0; i < vparrayOrdered.size(); i++) - { - vparrayOrdered[i]->getEdges(temp_edge_ptr_array); - - for (int j = 0; jgetType() != ETdoNotDelete) - { - temp_edge_ptr_array[j]->getVertexPointers(vp1, vp2); - if (doSimilar) - { - if (((vp1->CHullIndex % 2 == 0) && (vp2->CHullIndex % 2 != 0)) || - ((vp1->CHullIndex % 2 != 0) && (vp2->CHullIndex % 2 == 0))) - { - temp_edge_ptr_array[j]->setType(ETdoDelete); - } - } - else - { - if (((vp1->CHullIndex % 2 == 0) && (vp2->CHullIndex % 2 == 0)) || - ((vp1->CHullIndex % 2 != 0) && (vp2->CHullIndex % 2 != 0))) - { - temp_edge_ptr_array[j]->setType(ETdoDelete); - } - } - }//if - }//for - }//for - } - } - else - cout << "something not matched for vertex " << vp->getID() << endl;//if 0/1 - - vparrayOrdered.clear(); - matched_face_indx.clear(); - temp_edge_ptr_array.clear(); - temp_face_array.clear(); - - if (fvparray.size() != 1 && jointCreated) obj->splice(convexhull); - - //}//end if jointCreated - fvparray.clear(); - vertlist.clear(); - }//while - - el_first = obj->beginEdge(); el_last = obj->endEdge(); - - Vector3d N1, N2; - count = 0; - while (el_first != el_last) - { - eptr = (*el_first); - ++el_first; - if (eptr->getType() == ETChull) - { - if (edge_connect_fparray[count] != nullptr && edge_connect_fparray[count + 1] != nullptr) - { - connectFaces(obj, edge_connect_fparray[count], edge_connect_fparray[count + 1], 1); // makes the connections - ++count; ++count; - } - else - cout << "pipe not created for edge: " << eptr->getID() << endl; - deleteEdge(obj, eptr); - } - if (eptr->getType() == ETdoDelete) deleteEdge(obj, eptr); - } - edge_array.clear(); - edge_connect_normals.clear(); - edge_connect_fparray.clear(); -} - -void tagMatchingFaces(DLFLObjectPtr obj, DLFLFacePtr fptr) -{ - DLFLFacePtrList::iterator fl_first = obj->beginFace(), fl_last = obj->endFace(); - DLFLFacePtr fp; - int facevalence = fptr->size(); - int count = 0; - int index; - - // Look at only the outer crust - while (fl_first != fl_last) - { - fp = (*fl_first); ++fl_first; ++count; - index = fp->getID() - crust_min_face_id; - if (index < crustfp1.size()) - { - if (fp->size() == facevalence) fp->setType(FTHole); - } - else - { - // We are done with outer surface - break; - } - } -} - -//selects all faces with same number of vertices as the face passed to the function -//initializes them in fparray by reference -void selectMatchingFaces(DLFLObjectPtr obj, DLFLFacePtr fptr, DLFLFacePtrArray &fparray) -{ - fparray.clear(); - DLFLFacePtrList::iterator fl_first = obj->beginFace(), fl_last = obj->endFace(); - - while (fl_first != fl_last) - { - if ((*fl_first)->size() == fptr->size()) fparray.push_back(*fl_first); - fl_first++; - } -} - -void selectMatchingEdges(DLFLObjectPtr obj, DLFLEdgePtr eptr, DLFLEdgePtrArray &eparray) -{ - eparray.clear(); - DLFLEdgePtrList::iterator el_first = obj->beginEdge(), el_last = obj->endEdge(); - DLFLVertexPtr vp1, vp2, v2, v1; - eptr->getVertexPointers(v2, v1); - while (el_first != el_last) - { - (*el_first)->getVertexPointers(vp1, vp2); - - if ((vp1->numEdges() == v1->numEdges() && vp2->numEdges() == v2->numEdges()) || - (vp1->numEdges() == v2->numEdges() && vp2->numEdges() == v1->numEdges())) - { - eparray.push_back(*el_first); - } - el_first++; - } -} - -void selectMatchingVertices(DLFLObjectPtr obj, DLFLVertexPtr vptr, DLFLVertexPtrArray &vparray) -{ - vparray.clear(); - DLFLVertexPtrList::iterator vl_first = obj->beginVertex(), vl_last = obj->endVertex(); - - while (vl_first != vl_last) - { - if ((*vl_first)->numEdges() == vptr->numEdges()) vparray.push_back(*vl_first); - vl_first++; - } -} - -void selectFacesByArea(DLFLObjectPtr obj, DLFLFacePtr fptr, DLFLFacePtrArray &fparray, float delta) -{ - fparray.clear(); - DLFLFacePtrList::iterator fl_first = obj->beginFace(), fl_last = obj->endFace(); - float area = fptr->getArea(); - while (fl_first != fl_last) - { - if ((*fl_first)->getArea() <= (area + delta) && (*fl_first)->getArea() >= (area - delta)) fparray.push_back(*fl_first); - fl_first++; - } -} - -void selectFacesByColor(DLFLObjectPtr obj, DLFLFacePtr fptr, DLFLFacePtrArray &fparray, float delta) -{ - //use delta later... - fparray.clear(); - DLFLFacePtrList::iterator fl_first = obj->beginFace(), fl_last = obj->endFace(); - DLFLMaterialPtr matl = fptr->material(); - while (fl_first != fl_last) - { - if ((*fl_first)->material() == matl) fparray.push_back(*fl_first); - fl_first++; - } -} - -void punchHoles(DLFLObjectPtr obj) -{ - // Go through list of faces and punch holes through faces that have type - // flag set to FTHole - // Assumes that the crust has already been created. - DLFLFacePtrList::iterator fl_first = obj->beginFace(), fl_last = obj->endFace(); - DLFLFacePtrList hole_faces; - DLFLFacePtr fp; - while (fl_first != fl_last) - { - fp = (*fl_first); - if (fp->getType() == FTHole) - { - hole_faces.push_back(fp); - } - ++fl_first; - } - fl_first = hole_faces.begin(); fl_last = hole_faces.end(); - while (fl_first != fl_last) - { - fp = (*fl_first); ++fl_first; - fp->resetType(); - cmMakeHole(obj, fp, true); - } -} - -void makeWireframe(DLFLObjectPtr obj, double crust_thickness, bool split) -{ - // Make a wireframe from the given model. - - // First do a modified corner-cutting subdivision - modifiedCornerCuttingSubdivide(obj, crust_thickness); - - // Split Valence 2 vertices if 'split' flag is true - if (split) splitValence2Vertices(obj, -1.0); - - // Create a crust with specified thickness - createCrustForWireframe(obj, crust_thickness); - - // Punch holes to get the wireframe - punchHoles(obj); -} - -void makeWireframe2(DLFLObjectPtr obj, double crust_thickness, double crust_width, bool split) -{ - // Make a wireframe from the given model. - // std::cout << crust_thickness << "\t" << crust_width << "\n"; - // First do a modified corner-cutting subdivision - modifiedCornerCuttingSubdivide(obj, crust_width); - - // Split Valence 2 vertices if 'split' flag is true - if (split) splitValence2Vertices(obj, -1.0); - - // Create a crust with specified thickness - createCrustForWireframe(obj, crust_thickness); - - // Punch holes to get the wireframe - punchHoles(obj); -} - -void makeWireframeWithColumns(DLFLObjectPtr obj, double wireframe_thickness, int wireframe_segments) -{ - createWireframeWithSegments(obj, wireframe_thickness, wireframe_segments); -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLCrust.h b/topmodx/include/dlflaux/DLFLCrust.h deleted file mode 100644 index 8e77655..0000000 --- a/topmodx/include/dlflaux/DLFLCrust.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLCRUST_H_ -#define _DLFLCRUST_H_ - -#include - -namespace DLFL -{ - -static DLFLFacePtrArray crustfp1; -static DLFLFacePtrArray crustfp2; -static int crust_num_old_faces; -static int crust_min_face_id; - -static DLFLVertexPtrArray crustvp1; -static DLFLVertexPtrArray crustvp2; -static int crust_min_vert_id; -static int crust_num_old_verts; - -/* -Create a crust for this object. -Creates an inner (outer if thickness is negative) surface -duplicating the existing surface and moving every vertex along -the average normal at the vertex for the given distance. -Boolean flag indicates if crust should be of uniform thickness -which means thickness at vertices will be adjusted to account -for normal averaging. -*/ -void createCrust(const DLFLObjectPtr obj, double thickness, bool uniform = true); - -/* -Create a crust for this object. -Creates an inner (outer if scale_factor is negative) surface -duplicating the existing surface and scaling the inner or outer surface -w.r.t centroid of object. -*/ -void createCrustWithScaling(DLFLObjectPtr obj, double scale_factor = 0.9); -void cmMakeHole(DLFLObjectPtr obj, DLFLFacePtr fp, bool cleanup = true); -void createCrustForWireframe(DLFLObjectPtr obj, double thickness = 0.1); -void createCrustForWireframe2(DLFLObjectPtr obj, double scale_factor = 0.1); -void createWireframeWithSegments(DLFLObjectPtr obj, double thickness = 0.1, int numSides = 4); -void tagMatchingFaces(DLFLObjectPtr obj, DLFLFacePtr fptr); -void selectMatchingFaces(DLFLObjectPtr obj, DLFLFacePtr fptr, DLFLFacePtrArray &fparray); -void selectMatchingEdges(DLFLObjectPtr obj, DLFLEdgePtr eptr, DLFLEdgePtrArray &eparray); -void selectMatchingVertices(DLFLObjectPtr obj, DLFLVertexPtr vptr, DLFLVertexPtrArray &vparray); -void selectFacesByArea(DLFLObjectPtr obj, DLFLFacePtr fptr, DLFLFacePtrArray &fparray, float delta = 0.1); -void selectFacesByColor(DLFLObjectPtr obj, DLFLFacePtr fptr, DLFLFacePtrArray &fparray, float delta = 0.0); -void punchHoles(DLFLObjectPtr obj); -void makeWireframe(DLFLObjectPtr obj, double crust_thickness = 0.1, bool split = true); -void makeWireframe2(DLFLObjectPtr obj, double crust_thickness = 0.1, double crust_width = 0.1, bool split = true); -void makeWireframeWithColumns(DLFLObjectPtr obj, double wireframe_thickness, int wireframe_segments); - -} // end namespace - -#endif // _DLFLCRUST_H_ diff --git a/topmodx/include/dlflaux/DLFLDual.cc b/topmodx/include/dlflaux/DLFLDual.cc deleted file mode 100644 index 075d6b8..0000000 --- a/topmodx/include/dlflaux/DLFLDual.cc +++ /dev/null @@ -1,157 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "DLFLDual.h" -#include "DLFLSubdiv.h" -#include - -namespace DLFL -{ - -void createDual(const DLFLObjectPtr obj, bool accurate) -{ - // Using "correct" methods seems to be VERY slow - // We will use it only if we want accurate dual - // Otherwise we will use old method - if (accurate) - { - // Dual operation using face subdivision into quads, - // followed by deleting old edges and cleanup of winged vertices - - // Keep count of old number of vertices - // All old edges have to be deleted. But since old edges will be subdivided - // we have to access the edges through the old vertices - int num_old_verts = obj->num_vertices(); - - // Do quad subdivision of all faces - subdivideAllFaces(obj, true); - - // Go through all the old vertices and delete all edges connected to them - int vcount = 0; - DLFLVertexPtrList::iterator vpfirst, vplast; - DLFLVertexPtr vp; - DLFLEdgePtrArray eparray; - vpfirst = obj->beginVertex(); vplast = obj->endVertex(); - while (vcount < num_old_verts) - { - vp = (*vpfirst); ++vpfirst; ++vcount; - vp->getEdges(eparray); - for (int i = 0; i < eparray.size(); ++i) - deleteEdge(obj, eparray[i], true); - } - - // Cleanup valence-2 vertices - cleanupWingedVertices(obj); - } - else - { - // Go through list of faces and create centroids - // Also make sure face ids are consecutive - - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - - Vector3d cen; - StringStream rw, mw; - obj->writeMTL(mw); - - // Traverse all faces, find centroid and output to stream - // Also call makeUnique to ensure face ids are consecutive - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last) - { - fp = (*fl_first); ++fl_first; - fp->makeUnique(); - cen = fp->geomCentroid(); - rw << "v " << cen[0] << " " << cen[1] << " " << cen[2] << endl; - } - - // Get ID of first face to determine offset for index into vertex list - int fistart = (obj->firstFace())->getID(); - - // Now traverse for all vertices, get all faces attached to it - // and create dual faces accordingly and output to filestream - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vp; - DLFLFaceVertexPtrArray fvparray; - - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - // Get the face vertices pointing to this vertex in an array - vp->getFaceVertices(fvparray); - if (fvparray.size() > 0) - { - // Start from one face vertex (first) and traverse - // the face vertices pointing to this vertex according to the - // rotation order. This wont always be the same as the order - // in the list of face vertices in the vertex. - DLFLFaceVertexPtr startfvp = fvparray[0]; - DLFLFaceVertexPtr curfvp = startfvp; - - int index = 0; - fvparray[index++] = curfvp; - - // Use vnext and not next, since we want rotation around vertex - // Use the same array to store the face vertices in the correct - // rotation order, since the size will be the same - curfvp = curfvp->vnext(); - while (curfvp != startfvp) - { - fvparray[index++] = curfvp; - curfvp = curfvp->vnext(); - } - - // Create the dual face corresponding to this vertex by - // going through the array created above, finding the corresponding face - // and using the ID to index into the list of vertices output earlier. - // Note that traversal here is in reverse because rotation order around - // vertex is opposite to that of the faces - rw << "f"; - while (index > 0) - { - rw << " "; - rw << fvparray[--index]->getFaceID() - fistart + 1; - } - } - fvparray.clear(); - rw << endl; - } - rw << endl << endl; - rw << flush; - obj->readObject(rw, mw); - } -} - -} diff --git a/topmodx/include/dlflaux/DLFLDual.h b/topmodx/include/dlflaux/DLFLDual.h deleted file mode 100644 index 4322474..0000000 --- a/topmodx/include/dlflaux/DLFLDual.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLDUAL_H_ -#define _DLFLDUAL_H_ - -#include - -namespace DLFL -{ -void createDual(const DLFLObjectPtr obj, bool accurate = false); -} - -#endif // _DLFLDUAL_H_ diff --git a/topmodx/include/dlflaux/DLFLExtrude.cc b/topmodx/include/dlflaux/DLFLExtrude.cc deleted file mode 100644 index b1abf3b..0000000 --- a/topmodx/include/dlflaux/DLFLExtrude.cc +++ /dev/null @@ -1,2229 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -#include "DLFLExtrude.h" -#include -#include "DLFLConnect.h" - -namespace DLFL -{ - -DLFLFacePtr duplicateFace( - DLFLObjectPtr obj, DLFLFacePtr fptr, - double offset, double rot, double sf) -{ - // Duplicate the given face, use face normal for direction of offset - Vector3d dir = fptr->computeNormal(); - return duplicateFace(obj, fptr, dir, offset, rot, sf); -} - -DLFLFacePtr duplicateFace( - DLFLObjectPtr obj, DLFLFacePtr fptr, - const Vector3d& dir, double offset, double rot, double sf) -{ - // Duplicate given face, offsetting, scaling and rotating if necessary - DLFLFacePtr endface = nullptr; - - // First compute the coordinates of the vertices of the new points and store - // them in an array - DLFLFaceVertexPtr head; - head = fptr->front(); - if (head) - { - Vector3d ndir = normalized(dir);//p-p-0o9i - Vector3dArray newverts; - - fptr->getVertexCoords(newverts); - - // Scale the new vertices about their centroid if scale factor is not 1.0 or 0.0 - sf = Abs(sf); - if (isNonZero(sf) && (Abs(sf - 1.0) > ZERO)) - scale(newverts, sf); - - // Rotate the new vertices if rotation is not 0.0 - if (isNonZero(rot)) - rotate(newverts, ndir, rot*M_PI / 180.0); - - // Translate the new vertices by given amount along given direction - if (Abs(offset) > ZERO) - { - translate(newverts, ndir, offset); - } - - obj->createFace(newverts, fptr->material()); - - // Get pointer to the first newly created face (second from last) - DLFLFacePtrList::reverse_iterator rfirst = obj->rbeginFace(); - ++rfirst; endface = (*rfirst); - } - return endface; -} - -DLFLFacePtr duplicateFacePlanarOffset( - DLFLObjectPtr obj, DLFLFacePtr fptr, - double offset, double rot, double thickness, bool fractionalthickness) -{ - // Duplicate the given face, use face normal for direction of offset - // Offset the vertices in the plane of the face along - // the angular bisectors by specified thickness. - Vector3d dir = fptr->computeNormal(); - return duplicateFacePlanarOffset(obj, fptr, dir, offset, rot, thickness, fractionalthickness); -} - -DLFLFacePtr duplicateFacePlanarOffset( - DLFLObjectPtr obj, DLFLFacePtr fptr, - const Vector3d& dir, - double offset, double rot, double thickness, bool fractionalthickness) -{ - // Duplicate given face, offsetting (along normal), and rotating if necessary - // Offset the vertices in the plane of the face along - // the angular bisectors by specified thickness. - // Boolean flag indicates if thickness is absolute or fraction of edge length. - DLFLFacePtr endface = nullptr; - - // First compute the coordinates of the vertices of the new points and store - // them in an array - DLFLFaceVertexPtr head, fvp; - head = fptr->front(); - if (head) - { - Vector3d ndir = normalized(dir); - Vector3dArray newverts; - - fptr->getVertexCoords(newverts); - - // Offset the corners by thickness using the edge vectors to determine direction - // If boolean flag is set thickness is assumed to be a fraction of edge length. - // Traverse the face and the coordinate array simultaneously and adjust coordinates - int i = 0;//, numverts=newverts.size(); - Vector3d pvec, nvec, ovec; - fvp = head; - - // Put if statement outside of loop for speed - if (fractionalthickness) - { - // Thickness is relative to edge lengths, use fractions of edge vectors - do - { - fvp->getEdgeVectors(pvec, nvec); // Edge vectors originating at fvp - - // If fvp is a winged corner we need to find the new coordinates differently - if (fvp->isWingedCorner()) - { - // Find the next non-winged corner. It can be concave or convex - DLFLFaceVertexPtr nwfvp = fvp->nextNonWingedCorner(); - if (nwfvp == nullptr) - { - // This situation should not occur - cout << "Something went wrong somewhere..." << endl; - return nullptr; - } - - // Find the normal at this non-winged corner. - // Normal will be adjusted for concave corners - Vector3d nwfvpn = nwfvp->computeNormal(); - - // Use this normal to find a vector starting at fvp - // and pointing into the face and perpendicular to - // the two edges coincident at fvp - // This will be the offset vector direction - ovec = nwfvpn % nvec; normalize(ovec); - ovec *= thickness; - } - else - { - // Compute the offset vector using the edge vectors - ovec = thickness*(pvec + nvec); - - // If this corner is a concave corner, flip the offset vector - if (fvp->isConcaveCorner()) ovec = -ovec; - } - - // Adjust the coordinates of the new vertex using the offset vector - newverts[i] += ovec; - fvp = fvp->next(); i++; - } while (fvp != head); - } - else - { - // Thichness is absolute, use the normalized edge vectors - do - { - fvp->getEdgeVectors(pvec, nvec); // Edge vectors originating at fvp - - normalize(pvec); normalize(nvec); - - // If fvp is a winged corner we need to find the new coordinates differently - if (fvp->isWingedCorner()) - { - // Find the next non-winged corner. It can be concave or convex - DLFLFaceVertexPtr nwfvp = fvp->nextNonWingedCorner(); - if (nwfvp == nullptr) - { - // This situation should not occur - cout << "Something went wrong somewhere..." << endl; - return nullptr; - } - - // Find the normal at this non-winged corner. - // Normal will be adjusted for concave corners - Vector3d nwfvpn = nwfvp->computeNormal(); - - // Use this normal to find a vector starting at fvp - // and pointing into the face and perpendicular to - // the two edges coincident at fvp - // This will be the offset vector direction - ovec = nwfvpn % nvec; - ovec *= thickness; - } - else - { - // Compute the offset vector using the edge vectors - ovec = thickness*(pvec + nvec); - - // If this corner is a concave corner, flip the offset vector - if (fvp->isConcaveCorner()) - ovec = -ovec; - } - - // Adjust the coordinates of the new vertex using the offset vector - newverts[i] += ovec; - fvp = fvp->next(); i++; - } while (fvp != head); - } - - // Rotate the new vertices if rotation is not 0.0 - if (isNonZero(rot)) - rotate(newverts, ndir, rot*M_PI / 180.0); - - // Translate the new vertices by given amount along given direction - if (Abs(offset) > ZERO) - { - translate(newverts, ndir, offset); - } - - obj->createFace(newverts, fptr->material()); - - // Get pointer to the first newly created face (second from last) - DLFLFacePtrList::reverse_iterator rfirst = obj->rbeginFace(); - ++rfirst; endface = (*rfirst); - } - return endface; -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d) -{ - // Extrude the given face along its normal for a given distance - Vector3d dir = fptr->computeNormal(); - normalize(dir); - return extrudeFace(obj, fptr, d, dir, 0.0, 1.0); -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeFace(obj, exface, d); - } - return exface; -} - -/*DLFLFacePtr extrudeFacesTogether(DLFLObjectPtr obj, DLFLFacePtrArray fparray, double d) { - -//need an array of old vertices, new vertices, and which ones are outside, and which ones need to be connected -DLFLVertexArray old_verts; -DLFLVertexArray new_verts; - -//also need to delete edges inside the regions that will be kept together - - -//then do - -//first compute the normals for each selected face -Vector3d dir = fptr->computeNormal(); -//then normalize it -normalize(dir); -// return extrudeFace(obj,fptr,d,dir,0.0,1.0); - - -DLFLFacePtr endface = duplicateFace(obj,fptr,dir,d,rot,sf); -if ( endface != nullptr ) { -// Get the pointer to the second newly inserted face -DLFLFacePtr nfp = obj->lastFace(); - -// The last face will be the one facing the old face -// Find the first face-vertices in the 2 faces to be connected -DLFLFaceVertexPtr fvp1, fvp2; -fvp1 = fptr->firstVertex(); fvp2 = nfp->firstVertex(); -connectFaces(obj,fvp1,fvp2); -} - - - -return exface; -}*/ - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf) -{ - // Extrude the given face along its normal for a given distance - // Rotate and scale the new face w.r.t. old face by given parameters - Vector3d dir = fptr->computeNormal(); - normalize(dir); - return extrudeFace(obj, fptr, d, dir, rot, sf); -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot, double sf) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeFace(obj, exface, d, rot, sf); - } - return exface; -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir) -{ - return extrudeFace(obj, fptr, d, dir, 0.0, 1.0); -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeFace(obj, exface, d, dir); - } - return exface; -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double rot, double sf) -{ - DLFLFacePtr endface = duplicateFace(obj, fptr, dir, d, rot, sf); - if (endface != nullptr) - { - // Get the pointer to the second newly inserted face - DLFLFacePtr nfp = obj->lastFace(); - - // The last face will be the one facing the old face - // Find the first face-vertices in the 2 faces to be connected - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fptr->firstVertex(); fvp2 = nfp->firstVertex(); - connectFaces(obj, fvp1, fvp2); - } - return endface; -} - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num, double rot, double sf) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeFace(obj, exface, d, dir, rot, sf); - } - return exface; -} - -DLFLFacePtr extrudeFacePlanarOffset(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double thickness, bool fractionalthickness) -{ - Vector3d dir; - if (isNonZero(d) || isNonZero(rot)) - { - dir = fptr->computeNormal(); - normalize(dir); - } - return extrudeFacePlanarOffset(obj, fptr, d, dir, rot, thickness, fractionalthickness); -} - -DLFLFacePtr extrudeFacePlanarOffset(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double rot, double thickness, bool fractionalthickness) -{ - DLFLFacePtr endface = duplicateFacePlanarOffset(obj, fptr, dir, d, rot, thickness, fractionalthickness); - if (endface != nullptr) - { - // Get the pointer to the second newly inserted face - DLFLFacePtr nfp = obj->lastFace(); - - // The last face will be the one facing the old face - // Find the first face-vertices in the 2 faces to be connected - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fptr->firstVertex(); fvp2 = nfp->firstVertex(); - connectFaces(obj, fvp1, fvp2); - } - return endface; -} - -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double twist, double sf) -{ - // Extrude the given face along its normal for a given distance - Vector3d dir = fptr->computeNormal(); - normalize(dir); - return extrudeFaceDS(obj, fptr, d, dir, twist, sf); -} - -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double twist, double sf) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeFaceDS(obj, exface, d, twist, sf); - } - return exface; -} - -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double twist, double sf) -{ - // Extrude the given face along the given direction for a given distance - DLFLFacePtr endface = nullptr; - - // First compute the coordinates of the vertices of the new points and store - // them in an array - DLFLFaceVertexPtr head; - head = fptr->front(); - if (head) - { - Vector3d ndir = normalized(dir); - Vector3dArray oldverts, newverts; - - fptr->getVertexCoords(oldverts); - uint numverts = oldverts.size(); // No. of vertices in original face - - // New vertices will be computed using the twist factor - newverts.resize(numverts, d*ndir); - for (int i = 0; i < numverts - 1; ++i) - { - newverts[i] += (1.0 - twist)*oldverts[i] + twist*oldverts[i + 1]; - } - newverts[numverts - 1] += (1.0 - twist)*oldverts[numverts - 1] + twist*oldverts[0]; - - double coef; - Vector3d p; - for (int i = 0; i < numverts; ++i) - { - p.reset(); - for (int j = 0; j < numverts; ++j) - { - if (i == j) - coef = 0.25 + 5.0 / (4.0*numverts); - else - coef = (3.0 + 2.0*cos(2.0*(i - j)*M_PI / numverts)) / (4.0*numverts); - p += coef*newverts[j]; - } - oldverts[i] = p; - } - - // Scale the new vertices about their centroid if scale factor is not 1.0 or 0.0 - sf = Abs(sf); - if (isNonZero(sf) && (Abs(sf - 1.0) > ZERO)) - scale(oldverts, sf); - - obj->createFace(oldverts, fptr->material()); - - // Get pointer to the first newly created face (second from last) - DLFLFacePtrList::reverse_iterator rfirst = obj->rbeginFace(); - ++rfirst; endface = (*rfirst); - - // Get the pointer to the second newly inserted face - DLFLFacePtr nfp = obj->lastFace(); - - // The last face will be the one facing the old face - // Find the first face-vertices in the 2 faces to be connected - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fptr->firstVertex(); fvp2 = nfp->firstVertex(); - connectFaces(obj, fvp1, fvp2); - } - return endface; -} - -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num, double twist, double sf) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeFaceDS(obj, exface, d, dir, twist, sf); - } - return exface; -} - -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf, bool mesh) -{ - // Extrude the given face along its normal for a given distance - // Rotate and scale the new face w.r.t. old face by given parameters - Vector3d dir = fptr->computeNormal(); - normalize(dir); - return extrudeDualFace(obj, fptr, d, dir, rot, sf, mesh); -} - -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot, double sf, bool mesh) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeDualFace(obj, exface, d, rot, sf, mesh); - } - return exface; -} - -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double rot, double sf, bool mesh) -{ - // Extrude the given face along the given direction for a given distance - DLFLFacePtr endface = nullptr; - - // First compute the coordinates of the vertices of the new points and store - // them in an array - DLFLFaceVertexPtr head; - head = fptr->front(); - if (head) - { - Vector3d ndir = normalized(dir); - Vector3dArray newverts; - - // If mesh flag is true, edges in the original face will be deleted. - // Store those edges in a temporary array - DLFLEdgePtrArray ep_arr; - if (mesh) fptr->getEdges(ep_arr); - - // New face will contain the midpoints of edges of old face, appropriately transformed - DLFLFaceVertexPtr current = head; - newverts.push_back(current->getEdgePtr()->getMidPoint() + d*ndir); - current = current->next(); - while (current != head) - { - newverts.push_back(current->getEdgePtr()->getMidPoint() + d*ndir); - current = current->next(); - } - - // Scale the new vertices about their centroid if scale factor is not 1.0 or 0.0 - sf = Abs(sf); - if (isNonZero(sf) && (Abs(sf - 1.0) > ZERO)) - scale(newverts, sf); - - // Rotate the new vertices if rotation is not 0.0 - if (isNonZero(rot)) - rotate(newverts, ndir, rot*M_PI / 180.0); - - // Create the new face(s) - obj->createFace(newverts, fptr->material()); - - // Get pointers to the newly created faces - DLFLFacePtrList::reverse_iterator rfirst = obj->rbeginFace(); - DLFLFacePtr nfp = (*rfirst); - ++rfirst; - endface = (*rfirst); - - // The last face (nfp) will be the one facing the old face - // Find the first face-vertices in the 2 faces to be connected - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fptr->firstVertex(); fvp2 = nfp->firstVertex(); - dualConnectFaces(obj, fvp1, fvp2); - - // If the mesh flag is true delete the edges in the original face - if (mesh) - { - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - } - } - return endface; -} - -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num, double rot, double sf, bool mesh) -{ - DLFLFacePtr exface = fptr; - for (int i = 0; i < num; ++i) - { - exface = extrudeDualFace(obj, exface, d, dir, rot, sf, mesh); - } - return exface; -} - -void stellateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d) -{ - // Stellate the given face along its normal for a given distance - Vector3d dir = fptr->computeNormal(); - normalize(dir); - stellateFace(obj, fptr, d, dir); -} - -void stellateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir) -{ - // Stellation is like extrusion but creates a cone instead of a cylinder - DLFLMaterialPtr matl = fptr->material(); - DLFLEdgePtr lastedge; - DLFLFacePtr fptr1; - DLFLFaceVertexPtr fvp1, fvp2; - int numsides1; - bool done; - - // Create the point sphere which will be the tip of the cone - fvp1 = obj->createPointSphere(fptr->geomCentroid() + d*dir, matl); - - fvp2 = fptr->firstVertex(); - - // Insert an edge between the given corners - // NOTE: Make sure point-sphere corner is specified first - lastedge = insertEdgeNonCoFacial(obj, fvp1, fvp2, matl); - - done = false; - while (!done) - { - fvp1 = lastedge->getFaceVertexPtr1(); - - // Get face in which fvp1 is there. This will always be the face - // in which the next edge has to be inserted because the point-sphere corner - // is always specified first in the insertEdge call - fptr1 = fvp1->getFacePtr(); numsides1 = fptr1->size(); - - // If the face fptr1 has more than 3 sides insert another edge - if (numsides1 > 3) - { - // Skip the next corner to get the corner for next edge insertion - fvp2 = fvp1->next(); fvp2 = fvp2->next(); - - // Make sure point-sphere corner is specified first - lastedge = insertEdgeCoFacial(obj, fvp1, fvp2, false); - } - else - { - // All edges have been inserted. - done = true; - } - } -} - -void doubleStellateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d) -{ - // Original version by Eric. Modified by Vinod. - // Double stellation - // Zero-length stellatation followed by another zero-length stellation - // of the new faces. Midpoint is then moved by specified distance along normal. - Vector3d dir = fptr->computeNormal(); - - // Do zero-length stellation - stellateFace(obj, fptr, 0.0); - - // Get newly added vertex - DLFLVertexPtr vp = obj->lastVertex(); - - // Find faces adjacent to new vertex - DLFLFacePtrArray newfaces; - vp->getFaces(newfaces); - - // Do zero-length stellation on new faces - for (int i = 0; i < newfaces.size(); ++i) - stellateFace(obj, newfaces[i], 0.0); - - // Adjust position of centroid of original face - created by first stellation - vp->coords += dir * d; -} - -//--- Additions by Eric ---// -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot, double sf, bool hexagonalize) -{ - // Dodecahedral extrusion - DLFLFacePtr exface = fptr; - DLFLEdgePtrArray ep_arr; - - double sf3 = pow(sf, 1.0 / 2.0); - if (hexagonalize) - { - exface = extrudeFaceDodeca(obj, exface, d, rot, sf3); - - for (int i = 0; i < num - 1; ++i) - { - exface->getEdges(ep_arr); - exface = extrudeHexTileFace(obj, exface, d, rot, sf3); - } - } - else - { - for (int i = 0; i < num; ++i) - { - exface = extrudeFaceDodeca(obj, exface, d, rot, sf3); - } - } - return exface; -} - -DLFLFacePtr extrudeHexTileFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf) -{ - // Hexagonal extrusion for multiple dodecahedral extrusion. - DLFLFacePtr exface = fptr; - DLFLEdgePtrArray ep_arr; - double ddiv3 = d / 3.0; - double sf_2 = sqrt(sf); - - // extrude and delete the unneeded edges - exface = extrudeDualFace(obj, exface, ddiv3, rot, sf_2, true); - exface->getEdges(ep_arr); - - exface = extrudeFace(obj, exface, ddiv3, 0.0, sf_2); - - // delete more unneeded edges, the same way dual extrude does - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - return exface; -} - -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf) -{ - // Dodecahedral extrusion - // Sequence of extrude, dual extrude and extrude followed by deletion of lateral edges - DLFLFacePtr exface = fptr; - DLFLEdgePtrArray ep_arr; - - double ddiv3 = d / 3.0; - double sf_3 = pow(sf, 1.0 / 3.0); - - exface = extrudeFace(obj, exface, ddiv3, 0.0, sf_3); - - // extrude and delete the unneeded edges - exface = extrudeDualFace(obj, exface, ddiv3, rot, sf_3, true); - exface->getEdges(ep_arr); - - exface = extrudeFace(obj, exface, ddiv3, 0.0, sf_3); - - // delete more unneeded edges, the same way dual extrude does - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - return exface; -} -//eric new -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3, bool hexagonalize) -{ - // Dodecahedral extrusion - DLFLFacePtr exface = fptr; - DLFLEdgePtrArray ep_arr; - if (hexagonalize) - { - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - - exface = extrudeFaceDodeca(obj, exface, angle, ex_dist1, ex_dist2, ex_dist3); - - for (int i = 0; i < num - 1; ++i) - { - exface->getEdges(ep_arr); - exface = extrudeFaceDodeca(obj, exface, angle, ex_dist1, ex_dist2, ex_dist3); - - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - } - } - else - { - for (int i = 0; i < num; ++i) - exface = extrudeFaceDodeca(obj, exface, angle, ex_dist1, ex_dist2, ex_dist3); - } - return exface; -} - -DLFLFacePtr extrudeDodeca_Symmetric(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf, int modfactor) -{ - // int num_faces; - // int num_old_faces; - // int face_counter; - // int symmetry_id; - // int count_counter; - // int current_max_symm_group; - // DLFLFacePtr fp; - // DLFLFacePtrList :: iterator fl_first, fl_last, fl_exfirst, fl_exlast; - // DLFLFacePtr retface; - // Vector3d dir; - // - // int num_extrudefaces; - // int num_oldexfaces; - // int num_excounter; - // - // //these are used for finding the average edge length - // double av_edge_length; - // Vector3dArray base_verts; - // int face_sides; - // Vector3d tempv; - // int i; - // - // num_faces = obj->num_faces(); - // - // face_counter = 0; - // - // int modulus=modfactor; - // int modoffset; - // symmetry_id = fptr->material()->groupid; - // current_max_symm_group = max_symm_group; - // //printf("max_sym_group = %d, current group is %d\n", max_symm_group, symmetry_id); - // - // fl_first = obj->beginFace(); - // fl_last = obj->endFace(); - // - // while(face_counter < num_faces && fl_first != fl_last) { - // fp = (*fl_first); - // - // if( symmetry_id == fp->material()->groupid) { - // //group matches, extrude this face - // dir = fp->computeNormal(); - // normalize(dir); - // //FIND AV. LENGTH OF BASE EDGE************************************ - // av_edge_length = 0; - // face_sides = fp->numFaceVertexes(); - // fp->getVertexCoords(base_verts); - // - // for(i=0; i < face_sides; i++) { - // if(i == face_sides - 1) - // tempv = base_verts[0]; - // else - // tempv = base_verts[i+1]; - // - // tempv -= base_verts[i]; - // - // //find the length of one side - // av_edge_length += norm(tempv); - // } - // av_edge_length /= (double) face_sides; - // //****************************************************************** - // - // num_oldexfaces = obj->num_faces(); - // //DLFLFacePtr endface = duplicateFace(fp,dir, av_edge_length * d,rot,sf); - // DLFLFacePtr endface = extrudeFaceDodeca(obj, fp, 45.0, 1, 1, 1, 1, false); - // - // retface = endface; - // if ( false && endface != nullptr ) { - // count_counter = 2; - // modoffset = count_counter % modulus + 2; - // endface->symm_group = current_max_symm_group + modoffset; - // MakeNewMaterial(endface, current_max_symm_group + modoffset); - // if(max_symm_group < endface->symm_group) - // max_symm_group = endface->symm_group; - // - // count_counter++; - // modoffset = count_counter % modulus + 2; - // fp->symm_group = current_max_symm_group + modoffset; - // MakeNewMaterial(fp, current_max_symm_group + modoffset); - // if(max_symm_group < fp->symm_group) - // max_symm_group = fp->symm_group; - // /* - // // Get the pointer to the second newly inserted face - // DLFLFacePtr nfp = face_list.back(); - // - // // The last face will be the one facing the old face - // // Find the first face-vertices in the 2 faces to be connected - // DLFLFaceVertexPtr fvp1, fvp2; - // fvp1 = fp->firstVertex(); fvp2 = nfp->firstVertex(); - // connectFaces(fvp1,fvp2); - // */ - // num_extrudefaces = obj->num_faces(); - // fl_exfirst = obj->beginFace(); - // fl_exlast = obj->endFace(); - // - // count_counter = 3; - // //count_counter += num_extrudefaces - num_oldexfaces; - // num_excounter = 0; - // while(num_excounter < num_extrudefaces && fl_exfirst != fl_exlast) { - // if(num_excounter >= num_oldexfaces) { - // fp = (*fl_exfirst); - // //use the modulus to determine new face group - // modoffset = count_counter % modulus + 2; - // - // if( count_counter == 3) { - // fp->symm_group = current_max_symm_group + 1; - // MakeNewMaterial(fp, current_max_symm_group + 1); - // } - // else { - // fp->symm_group = current_max_symm_group + modoffset; - // MakeNewMaterial(fp, current_max_symm_group + modoffset); - // } - // - // if(max_symm_group < fp->symm_group) - // max_symm_group = fp->symm_group; - // //fp->symm_group = (symmetry_id-1) * (num_extrudefaces - num_oldexfaces) + count_counter + 1; - // //printf("symmetry count is %d\n", count_counter); - // count_counter++; - // } - // fl_exfirst++; - // num_excounter++; - // } - // } - // } - // ++fl_first; - // face_counter++; - // } - // /* MAGICKAL REFERENCE CODE - // num_faces = 0; - // num_old_faces = face_list.size(); - // fl_first = face_list.begin(); fl_last = face_list.end(); - // - // //Stellate all the faces again - // while ( num_faces < num_old_faces ) - // { - // fp = (*fl_first); - // ++fl_first; - // stellateFace(fp, 0.0); - // ++num_faces; - // } - // */ - // return retface; - return nullptr; -} - -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3) -{ - // Dodecahedral extrusion - // Sequence of extrude, dual extrude and extrude followed by deletion of lateral edges - DLFLFacePtr exface = fptr; - DLFLEdgePtrArray ep_arr; - DLFLVertexPtrList::iterator vl_first, vl_last, vl_current, vl_ring_1, vl_ring_2, vl_ring_3; - DLFLVertexPtr vp; - int num_old_verts = obj->num_vertices(); - Vector3d anormal = fptr->computeNormal(); - int face_sides = fptr->numFaceVertexes(); - - //double ddiv3 = d / 3.0; - //double sf_3 = pow(sf, 1.0/3.0); - - Vector3dArray base_verts; - DLFLFaceVertexPtr head; - head = fptr->front(); - //create an array of the original face's vertex positions - if (head) - { - DLFLFaceVertexPtr current = head; - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - while (current != head) - { - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - } - } - - fptr->getVertexCoords(base_verts); - exface = extrudeFace(obj, exface, 1.0, 0.0, 1.0); - // extrude and delete the unneeded edges - exface = extrudeDualFace(obj, exface, 1.0, 0.0, 1.0, true); - exface->getEdges(ep_arr); - exface = extrudeFace(obj, exface, 1.0, 0.0, 1.0); - // delete more unneeded edges, the same way dual extrude does - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - //new code for repositioning vertices - Vector3d tempv; - - int vert_count = 0; - int num_verts = obj->num_vertices(); - int i; - - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - while (vert_count < num_old_verts) - { - vl_first++; - vert_count++; - } - - vl_ring_1 = vl_first; - vl_ring_2 = vl_first; - vl_ring_3 = vl_first; - - for (i = 0; i < face_sides; i++) - { - //vl_ring_1++; - vl_ring_2++; - vl_ring_3++; - } - - for (i = 0; i < face_sides; i++) - { - //vl_ring_2++; - vl_ring_3++; - } - - Vector3d enext, enext_old, eprev, faceprev, facenext, finaldir, tocenter; - Vector3d midpoint_tier2; - Vector3d f_1, f_2, f_3, tedgeprev, tedgenext; - DLFLVertexPtrList::iterator vl_temp1, vl_temp2; - int count, j; - //double alpha = -.4915; - //double alpha = -(116.57-90.)*M_PI/180.; - //double alpha = -(angle-90.)*M_PI/180.; - double alpha = -(angle)*M_PI / 180.; - double l1, l_old, l_base; - - vl_current = vl_ring_1; - //compute first side - l_base = 0; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - enext = base_verts[0]; - else - enext = base_verts[i + 1]; - - enext -= base_verts[i]; - //find the length of one side - l_base += norm(enext); - vl_current++; - } - l_base /= (double)face_sides; - - vl_current = vl_ring_1; - for (i = 0; i < face_sides; i++) - { - - if (i == 0) - eprev = base_verts[face_sides - 1]; - else - eprev = base_verts[i - 1]; - - if (i == face_sides - 1) - enext = base_verts[0]; - else - enext = base_verts[i + 1]; - - eprev -= base_verts[i]; - enext -= base_verts[i]; - //find the length of one side - //l1 = (norm(eprev) + norm(enext))*0.5; - l1 = l_base; - //l1 *= (ex_dist1/cos(alpha)); //defines the height based on the dihedral angle - l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - - normalize(eprev); - normalize(enext); - - //facenext - tempv = enext % anormal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * anormal; - normalize(facenext); - - //faceprev - tempv = anormal % eprev; - normalize(tempv); - faceprev = cos(alpha) * tempv + sin(alpha) * anormal; - normalize(faceprev); - - finaldir = faceprev % facenext; - normalize(finaldir); - - vp = (*vl_current); - tempv = vp->getCoords(); - tempv = base_verts[i] + l1*finaldir; - - vp->setCoords(tempv); - vl_current++; - } - - vl_current = vl_ring_2; - - //compute first side - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - enext = base_verts[0]; - else - enext = base_verts[i + 1]; - - enext -= base_verts[i]; - //find the length of one side - l1 = norm(enext); - /*l1 = (l1*0.5)*(1./cos(M_PI*54./180.)+tan(M_PI*54./180.) ) * ex_dist2; //PI/5 (36 degrees)*/ - l1 = l_base * cos(M_PI*54. / 180.) * ex_dist2; - enext_old = enext; - normalize(enext); - //facenext - tempv = enext % anormal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * anormal; - normalize(facenext); - - finaldir = facenext % enext; - normalize(finaldir); - - //new midpoint - //find vertex 1 on face prev - count = i; - vl_temp1 = vl_ring_1; - for (j = 0; j < count; j++) - vl_temp1++; - f_1 = (*vl_temp1)->getCoords(); - - //find vertex 3 on face next - vl_temp1 = vl_ring_1; - if (i == face_sides - 1) - count = 0; - else - count = i + 1; - for (j = 0; j < count; j++) - vl_temp1++; - f_2 = (*vl_temp1)->getCoords(); - - //now f1 and f2 have the 2 vertices we need the midpoint of - midpoint_tier2 = (f_1 + f_2) / 2.0; - vp = (*vl_current); - tempv = vp->getCoords(); - //tempv = base_verts[i] + l1*finaldir + enext_old * 0.5; - tempv = midpoint_tier2 + l1*finaldir; - vp->setCoords(tempv); - vl_current++; - } - - vl_current = vl_ring_3; - //compute first side - for (i = 0; i < face_sides; i++) - { - //find l1 - if (i == 0) eprev = base_verts[face_sides - 1]; - else eprev = base_verts[i - 1]; - - if (i == face_sides - 1) enext = base_verts[0]; - else enext = base_verts[i + 1]; - - eprev -= base_verts[i]; - enext -= base_verts[i]; - //find the length of one side - l1 = (norm(eprev) + norm(enext))*0.5 *ex_dist3; - l_old = l1 * ex_dist3; //stores l_old for 3rd set of lines - - //find vertex 1 on face prev - if (i == 0) count = face_sides - 1; - else count = i - 1; - - vl_temp1 = vl_ring_2; - - for (j = 0; j < count; j++) vl_temp1++; - - f_1 = (*vl_temp1)->getCoords(); - //find vertex 2 on face prev - vl_temp1 = vl_ring_1; - count = i; - for (j = 0; j < count; j++) vl_temp1++; - f_2 = (*vl_temp1)->getCoords(); - - //find vertex 3 on face prev - vl_temp1 = vl_ring_2; - count = i; - for (j = 0; j < count; j++) vl_temp1++; - f_3 = (*vl_temp1)->getCoords(); - - eprev = f_2 - f_3; - l1 = norm(eprev); - - tedgeprev = f_1 - f_2; - tedgenext = f_3 - f_2; - normalize(tedgeprev); - normalize(tedgenext); - - faceprev = tedgenext % tedgeprev; - normalize(faceprev); - - //find vertex 1 on face next - vl_temp1 = vl_ring_2; - count = i; - for (j = 0; j < count; j++) vl_temp1++; - f_1 = (*vl_temp1)->getCoords(); - - //find vertex 2 on face next - vl_temp1 = vl_ring_1; - if (i == face_sides - 1) count = 0; - else count = i + 1; - - for (j = 0; j < count; j++) vl_temp1++; - f_2 = (*vl_temp1)->getCoords(); - - //find vertex 3 on face next - vl_temp1 = vl_ring_2; - if (i == face_sides - 1) - count = 0; - else - count = i + 1; - for (j = 0; j < count; j++) vl_temp1++; - f_3 = (*vl_temp1)->getCoords(); - - enext = f_2 - f_1; - tedgeprev = f_1 - f_2; - tedgenext = f_3 - f_2; - normalize(tedgeprev); - normalize(tedgenext); - - facenext = tedgenext % tedgeprev; - normalize(facenext); - - finaldir = faceprev % facenext; - normalize(finaldir); - - vl_temp2 = vl_ring_2; - count = i; - for (j = 0; j < count; j++) - vl_temp2++; - - vp = (*vl_current); - tempv = (*vl_temp2)->getCoords(); - tempv += l_old*finaldir; - vp->setCoords(tempv); - vl_current++; - } - return exface; -} - -DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3) -{ - // Icosahedral extrusion - DLFLFacePtr exface = fptr; - //double sf3 = pow(sf, 1.0/2.0); - for (int i = 0; i < num; ++i) - exface = extrudeFaceIcosa(obj, exface, angle, ex_dist1, ex_dist2, ex_dist3); - return exface; -} - -DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3) -{ - //old - // Icosahedral extrusion - DLFLFacePtr exface = fptr; - DLFLFacePtr otherface; - DLFLEdgePtrArray ep_arr; - DLFLVertexPtr vp; - DLFLVertexPtrList::iterator vl_first, vl_last, vl_current, vl_ring_1, vl_ring_2, vl_ring_3; - - int num_old_verts = obj->num_vertices(); - int face_sides = fptr->numFaceVertexes(); - - double d = 1; - double rot = 0; - double sf = 1; - double ddiv3 = d / 3.0; - double stellate_amount = 0; - double center_to_vert; - - Vector3d center_sphere, center_sphere2; - Vector3d center_normal; - Vector3d first_face_centroid; - Vector3d face_normal = fptr->computeNormal(); - //GET FACE'S BASE VERTICES************************************************ - Vector3dArray base_verts; - DLFLFaceVertexPtr head; - head = fptr->front(); - //create an array of the original face's vertex positions - if (head) - { - DLFLFaceVertexPtr current = head; - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - while (current != head) - { - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - } - } - fptr->getVertexCoords(base_verts); - //************************************************************************** - center_sphere2 = center_sphere = exface->geomCentroid(); - center_normal = exface->computeNormal(); - center_sphere += center_normal * (d / 3.0); - center_sphere2 += center_normal * (d / 2.0); - // dual extrude, then regular extrude - exface = extrudeDualFace(obj, exface, ddiv3, rot, sf, false); - exface->getEdges(ep_arr); - vp = obj->lastVertex(); - center_to_vert = normsqr(vp->coords - center_sphere); - // now have the radius of the shape sphere - exface = extrudeFace(obj, exface, ddiv3*2.0); - - // delete top edges from dual extrude - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - bool started = false; - // stellate the top faces - exface->getEdges(ep_arr); - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - otherface = ep->getOtherFacePointer(exface); - //if ( started == false ) - // { - // first_face_centroid = otherface->geomCentroid(); - // stellate_amount = center_to_vert - normsqr(first_face_centroid - center_sphere2); - // started = true; - // } - // stellateFace(otherface, 1/pow(sf, 1.0/3.0)); - stellateFace(obj, otherface, stellate_amount / 2.0); - } - //REPOSITIONING CALCULATIONS ************************************************************** - int num_verts = obj->num_vertices(); - int i; - int vert_count = 0; - Vector3d tempv; - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - while (vert_count < num_old_verts) - { - vl_first++; - vert_count++; - } - vl_ring_1 = vl_first; - vl_ring_2 = vl_first; - vl_ring_3 = vl_first; - - for (i = 0; i < face_sides; i++) - { - //vl_ring_1++; - vl_ring_2++; - vl_ring_3++; - } - for (i = 0; i < face_sides; i++) - { - //vl_ring_2++; - vl_ring_2++; - } - //RINGS ARE SET UP***************************************** - Vector3d vnext, vprev, finaldir, facenext, faceprev, facenext_2, faceprev_2, vnext_2, vprev_2; - Vector3d halfv; - DLFLVertexPtrList::iterator vl_temp; - int j, count; - //double alpha = -(116.57-90.)*M_PI/180.; - //alpha = -(50.)*M_PI/180.; - double alpha = -(angle)*M_PI / 180.; - double length_base; - double l1; - //FIND AV. LENGTH OF BASE EDGE************************************ - length_base = 0; - vl_current = vl_ring_1; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - vnext -= base_verts[i]; - //find the length of one side - length_base += norm(vnext); - vl_current++; - } - length_base /= (double)face_sides; - normalize(face_normal); - //FIRST RING OF VERTICES******************************************* - vl_current = vl_ring_1; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - - vnext -= base_verts[i]; - halfv = vnext * 0.5; - l1 = length_base * ex_dist1 * sqrt(3.0)*0.5; - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - normalize(vnext); - //facenext - tempv = vnext % face_normal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(facenext); - finaldir = facenext % vnext; - normalize(finaldir); - vp = (*vl_current); - //tempv = vp->getCoords(); - tempv = base_verts[i] + halfv + finaldir * l1; - vp->setCoords(tempv); - vl_current++; - } - //SECOND RING OF VERTICES******************************************* - vl_current = vl_ring_2; - for (i = 0; i < face_sides; i++) - { - if (i == 0) - vprev = base_verts[face_sides - 1]; - else - vprev = base_verts[i - 1]; - - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - - vnext -= base_verts[i]; - vprev -= base_verts[i]; - l1 = length_base * ex_dist2; - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - normalize(vprev); - normalize(vnext); - //faceprev - tempv = face_normal % vprev; - normalize(tempv); - faceprev = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(faceprev); - //facenext - tempv = vnext % face_normal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(facenext); - //now have the 2 faces, need to get the secondary face directions - //find next vertex on first tier - vl_temp = vl_ring_1; - count = i; - - for (j = 0; j < count; j++) - vl_temp++; - tempv = (*vl_temp)->getCoords(); - vnext_2 = tempv - base_verts[i]; - - //find prev vertex on first tier - vl_temp = vl_ring_1; - if (i == 0) - count = face_sides - 1; - else - count = i - 1; - - for (j = 0; j < count; j++) - vl_temp++; - tempv = (*vl_temp)->getCoords(); - vprev_2 = tempv - base_verts[i]; - - facenext = -facenext; - tempv = vnext_2 % facenext; - normalize(tempv); - facenext_2 = cos(alpha) * tempv + sin(alpha) * facenext; - normalize(facenext_2); - - faceprev = -faceprev; - tempv = faceprev % vprev_2; - normalize(tempv); - faceprev_2 = cos(alpha) * tempv + sin(alpha) * faceprev; - normalize(faceprev_2); - - finaldir = faceprev_2 % facenext_2; - normalize(finaldir); - //got to offset due to twisting problem - vl_temp = vl_ring_2; - if (i == 0) - count = face_sides - 1; - else - count = i - 1; - for (j = 0; j < count; j++) - vl_temp++; - vp = (*vl_temp); - //tempv = vp->getCoords(); - tempv = base_verts[i] + finaldir * l1; - //tempv = base_verts[i] + facenext_2*l1; - vp->setCoords(tempv); - vl_current++; - } - //THIRD RING OF VERTICES******************************************* - vl_current = vl_ring_3; - for (i = 0; i < face_sides; i++) - { - //Vector3d GetRingPosition(DLFLVertexPtrList :: iterator vl_ring, int position, int numfaces) - vprev = GetRingPosition(vl_ring_2, i - 1, face_sides); - - vnext = GetRingPosition(vl_ring_2, i, face_sides); - - if (i == face_sides - 1) - vnext_2 = base_verts[0]; - else - vnext_2 = base_verts[i + 1]; - - vprev_2 = base_verts[i]; - vnext -= GetRingPosition(vl_ring_1, i, face_sides); - vprev -= GetRingPosition(vl_ring_1, i, face_sides); - vnext_2 -= GetRingPosition(vl_ring_1, i, face_sides); - vprev_2 -= GetRingPosition(vl_ring_1, i, face_sides); - - l1 = length_base * ex_dist3; - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - normalize(vprev); - normalize(vnext); - normalize(vprev_2); - normalize(vnext_2); - //faceprev - faceprev = vprev % vprev_2; - normalize(faceprev); - //facenext - facenext = vnext_2 % vnext; - normalize(facenext); - //now have the 2 faces, need to get the secondary face directions - facenext = -facenext; - tempv = vnext_2 % facenext; - normalize(tempv); - facenext_2 = cos(alpha) * tempv + sin(alpha) * facenext; - normalize(facenext_2); - - faceprev = -faceprev; - tempv = faceprev % vprev_2; - normalize(tempv); - faceprev_2 = cos(alpha) * tempv + sin(alpha) * faceprev; - normalize(faceprev_2); - - finaldir = faceprev_2 % facenext_2; - normalize(finaldir); - - //got to offset due to twisting problem - vl_temp = vl_ring_1; - if (i == 0) - count = face_sides - 1; - else - count = i - 1; - count = i; - for (j = 0; j < count; j++) - vl_temp++; - vp = (*vl_temp); - tempv = vp->getCoords(); - vp = (*vl_current); - //tempv = vp->getCoords(); - //tempv = base_verts[i] + finaldir * l1; - tempv = GetRingPosition(vl_ring_1, i, face_sides); - //tempv -= faceprev; - tempv += finaldir * l1; - vp->setCoords(tempv); - vl_current++; - } - return exface; -} - -DLFLFacePtr extrudeFaceCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3) -{ - // Cuboctahedral extrusion - DLFLFacePtr exface = fptr; - //double sf3 = pow(sf, 1.0/2.0); - for (int i = 0; i < num; ++i) - exface = extrudeFaceCubOcta(obj, exface, angle, ex_dist1, ex_dist2, ex_dist3); - return exface; -} - -DLFLFacePtr extrudeFaceSmallRhombiCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3) -{ - - // Small RhombiCuboctahedral extrusion - DLFLFacePtr exface = fptr; - //double sf3 = pow(sf, 1.0/2.0); - for (int i = 0; i < num; ++i) - exface = extrudeFaceSmallRhombiCubOcta(obj, exface, angle, ex_dist1, ex_dist2, ex_dist3); - return exface; -} - -DLFLFacePtr extrudeFaceCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3) -{ - // Cuboctahedral extrusion - DLFLFacePtr exface = fptr; - DLFLFacePtr otherface; - DLFLEdgePtrArray ep_arr; - DLFLVertexPtr vp; - DLFLVertexPtrList::iterator vl_first, vl_last, vl_current, vl_ring_1, vl_ring_2, vl_ring_3; - - int num_old_verts = obj->num_vertices(); - int face_sides = fptr->numFaceVertexes(); - - double d = 1; - double rot = 0; - double sf = 1; - double ddiv3 = d / 3.0; - double stellate_amount; - double center_to_vert; - - Vector3d center_sphere, center_sphere2; - Vector3d center_normal; - Vector3d first_face_centroid; - Vector3d face_normal = fptr->computeNormal(); - - //GET FACE'S BASE VERTICES************************************************ - Vector3dArray base_verts; - DLFLFaceVertexPtr head; - - head = fptr->front(); - - //create an array of the original face's vertex positions - if (head) - { - DLFLFaceVertexPtr current = head; - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - while (current != head) - { - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - } - } - fptr->getVertexCoords(base_verts); - //************************************************************************** - center_sphere2 = center_sphere = exface->geomCentroid(); - center_normal = exface->computeNormal(); - center_sphere += center_normal * (d / 3.0); - center_sphere2 += center_normal * (d / 2.0); - // dual extrude, then regular extrude - exface = extrudeDualFace(obj, exface, ddiv3, rot, sf, false); - exface->getEdges(ep_arr); - vp = obj->lastVertex(); - center_to_vert = normsqr(vp->coords - center_sphere); - // now have the radius of the shape sphere - exface = extrudeDualFace(obj, exface, ddiv3, rot, sf, false); - - // delete top edges from dual extrude - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = ep_arr.begin(); el_last = ep_arr.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - deleteEdge(obj, ep, true); - } - //REPOSITIONING CALCULATIONS ************************************************************** - int num_verts = obj->num_vertices(); - int i; - int vert_count = 0; - - Vector3d tempv; - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - while (vert_count < num_old_verts) - { - vl_first++; - vert_count++; - } - - vl_ring_1 = vl_first; - vl_ring_2 = vl_first; - for (i = 0; i < face_sides; i++) - { - //vl_ring_1++; - vl_ring_2++; - } - - //RINGS ARE SET UP***************************************** - Vector3d vnext, vprev, finaldir, facenext, faceprev, facenext_2, faceprev_2, vnext_2, vprev_2; - Vector3d halfv, midpoint_tier2; - - DLFLVertexPtrList::iterator vl_temp; - int j, count; - //double alpha = -(116.57-90.)*M_PI/180.; - //alpha = -(50.)*M_PI/180.; - double alpha = -(angle)*M_PI / 180.; - double length_base; - double l1; - //FIND AV. LENGTH OF BASE EDGE************************************ - length_base = 0; - vl_current = vl_ring_1; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - vnext -= base_verts[i]; - //find the length of one side - length_base += norm(vnext); - vl_current++; - } - length_base /= (double)face_sides; - normalize(face_normal); - //FIRST RING OF VERTICES******************************************* - vl_current = vl_ring_1; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - - vnext -= base_verts[i]; - halfv = vnext * 0.5; - - l1 = length_base * ex_dist1 * sqrt(3.0)*0.5; - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - normalize(vnext); - //facenext - tempv = vnext % face_normal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(facenext); - finaldir = facenext % vnext; - normalize(finaldir); - - vp = (*vl_current); - //tempv = vp->getCoords(); - tempv = base_verts[i] + halfv + finaldir * l1; - vp->setCoords(tempv); - vl_current++; - } - //SECOND RING OF VERTICES******************************************* - vl_current = vl_ring_2; - //compute first side - for (i = 0; i < face_sides; i++) - { - vnext = GetRingPosition(vl_ring_1, i + 1, face_sides); - vprev = GetRingPosition(vl_ring_1, i, face_sides); - l1 = length_base * sqrt((double)2) * ex_dist2; - //find midpoint between second tier verts - midpoint_tier2 = (vprev + vnext) / 2.0; - //find a vector from the starting vert to this midpoint - if (i == face_sides - 1) - tempv = base_verts[0]; - else - tempv = base_verts[i + 1]; - - finaldir = midpoint_tier2 - tempv; - normalize(finaldir); - vp = (*vl_current); - tempv += l1*finaldir; - vp->setCoords(tempv); - vl_current++; - } - return exface; -}//END OF CUBOCTAHEDRON - -DLFLFacePtr extrudeFaceSmallRhombiCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3) -{ - // Cuboctahedral extrusion - DLFLFacePtr exface = fptr; - DLFLFacePtr otherface; - DLFLEdgePtrArray ep_arr_1, ep_arr_2; - DLFLVertexPtrList::iterator vl_first, vl_last, vl_current, vl_ring_1, vl_ring_2, vl_ring_3; - DLFLVertexPtrList::iterator vl_ring_1_2, vl_ring_2_2; - DLFLVertexPtr vp; - - int num_old_verts = obj->num_vertices(); - int face_sides = fptr->numFaceVertexes(); - int i; - - double d = 1; - double rot = 0; - double sf = 1; - double ddiv3 = d / 3.0; - double stellate_amount; - - vector base_vps(face_sides); - - Vector3d center_sphere, center_sphere2; - Vector3d center_normal; - Vector3d first_face_centroid; - Vector3d face_normal = fptr->computeNormal(); - - //GET FACE'S BASE VERTICES************************************************ - Vector3dArray base_verts; - DLFLFaceVertexPtr head; - - head = fptr->front(); - - if (ex_dist1 == 0) - ex_dist1 = .1; - if (ex_dist2 == 0) - ex_dist2 = .1; - if (ex_dist3 == 0) - ex_dist3 = .1; - if (angle == 0) - angle = .1; - //create an array of the original face's vertex positions - i = 0; - if (head) - { - DLFLFaceVertexPtr current = head; - base_vps[i] = current->getVertexPtr(); - i++; - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - while (current != head) - { - base_vps[i] = current->getVertexPtr(); - i++; - base_verts.push_back(current->getAuxCoords()); - current = current->next(); - } - } - fptr->getVertexCoords(base_verts); - //************************************************************************** - center_sphere2 = center_sphere = exface->geomCentroid(); - center_normal = exface->computeNormal(); - center_sphere += center_normal * (d / 3.0); - center_sphere2 += center_normal * (d / 2.0); - // dual extrude, then regular extrude - //exface = extrudeDualFace(exface, ddiv3, rot, sf, false); - exface = extrudeFace(obj, exface, 1.0); - exface->getEdges(ep_arr_1); - // now have the radius of the shape sphere - exface = extrudeFace(obj, exface, 1.0); - exface->getEdges(ep_arr_2); - //final extrusion - exface = extrudeFace(obj, exface, 1.0); - DLFLEdgePtrArray::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = ep_arr_1.begin(); el_last = ep_arr_1.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - subdivideEdge(obj, ep); - } - el_first = ep_arr_2.begin(); el_last = ep_arr_2.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - subdivideEdge(obj, ep); - } - //REPOSITIONING CALCULATIONS ************************************************************** - int num_verts = obj->num_vertices(); - int vert_count = 0; - Vector3d tempv; - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - - while (vert_count < num_old_verts) - { - vl_first++; - vert_count++; - } - - vl_ring_1 = vl_first; - vl_ring_2 = vl_first; - vl_ring_3 = vl_first; - - for (i = 0; i < face_sides; i++) - { - //vl_ring_1++; - vl_ring_2++; - vl_ring_3++; - vl_ring_3++; - } - vl_ring_1_2 = vl_ring_3; - vl_ring_2_2 = vl_ring_3; - - for (i = 0; i < face_sides; i++) - { - vl_ring_1_2++; - vl_ring_2_2++; - vl_ring_2_2++; - } - //RINGS ARE SET UP***************************************** - Vector3d vnext, vprev, finaldir, finaldir_2, facenext, faceprev, facenext_2, faceprev_2, vnext_2, vprev_2; - Vector3d halfv, midpoint_tier2; - - DLFLVertexPtrList::iterator vl_temp; - DLFLVertexPtr vp2; - int j, count; - //double alpha = -(116.57-90.)*M_PI/180.; - //alpha = -(50.)*M_PI/180.; - double alpha = -(angle)*M_PI / 180.; - double length_base; - double l1; - - //FIND AV. LENGTH OF BASE EDGE************************************ - length_base = 0; - vl_current = vl_ring_1; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - vnext -= base_verts[i]; - //find the length of one side - length_base += norm(vnext); - vl_current++; - } - length_base /= (double)face_sides; - normalize(face_normal); - //make new edges - vl_current = vl_ring_1_2; - for (i = 0; i < face_sides; i++) - { - vp2 = base_vps[i]; - vp = (*vl_current); - insertEdge(obj, vp->getFaceVertexInFace(exface), vp2->getFaceVertexInFace(exface)); - vl_current++; - } - - for (i = 0; i < face_sides; i++) - { - vp = GetRingVertex(vl_ring_1_2, i, face_sides); - vp2 = GetRingVertex(vl_ring_2_2, i, face_sides); - insertEdge(obj, vp->getFaceVertexInFace(exface), vp2->getFaceVertexInFace(exface)); - } - - vl_current = vl_ring_2_2; - for (i = 0; i < face_sides; i++) - { - vp2 = GetRingVertex(vl_ring_3, i, face_sides); - vp = (*vl_current); - insertEdge(obj, vp->getFaceVertexInFace(exface), vp2->getFaceVertexInFace(exface)); - vl_current++; - } - //FIRST RING OF VERTICES******************************************* - vl_current = vl_ring_1_2; - for (i = 0; i < face_sides; i++) - { - if (i == face_sides - 1) - vnext = base_verts[0]; - else - vnext = base_verts[i + 1]; - vnext -= base_verts[i]; - l1 = length_base * ex_dist1; - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - normalize(vnext); - //facenext - tempv = vnext % face_normal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(facenext); - - finaldir = facenext % vnext; - normalize(finaldir); - - vp = (*vl_current); - tempv = base_verts[i] + finaldir * l1; - vp->setCoords(tempv); - - vp = GetRingVertex(vl_ring_1, i + 1, face_sides); - if (i == face_sides - 1) - tempv = base_verts[0]; - else - tempv = base_verts[i + 1]; - tempv += finaldir * l1; - vp->setCoords(tempv); - - vl_current++; - } - //SECOND RING OF VERTICES******************************************* - for (i = 0; i < face_sides; i++) - { - vnext = GetRingPosition(vl_ring_1, i + 1, face_sides); - tempv = GetRingPosition(vl_ring_1_2, i, face_sides); - - vnext -= tempv; - normalize(vnext); - - tempv = GetRingPosition(vl_ring_1_2, i, face_sides); - vprev = base_verts[i]; - - vprev -= tempv; - normalize(vprev); - - face_normal = -vprev % vnext; - normalize(face_normal); - - l1 = length_base * ex_dist2; - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - //facenext - tempv = vnext % face_normal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(facenext); - - finaldir = facenext % vnext; - normalize(finaldir); - vp = GetRingVertex(vl_ring_2, i + 1, face_sides); - - tempv = GetRingPosition(vl_ring_1, i + 1, face_sides) + finaldir * l1; - vp->setCoords(tempv); - - vp = GetRingVertex(vl_ring_2_2, i, face_sides); - tempv = GetRingPosition(vl_ring_1_2, i, face_sides); - tempv += finaldir * l1; - vp->setCoords(tempv); - - vl_current++; - } - //THIRD RING OF VERTICES******************************************* - for (i = 0; i < face_sides; i++) - { - vnext = GetRingPosition(vl_ring_2, i + 1, face_sides); - tempv = GetRingPosition(vl_ring_2_2, i, face_sides); - - vnext -= tempv; - normalize(vnext); - - vprev = GetRingPosition(vl_ring_1, i + 1, face_sides); - tempv = GetRingPosition(vl_ring_2, i + 1, face_sides); - - vprev -= tempv; - normalize(vprev); - - face_normal = -vprev % vnext; - normalize(face_normal); - - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - //facenext - tempv = vnext % face_normal; - normalize(tempv); - facenext = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(facenext); - - finaldir = facenext % vnext; - normalize(finaldir); - //now do faceprev - vnext = GetRingPosition(vl_ring_2, i, face_sides); - tempv = GetRingPosition(vl_ring_2_2, i - 1, face_sides); - vnext -= tempv; - normalize(vnext); - - vprev = GetRingPosition(vl_ring_1, i, face_sides); - tempv = GetRingPosition(vl_ring_2, i, face_sides); - - vprev -= tempv; - normalize(vprev); - - face_normal = -vprev % vnext; - normalize(face_normal); - //l1 *= ex_dist1; //changes size for first set of lines, ignores dihedral angle - //faceprev - tempv = vnext % face_normal; - normalize(tempv); - faceprev = cos(alpha) * tempv + sin(alpha) * face_normal; - normalize(faceprev); - - finaldir_2 = faceprev % vnext; - normalize(finaldir_2); - //finaldir = facenext % vnext; - //normalize(finaldir); - ///////////////////// - vp = GetRingVertex(vl_ring_3, i, face_sides); - l1 = length_base * ex_dist3; - tempv = GetRingPosition(vl_ring_2_2, i, face_sides) + finaldir * l1; - tempv += GetRingPosition(vl_ring_2, i, face_sides) + finaldir_2 * l1; - tempv *= 0.5; - //got the average position, so that weird angles don't twist the rhombicuboctahedron - vp->setCoords(tempv); - vl_current++; - } - return exface; -}//END OF SMALLRHOMBICUBOCTAHEDRON - -Vector3d GetRingPosition(DLFLVertexPtrList::iterator vl_ring, int position, int numfaces) -{ - int count = position; - int j; - DLFLVertexPtrList::iterator vl_temp; - DLFLVertexPtr vp; - vl_temp = vl_ring; - - while (count >= numfaces) - count -= numfaces; - while (count < 0) - count += numfaces; - for (j = 0; j < count; j++) - vl_temp++; - vp = (*vl_temp); - return vp->getCoords(); -} - -DLFLVertexPtr GetRingVertex(DLFLVertexPtrList::iterator vl_ring, int position, int numfaces) -{ - int count = position; - int j; - - DLFLVertexPtrList::iterator vl_temp; - DLFLVertexPtr vp; - - vl_temp = vl_ring; - - while (count >= numfaces) - count -= numfaces; - while (count < 0) - count += numfaces; - - for (j = 0; j < count; j++) - vl_temp++; - vp = (*vl_temp); - return vp; -} - -// DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot, double sf) { -// // Icosahedral extrusion -// DLFLFacePtr exface = fptr; -// -// double sf3 = pow(sf, 1.0/2.0); -// for (int i=0; i < num; ++i) { -// exface = extrudeFaceIcosa(obj,exface,d, rot,sf3); -// } -// return exface; -// } -//end eric new -// is performed by extruding, dual extruding, then extruding again. -// then delete the latitude edges -// DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf) { -// // Icosahedral extrusion -// DLFLFacePtr exface = fptr; -// DLFLFacePtr otherface; -// DLFLEdgePtrArray ep_arr; -// DLFLVertexPtr vp; -// -// double ddiv3 = d / 3.0; -// double stellate_amount; -// double center_to_vert; -// -// Vector3d center_sphere, center_sphere2; -// Vector3d center_normal; -// Vector3d first_face_centroid; -// -// center_sphere2 = center_sphere = exface->geomCentroid(); -// center_normal = exface->computeNormal(); -// center_sphere += center_normal * (d / 3.0); -// center_sphere2 += center_normal * (d / 2.0); -// -// // dual extrude, then regular extrude -// exface = extrudeDualFace(obj,exface, ddiv3, rot, sf, false); -// exface->getEdges(ep_arr); -// vp = obj->lastVertex(); -// center_to_vert = normsqr(vp->coords - center_sphere); -// -// // now have the radius of the shape sphere -// -// exface = extrudeFace(obj, exface, ddiv3*2.0); -// -// // delete top edges from dual extrude -// DLFLEdgePtrArray::iterator el_first, el_last; -// DLFLEdgePtr ep; -// el_first = ep_arr.begin(); el_last = ep_arr.end(); -// while ( el_first != el_last ) { -// ep = (*el_first); ++el_first; -// deleteEdge(obj,ep,true); -// } -// -// bool started = false; -// -// // stellate the top faces -// exface->getEdges(ep_arr); -// el_first = ep_arr.begin(); el_last = ep_arr.end(); -// while ( el_first != el_last ) { -// ep = (*el_first); ++el_first; -// otherface = ep->getOtherFacePointer(exface); -// if ( started == false ) { -// first_face_centroid = otherface->geomCentroid(); -// stellate_amount = center_to_vert - normsqr(first_face_centroid - center_sphere2); -// started = true; -// } -// -// // stellateFace(obj, otherface, 1/pow(sf, 1.0/3.0)); -// stellateFace(obj, otherface, stellate_amount/2.0); -// } -// return exface; -// } -//--- End additions by Eric ---// -void extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr) -{ - // Extrude the given face using previously computed coordinates. - DLFLFaceVertexPtr head; - head = fptr->front(); - if (head) - { - Vector3dArray newverts; - - DLFLFaceVertexPtr current = head; - newverts.push_back(current->getAuxCoords()); - current = current->next(); - while (current != head) - { - newverts.push_back(current->getAuxCoords()); - current = current->next(); - } - obj->createFace(newverts, fptr->material()); - - // Get the pointer to the second newly inserted face - DLFLFacePtr nfp; - DLFLFacePtrList::reverse_iterator rfirst = obj->rbeginFace(); - nfp = (*rfirst); - - // The last face will be the one facing the old face - // Find the first face-vertices in the 2 faces to be connected - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fptr->firstVertex(); fvp2 = nfp->firstVertex(); - connectFaces(obj, fvp1, fvp2); - } -} -//dave -void extrudeFaceDome(DLFLObjectPtr obj, DLFLFacePtr fptr, double length, double rot, double sf) -{ - // fptr = extrudeFaceDS(obj,fptr, 0.0*length, 1, 0.0, 1.6*sf); - fptr = extrudeFaceDS(obj, fptr, 0.3*length, rot / 5.0, 1.7*sf); - fptr = extrudeFaceDS(obj, fptr, 0.18*length, rot / 5.0, 1.6*sf); - fptr = extrudeFaceDS(obj, fptr, 0.1*length, rot / 5.0, 1.4*sf); - fptr = extrudeFaceDS(obj, fptr, 0.05*length, rot / 5.0, 1.2*sf); - fptr = extrudeFaceDS(obj, fptr, 0.025*length, rot / 5.0, 1.1*sf); - stellateFace(obj, fptr, 0.01*length); -} - -/* API -uint extrudeFace(DLFLObjectPtr obj, uint faceID, double d, int num, double rot, double sf ) { -DLFLFacePtr fp = extrudeFace( obj, obj->findFace(faceID), d, num, rot, sf ); -return fp->getID(); -} - -uint extrudeFaceDS(DLFLObjectPtr obj, uint faceID, double d, int num, double twist, double sf ) { } - -uint extrudeDualFace(DLFLObjectPtr obj, uint faceID, double d, int num, double rot, double sf, bool mesh ) { } - -uint extrudeFaceDodeca(DLFLObjectPtr obj, uint faceID, double d, int num, double rot, double sf, bool hexagonalize ) { } - -uint extrudeFaceIcosa(DLFLObjectPtr obj, uint faceID, double d, int num, double rot, double sf ) { } - -void stellateFace(DLFLObjectPtr obj, uint faceID, double d) { } - -void doubleStellateFace(DLFLObjectPtr obj, uint faceID, double d) { } -end API */ - -} // end namespace DLFL diff --git a/topmodx/include/dlflaux/DLFLExtrude.h b/topmodx/include/dlflaux/DLFLExtrude.h deleted file mode 100644 index deb4af6..0000000 --- a/topmodx/include/dlflaux/DLFLExtrude.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLEXTRUDE_H_ -#define _DLFLEXTRUDE_H_ - -#include -#include - -namespace DLFL -{ - -DLFLFacePtr duplicateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double offset, double rot, double sf); -DLFLFacePtr duplicateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, const Vector3d& dir, double offset, double rot, double sf); - -DLFLFacePtr duplicateFacePlanarOffset(DLFLObjectPtr obj, DLFLFacePtr fptr, double offset, double rot, double thickness, bool fractionalthickness); -DLFLFacePtr duplicateFacePlanarOffset(DLFLObjectPtr obj, DLFLFacePtr fptr, const Vector3d& dir, double offset, double rot, double thickness, bool fractionalthickness); - -/* API -uint extrudeFace(DLFLObjectPtr obj, uint faceID, double d, int num, double rot, double sf = 1.0); -uint extrudeFaceDS(DLFLObjectPtr obj, uint faceID, double d, int num, double twist = 0.0, double sf = 1.0); -uint extrudeDualFace(DLFLObjectPtr obj, uint faceID, double d, int num, double rot=0.0, double sf=1.0, bool mesh=false); -uint extrudeFaceDodeca(DLFLObjectPtr obj, uint faceID, double d, int num, double rot=0.0, double sf = 1.0, bool hexagonalize=false); -uint extrudeFaceIcosa(DLFLObjectPtr obj, uint faceID, double d, int num, double rot=0.0, double sf = 1.0); -void stellateFace(DLFLObjectPtr obj, uint faceID, double d); -void doubleStellateFace(DLFLObjectPtr obj, uint faceID, double d); -end API */ - -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf = 1.0); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot, double sf = 1.0); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double rot, double sf = 1.0); -DLFLFacePtr extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num, double rot, double sf = 1.0); - -DLFLFacePtr extrudeFacePlanarOffset(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double thickness, bool fractionalthickness); -DLFLFacePtr extrudeFacePlanarOffset(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double rot, double thickness, bool fractionalthickness); - -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double twist = 0.0, double sf = 1.0); -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double twist = 0.0, double sf = 1.0); -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double twist = 0.0, double sf = 1.0); -DLFLFacePtr extrudeFaceDS(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num, double twist = 0.0, double sf = 1.0); - -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot = 0.0, double sf = 1.0, bool mesh = false); -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot = 0.0, double sf = 1.0, bool mesh = false); -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, double rot = 0.0, double sf = 1.0, bool mesh = false); -DLFLFacePtr extrudeDualFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir, int num, double rot = 0.0, double sf = 1.0, bool mesh = false); - -void stellateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d); -void stellateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, const Vector3d& dir); - -void doubleStellateFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d); - -DLFLFacePtr extrudeHexTileFace(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot = 0.0, double sf = 1.0); - -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot = 0.0, double sf = 1.0, bool hexagonalize = false); -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot = 0.0, double sf = 1.0); - -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3, bool hexagonalize); -DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3); -DLFLFacePtr extrudeDodeca_Symmetric(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf, int modfactor); - -DLFLFacePtr extrudeFaceCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3); -DLFLFacePtr extrudeFaceCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3); -DLFLFacePtr extrudeFaceSmallRhombiCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3); -DLFLFacePtr extrudeFaceSmallRhombiCubOcta(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3); - -Vector3d GetRingPosition(DLFLVertexPtrList::iterator vl_ring, int position, int numfaces); -DLFLVertexPtr GetRingVertex(DLFLVertexPtrList::iterator vl_ring, int position, int numfaces); - -DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3); -DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, double ex_dist1, double ex_dist2, double ex_dist3); - -// DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, int num, double rot=0.0, double sf = 1.0); -// DLFLFacePtr extrudeFaceIcosa(DLFLObjectPtr obj, DLFLFacePtr fptr, double d, double rot, double sf = 1.0); - -void extrudeFace(DLFLObjectPtr obj, DLFLFacePtr fptr); - -void extrudeFaceDome(DLFLObjectPtr obj, DLFLFacePtr fptr, double length, double rot = 0.0, double sf = 1.0); - -} // end namespace DLFL - -#endif // _DLFLEXTRUDE_H_ diff --git a/topmodx/include/dlflaux/DLFLMeshSmooth.cc b/topmodx/include/dlflaux/DLFLMeshSmooth.cc deleted file mode 100644 index 4cec7a7..0000000 --- a/topmodx/include/dlflaux/DLFLMeshSmooth.cc +++ /dev/null @@ -1,124 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -/* Rough outline of planarization algorithm */ -#include -#include -#include -#include - -namespace DLFL -{ - -void meshsmooth(DLFLObjectPtr obj) -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr faceptr; - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - /* Loop through all faces */ - while (fl_first != fl_last) - { - faceptr = (*fl_first); ++fl_first; - - /* - Find the average normal for the face and the centroid - Store these in the member variables of the face for later use - */ - faceptr->normal = faceptr->computeNormal(); - faceptr->centroid = faceptr->geomCentroid(); - - /* - If the normal and point to define the plane are calculated - using some other method, calculate them and store them in - the 'normal' and 'centroid' member variables in the face - */ - } - - - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vertexptr; - DLFLFaceVertexPtrArray fvparray; - Vector3dArray p_array, n_array; // Arrays of point and normals for each face adjacent to a vertex - int num_faces; - Vector3d average, averagenormal; - - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - - /* Loop through all vertices */ - while (vl_first != vl_last) - { - vertexptr = (*vl_first); ++vl_first; - - /* - Get all the corners for this vertex - */ - fvparray.clear(); // The local array must be cleared before calling getFaceVertices - vertexptr->getFaceVertices(fvparray); - num_faces = fvparray.size(); - - /* - Go through the array of face-vertices and find the normal and centroid - for each face - */ - p_array.clear(); n_array.clear(); // The local arrays must be cleared for each Vertex - - // If we resize the array before filling it, we can avoid unnecessary memory allocation - // thus speeding up the process a little bit. - //p_array.resize(num_faces,Vector3d(0)); n_array.resize(num_faces,Vector3d(0)); - p_array.resize(num_faces, Vector3d()); n_array.resize(num_faces, Vector3d()); - for (int i = 0; i getFacePtr(); - - // Get the normal and centroid for this face (which we calculated above) - // and store them in our local arrays - n_array[i] = fp->normal; - p_array[i] = fp->centroid; - average += p_array[i]; - averagenormal += n_array[i]; - - } - average /= num_faces; normalize(averagenormal); - Vector3d new_pos = vertexptr->coords; // This is the old position - - new_pos += (average - new_pos) - ((average - new_pos)*averagenormal)*averagenormal; - - vertexptr->coords = new_pos; - average -= average; - } -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLMeshSmooth.h b/topmodx/include/dlflaux/DLFLMeshSmooth.h deleted file mode 100644 index b465458..0000000 --- a/topmodx/include/dlflaux/DLFLMeshSmooth.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLMESH_SMOOTH_H_ -#define _DLFLMESH_SMOOTH_H_ - - -#include - -namespace DLFL -{ -void meshsmooth(DLFLObjectPtr obj); -} // end namespace - -#endif // _DLFLMESH_SMOOTH_H_ diff --git a/topmodx/include/dlflaux/DLFLMultiConnect.cc b/topmodx/include/dlflaux/DLFLMultiConnect.cc deleted file mode 100644 index 0102c5f..0000000 --- a/topmodx/include/dlflaux/DLFLMultiConnect.cc +++ /dev/null @@ -1,1250 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -#include "DLFLMultiConnect.h" - -#include -#include -#include -#include "DLFLConvexHull.h" -#include "DLFLConnect.h" -#include "DLFLCrust.h" -#include "DLFLExtrude.h" - -namespace DLFL -{ - -DLFLEdgePtr HalfEdgePair::last_connected1 = nullptr; -DLFLEdgePtr HalfEdgePair::last_connected2 = nullptr; - -void tripleConnectFaces(DLFLObjectPtr obj, DLFLFacePtr fp1, DLFLFacePtr fp2, DLFLFacePtr fp3) -{ - // Connect 3 faces. Connects closest edges between each pair of faces - // Only edges which make an angle of 45 deg or less with the normal to the plane - // containing the centroids - - // Find centroids of the 3 faces - Vector3d cen1, cen2, cen3, cen_cen; - - cen1 = fp1->geomCentroid(); cen2 = fp2->geomCentroid(); cen3 = fp3->geomCentroid(); - cen_cen = (cen1 + cen2 + cen3) / 3.0; - - // Find normal to the plane containing the centroids - // Direction is irrelevant - Vector3d cpnormal = (cen2 - cen1) % (cen3 - cen1); - normalize(cpnormal); - - // Find candidate edges in each face. Angle between edge and cpnormal - // should be less than 45 degrees - DLFLEdgePtrArray ep1, ep2, ep3; - DLFLEdgePtrList cedges; // Use linked list, not array, to simplify erase operations - DLFLFacePtrList cfaces; // Faces for candidate edges (we need half-edges to connect) - - //--- NOTE ---// - // In the list of faces, the other face for the edge is stored, instead of the - // face which defines the half-edge to be connected. This is because once two half-edges - // are connected, that face pointer might no longer be valid, but the other side will - // still be valid. This assumes that both sides of the edge are not the same face - - // Get all edges in the faces. - fp1->getEdges(ep1); fp2->getEdges(ep2); fp3->getEdges(ep3); - - DLFLEdgePtr ep; - //double cosangle = cos(80.0*M_PI/180.0); - Vector3d evec; - - // Find candidate edges and add them to the cedges list - for (int i = 0; i < (int)ep1.size(); ++i) - { - ep = ep1[i]; - evec = normalized(ep->getEdgeVector()); - // if ( Abs(evec * cpnormal) > cosangle ) - if (true) - { - cedges.push_back(ep); - cfaces.push_back(ep->getOtherFacePointer(fp1)); // See NOTE above - } - } - for (int i = 0; i < (int)ep2.size(); ++i) - { - ep = ep2[i]; - evec = normalized(ep->getEdgeVector()); - // if ( Abs(evec * cpnormal) > cosangle ) - if (true) - { - cedges.push_back(ep); - cfaces.push_back(ep->getOtherFacePointer(fp2)); // See NOTE above - } - } - for (int i = 0; i < (int)ep3.size(); ++i) - { - ep = ep3[i]; - evec = normalized(ep->getEdgeVector()); - // if ( Abs(evec * cpnormal) > cosangle ) - if (1) - { - cedges.push_back(ep); - cfaces.push_back(ep->getOtherFacePointer(fp3)); - } - } - - // cedges now contains all the candidate edges - cout << "Candidate edges : "; - DLFLEdgePtrList::iterator epfirst, eplast; - epfirst = cedges.begin(); eplast = cedges.end(); - while (epfirst != eplast) - { - cout << (*epfirst)->getID() << " "; ++epfirst; - } - cout << endl; - - /* - Find all possible connections among the candidate edges - Add them to an array of HalfEdgePairs to sort and make - connections later. Valid connections are all those between - half-edges in different faces - */ - - HalfEdgePairArray heparray; - DLFLFacePtr fp; - DLFLFacePtrList::iterator fpfirst; - while (!cedges.empty()) - { - ep = cedges.front(); cedges.pop_front(); - fp = cfaces.front(); cfaces.pop_front(); - - // Go through remaining edges. Find edge which is closest - // but is not in the same face as ep - epfirst = cedges.begin(); eplast = cedges.end(); - fpfirst = cfaces.begin(); - DLFLEdgePtr temp_ep; - DLFLFacePtr temp_fp, ofp, temp_ofp; - while (epfirst != eplast) - { - temp_ep = (*epfirst); temp_fp = (*fpfirst); - ofp = ep->getOtherFacePointer(fp); - temp_ofp = temp_ep->getOtherFacePointer(temp_fp); - if (ofp != temp_ofp) - { // Different faces - HalfEdgePair hep(ep, temp_ep, fp, temp_fp); - - // Check if plane formed by the two half-edges will be parallel - // to the plane formed by the centroid's of the two faces and - // the overall centroid calculated above. Also check for planarity - // If planarity is less than a specified value, discard the pair - Vector3d fpcen, temp_fpcen; - Vector3d n; // Normal to above mentioned plane - double cosangle = cos(5.0*M_PI / 180.0); // Tolerance for parallel planes check - double min_planarity = cosangle; - fpcen = ofp->geomCentroid(); temp_fpcen = temp_ofp->geomCentroid(); - n = normalized((fpcen - cen_cen) % (temp_fpcen - cen_cen)); - - if ((hep.planarity > min_planarity) && (Abs(n*hep.normal) < cosangle)) - { - // Add this half-edge pair to the array - heparray.push_back(hep); - } - } - ++epfirst; ++fpfirst; - } - } - - cout << "Possible connections" << endl; - for (int i = 0; i < (int)heparray.size(); ++i) - { - heparray[i].print(); - } - - // Sort heparray according to distance. Use STL stable_sort algorithm - stable_sort(heparray.begin(), heparray.end(), greater_than); - - cout << "Possible connections: reverse sorted" << endl; - for (int i = 0; i < (int)heparray.size(); ++i) - { - heparray[i].print(); - } - - cout << "Making Connections" << endl; - // Go through heparray and start making connections. Once a connection is - // made, remove all other HalfEdgePairs which contain already connected edges - // NOTE: Traversal is from the end of the array. - HalfEdgePair hep; - while (!heparray.empty()) - { - hep = heparray.back(); heparray.pop_back(); - hep.print(); - // Make connection - - connectEdges(obj, - hep.ep1, (hep.ep1)->getOtherFacePointer(hep.fp1), - hep.ep2, (hep.ep2)->getOtherFacePointer(hep.fp2)); - - // Remove all HalfEdgePairs from heparray which contain any of the - // two edges in hep - HalfEdgePair::last_connected1 = hep.ep1; - HalfEdgePair::last_connected2 = hep.ep2; - heparray.erase(remove_if(heparray.begin(), heparray.end(), contains_connected), heparray.end()); - } -} - -void multiConnectFaces(DLFLObjectPtr obj, DLFLFacePtrArray fp) -{ - // Connect multiple faces. Connects closest edges between each pair of faces - - // Find centroids of the faces - int num_faces = fp.size(); - Vector3dArray cen; - Vector3d cen_cen; - - cen.resize(num_faces); - for (int i = 0; i < (int)num_faces; ++i) - { - cen[i] = fp[i]->geomCentroid(); - cen_cen += cen[i]; - } - cen_cen /= num_faces; - - DLFLEdgePtrList cedges; // Use linked list, not array, to simplify erase operations - DLFLFacePtrList cfaces; // Faces for candidate edges (we need half-edges to connect) - - //--- NOTE ---// - // In the list of faces, the other face for the edge is stored, instead of the - // face which defines the half-edge to be connected. This is because once two half-edges - // are connected, that face pointer might no longer be valid, but the other side will - // still be valid. This assumes that both sides of the edge are not the same face - - for (int i = 0; i < num_faces; ++i) - { - DLFLEdgePtrArray eparray; - fp[i]->getEdges(eparray); - - DLFLEdgePtr ep; - - // Add all edges to the cedges list - for (int j = 0; j < (int)eparray.size(); ++j) - { - ep = eparray[j]; - cedges.push_back(ep); - cfaces.push_back(ep->getOtherFacePointer(fp[i])); // See NOTE above - } - } - - // cedges now contains all the candidate edges - - /* - Find all possible connections among the candidate edges - Add them to an array of HalfEdgePairs to sort and make - connections later. Valid connections are all those between - half-edges in different faces - */ - - HalfEdgePairArray heparray; - DLFLEdgePtr eptr; - DLFLFacePtr fptr; - DLFLFacePtrList::iterator fpfirst; - DLFLEdgePtrList::iterator epfirst, eplast; - double cosangle = cos(5.0*M_PI / 180.0); // Tolerance for parallel planes check - double min_planarity = cosangle; - while (!cedges.empty()) - { - eptr = cedges.front(); cedges.pop_front(); - fptr = cfaces.front(); cfaces.pop_front(); - - // Go through remaining edges. Find edge which is closest - // but is not in the same face as ep - epfirst = cedges.begin(); eplast = cedges.end(); - fpfirst = cfaces.begin(); - DLFLEdgePtr temp_ep; - DLFLFacePtr temp_fp, ofp, temp_ofp; - while (epfirst != eplast) - { - temp_ep = (*epfirst); temp_fp = (*fpfirst); - ofp = eptr->getOtherFacePointer(fptr); - temp_ofp = temp_ep->getOtherFacePointer(temp_fp); - if (ofp != temp_ofp) - { // Different faces - HalfEdgePair hep(eptr, temp_ep, fptr, temp_fp); - // Check if plane formed by the two half-edges will be parallel - // to the plane formed by the centroid's of the two faces and - // the overall centroid calculated above. Also check for planarity - // If planarity is less than a specified value, discard the pair - Vector3d fpcen, temp_fpcen; - Vector3d n; // Normal to above mentioned plane - fpcen = ofp->geomCentroid(); temp_fpcen = temp_ofp->geomCentroid(); - n = normalized((fpcen - cen_cen) % (temp_fpcen - cen_cen)); - - if (isNonZero(normsqr(n)) && - (hep.planarity > min_planarity) && - (Abs(n*hep.normal) < cosangle)) - { - // Add this half-edge pair to the array - heparray.push_back(hep); - } - else - { - // For debug - } - } - ++epfirst; ++fpfirst; - } - } - - // Sort heparray according to distance. Use STL stable_sort algorithm - stable_sort(heparray.begin(), heparray.end(), greater_than); - - // Before inserting the new edges, keep count of old edges. - // Newly inserted edges will then be checked for redundant ones - // and cleaned up if necessary - int num_old_edges = obj->num_edges(); - - // Go through heparray and start making connections. Once a connection is - // made, remove all other HalfEdgePairs which contain already connected edges - // NOTE: Traversal is from the end of the array. - HalfEdgePair hep; - while (!heparray.empty()) - { - hep = heparray.back(); heparray.pop_back(); - // Make connection - - connectEdges(obj, - hep.ep1, (hep.ep1)->getOtherFacePointer(hep.fp1), - hep.ep2, (hep.ep2)->getOtherFacePointer(hep.fp2)); - - // Remove all HalfEdgePairs from heparray which contain any of the - // two edges in hep - HalfEdgePair::last_connected1 = hep.ep1; - HalfEdgePair::last_connected2 = hep.ep2; - heparray.erase(remove_if(heparray.begin(), heparray.end(), contains_connected), heparray.end()); - } - - // Go through newly inserted edges and cleanup ones which are redundant - DLFLEdgePtrList::iterator el_first, el_last; - DLFLEdgePtr newep; - DLFLEdgePtrList newedges; - - el_first = obj->beginEdge(); el_last = obj->endEdge(); - advance(el_first, num_old_edges); - while (el_first != el_last) - { - newep = (*el_first); ++el_first; - newedges.push_back(newep); - } - edgeCleanup(obj, newedges); -} - -void multiConnectFaces( - DLFLObjectPtr obj, DLFLFacePtrArray fparray, double scale_factor, - double extrude_dist, bool use_max_offsets) -{ - // Connect multiple faces using convex hull method - // scale specifies scale factor for vertices before convex hull is created - // extrude specified distance faces should be extruded before convex hull is created - - // First get vertices from all selected faces. - // If two vertices are geometrically concident, only one of them is used for convex hull - Vector3dArray vertices; - Vector3dArray face_vertices; - Vector3d p1, p2, facenormal, extrudevec; - DLFLFacePtr fp; - int num_sel_faces = fparray.size(); - DoubleArray max_extrude_distances; - - max_extrude_distances.resize(num_sel_faces, extrude_dist); - - if (use_max_offsets) - findMaxOffsets(fparray, max_extrude_distances); - - for (int i = 0; i < num_sel_faces; ++i) - { - fp = fparray[i]; - fp->getVertexCoords(face_vertices); - facenormal = fp->computeNormal(); - extrudevec = max_extrude_distances[i] * facenormal; - - // Add points from face_vertices to vertices checking for coincident vertices - // maxdist is the square of max distance between 2 points for them to be - // considered coincident. - // Also extrude the points if extrude_dist is non-zero - double maxdist = 1.0e-4; - for (int j = 0; j < (int)face_vertices.size(); ++j) - { - p1 = face_vertices[j]; - bool addp1 = true; - for (int k = 0; k < (int)vertices.size(); ++k) - { - p2 = vertices[k]; - if (normsqr(p1 - p2) < maxdist) - { - addp1 = false; - break; - } - } - if (addp1 == true) - { - if (isNonZero(extrude_dist)) p1 += extrudevec; - vertices.push_back(p1); - } - } - } - - // Scale the points for convex hull with centroid as origin using given scale factor - // Scaling is done only if scale_factor is non-zero and not equal to 1 - scale_factor = Abs(scale_factor); - if (isNonZero(scale_factor) && isNonZero(scale_factor - 1.0)) - scale(vertices, scale_factor); - - // Find convex hull of the transformed points - DLFLConvexHull convexhull; - convexhull.createHull(vertices); - // Do edge cleanup on convex hull to remove redundant edges - edgeCleanup(&convexhull); - - // If convex hull is interior to the original object, it has to be reversed before - // making further connections. This can be tested by checking normals of original faces - // If the normals point towards the centroid of the convex hull, no reversal is needed. - // Only one face needs to be checked - Vector3d v1 = fparray[0]->normalCentroid(); - Vector3d v2 = fparray[0]->geomCentroid() - centroid(vertices); normalize(v2); - if (v1*v2 > 0.0) convexhull.reverse(); - - // Go through selected faces and faces of convex hull and find matching ones - // to make connections. A match is when a selected face and a face in the convex hull - // are parallel to each other AND are facing each other. - DLFLFacePtrArray chfparray, fp1array, fp2array; - DLFLFacePtr sfp, chfp; - Vector3d sfpn, chfpn; - - fp1array.reserve(num_sel_faces); fp2array.reserve(num_sel_faces); - - convexhull.getFaces(chfparray); - int num_ch_faces = chfparray.size(); - - for (int i = 0; i < num_ch_faces; ++i) - { - chfp = chfparray[i]; - chfpn = chfp->computeNormal(); - for (int j = 0; j < num_sel_faces; ++j) - { - sfp = fparray[j]; - sfpn = sfp->computeNormal(); - // Dot product should be -1 - if (!isNonZero(1.0 + chfpn*sfpn)) - { - // Matching faces found - fp1array.push_back(sfp); fp2array.push_back(chfp); - break; - } - } - } - - // Before connecting the faces, combine the convexhull with this object - // to get a single DLFLObject - obj->splice(convexhull); - - // Go through the lists of matching faces and make the connections - // Closest vertex connection method is used - for (int i = 0; i < (int)fp1array.size(); ++i) - { - connectFaces(obj, fp1array[i], fp2array[i]); - } - -} - -void multiConnectFaces(DLFLObjectPtr obj, DLFLFacePtrArray fparray, double min_factor, bool make_connections) -{ - // Connect multiple faces using convex hull method. min_factor determines - // search stop criterion for finding suitable convex hull. - - // If difference in adjustment factor between 2 successive iterations - // is less than min_factor and we don't have any points inside the convex - // hull in the current iteration we stop. Adjustment factor will never go below - // the min_factor. - - // Search for the convex hull which is the smallest one which contains all the - // original points. We do a binary search starting from half the distance from - // centroid of each face to the centroid of all the face-centroids and continuing - // till we reach the stop criterion described above. - - vector vertices; // 2D Array of vertices in their original positions - Vector3dArray chvertices; // Translated/extruded vertices for computing convex hull - Vector3dArray centroids; // Overall centroid - Vector3d global_centroid; // Centroid of each face - Vector3dArray adj_vect; // Normalized vectors from centroid of each face to global centroid - DoubleArray adj_dist; // Distance from centroid of each face to global centroid - DLFLFacePtr fp; - int num_sel_faces = fparray.size(); - - centroids.resize(num_sel_faces); - vertices.resize(num_sel_faces); - for (int i = 0; i < num_sel_faces; ++i) - { - fp = fparray[i]; - fp->getVertexCoords(vertices[i]); // Get vertices of face - centroids[i] = fp->geomCentroid(); // Find centroid of face - global_centroid += centroids[i]; - chvertices.insert(chvertices.end(), vertices[i].begin(), vertices[i].end()); - } - - // If convex hull of initial vertices excludes any point, we don't proceed any further - DLFLConvexHull convexhull; - if (convexhull.createHull(chvertices) == false) - { - cout << "Initial convex hull excludes atleast one vertex!" << endl; - cout << "Multi-connect faces aborted." << endl; - return; - } - - global_centroid /= num_sel_faces; - - adj_vect.resize(num_sel_faces); - adj_dist.resize(num_sel_faces); - for (int i = 0; i < num_sel_faces; ++i) - { - adj_vect[i] = global_centroid - centroids[i]; - adj_dist[i] = normalize(adj_vect[i]); - } - - bool converged = false; - bool ptinside = false; // Was any point inside convex hull in current iteration? - double efactor = 0.5; // Amount to move in terms of original distance - double efactor_prev = 0.0; // efactor value in previous iteration - double efactor_diff; // Change in efactor from this iteration to next iteration - int max_iters = 10; // Max. no. of iterations - int num_iters = 0; - while (!converged) - { - // Go through original vertices face by face and move them by appropriate - // distances to get new vertices for convex hull computation - chvertices.clear(); - for (int i = 0; i < num_sel_faces; ++i) - { - Vector3d dvec = efactor * adj_dist[i] * adj_vect[i]; // Adjustment vector - for (int j = 0; j < (int)vertices[i].size(); ++j) - { - Vector3d p = vertices[i][j] + dvec; - chvertices.push_back(p); - } - } - - // We now have the vertices to compute the convex hull - ptinside = !convexhull.createHull(chvertices); - - efactor_diff = 0.5 * Abs(efactor - efactor_prev); - efactor_prev = efactor; - - // If difference in efactor is less than min_factor - // AND we are not excluding any points in this iteration we stop iterating. - // Otherwise clamp efactor_diff to min_factor - if (efactor_diff < min_factor) - { - if (ptinside == false) converged = true; - else efactor_diff = min_factor; - } - - if (ptinside) - { - // Atleast 1 vertex was inside convex hull in this iteration - // So move points away from global centroid. i.e. reduce efactor - efactor = efactor - efactor_diff; - } - else - { - // All points are still outside convex hull in this iteration - // So move points closer to global centroid. i.e. increase efactor - efactor = efactor + efactor_diff; - } - num_iters++; - if (num_iters > max_iters) break; - } - - // If we haven't converged within max. no. of iterations, print out error message - // and return. - if (converged == false) - { - cout << "Could not find suitable convex hull within " << max_iters << " iterations." << endl; - cout << "Multi-connext faces aborted." << endl; - return; - } - - // We have converged to the convex hull closest to the boundary convex hull - // given the constraints. - - // Do edge cleanup on convex hull to remove redundant edges - edgeCleanup(&convexhull); - - // If convex hull is interior to the original object, it has to be reversed before - // making further connections. This can be tested by checking normals of original faces - // If the normals point towards the centroid of the convex hull, no reversal is needed. - // Only one face needs to be checked - if (fparray[0]->normalCentroid() * adj_vect[0] > 0.0) convexhull.reverse(); - - // Go through selected faces and faces of convex hull and find matching ones - // to make connections. A match is when a selected face and a face in the convex hull - // are parallel to each other AND are facing each other. - DLFLFacePtrArray chfparray, fp1array, fp2array; - DLFLFacePtr sfp, chfp; - Vector3d sfpn, chfpn; - - fp1array.reserve(num_sel_faces); fp2array.reserve(num_sel_faces); - - convexhull.getFaces(chfparray); - int num_ch_faces = chfparray.size(); - - for (int i = 0; i < num_ch_faces; ++i) - { - chfp = chfparray[i]; - chfpn = chfp->computeNormal(); - for (int j = 0; j < num_sel_faces; ++j) - { - sfp = fparray[j]; - sfpn = sfp->computeNormal(); - // Dot product should be -1 - if (Abs(1.0 + chfpn*sfpn) < 1.0e-5) - { - // Matching faces found - fp1array.push_back(sfp); fp2array.push_back(chfp); - break; - } - } - } - - // Before connecting the faces, combine the convexhull with this object - // to get a single DLFLObject - obj->splice(convexhull); - - // Go through the lists of matching faces and make the connections - // Closest vertex connection method is used - if (make_connections) - for (int i = 0; i < (int)fp1array.size(); ++i) - { - connectFaces(obj, fp1array[i], fp2array[i]); - } -} - - -// Define - -void findMaxOffsets(DLFLFacePtrArray fparray, DoubleArray& maxoffsets) -{ - /* - Find the maximum distance by which each of the given - faces can be offset without any of the points going inside - the convex hull of all the points. The distance will be - along the normal to each face. - */ - - // First find the planes formed when each face is extruded along - // its normal. The end plane is not included. All faces are assumed - // to be planar, i.e. the average normal will be the same as the - // normal at each corner. - // Each of the planes can thus be defined as a (point,normal) pair - // where the mid-point of each edge will be the point and the normal - // is computed by the cross-product of the edge vector and face normal - // The direction of the edge vector and hence the plane normal is not - // important since we are only going to calculate distance from the - // plane - - // Each face will have a variable number of Planes - int numfaces = fparray.size(); - PlaneArrayArray allfaceplanes; - allfaceplanes.resize(numfaces); - - DLFLEdgePtrArray edges; - Vector3d facenormal; - for (int i = 0; i < numfaces; ++i) - { - int numedges; - PlaneArray faceplanes; - - fparray[i]->getEdges(edges); facenormal = fparray[i]->computeNormal(); - numedges = edges.size(); - - faceplanes.resize(numedges); - - Vector3d origin, edgevec, normal; - for (int j = 0; j < numedges; ++j) - { - origin = edges[j]->getMidPoint(); - edgevec = edges[j]->getEdgeVector(); normalize(edgevec); - normal = edgevec % facenormal; normalize(normal); - faceplanes[j].origin = origin; - faceplanes[j].normal = normal; - } - allfaceplanes[i] = faceplanes; - } - - // Now we have computed Planes for all faces - // Go through each face, find distance of each point in face - // from Planes of other faces. Find the minimum of these - // distances - maxoffsets.clear(); - maxoffsets.resize(numfaces); - Vector3d facepoint; - for (int i = 0; i < numfaces; ++i) - { - facenormal = fparray[i]->normal; // Normal would have been computed in previous loop - - double mindist = 1.0e3; - for (int j = 0; j < numfaces; ++j) - { - if (i != j) - { - PlaneArray faceplanes = allfaceplanes[j]; - Vector3dArray facepoints; - fparray[i]->getVertexCoords(facepoints); - for (int k = 0; k < (int)faceplanes.size(); ++k) - { - Plane plane = faceplanes[k]; - for (int m = 0; m < (int)facepoints.size(); ++m) - { - facepoint = facepoints[m]; - double t = 0.0; - - // Find intersection of ray (centroid,facenormal) with plane - if (plane.intersect(facepoint, facenormal, t)) - { - if (Abs(t) < Abs(mindist)) mindist = t; - } - } - } - } - } - maxoffsets[i] = mindist; - } -} - -void multiConnectMidpoints(DLFLObjectPtr obj) -{ - // Subdivide each edge. Connect midpoints to form new faces. - // Connect corners in each face which share the same mid-point. - - // First part is similar to Simplest Subdivision scheme, - // except that the old edges are not deleted. - - // Keep track of number of old vertices before edges are subdivided - int num_old_verts = obj->num_vertices(); - - // Sub-divide all edges. Make sure type is set. - subdivideNonLoopingEdges(obj, 2, true); - - // Go through vertex list. For all old vertices (before edge subdivision) - // go through the face-vertex list and insert edges between previous and - // next corners to each face-vertex. - - DLFLVertexPtrList::iterator vl_first, vl_last; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - - DLFLFaceVertexPtrList fvplist; - DLFLFaceVertexPtrList::iterator fvp_first, fvp_last; - DLFLFaceVertexPtr fvp1, fvp2; - DLFLMaterialPtr matl = (obj->firstFace())->material(); - int num_verts = 0; - while (vl_first != vl_last && num_verts < num_old_verts) - { - fvplist = (*vl_first)->getFaceVertexList(); ++vl_first; ++num_verts; - - fvp_first = fvplist.begin(); fvp_last = fvplist.end(); - while (fvp_first != fvp_last) - { - fvp2 = fvp1 = (*fvp_first); ++fvp_first; - - // Insert an edge between previous and next corners - // Adjust for self-loops. If there is a self loop, go one more step - // in the same direction - if (fvp1->getVertexPtr() == fvp1->next()->getVertexPtr()) fvp1 = (fvp1->next())->next(); - else fvp1 = fvp1->next(); - if (fvp2->getVertexPtr() == fvp2->prev()->getVertexPtr()) fvp2 = (fvp2->prev())->prev(); - else fvp2 = fvp2->prev(); - - // If self loops are there, we could end up inserting an edge between - // two vertices twice. If that happens, second insertion will be - // between two corners which are adjacent to each other. - // Check for that and do insertion only if the corners are not adjacent - if (fvp1->next() != fvp2 && fvp1->prev() != fvp2) - insertEdge(obj, fvp1, fvp2, false, matl); - } - } - - // Go through the new vertices (midpoints). Find corners which refer to these - // midpoints which are in the newly created middle faces. This can be found - // by checking if next and previous vertices are also new midpoints. - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - advance(vl_first, num_old_verts); - DLFLFaceVertexPtr fvp, fvplink[2]; // Corners which are to be connected for each midpoint - int corner_index; // Index into the above array - while (vl_first != vl_last) - { - fvplist = (*vl_first)->getFaceVertexList(); ++vl_first; - - fvp_first = fvplist.begin(); fvp_last = fvplist.end(); - corner_index = 0; - while (fvp_first != fvp_last && corner_index < 2) - { - fvp = (*fvp_first); ++fvp_first; - - // Look at previous and next vertices. If both are new, then - // pick this one and store in array - fvp1 = fvp->prev(); fvp2 = fvp->next(); - if (fvp1->getVertexPtr()->getType() == VTNewEdgePoint && - fvp2->getVertexPtr()->getType() == VTNewEdgePoint) - fvplink[corner_index++] = fvp; - } - - // Insert an edge between the two corners picked above - insertEdge(obj, fvplink[0], fvplink[1], false); - } - - // Reset type of all Vertices, face-vertices and edges - // so we don't have any conflicts with subsequent operations - // We only need to do this for the new vertices as above - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - advance(vl_first, num_old_verts); - while (vl_first != vl_last) - { - (*vl_first)->resetTypeDeep(); ++vl_first; - } -} - -void multiConnectCrust(DLFLObjectPtr obj, double scale_factor) -{ - // Scale surface by given scale factor to form crust. - // Then subdivide outer faces using zero-length extrusions - // with same scale factor - // Connect corresponding faces in inner shell and outer shell - - // Clamp scale factor to lie between 0.1 and 1.0. - // Take absolute value - scale_factor = Abs(scale_factor); - if (scale_factor < 0.1) scale_factor = 0.1; - else if (scale_factor > 1.0) scale_factor = 1.0; - - // First create scaled crust. - createCrustWithScaling(obj, scale_factor); - - // The crust-modeling arrays would have been filled now. - // Go through those arrays and punch holes after doing zero-length extrusion - // crustfp1 contains old faces, crustfp2 contains new faces from inner shell - int num_holes = crustfp1.size(); - DLFLFacePtr fp1, exfp1, fp2; - DLFLFaceVertexPtr fvp1, fvp2; - Vector3d vec; // For dummy direction vector - for (int i = 0; i < num_holes; ++i) - { - fp1 = crustfp1[i]; fp2 = crustfp2[i]; - - // Do zero length extrusion with scaling for fp1 - exfp1 = extrudeFace(obj, fp1, 0.0, vec, 0.0, scale_factor); - - // Connect the end face of the extrusion and the inner face in the crust - fvp1 = exfp1->firstVertex(); fvp2 = fp2->firstVertex(); - connectFaces(obj, fvp1, fvp2, 1); - } -} - -void modifiedMultiConnectCrust(DLFLObjectPtr obj, double scale_factor) -{ - // A modification of the multiConnectCrust method - // After zero-length extrusion, old edges are trisected - // and the new points are connected to the extruded faces. - // The old support edges for the extrusion are then deleted. - - // Clamp scale factor to lie between 0.1 and 1.0. - // Take absolute value - scale_factor = Abs(scale_factor); - if (scale_factor < 0.1) scale_factor = 0.1; - else if (scale_factor > 1.0) scale_factor = 1.0; - - int num_old_edges = obj->num_edges(); - int num_old_verts = obj->num_vertices(); - int count = 0; - - // First create scaled crust. - createCrustWithScaling(obj, scale_factor); - - // The crust-modeling arrays would have been filled now. - // Do zero length extrusions of the faces in the outer shell - // crustfp1 contains old faces, crustfp2 contains new faces from inner shell - // Replace the crustfp1 array to contain the extruded end faces - // Don't punch holes yet - int num_holes = crustfp1.size(); - DLFLFacePtr fp1, exfp1, fp2; - Vector3d vec; // For dummy direction vector - for (int i = 0; i < num_holes; ++i) - { - fp1 = crustfp1[i]; fp2 = crustfp2[i]; - - // Do zero length extrusion with scaling for fp1 - exfp1 = extrudeFace(obj, fp1, 0.0, vec, 0.0, scale_factor); - - // Replace fp1 with exfp1 in crustfp1 - crustfp1[i] = exfp1; - } - - // Trisect all the old edges (before creating crust and extruding) - // Set type of new points - DLFLEdgePtrList::iterator efirst, elast; - DLFLEdgePtr ep; - count = 0; - efirst = obj->beginEdge(); elast = obj->endEdge(); - while (count < num_old_edges) - { - ep = (*efirst); ++efirst; ++count; - trisectEdge(obj, ep, scale_factor, true, true); - } - - // Go through all the old vertices (before crust, extrude and trisect) - // For each vertex, go through the face-vertex list. For each face-vertex - // in that list, connect the previous and next face-vertices with an edge - // After doing that, find edges which do not connect to the points created - // by trisection and delete them - DLFLVertexPtrList::iterator vfirst, vlast; - DLFLVertexPtr vp, ovp; - DLFLFaceVertexPtrArray fvparray; - DLFLFaceVertexPtr fvp; - DLFLEdgePtrArray eparray; - count = 0; - vfirst = obj->beginVertex(); vlast = obj->endVertex(); - while (count < num_old_verts) - { - vp = (*vfirst); ++vfirst; ++count; - vp->getFaceVertices(fvparray); - for (int i = 0; i < (int)fvparray.size(); ++i) - { - fvp = fvparray[i]; - insertEdgeCoFacial(obj, fvp->prev(), fvp->next()); - } - vp->getEdges(eparray); - for (int i = 0; i < (int)eparray.size(); ++i) - { - ep = eparray[i]; - ovp = ep->getOtherVertexPointer(vp); - if (ovp->getType() != VTNewPoint) deleteEdge(obj, ep); - else ovp->resetType(); // Reset the type to allow proper recursive operation - } - } - - // Punch the holes now - DLFLFaceVertexPtr fvp1, fvp2; - for (int i = 0; i < num_holes; ++i) - { - fp1 = crustfp1[i]; fp2 = crustfp2[i]; - fvp1 = fp1->firstVertex(); fvp2 = fp2->firstVertex(); - connectFaces(obj, fvp1, fvp2, 1); - } -} - -void createSponge(DLFLObjectPtr obj, double thickness, double collapse_threshold_factor) -{ - // New multi-connect with crust. - bool fractional_thickness = false; - // Make sure all Edge IDs and Face IDs are consecutive - obj->makeEdgesUnique(); - obj->makeFacesUnique(); - - DLFLEdgePtrArray eplist1, eplist2; // List of edges to be connected (for inner shell) - DLFLFacePtrArray fplist1, fplist2; // List of faces to be connected (between outer and inner shell) - int num_faces, num_edges;//, num_verts; - int eistart, edgeindex, fistart;//, faceindex; - int num_old_verts = obj->num_vertices(); - int num_old_faces = obj->num_faces(); - int num_old_edges = obj->num_edges(); - int count; - - // Reserve and create num_old_edges entries in the 2 temporary edge lists - eplist1.resize(num_old_edges, nullptr); eplist2.resize(num_old_edges, nullptr); - - // Reserve and create num_old_faces entries in the 2 temporary face lists - fplist1.resize(num_old_faces, nullptr); fplist2.resize(num_old_faces, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - fistart = (obj->firstFace())->getID(); - - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp, newfp1, newfp2; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - - // Create face for inner shell - duplicateFacePlanarOffset(obj, fp, -thickness, 0.0, thickness, fractional_thickness); - - // Get the two newly inserted faces - DLFLFacePtrList::reverse_iterator temp = obj->rbeginFace(); - newfp1 = (*temp); ++temp; newfp2 = (*temp); - - // With respect to the outer shell, newfp1 faces inwards and newfp2 faces outwards - // When creating the inner shell we want to reverse the surface - // The edge connections will be made keeping this in mind - - // Set type of OUTER face so we can use the type to - // determine which face to use for edge connects - newfp2->setType(FTNew); - - // Store edges which are to be connected in the temporary array - // using the adjusted edge ID of corresponding edge in original mesh. - // newfp2 (the OUTER face) will be used for edge connections - DLFLEdgePtrArray eparray1, eparray2; - DLFLEdgePtr ep1, ep2; - - fp->getEdges(eparray1); newfp2->getEdges(eparray2); - - // Both fp and newfp2 MUST be of the same size. We wont check for that - for (int i = 0; i < (int)eparray1.size(); ++i) - { - ep1 = eparray1[i]; ep2 = eparray2[i]; - - edgeindex = ep1->getID() - eistart; - if (eplist1[edgeindex] == nullptr) eplist1[edgeindex] = ep2; - else eplist2[edgeindex] = ep2; - } - - // Store faces which are to be connected in the temporary array - // using the adjusted face ID of the face in the original mesh. - // newfp1 (the INNER face) will be used for face connections - // fplist1 will be used, since the other matching faces will only - // be created later on and there is no possibility of conflict - fplist1[fp->getID() - fistart] = newfp1; - - // Create the face for the outer shell - // We use extrude now so we can easily insert the support edges later - newfp2 = extrudeFacePlanarOffset(obj, fp, 0.0, 0.0, thickness, fractional_thickness); - - // newfp2 is used for make the face connection with the inner shell - // Store newfp2 in fplist2 - fplist2[fp->getID() - fistart] = newfp2; - } - - - // Trisect all the old edges (before creating inner shell and extruding) - // Set type of new points - count = 0; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLEdgePtr ep; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - if (fractional_thickness) - { - while (count < num_old_edges) - { - ep = (*el_first); ++el_first; ++count; - trisectEdge(obj, ep, thickness*ep->length(), false, true); - } - } - else - { - while (count < num_old_edges) - { - ep = (*el_first); ++el_first; ++count; - trisectEdge(obj, ep, thickness, false, true); - } - } - - // Create the support edges on the outer surface - // Go through all the old vertices (before crust, extrude and trisect) - // For each vertex, go through the face-vertex list. For each face-vertex - // in that list, connect the previous and next face-vertices with an edge - // After doing that, find edges which do not connect to the points created - // by trisection and delete them - DLFLVertexPtrList::iterator vfirst, vlast; - DLFLVertexPtr vp = nullptr; - DLFLVertexPtr ovp = nullptr; - DLFLFaceVertexPtrArray fvparray; - DLFLFaceVertexPtr fvp = nullptr; - DLFLEdgePtrArray eparray; - count = 0; - vfirst = obj->beginVertex(); vlast = obj->endVertex(); - while (count < num_old_verts) - { - vp = (*vfirst); ++vfirst; ++count; - vp->getFaceVertices(fvparray); - for (int i = 0; i < (int)fvparray.size(); ++i) - { - fvp = fvparray[i]; - insertEdgeCoFacial(obj, fvp->prev(), fvp->next()); - } - vp->getEdges(eparray); - for (int i = 0; i < (int)eparray.size(); ++i) - { - ep = eparray[i]; - ovp = ep->getOtherVertexPointer(vp); - if (ovp->getType() != VTNewPoint) deleteEdge(obj, ep); - else ovp->resetType(); // Reset the type to allow proper recursive operation - } - } - - // Make the edge connections for the inner shell - // Keep track of number of edges since the new edges will have to be collapsed - num_edges = obj->num_edges(); // Don't use num_old_edges variable - - // Go through eplist1 and eplist2 and connect corresponding half-edges - // The correct half-edge is determined by the type tag which was set previously - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr tfp1 = nullptr; - DLFLFacePtr tfp2 = nullptr; - for (int i = 0; i < num_old_edges; ++i) - { - if (eplist1[i] != nullptr && eplist2[i] != nullptr) - { - // Find the faces adjacent to the edges which are of type FTNew - // These will be the inner faces - eplist1[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp1 = tfp1; - else if (tfp2->getType() == FTNew) fp1 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - eplist2[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp2 = tfp1; - else if (tfp2->getType() == FTNew) fp2 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - connectEdges(obj, eplist1[i], fp1, eplist2[i], fp2); - } - else - { - cout << "nullptr pointers found! i = " << i << " " - << eplist1[i] << " -- " << eplist2[i] << endl; - } - } - - // All edges which were inserted above should be collapsed if the length is - // lesser than a threshold. - // This threshold is computed from the threshold factor given above and the - // sponge thickness. If threshold factor is 0, use a default value of 0.01 - // for threshold length. Threshold factor is a proportion of thickness. - double collapse_threshold_length = 0.01; - if (collapse_threshold_factor > 0.001) - collapse_threshold_length = thickness * collapse_threshold_factor; - - // Edges which are part of self-intersections should also be collapsed - // Since geometry is used to determine self-intersections, first make a list - // of edges to be collapsed and then do the collapsing - DLFLEdgePtrList colledges; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - advance(el_first, num_edges); // Advance to start of edges inserted above - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - - if (ep->length() < collapse_threshold_length) - { - ep->setType(ETCollapse); - colledges.push_back(ep); - } - else - { - // Check if this edge is a part of a self-intersection - // Find all edges at the two ends of this edge and check every pair - // for intersection, excluding this edge itself - DLFLVertexPtr vp1, vp2; - ep->getVertexPointers(vp1, vp2); - DLFLEdgePtrArray eparr1, eparr2; - vp1->getEdges(eparr1); vp2->getEdges(eparr2); - DLFLEdgePtr tep1, tep2; - for (int i = 0; i < (int)eparr1.size(); ++i) - { - tep1 = eparr1[i]; - if (tep1 != ep) - { - for (int j = 0; j < (int)eparr2.size(); ++j) - { - tep2 = eparr2[j]; - if (tep2 != ep && tep2 != tep1) - { - // Check if tep1 and tep2 intersect - if (checkIntersection(tep1, tep2)) - { - ep->setType(ETCollapse); - colledges.push_back(ep); - i = eparr1.size(); // To make sure we break out of outer loop also - break; - } - } - } - } - } - } - } - - // Go through list of edges to be collapsed and collapse them - // DON'T do cleanup when collapsing. The edges which form 2-gons or self-loops - // will also be collapsed in this loop - el_first = colledges.begin(); el_last = colledges.end(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; - collapseEdge(obj, ep, false); - } - - // Make the face connections between the outer shell and the inner shell - DLFLFaceVertexPtr fvp1, fvp2; - for (int i = 0; i < num_old_faces; ++i) - { - fp1 = fplist1[i]; fp2 = fplist2[i]; - if (fp1 != nullptr && fp2 != nullptr) - { - fvp1 = fp1->firstVertex(); fvp2 = fp2->firstVertex(); - connectFaces(obj, fvp1, fvp2, 1); - } - } - - // Cleanup any remaining 2-gons - // cleanup2gons(obj); -} - - -bool less_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2) -{ - if (hep1.mpdist < hep2.mpdist) return true; - return false; -} - -bool greater_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2) -{ - if (hep1.mpdist > hep2.mpdist) return true; - return false; -} - -bool contains_connected(const HalfEdgePair& hep) -{ - if (hep.ep1 == HalfEdgePair::last_connected1 || - hep.ep1 == HalfEdgePair::last_connected2 || - hep.ep2 == HalfEdgePair::last_connected1 || - hep.ep2 == HalfEdgePair::last_connected2) return true; - return false; -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLMultiConnect.h b/topmodx/include/dlflaux/DLFLMultiConnect.h deleted file mode 100644 index 41ffbb8..0000000 --- a/topmodx/include/dlflaux/DLFLMultiConnect.h +++ /dev/null @@ -1,242 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLMULTI_CONNECT_H_ -#define _DLFLMULTI_CONNECT_H_ - -#include - -namespace DLFL -{ - -class HalfEdgePair -{ - // Class defines a connection as that between two half-edges - // Also contains members to store other calculated information - // about this connection such as distance between edges, planarity of - // resulting quadrilateral, etc. - // Contains comparison methods to allow sorting a list of EdgePairs - // according to priority for connection. -public: - - // Pointers to edges which were most recently connected - static DLFLEdgePtr last_connected1, last_connected2; - - DLFLEdgePtr ep1, ep2; // Edges to be connected - DLFLFacePtr fp1, fp2; // Faces which define the half-edges to be connected - // These faces define the half-edges that will remain valid even after - // a connection has been made. i.e. the half-edges which should NOT be - // connected. The other face adjacent to the edge is used to define the - // half-edge that will actually be used to make the connection - - double mpdist; // Distance between midpoints of the two edges - double planarity; // Planarity of quad resulting from edge connection. - // planarity value will be clamped to lie between 0 and 1. - // 1 means the quad is perfectly planar - // 0 means the two edges are perpendicular to each other - Vector3d normal; // Average normal of quad resulting from edge connection. - - // Default constructor - HalfEdgePair() - : ep1(nullptr), ep2(nullptr), fp1(nullptr), fp2(nullptr), mpdist(0.0), planarity(0.0), normal() - { - } - - - // Constructor - HalfEdgePair(DLFLEdgePtr eptr1, DLFLEdgePtr eptr2, - DLFLFacePtr fptr1, DLFLFacePtr fptr2) - : ep1(eptr1), ep2(eptr2), fp1(fptr1), fp2(fptr2), mpdist(0.0), planarity(0.0), normal() - { - computeMetrics(); - } - - // Copy constructor - HalfEdgePair(const HalfEdgePair& hep) - : ep1(hep.ep1), ep2(hep.ep2), fp1(hep.fp1), fp2(hep.fp2), - mpdist(hep.mpdist), planarity(hep.planarity), normal(hep.normal) - { - } - - // Destructor - ~HalfEdgePair() {} - - // Assignment operator - HalfEdgePair& operator = (const HalfEdgePair& hep) - { - ep1 = hep.ep1; ep2 = hep.ep2; - fp1 = hep.fp1; fp2 = hep.fp2; - mpdist = hep.mpdist; planarity = hep.planarity; normal = hep.normal; - return (*this); - } - - // Compute metrics for this pair - void computeMetrics(void) - { - if (ep1 && ep2) - { - mpdist = distBetween(ep1, ep2); - - // Compute the average normal for this quad formed by this pair - // Takes average of normals at any two opposite corners formed with adjacent corners. - // Rotation order is defined by associated face and not order of vertices in edge - DLFLFaceVertexPtr e1fvp1, e1fvp2, e2fvp1, e2fvp2; - - e1fvp1 = ep1->getFaceVertexPtr(ep1->getOtherFacePointer(fp1)); e1fvp2 = e1fvp1->next(); - e2fvp1 = ep2->getFaceVertexPtr(ep2->getOtherFacePointer(fp2)); e2fvp2 = e2fvp1->next(); - - Vector3d v11, v12, v21, v22; // Corners - Vector3d av11, av12, av21, av22; // Adjusted coordinates of corners - see below - Vector3d n11, n21; // Normals at 2 opposite corners - - v11 = e1fvp1->getVertexCoords(); v12 = e1fvp2->getVertexCoords(); - v21 = e2fvp1->getVertexCoords(); v22 = e2fvp2->getVertexCoords(); - - // Adjust coordinates of the end points to take care of situations where - // the two edges share a vertex (which will cause problems in - // normal & planarity computation. Move the end points slightly inward - // along its edge. Note that this is done only for the local computation - av11 = 0.75*v11 + 0.25*v12; av12 = 0.25*v11 + 0.75*v12; - av21 = 0.75*v21 + 0.25*v22; av22 = 0.25*v21 + 0.75*v22; - - // Use adjusted corners for computation - n11 = normalized((av22 - av11) % (av12 - av11)); - n21 = normalized((av12 - av21) % (av22 - av21)); - - normal = normalized(n11 + n21); - - // Compute planarity. Dot product between normals at opposite corners - // is taken to be a measure of planarity. If both normals are same, - // dot product will be 1, otherwise it will be less than 1 - planarity = n11 * n21; - } - } - - // Comparison between two HalfEdgePairs. Uses distance to determine relative ordering - friend bool less_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2); - /* - friend bool less_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2) { - if ( hep1.mpdist < hep2.mpdist ) return true; - return false; - } - */ - // Comparison between two HalfEdgePairs. Uses distance to determine relative ordering - friend bool greater_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2); - /* - friend bool greater_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2) { - if ( hep1.mpdist > hep2.mpdist ) return true; - return false; - } - */ - // Checks to see if given HalfEdgePair contains an edge which - // was most recently connected. Uses the stored static variables - // to do the comparison. Assumes variables have been set. - friend bool contains_connected(const HalfEdgePair& hep); - /* - friend bool contains_connected(const HalfEdgePair& hep) { - if ( hep.ep1 == HalfEdgePair::last_connected1 || - hep.ep1 == HalfEdgePair::last_connected2 || - hep.ep2 == HalfEdgePair::last_connected1 || - hep.ep2 == HalfEdgePair::last_connected2 ) return true; - return false; - } - */ - - void print(void) const - { - if (ep1 && ep2) - cout << "{" << ep1->getID() << "," << (ep1->getOtherFacePointer(fp1))->getID() << "}" - << " <--> " - << "{" << ep2->getID() << "," << (ep2->getOtherFacePointer(fp2))->getID() << "}" - << " : " << mpdist << "," << planarity << "," << normal << endl; - } -}; - -typedef vector HalfEdgePairArray; -typedef list HalfEdgePairList; - -// a struct for a Plane to simplify storage and access -struct Plane -{ -public: - Vector3d origin, normal; - - Plane() - : origin(), normal() - { - } - - Plane(const Plane& plane) - : origin(plane.origin), normal(plane.normal) - { - } - - ~Plane() - { - } - - Plane& operator = (const Plane& plane) - { - origin = plane.origin; normal = plane.normal; - return (*this); - } - - // Find intersection of this Plane with a ray starting at p in direction v. - // Computes parametric distance along v with p as origin and returns it as parameter - // Returns false if there is no intersection, true otherwise - bool intersect(const Vector3d& p, const Vector3d& v, double& t) - { - double vn = v * normal; - if (!isNonZero(vn)) return false; - - t = ((origin - p)*normal) / vn; - - return true; - } -}; - -typedef vector PlaneArray; -typedef vector PlaneArrayArray; - -void tripleConnectFaces(DLFLObjectPtr obj, DLFLFacePtr fp1, DLFLFacePtr fp2, DLFLFacePtr fp3); -void multiConnectFaces(DLFLObjectPtr obj, DLFLFacePtrArray fp); -void multiConnectFaces(DLFLObjectPtr obj, DLFLFacePtrArray fparray, double scale_factor, double extrude_dist, bool use_max_offsets = false); -void multiConnectFaces(DLFLObjectPtr obj, DLFLFacePtrArray fparray, double min_factor, bool make_connections = true); -void findMaxOffsets(DLFLFacePtrArray fparray, DoubleArray& maxoffsets); -void multiConnectMidpoints(DLFLObjectPtr obj); -void multiConnectCrust(DLFLObjectPtr obj, double scale_factor = 0.5); -void modifiedMultiConnectCrust(DLFLObjectPtr obj, double scale_factor = 0.5); -void createSponge(DLFLObjectPtr obj, double thickness, double collapse_threshold_factor = 0.0); - -bool less_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2); -bool greater_than(const HalfEdgePair& hep1, const HalfEdgePair& hep2); -bool contains_connected(const HalfEdgePair& hep); - -} // end namespace - -#endif // _DLFLMULTI_CONNECT_H_ diff --git a/topmodx/include/dlflaux/DLFLSculpting.cc b/topmodx/include/dlflaux/DLFLSculpting.cc deleted file mode 100644 index 8e85a39..0000000 --- a/topmodx/include/dlflaux/DLFLSculpting.cc +++ /dev/null @@ -1,1037 +0,0 @@ -/* -* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * 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 2 - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * - * Short description of this file - * - * name of .hh file containing function prototypes - * -*/ - -#include "DLFLSculpting.h" -#include "DLFLConnect.h" - -namespace DLFL -{ - -void createConvexHull(DLFLObjectPtr obj) -{ - Vector3dArray varray; - varray.resize(obj->num_vertices()); - DLFLVertexPtrList::const_iterator first = obj->beginVertex(), last = obj->endVertex(); - int i = 0; - while (first != last) - { - varray[i++] = (*first)->getCoords(); - ++first; - } - DLFLConvexHull chull; - chull.createHull(varray); - obj->reset(); - obj->splice(chull); -} - -void createDualConvexHull(DLFLObjectPtr obj) -{ - DLFLVertexPtrArray verts; - Vector3dArray ovarray; - obj->getVertices(verts); - for (int i = 0; i < (int)verts.size(); i++) - ovarray.push_back(verts.at(i)->getCoords()); - - //find min and max points - float fmax = 9999999, fmin = -9999999; - Vector3d cvmin(fmax, fmax, fmax), cvmax(fmin, fmin, fmin); - for (int i = 0; i < (int)ovarray.size(); i++) - { - Vector3d v = ovarray.at(i); - for (int j = 0; j<3; j++) - { - if (v[j]cvmax[j]) cvmax[j] = v[j]; - } - } - - //slice object uniformly - int SLICENUM[3] = { 1,1,1 }; - int DUAL = 1; - float EPS = 0.001; - - obj->reset(); - Vector3d step = (cvmax - cvmin + Vector3d(2 * EPS, 2 * EPS, 2 * EPS)); - step[0] /= SLICENUM[0]; - step[1] /= SLICENUM[1]; - step[2] /= SLICENUM[2]; - - /*step[0]-=1; - step[1]-=1; - step[2]-=1; - */ - - float x = cvmin[0] - EPS; - for (int ix = 0; ix x) && (ovarray.at(i)[0] < x + step[0] + EPS) && - (ovarray.at(i)[1] > y) && (ovarray.at(i)[1] < y + step[1] + EPS) && - (ovarray.at(i)[2] > z) && (ovarray.at(i)[2] < z + step[2] + EPS)) - coords.push_back(ovarray.at(i)); - if (coords.size()>3) - { - if (!DUAL) - { - DLFLConvexHull chull; - chull.createHull(coords); - obj->splice(chull); - } - else - { - DLFLObjectPtr object = createDualConvexHull(obj, coords); - obj->splice(*object); - } - } - z += step[2]; - } - y += step[1]; - } - x += step[0]; - } -} - -DLFLObjectPtr createDualConvexHull(DLFLObjectPtr obj, const Vector3dArray &ovarray) -{ - DLFLVertexPtrArray cverts; - - if (convexhull == nullptr) convexhull = new DLFLConvexHull(); - - convexhull->createHull(ovarray); - convexhull->getVertices(cverts); - float fmax = 9999999, fmin = -9999999; - Vector3d cvmin(fmax, fmax, fmax), cvmax(fmin, fmin, fmin); - for (int i = 0; icvmax[j]) cvmax[j] = v[j]; - } - } - - DLFLObjectPtr cube = new DLFLObject(); - Vector3dArray verts; - Vector3d p; - double x = 0.5; - - verts.resize(4); - - // Create top face - p.set(cvmax[0], cvmax[1], cvmax[2]); verts[0] = p; - p.set(cvmax[0], cvmax[1], cvmin[2]); verts[1] = p; - p.set(cvmin[0], cvmax[1], cvmin[2]); verts[2] = p; - p.set(cvmin[0], cvmax[1], cvmax[2]); verts[3] = p; - cube->createFace(verts); - DLFLFacePtr fp1 = cube->lastFace(); - - // Create bottom face - p.set(cvmax[0], cvmin[1], cvmax[2]); verts[0] = p; - p.set(cvmin[0], cvmin[1], cvmax[2]); verts[1] = p; - p.set(cvmin[0], cvmin[1], cvmin[2]); verts[2] = p; - p.set(cvmax[0], cvmin[1], cvmin[2]); verts[3] = p; - cube->createFace(verts); - DLFLFacePtr fp2 = cube->lastFace(); - - // fp1 and fp2 will be inward facing - // Connect them using the first corners in each - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fp1->firstVertex(); fvp2 = fp2->firstVertex(); - connectFaces(cube, fvp1, fvp2); - - for (int j = 0; jcomputeNormal(); - peelByPlane(cube, normal, vp->getCoords()); - } - - return cube; -} - -void peelByPlane(DLFLObjectPtr obj, Vector3d normal, Vector3d P0) -{ - DLFLVertexPtr vp1, vp2, vnew; - normal = normalized(normal); - - DLFLEdgePtrArray edgestodel, edges; - DLFLEdgePtr ep; - DLFLFaceVertexPtrArray corner_list, newcorners; - - Vector3d p1, p2, pnew; - float d1, d2; - int c = 0; - - edgestodel.clear(); edges.clear(); - - obj->getEdges(edges); - float EPS = 0.000001; - - //check interssection of all edges w slicing plane - for (int i = 0; igetVertexPointers(vp1, vp2); - p1 = vp1->getCoords(); - p2 = vp2->getCoords(); - float d1 = normal*(p1 - P0); - float d2 = normal*(p2 - P0); - - //if both vertices of the edge are on (+) side - if ((d1>0) && (d2>0)) - edgestodel.push_back(ep); - - //if one end is - one end is + - if (((d1*d2)<0) || ((d1>0) && (d2 == 0)) || ((d1 == 0) && (d2>0))) - { - vnew = subdivideEdge(obj, ep); - if (d1>0) - edgestodel.push_back(vnew->getEdgeTo(vp1)); - else - edgestodel.push_back(vnew->getEdgeTo(vp2)); - - //make planar - pnew = vnew->getCoords(); - Vector3d ne = normalized(p2 - p1); - float t = (normal * (P0 - pnew)) / (normal * ne); - vnew->setCoords(pnew + ne*t); - - vnew->getFaceVertices(corner_list); - newcorners.push_back(corner_list.at(0)); - newcorners.push_back(corner_list.at(1)); - } - } - DLFLFaceVertexPtr cp1, cp2; - - for (int i = 0; igetFacePtr() == cp2->getFacePtr()) - { - insertEdge(obj, cp1, cp2); - continue; - } - } - } - - for (int i = 0; iisVisited) return; - vp->isVisited = true; - Vector3d p1 = vp->getCoords(); - float d1 = normal*(p1 - P0); - //if (d1<0) return; - DLFLEdgePtrArray vedges; - if (vp) - { - vp->getEdges(vedges); - int size = vedges.size(); - - //check interssection of all edges w slicing plane - for (int i = 0; iisVisited) continue; - ep->isVisited = true; - DLFLVertexPtr evp1, evp2, vp2; - ep->getVertexPointers(evp1, evp2); - vp2 = (vp == evp1) ? evp2 : evp1; - Vector3d p2 = vp2->getCoords(); - float d2 = normal*(p2 - P0); - - //if both vertices of the edge are on (+) side - if ((d1>0) && (d2>0)) - { - //ep->istodel = 1; - edges2del[e2dsize++] = ep; - visitVertex(obj, vp2, ep, normal, P0); - } - - //if (ep->istodel) continue; - //if one end is - one end is + - if (((d1*d2)<0) || ((d1>0) && (d2 == 0)) || ((d1 == 0) && (d2>0))) - { - int id = getCutIndex(ep); - DLFLVertexPtr vnew = subdivideEdge(obj, ep); - if (d1>0) - { - //vnew->getEdgeTo(vp)->istodel = 1; - edges2del[e2dsize++] = vnew->getEdgeTo(vp); - if (id != -1) - { - sedges[id] = vnew->getEdgeTo(vp2); - sverts[id] = vnew; - } - - } - else - { - //fillet - //vnew->getEdgeTo(vp2)->istodel = 1; - //edges2del[e2dsize++] = vnew->getEdgeTo(vp2); - } - //make planar - Vector3d pnew = vnew->getCoords(); - Vector3d ne = normalized(p2 - p1); - float t = (normal * (P0 - pnew)) / (normal * ne); - vnew->setCoords(pnew + ne*t); - DLFLFaceVertexPtrArray fvlist; - vnew->getFaceVertices(fvlist); - newcorners[ncsize++] = fvlist.at(0); - newcorners[ncsize++] = fvlist.at(1); - } - } - } -} - -void localCut(DLFLObjectPtr obj, DLFLVertexPtr vp, Vector3d normal, Vector3d P0) -{ - if (!vp) return; - DLFLVertexPtrArray verts; - DLFLEdgePtrArray edges; - obj->getVertices(verts); - obj->getEdges(edges); - - for (int i = 0; iisVisited = 0; - - for (int i = 0; iisVisited = 0; - - int size = obj->num_edges(); - newcorners = new DLFLFaceVertexPtr[size]; - edges2del = new DLFLEdgePtr[size]; - e2dsize = 0; - ncsize = 0; - visitVertex(obj, vp, 0, normal, P0); - - //connect new corners - DLFLFaceVertexPtr cp1, cp2; - for (int i = 0; igetFacePtr() == cp2->getFacePtr()) - { - insertEdge(obj, cp1, cp2); - continue; - } - } - } - - //delete edges - for (int i = 0; iisDummy = false; - } - - for (int i = 0; iisDummy = true; - } - } - } - - for (int i = 0; iisVisited=0; -// -// int size = obj->num_edges(); -// newcorners = new DLFLFaceVertexPtr[size]; -// edges2del = new DLFLEdgePtr[size]; -// e2dsize=0; -// ncsize=0; -// obj->visitVertex(vp,0,normal,P0); -// -// //connect new corners -// DLFLFaceVertexPtr cp1,cp2; -// for(int i =0; igetFacePtr() == cp2->getFacePtr() ){ -// insertEdge(cp1,cp2); -// continue; -// } -// } -// } -// -// //delete edges -// for(int i=0;igetEdges(edges); - obj->getVertices(verts); - obj->getFaces(faces); - int esize = edges.size(); - int vsize = verts.size(); - int fsize = faces.size(); - int totalsize = esize + vsize + fsize; - locs = new Vector3d[totalsize]; - norms = new Vector3d[totalsize]; - sverts = new DLFLVertexPtr[totalsize]; - sedges = new DLFLEdgePtr[esize]; - - //this loops through all edges??? why? - for (int i = 0; iisMarked)) || (type == 201)) continue; - - DLFLVertexPtr v1, v2, v; - e->getVertexPointers(v1, v2); - - int vnum = 0; - Vector3d * vlocs = new Vector3d[v1->valence() + v2->valence()]; - - for (int j = 0; j<2; j++) - { - v = (j) ? v2 : v1; - DLFLEdgePtrArray vedges; - v->getEdges(vedges); - for (int k = 0; kgetVertexPointers(ev1, ev2); - if (ev2 == v) - { - ev2 = ev1; - ev1 = v; - } - vlocs[vnum++] = (ev2->getCoords() - ev1->getCoords())*offsetE + ev1->getCoords(); - } - } - - //calculate the normal and position - Vector3d vecp, vec, n(0, 0, 0), nprev, norm(0, 0, 0), mid(0, 0, 0); - for (int j = 0; jgetFacePointers(f1, f2); - norms[cutcount] = normalized(f1->computeNormal() + f2->computeNormal()); - locs[cutcount] = mid; - sverts[cutcount] = v1; - sedges[cutcount] = e; - cutcount++; - } - - //loop through all vertices - for (int i = 0; iisMarked) || (type == 200)) - continue; - - DLFLEdgePtrArray vedges; - vp->getEdges(vedges); - - int vnum = 0; - Vector3d * vlocs = new Vector3d[vp->valence()]; - - for (int k = 0; kgetVertexPointers(ev1, ev2); - if (ev2 == vp) - { - ev2 = ev1; - ev1 = vp; - } - vlocs[vnum++] = (ev2->getCoords() - ev1->getCoords())*offsetV + ev1->getCoords(); - } - - //calculate the normal and position for bevelling - Vector3d vecp, vec, n(0, 0, 0), nprev, norm(0, 0, 0), mid(0, 0, 0); - for (int j = 0; jcomputeNormal(); - locs[cutcount] = mid; - sverts[cutcount] = vp; - cutcount++; - } - - //cut by face mode - if (type == 203) - { - //loop through all faces - for (int i = 0; iisMarked) - continue; - - DLFLVertexPtrArray fverts; - DLFLFaceVertexPtrArray fcorners; - DLFLVertexPtr v; - int vnum = 0; - fp->getCorners(fcorners); - - for (int j = 0; jgetVertexPtr()); - } - - Vector3d * vlocs = new Vector3d[fverts.size() * 10]; - - for (int j = 0; jgetEdges(vedges); - - for (int k = 0; kgetFacePointers(ef1, ef2); - if ((ef1 == fp) || (ef2 == fp)) continue; - DLFLVertexPtr ev1, ev2; - ve->getVertexPointers(ev1, ev2); - if (ev2 == v) - { - ev2 = ev1; - ev1 = v; - } - vlocs[vnum++] = (ev2->getCoords() - ev1->getCoords())*offsetV + ev1->getCoords(); - } - } - - - //calculate the normal and position for beveling - Vector3d vecp, vec, n(0, 0, 0), nprev, norm(0, 0, 0), mid(0, 0, 0); - for (int j = 0; jcomputeNormal(); - locs[cutcount] = mid; - float dmax = -999; - DLFLVertexPtr vp = nullptr; - DLFLVertexPtr svp = nullptr; - for (int j = 0; jgetCoords() - mid); - // printf("d:%f\n",d); - if (d>dmax) - { - dmax = d; - svp = vp; - } - } - sverts[cutcount] = svp; - cutcount++; - } - }//end if type == 203 - - for (int i = 0; i::iterator vit; - vector::iterator eit, eit2; - vector::iterator fit, fit2; - DLFLFacePtrArray sfptrarr = obj->sel_fptr_array; - - DLFLEdgePtrArray edges; - DLFLVertexPtrArray verts; - DLFLFacePtrArray faces; - - cutcount = 0; - int vcount = 0; - int num = 0; - - Vector3d * locs, *norms; - obj->getEdges(edges); - obj->getVertices(verts); - obj->getFaces(faces); - int esize = edges.size(); - int vsize = verts.size(); - int fsize = faces.size(); - int totalsize = esize + vsize + fsize; - locs = new Vector3d[totalsize]; - norms = new Vector3d[totalsize]; - sverts = new DLFLVertexPtr[totalsize]; - sedges = new DLFLEdgePtr[esize]; - - - //loop through all faces - for (fit = sfptrarr.begin(); fit != sfptrarr.end(); fit++, cutcount++) - { - // std::cout << "in side selected face loop!\n"; - sverts[cutcount] = 0; - - DLFLVertexPtrArray fverts; - DLFLFaceVertexPtrArray fcorners; - DLFLVertexPtr v; - int vnum = 0; - (*fit)->getCorners(fcorners); - - for (int j = 0; jgetVertexPtr()); - } - - Vector3d * vlocs = new Vector3d[fverts.size() * 10]; - - for (int j = 0; jgetEdges(vedges); - - for (int k = 0; kgetFacePointers(ef1, ef2); - if ((ef1 == (*fit)) || (ef2 == (*fit))) continue; - DLFLVertexPtr ev1, ev2; - ve->getVertexPointers(ev1, ev2); - if (ev2 == v) - { - ev2 = ev1; - ev1 = v; - } - vlocs[vnum++] = (ev2->getCoords() - ev1->getCoords())*offsetV + ev1->getCoords(); - } - } - - //calculate the normal and position for beveling - Vector3d vecp, vec, n(0, 0, 0), nprev, norm(0, 0, 0), mid(0, 0, 0); - for (int j = 0; jcomputeNormal(); - locs[cutcount] = mid; - float dmax = -999; - DLFLVertexPtr vp = nullptr; - DLFLVertexPtr svp = nullptr; - for (int j = 0; jgetCoords() - mid); - // printf("d:%f\n",d); - if (d>dmax) - { - dmax = d; - svp = vp; - } - } - sverts[cutcount] = svp; - } - - for (int i = 0; i::iterator vit; - vector::iterator eit, eit2; - DLFLEdgePtrArray septrarr = obj->sel_eptr_array; - - DLFLEdgePtrArray edges; - DLFLVertexPtrArray verts; - DLFLFacePtrArray faces; - - cutcount = 0; - int vcount = 0; - int num = 0; - - Vector3d * locs, *norms; - obj->getEdges(edges); - obj->getVertices(verts); - obj->getFaces(faces); - int esize = edges.size(); - int vsize = verts.size(); - int fsize = faces.size(); - int totalsize = esize + vsize + fsize; - locs = new Vector3d[totalsize]; - norms = new Vector3d[totalsize]; - sverts = new DLFLVertexPtr[totalsize]; - sedges = new DLFLEdgePtr[esize]; - - //this loops through all edges??? why? - for (eit = septrarr.begin(); eit != septrarr.end(); eit++, cutcount++) - { - sverts[cutcount] = 0; - - DLFLVertexPtr vp1, vp2, v; - (*eit)->getVertexPointers(vp1, vp2); - - int vnum = 0; - Vector3d * vlocs = new Vector3d[vp1->valence() + vp2->valence()]; - - for (int j = 0; j<2; j++) - { - v = (j) ? vp2 : vp1; - DLFLEdgePtrArray vedges; - v->getEdges(vedges); - - for (eit2 = vedges.begin(); eit2 != vedges.end(); eit2++) - { - if ((*eit2) == (*eit)) continue; - DLFLVertexPtr ev1, ev2; - (*eit2)->getVertexPointers(ev1, ev2); - if (ev2 == v) - { - ev2 = ev1; - ev1 = v; - } - vlocs[vnum++] = (ev2->getCoords() - ev1->getCoords())*offsetE + ev1->getCoords(); - } - } - - //calculate the normal and position - Vector3d vecp, vec, n(0, 0, 0), nprev, norm(0, 0, 0), mid(0, 0, 0); - for (int j = 0; jgetFacePointers(f1, f2); - norms[cutcount] = normalized(f1->computeNormal() + f2->computeNormal()); - locs[cutcount] = mid; - sverts[cutcount] = vp1; - sedges[cutcount] = (*eit); - // cutcount++; - } - - - for (int i = 0; i::iterator vit; - vector::iterator eit; - DLFLVertexPtrArray svptrarr = obj->sel_vptr_array; - - DLFLEdgePtrArray edges; - DLFLVertexPtrArray verts; - DLFLFacePtrArray faces; - - cutcount = 0; - int vcount = 0; - int num = 0; - - Vector3d * locs, *norms; - obj->getEdges(edges); - obj->getVertices(verts); - obj->getFaces(faces); - int esize = edges.size(); - int vsize = verts.size(); - int fsize = faces.size(); - int totalsize = esize + vsize + fsize; - locs = new Vector3d[totalsize]; - norms = new Vector3d[totalsize]; - sverts = new DLFLVertexPtr[totalsize]; - sedges = new DLFLEdgePtr[esize]; - - //loop through all selected vertices - cutcount = 0; - for (vit = svptrarr.begin(); vit != svptrarr.end(); vit++, cutcount++) - { - sverts[cutcount] = 0; - - DLFLEdgePtrArray vedges; - (*vit)->getEdges(vedges); - - int vnum = 0; - Vector3d * vlocs = new Vector3d[(*vit)->valence()]; - - //loop through the edges for the current vertex - for (eit = vedges.begin(); eit != vedges.end(); eit++) - { - // DLFLEdgePtr ep = vedges.at(k); - DLFLVertexPtr vp1, vp2; - (*eit)->getVertexPointers(vp1, vp2); - //swap the vertex pointers if necessary - if (vp2 == (*vit)) - { - vp2 = vp1; - vp1 = (*vit); - } - vlocs[vnum++] = (vp2->getCoords() - vp1->getCoords())*offsetV + vp1->getCoords(); - } - - //calculate the normal and position for bevelling - Vector3d vecp, vec, n(0, 0, 0), nprev, norm(0, 0, 0), mid(0, 0, 0); - for (int j = 0; jcomputeNormal(); - locs[cutcount] = mid; - sverts[cutcount] = (*vit); - } - - for (int i = 0; igetEdges(vedges); - for (int j = 0; j < vedges.size(); j++) - { - if (vedges.at(j)->isDummy) - return true; - } - return false; -} - -void autoMarkEdges(DLFLObjectPtr obj) -{ - DLFLEdgePtrArray edges; - DLFLVertexPtr vp, vp1, vp2; - DLFLEdgePtrArray vedges; - DLFLVertexPtrArray verts; - DLFLEdgePtr ep; - int E = 1; - if (E) - { - obj->getEdges(edges); - //sort edge list from big to small - DLFLEdgePtr emax, e, etmp; - int size = edges.size(); - vector sorted(size); - - for (int i = 0; i= 0 && sorted[i]->length() < e->length(); i--) - sorted[i + 1] = sorted[i]; - sorted[i + 1] = e; - } - //sort edges - for (int i = 0; iisDummy) - continue; - ep->getVertexPointers(vp1, vp2); - if (isMarked(vp1) || isMarked(vp2)) - continue; - - ep->isDummy = true; - } - } - else - { - obj->getVertices(verts); - for (int i = 0; igetEdges(vedges); - for (int j = 0; jisDummy) - continue; - ep->getVertexPointers(vp1, vp2); - if (isMarked(vp1) || isMarked(vp2)) - continue; - - ep->isDummy = true; - } - } - } -} - -int getCutIndex(DLFLVertexPtr vp) -{ - for (int i = 0; i -#include -#include -#include "DLFLConvexHull.h" - -namespace DLFL -{ - -static int s = 0; -static DLFLConvexHull * convexhull = nullptr; - -//new changes; these needs to be declared outside the function for local-cut -static DLFLVertexPtr * sverts; -static DLFLEdgePtr * sedges; -static int cutcount; -static DLFLFaceVertexPtr * newcorners; -static DLFLEdgePtr * edges2del; -// DLFLVertexPtr * sverts; -// DLFLEdgePtr * sedges; -// int cutcount; -static int e2dsize, ncsize; - -void createConvexHull(DLFLObjectPtr obj); - -void createDualConvexHull(DLFLObjectPtr obj); -DLFLObjectPtr createDualConvexHull(DLFLObjectPtr obj, const Vector3dArray &ovarray); - -void peelByPlane(DLFLObjectPtr obj, Vector3d normal, Vector3d P0); -void localCut(DLFLObjectPtr obj, DLFLVertexPtr vp, Vector3d normal, Vector3d P0); - -void performCutting(DLFLObjectPtr obj, int type, float offsetE, float offsetV, bool global, bool selected); -void cutSelectedFaces(DLFLObjectPtr obj, float offsetE, float offsetV, bool global = false, bool selected = false); -void cutSelectedEdges(DLFLObjectPtr obj, float offsetE, float offsetV, bool global = false, bool selected = false); -void cutSelectedVertices(DLFLObjectPtr obj, float offsetE, float offsetV, bool global = false, bool selected = false); - -bool isMarked(DLFLVertexPtr vp); -void autoMarkEdges(DLFLObjectPtr obj); -int getCutIndex(DLFLVertexPtr vp); -int getCutIndex(DLFLEdgePtr ep); - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLSubdiv.cc b/topmodx/include/dlflaux/DLFLSubdiv.cc deleted file mode 100644 index a18f559..0000000 --- a/topmodx/include/dlflaux/DLFLSubdiv.cc +++ /dev/null @@ -1,2676 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -#include "DLFLSubdiv.h" -#include -#include -#include "DLFLExtrude.h" -#include "DLFLConnect.h" - -namespace DLFL -{ - -void loopSubdivide(DLFLObjectPtr obj) -{ - // Perform Loop subdivision - - // For every edge compute the new point coordinates and store in the aux coord - DLFLEdgePtrList::iterator efirst, elast; - DLFLEdgePtr ep; - DLFLFaceVertexPtr fvp1, fvp2, fvp1p1, fvp1n2, fvp2p1, fvp2n2; - Vector3d p1, p2, p1p1, p1n2, p2p1, p2n2; - Vector3d newpt; - int num_old_edges = 0; - efirst = obj->beginEdge(); elast = obj->endEdge(); - while (efirst != elast) - { - ep = (*efirst); ++efirst; ++num_old_edges; - ep->getFaceVertexPointers(fvp1, fvp2); - fvp1p1 = fvp1->prev(); fvp1n2 = (fvp1->next())->next(); - fvp2p1 = fvp2->prev(); fvp2n2 = (fvp2->next())->next(); - p1 = fvp1->getVertexCoords(); p2 = fvp2->getVertexCoords(); - p1p1 = fvp1p1->getVertexCoords(); p2p1 = fvp2p1->getVertexCoords(); - p1n2 = fvp1n2->getVertexCoords(); p2n2 = fvp2n2->getVertexCoords(); - newpt = (p1 + p2)*3.0 / 8.0 + (p1p1 + p1n2 + p2p1 + p2n2)*1.0 / 16.0; - ep->setAuxCoords(newpt); - } - - // For every vertex compute the new point coordinates and adjust the coordinate - DLFLVertexPtrList::iterator vfirst, vlast; - DLFLVertexPtr vp; - DLFLFaceVertexPtrArray fvparray; - Vector3d op, p; - int valence, num_old_verts = 0; - double beta; - vfirst = obj->beginVertex(); vlast = obj->endVertex(); - while (vfirst != vlast) - { - vp = (*vfirst); ++vfirst; ++num_old_verts; - vp->getFaceVertices(fvparray); - valence = fvparray.size(); - if (valence > 0) - { - p = vp->coords; - op.reset(); - for (int i = 0; i < valence; ++i) - op += (fvparray[i]->next())->getVertexCoords(); - - beta = (0.625 - sqr(0.375 + 0.25 * cos(2.0*M_PI / double(valence)))) / double(valence); - - vp->coords = op * beta + (1.0 - valence*beta)*p; - } - } - - // Subdivide each old edge and set coordinate of new point to be the aux coord - int count = 0; - efirst = obj->beginEdge(); elast = obj->endEdge(); - while (efirst != elast && count < num_old_edges) - { - ep = (*efirst); ++efirst; ++count; - newpt = ep->getAuxCoords(); ep->resetAuxCoords(); - vp = subdivideEdge(obj, ep); vp->coords = newpt; - } - - // Connect newly created midpoints in each face - // Go through all old vertices (before edge subdivision) and - // go through all corners for each vertex and connect previous and next corners - vfirst = obj->beginVertex(); vlast = obj->endVertex(); - count = 0; - while (vfirst != vlast && count < num_old_verts) - { - vp = (*vfirst); ++vfirst; ++count; - vp->getFaceVertices(fvparray); - for (int i = 0; i < fvparray.size(); ++i) - insertEdge(obj, fvparray[i]->prev(), fvparray[i]->next()); - } -} - -void checkerBoardRemeshing(DLFLObjectPtr obj, double thickness) -{ - // Create a checkerboard remeshing for entire object. - // The code is similar to that for creating the remeshing faces for the Menger Sponge - // Thickness is a fraction of the edge length for each edge - // It should be between 0.0 and 0.5. Values outside this range will produce weird results - // Boundary values produce coincident vertices. - // If thickness is negative a default value of 0.25 is assumed - // If thickness is > 0.5 it is clamped to 0.5 - if (thickness < 0.0) thickness = 0.25; - if (thickness > 0.5) thickness = 0.5; - - // Use the extrudeFacePlanarOffset method to create the central faces for each original face - int num_old_verts = obj->num_vertices(); - int num_old_faces = obj->num_faces(); - int num_old_edges = obj->num_edges(); - int count; - DLFLFacePtrList::iterator ffirst, flast; - DLFLFacePtr fp; - - ffirst = obj->beginFace(); flast = obj->endFace(); - count = 0; - while (ffirst != flast && count < num_old_faces) - { - fp = (*ffirst); ++ffirst; ++count; - extrudeFacePlanarOffset(obj, fp, 0, 0, thickness, true); - } - - // Trisect all the old edges using the same fractional thickness - // Set the type of the new points for use later - DLFLEdgePtrList::iterator efirst = obj->beginEdge(); - DLFLEdgePtr ep; - count = 0; - while (count < num_old_edges) - { - ep = (*efirst); ++efirst; ++count; - trisectEdge(obj, ep, thickness*ep->length(), false, true); - } - - // Complete the remeshing by inserting edges - // Go through all the old vertices (before extrude and trisect) - // For each vertex, go through the face-vertex list. For each face-vertex - // in that list, connect the previous and next face-vertices with an edge - // After doing that, find edges which do not connect to the points created - // by trisection and delete them - DLFLVertexPtrList::iterator vfirst, vlast; - DLFLVertexPtr vp, ovp; - DLFLFaceVertexPtrArray fvparray; - DLFLFaceVertexPtr fvp; - DLFLEdgePtrArray eparray; - - vfirst = obj->beginVertex(); vlast = obj->endVertex(); - count = 0; - while (count < num_old_verts) - { - vp = (*vfirst); ++vfirst; ++count; - vp->getFaceVertices(fvparray); - for (int i = 0; i < fvparray.size(); ++i) - { - fvp = fvparray[i]; - insertEdgeCoFacial(obj, fvp->prev(), fvp->next()); - } - vp->getEdges(eparray); - for (int i = 0; i < eparray.size(); ++i) - { - ep = eparray[i]; - ovp = ep->getOtherVertexPointer(vp); - if (ovp->getType() != VTNewPoint) deleteEdge(obj, ep); - else ovp->resetType(); // Reset the type to avoid complications in subsequent operations - } - } -} - -void simplestSubdivide(DLFLObjectPtr obj) -{ - // Simplest subdivision (halfway) - - // Keep track of number of old vertices before edges are subdivided - int num_old_verts = obj->num_vertices(); - - // Subdivide all the edges. - subdivideAllEdges(obj); - - // All old edges will have to be deleted after new edges have been inserted - // Keep track of number of old edges before we insert any new edges - int num_old_edges = obj->num_edges(); - - // Go through vertex list. For all old vertices (before edge subdivision) - // go through the face-vertex list and insert edges between previous and - // next corners to each face-vertex. - - DLFLVertexPtrList::iterator vl_first, vl_last; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - - DLFLFaceVertexPtrList fvplist; - DLFLFaceVertexPtrList::iterator fvp_first, fvp_last; - DLFLFaceVertexPtr fvp1, fvp2; - DLFLMaterialPtr matl = (obj->firstFace())->material(); - int num_verts = 0; - while (vl_first != vl_last && num_verts < num_old_verts) - { - fvplist = (*vl_first)->getFaceVertexList(); ++vl_first; ++num_verts; - - fvp_first = fvplist.begin(); fvp_last = fvplist.end(); - while (fvp_first != fvp_last) - { - fvp2 = fvp1 = (*fvp_first); ++fvp_first; - - // Insert an edge between previous and next corners - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - insertEdge(obj, fvp1, fvp2, false, matl); - } - } - - // Delete the old edges - DLFLEdgePtrList::iterator el_first = obj->beginEdge(); - DLFLEdgePtrList::iterator el_last = obj->endEdge(); - DLFLEdgePtr ep = nullptr; - int num_edges = 0; - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - deleteEdge(obj, ep, true); - } -} - -void vertexCuttingSubdivide(DLFLObjectPtr obj, double offset) -{ - // Vertex-cutting subdivision - - // If the offset is 0.5 this is the same as simplest subdivision - if (offset == 0.5) - { - simplestSubdivide(obj); - return; - } - - // Subdivision makes sense only if the offset is non-zero - if (isNonZero(offset) == false) return; - - // Keep track of number of old vertices before edges are subdivided - int num_old_verts = obj->num_vertices(); - - // Go through edge list and sub-divide all the old edges - // into 3 parts using the offset parameter for the length ratio - DLFLEdgePtrList::iterator first = obj->beginEdge(); - DLFLEdgePtr ep; - int num_edges = 0, num_old_edges = obj->num_edges(); - Vector3d p1, p2; - DLFLVertexPtr vp; - - while (num_edges < num_old_edges) - { - ep = (*first); ++first; ++num_edges; - - // Get end points (coordinates) of the edge - ep->getEndPoints(p1, p2); - - // Subdivide the edge once and set coordinates of new point - vp = subdivideEdge(obj, ep); vp->coords = p1 + offset*(p2 - p1); - - // Get the last edge from the edge list. - // This will be the edge connected to the second vertex, p2 - ep = obj->lastEdge(); - - // Subdivide this edge and set coordinates of new point - vp = subdivideEdge(obj, ep); vp->coords = p2 + offset*(p1 - p2); - } - - - // Go through vertex list. For all old vertices (before edge subdivision) - // go through the face-vertex list and insert edges between previous and - // next corners to each face-vertex. - // All old corner edges will have to be deleted after new edges have been inserted - - DLFLVertexPtrList::iterator vl_first, vl_last; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - - DLFLFaceVertexPtrList fvplist; - DLFLFaceVertexPtrList::iterator fvp_first, fvp_last; - DLFLFaceVertexPtr fvp1, fvp2; - DLFLMaterialPtr matl = (obj->firstFace())->material(); - int num_verts = 0; - - while (vl_first != vl_last && num_verts < num_old_verts) - { - vp = *vl_first; ++vl_first; ++num_verts; - - fvplist = vp->getFaceVertexList(); - fvp_first = fvplist.begin(); fvp_last = fvplist.end(); - while (fvp_first != fvp_last) - { - fvp2 = fvp1 = (*fvp_first); ++fvp_first; - - // Insert an edge between previous and next corners - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - insertEdge(obj, fvp1, fvp2, false, matl); - } - - // Delete the old corner edges - DLFLEdgePtr * ep = nullptr; - num_edges = vp->getEdges(&ep); - - for (int i = 0; i < num_edges; i++) - deleteEdge(obj, ep[i], true); - delete[] ep; - } -} - -void pentagonalSubdivide2(DLFLObjectPtr obj, double scale_factor) -{ - // Pentagonal subdivision - Version 2 - - // First sub-divide all edges in the object. - // Type flag NEED NOT be set for new vertices - // The head pointer in each face will not change during edge subdivision - // So we don't need to use the type flag. - subdivideAllEdges(obj, 2, false); - - // Go through each face and create a new face within each face using the - // midpoints of the old edges, i.e. the newly created points after above - // subdivision of all edges - - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp, ifp; - DLFLFaceVertexPtr head, fvp, ifvp; - DLFLFaceVertexPtrArray fvplist1, fvplist2; // List of face-vertices which have to be connected - int num_faces, num_old_faces, face_valence; - Vector3dArray vertex_coords; - - // Reserve space in the two arrays for making connections. The size will be twice the number - // of original edges. i.e. number of edges after subdividing all edges - int num_edges = obj->num_edges(); - fvplist1.reserve(num_edges); fvplist2.reserve(num_edges); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - num_old_faces = obj->num_faces(); num_faces = 0; - // New faces will be created in the loop, so make sure those aren't traversed - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); - - // If a face had less than 3 sides originally we don't include it. - face_valence = fp->size(); - if (face_valence >= 6) - { - // Start from a new vertex - // The head of a face will always be an old vertex since edge subdivision - // does not change the head pointer of any face - head = fp->front(); head = head->next(); - - // Collect coordinates of alternate vertices starting from fvp - // for creating the new face - vertex_coords.clear(); - vertex_coords.reserve(face_valence / 2); - fvp = head; - vertex_coords.push_back(fvp->getVertexCoords()); - fvp = fvp->next(); fvp = fvp->next(); - while (fvp != head) - { - vertex_coords.push_back(fvp->getVertexCoords()); - fvp = fvp->next(); fvp = fvp->next(); - } - - // Scale the coordinates of the new face by given scale factor - scale(vertex_coords, scale_factor); - - // Create the new face from the collected and scaled midpoints - obj->createFace(vertex_coords); - - // Find the inward facing face of the two newly created ones - ifp = obj->lastFace(); - - // Go through original face and the newly created inward facing face - // and store corners in the array for making connections afterwards. - // Only corners which are tagged as new in the old face will be used - // We can reuse the 'head' variable initialized above - // ifp has to be traversed in the reverse direction - // Reset the type of fvp so it doesn't affect other algorithms later on - fvp = head; ifvp = ifp->front(); - fvplist1.push_back(fvp); fvplist2.push_back(ifvp); - fvp->resetType(); - fvp = fvp->next(); fvp = fvp->next(); ifvp = ifvp->prev(); - while (fvp != head) - { - fvplist1.push_back(fvp); fvplist2.push_back(ifvp); - fvp->resetType(); - fvp = fvp->next(); fvp = fvp->next(); ifvp = ifvp->prev(); - } - } - ++fl_first; ++num_faces; - } - - // Go through fvplist1 and fvplist2 and insert edges between corresponding face-vertices - for (int i = 0; i < fvplist1.size(); ++i) - { - if (fvplist1[i] != nullptr && fvplist2[i] != nullptr) - insertEdge(obj, fvplist1[i], fvplist2[i]); - else - cout << "nullptr pointers found! i = " << i << " " - << fvplist1[i] << " " << fvplist2[i] << endl; - } -} - -void pentagonalSubdivide(DLFLObjectPtr obj, double offset) -{ - // Pentagonal subdivision - - // Commonly used variables - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - DLFLVertexPtr vp; - int num_faces, num_old_faces; - - // First compute the coordinates of the new points and store them in the aux-coords - // fields of each entity (vertex, edge, face) - - // Go through each face and compute the centroid and store it in the aux-coords field - // Do the makeUnique also to make sure Face IDs are consecutive - Vector3d cen; - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last) - { - fp = (*fl_first); ++fl_first; ++num_faces; - cen = fp->geomCentroid(); - fp->setAuxCoords(cen); fp->makeUnique(); - } - - // Subdivide all the edges into 3 equal parts. - subdivideAllEdges(obj, 3); - - - // Create point-spheres for each old Face. Insert edges between the point-sphere and - // every other new vertex (created by edge subdivision) in each old face. - // Also adjust the coordinates of the new vertices based on the offset. - - DLFLEdgePtr lastedge; - DLFLFacePtr fptr1; - DLFLFaceVertexPtr fvp1, fvp2; - int numsides1; - bool done; - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - num_old_faces = num_faces; num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - - cen = fp->getAuxCoords(); - fvp1 = obj->createPointSphere(cen, fp->material()); - - // Get corner following the first corner in the face - // The first corner will always be an old vertex of the face - // Thus the corner following it will always be a new vertex - // Adjacent faces will never use the same new vertex in an edge - // because of the consistent rotation order - - fvp2 = (fp->firstVertex())->next(); - - // Insert an edge between the point-sphere and the new corner - // NOTE: Make sure point-sphere corner is given first - lastedge = insertEdgeNonCoFacial(obj, fvp1, fvp2); - - done = false; - while (!done) - { - fvp1 = lastedge->getFaceVertexPtr1(); - - // Get face in which fvp1 is there. This will always be the face - // in which the next edge has to be inserted because the point-sphere corner - // is always specified first in the insertEdge call - fptr1 = fvp1->getFacePtr(); numsides1 = fptr1->size(); - - // If the face has more than 5 sides insert another edge - if (numsides1 > 5) - { - fvp2 = fvp1->next(); - - // Update the position of the new vertex referred to by fvp2 - vp = fvp2->getVertexPtr(); - vp->coords += (cen - vp->coords)*offset; - - // Skip the next two corners to get the corner for next edge insertion - fvp2 = fvp2->next(); fvp2 = fvp2->next(); fvp2 = fvp2->next(); - - // Make sure point-sphere corner is specified first - lastedge = insertEdgeCoFacial(obj, fvp1, fvp2, false); - } - else - { - // All edges in this face have been inserted. - done = true; - } - } - } -} - -void honeycombSubdivide(DLFLObjectPtr obj) -{ - // Honey-comb subdivision - - // Go through list of faces and create the inner faces for each face - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFacePtr fp, ifp; - Vector3dArray vertex_coords, new_vertex_coords; - int num_verts, num_faces, num_edges; - int num_old_verts, num_old_faces, num_old_edges; - Vector3d p1, p2, p; - Vector3d * midpoints = nullptr; - DLFLFaceVertexPtrArray fvplist1, fvplist2; // List of face-vertices which have to be connected - DLFLFaceVertexPtr fvp1, fvp2, head1, head2; - DLFLEdgePtr ep; - DLFLVertexPtr vp; - int edgeindex, eistart; - - num_old_verts = obj->num_vertices(); - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - // Apply make-unique on the obj->num_edges to make sure all Edge IDs are consecutive - obj->makeEdgesUnique(); - - // Reserve and create num_old_edges entries in the 2 temporary lists - fvplist1.resize(num_old_edges, nullptr); - fvplist2.resize(num_old_edges, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - - // For each old face create new faces and update the 2 temporary lists using the edge IDs - // as index in the lists - fl_first = obj->beginFace(); fl_last = obj->endFace(); - num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); - - fp->getVertexCoords(vertex_coords); - num_verts = vertex_coords.size(); - - // Find mid-points of all the edges in this face and store them - midpoints = new Vector3d[num_verts]; - new_vertex_coords.reserve(num_verts); - for (int i = 0; i < num_verts; ++i) - { - p1 = vertex_coords[i]; - if (i == num_verts - 1) - p2 = vertex_coords[0]; - else - p2 = vertex_coords[i + 1]; - midpoints[i] = (p1 + p2) / 2.0; - } - - // Now using the mid-points compute new coordinates for the new polygon - double coef, alpha; - for (int i = 0; i < num_verts; ++i) - { - p.reset(); - for (int j = 0; j < num_verts; ++j) - { - alpha = M_SQRT1_2 - 0.25 + 5.0 / (4.0*num_verts); - if (i == j) coef = alpha; - else coef = (1.0 - alpha) * (3.0 + 2.0*cos(2.0*(i - j)*M_PI / num_verts)) / (3.0*num_verts - 5.0); - p += coef*midpoints[j]; - } - new_vertex_coords.push_back(p); - } - - obj->createFace(new_vertex_coords); - - delete[] midpoints; midpoints = nullptr; - new_vertex_coords.clear(); - vertex_coords.clear(); - - // Get second newly inserted face - the one which is facing inwards - ifp = obj->lastFace(); - - // Go through current face and ifp and store the face-vertices in the - // array of corners to make connections afterwards. Array is indexed - // using the ID of the edge starting at each corner of the old face - // offset to start at 0 using num_edges - // ifp has to be traversed in the reverse direction - - fvp1 = head1 = fp->front(); fvp2 = head2 = ifp->front(); - - ep = fvp1->getEdgePtr(); edgeindex = ep->getID() - eistart; - if (fvplist1[edgeindex] == nullptr) fvplist1[edgeindex] = fvp2; - else fvplist2[edgeindex] = fvp2; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - - while (fvp1 != head1 && fvp2 != head2) - { - ep = fvp1->getEdgePtr(); edgeindex = ep->getID() - eistart; - if (fvplist1[edgeindex] == nullptr) fvplist1[edgeindex] = fvp2; - else fvplist2[edgeindex] = fvp2; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - } - ++fl_first; ++num_faces; - } - - // Go through the face_list,obj->num_edges and vertex_list and - // destroy all the old faces, edges and vertices - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - obj->removeFace(fp); delete fp; - } - - num_edges = 0; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - obj->removeEdge(ep); delete ep; - } - - num_verts = 0; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - obj->removeVertex(vp); delete vp; - } - - // Go through fvplist1 and fvplist2 and insert edges between corresponding face-vertices - for (int i = 0; i < num_old_edges; ++i) - { - if (fvplist1[i] != nullptr && fvplist2[i] != nullptr) - insertEdge(obj, fvplist1[i], fvplist2[i]); - else - cout << "nullptr pointers found! i = " << i << " " - << fvplist1[i] << " " << fvplist2[i] << endl; - } -} - -bool dooSabinSubdivide(DLFLObjectPtr obj, bool check/*, QProgressDialog *progress*/) -{ - // Regular Doo-Sabin subdivision scheme - - // Go through list of faces and create new inner faces for each face - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFacePtr fp, ifp; - DLFLEdgePtrArray eplist1, eplist2; // List of edges to be connected - DLFLFaceVertexPtr fvp1, fvp2, head1, head2; - DLFLEdgePtr ep, iep; - DLFLVertexPtr vp; - Vector3dArray vertex_coords, new_vertex_coords; - Vector3d p; - int num_old_faces, num_old_edges, num_old_verts; - int num_faces, num_edges, num_verts; - int eistart, edgeindex; - // int progressvalue = 0; // progress bar test dave - - num_old_verts = obj->num_vertices(); - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - //testing qprogressbar - need to figure out a way to do this without putting qt - //into the dlfl libraries - // if (progress) { - // progress->setMaximum(num_old_faces*2+num_old_edges*2+num_old_verts); - // progress->setValue(progressvalue); - // } - - // Apply make-unique on the obj->num_edges to make sure all Edge IDs are consecutive - obj->makeEdgesUnique(); - - // Reserve and create num_old_edges entries in the 2 temporary lists - eplist1.resize(num_old_edges, nullptr); eplist2.resize(num_old_edges, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - // //update progress bar status - dave - // if (progress){ - // progress->setValue(progressvalue++); - // // QApplication::processEvents(); - // if (progress->wasCanceled()) - // return false; - // } - fp = (*fl_first); - - fp->getVertexCoords(vertex_coords); - - num_verts = vertex_coords.size(); - new_vertex_coords.reserve(num_verts); - - // Compute new coordinates for the new polygon - double coef; - for (int i = 0; i < num_verts; ++i) - { - p.reset(); - for (int j = 0; j < num_verts; ++j) - { - if (i == j) coef = 0.25 + 5.0 / (4.0*num_verts); - else coef = (3.0 + 2.0*cos(2.0*(i - j)*M_PI / num_verts)) / (4.0*num_verts); - p += coef*vertex_coords[j]; - } - new_vertex_coords.push_back(p); - } - obj->createFace(new_vertex_coords); - new_vertex_coords.clear(); vertex_coords.clear(); - - // Get the second newly inserted face, the one facing inwards - ifp = obj->lastFace(); - // Set type of inner face so we can use the type to - // determine which face to use for edge connects - ifp->setType(FTNew); - - // Go through current face and ifp and store the face-vertices in the - // array of corners to make connections afterwards. Array is indexed - // using the ID of the edge starting at each corner of the old face - // offset to start at 0 using num_edges - // ifp has to be traversed in the reverse direction starting at the back - - fvp1 = head1 = fp->front(); fvp2 = head2 = ifp->back(); - - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - - while (fvp1 != head1 && fvp2 != head2) - { - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - } - ++fl_first; ++num_faces; - } - - // Go through the face_list,obj->num_edges and vertex_list - // and destroy all the old faces, edges and vertices - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - //progress bar stuff - dave - // if (progress){ - // progress->setValue(progressvalue++); - // // QApplication::processEvents(); - // if (progress->wasCanceled()) - // return false; - // } - fp = (*fl_first); ++fl_first; ++num_faces; - obj->removeFace(fp); delete fp; - } - - num_edges = 0; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - //progress bar shit - dave - // if (progress){ - // progress->setValue(progressvalue++); - // // QApplication::processEvents(); - // if (progress->wasCanceled()) - // return false; - // } - - ep = (*el_first); ++el_first; ++num_edges; - obj->removeEdge(ep); delete ep; - } - - num_verts = 0; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_verts < num_old_verts) - { - //progress bar stuff - dave - // if (progress){ - // progress->setValue(progressvalue++); - // // QApplication::processEvents(); - // if (progress->wasCanceled()) - // return false; - // } - - vp = (*vl_first); ++vl_first; ++num_verts; - obj->removeVertex(vp); delete vp; - } - - // Go through eplist1,fplist1 and eplist2,fplist2 and connect corresponding half-edges - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr tfp1 = nullptr; - DLFLFacePtr tfp2 = nullptr; - for (int i = 0; i < num_old_edges; ++i) - { - //progress bar stuff - dave - // if (progress){ - // progress->setValue(progressvalue++); - // // QApplication::processEvents(); - // if (progress->wasCanceled()) - // return false; - // } - - if (eplist1[i] != nullptr && eplist2[i] != nullptr) - { - // Find the faces adjacent to the edges which are of type FTNew - // These will be the inner faces - eplist1[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp1 = tfp1; - else if (tfp2->getType() == FTNew) fp1 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - eplist2[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp2 = tfp1; - else if (tfp2->getType() == FTNew) fp2 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - connectEdgesWithoutLoopCheck(obj, eplist1[i], fp1, eplist2[i], fp2, check); - } - else - cout << "nullptr pointers found! i = " << i << " " - << eplist1[i] << " -- " << eplist2[i] << endl; - } - // //progress bar stuff - dave - // if (progress) - // progress->setValue(num_old_faces*2+num_old_edges*2+num_old_verts); - return true; -} - -void cornerCuttingSubdivide(DLFLObjectPtr obj, float alpha) -{ - // Corner-cutting subdivision scheme - // Tension parameter is calculated based on number of vertices in face - - // Go through list of faces and create new inner faces for each face - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFacePtr fp, ifp; - DLFLEdgePtrArray eplist1, eplist2; // List of edges to be connected - DLFLFaceVertexPtr fvp1, fvp2, head1, head2; - DLFLEdgePtr ep, iep; - DLFLVertexPtr vp; - Vector3dArray vertex_coords, new_vertex_coords; - Vector3d p; - int num_old_faces, num_old_edges, num_old_verts; - int num_faces, num_edges, num_verts; - int eistart, edgeindex; - - num_old_verts = obj->num_vertices(); - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - // Apply make-unique on the obj->num_edges to make sure all Edge IDs are consecutive - obj->makeEdgesUnique(); - - // Reserve and create num_old_edges entries in the 2 temporary lists - eplist1.resize(num_old_edges, nullptr); eplist2.resize(num_old_edges, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); - - fp->getVertexCoords(vertex_coords); - - num_verts = vertex_coords.size(); - new_vertex_coords.reserve(num_verts); - - // Compute new coordinates for the new polygon - double coef;//,alpha; - //alpha = 12.0/16.0; - for (int i = 0; i < num_verts; ++i) - { - p.reset(); - for (int j = 0; j < num_verts; ++j) - { - //alpha = 0.25 + 5.0/(4.0*num_verts); - if (i == j) coef = alpha; - else coef = (1.0 - alpha) * (3.0 + 2.0*cos(2.0*(i - j)*M_PI / num_verts)) / (3.0*num_verts - 5.0); - p += coef*vertex_coords[j]; - } - new_vertex_coords.push_back(p); - } - obj->createFace(new_vertex_coords); - new_vertex_coords.clear(); vertex_coords.clear(); - - // Get the second newly inserted face, the one facing inwards - ifp = obj->lastFace(); - // Set type of inner face so we can use the type to - // determine which face to use for edge connects - ifp->setType(FTNew); - - // Go through current face and ifp and store the face-vertices in the - // array of corners to make connections afterwards. Array is indexed - // using the ID of the edge starting at each corner of the old face - // offset to start at 0 using num_edges - // ifp has to be traversed in the reverse direction starting at the back - - fvp1 = head1 = fp->front(); fvp2 = head2 = ifp->back(); - - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - - while (fvp1 != head1 && fvp2 != head2) - { - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - } - ++fl_first; ++num_faces; - } - - // Go through the face_list,obj->num_edges and vertex_list and destroy all the old faces, edges and vertices - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - obj->removeFace(fp); delete fp; - } - - num_edges = 0; el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - obj->removeEdge(ep); delete ep; - } - - num_verts = 0; vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - obj->removeVertex(vp); delete vp; - } - - // Go through eplist1,fplist1 and eplist2,fplist2 and connect corresponding half-edges - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr tfp1 = nullptr; - DLFLFacePtr tfp2 = nullptr; - for (int i = 0; i < num_old_edges; ++i) - { - if (eplist1[i] != nullptr && eplist2[i] != nullptr) - { - // Find the faces adjacent to the edges which are of type FTNew - // These will be the inner faces - eplist1[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp1 = tfp1; - else if (tfp2->getType() == FTNew) fp1 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - eplist2[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp2 = tfp1; - else if (tfp2->getType() == FTNew) fp2 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - connectEdges(obj, eplist1[i], fp1, eplist2[i], fp2); - } - else - cout << "nullptr pointers found! i = " << i << " " - << eplist1[i] << " -- " << eplist2[i] << endl; - } -} - -void modifiedCornerCuttingSubdivide(DLFLObjectPtr obj, double thickness) -{ - // (Modified) Corner-cutting subdivision scheme - // Tension parameter is calculated based on number of vertices in face - - // Go through list of faces and create new inner faces for each face - DLFLFacePtrList::iterator fl_first, fl_last, fl_last_hole; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFacePtr fp, ifp; - DLFLEdgePtrArray eplist1, eplist2; // List of edges to be connected - DLFLFaceVertexPtr fvp1, fvp2, head1, head2; - DLFLEdgePtr ep, iep; - DLFLVertexPtr vp; - Vector3dArray vertex_coords, new_vertex_coords; - Vector3d p; - Vector3d v0, v1, v2, n1, n2, n3, v0hat; - float n1n2, x, t; - int num_old_faces, num_old_edges, num_old_verts; - int num_faces, num_edges, num_verts; - int eistart, edgeindex; - - num_old_verts = obj->num_vertices(); - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - // Apply make-unique on the obj->num_edges to make sure all Edge IDs are consecutive - DLFLEdgePtrList::iterator efirst = obj->beginEdge(), elast = obj->endEdge(); - - obj->makeEdgesUnique(); - - // Reserve and create num_old_edges entries in the 2 temporary lists - eplist1.resize(num_old_edges, nullptr); eplist2.resize(num_old_edges, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); - - fp->getVertexCoords(vertex_coords); - - num_verts = vertex_coords.size(); - new_vertex_coords.reserve(num_verts); - - // Compute new coordinates for the new polygon - //double coef, alpha; - //alpha = 12.0/16.0; - for (int i = 0; i < num_verts; ++i) - { - t = thickness / 2.0; - v0 = vertex_coords[i]; - if (i > 0) - v1 = vertex_coords[i - 1]; - else - v1 = vertex_coords[num_verts - 1]; - if (i < num_verts - 1) - v2 = vertex_coords[i + 1]; - else - v2 = vertex_coords[0]; - //if the length of v1-v2 i smaller than .001... - //this is arbitrary and should probably be changed... - if (norm(v1 - v2) < 0.001) - { - if (i < num_verts - 2) - v2 = vertex_coords[i + 2]; - else if (i == num_verts - 1) - v2 = vertex_coords[0]; - else - v2 = vertex_coords[1]; - } - n1 = normalized(v1 - v0); - n2 = normalized(v2 - v0); - n1n2 = n1*n2; - std::cout << n1n2 << "\n"; - if (n1n2 == -1) - { - n3 = normalized(fp->geomCentroid() - v0); - // x = t; - v0hat = t*(n3)+v0; - // p = v0hat; - new_vertex_coords.push_back(v0hat); - } - else - { - x = sqrt(t*t / (1.0 - n1n2*n1n2)); - v0hat = x*(n1 + n2) + v0; - p = v0hat; - new_vertex_coords.push_back(p); - } - } - - obj->createFace(new_vertex_coords); - new_vertex_coords.clear(); vertex_coords.clear(); - - // Get the second newly inserted face, the one facing inwards - ifp = obj->lastFace(); - // Set type of inner face so we can use the type to - // determine which face to use for edge connects - ifp->setType(FTNew); - //////////////////////////////////////////////////////////////////// - fl_last_hole = obj->endFace(); - --fl_last_hole; --fl_last_hole; - (*fl_last_hole)->setType(FTHole); - - ////////////////////////////////////////////////////////////////////// - - - // Go through current face and ifp and store the face-vertices in the - // array of corners to make connections afterwards. Array is indexed - // using the ID of the edge starting at each corner of the old face - // offset to start at 0 using num_edges - // ifp has to be traversed in the reverse direction starting at the back - - fvp1 = head1 = fp->front(); fvp2 = head2 = ifp->back(); - - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - - while (fvp1 != head1 && fvp2 != head2) - { - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - } - ++fl_first; ++num_faces; - } - - // Go through the face_list,obj->num_edges and vertex_list and destroy all the old faces, edges and vertices - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - obj->removeFace(fp); delete fp; - } - - num_edges = 0; el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - obj->removeEdge(ep); delete ep; - } - - num_verts = 0; vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - obj->removeVertex(vp); delete vp; - } - - // Go through eplist1,fplist1 and eplist2,fplist2 and connect corresponding half-edges - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr tfp1 = nullptr; - DLFLFacePtr tfp2 = nullptr; - for (int i = 0; i < num_old_edges; ++i) - { - if (eplist1[i] != nullptr && eplist2[i] != nullptr) - { - // Find the faces adjacent to the edges which are of type FTNew - // These will be the inner faces - eplist1[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp1 = tfp1; - else if (tfp2->getType() == FTNew) fp1 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - eplist2[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp2 = tfp1; - else if (tfp2->getType() == FTNew) fp2 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - connectEdges(obj, eplist1[i], fp1, eplist2[i], fp2); - } - else - cout << "nullptr pointers found! i = " << i << " " - << eplist1[i] << " -- " << eplist2[i] << endl; - } -} - -void modifiedCornerCuttingSubdivide2(DLFLObjectPtr obj, double scale) -{ - // (Modified) Corner-cutting subdivision scheme - // Tension parameter is calculated based on number of vertices in face - - // Go through list of faces and create new inner faces for each face - DLFLFacePtrList::iterator fl_first, fl_last, fl_last_hole; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFacePtr fp = nullptr; - DLFLFacePtr ifp = nullptr; - DLFLEdgePtrArray eplist1, eplist2; // List of edges to be connected - DLFLFaceVertexPtr fvp1 = nullptr; - DLFLFaceVertexPtr fvp2 = nullptr; - DLFLFaceVertexPtr head1 = nullptr; - DLFLFaceVertexPtr head2 = nullptr; - DLFLEdgePtr ep = nullptr; - DLFLEdgePtr iep = nullptr; - DLFLVertexPtr vp = nullptr; - Vector3dArray vertex_coords, new_vertex_coords; - Vector3d p; - Vector3d v0, v1, v2, n1, n2, v0hat; - float n1n2, x, t; - int num_old_faces, num_old_edges, num_old_verts; - int num_faces, num_edges, num_verts; - int eistart, edgeindex; - - num_old_verts = obj->num_vertices(); - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - // Apply make-unique on the obj->num_edges to make sure all Edge IDs are consecutive - DLFLEdgePtrList::iterator efirst = obj->beginEdge(), elast = obj->endEdge(); - - obj->makeEdgesUnique(); - - // Reserve and create num_old_edges entries in the 2 temporary lists - eplist1.resize(num_old_edges, nullptr); eplist2.resize(num_old_edges, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); - - fp->getVertexCoords(vertex_coords); - - num_verts = vertex_coords.size(); - new_vertex_coords.reserve(num_verts); - - // Compute new coordinates for the new polygon - //double coef, alpha; - //alpha = 12.0/16.0; - for (int i = 0; i < num_verts; ++i) - { - t = scale / 2.0; - v0 = vertex_coords[i]; - if (i > 0) - v1 = vertex_coords[i - 1]; - else - v1 = vertex_coords[num_verts - 1]; - if - (i < num_verts - 1) v2 = vertex_coords[i + 1]; - else - v2 = vertex_coords[0]; - if (norm(v1 - v2) < 0.001) - { - if (i < num_verts - 2) - v2 = vertex_coords[i + 2]; - else if (i == num_verts - 1) - v2 = vertex_coords[0]; - else - v2 = vertex_coords[1]; - } - n1 = normalized(v1 - v0); - n2 = normalized(v2 - v0); - n1n2 = n1*n2; - // x = sqrt(t*t/(1.0-n1n2*n1n2)); - x = scale; - // std::cout<< x << "\n"; - v0hat = x*(n1 + n2) + v0; - p = v0hat; - - new_vertex_coords.push_back(p); - } - - obj->createFace(new_vertex_coords); - new_vertex_coords.clear(); vertex_coords.clear(); - - // Get the second newly inserted face, the one facing inwards - ifp = obj->lastFace(); - // Set type of inner face so we can use the type to - // determine which face to use for edge connects - ifp->setType(FTNew); - //////////////////////////////////////////////////////////////////// - fl_last_hole = obj->endFace(); - --fl_last_hole; --fl_last_hole; - (*fl_last_hole)->setType(FTHole); - - ////////////////////////////////////////////////////////////////////// - - - // Go through current face and ifp and store the face-vertices in the - // array of corners to make connections afterwards. Array is indexed - // using the ID of the edge starting at each corner of the old face - // offset to start at 0 using num_edges - // ifp has to be traversed in the reverse direction starting at the back - - fvp1 = head1 = fp->front(); fvp2 = head2 = ifp->back(); - - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - - while (fvp1 != head1 && fvp2 != head2) - { - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - } - ++fl_first; ++num_faces; - } - - // Go through the face_list,obj->num_edges and vertex_list and destroy all the old faces, edges and vertices - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - obj->removeFace(fp); delete fp; - } - - num_edges = 0; el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - obj->removeEdge(ep); delete ep; - } - - num_verts = 0; vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - obj->removeVertex(vp); delete vp; - } - - // Go through eplist1,fplist1 and eplist2,fplist2 and connect corresponding half-edges - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr tfp1 = nullptr; - DLFLFacePtr tfp2 = nullptr; - for (int i = 0; i < num_old_edges; ++i) - { - if (eplist1[i] != nullptr && eplist2[i] != nullptr) - { - // Find the faces adjacent to the edges which are of type FTNew - // These will be the inner faces - eplist1[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp1 = tfp1; - else if (tfp2->getType() == FTNew) fp1 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - eplist2[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp2 = tfp1; - else if (tfp2->getType() == FTNew) fp2 = tfp2; - else cout << i << " : " << "Face not found for half-edge!" << endl; - - connectEdges(obj, eplist1[i], fp1, eplist2[i], fp2); - } - else - cout << "nullptr pointers found! i = " << i << " " - << eplist1[i] << " -- " << eplist2[i] << endl; - } -} - -void root4Subdivide(DLFLObjectPtr obj, double a, double twist) -{ - // Root-4 subdivision - // Go through list of faces and create the inner faces for each face - DLFLFacePtrList::iterator fl_first = obj->beginFace(); - DLFLFacePtrList::iterator fl_last = obj->endFace(); - DLFLFacePtr faceptr; - Vector3dArray new_vertex_coords, vertex_coords; - Vector3d * midpoints; - Vector3d p1, p2, p; - DLFLFacePtrArray oldfaces, newfaces; // List of faces to be connected - int numoldedges = obj->num_edges(); // Keep track of no. of edges in un-sub-divided object - // All old edges have to be deleted in the end - int numoldverts = obj->num_vertices(); // No. of old vertices which have to be moved - int numoldfaces = obj->num_faces(); - int numfaces = 0; - int num_verts; - - while (fl_first != fl_last && numfaces < numoldfaces) - { - faceptr = (*fl_first); - - faceptr->getVertexCoords(vertex_coords); - num_verts = vertex_coords.size(); - - // Find mid-points of all the edges in this face and store them - midpoints = new Vector3d[num_verts]; - new_vertex_coords.reserve(num_verts); - for (int i = 0; i < num_verts; ++i) - { - p1 = vertex_coords[i]; - if (i == num_verts - 1) p2 = vertex_coords[0]; - else p2 = vertex_coords[i + 1]; - midpoints[i] = (1.0 - twist)*p1 + twist*p2; - } - - // Now using the mid-points compute new coordinates for the new polygon - double coef, alpha; - for (int i = 0; i < num_verts; ++i) - { - p.reset(); - for (int j = 0; j < num_verts; ++j) - { - alpha = M_SQRT1_2 - 0.25 + 5.0 / (4.0*num_verts); - if (i == j) coef = alpha; - else coef = (1.0 - alpha) * (3.0 + 2.0*cos(2.0*(i - j)*M_PI / num_verts)) / (3.0*num_verts - 5.0); - p += coef*midpoints[j]; - } - new_vertex_coords.push_back(p); - } - - obj->createFace(new_vertex_coords); - - delete[] midpoints; midpoints = nullptr; - new_vertex_coords.clear(); - vertex_coords.clear(); - - // Old face and new face facing the old face have to be connected. - // Store the pointers to the 2 faces in the 2 temporary arrays - oldfaces.push_back(faceptr); newfaces.push_back(obj->lastFace()); - ++fl_first; ++numfaces; - } - - // Go through list of faces to be connected and make the connections - int numconn = oldfaces.size(); - DLFLFacePtr oldface = nullptr; - DLFLFacePtr newface = nullptr; - for (int i = 0; i < numconn; ++i) - { - oldface = oldfaces[i]; newface = newfaces[i]; - - // Similar to extrude operation - - // Find the first face-vertices in the 2 faces to be connected - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = oldface->firstVertex(); fvp2 = newface->firstVertex(); - connectFaces(obj, fvp1, fvp2); - } - oldfaces.clear(); newfaces.clear(); - - // Go through the obj->num_edges and delete all the old edges - int count = 0; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLEdgePtr eptr = nullptr; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - - while (el_first != el_last) - { - eptr = (*el_first); - ++el_first; ++count; - deleteEdge(obj, eptr); - if (count >= numoldedges) break; // Done with old edges - } - - // Go through vertex list and move all the old vertices - count = 0; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vptr = nullptr; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - DLFLEdgePtr * iedges = nullptr; // Edges indident on a vertex - DLFLEdgePtr iedge = nullptr; // Incident edge - int numiedges = 0; - Vector3d mp, psum, np; - - while (vl_first != vl_last) - { - vptr = (*vl_first); - ++vl_first; ++count; - - // Move vertex - p = vptr->coords; - - numiedges = vptr->getEdges(&iedges); - - psum.reset(); - for (int j = 0; j < numiedges; ++j) - { - iedge = iedges[j]; - mp = iedge->getMidPoint(); - psum += mp; - } - psum *= 2.0; - psum -= numiedges*p; - psum /= numiedges; - - np = psum*a + p*(1.0 - a); - - vptr->coords = np; - - delete[] iedges; iedges = nullptr; - - if (count >= numoldverts) break; // Done with old vertices - } -} - - -void catmullClarkSubdivide(DLFLObjectPtr obj) -{ - // Catmull-Clark subdivision surfaces implementation - - // Commonly used variables - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFacePtr fp, efp1, efp2; - DLFLEdgePtr ep; - DLFLVertexPtr vp; - DLFLFaceVertexPtr fvp; - int num_faces, num_edges; - int num_old_faces, num_old_edges; - - - // Reset aux coords in each vertex - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - vp->resetAuxCoords(); - } - - // Compute the coordinates of the new points and store them in the aux-coords - // fields of each class - - // Go through each face and compute the centroid and store it in the aux-coords field - // Do the makeUnique also to make sure Face IDs are consecutive - // Send the contribution to all vertexes belonging to this face - Vector3d cen; - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last) - { - fp = (*fl_first); ++fl_first; ++num_faces; - cen = fp->geomCentroid(); - fp->setAuxCoords(cen); fp->makeUnique(); - - // Send contribution of this face to all vertices in this face - DLFLFaceVertexPtr current, head; - current = head = fp->front(); - current->vertex->addToAuxCoords(cen); current = current->next(); - while (current != head) - { - current->vertex->addToAuxCoords(cen); current = current->next(); - } - } - - // Go through each edge and compute the new edge point coordinates - // Send contribution of each edge to the vertexes at the ends - Vector3d mp, afp, edgept; - num_edges = 0; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last) - { - ep = (*el_first); ++el_first; ++num_edges; - ep->getFacePointers(efp1, efp2); - mp = ep->getMidPoint(true); afp = (efp1->getAuxCoords() + efp2->getAuxCoords()) / 2.0; - edgept = (mp + afp) / 2.0; - ep->setAuxCoords(edgept); - - // Send contribution of this edge to its 2 corners - DLFLFaceVertexPtr efvp1, efvp2; - ep->getFaceVertexPointers(efvp1, efvp2); - efvp1->vertex->addToAuxCoords(2.0*mp); efvp2->vertex->addToAuxCoords(2.0*mp); - } - - // Go through each vertex and compute the new vertex point coordinates - // and change the coordinate to be the new one - Vector3d vertexpt, ave_fep; // Contribution from faces and edges - int n; - vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - n = vp->valence(); - ave_fep = vp->getAuxCoords(); vp->resetAuxCoords(); - ave_fep /= double(n); - vertexpt = (ave_fep + (vp->coords)*(n - 3.0)) / double(n); - vp->coords = vertexpt; - } - - // Now create point-spheres for each Face. Store a pointer to the FaceVertex in - // a temporary array indexed using the Face ID. For this makeUnique has to be - // applied to the face list to make the Face IDs consecutive. - DLFLVertexPtrArray psarray; // Array of point spheres (vertices) - int fistart, faceindex; - - psarray.reserve(num_faces); psarray.resize(num_faces, nullptr); - fl_first = obj->beginFace(); fl_last = obj->endFace(); - fistart = (*fl_first)->getID(); - - num_old_faces = num_faces; num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - faceindex = fp->getID() - fistart; - fvp = obj->createPointSphere(fp->getAuxCoords(), fp->material()); - // Assign color and texture coords as centroid of old face - fvp->color = fp->colorCentroid(); fvp->texcoord = fp->textureCentroid(); - fp->resetAuxCoords(); - psarray[faceindex] = fvp->vertex; - } - - - // Now subdivide all the edges. Get the newly created face-vertices - // and add them to the table along with the vertex from above list of pointspheres - DLFLFaceVertexPtrArray fvplist; - DLFLVertexPtrArray vplist; - DLFLFaceVertexPtrArray fvparray; - int connindex, numconn; - num_edges = 0; num_old_edges = obj->num_edges(); - connindex = 0; numconn = 2 * num_old_edges; - - fvplist.resize(numconn, nullptr); vplist.resize(numconn, nullptr); - - el_first = obj->beginEdge(); el_last = obj->endEdge(); - fvparray.reserve(2); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - - edgept = ep->getAuxCoords(); ep->resetAuxCoords(); - vp = subdivideEdge(obj, ep); vp->coords = edgept; - if (vp != nullptr) - vp->getFaceVertices(fvparray); - - for (int i = 0; i < fvparray.size(); ++i) - { - fvp = fvparray[i]; - faceindex = (fvp->getFacePtr())->getID() - fistart; - fvplist[connindex] = fvp; vplist[connindex] = psarray[faceindex]; - ++connindex; - } - fvparray.clear(); - } - - // psarray can be freed now - psarray.clear(); - - - // Make all connections - DLFLFaceVertexPtr fvp1, fvp2; - for (int j = 0; j < numconn; ++j) - { - fvp1 = fvplist[j]; - - // Find the face-vertex referring to vp which is in the same face as fvp1 - // If only 1 face-vertex refers to vp, use that instead - vp = vplist[j]; - fvp2 = vp->getFaceVertexInFace(fvp1->getFacePtr()); - insertEdge(obj, fvp1, fvp2); - } - fvplist.clear(); vplist.clear(); -} - -// Star subdivision -// Doug -void starSubdivide(DLFLObjectPtr obj, double offset) -{ - - // Commonly used variables - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vp; - - int num_faces, num_old_faces, num_orig_faces; - int numVect1, numVect2; - - num_faces = 0; - num_old_faces = obj->num_faces(); - num_orig_faces = num_old_faces; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - numVect1 = obj->num_vertices(); - vl_first = obj->beginVertex(); - - vector NormList(num_orig_faces); - - //Stellate each face - while (num_faces < num_old_faces) - { - fp = (*fl_first); - ++fl_first; - NormList[num_faces] = fp->normalCentroid(); - stellateFace(obj, fp, 0.0); - ++num_faces; - } - - numVect2 = obj->num_vertices(); - - num_faces = 0; - num_old_faces = obj->num_faces(); - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - //Stellate all the faces again - while (num_faces < num_old_faces) - { - fp = (*fl_first); - ++fl_first; - stellateFace(obj, fp, 0.0); - ++num_faces; - } - - int NormCtr = 0; - int VectCtr = 0; - while (VectCtr < numVect1) - { - vp = (*vl_first); - ++vl_first; - ++VectCtr; - } - - while (VectCtr < numVect2) - { - vp = (*vl_first); - ++vl_first; - ++VectCtr; - vp->coords = vp->coords + offset*NormList[NormCtr]; - ++NormCtr; - } - -} - -void sqrt3Subdivide(DLFLObjectPtr obj) // Doug -{ - // Sqrt(3) subdivision - - // Commonly used variables - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces, num_old_faces, num_old_edges; - - num_faces = 0; - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - //Stellate all the faces - while (num_faces < num_old_faces) - { - fp = (*fl_first); - ++fl_first; - stellateFace(obj, fp, 0.0); - ++num_faces; - } - - // Delete the old edges - DLFLEdgePtrList::iterator el_first = obj->beginEdge(); - DLFLEdgePtrList::iterator el_last = obj->endEdge(); - DLFLEdgePtr ep = nullptr; - int num_edges = 0; - - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - deleteEdge(obj, ep, true); - } - - DLFLFaceVertexPtr fvp1, fvp2; - - num_faces = 0; - num_old_faces = obj->num_faces(); - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - while (num_faces < num_old_faces) - { - fp = (*fl_first); - ++fl_first; - ++num_faces; - fvp1 = (fp->firstVertex())->next(); - fvp2 = fvp1->next()->next(); - insertEdge(obj, fvp1, fvp2); - } -} - -// Fractal -// Doug -void fractalSubdivide(DLFLObjectPtr obj, double offset) -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp, fptr1; - DLFLFaceVertexPtr fvp1, fvp2, fvp3; - DLFLFaceVertexPtr fvpTest; - DLFLEdgePtr lastedge; - Vector3d dir; - int num_faces, num_old_faces, numsides1; - int numsidesALL, i; - double d, length1, length2; - bool done; - - num_faces = 0; - - num_old_faces = obj->num_faces(); - fl_first = obj->beginFace(); fl_last = obj->endFace(); - - subdivideAllEdges(obj); - - while (num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - - dir = fp->normalCentroid(); - - DLFLMaterialPtr matl = fp->material(); - - fvp2 = fp->firstVertex()->next(); - fvp3 = fvp2->next(); fvp3 = fvp3->next(); - - - // number of sides on the face - numsidesALL = fp->size(); - - fvpTest = fvp2; - - for (i = 0; i < (numsidesALL / 2); i++) - { - fvpTest = fvpTest->next(); - } - - //fvp2 and fvpTest should now be on opposites side of the face - //get the distance btwn them divided by 2 - length1 = norm(fvp2->getVertexCoords() - fvpTest->getVertexCoords()) / 2.0; - - - // This should be the distance btwn two adjacent new vertices, but it is too big - length2 = norm(fvp2->getVertexCoords() - fvp3->getVertexCoords()); - - // this first offset is too big atm, so using length1 for now - d = sqrt(length2*length2 - length1*length1); - d = d*offset; - - fvp1 = obj->createPointSphere(fp->geomCentroid() + d*dir, matl); - - insertEdgeCoFacial(obj, fvp2, fvp3, false); - lastedge = insertEdgeNonCoFacial(obj, fvp1, fvp2, matl); - - done = false; - while (!done) - { - - fvp1 = lastedge->getFaceVertexPtr1(); - - // Get face in which fvp1 is there. This will always be the face - // in which the next edge has to be inserted because the point-sphere corner - // is always specified first in the insertEdge call - fptr1 = fvp1->getFacePtr(); numsides1 = fptr1->size(); - - // If the face fptr1 has more than 3 sides insert another edge - if (numsides1 > 3) - { - - // Skip the next corner to get the corner for next edge insertion - fvp2 = fvp1->next(); fvp2 = fvp2->next(); - fvp3 = fvp2->next(); fvp3 = fvp3->next(); - - // Make sure point-sphere corner is specified first - insertEdgeCoFacial(obj, fvp2, fvp3, false); - lastedge = insertEdgeCoFacial(obj, fvp1, fvp2, false); - } - else - { - // All edges have been inserted. - done = true; - } - } - } -} - -void stellateSubdivide(DLFLObjectPtr obj) // Eric -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces, num_old_faces; - int num_old_edges; - Vector3d cen; - Vector3d cen_to_edge; - - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - cen = fp->geomCentroid(); - fp->setAuxCoords(cen); fp->makeUnique(); - - stellateFace(obj, fp, 0); - } - - // Go through the obj->num_edges and delete all the old edges - int count = 0; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLEdgePtr eptr = nullptr; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - - while (el_first != el_last) - { - eptr = (*el_first); - ++el_first; ++count; - deleteEdge(obj, eptr); - if (count >= num_old_edges) break; // Done with old edges - } -} - -void twostellateSubdivide(DLFLObjectPtr obj, double offset, double curve) // Eric -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_faces, num_old_faces; - int num_old_edges; - Vector3d cen; - - num_old_faces = obj->num_faces(); - - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - cen = fp->geomCentroid(); - fp->setAuxCoords(cen); fp->makeUnique(); - stellateFace(obj, fp, offset); - } - - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - num_faces = 0; - fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - cen = fp->geomCentroid(); - fp->setAuxCoords(cen); fp->makeUnique(); - stellateFace(obj, fp, curve); - } - - // Go through the obj->num_edges and delete all the old edges - int count = 0; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLEdgePtr eptr = nullptr; - el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last) - { - eptr = (*el_first); - ++el_first; ++count; - deleteEdge(obj, eptr); - if (count >= num_old_edges) break; // Done with old edges - } -} - -//----- Begin Additions by Bei & Cansin -----// - -void setOldVertexType(DLFLObjectPtr obj) -{ - DLFLVertexPtrList::iterator first; - int num_old_vertex, num_vertex; - - num_old_vertex = obj->num_vertices(); - num_vertex = 0; - first = obj->beginVertex(); - while (num_vertex < num_old_vertex) - { - (*first)->setType(VTOld); - num_vertex++; - first++; - } -} - -void setNewSubVertexType(DLFLObjectPtr obj) -{ - DLFLVertexPtrList::iterator first; - int num_old_vertex, num_vertex; - - num_old_vertex = obj->num_vertices(); - num_vertex = 0; - first = obj->beginVertex(); - while (num_vertex < num_old_vertex) - { - if ((*first)->getType() != VTOld) - (*first)->setType(VTNewSub); - num_vertex++; - first++; - } -} - -void setNormalVertexType(DLFLObjectPtr obj) -{ - DLFLVertexPtrList::iterator first; - int num_old_vertex, num_vertex; - - num_old_vertex = obj->num_vertices(); - num_vertex = 0; - first = obj->beginVertex(); - while (num_vertex < num_old_vertex) - { - (*first)->setType(VTNormal); - num_vertex++; - first++; - } -} - -void domeSubdivide(DLFLObjectPtr obj, double length, double sf) -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLFacePtr fp; - int num_old_faces; - int num_faces; - - num_old_faces = obj->num_faces(); - - // Subdivide all the edges by 4 - subdivideAllEdges(obj, 4); - - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - fp = extrudeFaceDS(obj, fp, 0.0*length, 1, 0.0, 1.6*sf); - fp = extrudeFaceDS(obj, fp, 0.3*length, 1, 0.0, 1.7*sf); - fp = extrudeFaceDS(obj, fp, 0.18*length, 1, 0.0, 1.6*sf); - fp = extrudeFaceDS(obj, fp, 0.1*length, 1, 0.0, 1.4*sf); - fp = extrudeFaceDS(obj, fp, 0.05*length, 1, 0.0, 1.2*sf); - fp = extrudeFaceDS(obj, fp, 0.025*length, 1, 0.0, 1.1*sf); - fp = extrudeFaceDS(obj, fp, 0.01*length, 1, 0.0, 0.01*sf); - } -} - -void dual1264Subdivide(DLFLObjectPtr obj, double sf) -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLEdgePtrArray eplist1, eplist2; // List of edges to be connected - DLFLFacePtr fp, ifp; - DLFLFaceVertexPtr head, current, fvp1, fvp2, head1, head2; - DLFLEdgePtr ep, iep; - DLFLVertexPtr vp; - Vector3d vert1, vert2; - Vector3dArray new_vertex_coords; - int num_old_faces, num_old_edges, num_old_verts; - int num_faces, num_edges, num_verts; - int eistart, edgeindex; - - num_old_verts = obj->num_vertices(); - num_old_faces = obj->num_faces(); - num_old_edges = obj->num_edges(); - - // Apply make-unique on the obj->num_edges to make sure all Edge IDs are consecutive - DLFLEdgePtrList::iterator efirst = obj->beginEdge(), elast = obj->endEdge(); - while (efirst != elast) - { - (*efirst)->makeUnique(); - ++efirst; - } - - // Reserve and create num_old_edges entries in the 2 temporary lists - eplist1.reserve(num_old_edges); eplist2.reserve(num_old_edges); - eplist1.resize(num_old_edges, nullptr); eplist2.resize(num_old_edges, nullptr); - - // Find starting edge ID to use as offset. - eistart = (obj->firstEdge())->getID(); - - fl_first = obj->beginFace(); fl_last = obj->endFace(); num_faces = 0; - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - - // First compute the coordinates of the vertices of the new points and store them in an array - head = fp->front(); - if (head) - { - current = head; - - vert1 = current->getVertexCoords(); - vert2 = current->next()->getVertexCoords(); - new_vertex_coords.push_back(vert1 * 2 / 3 + vert2 * 1 / 3); - new_vertex_coords.push_back(vert1 * 1 / 3 + vert2 * 2 / 3); - - current = current->next(); - while (current != head) - { - vert1 = current->getVertexCoords(); - vert2 = current->next()->getVertexCoords(); - new_vertex_coords.push_back(vert1 * 2 / 3 + vert2 * 1 / 3); - new_vertex_coords.push_back(vert1 * 1 / 3 + vert2 * 2 / 3); - - current = current->next(); - } - - // Scale the new vertices about their centroid if scale factor is not 1.0 or 0.0 - sf = Abs(sf); - if (isNonZero(sf) && (Abs(sf - 1.0) > ZERO)) - scale(new_vertex_coords, sf); - - obj->createFace(new_vertex_coords, fp->material()); - - new_vertex_coords.clear(); - ifp = obj->lastFace(); - ifp->setType(FTNew); - - fvp1 = head1 = fp->front(); fvp2 = head2 = ifp->back(); - - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp2 = fvp2->prev(); - - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - while (fvp1 != head1 && fvp2 != head2) - { - ep = fvp1->getEdgePtr(); iep = fvp2->getEdgePtr(); - edgeindex = ep->getID() - eistart; - if (eplist1[edgeindex] == nullptr) - eplist1[edgeindex] = iep; - else - eplist2[edgeindex] = iep; - fvp2 = fvp2->prev(); - - fvp1 = fvp1->next(); fvp2 = fvp2->prev(); - } - } - } - - // Go through the face_list,obj->num_edges and vertex_list and destroy all the old faces, edges and vertices - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - obj->removeFace(fp); delete fp; - } - - num_edges = 0; el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - obj->removeEdge(ep); delete ep; - } - - num_verts = 0; vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_verts < num_old_verts) - { - vp = (*vl_first); ++vl_first; ++num_verts; - obj->removeVertex(vp); delete vp; - } - - // Go through eplist1,fplist1 and eplist2,fplist2 and connect corresponding half-edges - DLFLFacePtr fp1 = nullptr; - DLFLFacePtr fp2 = nullptr; - DLFLFacePtr tfp1 = nullptr; - DLFLFacePtr tfp2 = nullptr; - for (int i = 0; i < num_old_edges; ++i) - { - if (eplist1[i] != nullptr && eplist2[i] != nullptr) - { - eplist1[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) fp1 = tfp1; - else if (tfp2->getType() == FTNew) - fp1 = tfp2; - else - cout << i << " : " << "Face not found for half-edge!" << endl; - - eplist2[i]->getFacePointers(tfp1, tfp2); - if (tfp1->getType() == FTNew) - fp2 = tfp1; - else if (tfp2->getType() == FTNew) - fp2 = tfp2; - else - cout << i << " : " << "Face not found for half-edge!" << endl; - - connectEdgesWithoutLoopCheck(obj, eplist1[i], fp1, eplist2[i], fp2); - } - else - cout << "nullptr pointers found! i = " << i << " " << eplist1[i] << " -- " << eplist2[i] << endl; - } -} - -void loopStyleSubdivide(DLFLObjectPtr obj, double length) // bei 12-11-03 -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFaceVertexPtrArray fvparray; - DLFLFacePtr fp; - DLFLVertexPtr vp; - DLFLFaceVertexPtr fvp1, fvp2; - Vector3d oldpos, newpos; - int num_old_faces, num_faces, num_old_vertice, num_vertice, num_faceVertice; - - num_old_vertice = obj->num_vertices(); - - // mark the original vertices - setOldVertexType(obj); - // subdivide all edges by 2 - subdivideAllEdges(obj, 2); - // mark the newly created vertices by subdivision - setNewSubVertexType(obj); - - // \todo put new code here below - num_old_faces = obj->num_faces(); - - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - - fvp1 = fp->front(); - if ((fvp1->getVertexType() != VTNewSub)) - fvp1 = fvp1->next(); - vp = fvp1->getVertexPtr(); - - fvp2 = fvp1->prev()->prev(); - while (fvp2->getVertexPtr() != vp) - { - insertEdge(obj, fvp1, fvp2); - fvp1 = fvp2; - fvp2 = fvp1->prev()->prev(); - } - insertEdge(obj, fvp1, fvp2); - } - - // move the original vertices to a propriate position decided by length factor - num_vertice = 0; vl_first = obj->beginVertex(); vl_last = obj->endVertex(); - while (vl_first != vl_last && num_vertice < num_old_vertice) - { - vp = (*vl_first); ++vl_first; ++num_vertice; - if (vp->getType() != VTOld) - continue; - vp->getFaceVertices(fvparray); - num_faceVertice = fvparray.size(); - newpos.reset(); - for (int i = 0; i < num_faceVertice; i++) - newpos += fvparray[i]->next()->getVertexCoords(); - newpos = newpos / num_faceVertice; - oldpos = vp->getCoords(); - newpos = length* oldpos + (1 - length)* newpos; - - vp->setCoords(newpos); - } - - // change the type of all the verteices back to VTNormal - setNormalVertexType(obj); -} - -void dooSabinSubdivideBCNew(DLFLObjectPtr obj, double sf, double length) // bei dec 11 -{ - DLFLFacePtrList::iterator fl_first, fl_last; - DLFLEdgePtrList::iterator el_first, el_last; - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLFaceVertexPtrArray fvparray; - DLFLFacePtr fp; - DLFLEdgePtr ep, ep1, ep2; - DLFLFaceVertexPtr fvp, fvp1, fvp2; - DLFLVertexPtr vp; - Vector3d oldpos, newpos; - int num_old_faces, num_old_edges, num_old_vertice; - int num_faces, num_edges, num_vertice, num_faceVertice; - - num_old_vertice = obj->num_vertices(); - - // mark the original vertices - setOldVertexType(obj); - // subdivide all edges by 2 - subdivideAllEdges(obj); - // mark the newly created vertices by subdivision - setNewSubVertexType(obj); - - num_old_faces = obj->num_faces(); num_old_edges = obj->num_edges(); - - // doo-sabin extrusion - num_faces = 0; fl_first = obj->beginFace(); fl_last = obj->endFace(); - while (fl_first != fl_last && num_faces < num_old_faces) - { - fp = (*fl_first); ++fl_first; ++num_faces; - extrudeFaceDS(obj, fp, 0.0, 1, 0.0, sf); - } - - // delete old edges - num_edges = 0; el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - deleteEdge(obj, ep); - } - - // delete old edges while insert an new edge between two newly extrude faces - num_old_edges = obj->num_edges(); - num_edges = 0; el_first = obj->beginEdge(); el_last = obj->endEdge(); - while (el_first != el_last && num_edges < num_old_edges) - { - ep = (*el_first); ++el_first; ++num_edges; - fvp1 = ep->getFaceVertexPtr1(); - fvp2 = ep->getFaceVertexPtr2(); - - if ((fvp1->getVertexType() == VTNewSub)) - { - fvp = fvp1; - fvp1 = fvp->prev(); ep1 = fvp1->getEdgePtr(); - fvp2 = fvp->next(); ep2 = fvp->getEdgePtr(); - insertEdge(obj, fvp1, fvp2); - deleteEdge(obj, ep1); deleteEdge(obj, ep2); - } - else if ((fvp2->getVertexType() == VTNewSub)) - { - fvp = fvp2; - fvp1 = fvp->prev(); ep1 = fvp1->getEdgePtr(); - fvp2 = fvp->next(); ep2 = fvp->getEdgePtr(); - insertEdge(obj, fvp1, fvp2); - deleteEdge(obj, ep1); - deleteEdge(obj, ep2); - } - } - - // move the original vertices to a propriate position decided by length factor - num_vertice = 0; - vl_first = obj->beginVertex(); - vl_last = obj->endVertex(); - while (vl_first != vl_last && num_vertice < num_old_vertice) - { - vp = (*vl_first); ++vl_first; ++num_vertice; - if (vp->getType() != VTOld) - continue; - vp->getFaceVertices(fvparray); - num_faceVertice = fvparray.size(); - newpos.reset(); - for (int i = 0; i < num_faceVertice; i++) - newpos += fvparray[i]->next()->getVertexCoords(); - newpos = newpos / num_faceVertice; - oldpos = vp->getCoords(); - newpos = length* oldpos + (1 - length)* newpos; - - vp->setCoords(newpos); - } - - // change the type of all the verteices back to VTNormal - setNormalVertexType(obj); -} - -void dooSabinSubdivideBC(DLFLObjectPtr obj, bool check) -{ - subdivideAllEdges(obj); - dooSabinSubdivide(obj); -} - -// Face Subdivision // - -void subdivideFace(DLFLObjectPtr obj, DLFLFacePtr faceptr, bool usequads) -{ - // Subdivide a face into quads or triangles depending on flag - // If quads are used, edges are subdivided, otherwise existing corners are used - Vector3d geomcen, normalcen; - Vector2d texcen; - RGBColor colorcen; - - faceptr->getCentroids(geomcen, texcen, colorcen, normalcen); - - DLFLFaceVertexPtrArray endpoints; - if (usequads) - { - // Subdivide all edges in this face and store the corresponding newly created corners - // which will be used as the end points of the new edges - DLFLVertexPtr vp = nullptr; - DLFLEdgePtrArray edges; - - faceptr->getEdges(edges); - endpoints.resize(edges.size(), nullptr); - for (int i = 0; i < edges.size(); ++i) - { - vp = subdivideEdge(obj, edges[i]); - if (vp != nullptr) - endpoints[i] = vp->getFaceVertexInFace(faceptr); - } - } - else - { - // Use existing corners in face as end points of the new edges - faceptr->getCorners(endpoints); - } - - // Create point-sphere at centroid and set properties of face-vertex to - // that of centroid of face. - DLFLFaceVertexPtr cenfvp = obj->createPointSphere(geomcen, faceptr->material()); - cenfvp->normal = normalcen; cenfvp->color = colorcen; cenfvp->texcoord = texcen; - - // Insert edges between corner in centroid and corners in the endpoints array - // NOTE: Make sure centroid corner is specified first in the insertEdge call - for (int i = 0; i < endpoints.size(); ++i) - { - insertEdge(obj, cenfvp, endpoints[i]); - } -} - -void subdivideFace(DLFLObjectPtr obj, uint face_index, bool usequads) -{ - // Find the Face with the given face_index from the FaceList and sub-divide it - if (face_index > obj->num_faces()) return; - - DLFLFacePtrList::iterator i = obj->beginFace(); - advance(i, face_index); - subdivideFace(obj, *i, usequads); -} - - -void subdivideFaces(DLFLObjectPtr obj, DLFLFacePtrArray fparray, bool usequads) -{ - // Subdivide the given list of faces into quads or triangles - // For triangles, we can just go through the list and subdivide each of them - // For quads, since edges are subdivided and new points created, we want - // to make sure that edges shared between two faces in the list are not - // subdivided twice. - - // If there is only 1 face do regular face subdivision and return - if (fparray.size() == 1) - { - subdivideFace(obj, fparray[0], usequads); - return; - } - if (usequads) - { - Vector3d geomcen, normalcen; - Vector2d texcen; - RGBColor colorcen; - DLFLVertexPtr vp; - DLFLFaceVertexPtr cenfvp; - DLFLFaceVertexPtrArray corners, vcorners; - DLFLEdgePtrArray edges, vedges; - DLFLFacePtr faceptr; - DLFLEdgePtrList eptypereset; // List of edges whose type has to be reset - DLFLFaceVertexPtrList fvptypereset; // List of corners whose type has to be reset - for (int i = 0; i < fparray.size(); ++i) - { - faceptr = fparray[i]; - - // Subdivide all edges in this face, set type of new vertex when subdividing. - // If an edge is a new edge, then we will not subdivide that edge - // since it was created as a result of a previous edge subdivision - faceptr->getEdges(edges); - for (int i = 0; i < edges.size(); ++i) - { - if (edges[i]->getType() != ETNew) - { - vp = subdivideEdge(obj, edges[i], true); - if (vp != nullptr) - { - // Find the edges and the corners associated with this vertex - // Add them to the list for resetting type later - // We can make use of the fact that there will only 2 edges - // and 2 corners associated with this vertex - vp->getEdges(vedges); vp->getFaceVertices(vcorners); - eptypereset.push_back(vedges[0]); eptypereset.push_back(vedges[1]); - fvptypereset.push_back(vcorners[0]); fvptypereset.push_back(vcorners[1]); - } - } - } - - // Create point-sphere at centroid and set properties of face-vertex to - // that of centroid of face. - faceptr->getCentroids(geomcen, texcen, colorcen, normalcen); - cenfvp = obj->createPointSphere(geomcen, faceptr->material()); - cenfvp->normal = normalcen; cenfvp->color = colorcen; cenfvp->texcoord = texcen; - - // Insert edges between corner in centroid and the new corners in face - // NOTE: Make sure centroid corner is specified first in the insertEdge call - faceptr->getCorners(corners); - for (int i = 0; i < corners.size(); ++i) - { - if (corners[i]->getType() == FVTNew) - { - // Reset the type of the corner as well as the vertex - // Get both edges related to this corner and add them - // to the list for resetting type later. - corners[i]->resetType(); - corners[i]->getVertexPtr()->resetType(); - insertEdge(obj, cenfvp, corners[i]); - } - } - } - - // Reset type of edges which were created by subdivision - DLFLEdgePtrList::iterator epfirst = eptypereset.begin(), eplast = eptypereset.end(); - while (epfirst != eplast) - { - (*epfirst)->resetType(); ++epfirst; - } - - // Reset type of corners which were created by subdivision - DLFLFaceVertexPtrList::iterator fvpfirst = fvptypereset.begin(), fvplast = fvptypereset.end(); - while (fvpfirst != fvplast) - { - (*fvpfirst)->resetType(); ++fvpfirst; - } - } - else - { - // Go through list and subdivide each face - for (int i = 0; i < fparray.size(); ++i) - { - subdivideFace(obj, fparray[i], false); - } - } -} - -void subdivideFaces(DLFLObjectPtr obj, DLFLFacePtrList fplist, bool usequads) -{ - // NOTE: fplist parameter is to passed by value to ensure copy will be made - // This is to allow subdivision of all faces in the mesh, in which case - // the entire face list will be passed to this subroutine. - - // Subdivide the given list of faces into quads or triangles - // For triangles, we can just go through the list and subdivide each of them - // For quads, since edges are subdivided and new points created, we want - // to make sure that edges shared between two faces in the list are not - // subdivided twice. - - // If there is only 1 face do regular face subdivision and return - if (fplist.size() == 1) - { - subdivideFace(obj, fplist.front()); - return; - } - if (usequads) - { - Vector3d geomcen, normalcen; - Vector2d texcen; - RGBColor colorcen; - DLFLVertexPtr vp; - DLFLFaceVertexPtr cenfvp; - DLFLFaceVertexPtrArray corners, vcorners; - DLFLEdgePtrArray edges, vedges; - DLFLFacePtr faceptr; - DLFLEdgePtrList eptypereset; // List of edges whose type has to be reset - DLFLFaceVertexPtrList fvptypereset; // List of corners whose type has to be reset - DLFLFacePtrList::iterator fpfirst, fplast; - fpfirst = fplist.begin(); fplast = fplist.end(); - while (fpfirst != fplast) - { - faceptr = (*fpfirst); ++fpfirst; - - // Subdivide all edges in this face, set type of new vertex when subdividing. - // If an edge is a new edge, then we will not subdivide that edge - // since it was created as a result of a previous edge subdivision - faceptr->getEdges(edges); - for (int i = 0; i < edges.size(); ++i) - { - if (edges[i]->getType() != ETNew) - { - vp = subdivideEdge(obj, edges[i], true); - if (vp != nullptr) - { - // Find the edges and the corners associated with this vertex - // Add them to the list for resetting type later - // We can make use of the fact that there will only 2 edges - // and 2 corners associated with this vertex - vp->getEdges(vedges); vp->getFaceVertices(vcorners); - eptypereset.push_back(vedges[0]); eptypereset.push_back(vedges[1]); - fvptypereset.push_back(vcorners[0]); fvptypereset.push_back(vcorners[1]); - } - } - } - - // Create point-sphere at centroid and set properties of face-vertex to - // that of centroid of face. - faceptr->getCentroids(geomcen, texcen, colorcen, normalcen); - cenfvp = obj->createPointSphere(geomcen, faceptr->material()); - cenfvp->normal = normalcen; cenfvp->color = colorcen; cenfvp->texcoord = texcen; - - // Insert edges between corner in centroid and the new corners in face - // NOTE: Make sure centroid corner is specified first in the insertEdge call - faceptr->getCorners(corners); - for (int i = 0; i < corners.size(); ++i) - { - if (corners[i]->getType() == FVTNew) - { - DLFLFaceVertexType vt = corners[i]->getType(); - // Reset the type of the corner as well as the vertex - // Get both edges related to this corner and add them - // to the list for resetting type later. - corners[i]->resetType(); - corners[i]->getVertexPtr()->resetType(); - insertEdge(obj, cenfvp, corners[i]); - } - } - } - - // Reset type of edges which were created by subdivision - DLFLEdgePtrList::iterator epfirst = eptypereset.begin(), eplast = eptypereset.end(); - while (epfirst != eplast) - { - (*epfirst)->resetType(); ++epfirst; - } - - // Reset type of corners which were created by subdivision - DLFLFaceVertexPtrList::iterator fvpfirst = fvptypereset.begin(), fvplast = fvptypereset.end(); - while (fvpfirst != fvplast) - { - (*fvpfirst)->resetType(); ++fvpfirst; - } - } - else - { - // Go through list and subdivide each face - DLFLFacePtrList::iterator fpfirst, fplast; - fpfirst = fplist.begin(); fplast = fplist.end(); - while (fpfirst != fplast) - { - subdivideFace(obj, *fpfirst, false); ++fpfirst; - } - } -} - -void subdivideAllFaces(DLFLObjectPtr obj, bool usequads) -{ - // NOTE: A copy of the list needs to be made since subdivision - // will add new faces. Parameter has to passed by value to ensure copy will be made - subdivideFaces(obj, obj->getFaceList(), usequads); -} - -void triangulateFaces(DLFLObjectPtr obj, DLFLFacePtrList fplist) -{ - // NOTE: fplist parameter is to passed by value to ensure copy will be made - // This is to allow subdivision of all faces in the mesh, in which case - // the entire face list will be passed to this subroutine. - - // If there is only 1 face do regular face subdivision and return - if (fplist.size() == 1) - { - subdivideFace(obj, fplist.front()); - return; - } - - // Go through list and subdivide each face - DLFLFacePtrList::iterator fpfirst, fplast; - fpfirst = fplist.begin(); fplast = fplist.end(); - while (fpfirst != fplast) - { - if ((*fpfirst)->size() != 3) - subdivideFace(obj, *fpfirst, false); ++fpfirst; - } - -} - -void triangulateAllFaces(DLFLObjectPtr obj) -{ - // NOTE: A copy of the list needs to be made since subdivision - // will add new faces. Parameter has to passed by value to ensure copy will be made - // this function will only triangulate faces which are not already triangles - // this will help prepare files for STL export - triangulateFaces(obj, obj->getFaceList()); -} - -} // end namespace diff --git a/topmodx/include/dlflaux/DLFLSubdiv.h b/topmodx/include/dlflaux/DLFLSubdiv.h deleted file mode 100644 index ca274af..0000000 --- a/topmodx/include/dlflaux/DLFLSubdiv.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLSUBDIV_H_ -#define _DLFLSUBDIV_H_ - -#include -// #include -// #include - -namespace DLFL -{ - -void loopSubdivide(DLFLObjectPtr obj); -void checkerBoardRemeshing(DLFLObjectPtr obj, double thickness = 0.33); -void simplestSubdivide(DLFLObjectPtr obj); -void vertexCuttingSubdivide(DLFLObjectPtr obj, double offset = 0.25); -void pentagonalSubdivide2(DLFLObjectPtr obj, double scale_factor = 0.75); -void pentagonalSubdivide(DLFLObjectPtr obj, double offset = 0); -void honeycombSubdivide(DLFLObjectPtr obj); -bool dooSabinSubdivide(DLFLObjectPtr obj, bool check = true /*,QProgressDialog *progress = 0*/); -void dooSabinSubdivideBC(DLFLObjectPtr obj, bool check = true); -void dooSabinSubdivideBCNew(DLFLObjectPtr obj, double sf, double length); -void cornerCuttingSubdivide(DLFLObjectPtr obj, float alpha); -void modifiedCornerCuttingSubdivide(DLFLObjectPtr obj, double thickness); -void modifiedCornerCuttingSubdivide2(DLFLObjectPtr obj, double thickness); -void root4Subdivide(DLFLObjectPtr obj, double a = 0.0, double twist = 0.0); -void catmullClarkSubdivide(DLFLObjectPtr obj); -void starSubdivide(DLFLObjectPtr obj, double offset = 0.0); -void sqrt3Subdivide(DLFLObjectPtr obj); -void fractalSubdivide(DLFLObjectPtr obj, double offset = 1.0); -void stellateSubdivide(DLFLObjectPtr obj); -void twostellateSubdivide(DLFLObjectPtr obj, double offset, double curve); -void domeSubdivide(DLFLObjectPtr obj, double length, double sf); -void dual1264Subdivide(DLFLObjectPtr obj, double sf); -void loopStyleSubdivide(DLFLObjectPtr obj, double length); - -void setOldVertexType(DLFLObjectPtr obj); -void setNewSubVertexType(DLFLObjectPtr obj); -void setNormalVertexType(DLFLObjectPtr obj); - -// Face Subdivision -void subdivideFace(DLFLObjectPtr obj, DLFLFacePtr faceptr, bool usequads = true); -void subdivideFace(DLFLObjectPtr obj, uint face_index, bool usequads = true); -void subdivideFaces(DLFLObjectPtr obj, DLFLFacePtrArray fparray, bool usequads = true); -void subdivideFaces(DLFLObjectPtr obj, DLFLFacePtrList fplist, bool usequads = true); -void subdivideAllFaces(DLFLObjectPtr obj, bool usequads = true); -void triangulateFaces(DLFLObjectPtr obj, DLFLFacePtrList fplist); -void triangulateAllFaces(DLFLObjectPtr obj); - -} // end namespace - -#endif // _DLFLSUBDIV_H_ diff --git a/topmodx/include/dlflaux/dlflaux.pro b/topmodx/include/dlflaux/dlflaux.pro deleted file mode 100644 index e281830..0000000 --- a/topmodx/include/dlflaux/dlflaux.pro +++ /dev/null @@ -1,49 +0,0 @@ -TEMPLATE = lib -CONFIG -= qt -CONFIG += staticlib #dll # build shared library -# CONFIG += debug warn_off create_prl -CONFIG += debug warn_off create_prl -TARGET = dlflaux -INCLUDEPATH += .. ../vecmat ../dlflcore -CONFIG(debug, debug|release) { - LIB_CONF_SUB_DIR = Debug -} else { - LIB_CONF_SUB_DIR = Debug -} -DESTDIR = ../../lib/$${LIB_CONF_SUB_DIR} - -macx { - # compile release + universal binary - #QMAKE_LFLAGS += -F../../lib - #LIBS += -framework vecmat -framework dlflcore - #CONFIG += x86 ppc - #CONFIG += lib_bundle - #QMAKE_BUNDLE_EXTENSION = .framework -#} else:unix { - QMAKE_LFLAGS += -L../../lib/$${LIB_CONF_SUB_DIR} - #LIBS += -lvecmat -ldlflcore -} - -HEADERS += \ - DLFLCast.h \ - DLFLConnect.h \ - DLFLConvexHull.h \ - DLFLCrust.h \ - DLFLDual.h \ - DLFLExtrude.h \ - DLFLMeshSmooth.h \ - DLFLMultiConnect.h \ - DLFLSculpting \ - DLFLSubdiv.h - -SOURCES += \ - DLFLCast.cc \ - DLFLConnect.cc \ - DLFLConvexHull.cc \ - DLFLCrust.cc \ - DLFLDual.cc \ - DLFLExtrude.cc \ - DLFLMeshSmooth.cc \ - DLFLMultiConnect.cc \ - DLFLSculpting.cc \ - DLFLSubdiv.cc diff --git a/topmodx/include/dlflcore/DLFLCommon.cc b/topmodx/include/dlflcore/DLFLCommon.cc deleted file mode 100644 index fdfab62..0000000 --- a/topmodx/include/dlflcore/DLFLCommon.cc +++ /dev/null @@ -1,133 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLCommon.hh - */ - -#include "DLFLCommon.h" -#include "DLFLVertex.h" -#include "DLFLFaceVertex.h" -#include "DLFLEdge.h" -#include "DLFLFace.h" -#include "DLFLObject.h" - -namespace DLFL -{ - -void erase_dvp(DLFLVertexPtr vp) { delete vp; } - -void erase_dfvp(DLFLFaceVertexPtr fvp) { delete fvp; } - -void erase_dep(DLFLEdgePtr ep) { delete ep; } - -void erase_dfp(DLFLFacePtr fp) { delete fp; } - -void erase_dop(DLFLObjectPtr op) { delete op; } - -void erase_dmp(DLFLMaterialPtr mp) { delete mp; } - -void clear(DLFLVertexPtrArray& vparray) -{ - for_each(vparray.begin(), vparray.end(), erase_dvp); - vparray.clear(); -} - -void clear(DLFLFaceVertexPtrArray& fvparray) -{ - for_each(fvparray.begin(), fvparray.end(), erase_dfvp); - fvparray.clear(); -} - -void clear(DLFLEdgePtrArray& eparray) -{ - for_each(eparray.begin(), eparray.end(), erase_dep); - eparray.clear(); -} - -void clear(DLFLFacePtrArray& fparray) -{ - for_each(fparray.begin(), fparray.end(), erase_dfp); - fparray.clear(); -} - -void clear(DLFLObjectPtrArray& oparray) -{ - for_each(oparray.begin(), oparray.end(), erase_dop); - oparray.clear(); -} - -void clear(DLFLMaterialPtrArray& mparray) -{ - for_each(mparray.begin(), mparray.end(), erase_dmp); - mparray.clear(); -} - - -void clear(DLFLVertexPtrList& vplist) -{ - for_each(vplist.begin(), vplist.end(), erase_dvp); - vplist.clear(); -} - -void clear(DLFLFaceVertexPtrList& fvplist) -{ - for_each(fvplist.begin(), fvplist.end(), erase_dfvp); - fvplist.clear(); -} - -void clear(DLFLEdgePtrList& eplist) -{ - for_each(eplist.begin(), eplist.end(), erase_dep); - eplist.clear(); -} - -void clear(DLFLFacePtrList& fplist) -{ - for_each(fplist.begin(), fplist.end(), erase_dfp); - fplist.clear(); -} - -void clear(DLFLObjectPtrList& oplist) -{ - for_each(oplist.begin(), oplist.end(), erase_dop); - oplist.clear(); -} - -void clear(DLFLMaterialPtrList& mplist) -{ - for_each(mplist.begin(), mplist.end(), erase_dmp); - mplist.clear(); -} - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLCommon.h b/topmodx/include/dlflcore/DLFLCommon.h deleted file mode 100644 index 848e1f5..0000000 --- a/topmodx/include/dlflcore/DLFLCommon.h +++ /dev/null @@ -1,241 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLCommon.hh - */ - -#ifndef _DLFL_COMMON_HH_ -#define _DLFL_COMMON_HH_ - -// Common includes, definitions and declarations for DLFL - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -// strstream is deprecated in the new standard. -// The GNU compiler complies with this but the SGI compiler doesn't - -#include -typedef stringstream StringStream; - -#include - -// This is required if the standard versions of the STL header files are included -using namespace std; - -// Forward declare all the classes and define typedefs for simplicity - -namespace DLFL -{ - -class DLFLVertex; -class DLFLFaceVertex; -class DLFLEdge; -class DLFLFace; -class DLFLObject; -class DLFLMaterial; -//class TMPatch; -//class TMPatchFace; - -typedef DLFLVertex * DLFLVertexPtr; -typedef DLFLFaceVertex * DLFLFaceVertexPtr; -typedef DLFLEdge * DLFLEdgePtr; -typedef DLFLFace * DLFLFacePtr; -typedef DLFLObject * DLFLObjectPtr; -typedef DLFLMaterial * DLFLMaterialPtr; -//typedef TMPatch * TMPatchPtr; -//typedef TMPatchFace * TMPatchFacePtr; - -typedef vector DLFLVertexArray; -typedef vector DLFLVertexPtrArray; -typedef list DLFLVertexList; -typedef list DLFLVertexPtrList; - -typedef vector DLFLFaceVertexArray; -typedef vector DLFLFaceVertexPtrArray; -typedef list DLFLFaceVertexList; -typedef list DLFLFaceVertexPtrList; - -typedef vector DLFLEdgeArray; -typedef vector DLFLEdgePtrArray; -typedef list DLFLEdgeList; -typedef list DLFLEdgePtrList; - -typedef vector DLFLFaceArray; -typedef vector DLFLFacePtrArray; -typedef list DLFLFaceList; -typedef list DLFLFacePtrList; - -typedef vector DLFLObjectArray; -typedef vector DLFLObjectPtrArray; -typedef list DLFLObjectList; -typedef list DLFLObjectPtrList; - -typedef vector DLFLMaterialArray; -typedef vector DLFLMaterialPtrArray; -typedef list DLFLMaterialList; -typedef list DLFLMaterialPtrList; - -typedef vector Vector4dArray; -typedef vector Vector4dPtrArray; -typedef list Vector4dList; -typedef list Vector4dPtrList; - -typedef vector Vector4dGrid; -typedef vector Vector4dPtrGrid; - -typedef vector Vector3dArray; -typedef vector Vector3dPtrArray; -typedef list Vector3dList; -typedef list Vector3dPtrList; - -typedef vector Vector3dGrid; -typedef vector Vector3dPtrGrid; - -typedef vector Vector2dArray; -typedef vector Vector2dPtrArray; -typedef list Vector2dList; -typedef list Vector2dPtrList; - -typedef vector Vector2dGrid; -typedef vector Vector2dPtrGrid; - -typedef vector DoubleArray; -typedef list DoubleList; - -typedef vector DoubleGrid; - -typedef vector IntArray; -typedef list IntList; - -typedef vector IntGrid; - -// Define some types/flags needed for subdivision surfaces and other operations -enum DLFLVertexType -{ - VTNormal = 0, - VTNewFacePoint = 1, - VTNewEdgePoint = 2, - VTNewPoint = 3, - VTOld = 4, - VTNewSub = 5, - VTWireInside = 6, - VTWire = 7, - VTWireSubD = 8, - VTWireSubDInside = 9 -}; - -enum DLFLFaceVertexType -{ - FVTNormal = 0, - FVTNew = 1, - FVTWire = 2 -}; - -enum DLFLEdgeType -{ - ETNormal = 0, - ETNew = 1, - ETCollapse = 2, - ETCollapseAux = 3, - ETOriginal = 4, - ETChull = 5, - ETdoNotDelete = 6, - ETdoDelete = 7 -}; - -enum DLFLFaceType -{ - FTNormal = 0, - FTNew = 1, - FTHole = 2, - FTHoleInside = 3, - FTWire = 4 -}; - - -//-- Common utility functions --// - -/* -Remove node specified by index from vector specified by array -It is assumed that order of elements within the array is not important. -Copy the last element to the specified index and delete the last element. -Iterators pointing to the deleted index and to the last element are invalidated. -Relative ordering of iterators is also changed for index, last element and adjacent nodes. -*/ - -template -inline void remove(vector& array, typename vector::size_type index) -{ - array[index] = array.back(); - array.pop_back(); -} - -// Functions to clear lists/arrays of pointers, where the lists/arrays own -// the objects pointed to. -// These are needed since the STL functions merely erase the node - -void erase_dvp(DLFLVertexPtr vp); -void erase_dfvp(DLFLFaceVertexPtr fvp); -void erase_dep(DLFLEdgePtr ep); -void erase_dfp(DLFLFacePtr fp); -void erase_dop(DLFLObjectPtr op); -void erase_dmp(DLFLMaterialPtr mp); - -void clear(DLFLVertexPtrArray& vparray); -void clear(DLFLFaceVertexPtrArray& fvparray); -void clear(DLFLEdgePtrArray& eparray); -void clear(DLFLFacePtrArray& fparray); -void clear(DLFLObjectPtrArray& oparray); -void clear(DLFLMaterialPtrArray& mparray); - -void clear(DLFLVertexPtrList& vplist); -void clear(DLFLFaceVertexPtrList& fvplist); -void clear(DLFLEdgePtrList& eplist); -void clear(DLFLFacePtrList& fplist); -void clear(DLFLObjectPtrList& oplist); -void clear(DLFLMaterialPtrList& mplist); - -} // end namespace - -#endif /* #ifndef _DLFL_COMMON_HH_ */ diff --git a/topmodx/include/dlflcore/DLFLCore.cc b/topmodx/include/dlflcore/DLFLCore.cc deleted file mode 100644 index 955d809..0000000 --- a/topmodx/include/dlflcore/DLFLCore.cc +++ /dev/null @@ -1,1278 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLCore.cc - */ - -#include "DLFLCore.h" -#include -#include - -namespace DLFL -{ - -/*************** -* Insert Edge * -***************/ - -int insertEdge( - DLFLObjectPtr obj, - uint &faceId1, uint &vertId1, - uint &faceId2, uint &vertId2, - uint &faceId1b, uint &vertId1b, - uint &faceId2b, uint &vertId2b, - bool check, - bool set_type) -{ - int id = -1; - - if (!obj) - return -1; - DLFLFacePtr fptr1, fptr2; - DLFLFaceVertexPtr fvptr1 = nullptr, fvptr2 = nullptr; - DLFLFaceVertexPtr fvptr1b = nullptr, fvptr2b = nullptr; - - DLFLEdgePtr eptr; - - fptr1 = obj->findFace(faceId1); - fptr2 = obj->findFace(faceId2); - if (fptr1 && fptr2) - { - fvptr1 = fptr1->findFaceVertex(vertId1); - fvptr2 = fptr2->findFaceVertex(vertId2); - - if (fvptr1 && fvptr2) - { - if (check) - eptr = insertEdge(obj, fvptr1, fvptr2, set_type); - else - eptr = insertEdgeWithoutCheck(obj, fvptr1, fvptr2, set_type); - if (eptr != 0) - id = eptr->getID(); - - faceId1 = fvptr1->getFaceID(); - faceId2 = fvptr2->getFaceID(); - vertId1 = fvptr1->getVertexID(); - vertId2 = fvptr2->getVertexID(); - - fvptr1b = fvptr1->next(); - fvptr2b = fvptr2->next(); - faceId1b = fvptr1b->getFaceID(); - faceId2b = fvptr2b->getFaceID(); - vertId1b = fvptr1b->getVertexID(); - vertId2b = fvptr2b->getVertexID(); - } - } - return id; -} - -DLFLEdgePtr insertEdge( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - bool set_type, DLFLMaterialPtr matl) -{ - if (coFacial(fvptr1, fvptr2)) - { - if (fvptr1 != fvptr2) - return insertEdgeCoFacial(obj, fvptr1, fvptr2, set_type); - return nullptr; - } - return insertEdgeNonCoFacial(obj, fvptr1, fvptr2, matl); -} - -DLFLEdgePtr insertEdgeCoFacial( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - bool set_type) -{ - //Insert an edge between 2 corners in the same face.Doesn 't check if both - // corners are in the same face or not - // Insertion of the Edge will split the Face into 2 faces - DLFLFacePtr fp = fvptr1->getFacePtr(); - DLFLMaterialPtr matl = fp->material(); - - DLFLEdgePtr edgeptr; - //Pointer to the new Edge - DLFLFacePtr newfaceptr; - //Pointers to the new Faces - DLFLFaceVertexPtr fvp, temp; - DLFLEdgePtr ep; - - //Only 1 new face is created. - newfaceptr = new DLFLFace(matl); - - //Use same type as fp for the new face.Useful for doo - Sabin subdivision - newfaceptr->setType(fp->getType()); - - //Set type if caller requested it - if (set_type) - { - //Reset types of the 2 FaceVertexes - fvptr1->resetType(); - fvptr2->resetType(); - fp->setType(FTNew); - newfaceptr->setType(FTNew); - } - //Create the new face.Add a copy of fvptr1 to the new face - // Update edge which originally pointed to fvptr1 to point to new face vertex - temp = newfaceptr->addVertex(fvptr1); - - //Copy needs to be made - temp->addSelfToVertex(); - ep = fvptr1->getEdgePtr(); - - if (ep == nullptr) - return nullptr; - - ep->resetFaceVertexPtr(fvptr1); - ep->setNullFaceVertexPtr(temp); - - //Remove face - vertices from fvptr1 to fvptr2 - // from old face and add it to the new face - fvp = fvptr1->next(); - while (fvp != fvptr2) - { - //Remove fvp from old face and add it to the new face - temp = fvp->next(); - fp->deleteVertexPtr(fvp); - newfaceptr->addVertexPtr(fvp); - fvp = temp; - } - - //Remove fvptr2 from old face - fp->deleteVertexPtr(fvptr2); - - //Add copy of fvptr2 to old face after fvptr1 - temp = fp->insertAfter(fvptr1, fvptr2, true); - temp->addSelfToVertex(); - - //Add fvptr2 to new face - newfaceptr->addVertexPtr(fvptr2); - - //Update edge which originally pointed to fvptr2 to point to the copy - ep = fvptr2->getEdgePtr(); - ep->resetFaceVertexPtr(fvptr2); - ep->setNullFaceVertexPtr(temp); - - //Add new face to face list - obj->addFacePtr(newfaceptr); - - //Create the new Edge and do necessary updates - edgeptr = new DLFLEdge; - edgeptr->setFaceVertexPointers(fvptr1, fvptr2); - edgeptr->updateFaceVertices(); - obj->addEdgePtr(edgeptr); - if (set_type) - edgeptr->setType(ETNew); - - return edgeptr; -} - -DLFLEdgePtr insertEdgeNonCoFacial( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - DLFLMaterialPtr matl) -{ - //Insert an edge between 2 corners belonging to different faces - // Doesn 't check if the corners belong to different faces - DLFLFacePtr fp1 = fvptr1->getFacePtr(); - DLFLFacePtr fp2 = fvptr2->getFacePtr(); - - DLFLEdgePtr newedgeptr; - //The new Edge - DLFLFacePtr newfaceptr; - //The new Face - DLFLFaceVertexPtr fvp, temp; - int numverts1 = 0, numverts2 = 0; - //No.of verts in each face - - numverts1 = fp1->size(); - numverts2 = fp2->size(); - - //Reorder face 1 so that it ends at fvptr1 - fp1->reorder(fvptr1->next()); - - //Reorder face 2 so that it ends at fvptr2 - fp2->reorder(fvptr2->next()); - - //"New" face will be the larger of the old faces - // For now assume fp1 is the larger face - newfaceptr = fp1; - - //If a material is specified use it, otherwise stick with material of fp1 - if (matl) - newfaceptr->setMaterial(matl); - - //Add face - vertices from face 2 and remove them from face 2 - - // Check if fp2 is a point - sphere.If so, fvptr2 should be there only once - if (numverts2 > 1) - { - //Add copy of fvptr2.The edge which fvptr2 originally pointed to - // must be updated to point to the new face vertex - temp = newfaceptr->addVertex(fvptr2); - temp->addSelfToVertex(); - DLFLEdgePtr ep = fvptr2->getEdgePtr(); - ep->resetFaceVertexPtr(fvptr2); - ep->setNullFaceVertexPtr(temp); - } - //Go through all vertices in fp2 and add them to the new face and delete them from the old face - fvp = fp2->front(); - - do - { - temp = fvp->next(); - fp2->deleteVertexPtr(fvp); - newfaceptr->addVertexPtr(fvp); - fvp = temp; - } while (fp2->front()); - - //Check if fp1 is a point - sphere.If so, fvptr1 should be there only once - if (numverts1 > 1) - { - //Add copy of fvptr1.The edge which fvptr1 originally pointed to - // must be updated to point to the new face vertex - temp = newfaceptr->addVertex(fvptr1); - temp->addSelfToVertex(); - DLFLEdgePtr ep = fvptr1->getEdgePtr(); - - ep->resetFaceVertexPtr(fvptr1); - ep->setNullFaceVertexPtr(temp); - } - //Delete face 2 from the face list and free the pointer - obj->removeFace(fp2); - delete fp2; - - //Create the new Edge and do necessary updates - newedgeptr = new DLFLEdge; - newedgeptr->setFaceVertexPointers(fvptr1, fvptr2); - obj->addEdgePtr(newedgeptr); - newedgeptr->updateFaceVertices(); - - return newedgeptr; -} - -DLFLEdgePtr insertEdgeWithoutCheck( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - bool set_type, DLFLMaterialPtr matl) -{ - if (coFacial(fvptr1, fvptr2)) - return insertEdgeCoFacial(obj, fvptr1, fvptr2, set_type); - return insertEdgeNonCoFacial(obj, fvptr1, fvptr2, matl); -} - -/*************** -* Delete Edge * -***************/ - -std::vector deleteEdgeID(DLFLObjectPtr obj, uint edgeId, bool cleanup) -{ - std::vector faceids; - - DLFLEdgePtr eptr = obj->findEdge(edgeId); - if (eptr == nullptr) - { - faceids.push_back(-1); - return faceids; - } - - DLFLFacePtrArray fpa = deleteEdge(obj, eptr, cleanup); - if (fpa.size() > 0) - { - for (int i = 0; i < fpa.size(); i++) - faceids.push_back(fpa[i]->getID()); - } - return faceids; -} - -DLFLFacePtrArray deleteEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, bool cleanup) -{ - DLFLFaceVertexPtr fvpV1, fvpV2; - DLFLFacePtr f1, f2; - - DLFLFacePtrArray rfpa; - - fvpV1 = nullptr; - fvpV2 = nullptr; - edgeptr->getFaceVertexPointers(fvpV1, fvpV2); - - f1 = fvpV1->getFacePtr(); - f2 = fvpV2->getFacePtr(); - - if (f1 != f2) - { - //Two edge sides belong to different faces - - // We 'll keep one of the old faces and delete the other one. - // We should keep the larger face and delete the smaller one - // For now we 'll assume that f1 is the larger face. Vertices from f2 - // will be added to f1.There will an overlap in face - vertices at the ends - // of the edge - - // Reorder f1 so that it ends at fvpV1 - f1->reorder(fvpV1->next()); - - //Reorder f2 so that it ends at fvpV2 - f2->reorder(fvpV2->next()); - - //Remove fvpV1 from f1 - f1->deleteVertexPtr(fvpV1); - - //Go through vertices of f2 starting at the beginning and add all of them except fvpV2 - // Also remove them from f2 - DLFLFaceVertexPtr next, temp = nullptr; - temp = f2->front(); - while (temp != fvpV2) - { - next = temp->next(); - f2->deleteVertexPtr(temp); - f1->addVertexPtr(temp); - temp = next; - } - - //Remove fvpV2 from f2 - f2->deleteVertexPtr(fvpV2); - - //Remove fvpV1 and fvpV2 from the face - vertex - lists of their vertices - fvpV1->deleteSelfFromVertex(); - fvpV2->deleteSelfFromVertex(); - - //Free memory for fvpV1 and fvpV2 - delete fvpV1; - delete fvpV2; - - //The Edge can now be removed from the EdgeList - // Free the pointer also since the edge_list owns the DLFLEdge pointed to by edgeptr - obj->removeEdge(edgeptr); - delete edgeptr; - - //Destroy f2 and delete it from the face list - f2->destroy(); - obj->removeFace(f2); - delete f2; - rfpa.push_back(f1); - } - else - { - //Two edge sides belong to same face - - // Split the Face to get 2 new faces - // Without loss of generality, f1 will be used to refer to the Face - - // 1 new face will be created. - DLFLFacePtr nfp = new DLFLFace(f1->material()); - rfpa.push_back(f1); - rfpa.push_back(nfp); - DLFLFaceVertexPtr fvpTemp, temp; - - //Reorder the face so that face starts at vertex after fvpV2 - f1->reorder(fvpV2->next()); - - //Start at vertex after fvpV1, remove from face and add to new face till we reach fvpV2 - // Don 't add fvpV2 unless fvpV2 is right after fvpV1, in which case we will have a point sphere - fvpTemp = fvpV1->next(); - if (fvpTemp == fvpV2) - { - //Add fvpV2.nfp will be a point sphere.Add a copy since fvpV2 will be deleted later on - // Since nfp will be a point sphere adding a copy will not affect any other pointers - temp = nfp->addVertex(fvpV2); - temp->addSelfToVertex(); - temp->setEdgePtr(nullptr); - } - //Loop will execute only if nfp is not a point sphere - while (fvpTemp != fvpV2) - { - temp = fvpTemp->next(); - f1->deleteVertexPtr(fvpTemp); - nfp->addVertexPtr(fvpTemp); - fvpTemp = temp; - } - - //Remove fvpV2 from f1 and free the pointer.Remove fvpV2 from face - vertex - list of its vertex also - f1->deleteVertexPtr(fvpV2); - fvpV2->deleteSelfFromVertex(); - delete fvpV2; - - //Now check if fvpV1 is the only vertex in f1.If so f1 becomes a point sphere - // Don 't delete fvpV1 from f1. Otherwise delete fvpV1 from f1 and free the pointer - if (fvpV1->next() != fvpV1) - { - //Remove fvpV1 from the face - vertex - list of its vertex also - f1->deleteVertexPtr(fvpV1); - fvpV1->deleteSelfFromVertex(); - delete fvpV1; - } - //The Edge can now be removed from the EdgeList - // Free the pointer also, since edge_list owns the object pointed to by edgeptr - obj->removeEdge(edgeptr); - delete edgeptr; - - //Add the new Face to the FaceList - obj->addFacePtr(nfp); - - //If f1 ends up being a point sphere, reset the EdgePtr field of it 's only corner - if (f1->size() == 1) - { - DLFLFaceVertexPtr fvp = f1->firstVertex(); - //DLFLVertexPtr vp = fvp->vertex; - //obj->removeVertex(vp); delete vp; - - fvp->setEdgePtr(nullptr); - //f1 is now a PointSphere - } - //Check if we have to cleanup point - spheres - if (cleanup) - { - //If either f1 or nfp is a point - sphere, completely remove it from the - // object and also the vertex in that face - DLFLFaceVertexPtr fvp; - DLFLVertexPtr vp; - - if (f1->size() == 1) - { - fvp = f1->firstVertex(); - vp = fvp->vertex; - obj->removeVertex(vp); - delete vp; - - f1->destroy(); - obj->removeFace(f1); - if (!rfpa.empty()) - rfpa.erase(rfpa.begin()); - delete f1; - } - if (nfp->size() == 1) - { - fvp = nfp->firstVertex(); - vp = fvp->vertex; - obj->removeVertex(vp); - delete vp; - - nfp->destroy(); - obj->removeFace(nfp); - if (!rfpa.empty()) - rfpa.erase(--(rfpa.end())); - delete nfp; - } - } - } - return rfpa; -} - -void deleteEdge(DLFLObjectPtr obj, uint edge_index, bool cleanup) -{ - //Find the EdgePtr for the given edge_index from the EdgeList and delete it - if (edge_index > obj->num_edges()) - return; - - DLFLEdgePtrList::iterator i = obj->beginEdge(); - advance(i, edge_index); - deleteEdge(obj, *i, cleanup); -} - -/***************** -* Collapse Edge * -*****************/ - -int collapseEdgeID(DLFLObjectPtr obj, const uint edgeId, bool cleanup) -{ - DLFLEdgePtr ep = obj->findEdge(edgeId); - - if (ep == nullptr) return -1; - - DLFLVertexPtr vp; - vp = collapseEdge(obj, ep, cleanup); - - if (vp) - return vp->getID(); - else - return -1; -} - -DLFLVertexPtr collapseEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, bool cleanup) -{ - //Collapse an edge - merge two vertices into one after removing in - between edge - if (edgeptr == nullptr) - return nullptr; - - //If the edge is a self - loop, just delete the edge with cleanup - if (edgeptr->isSelfLoop()) - { - deleteEdge(obj, edgeptr, true); - return nullptr; - } - DLFLFaceVertexPtr efvp1, efvp2; - DLFLVertexPtr vp1, vp2; - DLFLEdgePtr ep1next, ep1prev, ep2next, ep2prev; - - edgeptr->getFaceVertexPointers(efvp1, efvp2); - vp1 = efvp1->getVertexPtr(); - vp2 = efvp2->getVertexPtr(); - - //Adjust coordinates of vp1 to be midpoint of collapsed edge - vp1->setCoords(edgeptr->getMidPoint()); - - //Find edges adjacent to specified edge. - // If cleanup is required some of them will be deleted later on - ep1next = (efvp1->next())->getEdgePtr(); - ep1prev = (efvp1->prev())->getEdgePtr(); - ep2next = (efvp2->next())->getEdgePtr(); - ep2prev = (efvp2->prev())->getEdgePtr(); - - //Vertex 1(vp1, efvp1) will remain and vertex 2(vp2, efvp2) will be removed - - // First adjust edge pointer of efvp1 and correspondingly adjust the face - vertex pointer - // of the edge to which efvp1 will point after removal of vertex 2 - // Also remove the FVP after efvp1 from the face - DLFLFaceVertexPtr efvp1_next = efvp1->next(); - DLFLEdgePtr efvp1_next_ep = efvp1_next->getEdgePtr(); - - //Remove efvp1_next from Edge, Vertex and Face and delete the pointer itself - efvp1_next->deleteSelfFromEdge(); - efvp1_next->deleteSelfFromVertex(); - efvp1_next->deleteSelfFromFace(); - delete efvp1_next; - - //Reset edge pointer of efvp1 and make the edge point back to efvp1 - efvp1->setEdgePtr(efvp1_next_ep); - efvp1->addSelfToEdge(); - - //Remove efvp2 from Vertex and Face and delete the pointer itself. - // Removal from Edge is not necessary since the Edge itself is going to be deleted - // For the same reason no edge pointers have to be adjusted - efvp2->deleteSelfFromVertex(); - efvp2->deleteSelfFromFace(); - delete efvp2; - - //Go through all remaining face - vertices referring to vp2 and make them point - // to vp1 instead.Since vp2 is going to be deleted anyway, these face - vertices - // need not be removed from vp2 's list. - DLFLFaceVertexPtrArray fvparray; - vp2->getFaceVertices(fvparray); - for (int i = 0; i < (int)fvparray.size(); ++i) - { - fvparray[i]->setVertexPtr(vp1); - vp1->addToFaceVertexList(fvparray[i]); - } - - //Delete Vertex 2(vp2) from Vertex list and free memory - obj->removeVertex(vp2); - delete vp2; - - //Delete edge to be collapsed from edge list and free memory - obj->removeEdge(edgeptr); - delete edgeptr; - - //Do cleanup of 2 - gons if boolean flag is true - if (cleanup == true) - { - if (ep1next->getOtherVertexPointer(vp1) == ep1prev->getOtherVertexPointer(vp1)) - { - //Remove ep1next - deleteEdge(obj, ep1next, true); - } - if (ep2next->getOtherVertexPointer(vp1) == ep2prev->getOtherVertexPointer(vp1)) - { - //Remove ep2prev - deleteEdge(obj, ep2prev, true); - } - } - - return vp1; -} - -void collapseEdge(DLFLObjectPtr obj, uint edge_index, bool cleanup) -{ - //Find the EdgePtr for the given edge_index from the EdgeList and collapse it - if (edge_index > obj->num_edges()) - return; - - DLFLEdgePtrList::iterator i = obj->beginEdge(); - advance(i, edge_index); - collapseEdge(obj, *i, cleanup); -} - -/****************** -* Subdivide Edge * -******************/ - -int subdivideEdgeID(DLFLObjectPtr obj, uint edgeId, bool set_type) -{ - DLFLEdgePtr ep = obj->findEdge(edgeId); - - if (ep == nullptr) return -1; - - DLFLVertexPtr vp; - vp = subdivideEdge(obj, ep, set_type); - - if (vp) - return vp->getID(); - else - return -1; -} - -DLFLVertexPtr subdivideEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, bool set_type) -{ - //Sub - divide an Edge into 2 Edges.A new Vertex will be added at the midpoint - // belonging to both Faces on either side of the original Edge - DLFLFaceVertexPtr fvpV1, fvpV2; - DLFLFacePtr f1, f2; - - fvpV1 = nullptr; - fvpV2 = nullptr; - - edgeptr->getFaceVertexPointers(fvpV1, fvpV2); - - if (fvpV1 == nullptr || fvpV2 == nullptr) - return nullptr; - - f1 = fvpV1->getFacePtr(); - f2 = fvpV2->getFacePtr(); - - if (f1 == nullptr || f2 == nullptr) - return nullptr; - - //Edge subdivision will work whether the two Edge sides belong to different Faces - // or not. - DLFLVertexPtr nvp = new DLFLVertex; - - obj->addVertexPtr(nvp); - - //Create the 2 new FaceVertexes - DLFLFaceVertexPtr newfv1, newfv2; - - newfv1 = new DLFLFaceVertex; - newfv2 = new DLFLFaceVertex; - - //Set the VertexPtr and FacePtr fields of the new FaceVertexes - newfv1->setVertexPtr(nvp); - newfv1->setFacePtr(f1); - newfv2->setVertexPtr(nvp); - newfv2->setFacePtr(f2); - - DLFLFaceVertexType vt1, vt2; - //Set type if caller requested it - if (set_type) - { - //Always set it to new Edge point.Caller can change it to a new Face point - // at the appropriate places - nvp->setType(VTNewEdgePoint); - newfv1->setType(FVTNew); - newfv2->setType(FVTNew); - vt1 = newfv1->getType(); - vt2 = newfv2->getType(); - } - //Insert the new FaceVertexes into the respective - // Faces at the appropriate locations - //check if they are null - added by dave - if (f1 && newfv1) - f1->insertAfter(fvpV1, newfv1, false); - - if (f2 && newfv2) - f2->insertAfter(fvpV2, newfv2, false); - - //Average the normals, coordinates, color and texture coordinates - average(fvpV1, f1->nextFaceVertex(newfv1), newfv1); - average(fvpV2, f2->nextFaceVertex(newfv2), newfv2); - - //Add the 2 new FaceVertexes to the list in Vertex - nvp->addToFaceVertexList(newfv1); - nvp->addToFaceVertexList(newfv2); - - //Create the 2 new Edges - DLFLEdgePtr nep1, nep2; - - nep1 = new DLFLEdge; - nep2 = new DLFLEdge; - - nep1->setFaceVertexPointers(fvpV1, newfv2); - nep2->setFaceVertexPointers(newfv1, fvpV2); - - //Set type of new Edge if caller requested it - if (set_type) - { - nep1->setType(ETNew); - nep2->setType(ETNew); - } - //Remove the existing Edge from the EdgeList - // Free the pointer also - obj->removeEdge(edgeptr); - delete edgeptr; - - //Add the 2 new Edges into the EdgeList - obj->addEdgePtr(nep1); - obj->addEdgePtr(nep2); - - //Update the EdgePtr fields of the 2 FaceVertexes - newfv1->setEdgePtr(nep2); - newfv2->setEdgePtr(nep1); - fvpV1->setEdgePtr(nep1); - fvpV2->setEdgePtr(nep2); - - return nvp; -} - -DLFLVertexPtr subdivideEdge(DLFLObjectPtr obj, uint edge_index) -{ - //Find the EdgePtr for the given edge_index from the EdgeList and sub - divide it - if (edge_index >= obj->num_edges()) - return nullptr; - - DLFLEdgePtrList::iterator i = obj->beginEdge(); - advance(i, edge_index); - return subdivideEdge(obj, *i); -} - -vector subdivideEdgeID(DLFLObjectPtr obj, int num_divs, uint edgeId, bool set_type) -{ - DLFLEdgePtr ep = obj->findEdge(edgeId); - DLFLVertexPtrArray vpa; - vector vIDs; - - vpa = subdivideEdge(obj, num_divs, ep, set_type); - - if (vpa.size() > 0) - { - for (int i = 0; i < (int)vpa.size(); i++) - { - vIDs.push_back(vpa[i]->getID()); - } - } - - return vIDs; -} - -DLFLVertexPtrArray subdivideEdge(DLFLObjectPtr obj, int num_divs, DLFLEdgePtr edgeptr, bool set_type) -{ - DLFLVertexPtrArray newVerts; - //Sub - divide an edge into several edges.Does this by repeatedly calling - // subdivideEdge(edgeptr, set_type) which subdivides into 2 parts. - // Coordinates of the new points are set using the returned vertex pointer - if (num_divs < 2) - return newVerts; - if (num_divs > 2) - { - DLFLVertexPtr newvptr; - DLFLEdgePtr eptr; - Vector3d p1, p2, p, dp; - - edgeptr->getEndPoints(p1, p2); - dp = (p2 - p1) / double(num_divs); - eptr = edgeptr; - for (int i = 1; i < num_divs; ++i) - { - p = p1 + double(i) * dp; - newvptr = subdivideEdge(obj, eptr, set_type); - newvptr->coords = p; - newVerts.push_back(newvptr); - - //Find the last edge from the edge_list. - // NOTE:This is not an arbitrary choice - // The last edge in the list will be the edge from midpoint - // to the second vertex(p1) of the original edge - eptr = obj->lastEdge(); - } - } - else - { - //Simple call the regular subdivideEdge - DLFLVertexPtr newvptr = subdivideEdge(obj, edgeptr, set_type); - newVerts.push_back(newvptr); - } - - return newVerts; -} - -void subdivideEdge(DLFLObjectPtr obj, int num_divs, uint edge_index) -{ - //Find the EdgePtr for the given edge_index from the EdgeList and sub - divide it - if (edge_index < obj->num_edges()) - { - DLFLEdgePtrList::iterator i = obj->beginEdge(); - advance(i, edge_index); - subdivideEdge(obj, num_divs, *i); - } -} - -void trisectEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, double num, bool scale, bool set_type) -{ - //Split the edge into 3. New points will be calculated based on scale factor - // with respect to mid point of edge OR offset from end points - // Boolean flag indicates if specified number is a scale factor or offset distance - // Offset distance is clamped to lie between 0.01 and edgelength / 2 - 0.01 - // Scale factor is clamped to lie between 0.01 and 0.99(inclusive) - //Store the end points of the edge - DLFLVertexPtr evp1, evp2; - edgeptr->getVertexPointers(evp1, evp2); - - //Find coordinates of the new points - Vector3d ep1, ep2, mp1, mp2, mid; - ep1 = evp1->coords; - ep2 = evp2->coords; - - if (scale == true) - { - //Given number is a scale factor - // Clamp scale factor to lie between 0.01 and 0.99 - if (num > 0.99) - num = 0.99; - else if (num < 0.01) - num = 0.01; - - mid = (ep1 + ep2) * 0.5; - mp1 = num * ep1 + (1.0 - num) * mid; - mp2 = num * ep2 + (1.0 - num) * mid; - } - else - { - //Given number is an offset distance from end points - // Clamp offset distance to be between 0.01 and(edge_length / 2) - 0.01 - double maxoffset = edgeptr->length() / 2.0 - 0.01; - - if (num < 0.01) - num = 0.01; - else if (num > maxoffset) - num = maxoffset; - - Vector3d evec = ep2 - ep1; - - normalize(evec); - mp1 = ep1 + num * evec; - mp2 = ep2 - num * evec; - } - - DLFLVertexPtr mvp1, mvp2; - - //Subdivide edge into 2 first - // Adjust coordinates of midpoint - mvp1 = subdivideEdge(obj, edgeptr); - mvp1->coords = mp1; - - //Subdivide the last edge in the list into 2 again - // Adjust coordinates of midpoint - mvp2 = subdivideEdge(obj, obj->lastEdge()); - mvp2->coords = mp2; - - if (set_type) - { - mvp1->setType(VTNewPoint); - mvp2->setType(VTNewPoint); - } -} - -void subdivideAllEdges(DLFLObjectPtr obj, int num_divs, bool set_type) -{ - //Go through edge list and sub - divide all the old edges - DLFLEdgePtrList::iterator first; - DLFLEdgePtr ep; - int num_edges, num_old_edges; - - num_old_edges = obj->num_edges(); - num_edges = 0; - first = obj->beginEdge(); - while (num_edges < num_old_edges) - { - ep = (*first); - ++first; - ++num_edges; - subdivideEdge(obj, num_divs, ep, set_type); - } -} - -void subdivideNonLoopingEdges(DLFLObjectPtr obj, int num_divs, bool set_type) -{ - //Go through edge list and sub - divide all the old edges which are not self - loops - DLFLEdgePtrList::iterator first; - DLFLEdgePtr ep; - int num_edges, num_old_edges; - - num_old_edges = obj->num_edges(); - num_edges = 0; - first = obj->beginEdge(); - while (num_edges < num_old_edges) - { - ep = (*first); - ++first; - ++num_edges; - if (!(ep->isSelfLoop())) - subdivideEdge(obj, num_divs, ep, set_type); - } -} - -void spliceCorners(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2) -{ - DLFLEdgePtr ep = insertEdge(obj, fvptr1, fvptr2); - if (ep != nullptr) - collapseEdge(obj, ep); -} - -DLFLObjectPtr readObjectFile(char* filename, char *mtlfilename) -{ - DLFLObjectPtr obj; - ifstream file, mtlfile; - - file.open(filename); - mtlfile.open(mtlfilename); - - if (!file) - { - return nullptr; - } - - obj = new DLFLObject(); - - char* ext = strrchr(filename, '.'); - - if (strcasecmp(ext, ".obj") == 0) - { - obj->readObject(file, mtlfile); - obj->setFilename(filename); - } - else if (strcasecmp(ext, ".dlfl") == 0) - { - obj->readDLFL(file, mtlfile); - obj->setFilename(filename); - } - else - { - delete obj; - obj = nullptr; - } - - obj->computeNormals(); - - file.close(); - mtlfile.close(); - return obj; -} - -bool writeObjectFile(DLFLObject *obj, char* filename, char *mtlfilename) -{ - ofstream file, mtlfile; - if (filename == nullptr) - filename = obj->getFilename(); - - file.open(filename); - - if (mtlfilename != nullptr) - { - mtlfile.open(mtlfilename); - } - - if (!file) - return false; - - char* ext = strrchr(filename, '.'); - bool wrote = false; - if (strcasecmp(ext, ".obj") == 0) - { - obj->writeObject(file, mtlfile, true, true); - //obj->setFilename( filename ); - } - else if (strcasecmp(ext, ".dlfl") == 0) - { - obj->writeDLFL(file, mtlfile, false); - //obj->setFilename( filename ); - } - else if (strcasecmp(ext, ".m") == 0) - { - obj->writeLG3d(file, false); - //obj->setFilename( filename ); - } - else if (strcasecmp(ext, ".stl") == 0) - { - obj->writeSTL(file); - //obj->setFilename( filename ); - } - if (mtlfilename != nullptr) - { - mtlfile.close(); - } - file.close(); - return wrote; -} - -/** -* Cleanup -*/ - -void edgeCleanup(DLFLObjectPtr obj) -{ - edgeCleanup(obj, obj->getEdgeList()); -} - -void edgeCleanup(DLFLObjectPtr obj, const DLFLEdgePtrList& edges) -{ - DLFLEdgePtrList deletion_list; // List of edges to be deleted - DLFLEdgePtrList::const_iterator first, last; - DLFLEdgePtr edge; - DLFLFacePtr fp1, fp2; - - // First go through all edges and find out ones which have to be deleted. - // If we do deletion on the fly, some normal computation could be affected - // causing errors - first = edges.begin(); last = edges.end(); - while (first != last) - { - edge = (*first); ++first; - edge->getFacePointers(fp1, fp2); - - if (fp1 != fp2) - { - Vector3d fp1n = fp1->computeNormal(); - Vector3d fp2n = fp2->computeNormal(); - if (Abs(fp1n*fp2n - 1.0) < 1.0e-5) - { - // Normals of faces on both sides of edge are same - // This edge can be deleted - deletion_list.push_back(edge); - } - } - else - deletion_list.push_back(edge); - } - - first = deletion_list.begin(); last = deletion_list.end(); - while (first != last) - { - edge = (*first); ++first; - deleteEdge(obj, edge, true); - } -} -void edgeCleanup(DLFLObjectPtr obj, const DLFLEdgePtrArray& edges) -{ - DLFLEdgePtrList deletion_list; // List of edges to be deleted - DLFLEdgePtrList::iterator first, last; - DLFLEdgePtr edge; - DLFLFacePtr fp1, fp2; - - // First go through all edges and find out ones which have to be deleted. - // If we do deletion on the fly, some normal computation could be affected - // causing errors - for (int i = 0; i < edges.size(); ++i) - { - edge = edges[i]; - edge->getFacePointers(fp1, fp2); - - if (fp1 != fp2) - { - Vector3d fp1n = fp1->computeNormal(); - Vector3d fp2n = fp2->computeNormal(); - if (Abs(fp1n*fp2n - 1.0) < 1.0e-5) - { - // Normals of faces on both sides of edge are same - // This edge can be deleted - deletion_list.push_back(edge); - } - } - else - deletion_list.push_back(edge); - } - - first = deletion_list.begin(); last = deletion_list.end(); - while (first != last) - { - edge = (*first); ++first; - deleteEdge(obj, edge, true); - } -} - -// Removes one of the edges in 2-gons -void cleanup2gons(DLFLObjectPtr obj) -{ - // Go through list of faces. If a 2-gon is found, - // delete one of the edges. - // We don't check for infinite loop, since if an edge belongs - // to a 2-gon deleting it will not create a new face - DLFLFacePtrList face_list = obj->getFaceList(); - DLFLFacePtrList::iterator ffirst = face_list.begin(), flast = face_list.end(); - DLFLFacePtr fp; - while (ffirst != flast) - { - fp = (*ffirst); ++ffirst; - if (fp && fp->size() == 2) - { - // Face is a 2-gon. - // Get one of the edges in the face and delete it - DLFLFaceVertexPtr fvp = fp->front(); - DLFLEdgePtr ep = fvp->getEdgePtr(); - deleteEdge(obj, ep, true); - } - } -} - -// Removes all winged (valence-2) vertices -void cleanupWingedVertices(DLFLObjectPtr obj) -{ - // Go through list of vertices. If a valence-2 vertex is found, - // find the 2 edges incident on that vertex. Insert an edge - // between the other vertices of the 2 edges belonging to - // the same face. Delete the edges incident on the valence-2 vertex - // with cleanup to get rid of the point sphere. - DLFLVertexPtrList vertex_list = obj->getVertexList(); - DLFLVertexPtrList::iterator vfirst = vertex_list.begin(), vlast = vertex_list.end(); - DLFLVertexPtr vp; - DLFLFaceVertexPtrArray fvparray; - DLFLEdgePtrArray eparray; - DLFLFaceVertexPtr fvp, pfvp, nfvp; - while (vfirst != vlast) - { - vp = (*vfirst); ++vfirst; - // If vp is a valence 2 vertex, it will be removed, so increment the iterator now itself - if (vp->valence() == 2) - { - vp->getFaceVertices(fvparray); - vp->getEdges(eparray); - - // Pick the first face vertex in the array - fvp = fvparray[0]; - - // Find the previous and next corners to fvp - pfvp = fvp->prev(); nfvp = fvp->next(); - - if (pfvp == nfvp) - { - // We have a disconnected 2-gon (consisting of 2 faces, 2 vertices and 2 edges) - // This component will be left as is. Deleting this component is tricky, since - // we are traversing the vertex list and can't remove vertices arbitrarily - // We can keep track of such cases and handle them outside the loop - } - else - { - // Insert an edge between pfvp and nfvp - // We know that both belong to the same face - insertEdgeCoFacial(obj, pfvp, nfvp); - - // Now delete the 2 edges incident on the valence-2 vertex with cleanup - deleteEdge(obj, eparray[0], true); - deleteEdge(obj, eparray[1], true); - } - - } - } -} - - -void splitValence2Vertices(DLFLObjectPtr obj, double offset) -{ - // Split all valence 2 vertices into 2 vertices separated by given offset - // If offset is negative the vertices are moved by a distance proportional to the - // length of the edges. - // Intended for use primarily after a Doo-Sabin type subdivision - // where the original object has a valence 1 vertex - // NOTE: Splitting a valence 2 vertex produces 2 new valence 2 vertices - // They should not be split further. So we first create a list of valence 2 - // vertices and then go through that list and split them - - DLFLVertexPtrList::iterator vl_first, vl_last; - DLFLVertexPtr vp = nullptr; - DLFLVertexPtrList splitvp; - - DLFLVertexPtrList vertex_list = obj->getVertexList(); - vl_first = vertex_list.begin(); vl_last = vertex_list.end(); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - if (vp->valence() == 2) - splitvp.push_back(vp); - } - - vl_first = splitvp.begin(); vl_last = splitvp.end(); - while (vl_first != vl_last) - { - vp = (*vl_first); ++vl_first; - DLFLEdgePtrArray eparray; - vp->getEdges(eparray); // There will be 2 edges in the array - - DLFLEdgePtr e1 = eparray[0], e2 = eparray[1]; - DLFLVertexPtr e1v1, e1v2, e2v1, e2v2; - - e1->getVertexPointers(e1v1, e1v2); - e2->getVertexPointers(e2v1, e2v2); - - Vector3d e1vec, e2vec; - double e1len, e2len; - e1vec = e1v2->coords - e1v1->coords; e1len = normalize(e1vec); - e2vec = e2v2->coords - e2v1->coords; e2len = normalize(e2vec); - - if (e1v2 == vp) e1vec = -e1vec; - if (e2v2 == vp) e2vec = -e2vec; - - // e1vec and e2vec will now be unit vectors along the 2 edges - // with vp as the origin - - // Subdivide e2 - DLFLVertexPtr newvp = subdivideEdge(obj, e2); - - // Adjust coordinates of vp and newvp using vp as origin and separated - // by given offset. Vertices are moved along directions calculated - // using the edge vectors - Vector3d origin = vp->coords; - - if (offset > 0.0) - { - vp->coords = origin + offset * normalized(e1vec - e2vec); - newvp->coords = origin + offset * normalized(e2vec - e1vec); - } - else - { - vp->coords = origin + 0.1 * e1len * normalized(e1vec - e2vec); - newvp->coords = origin + 0.1 * e2len * normalized(e2vec - e1vec); - } - - // Set type of vp and newvp so they don't get split again - vp->setType(VTNewEdgePoint); newvp->setType(VTNewPoint); - } -} - -uint* createVertex(double x, double y, double z, DLFLObjectPtr &obj, bool set_type) -{ - Vector3d pos(x, y, z); - DLFLFaceVertexPtr fv = obj->createPointSphere(pos); - uint *id = new uint[2]; - id[0] = fv->getFaceID(); - id[1] = fv->getVertexID(); - return id; -} - -void removeVertex(const DLFLObjectPtr &obj, uint vertId, uint faceId) -{ - if (!obj) return; - - DLFLFacePtr fptr1 = obj->findFace(faceId); - DLFLFaceVertexPtr fvptr1 = fptr1->findFaceVertex(vertId); - obj->removePointSphere(fvptr1); -} -} // end namespace DLFL diff --git a/topmodx/include/dlflcore/DLFLCore.h b/topmodx/include/dlflcore/DLFLCore.h deleted file mode 100644 index 16552da..0000000 --- a/topmodx/include/dlflcore/DLFLCore.h +++ /dev/null @@ -1,148 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLCore.hh - */ - -#ifndef _DLFLCORE_H_ -#define _DLFLCORE_H_ - -#include "DLFLObject.h" - -namespace DLFL { - -/*************** -* Insert Edge * -***************/ - -int insertEdge( - DLFLObjectPtr obj, - uint &faceId1, uint &vertId1, - uint &faceId2, uint &vertId2, - uint &faceId1b, uint &vertId1b, - uint &faceId2b, uint &vertId2b, - bool check, bool set_type = false); - -/** -* The general case insertEdge subroutine. Calls one of the insertEdge implementations, -* depending on whether the corners are cofacial or not. If the 2 corners are cofacial -* checks to see if the 2 pointers refer to the same corner, if so doesn't do insert. -*/ -DLFLEdgePtr insertEdge(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, bool set_type = false, DLFLMaterialPtr matl = nullptr); -DLFLEdgePtr insertEdgeCoFacial(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, bool set_type = false); -DLFLEdgePtr insertEdgeNonCoFacial(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, DLFLMaterialPtr matl = nullptr); -DLFLEdgePtr insertEdgeWithoutCheck(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, bool set_type = false, DLFLMaterialPtr matl = nullptr); - -/*************** -* Delete Edge * -***************/ - -// If the cleanup flag is true, any point-spheres created -// because of the edge deletion will be removed from the object -std::vector deleteEdgeID(DLFLObjectPtr obj, uint edgeId, bool cleanup = true); -void deleteEdge(DLFLObjectPtr obj, uint edge_index, bool cleanup = true); -DLFLFacePtrArray deleteEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, bool cleanup = true); - -/***************** -* Collapse Edge * -*****************/ - -int collapseEdgeID(DLFLObjectPtr obj, const uint edgeId, bool cleanup = true); -void collapseEdge(DLFLObjectPtr obj, uint edge_index, bool cleanup = true); -DLFLVertexPtr collapseEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, bool cleanup = true); - -/****************** -* Subdivide Edge * -******************/ - -// Return pointer to the newly added vertex -int subdivideEdgeID(DLFLObjectPtr obj, uint edgeId, bool set_type = false); -DLFLVertexPtr subdivideEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, bool set_type = false); -DLFLVertexPtr subdivideEdge(DLFLObjectPtr obj, uint edge_index); - -// Subdivide into multiple edges -vector subdivideEdgeID(DLFLObjectPtr obj, int num_divs, uint edgeId, bool set_type = false); -DLFLVertexPtrArray subdivideEdge(DLFLObjectPtr obj, int num_divs, DLFLEdgePtr edgeptr, bool set_type = false); -void subdivideEdge(DLFLObjectPtr obj, int num_divs, uint edge_index); - -// Trisect an edge - new points will be calculated based on scale factor -// with respect to mid point of edge OR offset from end points -// Boolean flag indicates if specified number is a scale factor or offset distance -// Offset distance is clamped to lie between 0.01 and edgelength/2 - 0.01 -// Scale factor is clamped to lie between 0.01 and 0.99 (inclusive) -void trisectEdge(DLFLObjectPtr obj, DLFLEdgePtr edgeptr, double num, bool scale, bool set_type); - -// Subdivide all edges in the object -void subdivideAllEdges(DLFLObjectPtr obj, int num_divs = 2, bool set_type = false); - -// Subdivide all edges in the object which are not self loops -void subdivideNonLoopingEdges(DLFLObjectPtr obj, int num_divs = 2, bool set_type = false); - -// Split valence 2 vertices into 2 vertices -void splitValence2Vertices(DLFLObjectPtr obj, double offset = -0.1); - -// Splice two corners -// Insert edge and then collapse edge -void spliceCorners(DLFLObjectPtr obj, DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2); - -/** -* If both sides of an edge are co-planar, the edge will be removed. -* First version looks at all edges in the object. -* Second and third version looks at the specified list/array of edges -*/ -void edgeCleanup(DLFLObjectPtr obj); -void edgeCleanup(DLFLObjectPtr obj, const DLFLEdgePtrList& edges); -void edgeCleanup(DLFLObjectPtr obj, const DLFLEdgePtrArray& edges); - -void cleanup2gons(DLFLObjectPtr obj); -/** -* Cleanup Valence 2 vertices (winged vertices) -* Removes all winged vertices -*/ -void cleanupWingedVertices(DLFLObjectPtr obj); - -/*********************** -* Read In Object Data * -***********************/ - -/* Create a DLFL object from an input stream which should contain -* an object in OBJ format */ -DLFLObject* readObjectFile(char* filename, char *mtlfilename = nullptr); -bool writeObjectFile(DLFLObject *obj, char* filename = nullptr, char *mtlfilename = nullptr); - -/************************ -* Create/Remove Vertex * -************************/ - -uint* createVertex(double x, double y, double z, DLFLObjectPtr &obj, bool set_type = false); -void removeVertex(const DLFLObjectPtr &obj, uint vertId, uint faceId); - -} // end namespace DLFL - -#endif // _DLFLCORE_H_ diff --git a/topmodx/include/dlflcore/DLFLCoreExt.cc b/topmodx/include/dlflcore/DLFLCoreExt.cc deleted file mode 100644 index 8f3e403..0000000 --- a/topmodx/include/dlflcore/DLFLCoreExt.cc +++ /dev/null @@ -1,559 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -#include "DLFLCoreExt.h" - -namespace DLFL -{ - -// Print an array of doubles separated by tabs -void printArray(const DoubleArray& array) -{ - int n = array.size(); - for (int i = 0; i < n; ++i) - cout << array[i] << '\t'; - cout << endl; -} - -// Print an array of Vector3ds separated by newlines -void printArray(const Vector3dArray& array) -{ - int n = array.size(); - for (int i = 0; i < n; ++i) - cout << array[i] << " "; - cout << endl; -} - -// The Hermite basis vector -Vector4d Hv(double t) -{ - double t2 = sqr(t), t3 = cube(t); - return Vector4d(2.0*t3 - 3.0*t2 + 1.0, - -2.0*t3 + 3.0*t2, - t3 - 2.0*t2 + t, - t3 - t2); -} - -// Hermite basis vector for tangents -Vector4d dHv(double t) -{ - double t2 = sqr(t); - return Vector4d(6.0*t2 - 6.0*t, - -6.0*t2 + 6.0*t, - 3.0*t2 - 4.0*t + 1, - 3.0*t2 - 2.0*t); -} - -// Derivative of dHv - second derivative of Hv -Vector4d ddHv(double t) -{ - return Vector4d(12.0*t - 6.0, - -12.0*t + 6.0, - 6.0*t - 4.0, - 6.0*t - 2.0); -} - -// Find centroid of given set of points -Vector3d centroid(const Vector3dArray& poly) -{ - Vector3d cen; - for (int i = poly.size() - 1; i >= 0; --i) - cen += poly[i]; - cen /= poly.size(); - return cen; -} - -bool pointInPolygon(Vector3d p, Vector3dArray poly, const Vector3d& projn) -{ - bool ptin = false; - - // Determine the optimal plane for projecting the polygon - // The largest component of the normal vector - // determines the optimal projection plane - int pp = findAxialProjectionPlane(projn); - - // The integer returned is the index of the component - // corresponding to the normal of the projection plane - // We don't actually have to project into the plane - we will just - // use the other 2 coordinates for our computations - - // Do a 2D point in polygon test, using intersection counting method - // The 2 coordinates that will be used in the calculation are (pp+1)%3 and (pp+2)%3 - // That is X will correspond to (pp+1)%3 and Y will correspond to (pp+2)%3 - int c = 0; // Count of no. of intersections of ray - Vector3d prevp = poly[poly.size() - 1]; // Previous point to current point. Initialized to last point - Vector3d curp; // Current point - int x = (pp + 1) % 3, y = (pp + 2) % 3; // Index for X and Y - for (int i = 0; i < (int)poly.size(); i++) - { - curp = poly[i]; - - // Check if ray along positive X from p intersects - // line segment between prep and curp - // First check if Y coordinate is within the line segment - // If it is then check if intersection is to the right. - if (((p[y] >= curp[y]) && (p[y] < prevp[y])) || - ((p[y] >= prevp[y]) && (p[y] < curp[y]))) - { - if (isNonZero(curp[y] - prevp[y])) - { // Edge not along ray - double interx = prevp[x] + (curp[x] - prevp[x]) * (p[y] - prevp[y]) / (curp[y] - prevp[y]); - if (p[x] < interx) c ^= 1; - } - } - prevp = curp; - } - - // For odd no. of intersections c will be 1, for even c will be 0 - // Odd no. means point is inside, even means point is outside - if (c) ptin = true; - - return ptin; -} - -int findAxialProjectionPlane(const Vector3d& n) -{ - // Pick either of XY, YZ or ZX planes depending - // on the largest component of the normal vector - // The normal vector need not be normalized - // If the given normal is of zero length, default - // projection plane (XY) is returned - int ppn = 1; - double x, y, z; - - // Make all components positive. - x = Abs(n[0]); y = Abs(n[1]); z = Abs(n[2]); - - if (x > y) - { - if (y > z) ppn = 0; // x is largest, pick YZ plane - else if (x > z) ppn = 0; // x is largest, pick YZ plane - else ppn = 2; // z is largest, pick XY plane - } - else - { - if (x > z) ppn = 1; // y is largest, pick ZX plane - else if (y > z) ppn = 1; // y is largest, pick ZX plane - else ppn = 2; // z is largest, pick XY plane - } - return ppn; -} - -// Find a projection plane for 2 given planes (normals) -Vector3d findProjectionPlane(const Vector3d& n1, const Vector3d& n2) -{ - Vector3d nproj(n1 + n2); // Normal for projection plane - if (Abs(n1*n2 + 1.0) < ZERO) nproj = n1; // If 2 planes are opposite, choose 1 of them arbitrarily - normalize(nproj); - return nproj; -} - -// Project a polygon onto a plane defined by point and normal -void planarProject(Vector3dArray& poly, const Vector3d& p, const Vector3d& nproj) -{ - Vector3d pp; // Projected point - - for (int i = poly.size() - 1; i >= 0; --i) - { - pp = poly[i] - ((poly[i] - p)*nproj) * nproj; - poly[i] = pp; - } -} - -// Project a point onto a plane defined by point and normal -void planarProject(Vector3d& p, const Vector3d& point, const Vector3d& normal) -{ - p = p - ((p - point)*normal) * normal; -} - -// Project a line (defined by 2 points) onto a plane defined by point and normal -void planarProject(Vector3d& p1, Vector3d& p2, const Vector3d& point, const Vector3d& normal) -{ - p1 = p1 - ((p1 - point)*normal) * normal; - p2 = p2 - ((p2 - point)*normal) * normal; -} - -// Translate the given polygon so that the centroid is moved to the given origin -Vector3d translate(Vector3dArray& poly, const Vector3d& origin) -{ - Vector3d delta = origin - centroid(poly); - - for (int i = poly.size() - 1; i >= 0; --i) - poly[i] += delta; - - return delta; -} - -// Translate the given polygon along given direction by given amount -void translate(Vector3dArray& poly, const Vector3d& dir, double dist) -{ - Vector3d delta = dist * normalized(dir); - - for (int i = poly.size() - 1; i >= 0; --i) - poly[i] += delta; -} - -// Scale the given polygon about it's centroid by the given scale factor -void scale(Vector3dArray& poly, double scale_factor) -{ - Vector3d origin = centroid(poly); - - for (int i = poly.size() - 1; i >= 0; --i) - { - poly[i] -= origin; poly[i] *= scale_factor; poly[i] += origin; - } -} - -// Rotate the given polygon about it's centroid such that normal goes to new direction -void rotate(Vector3dArray& poly, const Vector3d& normal, const Vector3d& newnormal) -{ - // Translate centroid of polygon to origin - Vector3d cen = translate(poly, Vector3d(0, 0, 0)); - - Vector3d axis; - double cost, sint, angle; - - // Rotation axis is cross product of normal and new normal - axis = normalized(normal) % normalized(newnormal); - - // if the length of the rotation axis is 0, then the 2 normals - // are either the same or in opposite directions. Don't do anything - // in both those cases to avoid reducing all points to 0 - if (normsqr(axis) > ZERO) - { - sint = normalize(axis); - cost = normalized(normal) * normalized(newnormal); - - angle = atan2(sint, cost); - - // Construct a quaternion for the rotation - Quaternion rot; rot.setAxisAndAngle(axis, angle); normalize(rot); - Quaternion rotp; - - // Rotate all points using the quaternion - for (int i = poly.size() - 1; i >= 0; --i) - { - rotp = rot * poly[i] * conjugate(rot); - poly[i].set(rotp[0], rotp[1], rotp[2]); - } - } - - // Translate back to old centroid - translate(poly, -cen); -} - -// Rotate the given polygon around its normal by given angle -void rotate(Vector3dArray& poly, const Vector3d& normal, double angle) -{ - // Translate centroid of polygon to origin - Vector3d cen = translate(poly, Vector3d(0, 0, 0)); - - Vector3d axis = normalized(normal); - - if (angle < 0.0) angle += 2.0*M_PI; - - // Construct a quaternion for the rotation - Quaternion rot; rot.setAxisAndAngle(axis, angle); normalize(rot); - Quaternion rotp; - - // Rotate all points using the quaternion - for (int i = poly.size() - 1; i >= 0; --i) - { - rotp = rot * poly[i] * conjugate(rot); - poly[i].set(rotp[0], rotp[1], rotp[2]); - } - - // Translate back to old centroid - translate(poly, -cen); -} - -// Resolve a planar polygon into distance and angle parameters for each vertex, based on -// the centroid. The angles are w.r.t to the given xref vector (assumed to be normalized). -// The yref vector is used to determine quadrant for correct angles. -// xref and yref should be mutually perpendicular and lie on the plane of the polygon -// The distances are from the centroid -void resolvePolygon( - const Vector3dArray& poly, const Vector3d& xref, const Vector3d& yref, - DoubleArray& angle, DoubleArray& distance) -{ - Vector3d cen = centroid(poly); - Vector3d vec, p; - double theta, ptheta, dist; - double cost, sint; - int n = poly.size(); - - angle.resize(n, 0.0); distance.resize(n, 0.0); - - // First resolve first point - p = poly[0]; vec = p - cen; - dist = normalize(vec); - cost = vec * xref; sint = vec * yref; - theta = atan2(sint, cost); - - // We want the first angle to always be positive - // atan2 returns angle in the range -pi to pi - if (theta < 0.0) theta += 2.0*M_PI; - - angle[0] = theta; distance[0] = dist; - ptheta = theta; - - for (int i = 1; i < n; ++i) - { - p = poly[i]; vec = p - cen; - - dist = normalize(vec); - cost = vec * xref; sint = vec * yref; - theta = atan2(sint, cost); - - // We want the angles to be in ascending order - // So if angle is smaller than previous angle, add 2pi - // **NOTE** We might have to add several multiples of 2pi - // to make the angle greater than the previous angle!! - while (theta < ptheta) theta += 2.0*M_PI; - - // Store the actual angles - angle[i] = theta; distance[i] = dist; - ptheta = theta; - } -} - -// Reconstruct a polygon from its resolved parameters and reference axes -// The reconstructed polygon will be centered at the origin -void reconstructPolygon( - Vector3dArray& poly, const Vector3d& xref, const Vector3d& yref, - const DoubleArray& angle, const DoubleArray& distance) -{ - int n = angle.size(); - poly.resize(n); - for (int i = 0; i < n; ++i) - { - poly[i] = distance[i] * (xref*cos(angle[i]) + yref*sin(angle[i])); - } -} - -// Linearly interpolate between 2 given sets of numbers using given parameter -// Will do interpolation only upto smaller of 2 given arrays -void linearInterpolate(const DoubleArray& start, const DoubleArray& end, DoubleArray& inter, double t) -{ - int n = start.size(); - if (end.size() < n) n = end.size(); - - for (int i = 0; i < n; ++i) - inter[i] = start[i] * (1.0 - t) + end[i] * t; -} - -// Linearly interpolate between 2 given sets of Vector3ds using given parameter -// Will do interpolation only upto smaller of 2 given arrays -void linearInterpolate(const Vector3dArray& start, const Vector3dArray& end, Vector3dArray& inter, double t) -{ - int n = start.size(); - if (end.size() < n) n = end.size(); - - for (int i = 0; i < n; ++i) - inter[i] = start[i] * (1.0 - t) + end[i] * t; -} - -// Do hermite interpolation given 2 end points and 2 end tangents. Compute point and tangent -// at point for given parameter -void hermiteInterpolate( - const Vector3d& p1, - const Vector3d& v1, const Vector3d& p2, const Vector3d& v2, - Vector3d& p, Vector3d& v, Vector3d& dvdt, double t) -{ - Vector4d hv, dhv, ddhv, G; - hv = Hv(t); dhv = dHv(t); ddhv = ddHv(t); - - G.set(p1[0], p2[0], v1[0], v2[0]); p[0] = hv * G; v[0] = dhv * G; dvdt[0] = ddhv * G; - G.set(p1[1], p2[1], v1[1], v2[1]); p[1] = hv * G; v[1] = dhv * G; dvdt[1] = ddhv * G; - G.set(p1[2], p2[2], v1[2], v2[2]); p[2] = hv * G; v[2] = dhv * G; dvdt[2] = ddhv * G; -} - -// Compute length of a Hermite curve using chord-length summation. -// Curve is split into specified number of segments -double hermiteCurveLength( - const Vector3d& p1, - const Vector3d& v1, const Vector3d& p2, const Vector3d& v2, - int numsegs) -{ - double length = 0.0, t; - Vector3d p, p0; - Vector4d hv, Gx, Gy, Gz; - - Gx.set(p1[0], p2[0], v1[0], v2[0]); - Gy.set(p1[1], p2[1], v1[1], v2[1]); - Gz.set(p1[2], p2[2], v1[2], v2[2]); - - p0 = p1; - for (int i = 1; i < numsegs - 1; ++i) - { - t = double(i) / double(numsegs); - hv = Hv(t); - - p[0] = hv * Gx; p[1] = hv * Gy; p[2] = hv * Gz; - - length += norm(p - p0); - p0 = p; - } - length += norm(p2 - p0); - - return length; -} - -// Compute the centroid and average normal for a given array of points, -// assuming they form a polygon and are specified in the correct order (RHS) -void computeCentroidAndNormal(const Vector3dArray& p, Vector3d& centroid, Vector3d& normal) -{ - centroid.reset(); normal.reset(); - int num = p.size(); - if (num > 2) - { - Vector3d p0, p1; - p0 = p[num - 1]; - for (int i = 0; i < p.size(); ++i) - { - p1 = p[i]; centroid += p1; - normal += p0 % p1; - p0 = p1; - } - centroid /= num; - normalize(normal); - } -} - -// Calculate doo-sabin coordinates for the given array of points, -// assuming they form a polygon and are specified in the correct order -void computeDooSabinCoords(Vector3dArray& points) -{ - Vector3dArray op(points); - Vector3d p; - int numpts = op.size(); - double coef, alpha; - for (int i = 0; i < numpts; ++i) - { - p.reset(); - for (int j = 0; j < numpts; ++j) - { - alpha = 1.0 / 4.0 + 5.0 / (4.0*numpts); - if (i == j) coef = alpha; - else coef = (3.0 + 2.0*cos(2.0*(i - j)*M_PI / numpts)) / (4.0*numpts); - p += coef*op[j]; - } - points[i] = p; - } -} - -// Calculate modified doo-sabin coordinates for the given array of points, -// assuming they form a polygon and are specified in the correct order -void computeModifiedDooSabinCoords(Vector3dArray& points) -{ - Vector3dArray op(points); - Vector3d p; - int numpts = op.size(); - double coef, alpha; - for (int i = 0; i < numpts; ++i) - { - p.reset(); - for (int j = 0; j < numpts; ++j) - { - alpha = 1.0 / 4.0 + 5.0 / (4.0*numpts); - if (i == j) coef = alpha; - else coef = (1.0 - alpha) * (3.0 + 2.0*cos(2.0*(i - j)*M_PI / numpts)) / (3.0*numpts - 5.0); - p += coef*op[j]; - } - points[i] = p; - } -} - -// Project a point onto a line along the normal from the line through the point -Vector3d projectPointOnLine(const Vector3d& p, const Vector3d& p0, const Vector3d& p1) -{ - double u = ((p - p0)*(p1 - p0)) / ((p1 - p0)*(p1 - p0)); - Vector3d pp = p0 + u*(p1 - p0); - return pp; -} - -// Compute the distance of a point from a line -double distPointLine(const Vector3d& p, const Vector3d& p0, const Vector3d& p1) -{ - Vector3d pp = projectPointOnLine(p, p0, p1); - return norm(p - pp); -} - -// Project two lines onto a plane specified by point and normal -// and find their intersection -Vector3d planarProjectAndIntersect( - const Vector3d& _p00, const Vector3d& _p01, - const Vector3d& _p10, const Vector3d& _p11, - const Vector3d& point, const Vector3d& normal) -{ - Vector3d p00(_p00), p01(_p01), p10(_p10), p11(_p11); - - planarProject(p00, p01, point, normal); - planarProject(p10, p11, point, normal); - - double d0 = distPointLine(p10, p00, p01); - double d1 = distPointLine(p11, p00, p01); - double frac = d0 / (d0 + d1); - - Vector3d ip = p10 + frac*(p11 - p10); - - return ip; -} -/* -// Compute lighting for a vertex with a given normal and lighting parameters -// Returns a color -RGBColor computeLighting(const Vector3d p, const Vector3d n, const RGBColor& basecolor, -double Ka, double Kd, double Ks, LightPtr lightptr) { -RGBColor color; - -color = Kd * lightptr->illuminate(p,n); -color += (1.0 - Kd) * basecolor; - -return color; -} -*/ -// Find the intersection point between two coplanar lines specified by their end points -Vector3d intersectCoplanarLines( - const Vector3d& p00, const Vector3d& p01, - const Vector3d& p10, const Vector3d& p11) -{ - double d0 = distPointLine(p10, p00, p01); - double d1 = distPointLine(p11, p00, p01); - double frac = d0 / (d0 + d1); - - Vector3d ip = p10 + frac*(p11 - p10); - return ip; -} - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLCoreExt.h b/topmodx/include/dlflcore/DLFLCoreExt.h deleted file mode 100644 index adc1134..0000000 --- a/topmodx/include/dlflcore/DLFLCoreExt.h +++ /dev/null @@ -1,155 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLCORE_EXT_H_ -#define _DLFLCORE_EXT_H_ - -#include "DLFLCommon.h" -#include -#include - -namespace DLFL { - -// Print an array of doubles separated by tabs -void printArray(const DoubleArray& array); -// Print an array of Vector3ds separated by newlines -void printArray(const Vector3dArray& array); - -// The Hermite basis vector -Vector4d Hv(double t); -// Hermite basis vector for tangents -Vector4d dHv(double t); -// Derivative of dHv - second derivative of Hv -Vector4d ddHv(double t); - -// Find centroid of given set of points -Vector3d centroid(const Vector3dArray& poly); - -/* Determine if the given point is within the given polygon -* Last parameter is the normal to be used for finding projection plane */ -bool pointInPolygon(Vector3d p, Vector3dArray poly, const Vector3d& projn); - -/* Find the optimal axial projection plane for a polygon with the specified normal vector -* Return value: 0 = YZ, 1 = ZX, 2 = XY (corresponding to vector components of normal) */ -int findAxialProjectionPlane(const Vector3d& n); - -// Find a projection plane for 2 given planes (normals) -Vector3d findProjectionPlane(const Vector3d& n1, const Vector3d& n2); - -// Project a polygon onto a plane defined by point and normal -void planarProject(Vector3dArray& poly, const Vector3d& p, const Vector3d& nproj); -// Project a point onto a plane defined by point and normal -void planarProject(Vector3d& p, const Vector3d& point, const Vector3d& normal); -// Project a line (defined by 2 points) onto a plane defined by point and normal -void planarProject(Vector3d& p1, Vector3d& p2, const Vector3d& point, const Vector3d& normal); - -// Translate the given polygon so that the centroid is moved to the given origin -// Returns amount by which polygon was translated -Vector3d translate(Vector3dArray& poly, const Vector3d& origin); -// Translate the given polygon along given direction by given amount -void translate(Vector3dArray& poly, const Vector3d& dir, double dist); - -// Scale the given polygon about it's centroid by the given scale factor -void scale(Vector3dArray& poly, double scale_factor); - -// Rotate the given polygon about it's centroid such tat normal goes to new direction -void rotate(Vector3dArray& poly, const Vector3d& normal, const Vector3d& newnormal); -// Rotate the given polygon around its normal by given angle -void rotate(Vector3dArray& poly, const Vector3d& normal, double angle); - -// Resolve a planar polygon into distance and angle parameters for each vertex, based on -// the centroid. The angles are w.r.t to the given xref vector (assumed to be normalized). -// The yref vector is used to determine quadrant for correct angles -// The distances are from the centroid -void resolvePolygon( - const Vector3dArray& poly, const Vector3d& xref, const Vector3d& yref, - DoubleArray& angle, DoubleArray& distance); - -// Reconstruct a polygon from its resolved parameters and reference axes -// The reconstructed polygon will be centered at the origin -void reconstructPolygon( - Vector3dArray& poly, const Vector3d& xref, const Vector3d& yref, - const DoubleArray& angle, const DoubleArray& distance); - -// Linearly interpolate between 2 given sets of numbers using given parameter -// Will do interpolation only upto smaller of 2 given arrays -void linearInterpolate(const DoubleArray& start, const DoubleArray& end, DoubleArray& inter, double t); - -// Linearly interpolate between 2 given sets of Vector3ds using given parameter -// Will do interpolation only upto smaller of 2 given arrays -void linearInterpolate(const Vector3dArray& start, const Vector3dArray& end, Vector3dArray& inter, double t); - -// Do hermite interpolation given 2 end points and 2 end tangents. Compute point and tangent -// at point for given parameter -void hermiteInterpolate( - const Vector3d& p1, const Vector3d& v1, const Vector3d& p2, const Vector3d& v2, - Vector3d& p, Vector3d& v, Vector3d& dvdt, double t); - -// Compute length of a Hermite curve using chord-length summation. -// Curve is split into specified number of segments -double hermiteCurveLength( - const Vector3d& p1, const Vector3d& v1, const Vector3d& p2, const Vector3d& v2, - int numsegs); - -// Compute the centroid and average normal for a given array of points, -// assuming they form a polygon and are specified in the correct order (RHS) -void computeCentroidAndNormal(const Vector3dArray& p, Vector3d& centroid, Vector3d& normal); - -// Calculate doo-sabin coordinates for the given array of points, -// assuming they form a polygon and are specified in the correct order -void computeDooSabinCoords(Vector3dArray& points); - -// Calculate modified doo-sabin coordinates for the given array of points, -// assuming they form a polygon and are specified in the correct order -void computeModifiedDooSabinCoords(Vector3dArray& points); - -// Project a point onto a line along the normal from the line through the point -Vector3d projectPointOnLine(const Vector3d& p, const Vector3d& p0, const Vector3d& p1); - -// Compute the distance of a point from a line -double distPointLine(const Vector3d& p, const Vector3d& p0, const Vector3d& p1); - -// Project two lines onto a plane specified by point and normal -// and fine their intersection -Vector3d planarProjectAndIntersect( - const Vector3d& p00, const Vector3d& p01, - const Vector3d& p10, const Vector3d& p11, - const Vector3d& point, const Vector3d& normal); -/* -// Compute lighting for a vertex with a given normal and lighting parameters -// Returns a color -Vector3d computeLighting(const Vector3d& p, const Vector3d& n, const RGBColor& basecolor, -double Ka, double Kd, double Ks, LightPtr lightptr); -*/ -// Find the intersection point between two coplanar lines specified by their end points -Vector3d intersectCoplanarLines( - const Vector3d& p00, const Vector3d& p01, - const Vector3d& p10, const Vector3d& p11); -} // end namespace - -#endif // _DLFLCORE_EXT_H_ diff --git a/topmodx/include/dlflcore/DLFLEdge.cc b/topmodx/include/dlflcore/DLFLEdge.cc deleted file mode 100644 index 3c9de68..0000000 --- a/topmodx/include/dlflcore/DLFLEdge.cc +++ /dev/null @@ -1,522 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLEdge.cc - */ - -#include "DLFLEdge.h" -#include "DLFLFaceVertex.h" -#include "DLFLVertex.h" - -namespace DLFL -{ - -// Define the static variable. Initialized to 0 - -uint DLFLEdge::suLastID = 0; - -void DLFLEdge::dump(ostream& o) const -{ - o << "DLFLEdge" << endl - // << " ID : " << uID << endl - << " fvpV1 : " << fvpV1 << endl - << " fvpV2 : " << fvpV2 << endl - // << " Type : " << etType << endl - << endl; -} - -// Update the mid point for this edge -void DLFLEdge::updateMidPoint(void) -{ - if (fvpV1 != nullptr && fvpV2 != nullptr) midpoint = 0.5 * (fvpV1->getVertexCoords() + fvpV2->getVertexCoords()); -} - -// Update the edge normal - average of normals at the 4 corners adjacent to this edge -void DLFLEdge::updateNormal(void) -{ - if (fvpV1 != nullptr && fvpV2 != nullptr) - { - normal = fvpV1->computeNormal() + fvpV1->next()->computeNormal() + - fvpV2->computeNormal() + fvpV2->next()->computeNormal(); - normalize(normal); - } -} - -// Reverse the DLFL edge. Update face-vertex pointers appropriately -// See comment in header file before using this function -void DLFLEdge::reverse(void) // PRIVATE -{ - // Clear edge pointer fields of original face-vertices - // If edge is reversed then the next face-vertices will be the starting - // points for this edge in the corresponding faces. - // Update the edge pointer fields of the new face-vertices. - //fvpV1->setEdgePtr(nullptr); - fvpV1 = fvpV1->next(); fvpV1->setEdgePtr(this); - //fvpV2->setEdgePtr(nullptr); - fvpV2 = fvpV2->next(); fvpV2->setEdgePtr(this); -} - -void DLFLEdge::updateFaceVertices(void) -{ - fvpV1->setEdgePtr(this); - fvpV2->setEdgePtr(this); -} - -// Get face-vertex pointer belonging to give face. Returns nullptr if not found -DLFLFaceVertexPtr DLFLEdge::getFaceVertexPtr(DLFLFacePtr fptr) -{ - DLFLFacePtr fp1, fp2; - DLFLFaceVertexPtr fvp = nullptr; - fp1 = fvpV1->getFacePtr(); fp2 = fvpV2->getFacePtr(); - if (fp1 == fptr) fvp = fvpV1; - else if (fp2 == fptr) fvp = fvpV2; - return fvp; -} - -// Check if two given edges are cofacial -bool coFacial(DLFLEdgePtr ep1, DLFLEdgePtr ep2) -{ - DLFLFacePtr fp11, fp12, fp21, fp22; - ep1->getFacePointers(fp11, fp12); - ep2->getFacePointers(fp21, fp22); - bool cofacial = false; - if (fp11 == fp21 || fp11 == fp22 || - fp12 == fp21 || fp12 == fp22) cofacial = true; - return cofacial; -} - -void DLFLEdge::getEndPoints(Vector3d& p1, Vector3d& p2) const -{ - p1 = fvpV1->getVertexCoords(); p2 = fvpV2->getVertexCoords(); -} - -double DLFLEdge::length(void) const -{ - return norm(fvpV1->getVertexCoords() - fvpV2->getVertexCoords()); -} - -Vector3d DLFLEdge::getEdgeVector(void) const -{ - return Vector3d(fvpV2->getVertexCoords() - fvpV1->getVertexCoords()); -} - -void DLFLEdge::getFacePointers(DLFLFacePtr& fptr1, DLFLFacePtr& fptr2) -{ - fptr1 = fvpV1->getFacePtr(); fptr2 = fvpV2->getFacePtr(); -} - -DLFLFacePtr DLFLEdge::getOtherFacePointer(DLFLFacePtr fptr) -{ - // Each edge is adjacent to 2 faces (both can be same) - // Return the pointer to the face which is not the given face pointer - // NOTE: If both sides of the Edge are the same face, then - // other face pointer will be the same. - // If given face pointer is not adjacent to this edge, returns nullptr - if (fvpV1->getFacePtr() == fptr) return fvpV2->getFacePtr(); - else if (fvpV2->getFacePtr() == fptr) return fvpV1->getFacePtr(); - return nullptr; -} - -void DLFLEdge::getVertexPointers(DLFLVertexPtr& vp1, DLFLVertexPtr& vp2) -{ - vp1 = fvpV1->getVertexPtr(); vp2 = fvpV2->getVertexPtr(); -} - -DLFLVertexPtr DLFLEdge::getOtherVertexPointer(DLFLVertexPtr vptr) -{ - if (fvpV1->getVertexPtr() == vptr) return fvpV2->getVertexPtr(); - else if (fvpV2->getVertexPtr() == vptr) return fvpV1->getVertexPtr(); - return nullptr; -} - -void DLFLEdge::getEFCorners(DLFLFaceVertexPtrArray& corners) -{ - corners.resize(4); - corners[0] = fvpV1->next(); - corners[1] = fvpV1; - corners[2] = fvpV2->next(); - corners[3] = fvpV2; -} - -void DLFLEdge::getEFCornersAuxCoords(Vector3dArray& coords) -{ - coords.resize(4); - coords[0] = fvpV1->next()->getAuxCoords(); - coords[1] = fvpV1->getAuxCoords(); - coords[2] = fvpV2->next()->getAuxCoords(); - coords[3] = fvpV2->getAuxCoords(); -} - -// Equality operator - two edges are equal if they have the same 2 end-points -bool operator == (const DLFLEdge& e1, const DLFLEdge& e2) -{ - bool same = false; - uint e11, e12, e21, e22; - - e11 = e1.fvpV1->getVertexID(); - e12 = e1.fvpV2->getVertexID(); - e21 = e2.fvpV1->getVertexID(); - e22 = e2.fvpV2->getVertexID(); - - if ((e11 == e21) && (e12 == e22)) same = true; - else if ((e11 == e22) && (e12 == e21)) same = true; - return same; -} - -bool DLFLEdge::isValid(void) const -{ - if (fvpV1->getFacePtr() == fvpV2->getFacePtr()) return false; - return true; -} - -bool DLFLEdge::isSelfLoop(void) const -{ - if (fvpV1->getVertexPtr() == fvpV2->getVertexPtr()) return true; - return false; -} - -bool checkIntersection(DLFLEdgePtr ep1, DLFLEdgePtr ep2) // friend function -{ - // Check if the 2 given edges intersect - // We will check only for in-plane intersections - // So if the 4 end points do not lie on a plane, function will return false - // If one end point of one edge lies on the other edge, it IS NOT considered an intersection - // If the edges are co-linear, it IS NOT considered an intersection - // If either of the edges are self loops, there is NO intersection - if (ep1->isSelfLoop() || ep2->isSelfLoop()) - { - cout << "Self loop" << endl; - return false; - } - bool intersects = false; - Vector3d ep1v1, ep1v2, ep2v1, ep2v2; - ep1->getEndPoints(ep1v1, ep1v2); - ep2->getEndPoints(ep2v1, ep2v2); - - // Find normals of triangle formed by ep1 and each end point of ep2 - // If angle between the normals is not 0 the 4 end points are not co-planar - Vector3d n1 = (ep1v2 - ep1v1) % (ep2v1 - ep1v1); normalize(n1); - Vector3d n2 = (ep1v2 - ep1v1) % (ep2v2 - ep1v1); normalize(n2); - - if (normsqr(n1) < 1.0e-5 && normsqr(n2) < 1.0e-5) - { - return false; // Co-linear edges - } - - // Check the sum between n1 and n2 - // If difference is 0, the points are co-planar but ep2 lies - // entirely on one side of ep1, so there is no possibility of intersection - // If sum is 0, the points are co-planar and end points of ep2 lie - // on either side of ep1. Then check if point of intersection is within the edge - if (normsqr(n1 + n2) < 1.0e-4) - { - // Points are co-planar, and there is possibility of intersection - // Check if point of intersection is within the edge - // We can simply check if ep1 is entirely on one side of ep2 - // If it is not, then there is an intersection - n1 = (ep2v2 - ep2v1) % (ep1v1 - ep2v1); normalize(n1); - n2 = (ep2v2 - ep2v1) % (ep1v2 - ep2v1); normalize(n2); - if (normsqr(n1 + n2) < 1.0e-4) - { - intersects = true; - } - } - return intersects; -} - -ostream& operator << (ostream& o, const DLFLEdge& e) -{ - o << "Edge " << e.getID() << " : " - << e.fvpV1->getVertexID() << "<-->" - << e.fvpV2->getVertexID(); - return o; -} - -void DLFLEdge::printFaceIDs(void) const -{ - cout << "Edge " << uID << " : " - << fvpV1->getFaceID() << " (" << fvpV1->getVertexID() << ") " << "<--> " - << fvpV2->getFaceID() << " (" << fvpV2->getVertexID() << ") " << endl; -} - -void DLFLEdge::printPointers(void) const -{ - cout << fvpV1 << " <-> " << fvpV2; -} - -// Write out the edge in DLFL format -void DLFLEdge::writeDLFL(ostream& o) const -{ - //o << "e {" << getID() << "} " << fvpV1->getIndex() << ' ' << fvpV2->getIndex() << endl; - o << "e " << fvpV1->getIndex() << ' ' << fvpV2->getIndex() << endl; -} - -// Write out the edge in DLFL format in reverse order -// Reverse of edge will point to corners following the current corners -void DLFLEdge::writeDLFLReverse(ostream& o) const -{ - //o << "e {" << getID() << "} " << (fvpV1->next())->getIndex() << ' ' << (fvpV2->next())->getIndex() << endl; - o << "e " << (fvpV1->next())->getIndex() << ' ' << (fvpV2->next())->getIndex() << endl; -} - -// Distance of a point from the DLFLEdge in 3D -double DLFLEdge::distFrom(double x, double y, double z) const -{ - Vector3d p1, p2; // 2 ends of the Edges - Vector3d p(x, y, z); - - p1 = fvpV1->vertex->coords; - p2 = fvpV2->vertex->coords; - - double len = norm(p1 - p2); // Length of line segment - double dist; - if (len < ZERO) - { - // Find distance from one of the 2 end points and return that - dist = norm(p - p1); - } - else - { - double u; // Parametric coordinate along edge - // from p1 to p2 - u = ((p - p1) * (p2 - p1)) / sqr(len); - if (u < 0.0) - { - dist = norm(p - p1); - } - else if (u > 1.0) - { - dist = norm(p - p2); - } - else - { - Vector3d p3 = p1 + u * (p2 - p1); - dist = norm(p - p3); - } - } - return dist; -} - -// For hit calculations with projections -double DLFLEdge::distFromXY(double x, double y) const -{ - Vector3d p1temp, p2temp; - Vector2d p1, p2; - Vector2d p(x, y); - - p1temp = fvpV1->vertex->coords; - p2temp = fvpV2->vertex->coords; - - // Convert to 2D coords in XY plane - p1.set(p1temp[0], p1temp[1]); p2.set(p2temp[0], p2temp[1]); - - double len = norm(p1 - p2); // Length of line segment in XY plane - double dist; - if (len < ZERO) - { - // Find distance from one of the 2 end points and return that - dist = norm(p - p1); - } - else - { - double u; // Parametric coordinate along edge - // from p1 to p2 - u = ((p - p1) * (p2 - p1)) / sqr(len); - if (u < 0.0) - { - dist = norm(p - p1); - } - else if (u > 1.0) - { - dist = norm(p - p2); - } - else - { - Vector2d p3 = p1 + u * (p2 - p1); - dist = norm(p - p3); - } - } - return dist; -} - -double DLFLEdge::distFromYZ(double y, double z) const -{ - Vector3d p1temp, p2temp; - Vector2d p1, p2; - Vector2d p(y, z); - - p1temp = fvpV1->vertex->coords; - p2temp = fvpV2->vertex->coords; - - // Convert to 2D coords in YZ plane - p1.set(p1temp[1], p1temp[2]); p2.set(p2temp[1], p2temp[2]); - - double len = norm(p1 - p2); // Length of line segment in YZ plane - double dist; - if (len < ZERO) - { - // Find distance from one of the 2 end points and return that - dist = norm(p - p1); - } - else - { - double u; // Parametric coordinate along edge - // from p1 to p2 - u = ((p - p1) * (p2 - p1)) / sqr(len); - if (u < 0.0) - { - dist = norm(p - p1); - } - else if (u > 1.0) - { - dist = norm(p - p2); - } - else - { - Vector2d p3 = p1 + u * (p2 - p1); - dist = norm(p - p3); - } - } - return dist; -} - -double DLFLEdge::distFromZX(double z, double x) const -{ - Vector3d p1temp, p2temp; - Vector2d p1, p2; - Vector2d p(z, x); - - p1temp = fvpV1->vertex->coords; - p2temp = fvpV2->vertex->coords; - - // Convert to 2D coords in ZX plane - p1.set(p1temp[2], p1temp[0]); p2.set(p2temp[2], p2temp[0]); - - double len = norm(p1 - p2); // Length of line segment in ZX plane - double dist; - if (len < ZERO) - { - // Find distance from one of the 2 end points and return that - dist = norm(p - p1); - } - else - { - double u; // Parametric coordinate along edge - // from p1 to p2 - u = ((p - p1) * (p2 - p1)) / sqr(len); - if (u < 0.0) - { - dist = norm(p - p1); - } - else if (u > 1.0) - { - dist = norm(p - p2); - } - else - { - Vector2d p3 = p1 + u * (p2 - p1); - dist = norm(p - p3); - } - } - return dist; -} - -// Distance betwen midpoint of two edges - friend function -double distBetween(DLFLEdgePtr ep1, DLFLEdgePtr ep2) -{ - return norm(ep1->getMidPoint() - ep2->getMidPoint()); -} - - -void resetEdgeType(DLFLEdgePtr dep) -{ - dep->resetType(); -} - -void makeEdgeUnique(DLFLEdgePtr dep) -{ - dep->makeUnique(); -} - -// Edge normal. See comments in header file for details -/*Vector3d DLFLEdge::getEdgeNormal(DLFLFaceVertexPtr fvptr) const -{ -Vector3d enormal; - -// Check if fvptr belongs to Edge -if ( fvpV1 != fvptr && fvpV2 != fvptr ) return enormal; - -Vector3d normal = fvptr->computeNormal(); // Surface normal at corner -Vector3d edge_vector = normalized(fvpV2->getVertexCoords() - fvpV1->getVertexCoords()); // Edge vector - -// Reverse edge vector if necessary -if ( fvptr == fvpV2 ) edge_vector = -edge_vector; - -enormal = normal % edge_vector; - -return enormal; -} - -Vector3d DLFLEdge::averageVertexNormal(void) const -{ -Vector3d avn; - -avn = fvpV1->getVertexPtr()->averageNormal(); -avn += fvpV2->getVertexPtr()->averageNormal(); - -normalize(avn); - -return avn; -}*/ - -/*Vector3d DLFLEdge::averageCornerNormal(void) const -{ -Vector3d acn; - -acn = fvpV1->computeNormal() + fvpV2->computeNormal(); -normalize(acn); - -return acn; -}*/ -/* -// Render the DLFLEdge as a line segment -void DLFLEdge::render(void) const -{ -glBegin(GL_LINES); -glVertex3dv((fvpV1->vertex->coords).getCArray()); -glVertex3dv((fvpV2->vertex->coords).getCArray()); -glEnd(); -}*/ - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLEdge.h b/topmodx/include/dlflcore/DLFLEdge.h deleted file mode 100644 index 6402708..0000000 --- a/topmodx/include/dlflcore/DLFLEdge.h +++ /dev/null @@ -1,425 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLEdge.hh - */ - -#ifndef _DLFL_EDGE_HH_ -#define _DLFL_EDGE_HH_ - -// Class to define an edge -// And edge contains 2 pointers - one to each end of the edge -// The pointers are to FaceVertex structures -// An edge appears twice in the system unless it is a boundary edge of a 2D surface -// Each of the pointers points to the beginning Vertex of the edge in each of the 2 cases -// So each of the pointers will be to Face Nodes in different faces -// Definition of class FaceVertexPtr is not required for this class since only the pointer -// is stored - -#include "DLFLCommon.h" - -namespace DLFL -{ - -class DLFLEdge -{ -public: - static void setLastID(uint id) - { - if (id > suLastID) - suLastID = id; - }; - - // Default constructor - DLFLEdge() - : fvpV1(nullptr), fvpV2(nullptr), etType(ETNormal), auxcoords(), auxnormal(), midpoint(), normal(), flags(0) - { - assignID(); - } - - // 2 & 3 argument constructor - DLFLEdge(DLFLFaceVertexPtr fvp1, DLFLFaceVertexPtr fvp2, bool update = true) - : fvpV1(fvp1), fvpV2(fvp2), etType(ETNormal), auxcoords(), auxnormal(), midpoint(), normal(), flags(0) - { - if (update) - { - updateNormal(); - } - updateMidPoint(); - assignID(); - } - - // Copy constructor - DLFLEdge(const DLFLEdge& e) - : fvpV1(e.fvpV1), fvpV2(e.fvpV2), uID(e.uID), etType(e.etType), auxcoords(e.auxcoords), auxnormal(e.auxnormal), - midpoint(e.midpoint), normal(e.normal), flags(e.flags) - { - } - - // Destructor - ~DLFLEdge() - { - } - - // Assignment operator - DLFLEdge& operator = (const DLFLEdge& e) - { - fvpV1 = e.fvpV1; fvpV2 = e.fvpV2; uID = e.uID; etType = e.etType; auxcoords = e.auxcoords; auxnormal = e.auxnormal; - midpoint = e.midpoint; normal = e.normal; flags = e.flags; - return (*this); - } - - // Copy function - DLFLEdgePtr copy(void) const - { - DLFLEdgePtr eptr = new DLFLEdge(*this); - return eptr; - } - - // Dump contents of object - void dump(ostream& o) const; - - // Get/set the attribute flags - DLFLEdgeType getType(void) const - { - return etType; - } - - Vector3d getAuxCoords(void) const - { - return auxcoords; - } - - Vector3d getAuxNormal(void) const - { - return auxnormal; - } - - void setType(DLFLEdgeType type) - { - etType = type; - } - - void resetType(void) - { - etType = ETNormal; - } - - void setAuxCoords(const Vector3d& p) - { - auxcoords = p; - } - - void setAuxNormal(const Vector3d& n) - { - auxnormal = n; - } - - void addToAuxCoords(const Vector3d& p) - { - auxcoords += p; - } - - void addToAuxNormal(const Vector3d& n) - { - auxnormal += n; - } - - void resetAuxCoords(void) - { - auxcoords.reset(); - } - - void resetAuxNormal(void) - { - auxnormal.reset(); - } - - - friend void resetEdgeType(DLFLEdgePtr dep); - /* - friend void resetEdgeType(DLFLEdgePtr dep) { - dep->resetType(); - } - */ - - // Query functions - DLFLFaceVertexPtr getFaceVertexPtr1(void) const - { - return fvpV1; - } - - DLFLFaceVertexPtr getFaceVertexPtr2(void) const - { - return fvpV2; - } - - // Get the face-vertex belonging to given face - // Returns nullptr if edge is not adjacent to given face - DLFLFaceVertexPtr getFaceVertexPtr(DLFLFacePtr fptr); - - DLFLFaceVertexPtr getOtherFaceVertexPtr(DLFLFaceVertexPtr fvptr) - { - // Return the other DLFLFaceVertexPtr for this edge. - // Returns nullptr if given DLFLFaceVertexPtr is not found in this edge - if (fvpV1 == fvptr) return fvpV2; - else if (fvpV2 == fvptr) return fvpV1; - return nullptr; - } - - void getFaceVertexPointers(DLFLFaceVertexPtr& fvptr1, DLFLFaceVertexPtr& fvptr2) const - { - fvptr1 = fvpV1; fvptr2 = fvpV2; - } - - void getCorners(DLFLFaceVertexPtr& fvp1, DLFLFaceVertexPtr& fvp2) const - { - getFaceVertexPointers(fvp1, fvp2); - } - - uint getID(void) const - { - return uID; - } - - Vector3d getMidPoint(bool update = false) - { - if (update) - updateMidPoint(); - return midpoint; - } - - Vector3d getNormal(bool update = false) - { - if (update) - updateNormal(); - return normal; - } - - void getEndPoints(Vector3d& p1, Vector3d& p2) const; - double length(void) const; - - // Get a vector along the direction of the edge from endpoint 1 to endpoint 2 - Vector3d getEdgeVector(void) const; - - // Get the pointers to the 2 faces that this edge is adjacent to - void getFacePointers(DLFLFacePtr& fptr1, DLFLFacePtr& fptr2); - - // Get pointer to face adjacent to this edge which is not the given face - DLFLFacePtr getOtherFacePointer(DLFLFacePtr fptr); - - // Get the pointers to the 2 DLFLVertices that define this edge - void getVertexPointers(DLFLVertexPtr& vp1, DLFLVertexPtr& vp2); - - // Get pointer to vertex which is at opposite end to given vertex pointer - DLFLVertexPtr getOtherVertexPointer(DLFLVertexPtr vptr); - - // Get all 4 corners adjacent to this edge in CCW order such that those - // corners will make a face (EF = Edge Face) - void getEFCorners(DLFLFaceVertexPtrArray& corners); - - // Get the aux coords of all 4 corners adjacent to this edge in CCW order such - // that those corners make a face (EF = Edge Face) - void getEFCornersAuxCoords(Vector3dArray& coords); - - // NOTE : All the 4 functions below will return the distance from one - // of the end points when the point is not in the rectangular region - // parallel to the line segment - - // Distance of a point from the DLFLEdge in 3D - double distFrom(double x, double y, double z) const; - - // For hit calculations with projections - double distFromXY(double x, double y) const; - double distFromYZ(double y, double z) const; - double distFromZX(double z, double x) const; - - // Find distance between midpoints of two given edges - friend double distBetween(DLFLEdgePtr ep1, DLFLEdgePtr ep2); - - // Get the Edge normals - vectors along the surface perpendicular to the edge - // Calculated as cross-product of surface normal at corner and edge vector - // Will be opposite in direction for the two corners - // Specify the corner where the normal is to be calculated. This defines the origin - // for the edge vector. Checks to see if given corner belongs to Edge. If not returns - // a zero vector as the normal - Vector3d getEdgeNormal(DLFLFaceVertexPtr fvptr) const; - - // Compute and return the average of the normal at the two end vertices - Vector3d averageVertexNormal(void) const; - - // Compute and return the average of the normal at the two end corners - Vector3d averageCornerNormal(void) const; - - // Mutative functions - void setFaceVertexPtr1(DLFLFaceVertexPtr fvptr, bool update = true) - { - fvpV1 = fvptr; - if (update) - { - updateNormal(); - } - updateMidPoint(); - } - - void setFaceVertexPtr2(DLFLFaceVertexPtr fvptr, bool update = true) - { - fvpV2 = fvptr; - if (update) - { - updateNormal(); - } - updateMidPoint(); - } - - void setFaceVertexPointers(DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, bool update = true) - { - fvpV1 = fvptr1; fvpV2 = fvptr2; - if (update) - { - updateNormal(); - } - updateMidPoint(); - } - - void makeUnique(void) - { - assignID(); - } - - friend void makeEdgeUnique(DLFLEdgePtr dep); - /* - friend void makeEdgeUnique(DLFLEdgePtr dep) { - dep->makeUnique(); - } - */ - - // Update the DLFLEdgePtr field of the 2 FaceVertex members - void updateFaceVertices(void); - - // Update the FaceVertexPtr fields selectively - - // If any of the FaceVertexPtr fields are nullptr set it to the given FaceVertexPtr - void setNullFaceVertexPtr(DLFLFaceVertexPtr fvptr) - { - if (fvpV1 == nullptr) fvpV1 = fvptr; - else if (fvpV2 == nullptr) fvpV2 = fvptr; - } - - // If any of the FaceVertexPtr fields matches the given FaceVertexPtr, set it to nullptr - void resetFaceVertexPtr(DLFLFaceVertexPtr fvptr) - { - if (fvpV1 == fvptr) fvpV1 = nullptr; - else if (fvpV2 == fvptr) fvpV2 = nullptr; - } - - // Equality operator - two edges are equal if they have the same 2 end-points - friend bool operator == (const DLFLEdge& e1, const DLFLEdge& e2); - - // Check if the DLFLEdge is a 'valid' edge - both FaceVertexes shouldn't be from the - // same Face - bool isValid(void) const; - - // Is this Edge a self-loop? Are the 2 end points the same? - bool isSelfLoop(void) const; - - // Check if 2 edges intersect - friend bool checkIntersection(DLFLEdgePtr ep1, DLFLEdgePtr ep2); - - // Print out the DLFLEdge - friend ostream& operator << (ostream& o, const DLFLEdge& e); - - // Print out the Face IDs of the 2 FaceVertices - void printFaceIDs(void) const; - void printPointers(void) const; - void print(void) const { printFaceIDs(); } - - // Write out the edge in DLFL format - void writeDLFL(ostream& o) const; - - // Write out the edge in DLFL format but in reverse order. Useful for crust modeling - void writeDLFLReverse(ostream& o) const; - -protected: - // Assign a unique ID for this instance - void assignID(void) - { - uID = suLastID++; - isMarked = false; - isVisited = false; - } - - // Update the mid point for this edge - void updateMidPoint(void); - - // Update the edge normal - average of normals at the 4 corners adjacent to this edge - void updateNormal(void); - -private: - // Reverse the edge. Updates the face-vertex pointers appropriately. - // WARNING! This function will leave the object in an invalid state - // unless ALL other edges and faces are also reversed. To prevent unintended - // problems, this is made private and classes which need access to this - // function are made friends - void reverse(void); - -public: - unsigned long flags; // Variable for general use to store flags, etc. - bool isMarked; - bool isDummy; - bool isTodel; - bool isVisited; - -protected: - // Distinct ID for each instance - // The last assigned ID is stored in this - // class variable - static uint suLastID; - - DLFLFaceVertexPtr fvpV1; - DLFLFaceVertexPtr fvpV2; - uint uID; // ID for this Edge - DLFLEdgeType etType; // For use in subdivision surfaces - Vector3d auxcoords; // Coords for use during subdivs, etc. - Vector3d auxnormal; // Extra storage for normal - Vector3d midpoint; // Midpoint of edge (not always current) - Vector3d normal; // Edge normal (at midpoint, not always current) - - friend class DLFLObject; - -}; - -bool coFacial(DLFLEdgePtr ep1, DLFLEdgePtr ep2); -void resetEdgeType(DLFLEdgePtr dep); -void makeEdgeUnique(DLFLEdgePtr dep); - -} // end namespace - -#endif /* #ifndef _DLFL_EDGE_HH_ */ - diff --git a/topmodx/include/dlflcore/DLFLFace.cc b/topmodx/include/dlflcore/DLFLFace.cc deleted file mode 100644 index 48a6610..0000000 --- a/topmodx/include/dlflcore/DLFLFace.cc +++ /dev/null @@ -1,1466 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLFace.cc - */ - -// Non-inline source code for DLFLFace class - -#include "DLFLFace.h" -#include "DLFLEdge.h" -#include "DLFLFaceVertex.h" -#include "DLFLVertex.h" -//#include "TMPatchFace.h" - -namespace DLFL -{ - -// Texture coordinates for the 4 corners of a unit square -static Vector2d unittexcoords[] = { Vector2d(0,0), Vector2d(1,0), Vector2d(1,1), Vector2d(0,1) }; - -// Define the static variable. Initialized to 0 -uint DLFLFace::suLastID = 0; - -/* -Traversing the Face using the DLFLFaceVertexPtr - -The list of DLFLFaceVertexPtr s is circular. So we have to ensure that every node get's traversed -exactly once. -head -> points to beginning of Face. - -if ( head ) -{ -DLFLFaceVertexPtr current = head; -(do operation on current) -current = current->next(); -while ( current != head ) -{ -(do operation on current) -current = current->next(); -} -} -*/ - - -// Dump contents of object -void DLFLFace::dump(ostream& o) const -{ - o << "DLFLFace" << endl - // << " ID : " << uID << endl - // << " MatlPtr : " << matl_ptr << endl - // << " Type : " << ftType << endl - << " DLFLFaceVertexPtr list" << endl; - - if (head) - { - DLFLFaceVertexPtr current = head; - int i = 0; - - o << " " << i << " : " << current << endl; current->dump(o); - ++i; current = current->next(); - while (current != head) - { - o << " " << i << " : " << current << endl; current->dump(o); - ++i; current = current->next(); - } - } - o << endl; -} - -// Constructor -DLFLFace::DLFLFace(DLFLMaterialPtr mp) - : head(nullptr), matl_ptr(mp), ftType(FTNormal), auxcoords(), auxnormal(), centroid(), normal(), flags(0) -{ - assignID(); - // Add this face to the face-list of any associated material - if (matl_ptr) matl_ptr->addFace(this); -} - -// Copy constructor -DLFLFace::DLFLFace(const DLFLFace& face) - : uID(face.uID), head(nullptr), matl_ptr(face.matl_ptr), ftType(face.ftType), - auxcoords(face.auxcoords), auxnormal(face.auxnormal), centroid(face.centroid), normal(face.normal), flags(face.flags) -{ - copy(face.head); - // Add this face to the face-list of any associated material - if (matl_ptr) matl_ptr->addFace(this); -} - -// Destructor -DLFLFace::~DLFLFace() -{ - // Remove this face from the face-list of the material if there is an associated material - if (matl_ptr) matl_ptr->deleteFace(this); - destroy(); -} - -// Copy face from another face. Doesn't destroy existing face. So it's more of an insert -void DLFLFace::copy(DLFLFaceVertexPtr ptr) -{ - if (ptr) - { - DLFLFaceVertexPtr current = ptr; - addVertexPtr(current->copy()); - current = current->next(); - while (current != ptr) - { - addVertexPtr(current->copy()); - current = current->next(); - } - } -} - -// Destroy this face -void DLFLFace::destroy(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - DLFLFaceVertexPtr temp; - temp = current; - current = current->next(); - delete temp; - while (current != head) - { - temp = current; - current = current->next(); - delete temp; - } - } - head = nullptr; -} - -// Assignment operator -DLFLFace& DLFLFace::operator = (const DLFLFace& face) -{ - destroy(); - copy(face.head); - uID = face.uID; - ftType = face.ftType; - auxcoords = face.auxcoords; - auxnormal = face.auxnormal; - centroid = face.centroid; - normal = face.normal; - flags = face.flags; - if (matl_ptr != face.matl_ptr) - { - // Remove this face from the face-list of the material - // if there is an associated material - if (matl_ptr) matl_ptr->deleteFace(this); - - matl_ptr = face.matl_ptr; - - // Add this face to the face-list of the material - if (matl_ptr) matl_ptr->addFace(this); - } - return (*this); -} - -DLFLFaceVertexPtr DLFLFace::addVertex(const DLFLFaceVertex& dfv) -{ - // Insert a copy. - DLFLFaceVertexPtr newfvp = dfv.copy(); - addVertexPtr(newfvp); - return newfvp; -} - -DLFLFaceVertexPtr DLFLFace::addVertex(DLFLFaceVertexPtr dfvp) -{ - // Insert a copy. - DLFLFaceVertexPtr newfvp = dfvp->copy(); - addVertexPtr(newfvp); - return newfvp; -} - -void DLFLFace::addVertexPtr(DLFLFaceVertexPtr dfvp) -{ - // Just insert the pointer. - // **** WARNING!!! **** The pointer will be freed when the list is deleted! - // Set face pointer for the face-vertex - dfvp->setFacePtr(this); - // Adjust the previous and next fields for this and adjacent face-vertices - if (head) - { - DLFLFaceVertexPtr last = head->prev(); - dfvp->next() = head; head->prev() = dfvp; - dfvp->prev() = last; last->next() = dfvp; - } - else - { - // face is empty - // Make the new face-vertex the head - head = dfvp; - } -} - -void DLFLFace::deleteVertexPtr(DLFLFaceVertexPtr dfvp) -{ - if (dfvp->getFacePtr() != this) return; - - // Adjust pointers of adjacent face-vertices - DLFLFaceVertexPtr n = dfvp->next(); - DLFLFaceVertexPtr p = dfvp->prev(); - - if (n == p && n == dfvp) - { // Lone vertex in this face - // NOTE: If n == p, it does not mean that this is the only vertex - // n == p will be true even when there are 2 vertices only in the face - head = nullptr; - return; - } - - n->prev() = p; p->next() = n; - - if (head == dfvp) head = n; - - // Reset dfvp's pointers to point to itself - dfvp->next() = dfvp; dfvp->prev() = dfvp; dfvp->setFacePtr(nullptr); -} - - -void DLFLFace::getVertexCoords(Vector3dArray& verts) -{ - // Get the coordinates of the vertices of this face in a Vector3dArray - verts.clear(); verts.reserve(size()); - if (head) - { - DLFLFaceVertexPtr current = head; - verts.push_back(current->getVertexCoords()); - current = current->next(); - while (current != head) - { - verts.push_back(current->getVertexCoords()); - current = current->next(); - } - } -} - -// Set the material for this face. Update face-list of material also -void DLFLFace::setMaterial(DLFLMaterialPtr mptr) -{ - if (mptr == matl_ptr) return; - - // Remove face from old material - if (matl_ptr) matl_ptr->deleteFace(this); - - // Change material - matl_ptr = mptr; - - // Add face to new material - if (matl_ptr) matl_ptr->addFace(this); -} - -DLFLFaceVertexPtr DLFLFace::advance(DLFLFaceVertexPtr ptr, uint num) const -{ - DLFLFaceVertexPtr newptr = ptr; - for (uint i = 0; i < num; ++i) - newptr = newptr->next(); - return newptr; -} - -// Access the face-vertex specified by index. No range checks done -DLFLFaceVertexPtr DLFLFace::facevertexptr(uint index) -{ - return advance(head, index); -} - -DLFLFaceVertex& DLFLFace::facevertex(uint index) -{ - return *advance(head, index); -} - -DLFLFaceVertex DLFLFace::facevertex(uint index) const -{ - return *advance(head, index); -} - -// Access the vertex specified by index. No range checks done -DLFLVertexPtr DLFLFace::vertexptr(uint index) -{ - return facevertexptr(index)->vertex; -} - -DLFLVertex& DLFLFace::vertex(uint index) -{ - return *(facevertexptr(index)->vertex); -} - -DLFLVertex DLFLFace::vertex(uint index) const -{ - return *(facevertex(index).vertex); -} - -// Access the coordinates of the vertex specified by index. No range checks done -Vector3d& DLFLFace::vertex_coords(uint index) -{ - return vertexptr(index)->coords; -} - -Vector3d DLFLFace::vertex_coords(uint index) const -{ - return vertex(index).coords; -} - -// Access color and normal of face vertex specified by index -RGBColor& DLFLFace::fv_color(uint index) -{ - return facevertexptr(index)->color; -} - -RGBColor DLFLFace::fv_color(uint index) const -{ - return facevertex(index).color; -} - -Vector3d& DLFLFace::fv_normal(uint index) -{ - return facevertexptr(index)->normal; -} - -Vector3d DLFLFace::fv_normal(uint index) const -{ - return facevertex(index).normal; -} - -// Set the color of all face vertices of this face -void DLFLFace::setColor(const RGBColor& col) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->color = col; - current = current->next(); - while (current != head) - { - current->color = col; - current = current->next(); - } - } -} - -void DLFLFace::setColor(double r, double g, double b) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->color.color.set(r, g, b); - current = current->next(); - while (current != head) - { - current->color.color.set(r, g, b); - current = current->next(); - } - } -} - -void DLFLFace::randomAssignTexCoords(void) -{ - // Assumes that the face is a quad - //int start = lrand48() % 4; // Random no 0,1,2 or 3 - int start = rand() % 4; // Random no 0,1,2 or 3 - - if (head) - { - DLFLFaceVertexPtr current = head; - current->texcoord = unittexcoords[start]; - ++start; start %= 4; - current = current->next(); - while (current != head) - { - current->texcoord = unittexcoords[start]; - ++start; start %= 4; - current = current->next(); - } - } -} - -void DLFLFace::updateMaterial(void) -{ - if (matl_ptr) matl_ptr->addFace(this); -} - -Vector3d DLFLFace::geomSum(void) const -{ - Vector3d sumg; - if (head) - { - DLFLFaceVertexPtr current = head; - sumg = current->vertex->coords; - current = current->next(); - while (current != head) - { - sumg += current->vertex->coords; - current = current->next(); - } - } - return sumg; -} - -Vector2d DLFLFace::textureSum(void) const -{ - Vector2d sumtc; - if (head) - { - DLFLFaceVertexPtr current = head; - sumtc = current->texcoord; - current = current->next(); - while (current != head) - { - sumtc += current->texcoord; - current = current->next(); - } - } - return sumtc; -} - -RGBColor DLFLFace::colorSum(void) const -{ - RGBColor sumc; - if (head) - { - DLFLFaceVertexPtr current = head; - sumc = current->color; - current = current->next(); - while (current != head) - { - sumc += current->color; - current = current->next(); - } - } - return sumc; -} - -Vector3d DLFLFace::normalSum(void) const -{ - Vector3d sumn; - if (head) - { - DLFLFaceVertexPtr current = head; - sumn = current->normal; - current = current->next(); - while (current != head) - { - sumn += current->normal; - current = current->next(); - } - } - return sumn; -} - -void DLFLFace::getSums(Vector3d& sumg, Vector2d& sumtc, RGBColor& sumc, Vector3d& sumn) const -{ - if (head) - { - DLFLFaceVertexPtr current = head; - sumg = current->vertex->coords; - sumtc = current->texcoord; - sumc = current->color; - sumn = current->normal; - current = current->next(); - while (current != head) - { - sumg += current->vertex->coords; - sumtc += current->texcoord; - sumc += current->color; - sumn += current->normal; - current = current->next(); - } - } -} - -void DLFLFace::updateCentroid(void) -{ - centroid.reset(); - if (head) - { - int num = 0; - DLFLFaceVertexPtr current = head; - centroid = current->vertex->coords; ++num; - current = current->next(); - while (current != head) - { - centroid += current->vertex->coords; ++num; - current = current->next(); - } - centroid /= num; - } -} - -Vector2d DLFLFace::textureCentroid(void) const -{ - Vector2d centc; - if (head) - { - int num = 0; - DLFLFaceVertexPtr current = head; - centc = current->texcoord; ++num; - current = current->next(); - while (current != head) - { - centc += current->texcoord; ++num; - current = current->next(); - } - centc /= num; - } - return centc; -} - -RGBColor DLFLFace::colorCentroid(void) const -{ - RGBColor cenc; - if (head) - { - int num = 0; - DLFLFaceVertexPtr current = head; - cenc = current->color; ++num; - current = current->next(); - while (current != head) - { - cenc += current->color; ++num; - current = current->next(); - } - cenc /= num; - } - return cenc; -} - -void DLFLFace::updateNormal(void) -{ - normal.reset(); - if (head) - { - int num = 0; - DLFLFaceVertexPtr current = head; - do - { - normal += current->computeNormal(); ++num; - current = current->next(); - } while (current != head); - normalize(normal); - } -} - -Vector3d DLFLFace::computeNormal(void) -{ - normal.reset(); - if (head) - { - int num = 0; - DLFLFaceVertexPtr current = head; - do - { - normal += current->computeNormal(); ++num; - current = current->next(); - } while (current != head); - normal /= num; normalize(normal); - - current = head; - do - { - current->setNormal(normal); - current = current->next(); - } while (current != head); - } - return normal; -} - -void DLFLFace::storeNormals(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->computeNormal(); - current = current->next(); - while (current != head) - { - current->computeNormal(); - current = current->next(); - } - } -} - -void DLFLFace::getCentroids(Vector3d& ceng, Vector2d& centc, RGBColor& cenc, Vector3d& cenn) const -{ - if (head) - { - int num = 0; - DLFLFaceVertexPtr current = head; - ceng = current->vertex->coords; - centc = current->texcoord; - cenc = current->color; - cenn = current->normal; - ++num; - current = current->next(); - while (current != head) - { - ceng += current->vertex->coords; - centc += current->texcoord; - cenc += current->color; - cenn += current->normal; - ++num; - current = current->next(); - } - ceng /= num; - centc /= num; - cenc /= num; - cenn /= num; - } -} - -uint DLFLFace::size(void) const -{ - int num = 0; - if (head) - { - DLFLFaceVertexPtr current = head; - ++num; current = current->next(); - while (current != head) - { - ++num; current = current->next(); - } - } - return num; -} - -void DLFLFace::resetTypeDeep(void) -{ - resetType(); - if (head) - { - DLFLFaceVertexPtr current = head; - current->resetType(); - current = current->next(); - while (current != head) - { - current->resetType(); - current = current->next(); - } - } -} - -void DLFLFace::updateFacePointers(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->setFacePtr(this); - current = current->next(); - while (current != head) - { - current->setFacePtr(this); - current = current->next(); - } - } -} - -void DLFLFace::resetFacePointers(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->setFacePtr(nullptr); - current = current->next(); - while (current != head) - { - current->setFacePtr(nullptr); - current = current->next(); - } - } -} - -void DLFLFace::addFaceVerticesToVertices(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->addSelfToVertex(); - current = current->next(); - while (current != head) - { - current->addSelfToVertex(); - current = current->next(); - } - } -} - -void DLFLFace::deleteFaceVerticesFromVertices(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->deleteSelfFromVertex(); - current = current->next(); - while (current != head) - { - current->deleteSelfFromVertex(); - current = current->next(); - } - } -} - -void DLFLFace::addFaceVerticesToEdges(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->addSelfToEdge(); - current = current->next(); - while (current != head) - { - current->addSelfToEdge(); - current = current->next(); - } - } -} - -void DLFLFace::deleteFaceVerticesFromEdges(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->deleteSelfFromEdge(); - current = current->next(); - while (current != head) - { - current->deleteSelfFromEdge(); - current = current->next(); - } - } -} - -void DLFLFace::addFaceVerticesToVerticesAndEdges(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->addSelfToVertex(); - current->addSelfToEdge(); - current = current->next(); - while (current != head) - { - current->addSelfToVertex(); - current->addSelfToEdge(); - current = current->next(); - } - } -} - -void DLFLFace::deleteFaceVerticesFromVerticesAndEdges(void) -{ - if (head) - { - DLFLFaceVertexPtr current = head; - current->deleteSelfFromVertex(); - current->deleteSelfFromEdge(); - current = current->next(); - while (current != head) - { - current->deleteSelfFromVertex(); - current->deleteSelfFromEdge(); - current = current->next(); - } - } -} - -int DLFLFace::getEdges(DLFLEdge ** edges) -{ - int length = size(); - if (length < 2) return 0; - - // Atleast 2 vertices are there in this DLFLFace (atleast 3 should be there, but - // that doesn't affect this function) - *edges = new DLFLEdge[length]; - - if (head) - { - int index = 0; - DLFLFaceVertexPtr current = head; - - edges[0][length - 1].setFaceVertexPtr2(current); // Last Edge - edges[0][index].setFaceVertexPtr1(current); // First Edge - current = current->next(); - while (current != head) - { - edges[0][index].setFaceVertexPtr2(current); - index++; - edges[0][index].setFaceVertexPtr1(current); - current = current->next(); - } - } - return length; -} - -// This function is different from the previous one in that it doesn't create any new edges -// It simply gets the existing edges. Puts the edge pointers into an array -void DLFLFace::getEdges(DLFLEdgePtrArray& edges) -{ - edges.clear(); edges.reserve(size()); - if (head) - { - DLFLFaceVertexPtr current = head; - - edges.push_back(current->getEdgePtr()); - current = current->next(); - while (current != head) - { - edges.push_back(current->getEdgePtr()); - current = current->next(); - } - } -} - -// Same as above but puts edge pointers into a linked list -void DLFLFace::getEdges(DLFLEdgePtrList& edges) -{ - edges.clear(); - if (head) - { - DLFLFaceVertexPtr current = head; - - edges.push_back(current->getEdgePtr()); - current = current->next(); - while (current != head) - { - edges.push_back(current->getEdgePtr()); - current = current->next(); - } - } -} - -// Get the face vertex pointers in the face as an array -void DLFLFace::getCorners(DLFLFaceVertexPtrArray& corners) -{ - corners.clear(); corners.reserve(size()); - - if (head) - { - DLFLFaceVertexPtr current = head; - - corners.push_back(current); - current = current->next(); - while (current != head) - { - corners.push_back(current); - current = current->next(); - } - } -} - -DLFLFaceVertexPtr DLFLFace::findFaceVertex(uint vertexId) const -{ - if (head) - { - DLFLFaceVertexPtr current = head; - do - { - uint id = current->getVertexID(); - if (vertexId == id) - return current; - current = current->next(); - } while (current != head); - } - return nullptr; -} - -DLFLFaceVertexPtr DLFLFace::findFaceVertexByID(uint faceVertexId) const -{ - if (head) - { - DLFLFaceVertexPtr current = head; - do - { - uint id = current->getID(); - if (faceVertexId == id) - return current; - current = current->next(); - } while (current != head); - } - return nullptr; -} - -// Get the corners and the coords -void DLFLFace::getCornersAndCoords(DLFLFaceVertexPtrArray& corners, Vector3dArray& coords) -{ - int n = size(); - corners.clear(); corners.reserve(n); - coords.clear(); coords.reserve(n); - - if (head) - { - DLFLFaceVertexPtr current = head; - - corners.push_back(current); - coords.push_back(current->getVertexCoords()); - current = current->next(); - while (current != head) - { - corners.push_back(current); - coords.push_back(current->getVertexCoords()); - current = current->next(); - } - } -} - -// Does this face contain the given face-vertex? -bool DLFLFace::contains(DLFLFaceVertexPtr fvptr) -{ - if (fvptr) - { - if (head) - { - DLFLFaceVertexPtr current = head; - if (current == fvptr) return true; - current = current->next(); - while (current != head) - { - if (current == fvptr) return true; - current = current->next(); - } - } - } - return false; -} - -bool DLFLFace::sharesOneVertex(DLFLFacePtr dfp) -{ - if (head) - { - int numSharedVerts = 0; - DLFLFaceVertexPtr current = head; - DLFLFaceVertexPtrArray dfvparray; - dfp->getCorners(dfvparray); - vector::iterator it; - for (it = dfvparray.begin(); it != dfvparray.end(); it++) - { - current = head; - if (current->getVertexPtr() == (*it)->getVertexPtr()) - numSharedVerts++; - current = current->next(); - while (current != head) - { - if (current->getVertexPtr() == (*it)->getVertexPtr()) - numSharedVerts++; - current = current->next(); - } - // cout << numSharedVerts << std::endl; - }//end for it loop - if (numSharedVerts == 1) return true; - else return false; - } - return false; -} - -//store all neighboring faces in fparray, passed by reference -void DLFLFace::getNeighboringFaces(DLFLFacePtrArray& fparray) -{ - fparray.clear(); - DLFLFaceVertexPtr current = head; - DLFLFacePtrArray fparr; - vector::iterator it; - current->getVertexPtr()->getFaces(fparr); - for (it = fparr.begin(); it != fparr.end(); it++) - { - if ((*it) != this) - fparray.push_back((*it)); - } - current = current->next(); - while (current != head) - { - current->getVertexPtr()->getFaces(fparr); - for (it = fparr.begin(); it != fparr.end(); it++) - { - if ((*it) != this) - fparray.push_back((*it)); - } - current = current->next(); - } -} - -// Find next DLFLFaceVertex - just return the next() for given face-vertex -DLFLFaceVertexPtr DLFLFace::nextFaceVertex(DLFLFaceVertexPtr fvptr) -{ - return fvptr->next(); -} - -// Find previous DLFLFaceVertex - just return the prev() for given face-vertex -DLFLFaceVertexPtr DLFLFace::prevFaceVertex(DLFLFaceVertexPtr fvptr) -{ - return fvptr->prev(); -} - -// Find the DLFLFaceVertex closest to the given point -DLFLFaceVertexPtr DLFLFace::findClosest(const Vector3d& p) -{ - DLFLFaceVertexPtr closest = nullptr; - - if (head) - { - DLFLFaceVertexPtr current = head; - double dist, mindist; - mindist = dist = normsqr(p - current->vertex->coords); - closest = current; - current = current->next(); - while (current != head) - { - dist = normsqr(p - current->vertex->coords); - if (dist < mindist) - { - mindist = dist; closest = current; - } - current = current->next(); - } - } - return closest; -} - -// Find the two corners which are closest to each other in the two faces -// The passed DLFLFaceVertex pointers will be set to the closest corners, -// the first one from the first face and the second one from the second face -void DLFLFace::findClosestCorners(DLFLFacePtr fp1, DLFLFacePtr fp2, - DLFLFaceVertexPtr& fvp1, DLFLFaceVertexPtr& fvp2) -{ - // Traverse face 1 and find closest point in face 2 for each point in face 1 - // using findClosest member function in DLFLFace - fvp1 = nullptr; fvp2 = nullptr; - - if (fp1->head) - { - double dist, mindist; - DLFLFaceVertexPtr cur1, cur2; - fvp1 = cur1 = fp1->head; - fvp2 = cur2 = fp2->findClosest(cur1->vertex->coords); - mindist = dist = normsqr(cur1->vertex->coords - cur2->vertex->coords); - cur1 = cur1->next(); - while (cur1 != fp1->head) - { - cur2 = fp2->findClosest(cur1->vertex->coords); - dist = normsqr(cur1->vertex->coords - cur2->vertex->coords); - if (dist < mindist) - { - mindist = dist; fvp1 = cur1; fvp2 = cur2; - } - cur1 = cur1->next(); - } - } -} - -// Insert a new DLFLFaceVertex after a given DLFLFaceVertex -DLFLFaceVertexPtr DLFLFace::insertAfter(DLFLFaceVertexPtr fvptr, DLFLFaceVertexPtr new_fvp, bool copy) -{ - DLFLFaceVertexPtr fvp; - - if (copy) fvp = new_fvp->copy(); - else fvp = new_fvp; - - fvp->setFacePtr(this); - - fvp->next() = fvptr->next(); - fvp->next()->prev() = fvp; - fvp->prev() = fvptr; - fvptr->next() = fvp; - - return fvp; -} - -// Insert a new DLFLFaceVertex before a given DLFLFaceVertex -DLFLFaceVertexPtr DLFLFace::insertBefore(DLFLFaceVertexPtr fvptr, DLFLFaceVertexPtr new_fvp, bool copy) -{ - // Find the previous face vertex to the given face vertex - // and insert the new one after that - DLFLFaceVertexPtr prev = fvptr->prev(); - return insertAfter(prev, new_fvp, copy); -} - -void DLFLFace::reorder(DLFLFaceVertexPtr fvptr) -{ - // Reorder the face-vertices so that the given face-vertex is the first one - // Simply have to change the head pointer to point to the new face vertex - // Check if fvptr belongs to this face. If yes, simply reset head to be fvptr - // Otherwise don't change anything - if (fvptr && this->contains(fvptr)) head = fvptr; -} - -void DLFLFace::reverse(void) -{ - // Reverse the order of face-vertices in the face - // For every face-vertex, swap the previous and next fields - if (head) - { - DLFLFaceVertexPtr current = head; - current->reverse(); - current = current->next(); - while (current != head) - { - current->reverse(); - current = current->next(); - } - } -} - -vector DLFLFace::vertexWalk() const -{ - vector verts; - if (head) - { - DLFLFaceVertexPtr current = head; - if (current->getFacePtr() != this) - { - cerr << "Data-structure consistency error!" << endl; - cerr << "Vertex : " << current->getVertexID() << endl - << "Face : " << current->getFacePtr()->getID() << endl - << "Edge : " << current->getEdgePtr()->getID() << endl; - return verts; - } - - if (current->getVertexPtr() != nullptr) - verts.push_back(current->getVertexID()); - current = current->next(); - while (current != head) - { - if (current->getVertexPtr() != nullptr) - verts.push_back(current->getVertexID()); - current = current->next(); - } - } - return verts; -} - -vector DLFLFace::edgeWalk() const -{ - vector edges; - if (head) - { - DLFLFaceVertexPtr current = head; - if (current->getFacePtr() != this) - { - cerr << "Data-structure consistency error!" << endl; - cerr << "Vertex : " << current->getVertexID() << endl - << "Face : " << current->getFacePtr()->getID() << endl - << "Edge : " << current->getEdgePtr()->getID() << endl; - return edges; - } - - if (current->getEdgePtr() != nullptr) - edges.push_back(current->getEdgeID()); - current = current->next(); - while (current != head) - { - if (current->getEdgePtr() != nullptr) - edges.push_back(current->getEdgeID()); - current = current->next(); - } - } - - return edges; -} - -// Boundary walk of DLFLFace -void DLFLFace::boundaryWalk(void) const -{ - cout << "DLFLFace " << uID << " (" << size() << ") : "; - if (head) - { - DLFLFaceVertexPtr current = head; - if (current->getFacePtr() != this) - { - cerr << "Data-structure consistency error!" << endl; - cerr << "Vertex : " << current->getVertexID() << endl - << "Face : " << current->getFacePtr()->getID() << endl - << "Edge : " << current->getEdgePtr()->getID() << endl; - return; - } - cout << current->getVertexID(); - cout << '[' << current->backface << ']'; - if (current->getEdgePtr() != nullptr) - cout << "--(" << current->getEdgeID() << ")-->"; - current = current->next(); - while (current != head) - { - cout << current->getVertexID(); - cout << '[' << current->backface << ']'; - if (current->getEdgePtr() != nullptr) - cout << "--(" << current->getEdgeID() << ")-->"; - current = current->next(); - } - cout << current->getVertexID() << '[' << current->backface << ']' << endl; - } -} - -void DLFLFace::printPointers(void) const -{ - cout << "DLFLFace " << uID << " (" << size() << ") : "; - if (head) - { - DLFLFaceVertexPtr current = head; - cout << current; - cout << "--(" << current->getEdgePtr() << ")-->"; - current = current->next(); - while (current != head) - { - cout << current; - cout << "--(" << current->getEdgePtr() << ")-->"; - current = current->next(); - } - cout << current << endl; - } -} - -// Write out DLFLFace in OBJ format -void DLFLFace::objWrite(ostream& o, uint min_id) const -{ - uint index; - if (head) - { - o << 'f'; - DLFLFaceVertexPtr current = head; - index = current->getVertexID() - min_id; - o << ' ' << index; - current = current->next(); - while (current != head) - { - index = current->getVertexID() - min_id; - o << ' ' << index; - current = current->next(); - } - o << endl; - } -} - -void DLFLFace::objWriteWithNormals(ostream& o, uint min_id, uint& normal_id_start) const -{ - uint index; - if (head) - { - o << 'f'; - DLFLFaceVertexPtr current = head; - index = current->getVertexID() - min_id; - o << ' ' << index << "//" << normal_id_start; - ++normal_id_start; - current = current->next(); - while (current != head) - { - index = current->getVertexID() - min_id; - o << ' ' << index << "//" << normal_id_start; - ++normal_id_start; - current = current->next(); - } - o << endl; - } -} - -void DLFLFace::objWriteWithTexCoords(ostream& o, uint min_id, uint& tex_id_start) const -{ - uint index; - if (head) - { - o << 'f'; - DLFLFaceVertexPtr current = head; - index = current->getVertexID() - min_id; - o << ' ' << index << '/' << tex_id_start; - ++tex_id_start; - current = current->next(); - while (current != head) - { - index = current->getVertexID() - min_id; - o << ' ' << index << '/' << tex_id_start; - ++tex_id_start; - current = current->next(); - } - o << endl; - } -} - -void DLFLFace::objWriteWithNormalsAndTexCoords(ostream& o, uint min_id, uint& normal_id_start, uint& tex_id_start) const -{ - uint index; - if (head) - { - o << 'f'; - DLFLFaceVertexPtr current = head; - index = current->getVertexID() - min_id; - o << ' ' << index << '/' << tex_id_start << '/' << normal_id_start; - ++tex_id_start; ++normal_id_start; - current = current->next(); - while (current != head) - { - index = current->getVertexID() - min_id; - o << ' ' << index << '/' << tex_id_start << '/' << normal_id_start; - ++tex_id_start; ++normal_id_start; - current = current->next(); - } - o << endl; - } -} - -// Write out normals at each vertex in OBJ format -void DLFLFace::objWriteNormals(ostream& o) const -{ - if (head) - { - Vector3d n; - DLFLFaceVertexPtr current = head; - n = current->getNormal(); - o << "vn " << n[0] << ' ' << n[1] << ' ' << n[2] << endl; - current = current->next(); - while (current != head) - { - n = current->getNormal(); - o << "vn " << n[0] << ' ' << n[1] << ' ' << n[2] << endl; - current = current->next(); - } - } -} - -// Write out texture coordinates at each vertex in OBJ format -void DLFLFace::objWriteTexCoords(ostream& o) const -{ - if (head) - { - Vector2d t; - DLFLFaceVertexPtr current = head; - t = current->getTexCoords(); - o << "vt " << t[0] << ' ' << t[1] << endl; - current = current->next(); - while (current != head) - { - t = current->getTexCoords(); - o << "vt " << t[0] << ' ' << t[1] << endl; - current = current->next(); - } - } -} - -void DLFLFace::writeDLFL(ostream& o) const -{ - if (head) - { - DLFLFaceVertexPtr current = head; - o << 'f'; - //o << " {" << getID() << "}"; - o << ' ' << current->getIndex(); - current = current->next(); - while (current != head) - { - o << ' ' << current->getIndex(); - current = current->next(); - } - o << endl; - } -} - -void DLFLFace::writeDLFLReverse(ostream& o) const -{ - if (head) - { - DLFLFaceVertexPtr current = head; - o << 'f'; - //o << " {" << getID() << "}"; - o << ' ' << current->getIndex(); - current = current->prev(); - while (current != head) - { - o << ' ' << current->getIndex(); - current = current->prev(); - } - o << endl; - } -} - -void DLFLFace::for_each(void(*func)(DLFLFaceVertexPtr)) const -{ - // Apply given function to every face-vertex in the face starting at head - if (head) - { - DLFLFaceVertexPtr current = head; - func(current); - current = current->next(); - while (current != head) - { - func(current); - current = current->next(); - } - } -} - -ostream& operator << (ostream& o, const DLFLFace& face) -{ - o << "Face (" << face.size() << ") : "; - if (face.head) - { - DLFLFaceVertexPtr current = face.head; - o << current->vertex->coords; - current = current->next(); - while (current != face.head) - { - o << ", " << current->vertex->coords; - current = current->next(); - } - } - return o; -} - -float DLFLFace::getArea() -{ - updateCentroid(); - - vector::iterator eit; - DLFLEdgePtrArray eptrarray; - - float area = 0; - //get the edges for the current face - getEdges(eptrarray); - for (eit = eptrarray.begin(); eit != eptrarray.end(); eit++) - { - //get the 2 faces for the current edge, select them if they aren't already selected - DLFLVertexPtr vp1, vp2; - //get the two vertices for each edge, select them if they aren't already selected - (*eit)->getVertexPointers(vp1, vp2); - //find the area of this triangle - area += 0.5 * (vp1->coords - centroid)*(vp1->coords - vp2->coords); - } - return area; -} - -void boundaryWalk(DLFLFacePtr faceptr) -{ - faceptr->boundaryWalk(); -} - -void boundaryWalk(const DLFLFace& face) -{ - face.boundaryWalk(); -} - - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLFace.h b/topmodx/include/dlflcore/DLFLFace.h deleted file mode 100644 index e38bfbe..0000000 --- a/topmodx/include/dlflcore/DLFLFace.h +++ /dev/null @@ -1,737 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLFace.hh - */ - -#ifndef _DLFL_FACE_HH_ -#define _DLFL_FACE_HH_ - -// Class for a Face to be used in the DLFLObject class -// Based on the OBJFace class - -// A DLFLFace is just a list of DLFLFaceVertexes -// The ordering of the DLFLFaceVertexes is important -// A DLFLFace can be implemented as a 2-3 Tree or as a linked list - -#include "DLFLCommon.h" -#include "DLFLFaceVertex.h" -#include "DLFLMaterial.h" -//#include - -namespace DLFL -{ - -class DLFLFace -{ -public: - static void setLastID(uint id) - { - if (id > suLastID) - suLastID = id; - }; - -public: - // Default and 1 arg constructor - DLFLFace(DLFLMaterialPtr tmp = nullptr); - - // Copy constructor - DLFLFace(const DLFLFace& face); - - // Destructor - ~DLFLFace(); - - // Assignment operator - DLFLFace& operator = (const DLFLFace& face); - - DLFLFacePtr copy(void) const - { - DLFLFacePtr new_face = new DLFLFace(*this); - return new_face; - } - - // Dump contents of object - void dump(ostream& o) const; - - Vector3d geomSum(void) const; - - // Sum of texture coordinates - Vector2d textureSum(void) const; - - // Color sum - RGBColor colorSum(void) const; - - // Normal sum - Vector3d normalSum(void) const; - - // Get all sums - void getSums(Vector3d& sumg, Vector2d& sumtc, RGBColor& sumc, Vector3d& sumn) const; - - // Update the centroid of this face - void updateCentroid(void); - - // Update the centroid of this face and return it - Vector3d geomCentroid(void) - { - updateCentroid(); - return centroid; - } - - // Compute the texture centroid - Vector2d textureCentroid(void) const; - - // Compute the color centroid - RGBColor colorCentroid(void) const; - - // Update the normal of this face - void updateNormal(void); - - // Compute the normal centroid - Vector3d normalCentroid(void) - { - //updateNormal(); - return normal; - } - - // Compute the normal for this face and send it to the face-vertices - Vector3d computeNormal(void); - - // Compute the normal for each face-vertex and store it in the face-vertex itself - // Don't do any averaging, etc. - void storeNormals(void); - - // Compute all centroids - void getCentroids(Vector3d& cen, Vector2d& texc, RGBColor& colc, Vector3d& nc) const; - - //--- Query Functions ---// - - uint getID(void) const - { - return uID; - } - - DLFLFaceType getType(void) const - { - return ftType; - } - - DLFLMaterialPtr material(void) const - { - return matl_ptr; - } - - Vector3d getAuxCoords(void) const - { - return auxcoords; - } - - Vector3d getAuxNormal(void) const - { - return auxnormal; - } - - Vector3d getNormal(bool update = false) - { - if (update) - updateNormal(); - return normal; - } - - Vector3d getCentroid(void) const - { - return centroid; - } - - //--- Mutative Functions ---// - - void makeUnique(void) - { - assignID(); - } - - // Delete all the face-vertices of this face - void destroy(void); - - void reset(void) - { - destroy(); - matl_ptr = nullptr; - } - - DLFLFaceVertexPtr addVertex(const DLFLFaceVertex& dfv); // Insert a copy - DLFLFaceVertexPtr addVertex(DLFLFaceVertexPtr dfvp); // Insert a copy - void addVertexPtr(DLFLFaceVertexPtr dfvp); // Insert the pointer - - // Delete given FaceVertex from face. Adjust pointers of adjacent face-vertices - // Memory for given face-vertex is not freed. Given FaceVertex must belong to this Face - // If given face-vertex is the only face-vertex in this face, nothing is done (for now) - void deleteVertexPtr(DLFLFaceVertexPtr dfvp); - - // Same as above, but more correct function name - void deleteFaceVertexPtr(DLFLFaceVertexPtr dfvp) - { - deleteVertexPtr(dfvp); - } - - // Get the coordinates of the vertices of the face - void getVertexCoords(Vector3dArray& verts); - - // STL list type access to the Face - DLFLFaceVertexPtr front(void) - { - return head; - } - - DLFLFaceVertexPtr back(void) - { - DLFLFaceVertexPtr b = nullptr; - if (head) b = head->prev(); - return b; - } - - // Return the first/last element of the list - DLFLFaceVertexPtr firstVertex(void) - { - return front(); - } - - DLFLFaceVertexPtr lastVertex(void) - { - return back(); - } - - // Set the material pointer - void setMaterial(DLFLMaterialPtr mptr); - - void setType(DLFLFaceType type) - { - ftType = type; - } - - void resetType(void) - { - ftType = FTNormal; - } - - void setAuxCoords(const Vector3d& p) - { - auxcoords = p; - } - - void setAuxNormal(const Vector3d& n) - { - auxnormal = n; - } - - void addToAuxCoords(const Vector3d& p) - { - auxcoords += p; - } - - void addToAuxNormal(const Vector3d& n) - { - auxnormal += n; - } - - void resetAuxCoords(void) - { - auxcoords.reset(); - } - - void resetAuxNormal(void) - { - auxnormal.reset(); - } - - uint size(void) const; // No. of vertices in this face - uint numFaceVertexes(void) const - { - return size(); - } - - void resetTypeDeep(void); // Reset type of Face and all FaceVertexes in this Face - - // Compute color for each corner using given light and using material of Face - //void computeLighting(LightPtr lightptr); - - // Update the DLFLFacePtr for each DLFLFaceVertex - void updateFacePointers(void); - void resetFacePointers(void); - - // Update the DLFLFaceVertexList for each DLFLVertex referred to by each DLFLFaceVertex - void addFaceVerticesToVertices(void); - void deleteFaceVerticesFromVertices(void); - - // Update the DLFLFaceVertexPtr for each DLFLEdge connected to each DLFLFaceVertex - void addFaceVerticesToEdges(void); - void deleteFaceVerticesFromEdges(void); - - // Update DLFLEdges and DLFLVertices - above functions combined for efficiency - void addFaceVerticesToVerticesAndEdges(void); - void deleteFaceVerticesFromVerticesAndEdges(void); - - // Create an array of DLFLEdges for this DLFLFace. Number of DLFLEdges in the array - // is returned. Memory will be allocated inside this function, which should - // be freed by the caller. Pass a pointer to the array (DLFLEdge **) - int getEdges(DLFLEdge ** edges); - - // Get the edges in the face. Different from previous function. Doesn't create - // new edges, simply stores existing edge pointer from the face vertices into - // the STL array or STL linked list - void getEdges(DLFLEdgePtrArray& edges); - void getEdges(DLFLEdgePtrList& edges); - - // Get the corners in the face. Stores the existing DLFLFaceVertexPtr's in the face - // into the array - void getCorners(DLFLFaceVertexPtrArray& corners); - - // Helpful for python interface - DLFLFaceVertexPtr findFaceVertex(uint vertexId) const; - DLFLFaceVertexPtr findFaceVertexByID(uint faceVertexId) const; - - // Get the corners and the coordinates - void getCornersAndCoords(DLFLFaceVertexPtrArray& corners, Vector3dArray& coords); - - // Does this Face contain the given face-vertex? - bool contains(DLFLFaceVertexPtr dfvp); - - // Does this face share only one vertex with the given face? - bool sharesOneVertex(DLFLFacePtr dfp); - - void getNeighboringFaces(DLFLFacePtrArray& fparray); - - // Find the DLFLFaceVertex following the given DLFLFaceVertex in this DLFLFace - // If only one DLFLFaceVertex is there in the DLFLFace returns itself - DLFLFaceVertexPtr nextFaceVertex(DLFLFaceVertexPtr fvptr); - - // Find the DLFLFaceVertex preceding the given DLFLFaceVertex in this DLFLFace - // If only one DLFLFaceVertex is there in the DLFLFace returns itself - DLFLFaceVertexPtr prevFaceVertex(DLFLFaceVertexPtr fvptr); - - // Find the FaceVertex which is closest to the given point - DLFLFaceVertexPtr findClosest(const Vector3d& p); - - // Find the two corners which are closest to each other in the two faces - // The passed DLFLFaceVertex pointers will be set to the closest corners, - // the first one from the first face and the second one from the second face - static void findClosestCorners(DLFLFacePtr fp1, DLFLFacePtr fp2, - DLFLFaceVertexPtr& fvp1, DLFLFaceVertexPtr& fvp2); - - // Add a new DLFLFaceVertex after/before a given DLFLFaceVertex in this DLFLFace - DLFLFaceVertexPtr insertAfter(DLFLFaceVertexPtr fvptr, DLFLFaceVertexPtr new_fvp, bool copy = true); - DLFLFaceVertexPtr insertBefore(DLFLFaceVertexPtr fvptr, DLFLFaceVertexPtr new_fvp, bool copy = true); - - // Reorder the face-vertices so that the given face-vertex is the first one - // Given face vertex should belong to this face - void reorder(DLFLFaceVertexPtr fvptr); - - // Reverse the face - reverses the order of the face-vertices - // WARNING!! This operation invalidates the DLFL structure. All edges - // associated with this face will be in an invalid state. - void reverse(void); - - // Output the boundary walk of the face - vector vertexWalk() const; - vector edgeWalk() const; - void boundaryWalk(void) const; - void print(void) const - { - boundaryWalk(); - } - - friend void boundaryWalk(DLFLFacePtr faceptr); - /* - friend void boundaryWalk(DLFLFacePtr faceptr) { - faceptr->boundaryWalk(); - } - */ - friend void boundaryWalk(const DLFLFace& face); - /* - friend void boundaryWalk(const DLFLFace& face) { - face.boundaryWalk(); - } - */ - - // For debugging - void printPointers(void) const; - - // Write out the Face in OBJ format to an output stream - source for more info - // min_id is the minimum ID value. It will subtracted from the ID before output - void objWrite(ostream& o, uint min_id) const; - void objWriteWithNormals(ostream& o, uint min_id, uint& normal_id_start) const; - void objWriteWithTexCoords(ostream& o, uint min_id, - uint& tex_id_start) const; - void objWriteWithNormalsAndTexCoords(ostream& o, uint min_id, - uint& normal_id_start, - uint& tex_id_start) const; - - // Write out the normals for each vertex in the Face in OBJ format - void objWriteNormals(ostream& o) const; - - // Write out the texture coordinates for each vertex in the Face in OBJ format - void objWriteTexCoords(ostream& o) const; - - // Write out the face in DLFL format - void writeDLFL(ostream& o) const; - - // Write out the face in DLFL format but in reverse order. Useful for crust modeling - void writeDLFLReverse(ostream& o) const; - - // Access the face-vertex specified by index. No range checks done - DLFLFaceVertexPtr facevertexptr(uint index); - DLFLFaceVertex& facevertex(uint index); - DLFLFaceVertex facevertex(uint index) const; - - // Access the vertex specified by index. No range checks done - DLFLVertexPtr vertexptr(uint index); - DLFLVertex& vertex(uint index); - DLFLVertex vertex(uint index) const; - - // Access the coordinates of the vertex specified by index. No range checks done - Vector3d& vertex_coords(uint index); - Vector3d vertex_coords(uint index) const; - - // Access color and normal of face vertex specified by index - RGBColor& fv_color(uint index); - RGBColor fv_color(uint index) const; - - Vector3d& fv_normal(uint index); - Vector3d fv_normal(uint index) const; - - // Set the color of all face vertices of this face - void setColor(const RGBColor& col); - void setColor(double r, double g, double b); - - // FOR QUADS ONLY - Randomly assign texture coordinates to the 4 corners to match a 1,1 square - void randomAssignTexCoords(void); - - void updateMaterial(void); - - float getArea(); - - //--- Rendering subroutines ---// - - // Call glBegin with the appropriate macro depending on no of vertices - // This is for filled polygons. - /* static void glBeginP(int num) - { - switch ( num ) - { - case 0 : - return; - case 1 : - glBegin(GL_POINTS); break; - case 2 : - glBegin(GL_LINES); break; - case 3 : - glBegin(GL_TRIANGLES); break; - case 4 : - glBegin(GL_QUADS); break; - default : - glBegin(GL_POLYGON); - } - } - - // Call glBegin with the appropriate macro depending on no of vertices - // This is for outlined polygons. - static void glBeginO(int num) - { - switch ( num ) - { - case 0 : - return; - case 1 : - glBegin(GL_POINTS); break; - case 2 : - glBegin(GL_LINES); break; - default : - glBegin(GL_LINE_LOOP); - } - }*/ - - void for_each(void(*func)(DLFLFaceVertexPtr)) const; - /* - void render_FVN(void) const // Render using FV normals - { - DLFLFace :: glBeginP(size()); - for_each(glVertexNp); - glEnd(); - } - - void render_FVC(void) const // Render using FV colors - { - DLFLFace :: glBeginP(size()); - for_each(glVertexCp); - glEnd(); - } - - void render_FVCN(void) const // Render using FV colors and normals - { - DLFLFace :: glBeginP(size()); - for_each(glVertexCNp); - glEnd(); - } - - void render_FV(void) const // Render without using FV colors or normals - { - DLFLFace :: glBeginP(size()); - for_each(glVertexOFVp); - glEnd(); - } - - //--- Same as above but with texturing also ---// - - void render_FVNT(void) const - { - DLFLFace :: glBeginP(size()); - for_each(glVertexNTp); - glEnd(); - } - - void render_FVCT(void) const - { - DLFLFace :: glBeginP(size()); - for_each(glVertexCTp); - glEnd(); - } - - void render_FVCNT(void) const - { - DLFLFace :: glBeginP(size()); - for_each(glVertexCNTp); - glEnd(); - } - - void render_FVT(void) const - { - DLFLFace :: glBeginP(size()); - for_each(glVertexOFVTp); - glEnd(); - } - - void render(void) const // Default render - render_FVN - { - render_FVN(); - } - - //-- Friend versions of above functions --// - - void outline_FVC(void) const // Render outline using FV colors - { - DLFLFace :: glBeginO(size()); - for_each(glVertexCp); - glEnd(); - } - - void outline_FV(void) const // Render outline - { - DLFLFace :: glBeginO(size()); - for_each(glVertexOFVp); - glEnd(); - } - - void outline(void) const // Default outline - outline_FV - { - outline_FV(); - } - - //--- These friend versions of above functions allow use of STL algorithms ---// - - friend void render_FVN(const DLFLFace& face) - { - face.render_FVN(); - } - - friend void render_FVC(const DLFLFace& face) - { - face.render_FVC(); - } - - friend void render_FVCN(const DLFLFace& face) - { - face.render_FVCN(); - } - - friend void render_FV(const DLFLFace& face) - { - face.render_FV(); - } - - friend void render_FVNT(const DLFLFace& face) - { - face.render_FVNT(); - } - - friend void render_FVCT(const DLFLFace& face) - { - face.render_FVCT(); - } - - friend void render_FVCNT(const DLFLFace& face) - { - face.render_FVCNT(); - } - - friend void render_FVT(const DLFLFace& face) - { - face.render_FVT(); - } - - friend void render(const DLFLFace& face) - { - face.render(); - } - - friend void outline_FVC(const DLFLFace& face) - { - face.outline_FVC(); - } - - friend void outline_FV(const DLFLFace& face) - { - face.outline_FV(); - } - - friend void outline(const DLFLFace& face) - { - face.outline(); - } - - - //--- The DLFLFacePtr versions are for use by the DLFLMaterial class ---// - - // The function names have been changed to prevent STL instantiation errors - // because of conflicts with other functions with similar names (DLFLMaterial) - - friend void facerender_FVN(const DLFLFacePtr& face) - { - face->render_FVN(); - } - - friend void facerender_FVC(const DLFLFacePtr& face) - { - face->render_FVC(); - } - - friend void facerender_FVCN(const DLFLFacePtr& face) - { - face->render_FVCN(); - } - - friend void facerender_FV(const DLFLFacePtr& face) - { - face->render_FV(); - } - - friend void facerender_FVNT(const DLFLFacePtr& face) - { - face->render_FVNT(); - } - - friend void facerender_FVCT(const DLFLFacePtr& face) - { - face->render_FVCT(); - } - - friend void facerender_FVCNT(const DLFLFacePtr& face) - { - face->render_FVCNT(); - } - - friend void facerender_FVT(const DLFLFacePtr& face) - { - face->render_FVT(); - } - - friend void facerender(const DLFLFacePtr& face) - { - face->render(); - } - - friend void faceoutline_FVC(const DLFLFacePtr& face) - { - face->outline_FVC(); - } - - friend void faceoutline_FV(const DLFLFacePtr& face) - { - face->outline_FV(); - } - - friend void faceoutline(const DLFLFacePtr& face) - { - face->outline(); - }*/ - - friend ostream& operator << (ostream& o, const DLFLFace& face); - -protected: - // Assign a unique ID for this instance - void assignID(void) - { - uID = suLastID++; - isMarked = false; - } - - // Advance the pointer by given number of nodes. Similar to STL advance algorithm - DLFLFaceVertexPtr advance(DLFLFaceVertexPtr ptr, uint num) const; - - // Copy all face-vertices from another face specified by it's head pointer - void copy(DLFLFaceVertexPtr ptr); - -public: - Vector3d centroid; //!< Centroid of this face (not always current) - Vector3d normal; //!< Normal to this face. Not always correct/current - unsigned long flags; //!< Variable for general use to store flags, etc. - bool isMarked; - -protected: - //!< Distinct ID for each instance - static uint suLastID; - - uint uID; //!< ID for this Face - DLFLFaceVertexPtr head; //!< Head of list of face-vertex pointers - DLFLMaterialPtr matl_ptr; //!< Pointer to material for this face - DLFLFaceType ftType; //!< For use in subdivision surfaces - Vector3d auxcoords; //!< Coords for use during subdivs, etc. - Vector3d auxnormal; //!< Extra storage for normal - - // Classes which need to access the reverse method should be declared as friends here - friend class DLFLObject; - -}; - -void boundaryWalk(DLFLFacePtr faceptr); -void boundaryWalk(const DLFLFace& face); - - -} // end namespace - -#endif /* #ifndef _DLFL_FACE_HH_ */ - diff --git a/topmodx/include/dlflcore/DLFLFaceVertex.cc b/topmodx/include/dlflcore/DLFLFaceVertex.cc deleted file mode 100644 index f39967d..0000000 --- a/topmodx/include/dlflcore/DLFLFaceVertex.cc +++ /dev/null @@ -1,593 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLFaceVertex.cc - */ - -// Non-inline function definitions for class DLFLFaceVertex - -#include "DLFLFaceVertex.h" -#include "DLFLFace.h" - -namespace DLFL -{ - -uint DLFLFaceVertex::suLastID = 0; - -// Default constructor -DLFLFaceVertex::DLFLFaceVertex(bool bf) - : uID(suLastID), vertex(nullptr) - , normal(), color(1), texcoord(), backface(bf), index(0) - , epEPtr(nullptr), fpFPtr(nullptr), fvpNext(nullptr), fvpPrev(nullptr) - , fvtType(FVTNormal) - , auxcoords(), auxnormal() -{ - fvpNext = this; fvpPrev = this; -} - -// 2 arg-constructor - copy the pointers -DLFLFaceVertex::DLFLFaceVertex(DLFLVertexPtr vptr, DLFLEdgePtr eptr, bool bf) - : uID(suLastID), vertex(vptr) - , normal(), color(1), texcoord(), backface(bf), index(0) - , epEPtr(eptr), fpFPtr(nullptr), fvpNext(nullptr), fvpPrev(nullptr) - , fvtType(FVTNormal), auxcoords(), auxnormal() -{ - fvpNext = this; fvpPrev = this; -} - -// Copy constructor -DLFLFaceVertex::DLFLFaceVertex(const DLFLFaceVertex& dfv) - : uID(dfv.uID), vertex(dfv.vertex) - , normal(dfv.normal), color(dfv.color), texcoord(dfv.texcoord) - , backface(false), index(dfv.index) - , epEPtr(dfv.epEPtr), fpFPtr(dfv.fpFPtr) - , fvpNext(nullptr), fvpPrev(nullptr) - , fvtType(dfv.fvtType), auxcoords(dfv.auxcoords), auxnormal(dfv.auxnormal) -{ - fvpNext = this; fvpPrev = this; -} - -// Destructor -DLFLFaceVertex::~DLFLFaceVertex() -{ -} - -// Assignment operator -DLFLFaceVertex& DLFLFaceVertex::operator=(const DLFLFaceVertex& dfv) -{ - vertex = dfv.vertex; normal = dfv.normal; color = dfv.color; texcoord = dfv.texcoord; - backface = dfv.backface; index = dfv.index; - epEPtr = dfv.epEPtr; fpFPtr = dfv.fpFPtr; - fvpNext = dfv.fvpNext; fvpPrev = dfv.fvpPrev; - fvtType = dfv.fvtType; auxcoords = dfv.auxcoords; auxnormal = dfv.auxnormal; //tmpp = dfv.tmpp; - return (*this); -} - -bool DLFLFaceVertex::operator==(const DLFLFaceVertex &other) const -{ - if (getVertexID() == other.getVertexID() && - getFaceID() == other.getFaceID() && - uID == other.uID) - { - return true; - } - else - return false; -} - -DLFLFaceVertexPtr DLFLFaceVertex::copy() const -{ - DLFLFaceVertexPtr fvptr = new DLFLFaceVertex(*this); - return fvptr; -} - -// Dump contents of this object -void DLFLFaceVertex::dump(ostream& o) const -{ - o << " DLFLFaceVertex" << endl - << " VertexPtr : " << vertex << endl - // << " Normal : " << normal << endl - // << " Color : " << color << endl - // << " TexCoord : " << texcoord << endl - << " EdgePtr : " << epEPtr << endl - << " FacePtr : " << fpFPtr << endl - // << " next : " << fvpNext << endl - // << " prev : " << fvpPrev << endl - // << " Type : " << fvtType << endl - << endl; -} - -void average(const DLFLFaceVertex& dfv1, const DLFLFaceVertex& dfv2, DLFLFaceVertex& ave) -{ - // Average 2 face vertexes. Coordinates, normals, texture coordinates and color are averaged - // Assumes that all 3 face vertexes have valid vertex pointers - ave.vertex->coords = ((dfv1.vertex->coords) + (dfv2.vertex->coords)) / 2.0; - ave.normal = (dfv1.normal + dfv2.normal) / 2.0; - ave.color = (dfv1.color + dfv2.color) / 2.0; - ave.texcoord = (dfv1.texcoord + dfv2.texcoord) / 2.0; -} - -void average(DLFLFaceVertexPtr dfvp1, DLFLFaceVertexPtr dfvp2, DLFLFaceVertexPtr avep) -{ - // Average 2 face vertexes. Coordinates, normals, texture coordinates and color are averaged - // Assumes that all 3 face vertexes have valid vertex pointers - avep->vertex->coords = ((dfvp1->vertex->coords) + (dfvp2->vertex->coords)) / 2.0; - avep->normal = (dfvp1->normal + dfvp2->normal) / 2.0; - avep->color = (dfvp1->color + dfvp2->color) / 2.0; - avep->texcoord = (dfvp1->texcoord + dfvp2->texcoord) / 2.0; -} - -bool coFacial(DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2) -{ - return (fvptr1->getFacePtr() == fvptr2->getFacePtr()); -} - -bool coFacial(const DLFLFaceVertex& fv1, const DLFLFaceVertex& fv2) -{ - return (fv1.getFacePtr() == fv2.getFacePtr()); -} - -bool areEqual(DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2) -{ - // Test to see if 2 DLFLFaceVertexes are "equal" - // They are "equal" iff they belong to the same Face AND they - // refer to the same vertex - - // If either pointer is nullptr returns false unless both are nullptr in which - // case it returns true - if (fvptr1 == nullptr) - { - if (fvptr2 == nullptr) return true; - return false; - } - else if (fvptr2 == nullptr) - { - return false; - } - else - { - // Both pointers are not nullptr - if (coFacial(fvptr1, fvptr2) && (fvptr1->getVertexID() == fvptr2->getVertexID())) - return true; - } - return false; -} - -bool areEqual(const DLFLFaceVertex& fv1, const DLFLFaceVertex& fv2) -{ - // Test to see if 2 DLFLFaceVertexes are "equal" - // They are "equal" iff they belong to the same Face AND they - // refer to the same Position - if (coFacial(fv1, fv2) && (fv1.getVertexID() == fv2.getVertexID())) - return true; - return false; -} - -// Check if given corner is a concave corner or not. -// Will not work properly for non-planar faces. -// Will not work properly for faces which have edges which belong entirely to that face. -// Will not work properly for highly skewed geometry. -bool DLFLFaceVertex::isConcaveCorner() const -{ - // If face is a triangle or a 2-gon or a point-sphere return false - if (fpFPtr->size() <= 3) return false; - - // Compute the normalized edge vectors starting from the specified corner - Vector3d ppos = fvpPrev->getVertexCoords(); - Vector3d npos = fvpNext->getVertexCoords(); - Vector3d pos = getVertexCoords(); - Vector3d pvec = ppos - pos; normalize(pvec); - Vector3d nvec = npos - pos; normalize(nvec); - - // If angle between the 2 edge vectors is 0 degrees or 180 degrees - // the corner is assumed to be a convex corner - double sinangle = norm(pvec % nvec); - if (sinangle < 1.0e-5) - return false; - - // Compute a new point by adding the 2 edge vectors, scaled to a very small length. - // The choice of the length of the vector is arbitrary and must be chosen to avoid - // miscalculations because of rounding errors in floating point computations. - // For a concave corner this point will end up lying outside the polygon - // For a convex corner this point will end up lying inside the polygon - Vector3d p = pos + (pvec + nvec) * 0.01; - - // Normal at this corner - for computing projection plane - // not corrected for concavity - Vector3d fvn = nvec % pvec; // pvec and nvec are already normalized - - // Check if p is inside the face - Vector3dArray facepoints; - fpFPtr->getVertexCoords(facepoints); - - if (pointInPolygon(p, facepoints, fvn)) - return false; - - return true; -} - -// Check if this corner is a winged corner or not -// A winged corner is a degenerate corner -// i.e. the angle at the corner is 180 degrees -bool DLFLFaceVertex::isWingedCorner() const -{ - // If face is a triangle or a 2-gon or a point-sphere return false - if (fpFPtr->size() <= 3) - return false; - - // Compute the normalized edge vectors starting from the specified corner - Vector3d ppos = fvpPrev->getVertexCoords(); - Vector3d npos = fvpNext->getVertexCoords(); - Vector3d pos = getVertexCoords(); - Vector3d pvec = ppos - pos; normalize(pvec); - Vector3d nvec = npos - pos; normalize(nvec); - - // If angle between the 2 edge vectors is 0 degrees or 180 degrees - // the corner is a winged corner - // We can also check this by adding the two vectors and checking if - // they sum to 0 - if (norm(pvec + nvec) < 1.0e-5) - return true; - return false; -} - -// Find the next non-winged corner starting from this corner -// If none can be found, returns nullptr -DLFLFaceVertexPtr DLFLFaceVertex::nextNonWingedCorner() const -{ - DLFLFaceVertexPtr fvp = next(); - while (fvp->isWingedCorner() && fvp != this) - fvp = fvp->next(); - if (fvp == this) - return nullptr; - return fvp; -} - -// Find the CLOSEST non-winged corner starting from this corner -// If none can be found, returns nullptr -// Search both forward and backward till we find one. -DLFLFaceVertexPtr DLFLFaceVertex::closestNonWingedCorner() const -{ - DLFLFaceVertexPtr fvpn = next(), fvpp = prev(), fvp = nullptr; - while (fvpn->isWingedCorner() && fvpp->isWingedCorner() && fvpp != fvpn) - { - fvpn = fvpn->next(); fvpp = fvpp->prev(); - } - if (fvpp == fvpn) - { - if (!fvpp->isWingedCorner()) - fvp = fvpp; - else if (!fvpn->isWingedCorner()) - fvp = fvpn; - // WARNING! If the code reaches this point, this function will return nullptr - // This will cause other parts of the program to fail - } - else if (!fvpp->isWingedCorner()) - { - fvp = fvpp; - } - else - { - fvp = fvpn; - } - return fvp; -} - - -// Get a vector along the edge starting at this corner -Vector3d DLFLFaceVertex::getEdgeVector() const -{ - Vector3d pos = getVertexCoords(); - Vector3d npos = fvpNext->getVertexCoords(); - Vector3d evec = npos - pos; - return evec; -} - -// Get 2 vectors along the 2 edges which form this corner -// Both vectors will originate at this corner -void DLFLFaceVertex::getEdgeVectors(Vector3d& pvec, Vector3d& nvec) -{ - nvec = getEdgeVector(); - pvec = -(fvpPrev->getEdgeVector()); // Reverse direction of edgevector from previous corner -} - -void DLFLFaceVertex::updateNormal() -{ - // If this is a winged corner, assign normal of nearest non-winged corner - // Otherwise compute for this corner and adjust for concave corners - if (isWingedCorner()) - { - DLFLFaceVertexPtr fvp = closestNonWingedCorner(); - normal = fvp->computeNormal(); - } - else - { - // compute the normal using adjacent vertices - Vector3d pvec, nvec; - - getEdgeVectors(pvec, nvec); // Don't have to be normalized - normal = nvec % pvec; - normalize(normal); - - // If this corner is a concave corner w.r.t. the face it is in, - // then reverse the normal. - if (isConcaveCorner()) - normal = -normal; - } -} - -void DLFLFaceVertex::addSelfToVertex() -{ - if (vertex) vertex->addToFaceVertexList(this); -} - -void DLFLFaceVertex::deleteSelfFromVertex() -{ - if (vertex) vertex->deleteFromFaceVertexList(this); -} - -void DLFLFaceVertex::addSelfToEdge() -{ - // Add self to Edge if there is a nullptr DLFLFaceVertex pointer in the Edge - if (epEPtr) epEPtr->setNullFaceVertexPtr(this); -} - -void DLFLFaceVertex::deleteSelfFromEdge() -{ - // Set the DLFLFaceVertexPtr of Edge which refers to this DLFLFaceVertex to nullptr - if (epEPtr) epEPtr->resetFaceVertexPtr(this); -} - -void DLFLFaceVertex::deleteSelfFromFace() -{ - // Remove the DLFLFaceVertexPtr from the face to which it belongs. - // Simply calls the deleteVertexPtr method in the face - // This can't be properly implemented here since the head pointer of the DLFLFace might - // need to be adjusted too - fpFPtr->deleteFaceVertexPtr(this); -} - -DLFLFaceVertexPtr DLFLFaceVertex::vnext() -{ - DLFLFaceVertexPtr vn = this; - if (epEPtr) - { - vn = epEPtr->getOtherFaceVertexPtr(vn); - vn = vn->next(); - } - return vn; -} - -DLFLFaceVertexPtr DLFLFaceVertex::vprev() -{ - DLFLFaceVertexPtr vn = this; - if (epEPtr) - { - vn = vn->prev(); - vn = vn->epEPtr->getOtherFaceVertexPtr(vn); - } - return vn; -} - -void DLFLFaceVertex::print(bool printadjacent) const -{ - cout << "DLFLFaceVertex : " - << "Vertex (" << vertex->getID() << ") " - << "Face (" << fpFPtr->getID() << ") " - << "Edge (" << epEPtr->getID() << ") " << endl; - if (printadjacent) - { - cout << "Previous "; fvpPrev->print(); - cout << "Next "; fvpNext->print(); - } -} - -void DLFLFaceVertex::writeDLFL(ostream& o, uint newindex) -{ - o << "fv " << vertex->getIndex() << ' ' - << normal << ' ' - << texcoord << ' ' << endl; - index = newindex; -} - -uint DLFLFaceVertex::readDLFL(istream& i) -{ - // Assume that the "fv" characters have already been read - // Read the vertex index and return it, so the caller can set the vertex pointer - // using the index to reference the vertex list - uint vindex; - i >> vindex >> normal >> texcoord; - return vindex; -} - -uint DLFLFaceVertex::getFaceID() const { return fpFPtr->getID(); } - -void advance(DLFLFaceVertexPtr& fvp) -{ - fvp = fvp->fvpNext; -} - -void backward(DLFLFaceVertexPtr& fvp) -{ - fvp = fvp->fvpPrev; -} - - - -/*void DLFLFaceVertex::render( ) const -{ -if ( vertex ) vertex->render(); -}*/ - -// Do a glVertex on this vertex, using the normal and with color -/*void glVertexCN(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -double x,y,z; dfv.normal.get(x,y,z); -glNormal3f(x,y,z); -glColor(dfv.color); -glVertex(*(dfv.vertex)); -} -}*/ - -// Do a glVertex on this vertex, using the normal and without color -/*void glVertexN(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -double x,y,z; dfv.normal.get(x,y,z); -glNormal3f(x,y,z); -glVertex(*(dfv.vertex)); -} -} - -// Do a glVertex on this vertex, without using the normal and with color -void glVertexC(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -glColor(dfv.color); -glVertex(*(dfv.vertex)); -} -} - -// Do a glVertex on this face vertex, without using the normal and without color -// This function is not named glVertex to allow using it in the -// STL for_each algorithm, since glVertex is overloaded for DLFLVertex also -void glVertexOFV(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) glVertex(*(dfv.vertex)); -} - - -//-- Same as above functions but with texture coordinates also --// - -void glVertexCNT(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -double x,y,z; dfv.normal.get(x,y,z); -glNormal3f(x,y,z); -glColor(dfv.color); -if ( DLFLRenderer::isReversed() ) -glTexCoord2d(1.0-dfv.texcoord[0],1.0-dfv.texcoord[1]); -else -glTexCoord2d(1.0-dfv.texcoord[0],1.0-dfv.texcoord[1]); -glVertex(*(dfv.vertex)); -} -} - -void glVertexNT(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -double x,y,z; dfv.normal.get(x,y,z); -glNormal3f(x,y,z); -if ( DLFLRenderer::isReversed() ) -glTexCoord2d(1.0-dfv.texcoord[0],1.0-dfv.texcoord[1]); -else -glTexCoord2d(dfv.texcoord[0],dfv.texcoord[1]); -glVertex(*(dfv.vertex)); -} -} - -void glVertexCT(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -glColor(dfv.color); -if ( DLFLRenderer::isReversed() ) -glTexCoord2d(1.0-dfv.texcoord[0],1.0-dfv.texcoord[1]); -else -glTexCoord2d(dfv.texcoord[0],dfv.texcoord[1]); -glVertex(*(dfv.vertex)); -} -} - -void glVertexOFVT(const DLFLFaceVertex& dfv) -{ -if ( dfv.vertex ) -{ -if ( DLFLRenderer::isReversed() ) -glTexCoord2d(1.0-dfv.texcoord[0],1.0-dfv.texcoord[1]); -else -glTexCoord2d(dfv.texcoord[0],dfv.texcoord[1]); -glVertex(*(dfv.vertex)); -} -} - - -void glVertexCNp(DLFLFaceVertexPtr dfvp) -{ -glVertexCN(*dfvp); -} - -void glVertexNp(DLFLFaceVertexPtr dfvp) -{ -glVertexN(*dfvp); -} - -void glVertexCp(DLFLFaceVertexPtr dfvp) -{ -glVertexC(*dfvp); -} - -void glVertexOFVp(DLFLFaceVertexPtr dfvp) -{ -glVertexOFV(*dfvp); -} - -void glVertexCNTp(DLFLFaceVertexPtr dfvp) -{ -glVertexCNT(*dfvp); -} - -void glVertexNTp(DLFLFaceVertexPtr dfvp) -{ -glVertexNT(*dfvp); -} - -void glVertexCTp(DLFLFaceVertexPtr dfvp) -{ -glVertexCT(*dfvp); -} - -void glVertexOFVTp(DLFLFaceVertexPtr dfvp) -{ -glVertexOFVT(*dfvp); -} -*/ - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLFaceVertex.h b/topmodx/include/dlflcore/DLFLFaceVertex.h deleted file mode 100644 index 4e46596..0000000 --- a/topmodx/include/dlflcore/DLFLFaceVertex.h +++ /dev/null @@ -1,356 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLFaceVertex.hh - */ - -#ifndef _DLFL_FACE_VERTEX_HH_ -#define _DLFL_FACE_VERTEX_HH_ - -// Class for a face vertex (corner) for the DLFLObject class -// Based on OBJFaceVertex class - -// Contains a pointer to a Vertex and a pointer to the Edge which *starts* at this Face Vertex -// NOTE : The same physical point may be the start of many edges, but for a given face -// only 1 Edge can start at a physical point -// 'start' implies existence of a rotation order for the face -// Each FaceVertex also contains a pointer to the Face to which it belongs - -// The FaceVertex class can now also be used directly as a node in a list -// It contains pointers to the next and previous nodes of the list - -#include "DLFLCommon.h" -#include "DLFLCoreExt.h" -#include "DLFLEdge.h" -#include "DLFLVertex.h" - -namespace DLFL -{ - -class DLFLFaceVertex -{ -public: - static void setLastID(uint id) - { - if (id > suLastID) - suLastID = id; - }; - - // Default constructor - DLFLFaceVertex(bool bf = false); - // 2 arg-constructor - copy the pointers - DLFLFaceVertex(DLFLVertexPtr vptr, DLFLEdgePtr eptr, bool bf = false); - // Copy constructor - DLFLFaceVertex(const DLFLFaceVertex& dfv); - // Destructor - ~DLFLFaceVertex(); - - // Assignment operator - DLFLFaceVertex& operator=(const DLFLFaceVertex& dfv); - bool operator==(const DLFLFaceVertex &other) const; - - DLFLFaceVertexPtr copy() const; - - // Dump contents of this object - void dump(ostream& o) const; - - // Average 2 facevertexes - // Average the coordinates, normals, color and texture coordinates - // Assumes that all 3 have valid vertex pointers - friend void average(const DLFLFaceVertex& dfv1, const DLFLFaceVertex& dfv2, DLFLFaceVertex& ave); - friend void average(DLFLFaceVertexPtr dfvp1, DLFLFaceVertexPtr dfvp2, DLFLFaceVertexPtr avep); - - // Query Functions - uint getIndex() const { return index; }; - uint getID() { assignID(); return uID; }; - DLFLFaceVertexType getType() const { return fvtType; }; - DLFLVertexType getVertexType() const { return vertex->getType(); }; - DLFLVertexPtr getVertexPtr() const { return vertex; }; - DLFLEdgePtr getEdgePtr() const { return epEPtr; }; - DLFLFaceVertexPtr getOppositeCorner() { return epEPtr->getOtherFaceVertexPtr(this); }; - DLFLFacePtr getFacePtr() const { if (fpFPtr) return fpFPtr; else return nullptr; }; - uint getVertexID() const { return vertex->getID(); }; - uint getFaceID() const; - uint getEdgeID() const { return epEPtr->getID(); }; - Vector3d getNormal() const { return normal; }; - Vector3d getVertexCoords() const { return vertex->coords; }; - Vector2d getTexCoords() const { return texcoord; }; - Vector3d getAuxCoords() const { return auxcoords; }; - Vector3d getAuxNormal() const { return auxnormal; }; - void getDS2Coords(Vector3d& dsc0, Vector3d& dsc1, Vector3d& dsc2, Vector3d& dsc3) const - { - dsc0 = ds2coords[0]; dsc1 = ds2coords[1]; dsc2 = ds2coords[2]; dsc3 = ds2coords[3]; - }; - Vector3d getDS2Coord(uint index) const - { - // Assumes index is within range (0 to 3) - return ds2coords[index]; - }; - - //--- Mutative Functions ---// - - void setType(DLFLFaceVertexType type) { fvtType = type; }; - void resetType() { fvtType = FVTNormal; }; - - // Reset to original state - void reset() - { - vertex = nullptr; normal.reset(); //color = 1.0; texcoord.reset(); - epEPtr = nullptr; fpFPtr = nullptr; - fvpNext = this; fvpPrev = this; - fvtType = FVTNormal; - }; - - void setVertexPtr(DLFLVertexPtr vptr) { vertex = vptr; }; - void setEdgePtr(DLFLEdgePtr eptr) { epEPtr = eptr; }; - void setFacePtr(DLFLFacePtr fptr) { fpFPtr = fptr; }; - void setNormal(const Vector3d& n) { normal = normalized(n); }; - - /* Check if this corner is a concave corner or not - * Will not work properly for non-planar faces. - * Will not work properly for faces which have edges which belong entirely to that face. - * Will not work properly for highly skewed geometry */ - bool isConcaveCorner() const; - - /* Check if this corner is a winged corner or not - * A winged corner is a degenerate corner - * i.e. the angle at the corner is 180 degrees */ - bool isWingedCorner() const; - - /* Find the next non-winged corner starting from this corner - * If none can be found, returns nullptr */ - DLFLFaceVertexPtr nextNonWingedCorner() const; - - /* Find the CLOSEST non-winged corner starting from this corner - * If none can be found, returns nullptr - * Search both forward and backward till we find one. */ - DLFLFaceVertexPtr closestNonWingedCorner() const; - - // Get a vector along the edge starting at this corner - Vector3d getEdgeVector() const; - - /* Get 2 vectors along the 2 edges which form this corner - * Both vectors will originate at this corner */ - void getEdgeVectors(Vector3d& pvec, Vector3d& nvec); - - /* Compute the normal using adjacent vertices in this face - * Normal will be adjusted to account for concave corners */ - void updateNormal(); - - Vector3d computeNormal() - { - updateNormal(); - return normal; - }; - - void setVertexCoords(const Vector3d& vec) - { - if (vertex) vertex->coords = vec; - }; - void setVertexCoords(double x, double y, double z) - { - if (vertex) vertex->coords.set(x, y, z); - }; - - void setTexCoords(const Vector2d& tc) { texcoord = tc; }; - void setAuxCoords(const Vector3d& p) { auxcoords = p; }; - void setAuxNormal(const Vector3d& n) { auxnormal = n; }; - - void setDS2Coords(const Vector3d& dsc0, const Vector3d& dsc1, const Vector3d& dsc2, const Vector3d& dsc3) - { - ds2coords[0] = dsc0; ds2coords[1] = dsc1; ds2coords[2] = dsc2; ds2coords[3] = dsc3; - }; - - void setDS2Coord0(const Vector3d& dsc0) { ds2coords[0] = dsc0; }; - void setDS2Coord1(const Vector3d& dsc1) { ds2coords[1] = dsc1; }; - void setDS2Coord2(const Vector3d& dsc2) { ds2coords[2] = dsc2; }; - void setDS2Coord3(const Vector3d& dsc3) { ds2coords[3] = dsc3; }; - - // Update the DLFLFaceVertexList of the DLFLVertex referred to by this DLFLFaceVertex - void addSelfToVertex(); - void deleteSelfFromVertex(); - - // Update the DLFLFaceVertexPtr of the DLFLEdge starting at this DLFLFaceVertex - void addSelfToEdge(); - void deleteSelfFromEdge(); - - // Remove the DLFLFaceVertexPtr from the DLFLFace to which it belongs - void deleteSelfFromFace(); - - // List related functions - - void setNext(DLFLFaceVertexPtr fvptr) { fvpNext = fvptr; }; - void setPrev(DLFLFaceVertexPtr fvptr) { fvpPrev = fvptr; }; - - DLFLFaceVertexPtr next() const { return fvpNext; }; - DLFLFaceVertexPtr& next() { return fvpNext; }; - - DLFLFaceVertexPtr prev() const { return fvpPrev; }; - DLFLFaceVertexPtr& prev() { return fvpPrev; }; - - /* Next/prev facevertex around the vertex pointed to by this facevertex - * Use the EdgePtr to do a 1-step vertex-trace - * Returns this facevertex if EdgePtr is nullptr */ - DLFLFaceVertexPtr vnext(); - DLFLFaceVertexPtr vprev(); - - /* Make given DLFLFaceVertexPtr point to the next DLFLFaceVertexPtr - * Used in list traversal */ - friend void advance(DLFLFaceVertexPtr& fvp); - /* - friend void advance(DLFLFaceVertexPtr& fvp) { - fvp = fvp->fvpNext; - }; - */ - /* Make given DLFLFaceVertexPtr point to the previous DLFLFaceVertexPtr - * Used in list traversal */ - friend void backward(DLFLFaceVertexPtr& fvp); - /* - friend void backward(DLFLFaceVertexPtr& fvp) { - fvp = fvp->fvpPrev; - }; - */ - - void print(bool printadjacent = false) const; - - void printPointers() const - { - cout << "DLFLFaceVertex : " << vertex << ", " << epEPtr << ", " << fpFPtr << ";" - << "< " << fvpPrev << ", " << fvpNext << " >" << endl; - }; - - // Write this face vertex in DLFL format and set it's index value - void writeDLFL(ostream& o, uint newindex); - - /* Read normal, texcoord and color info for this face vertex from an input stream - * in DLFL format. Returns the vertex index */ - uint readDLFL(istream& i); - - /* - // "Render" this vertex. Simple calls the render() function for the vertex pointer - // This is used for selection - void render( ) const; - - // Do a glVertex on this vertex, using the normal and with color - friend void glVertexCN(const DLFLFaceVertex& dfv); - - // Do a glVertex on this vertex, using the normal and without color - friend void glVertexN(const DLFLFaceVertex& dfv); - - // Do a glVertex on this vertex, without using the normal and with color - friend void glVertexC(const DLFLFaceVertex& dfv); - - // Do a glVertex on this face vertex, without using the normal and without color - // This function is not named glVertex to allow using it in the - // STL for_each algorithm, since glVertex is overloaded for DLFLVertex also - friend void glVertexOFV(const DLFLFaceVertex& dfv); - - //-- Same as above functions but with texture coordinates also --// - - friend void glVertexCNT(const DLFLFaceVertex& dfv); - friend void glVertexNT(const DLFLFaceVertex& dfv); - friend void glVertexCT(const DLFLFaceVertex& dfv); - friend void glVertexOFVT(const DLFLFaceVertex& dfv); - - //-- Versions of above functions which take pointers are arguments --// - friend void glVertexCNp(DLFLFaceVertexPtr dfvp); - friend void glVertexNp(DLFLFaceVertexPtr dfvp); - friend void glVertexCp(DLFLFaceVertexPtr dfvp); - friend void glVertexOFVp(DLFLFaceVertexPtr dfvp); - - friend void glVertexCNTp(DLFLFaceVertexPtr dfvp); - friend void glVertexNTp(DLFLFaceVertexPtr dfvp); - friend void glVertexCTp(DLFLFaceVertexPtr dfvp); - friend void glVertexOFVTp(DLFLFaceVertexPtr dfvp);*/ - -protected: - void assignID() - { - uID = suLastID++; - }; - -private: - // This function by itself can leave the DLFL object in an invalid state - // It should be used with extreme care, ideally as part of a face reversal only. - // To prevent unintended misuse, this is made private and classes which need - // access to this function are made friends - - void reverse() - { - // Swap the previous and next pointers - DLFLFaceVertexPtr temp = fvpNext; - fvpNext = fvpPrev; fvpPrev = temp; - }; - -public: - DLFLVertexPtr vertex; // Associated vertex pointer - Vector3d normal; // Normal - RGBColor color; // Color - Vector2d texcoord; // Texture coordinate - - // Flag indicating this is part of a "back" face - // Used in reading OBJ files - // Default value is 'false' - bool backface; - -protected: - static uint suLastID; - - uint uID; // Id for face vertex - uint index; // Index for use in file output - DLFLEdgePtr epEPtr; // Pointer to the Edge - DLFLFacePtr fpFPtr; // Pointer to the Face - - // List node data - DLFLFaceVertexPtr fvpNext; // Pointer to next FaceVertex - DLFLFaceVertexPtr fvpPrev; // Pointer to previous FaceVertex - - DLFLFaceVertexType fvtType; // For use in subdivision surfaces - Vector3d auxcoords; // Coords for use during subdivs, extrude, etc. - Vector3d auxnormal; // Additional storage for normal - Vector3d ds2coords[4]; // Level-2 Doo Sabin coordinates - //TMPatchPtr tmpp; // Pointer to the TMPatch corresponding to this corner - - friend class DLFLFace; - -}; // end class DLFLFaceVertex - -bool coFacial(DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2); -bool coFacial(const DLFLFaceVertex& fv1, const DLFLFaceVertex& fv2); - -bool areEqual(DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2); -bool areEqual(const DLFLFaceVertex& fv1, const DLFLFaceVertex& fv2); - -void advance(DLFLFaceVertexPtr& fvp); -void backward(DLFLFaceVertexPtr& fvp); - -} // end namespace - -#endif /* _DLFL_FACE_VERTEX_HH_ */ - diff --git a/topmodx/include/dlflcore/DLFLFile.cc b/topmodx/include/dlflcore/DLFLFile.cc deleted file mode 100644 index 85ed67d..0000000 --- a/topmodx/include/dlflcore/DLFLFile.cc +++ /dev/null @@ -1,863 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "DLFLObject.h" -#include -#include - -namespace DLFL -{ - -typedef vector Vector3dArray; -typedef vector Vector2dArray; - -// Temporary array to store the vertices and face vertices -static DLFLVertexPtrArray vertex_array; -static DLFLFaceVertexPtrArray face_vertex_array; -static Vector3dArray normals; -static Vector2dArray texcoords; - -static char *dname; - -void DLFLObject::readObject(istream& i, istream &imtl) -{ - // std::cout << "reading obj file \n"; - if (!i) - { - cerr << "Incomplete OBJ file." << endl; - return; - } - - // Clear the object first - reset(); - - DLFLVertexPtr newvptr; - DLFLFaceVertexPtr newfvptr; - DLFLFacePtr newfptr; - DLFLMaterialPtr cur_mtl = matl_list.front(); - DLFLEdge * edges = nullptr; - RGBColor color; - bool matl_added = false; - char matl_name[10]; - Vector3d xyz; - Vector2d uv; - char c, c2; - int num_edges = 0; - - // char *tmp = new char[512]; - // strcpy( tmp, filename ); - // dname = dirname( tmp ); - // Get file size - // fseek( fp, 0, SEEK_END ); - // long lSize = ftell( fp ); - // rewind( fp ); - // allocate memory - // char *buffer = new char[lSize]; - // if( buffer == nullptr ) return false; - // load the file into the buffer - // fread( buffer, 1, lSize, fp ); - - // long i = 0; - // int currentMaterial = -1; - - // Read each line and set the Vertex, Normal, Face, Color or Texture - while (i) - { - removeWhiteSpace(i); i.get(c); i.get(c2); - if (c == 'm' && c2 == 't') - { - char mtlfilename[256], mtlfilepath[512]; - i.get(c); i.get(c2); i.get(c); i.get(c2); i.get(c2); - i >> mtlfilename; - // std::cout << mtlfilename << "\n"; - // sprintf( mtlfilepath, "%s/%s", mDirname, mtlfilename ); - // std::cout << mtlfilepath << "\n"; - // ifstream file; - // file.open(mtlfilepath); - readMTL(imtl); - } - else if (c == 'u' && c2 == 's') - { - i.get(c); i.get(c); i.get(c); i.get(c); i.get(c); - char *mtlname = new char[256]; - i >> mtlname; - cur_mtl = findMaterial(mtlname); - // std::cout << mtlname << "\t" << cur_mtl->name << "\n"; - } - else if (c == 'c' && c2 == ' ') - { - // Read a color specification - i >> color; cur_mtl = findMaterial(color); - if (cur_mtl == nullptr) - { // No matching material found - if (matl_added == false) - { - // No new materials have been added. - // Set default material to be this color - setColor(color); matl_added = true; - cur_mtl = matl_list.front(); - } - else - { - // Atleast 1 new material was added, but none of the - // existing materials match this color. So create a new - // material with this color and add it to the list - sprintf(matl_name, "material%d", matl_list.size()); - matl_list.push_back(new DLFLMaterial(matl_name, color)); - cur_mtl = matl_list.back(); - } - } - } - else if (c == 'v') - { - if (c2 == ' ') - { - // Read a vertex specification - i >> xyz; - // Create a new DLFLVertex - newvptr = new DLFLVertex(xyz); - // Add the pointer to the VertexPtr list. The list will free the memory - addVertexPtr(newvptr); - // Add the pointer to the local vertex_array - // for easy access when creating the faces - vertex_array.push_back(newvptr); - } - else if (c2 == 'n') - { - // Read a normal specification - i >> xyz; - normals.push_back(xyz); - } - else if (c2 == 't') - { - // Read a texture coordinate - i >> uv; - texcoords.push_back(uv); - } - } - else if (c == 'f' && c2 == ' ') - { - // Create a new DLFLFace - newfptr = new DLFLFace; - // Read a face specification - c = i.peek(); - while (c != '\n') - { - int v, vt, vn; - i >> v; vt = -1; vn = -1; c = i.peek(); - if (c == '/') - { - i.get(c); c = i.peek(); - if (c != '/') i >> vt; c = i.peek(); - - if (c == '/') i.get(c); i >> vn; c = i.peek(); - } - // We have v,vt and vn now - // Create a new DLFLFaceVertex - newfvptr = new DLFLFaceVertex; - // Set the Vertex ptr field for the new face vertex - newfvptr->vertex = vertex_array[v - 1]; - if (vt > 0) newfvptr->texcoord = texcoords[vt - 1]; - if (vn > 0) newfvptr->normal = normals[vn - 1]; - // Add this new DLFLFaceVertexPtr to the new DLFLFace - newfptr->addVertexPtr(newfvptr); - } - // Set material for new face to be current material and - // add pointer to new face to current material - // std::cout << "cur_mtl->color = " << cur_mtl->color << "\n"; - newfptr->setMaterial(cur_mtl); - - // Add new face to the face list - addFacePtr(newfptr); - // Get the edges from the new face - num_edges = newfptr->getEdges(&edges); - // Add the edges from the new face - addEdges(edges, num_edges); - // Delete the Edge array allocated by getEdges, since addEdges makes a copy - delete[] edges; edges = nullptr; - } - if (c2 != '\n') readTillEOL(i); - } - - // Clear the temporary vertex array - vertex_array.clear(); - // Make all Vertexes, Edges and Faces unique - makeUnique(); - // update all the EdgePtr fields for the Faces through the Edges - updateEdgeList(); - // update all the FacePtr fields for the FaceVertexes through the Faces - updateFaceList(); - - // std::cout << "done reading obj\n;"; -} - -void DLFLObject::writeObject(ostream& o, ostream &omtl, bool with_normals, bool with_tex_coords) const -{ - //write mtl file - if (!omtl.fail()) - writeMTL(omtl); - - // Write out the DLFL object as an OBJ file into the given output stream - o << "mtllib " << mFilename << ".mtl\n"; - - // First make the Position ID's unique for the VertexList so Vertex IDs will - // be contiguous and monotonically increasing - // Don't Do this, that way the IDs stay the same - for_each(vertex_list.begin(), vertex_list.end(), makeVertexUnique); - - // Get the Position ID for the first Vertex in the list - // -1 is because OBJ file indices start at 1 and not 0 - uint min_id = vertex_list.front()->getID() - 1; - - // Output the Vertex list - DLFLVertexPtrList::const_iterator vf = vertex_list.begin(), vl = vertex_list.end(); - while (vf != vl) - { - o << *(*vf); - ++vf; - } - - o << "# " << vertex_list.size() << " vertices" << endl << endl; - - DLFLFacePtrList::const_iterator ff, fl = face_list.end(); - - if (with_normals) - { - ff = face_list.begin(); - // Output the normals for each FaceVertex in each Face - while (ff != fl) - { - (*ff)->objWriteNormals(o); - ++ff; - } - } - if (with_tex_coords) - { - ff = face_list.begin(); - // Output the texture coordinates for each FaceVertex in each Face - while (ff != fl) - { - (*ff)->objWriteTexCoords(o); - ++ff; - } - } - ff = face_list.begin(); - DLFLMaterialPtr mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - - if (with_normals) - { - uint normal_id_start = 1; - if (with_tex_coords) - { - // Output the Face list with normals and texture coords - uint tex_id_start = 1; - while (ff != fl) - { - if (mptr != (*ff)->material()) - { - mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - } - (*ff)->objWriteWithNormalsAndTexCoords(o, min_id, normal_id_start, tex_id_start); - ++ff; - } - } - else - { - // Output the Face list with normals only - while (ff != fl) - { - if (mptr != (*ff)->material()) - { - mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - } - - (*ff)->objWriteWithNormals(o, min_id, normal_id_start); - ++ff; - } - } - } - else if (with_tex_coords) - { - // Output the face list with texture coords but without normals - uint tex_id_start = 1; - while (ff != fl) - { - if (mptr != (*ff)->material()) - { - mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - } - - (*ff)->objWriteWithTexCoords(o, min_id, tex_id_start); - ++ff; - } - } - else - { - // Output the Face list without normals or texture coordinates - while (ff != fl) - { - if (mptr != (*ff)->material()) - { - mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - } - (*ff)->objWrite(o, min_id); - ++ff; - } - } - - o << "# " << face_list.size() << " faces" << endl << endl; -}//end write object function - -void DLFLObject::readDLFL(istream& i, istream &imtl, bool clearold) -{ - // Read the object from an input stream in DLFL format - // std:: cout << "about to read dlfl" << i << endl; - if (!i) - { - cerr << "Incomplete DLFL file." << endl; - return; - } - - // Clear the object first if flag is set - // Otherwise new vertices,faces and edges will be appended to the existing lists - if (clearold) reset(); - - DLFLVertexPtr newvptr; - DLFLFaceVertexPtr newfvptr, fvptr; - DLFLEdgePtr neweptr; - DLFLFacePtr newfptr; - DLFLMaterialPtr cur_mtl = matl_list.front(); - Vector3d xyz; - char c, c2; - uint vindex, fvindex, fvindex1, fvindex2; - - // First line of the file should be "DLFL" - const char dlfl[] = "DLFL"; - char compare[4]; - i.read(compare, 4); - if (strncmp(dlfl, compare, 4) != 0) - { - cerr << "File not in DLFL format" << endl; - return; - } - readTillEOL(i); c = ' '; - - //read the material - while (i && c != '#') - { - i.get(c); i.get(c2); - if (c == 'm' && c2 == 't') - { - readTillEOL(i); - // char *mtlfilename = new char[256];//, mtlfilepath[512]; - // i.get(c); i.get(c2); i.get(c); i.get(c2); i.get(c2); - // i >> mtlfilename; - // std::cout << mtlfilename << "\n"; - // sprintf( mtlfilepath, "%s/%s", mDirname, mtlfilename ); - // std::cout << mtlfilepath << "\n"; - // ifstream file; - // file.open(mtlfilepath); - readMTL(imtl); - // file.close() - } - } - - if (!i) - { - cerr << "Incomplete DLFL file. Failed after mtl read." << endl; - reset(); - return; - } - - if (c2 != '\n') readTillEOL(i); - c = ' '; - - // Read the vertices first. Stop when we get to a '#' sign at the beginning of a line - while (i && c != '#') - { - i.get(c); i.get(c2); - if (c == 'v' && c2 == ' ') - { - // Read a vertex specification - // std::cout << "reading a vertex\n"; - - i >> xyz; readTillEOL(i); - - // Create a new DLFLVertex - newvptr = new DLFLVertex(xyz); - - // Add the pointer to the VertexPtr list. The list will free the memory - addVertexPtr(newvptr); - - // Add the pointer to the local vertex_array - // for easy access when creating the face vertices - vertex_array.push_back(newvptr); - } - } - - if (!i) - { - cerr << "Incomplete DLFL file. Failed after vertices." << endl; - reset(); - return; - } - - // Read the face vertices next. Stop when we get to a '#' sign at the beginning of a line - if (c2 != '\n') readTillEOL(i); - c = ' '; - while (i && c != '#') - { - i.get(c); i.get(c2); - if (c == 'f' && c2 == 'v') - { - // std::cout << "reading a face vertex\n"; - - // Read a face vertex specification - newfvptr = new DLFLFaceVertex; - - vindex = newfvptr->readDLFL(i); readTillEOL(i); - newfvptr->vertex = vertex_array[vindex]; - - // Add the pointer to the local face_vertex_array - // for eash access when creating the faces and edges - face_vertex_array.push_back(newfvptr); - } - } - - if (!i) - { - cerr << "Incomplete DLFL file. failed after Face-vertices" << endl; - reset(); - return; - } - - // Read the edges next. Stop when we get to a '#' sign at the beginning of a line - if (c2 != '\n') readTillEOL(i); - - c = ' '; - while (i && c != '#') - { - i.get(c); i.get(c2); - if (c == 'e' && c2 == ' ') - { - // Read a edge specification - // std::cout << "reading an edge\n"; - neweptr = new DLFLEdge; - i >> fvindex1 >> fvindex2; readTillEOL(i); - // Set the ends of the edge using the face vertex array - neweptr->setFaceVertexPointers(face_vertex_array[fvindex1], face_vertex_array[fvindex2], false); - // Update the EdgePtr fields of the face vertices - neweptr->updateFaceVertices(); - // Add the edge to the edge list - addEdgePtr(neweptr); - } - } - - if (!i) - { - cerr << "Incomplete DLFL file. Failed after edges." << endl; - reset(); - return; - } - - // Read the faces next. Stop when we get to a '#' sign at the beginning of a line - if (c2 != '\n') readTillEOL(i); - c = ' '; - while (i && c != '#') - { - i.get(c); i.get(c2); - if (c == 'u' && c2 == 's') - { - i.get(c); i.get(c); i.get(c); i.get(c); i.get(c); - char *mtlname = new char[256]; - i >> mtlname; - cur_mtl = findMaterial(mtlname); - // std::cout << mtlname << "\t" << cur_mtl->name << "\n"; - readTillEOL(i); - } - else if (c == 'f' && c2 == ' ') - { - - // std::cout << "reading a face\n"; - // Read a face specification - newfptr = new DLFLFace; - - // Read a face specification. Get the face vertex index and find - // the face vertex pointer from the array and add it to the face - c = i.peek(); - while (c != '\n') - { - i >> fvindex; - fvptr = face_vertex_array[fvindex]; - newfptr->addVertexPtr(fvptr); - c = i.peek(); - } - readTillEOL(i); - - // Set material for new face to be current material and - // add pointer to new face to current material - newfptr->setMaterial(cur_mtl); - - // Update the FacePtr fields of the face vertices - // and add the face vertices to the face vertex list of vertices - newfptr->updateFacePointers(); - newfptr->addFaceVerticesToVertices(); - - // Add the face to the face list - addFacePtr(newfptr); - } - } - - // Clear the temporary vertex array and face vertex array - vertex_array.clear(); - face_vertex_array.clear(); - assignID(); - - // Make all Vertexes, Edges and Faces unique - makeUnique(); - - // printVertexList(); - // printFaceList(); - // // printFaceVertexList(); - // printEdgeList(); -} - -void DLFLObject::writeDLFL(ostream& o, ostream &omtl, bool reverse_faces) const -{ - //write the mtl file if it exists - if (!omtl.fail()) - { - // std::cout<<"mtl file did not fail.\n"; - writeMTL(omtl); - } - // Write the object in DLFL format into give output stream - // Write marker at beginning indicating DLFL format - o << "DLFL" << endl; - o << "mtllib " << mFilename << ".mtl" << endl; - o << '#' << endl; - - // std::cout << "writing dlfl\t" << mFilename << "\n"; - - // Write the vertex list next. Update the vertex index also - DLFLVertexPtrList::const_iterator vf = vertex_list.begin(), vl = vertex_list.end(); - uint vindex = 0; - while (vf != vl) - { - (*vf)->writeDLFL(o, vindex++); - ++vf; - } - o << '#' << endl; - - // Write the face vertices and update the face vertex index also - DLFLFacePtrList::const_iterator ff = face_list.begin(), fl = face_list.end(); - DLFLFacePtr fptr; - uint fvindex = 0; - while (ff != fl) - { - fptr = (*ff); - DLFLFaceVertexPtr head; - head = fptr->front(); - if (head) - { - DLFLFaceVertexPtr current = head; - current->writeDLFL(o, fvindex++); - current = current->next(); - while (current != head) - { - current->writeDLFL(o, fvindex++); - current = current->next(); - } - } - ++ff; - } - o << '#' << endl; - - // Write the edge list - DLFLEdgePtrList::const_iterator ef = edge_list.begin(), el = edge_list.end(); - if (reverse_faces) - { - while (ef != el) - { - (*ef)->writeDLFLReverse(o); - ++ef; - } - } - else - { - while (ef != el) - { - (*ef)->writeDLFL(o); - ++ef; - } - } - - o << '#' << endl; - DLFLMaterialPtr mptr = nullptr; - // TODO: Check why ff will be the end of face_list - if (ff != fl) - { - mptr = (*ff)->material(); - } - - // o << "usemtl " << mptr->name << "\n"; - // Write the face list - ff = face_list.begin(); fl = face_list.end(); - if (reverse_faces) - { - while (ff != fl) - { - if (mptr != (*ff)->material()) - { - mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - } - (*ff)->writeDLFLReverse(o); - ++ff; - } - } - else - { - while (ff != fl) - { - if (mptr != (*ff)->material()) - { - mptr = (*ff)->material(); - o << "usemtl " << mptr->name << "\n"; - } - (*ff)->writeDLFL(o); - ++ff; - } - } - o << '#' << endl; -} - -bool DLFLObject::readMTL(istream &i) -{ - char c, c2; - float r, g, b; - if (!i) - { - cerr << "Incomplete MTL file." << endl; - return false; - } - // RGBColor color; - DLFLMaterialPtr mptr; - char *mtlname = new char[255]; - - while (i) - { - removeWhiteSpace(i); i.get(c); i.get(c2); - if (c == 'n' && c2 == 'e') - { - i.get(c); i.get(c2); i.get(c); i.get(c2); i.get(c2); - i >> mtlname; - } - else if (c == 'K' && c2 == 'd') - { - i.get(c); - i >> r >> g >> b; - DLFLMaterialPtr mptr = new DLFLMaterial(mtlname, r, g, b); - matl_list.push_back(mptr); - } - if (c2 != '\n') readTillEOL(i); - } - return true; -} - -bool DLFLObject::writeMTL(ostream& o) const -{ - - // newmtl blinn1SG - // illum 4 - // Kd 0.06 0.50 0.03 - // Ka 0.00 0.00 0.00 - // Tf 1.00 1.00 1.00 - // Ni 1.00 - // Ks 0.50 0.50 0.50 - // newmtl initialShadingGroup - // illum 4 - // Kd 0.50 0.50 0.50 - // Ka 0.00 0.00 0.00 - // Tf 1.00 1.00 1.00 - // Ni 1.00 - if (o) - { - //test by dave... - //store the material color in the diffuse channel - DLFLMaterialPtrList::const_iterator mf = matl_list.begin(), ml = matl_list.end(); - while (mf != ml) - { - o << "newmtl " << (*mf)->name << "\n" - << "illum 4\n" - << "Kd " << (*mf)->color.r << " " << (*mf)->color.g << " " << (*mf)->color.b << "\n" - << "Ka 0.00 0.00 0.00\n" - << "Tf 1.00 1.00 1.00\n" - << "Ni 1.00\n" - << "Ks 0.00 0.00 0.00\n"; - ++mf; - } - } - else - { - // std::cout << "not valid mtl filestream\n"; - return false; - } - return true; - -} - -void DLFLObject::writeLG3d(ostream& o, bool selected) const -{ - - Vector3dArray coords; int i = 0, j = 0; - if (selected) - { - vector::const_iterator ff = this->sel_fptr_array.begin(), - fl = this->sel_fptr_array.end(); - // Write the object in LG3d (*.m) format for use with the LiveGraphics3D live.jar java archive from Mathworld.com - o << "Graphics3D[{"; - - while (ff != fl) - { - //format: Polygon[{ {x,y,z}, {x,y,z}, {x,y,z}, {x,y,z} }], - o << "Polygon[{"; - (*ff)->getVertexCoords(coords); - for (i = 0; i < coords.size(); i++) - { - o << "{" << coords[i][0] << "," << coords[i][1] << "," << coords[i][2] << "}"; - if (i != coords.size() - 1) - { - o << ","; - } - } - o << "}]"; - if (j < num_faces() - 1) - { - o << ","; - } - ++ff; j++; - } - //close out the file and make sure it doesn't have a "box" around it - o << "}, { Boxed -> False }]"; - - } - else - { - DLFLFacePtrList::const_iterator ff, fl; - ff = face_list.begin(); - fl = face_list.end(); - // Write the object in LG3d (*.m) format for use with the LiveGraphics3D live.jar java archive from Mathworld.com - o << "Graphics3D[{"; - - while (ff != fl) - { - //format: Polygon[{ {x,y,z}, {x,y,z}, {x,y,z}, {x,y,z} }], - o << "Polygon[{"; - (*ff)->getVertexCoords(coords); - for (i = 0; i < coords.size(); i++) - { - o << "{" << coords[i][0] << "," << coords[i][1] << "," << coords[i][2] << "}"; - if (i != coords.size() - 1) - { - o << ","; - } - } - o << "}]"; - if (j < num_faces() - 1) - { - o << ","; - } - ++ff; j++; - } - //close out the file and make sure it doesn't have a "box" around it - o << "}, { Boxed -> False }]"; - } -} - -void DLFLObject::writeSTL(ostream& o) const -{ - // if(binary) - // { - // // Write Header - // char *header="VCG "; - // if(objectname) strncpy(header,objectname,80); - // fwrite(header,80,1,fp); - // // write number of facets - // fwrite(&m.fn,1,sizeof(int),fp); - // Point3f p; - // unsigned short attributes=0; - // - // FaceIterator fi; - // for(fi=m.face.begin(); fi!=m.face.end(); ++fi) if( !(*fi).IsD() ) - // { - // // For each triangle write the normal, the three coords and a short set to zero - // p.Import(vcg::NormalizedNormal(*fi)); - // fwrite(p.V(),3,sizeof(float),fp); - // - // for(int k=0;k<3;++k){ - // p.Import((*fi).V(k)->P()); - // fwrite(p.V(),3,sizeof(float),fp); - // } - // fwrite(&attributes,1,sizeof(short),fp); - // } - // } - // else - // { - DLFLFacePtrList::const_iterator ff = face_list.begin(); - DLFLFacePtrList::const_iterator fl = face_list.end(); - Vector3dArray coords; int i = 0; - - o << "solid ascii\n"; - while (ff != fl) - { - o << " facet normal " << (*ff)->getNormal(true)[0] << " " << (*ff)->getNormal()[1] << " " << (*ff)->getNormal()[2] << "\n"; - o << " outer loop\n"; - (*ff)->getVertexCoords(coords); - for (i = 0; i < coords.size(); i++) - { - o << " vertex " << coords[i][0] << " " << coords[i][1] << " " << coords[i][2] << "\n"; - } - o << " endloop\n"; - o << " endfacet\n"; - ++ff; - } - o << "endsolid ascii"; - // } -} - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLFileAlt.cc b/topmodx/include/dlflcore/DLFLFileAlt.cc deleted file mode 100644 index bf2706f..0000000 --- a/topmodx/include/dlflcore/DLFLFileAlt.cc +++ /dev/null @@ -1,558 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "DLFLObject.h" -#include - -namespace DLFL -{ - -struct Corner -{ - // Structure that defines a corner in terms of the vertex indices -public: - int index; // Index of vertex - int prev, next; // Indices of previous and next vertices - - Corner(int i, int p, int n) - : index(i), prev(p), next(n) - { - } - - Corner(int i = -1) - : index(i), prev(-1), next(-1) - { - } - - Corner(const Corner& c) - : index(c.index), prev(c.prev), next(c.next) - { - } - - Corner& operator = (const Corner& c) - { - index = c.index; prev = c.prev; next = c.next; - return (*this); - } -}; - -struct Edge -{ - // Structure which defines an edge in terms of corners - Corner start, end; // Start and end corners of the edge - - Edge() - : start(), end() - { - } - - Edge(Corner s, Corner e) - : start(s), end(e) - { - } - - Edge(const Edge& e) - : start(e.start), end(e.end) - { - } - - Edge& operator = (const Edge& e) - { - start = e.start; end = e.end; - return (*this); - } -}; - -typedef vector CornerArray; -typedef list CornerList; -typedef vector EdgeArray; -typedef list EdgeList; - -struct Face -{ - // Structure to hold Corners in a face. Contains an array of Corners -public: - CornerArray corners; - - Face() - : corners() - { - } - - ~Face() - { - corners.clear(); - } -}; - -typedef vector FaceArray; - -// Array of faces as read from the OBJ file -// When faces are read these arrays will be created -// And then used to create the object using repeated -// edge insertions -static FaceArray faces; - -// Array containing vertices from each point-sphere -// created when vertices are read -static DLFLVertexPtrArray vertex_array; - -// Lists containing the edges not yet inserted -// because of ambiguities in finding correct corner -// These edges will be inserted at the end of the first loop -static EdgeList open_edges; - -static void updateCornersInFace(Face& face) -{ - // Update the prev and next fields for all Corners in the Face - // Assumes that the index fields have been correctly set for all Corners - int size, pindex, nindex; - size = face.corners.size(); - for (int i = 0; i < size; ++i) - { - pindex = i - 1; if (pindex == -1) pindex = size - 1; - nindex = i + 1; if (nindex == size) nindex = 0; - face.corners[i].prev = face.corners[pindex].index; - face.corners[i].next = face.corners[nindex].index; - } -} - -static void printFace(const Face& face) -{ - cout << "Face : "; - for (int i = 0; i < face.corners.size(); ++i) - cout << "<" - << face.corners[i].prev << "," - << face.corners[i].index << "," - << face.corners[i].next << ">" - << " "; - cout << endl; -} - -// Alternate versions of insertEdge subroutines which try to make sure original corners are always -// together and are in the "back" face -DLFLEdgePtr insertEdgeAltCoFacial( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - bool set_type) -{ - // Insert an edge between 2 corners in the same face. Doesn't check if both - // corners are in the same face or not - // Doesn't check to see if there is already an edge between the two corners - // Insertion of the Edge will split the Face into 2 faces - DLFLFacePtr fp = fvptr1->getFacePtr(); - DLFLMaterialPtr matl = fp->material(); - - DLFLFaceVertexPtr fvp, temp; - DLFLEdgePtr ep; - - // Only 1 new face is created. - DLFLFacePtr newfaceptr = new DLFLFace(matl); - - // Use same type as fp for the new face. Useful for doo-Sabin subdivision - newfaceptr->setType(fp->getType()); - - // Set type if caller requested it - if (set_type) - { - // Reset types of the 2 FaceVertexes - fvptr1->resetType(); fvptr2->resetType(); - fp->setType(FTNew); newfaceptr->setType(FTNew); - } - - // Create the new face. - - // Add a copy of fvptr2 to the new face - // Update edge which originally pointed to fvptr2 to point to new face vertex - temp = newfaceptr->addVertex(fvptr2); temp->addSelfToVertex(); - ep = fvptr2->getEdgePtr(); ep->resetFaceVertexPtr(fvptr2); ep->setNullFaceVertexPtr(temp); - - // Remove face-vertices from fvptr2 to fvptr1 - // from old face and add it to the new face - fvp = fvptr2->next(); - while (fvp != fvptr1) - { - // Remove fvp from old face and add it to the new face - temp = fvp->next(); - fp->deleteVertexPtr(fvp); newfaceptr->addVertexPtr(fvp); - fvp = temp; - } - - // Add copy of fvptr1 to new face - // This copy will also be one of the corners of the new Edge - DLFLFaceVertexPtr fvptr1_copy; - temp = newfaceptr->addVertex(fvptr1); temp->addSelfToVertex(); fvptr1_copy = temp; - - // Add new face to face list - obj->addFacePtr(newfaceptr); - - // Create the new Edge between fvptr1_copy and fvptr2 and do necessary updates - DLFLEdgePtr newedgeptr = new DLFLEdge; - newedgeptr->setFaceVertexPointers(fvptr1_copy, fvptr2); newedgeptr->updateFaceVertices(); - obj->addEdgePtr(newedgeptr); - if (set_type) newedgeptr->setType(ETNew); - - return newedgeptr; -} - -DLFLEdgePtr insertEdgeAltNonCoFacial( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - DLFLMaterialPtr matl = nullptr) -{ - // Insert an edge between 2 corners belonging to different faces - // Doesn't check if the corners belong to different faces - DLFLFacePtr fp1 = fvptr1->getFacePtr(); - DLFLFacePtr fp2 = fvptr2->getFacePtr(); - - DLFLFacePtr newfaceptr; // The new Face - DLFLFaceVertexPtr fvp, temp, fvptr1_copy; - int numverts1 = 0, numverts2 = 0; // No. of verts in each face - - numverts1 = fp1->size(); numverts2 = fp2->size(); - - // Reorder face 2 so that it ends at fvptr2 - fp2->reorder(fvptr2->next()); - - // Reorder face 1 so that it starts at fvptr1 - fp1->reorder(fvptr1); - - // fp2 will become the new face - newfaceptr = fp2; - - // If a material is specified use it, otherwise stick with material of the newface (fp2) - if (matl) newfaceptr->setMaterial(matl); - - // Go through all vertices in fp1 and add them to the new face and delete them from the old face - fvp = fp1->front(); - do - { - temp = fvp->next(); - fp1->deleteVertexPtr(fvp); newfaceptr->addVertexPtr(fvp); - fvp = temp; - } while (fp1->front()); - - // Check if fp1 is a point-sphere. If not add a copy of fvptr1 - fvptr1_copy = fvptr1; - if (numverts1 > 1) - { - // Add copy of fvptr1. This copy will be a starting corner of the new edge - temp = newfaceptr->addVertex(fvptr1); temp->addSelfToVertex(); - fvptr1_copy = temp; - } - - // Check if fp2 is a point-sphere. If not add a copy of fvptr2 - if (numverts2 > 1) - { - // Add copy of fvptr2. The edge which fvptr2 originally pointed to - // must be updated to point to the new face vertex - temp = newfaceptr->addVertex(fvptr2); temp->addSelfToVertex(); - DLFLEdgePtr ep = fvptr2->getEdgePtr(); - ep->resetFaceVertexPtr(fvptr2); ep->setNullFaceVertexPtr(temp); - } - - // Delete face 1 from the face list and free the pointer - DLFLFacePtrList face_list = obj->getFaceList(); - face_list.remove(fp1); - delete fp1; - - // Create the new Edge and do necessary updates - DLFLEdgePtr newedgeptr = new DLFLEdge; - newedgeptr->setFaceVertexPointers(fvptr1_copy, fvptr2); newedgeptr->updateFaceVertices(); - obj->addEdgePtr(newedgeptr); - - return newedgeptr; -} - -DLFLEdgePtr insertEdgeAlt( - DLFLObjectPtr obj, - DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2, - bool set_type = false, - DLFLMaterialPtr matl = nullptr) -{ - if (coFacial(fvptr1, fvptr2)) - { - if (fvptr1 != fvptr2) - return insertEdgeAltCoFacial(obj, fvptr1, fvptr2, set_type); - return nullptr; - } - return insertEdgeAltNonCoFacial(obj, fvptr1, fvptr2, matl); -} - -void DLFLObject::readObjectAlt(istream& i) -{ - if (!i) - { - cerr << "Incomplete OBJ file." << endl; - return; - } - - // Clear the object first - reset(); - - // Clear the static arrays - faces.clear(); vertex_array.clear(); - - DLFLMaterialPtr cur_mtl = matl_list.front(); - RGBColor color; - bool matl_added = false; - char matl_name[10]; - Vector3d xyz; - Vector2d uv; - char c, c2; - Corner corner; // Represents a corner of a face - Face face; // Represents a face in the object - - // Read each line and set the Vertex, Normal, Face, Color or Texture - while (i) - { - removeWhiteSpace(i); i.get(c); i.get(c2); - if (c == 'c' && c2 == ' ') - { - // Read a color specification - i >> color; cur_mtl = findMaterial(color); - if (cur_mtl == nullptr) - { // No matching material found - if (matl_added == false) - { - // No new materials have been added. - // Set default material to be this color - setColor(color); matl_added = true; - cur_mtl = matl_list.front(); - } - else - { - // Atleast 1 new material was added, but none of the - // existing materials match this color. So create a new - // material with this color and add it to the list - sprintf(matl_name, "material%d", matl_list.size()); - matl_list.push_back(new DLFLMaterial(matl_name, color)); - cur_mtl = matl_list.back(); - } - } - } - else if (c == 'v') - { - if (c2 == ' ') - { - // Read a vertex specification - i >> xyz; - - // Create a point sphere using this vertex and add the vertex to the vertex array. - // NOTE: Vertex is automatically created and added to vertex list - // A new face will also be created and added to face list - DLFLFaceVertexPtr bfvptr = createPointSphere(xyz, cur_mtl); - bfvptr->backface = true; // This is not used in the current method - vertex_array.push_back(bfvptr->vertex); - } - else if (c2 == 'n') - { - // Read a normal specification - // NORMALS ARE NOT USED IN THIS METHOD, BUT WE MUST STILL READ THE LINE - i >> xyz; - } - else if (c2 == 't') - { - // Read a texture coordinate - // TEXTURE COORDS ARE NOT USED IN THIS METHOD, BUT WE MUST STILL READ THE LINE - i >> uv; - } - } - else if (c == 'f' && c2 == ' ') - { - // Read a face specification - c = i.peek(); - if (c != '\n') - { - int v, vt, vn; - - // Read vertices in order and create a Corner for each vertex - // Add it to the Face. prev and next fields for each Corner will - // be updated after all corners in a face have been read - do - { - i >> v; vt = -1; vn = -1; c = i.peek(); - if (c == '/') - { - i.get(c); c = i.peek(); - if (c != '/') - { - i >> vt; c = i.peek(); - } - if (c == '/') - { - i.get(c); i >> vn; c = i.peek(); - } - } - - // We have v,vt and vn now - // Set the index for the vertex for current Corner - // prev and next fields will be updated later - corner.index = v - 1; - face.corners.push_back(corner); - } while (c != '\n'); - - // We now have a face with indices for the corners - // We have to update the prev and next fields for all corners in the face - updateCornersInFace(face); - - // Add the face to the array of faces - faces.push_back(face); - - // Clear the corners from the face - face.corners.clear(); - } - } - if (c2 != '\n') readTillEOL(i); - } - - // Go through the array of Faces and create the object using insertEdge operations - // to create each edge in the Face - // If an edge already exists between 2 vertices it wont be created - DLFLFaceVertexPtr sfvp, efvp; // Edge start and end corners - DLFLVertexPtr svp, evp; // Edge start and end vertices - DLFLVertexPtr svp_prev, svp_next, evp_prev, evp_next; // previous and next vertices for each corner - Corner scorner, ecorner; // Starting and ending corners - for (int j = 0; j < faces.size(); ++j) - { - face = faces[j]; - int size = face.corners.size(); - for (int k = 0; k < size; ++k) - { - scorner = face.corners[k]; ecorner = face.corners[(k + 1) % size]; - svp = vertex_array[scorner.index]; evp = vertex_array[ecorner.index]; - if (edgeExists(svp, evp) == false) - { - // Find the corners referring to svp and evp which have to be connected - // The previous and next vertex information for the current corner will - // be used to find the correct corners - svp_prev = vertex_array[scorner.prev]; svp_next = vertex_array[scorner.next]; - evp_prev = vertex_array[ecorner.prev]; evp_next = vertex_array[ecorner.next]; - - sfvp = svp->getFaceVertexWithPrev(svp_prev); - if (sfvp == nullptr) sfvp = svp->getFaceVertexWithNext(svp_next); - - efvp = evp->getFaceVertexWithPrev(evp_prev); - if (efvp == nullptr) efvp = evp->getFaceVertexWithNext(evp_next); - - // Check to make sure we have non nullptr FaceVertex pointers - if (sfvp != nullptr && efvp != nullptr) - { - // Insert an edge between sfvp and efvp - insertEdgeAlt(this, sfvp, efvp); - } - else - { - // cout << "Could not find correct corner for vertex. Postponing edge insertion (1)" << endl; - Edge edge(scorner, ecorner); - open_edges.push_back(edge); - } - } - } - } - - // Insert edges which were not inserted earlier - - EdgeList::iterator first, last; - Edge edge; - first = open_edges.begin(); last = open_edges.end(); - int depth = 2, num = 0; - int size = open_edges.size(); - int psize = size; - bool looping = false; - // Check for an infinite loop has to be included here since we add elements to the list - // within this loop - while (!open_edges.empty()) - { - edge = open_edges.front(); open_edges.pop_front(); - scorner = edge.start; ecorner = edge.end; - svp = vertex_array[scorner.index]; evp = vertex_array[ecorner.index]; - if (edgeExists(svp, evp) == false) - { - // Find the corners referring to svp and evp which have to be connected - // The previous and next vertex information for the current corner will - // be used to find the correct corners - svp_prev = vertex_array[scorner.prev]; svp_next = vertex_array[scorner.next]; - evp_prev = vertex_array[ecorner.prev]; evp_next = vertex_array[ecorner.next]; - - sfvp = svp->getFaceVertexWithPrev(svp_prev); - if (sfvp == nullptr) sfvp = svp->getFaceVertexWithNext(svp_next); - // If we are getting into an infinite loop try backfacing corner - if (sfvp == nullptr && looping) - { - // cout << "Couldn't find correct corner. Trying backfacing corner (" << depth << ")" << endl; - sfvp = svp->getBackFaceVertex(); - } - - efvp = evp->getFaceVertexWithPrev(evp_prev); - if (efvp == nullptr) efvp = evp->getFaceVertexWithNext(evp_next); - // If we are getting into an infinite loop try backfacing corner - if (efvp == nullptr && looping) - { - // cout << "Couldn't find correct corner. Trying backfacing corner (" << depth << ")" << endl; - efvp = evp->getBackFaceVertex(); - } - - // Check to make sure we have non nullptr FaceVertex pointers - if (sfvp != nullptr && efvp != nullptr) - { - // Insert an edge between sfvp and efvp - insertEdgeAlt(this, sfvp, efvp); - } - else - { - //cout << "Could not find correct corner for vertex. Postponing edge insertion (" - // << depth << ")" << endl; - open_edges.push_back(edge); - } - } - ++num; - if (num >= size) - { - //cout << psize << " " << size << endl; - depth++; size = open_edges.size(); - num = 0; - // If we are getting into an infinte loop, set looping flag - // so backfacing corners will be used next time - // NOTE: That will always break the deadlocks and thus prevent infinite loops - // We want to do that only as a last resort - if (size == psize) looping = true; - psize = size; - } - } - - // Make all Vertexes, Edges and Faces unique (IDs become sequential) - makeUnique(); -} - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLMaterial.h b/topmodx/include/dlflcore/DLFLMaterial.h deleted file mode 100644 index f0cb38d..0000000 --- a/topmodx/include/dlflcore/DLFLMaterial.h +++ /dev/null @@ -1,201 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFL_MATERIAL_HH_ -#define _DLFL_MATERIAL_HH_ - -// class for a material for use in the DLFLObject class -// Contains an array/list of faces which use this material - -#include "DLFLCommon.h" -#include "DLFLFace.h" -#include - -namespace DLFL -{ - -class DLFLMaterial -{ -public: - // Default, 1 and 2 arg constructors - DLFLMaterial(const char * n, const RGBColor& c = RGBColor(0)) - : name(nullptr), color(c), faces(), Ka(0.1), Kd(0.3), Ks(0.8) - { - if (n) - { - name = new char[strlen(n) + 1]; strcpy(name, n); - } - else - { - name = new char[8]; strcpy(name, "default"); - } - } - - DLFLMaterial(const char * n, double r, double g, double b) - : name(nullptr), color(r, g, b), faces(), Ka(0.1), Kd(0.3), Ks(0.8) - { - if (n) - { - name = new char[strlen(n) + 1]; strcpy(name, n); - } - else - { - name = new char[8]; strcpy(name, "default"); - } - } - - DLFLMaterial(const DLFLMaterial& mat) - : name(nullptr), color(mat.color), faces(mat.faces), Ka(mat.Ka), Kd(mat.Kd), Ks(mat.Ks) - { - name = new char[strlen(mat.name) + 1]; strcpy(name, mat.name); - } - - ~DLFLMaterial() - { - faces.clear(); - delete[] name; - } - - DLFLMaterial& operator = (const DLFLMaterial& mat) - { - delete[] name; name = nullptr; - name = new char[strlen(mat.name) + 1]; strcpy(name, mat.name); - color = mat.color; faces = mat.faces; Ka = mat.Ka; Kd = mat.Kd; Ks = mat.Ks; - return (*this); - } - - DLFLMaterialPtr copy(void) const - { - DLFLMaterialPtr mpcopy = new DLFLMaterial(*this); - return mpcopy; - } - - //--- Member functions ---// - - void setColor(const RGBColor& c) - { - color = c; - } - - void setColor(double r, double g, double b) - { - color.set(r, g, b); - } - - void setName(const char * n) - { - if (n) - { - delete[] name; name = nullptr; - name = new char[strlen(n)]; strcpy(name, n); - } - } - - void addFace(DLFLFacePtr faceptr) - { - faces.push_back(faceptr); - } - - void deleteFace(DLFLFacePtr faceptr) - { - if (faces.size() > 0) - faces.remove(faceptr); - } - - uint numFaces(void) const - { - return faces.size(); - } - - // Check if material color is same as given color - bool operator == (const RGBColor& c) const - { - return (color == c); - } - - // Same as above, but function form - bool equals(const RGBColor& c) const - { - return (color == c); - } - - // Check if material name is same as given string - bool operator == (const char * n) const - { - if (n && !strcasecmp(name, n)) return true; - return false; - } - - // Same as above but function form - bool equals(const char * n) const - { - if (n && !strcasecmp(name, n)) return true; - return false; - } - - // Compare 2 materials - check both name and color - bool operator == (const DLFLMaterial& mat) const - { - if ((color == mat.color) && - !strcasecmp(name, mat.name)) return true; - return false; - } - - // Same as above but function form - bool equals(const DLFLMaterial& mat) const - { - if ((color == mat.color) && - !strcasecmp(name, mat.name)) return true; - return false; - } - - /*friend ostream& operator << (ostream& o, const DLFLMaterial& mat) { - o << "Material : " << mat.name << ' ' << mat.color << ", " - << mat.faces.size() << " faces" << endl; - DLFLFacePtrList :: const_iterator first, last; - first = mat.faces.begin(); last = mat.faces.end(); - while ( first != last ) { - o << *(*first) << endl; - ++first; - } - return o; - };*/ - -public: - char *name; // Name of material - RGBColor color; // Material diffuse color - DLFLFacePtrList faces; // Pointers to faces using this material - double Ka; // Ambient coefficient - double Kd; // Diffuse coefficient - double Ks; // Specular coefficient - -}; - -} // end namespace - -#endif /* _DLFL_MATERIAL_HH_ */ diff --git a/topmodx/include/dlflcore/DLFLObject.cc b/topmodx/include/dlflcore/DLFLObject.cc deleted file mode 100644 index 82425a2..0000000 --- a/topmodx/include/dlflcore/DLFLObject.cc +++ /dev/null @@ -1,561 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLObject.cc - */ - -#include "DLFLObject.h" - -namespace DLFL -{ - -uint DLFLObject::suLastID = 0; -Transformation DLFLObject::tr; -DLFLVertexPtrArray DLFLObject::vparray; // For selection -DLFLEdgePtrArray DLFLObject::eparray; // For selection -DLFLFacePtrArray DLFLObject::fparray; // For selection -DLFLFaceVertexPtrArray DLFLObject::fvparray; - -void DLFLObject::dump(ostream& o) const -{ - o << "DLFLObject" << endl; - - int i = 0; - - o << "VertexList" << endl; - - DLFLVertexPtrList::const_iterator vfirst = vertex_list.begin(), vlast = vertex_list.end(); - - while (vfirst != vlast) - { - o << i << " : " << (*vfirst) << endl; - (*vfirst)->dump(o); - ++vfirst; ++i; - } - - i = 0; - o << "EdgeList" << endl; - DLFLEdgePtrList::const_iterator efirst = edge_list.begin(), elast = edge_list.end(); - while (efirst != elast) - { - o << i << " : " << (*efirst) << endl; - (*efirst)->dump(o); - ++efirst; ++i; - } - - i = 0; - o << "FaceList" << endl; - DLFLFacePtrList::const_iterator ffirst = face_list.begin(), flast = face_list.end(); - while (ffirst != flast) - { - o << i << " : " << (*ffirst) << endl; - (*ffirst)->dump(o); - ++ffirst; ++i; - } -} - -void DLFLObject::splice(DLFLObject& object) -{ - // Combine 2 objects. The lists are simply spliced together. - // Entities must be removed from the second object to prevent dangling pointers - // when it is destroyed. - vertex_list.splice(vertex_list.end(), object.vertex_list); - edge_list.splice(edge_list.end(), object.edge_list); - face_list.splice(face_list.end(), object.face_list); - matl_list.splice(matl_list.end(), object.matl_list); -} - -// Reverse the orientation of all faces in the object -// This also requires reversing all edges in the object -void DLFLObject::reverse(void) -{ - // Reverse the edges first, since they depend on the ordering of the - // original faces. - DLFLEdgePtrList::iterator efirst = edge_list.begin(), elast = edge_list.end(); - while (efirst != elast) - { - (*efirst)->reverse(); - ++efirst; - } - - DLFLFacePtrList::iterator ffirst = face_list.begin(), flast = face_list.end(); - while (ffirst != flast) - { - (*ffirst)->reverse(); - ++ffirst; - } -} - -bool DLFLObject::edgeExists(DLFLVertexPtr vptr1, DLFLVertexPtr vptr2) -{ - // Check if an edge exists between two given vertices - bool edgeexists = false; - - // Try to find an edge from vptr1 to vptr2 - if (vptr1->getEdgeTo(vptr2) != nullptr) edgeexists = true; - - return edgeexists; -} - -/** -* Tile Texturing, written by Avneet, Ergun -*/ - -void DLFLObject::assignTileTexEdgeFlags(int n) -{ - // Assign flags to edge corners based on tiling factor - // Flags are stored in the first component of the texture coordinate in each face vertex - int randomvariable1, randomvariable2; - DLFLEdgePtrList::const_iterator first = edge_list.begin(), last = edge_list.end(); - while (first != last) - { - DLFLFaceVertexPtr fvp1, fvp2; - (*first)->getFaceVertexPointers(fvp1, fvp2); - - randomvariable1 = rand() % (n / 2); - randomvariable2 = rand() % 2; - - fvp1->texcoord[0] = 2 * randomvariable1 + randomvariable2; - fvp2->texcoord[0] = 2 * randomvariable1 + ((randomvariable2 + 1) % 2); - - ++first; - } -} - -void DLFLObject::assignTileTexCoords(int n) -{ - // Compute the texture coordinates for each corner in each face - - // Assign edge flags first - assignTileTexEdgeFlags(n); - - // Compute texture coordinates using the edge flags - DLFLFaceVertexPtrArray corners; - int flag[10]; - double u, v; - - DLFLFacePtrList::const_iterator first = face_list.begin(), last = face_list.end(); - while (first != last) - { - (*first)->getCorners(corners); - - for (int i = 0; i < corners.size(); ++i) - { - flag[i] = int(corners[i]->texcoord[0]); - } - for (int i = 0; i < corners.size(); ++i) - { - u = (float)(n*flag[0] + flag[1] + (int)(((i + 1) % 4) / 2)) / (n*n); - - // Subtract from 1.0 since image origin is at top-left, instead of bottom-left - v = 1.0 - (float)(n*flag[2] + flag[3] + (int)(i / 2)) / (n*n); - - corners[i]->texcoord.set(u, v); - } - ++first; - } -} - -void DLFLObject::randomAssignTexCoords() -{ - // FOR QUADS ONLY - randomly assign texture coordinates from a unit square to the 4 corners - DLFLFacePtrList::iterator first, last; - first = face_list.begin(); last = face_list.end(); - while (first != last) - { - (*first)->randomAssignTexCoords(); - ++first; - } -} - -DLFLFacePtrArray DLFLObject::createFace(const Vector3dArray& verts, DLFLMaterialPtr matl, bool set_type) -{ - // Create 2 new faces with the given vertex coordinates. The 2 faces will have the same - // vertices and share the same edges, but will have opposite rotation orders. - // This essentially creates a 2 manifold with 2 faces with no volume. - int numverts = verts.size(); - DLFLFacePtr newface1 = nullptr; - DLFLFacePtr newface2 = nullptr; - DLFLVertexPtr vptr = nullptr; - DLFLVertexPtr tempvptr = nullptr; - DLFLFaceVertex fv; - DLFLFaceVertexPtr fvptr = nullptr; - - if (matl == nullptr) matl = firstMaterial(); - - newface1 = new DLFLFace; newface2 = new DLFLFace; - - if (set_type) - { - newface1->setType(FTNew); newface2->setType(FTNew); - } - - for (int i = 0; i < numverts; ++i) - { - vptr = new DLFLVertex(verts[i]); if (i == 0) tempvptr = vptr; - addVertexPtr(vptr); - fv.setVertexPtr(vptr); - newface1->addVertex(fv); newface2->addVertex(fv); - } - - // Reverse one of the new faces - newface2->reverse(); - - // These updates have to be done before the reorder - newface1->addFaceVerticesToVertices(); newface2->addFaceVerticesToVertices(); - - // Reorder the second new face so that the first vertex is the first vertex in the array - DLFLFaceVertexPtrList fvplist = tempvptr->getFaceVertexList(); - fvptr = fvplist.front(); - if (fvptr->getFacePtr() != newface2) fvptr = fvplist.back(); - newface2->reorder(fvptr); - - // Add the new faces to the list - addFacePtr(newface1); addFacePtr(newface2); - newface1->setMaterial(matl); newface2->setMaterial(matl); - - newface1->computeNormal(); newface2->computeNormal(); - - // Create the new edges - // Traverse the 2 faces in opposite orders - DLFLFaceVertexPtr head1, current1; - DLFLFaceVertexPtr head2, current2; - DLFLEdgePtr eptr; - - head1 = newface1->front(); head2 = newface2->back(); - - // Assume that head1 and head2 are not nullptr - current1 = head1; current2 = head2; - eptr = new DLFLEdge(current1, current2); - eptr->updateFaceVertices(); - addEdgePtr(eptr); - current1 = current1->next(); current2 = current2->prev(); - while (current1 != head1 && current2 != head2) - { - eptr = new DLFLEdge(current1, current2, false); - eptr->updateFaceVertices(); - addEdgePtr(eptr); - current1 = current1->next(); current2 = current2->prev(); - } - - DLFLFacePtrArray newverts; - newverts.push_back(newface1); - newverts.push_back(newface2); - - return newverts; -} - -DLFLFaceVertexPtr DLFLObject::createPointSphere(const Vector3d& v, DLFLMaterialPtr matl) -{ - // Create a point sphere - a face with only 1 vertex - DLFLFacePtr newface = new DLFLFace(); - - if (matl == nullptr) matl = firstMaterial(); - - DLFLVertexPtr vp = new DLFLVertex(v); - DLFLFaceVertexPtr fvp = new DLFLFaceVertex(vp, nullptr); - fvp->addSelfToVertex(); - newface->addVertexPtr(fvp); - newface->setMaterial(matl); - - addVertexPtr(vp); - addFacePtr(newface); - - return fvp; -} - -void DLFLObject::removePointSphere(DLFLFaceVertexPtr fvp) -{ - if (fvp->getEdgePtr() == nullptr) - { - DLFLVertexPtr vp = fvp->getVertexPtr(); - DLFLFacePtr fp = fvp->getFacePtr(); - - if (vp->numEdges() > 0) - return; - - removeVertex(vp); - delete vp; - removeFace(fp); - delete fp; - - delete fvp; - } -} - -void DLFLObject::boundingBox(Vector3d& min, Vector3d& max) const -{ - DLFLVertexPtrList::const_iterator vf, vl; - double minx, miny, minz; - double maxx, maxy, maxz; - double x, y, z; - DLFLVertexPtr vptr; - - vf = vertex_list.begin(); vl = vertex_list.end(); - vptr = (*vf); ++vf; - - vptr->coords.get(minx, miny, minz); - maxx = minx; maxy = miny; maxz = minz; - - while (vf != vl) - { - vptr = (*vf); ++vf; - vptr->coords.get(x, y, z); - - (x < minx) ? minx = x : ((x > maxx) ? maxx = x : 1); - (y < miny) ? miny = y : ((y > maxy) ? maxy = y : 1); - (z < minz) ? minz = z : ((z > maxz) ? maxz = z : 1); - } - min.set(minx, miny, minz); max.set(maxx, maxy, maxz); -} - -bool DLFLObject::boundaryWalkID(uint faceId) -{ - DLFLFacePtr fp = findFace(faceId); - if (fp) - { - fp->boundaryWalk(); - return true; - } - else { return false; } -} - -void DLFLObject::walk(uint faceId, - vector &verts, - vector &edges) -{ - DLFLFacePtr fp = findFace(faceId); - //vector verts; - if (fp) - { - verts = fp->vertexWalk(); - edges = fp->edgeWalk(); - } - //return verts; -} -/* -vector DLFLObject::vertWalk( uint faceId ) { -DLFLFacePtr fp = findFace( faceId ); -vector verts; -if( fp ) { -verts = fp->vertexWalk(); -} -return verts; -} - -vector DLFLObject::edgeWalk( uint faceId ) { -DLFLFacePtr fp = findFace( faceId ); -vector edges; -if( fp ) { -edges = fp->edgeWalk(); -} -return edges; -} -*/ -void DLFLObject::boundaryWalk(uint face_index) -{ - //Find the Face with the given face_index from the FaceList and do a boundary walk on it - uint i = 0; - DLFLFacePtrList::iterator first = face_list.begin(); - DLFLFacePtrList::iterator last = face_list.end(); - DLFLFacePtr faceptr = nullptr; - - if (face_index > face_list.size()) - return; - while (first != last) - { - if (i == face_index) - { - faceptr = (*first); - break; - } - ++first; - - ++i; - } - faceptr->boundaryWalk(); -} - -void DLFLObject::vertexTrace(uint vertex_index) -{ - //Find the Vertex with the given index in the VertexList and do a vertex trace on it - uint i = 0; - DLFLVertexPtrList::iterator first = vertex_list.begin(); - DLFLVertexPtrList::iterator last = vertex_list.end(); - DLFLVertexPtr vertexptr = nullptr; - - if (vertex_index > vertex_list.size()) - return; - while (first != last) - { - if (i == vertex_index) - { - vertexptr = (*first); - break; - } - ++first; - - ++i; - } - vertexptr->vertexTrace(); -} - -DLFLVertexPtr DLFLObject::findVertex(const uint vid) -{ - // Find a vertex with the given vertex id. Return nullptr if none exists - DLFLVertexPtrList::iterator first = vertex_list.begin(), last = vertex_list.end(); - DLFLVertexPtr sel = nullptr; - while (first != last) - { - if ((*first)->getID() == vid) - { - sel = (*first); break; - } - ++first; - } - return sel; -} - -DLFLEdgePtr DLFLObject::findEdge(const uint eid) -{ - // Find an edge with the given edge id. Return nullptr if none exists - //DLFLEdgePtrList::iterator first = edge_list.begin(), last = edge_list.end(); - DLFLEdgePtr sel = nullptr; - /*while ( first != last ) { - if( (*first)->getID() == eid ) { - sel = (*first); - break; - } - ++first; - }*/ - sel = edgeMap[eid]; - return sel; -} - -DLFLFacePtr DLFLObject::findFace(const uint fid) -{ - // Find a face with the given face id. Return nullptr if none exists - //DLFLFacePtrList::iterator first = face_list.begin(), last = face_list.end(); - DLFLFacePtr sel = nullptr; - /*while ( first != last ) { - if ( (*first)->getID() == fid ) { - sel = (*first); - break; - } - ++first; - }*/ - sel = faceMap[fid]; - return sel; -} - -DLFLFaceVertexPtr DLFLObject::findFaceVertex(const uint fvid) -{ - // Find a face vertex with the given face vertex id. Return nullptr if none exists - DLFLFacePtrList::iterator first = face_list.begin(), last = face_list.end(); - DLFLFaceVertexPtr sel = nullptr; - DLFLFaceVertexPtr tmp = nullptr; - while (first != last) - { - tmp = (*first)->findFaceVertexByID(fvid); - if (tmp != nullptr) - { - sel = tmp; - //break; - } - ++first; - } - return sel; -} - -void DLFLObject::addVertex(const DLFLVertex& vertex) -{ - addVertexPtr(vertex.copy()); -} - -void DLFLObject::addVertex(DLFLVertexPtr vertexptr) -{ - addVertexPtr(vertexptr->copy()); -} - -void DLFLObject::addEdge(const DLFLEdge& edge) -{ - addEdgePtr(edge.copy()); -} - -void DLFLObject::addEdge(DLFLEdgePtr edgeptr) -{ - addEdgePtr(edgeptr->copy()); -} - -void DLFLObject::addFace(const DLFLFace& face) -{ - addFacePtr(face.copy()); -} - -void DLFLObject::addFace(DLFLFacePtr faceptr) -{ - addFacePtr(faceptr->copy()); -} - -void DLFLObject::computeNormals() -{ - DLFLVertexPtrList::iterator first, last; - - first = vertex_list.begin(); last = vertex_list.end(); - while (first != last) - { - (*first)->updateNormal(); - ++first; - } - DLFLFacePtrList::iterator ffirst, flast; - - ffirst = face_list.begin(); flast = face_list.end(); - while (ffirst != flast) - { - (*ffirst)->updateNormal(); - ++ffirst; - } -} -/* -void DLFLObject::deleteVertex(uint vertex_index) { -// Find the VertexPtr for the given vertex_index from the VertexList and delete it -if ( vertex_index > vertex_list.size() ) return; - -DLFLVertexPtrList::iterator i = vertex_list.begin(); -advance(i,vertex_index); -deleteVertex(*i); -} -*/ - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLObject.h b/topmodx/include/dlflcore/DLFLObject.h deleted file mode 100644 index c93dcd0..0000000 --- a/topmodx/include/dlflcore/DLFLObject.h +++ /dev/null @@ -1,781 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLObject.hh - */ - -#ifndef _DLFL_OBJECT_HH_ -#define _DLFL_OBJECT_HH_ - -/** -* TRANSLATOR DLFL::DLFLObject -* -* Necessary for lupdate. -*/ - -/** -* \brief DLFLObject class - The Doubly Linked Face List object classs -* -* The Doubly Linked Face List object classs -* Contains a vertex list, edge list and a face list -* The lists actually store pointerss -* -*/ - -#include "DLFLCommon.h" -#include "DLFLVertex.h" -#include "DLFLFaceVertex.h" -#include "DLFLEdge.h" -#include "DLFLFace.h" -#include "DLFLMaterial.h" -#include - -namespace DLFL -{ - -class DLFLObject -{ -public: - /// Constructor - DLFLObject() - : uID(suLastID++), position() - , scale_factor(1), rotation() - , vertex_list(), edge_list(), face_list()/*, patch_list(), patchsize(4)*/ - { - // Add a default material - matl_list.push_back(new DLFLMaterial("default", 0.5, 0.5, 0.5)); - mFilename = nullptr; - mDirname = nullptr; - }; - - /// Destructor - ~DLFLObject() - { - clearLists(); - if (mFilename) { delete[] mFilename; mFilename = nullptr; } - if (mDirname) { delete[] mDirname; mDirname = nullptr; } - }; - - void clearSelected() - { - sel_vptr_array.clear(); - sel_eptr_array.clear(); - sel_fptr_array.clear(); - sel_fvptr_array.clear(); - }; - - inline void removeVertex(DLFLVertexPtr vp) { vertex_list.remove(vp); }; - inline void removeEdge(DLFLEdgePtr ep) { edgeMap.erase(ep->getID()); edge_list.remove(ep); }; - inline void removeFace(DLFLFacePtr fp) { faceMap.erase(fp->getID()); face_list.remove(fp); }; - - void computeNormals(); - - // Dump contents of this object - void dump(ostream& o) const; - - //--- Query Functions ---// - - // Compute the genus of the mesh using Euler formula - int genus() const - { - int v = num_vertices(); - int e = num_edges(); - int f = num_faces(); - int g = 1 - (v - e + f) / 2; - return g; - }; - - inline uint getID() const { return uID; }; - inline size_t num_vertices() const { return vertex_list.size(); }; - inline size_t num_edges() const { return edge_list.size(); }; - inline size_t num_faces() const { return face_list.size(); }; - inline size_t num_materials() const { return matl_list.size(); } - - // Probably should switch to just using these in the future - // then you could get rid of all these accessors below. - const DLFLVertexPtrList& getVertexList() const { return vertex_list; }; - const DLFLEdgePtrList& getEdgeList() const { return edge_list; }; - //const DLFLFacePtrList& getFaceList( ) const { return face_list; }; - DLFLFacePtrList& getFaceList() { return face_list; }; // needed not const for subdivideAllFaces - - //-- List based access to the 3 lists --// - DLFLVertexPtr firstVertex() { return vertex_list.front(); } - DLFLEdgePtr firstEdge() { return edge_list.front(); } - DLFLFacePtr firstFace() { return face_list.front(); } - DLFLMaterialPtr firstMaterial() { return matl_list.front(); } - - DLFLVertexPtr lastVertex() { return vertex_list.back(); }; - DLFLEdgePtr lastEdge() { return edge_list.back(); }; - DLFLFacePtr lastFace() { return face_list.back(); } - DLFLMaterialPtr lastMaterial() { return matl_list.back(); } - - DLFLVertexPtr findVertex(const uint vid); - DLFLEdgePtr findEdge(const uint eid); - DLFLFacePtr findFace(const uint fid); - DLFLFaceVertexPtr findFaceVertex(const uint fvid); - - DLFLVertexPtrList::iterator beginVertex() { return vertex_list.begin(); } - DLFLVertexPtrList::iterator endVertex() { return vertex_list.end(); } - - DLFLEdgePtrList::iterator beginEdge() { return edge_list.begin(); } - DLFLEdgePtrList::iterator endEdge() { return edge_list.end(); } - - DLFLFacePtrList::iterator beginFace() { return face_list.begin(); } - DLFLFacePtrList::iterator endFace() { return face_list.end(); } - - DLFLMaterialPtrList::iterator beginMaterial() { return matl_list.begin(); }; - DLFLMaterialPtrList::iterator endMaterial() { return matl_list.end(); }; - - DLFLFacePtrList::reverse_iterator rbeginFace() { return face_list.rbegin(); } - DLFLFacePtrList::reverse_iterator rendFace() { return face_list.rend(); } - - //--- Access the lists through arrays ---// - void getVertices(DLFLVertexPtrArray& vparray) - { - vparray.clear(); vparray.reserve(vertex_list.size()); - DLFLVertexPtrList::const_iterator first = vertex_list.begin(), last = vertex_list.end(); - while (first != last) - { - vparray.push_back(*first); - ++first; - } - }; - - void getEdges(DLFLEdgePtrArray& eparray) - { - eparray.clear(); eparray.reserve(edge_list.size()); - DLFLEdgePtrList::const_iterator first = edge_list.begin(), last = edge_list.end(); - while (first != last) - { - eparray.push_back(*first); - ++first; - } - }; - - void getFaces(DLFLFacePtrArray& fparray) - { - fparray.clear(); fparray.reserve(face_list.size()); - DLFLFacePtrList::const_iterator first = face_list.begin(), last = face_list.end(); - while (first != last) - { - fparray.push_back(*first); - ++first; - } - }; - - //--- Terminal printing functions : useful for debugging ---// - void print() const - { - // Print a summary of the DLFLObject - cout << "Number of vertices : " << vertex_list.size() << endl; - cout << "Number of faces : " << face_list.size() << endl; - cout << "Number of edges : " << edge_list.size() << endl; - cout << "Number of materials : " << matl_list.size() << endl; - cout << "Genus : " << genus() << endl; - }; - - void printVertexList() const - { - cout << "Vertex List" << endl; - DLFLVertexPtrList::const_iterator first = vertex_list.begin(), last = vertex_list.end(); - while (first != last) - { - (*first)->print(); - ++first; - } - }; - - void printEdgeList() const - { - cout << "Edge List" << endl; - DLFLEdgePtrList::const_iterator first = edge_list.begin(), last = edge_list.end(); - while (first != last) - { - (*first)->print(); - ++first; - } - }; - - void printFaceList() const - { - cout << "Face List" << endl; - - DLFLFacePtrList::const_iterator first = face_list.begin(), last = face_list.end(); - while (first != last) - { - cout << *(*first) << endl; - ++first; - } - }; - - void printFaces() const - { - cout << "Faces" << endl; - - DLFLFacePtrList::const_iterator first = face_list.begin(), last = face_list.end(); - while (first != last) - { - (*first)->print(); - ++first; - } - }; - - //--- Mutative Functions ---// - // Reset the whole object - void reset() - { - position.reset(); scale_factor.set(1, 1, 1); rotation.reset(); - clearLists(); - // Add a default material - matl_list.push_back(new DLFLMaterial("default", 0.5, 0.5, 0.5)); - }; - - void makeVerticesUnique() - { - // Make vertices unique - for (auto vertPtr : vertex_list) - { - vertPtr->makeUnique(); - } - }; - - void makeEdgesUnique() - { - // Make edges unique - for (auto edgePtr : edge_list) - { - edgeMap.erase(edgePtr->getID()); - edgePtr->makeUnique(); - edgeMap[edgePtr->getID()] = edgePtr; - } - } - - void makeFacesUnique() - { - // Make faces unique - for (auto facePtr : face_list) - { - faceMap.erase(facePtr->getID()); - facePtr->makeUnique(); - faceMap[facePtr->getID()] = facePtr; - } - }; - - void makeUnique() - { - assignID(); - makeVerticesUnique(); - makeEdgesUnique(); - makeFacesUnique(); - }; - - void destroy() - { - // Clear the DLFL structures - clearLists(); - }; - - void assignTileTexEdgeFlags(int n); - void assignTileTexCoords(int n); - void randomAssignTexCoords(); - - // Combine two DLFLObject instances into 1 object - // Lists of second object are cleared. Otherwise when that object is destroyed, - // pointers in this object will become invalid. - void splice(DLFLObject& object); - - // Reverse the orientation of all faces in the object - // This also requires reversing all edges in the object - void reverse(); - - void addVertex(const DLFLVertex& vertex); // Insert a copy - void addVertex(DLFLVertexPtr vertexptr); // Insert a copy - void addVertexPtr(DLFLVertexPtr vertexptr) - { - // Insert the pointer. - // **** WARNING!!! **** Pointer will be freed when list is deleted - vertex_list.push_back(vertexptr); - }; - - void addEdge(const DLFLEdge& edge); // Insert a copy - void addEdge(DLFLEdgePtr edgeptr); // Insert a copy - void addEdgePtr(DLFLEdgePtr edgeptr) - { - // Insert the pointer. - // **** WARNING!!! **** Pointer will be freed when list is deleted - edge_list.push_back(edgeptr); - edgeMap[edgeptr->getID()] = edgeptr; - }; - - void addFace(const DLFLFace& face); // Insert a copy - void addFace(DLFLFacePtr faceptr); // Insert a copy - void addFacePtr(DLFLFacePtr faceptr) - { - // Insert the pointer. - // **** WARNING!!! **** Pointer will be freed when list is deleted - if (faceptr->material() == nullptr) - // If Face doesn't have a material assigned to it, assign the default material - faceptr->setMaterial(matl_list.front()); - face_list.push_back(faceptr); - faceMap[faceptr->getID()] = faceptr; - }; - - DLFLVertexPtr getVertexPtr(uint index) const - { - if (index >= vertex_list.size()) return nullptr; - DLFLVertexPtrList::const_iterator i = vertex_list.begin(); - advance(i, index); - return (*i); - }; - - DLFLVertexPtr getVertexPtrID(uint id) const - { - DLFLVertexPtr vptr = nullptr; - for (auto vertPtr : vertex_list) - { - if (vertPtr->getID() == id) - { - vptr = vertPtr; - break; - } - } - return vptr; - }; - - void updateEdgeList() - { - for (auto edgePtr : edge_list) - { - edgePtr->updateFaceVertices(); - } - }; - - // Check if an edge exists between two given vertices - bool edgeExists(DLFLVertexPtr vptr1, DLFLVertexPtr vptr2); - - // Check if an edge exists between vertices given by two corners - // Simply calls above function - inline bool edgeExists(DLFLFaceVertexPtr fvptr1, DLFLFaceVertexPtr fvptr2) - { - return edgeExists(fvptr1->vertex, fvptr2->vertex); - }; - - // Check if a given edge exists in the edge list. If it does pointer is set to that edge - bool edgeExists(const DLFLEdge& e, DLFLEdgePtr& eptr) - { - for (auto edgePtr : edge_list) - { - if (*edgePtr == e) - { - eptr = edgePtr; - return true; - } - } - eptr = nullptr; - return false; - }; - - void addEdges(DLFLEdge * edges, int num_edges) - { - DLFLEdgePtr eptr; - - for (int i = 0; i < num_edges; ++i) - { - if (edgeExists(edges[i], eptr) == false) - { - addEdge(edges[i]); - } - else - { - // If Edge already exists, then the second FaceVertexPtr in the Edge must - // be changed to that from the new Edge with the same ID as the second one - // in this Edge - int id2 = (eptr->getFaceVertexPtr2())->getVertexID(); - int eid1 = (edges[i].getFaceVertexPtr1())->getVertexID(); - - if (eid1 == id2) - eptr->setFaceVertexPtr2(edges[i].getFaceVertexPtr1()); - else - eptr->setFaceVertexPtr2(edges[i].getFaceVertexPtr2()); - } - eptr = nullptr; - } - }; - - void addEdgesWithoutCheck(DLFLEdge * edges, int num_edges) - { - for (int i = 0; i < num_edges; ++i) - addEdge(edges[i]); - }; - - void updateFaceList() - { - for (auto facePtr : face_list) - { - facePtr->updateFacePointers(); - facePtr->addFaceVerticesToVertices(); - } - }; - - DLFLFacePtrArray createFace(const Vector3dArray& verts, DLFLMaterialPtr matl = nullptr, bool set_type = false); - - DLFLFaceVertexPtr createPointSphere(const Vector3d& v, DLFLMaterialPtr matl = nullptr); - void removePointSphere(DLFLFaceVertexPtr fvp); - - // Compute the bounding box for this object - void boundingBox(Vector3d& min, Vector3d& max) const; - bool boundaryWalkID(uint faceId); - void walk(uint faceId, vector &verts, vector &edges); - //vector vertWalk( uint faceId ); - //vector edgeWalk( uint faceId ); - void boundaryWalk(uint face_index); - void vertexTrace(uint vertex_index); - - void readObject(istream& i, istream &imtl); - void readObjectAlt(istream& i); - void readDLFL(istream& i, istream &imtl, bool clearold = true); - bool readMTL(istream &i); - bool writeMTL(ostream& o) const; - - void writeObject(ostream& o, ostream &omtl, bool with_normals = true, bool with_tex_coords = true) const; - void writeDLFL(ostream& o, ostream &omtl, bool reverse_faces = false) const; - void writeSTL(ostream& o) const; - void writeLG3d(ostream& o, bool select = false) const; //!< added by dave - for LiveGraphics3D support to embed 3d models into html - inline void setFilename(const char *filename) - { - // if( mFilename) { delete [] mFilename; mFilename = nullptr; } - // mFilename = filename; - if (filename) - { - mFilename = new char[strlen(filename) + 1]; strcpy(mFilename, filename); - } - else - { - mFilename = new char[8]; strcpy(mFilename, "default"); - } - }; - inline char* getFilename() { return mFilename; } - - inline void setDirname(const char *dirname) - { - if (dirname) - { - mDirname = new char[strlen(dirname) + 1]; strcpy(mDirname, dirname); - } - else - { - mDirname = new char[3]; strcpy(mDirname, "$HOME"); - } - }; - - DLFLMaterialPtr findMaterial(const RGBColor& color) - { - DLFLMaterialPtr matl = nullptr; - for (auto matlPtr : matl_list) - { - if (matlPtr->equals(color)) - { - matl = matlPtr; - break; - } - } - - return matl; - }; - - DLFLMaterialPtr findMaterial(const char *mtlname) - { - DLFLMaterialPtr matl = nullptr; - for (auto matlPtr : matl_list) - { - if (mtlname && !strcasecmp(matlPtr->name, mtlname)) - { - matl = matlPtr; - break; - } - } - return matl; - }; - - void clearMaterials() - { - //iterate through faces... - // DLFLMaterialPtr mptr = new DLFLMaterial("default",0.5,0.5,0.5); - // setColor(RGBColor(0.5,0.5,0.5)); - - for (auto facePtr : face_list) - { - facePtr->setMaterial(matl_list.front()); - } - //clear materials - while (matl_list.size() > 1) - { - // if ( !( (*matl_list.back()) == mptr) ) { - matl_list.pop_back(); - // } - } - //add the fresh blank gray material - // matl_list.push_back(mptr); - } - - DLFLMaterialPtr addMaterial(RGBColor color) - { - //first search for the material to see if it exists already or not - char matl_name[10]; - DLFLMaterialPtr mtl = findMaterial(color); - - // No matching material found - if (mtl == nullptr) - { - //add this as a new material - sprintf(matl_name, "material%d", matl_list.size()); - matl_list.push_back(new DLFLMaterial(matl_name, color)); - mtl = matl_list.back(); - return mtl; - } - else - { - //it already exists... return it - return mtl; - } - } - - void setColor(const RGBColor& col) - { - // matl_list[0] is always the default material - matl_list.front()->setColor(col); - }; - - //-- Geometric Transformations --// - - // Freeze any stored transformations and reset the transformations - // Order of application : rotation, scale, translate - void freezeTransformations(void) - { - tr.reset(); - tr.scale(scale_factor); - tr.rotate(rotation); - tr.translate(position); - Matrix4x4 tmat = tr.matrix(); - DLFLVertexPtr vp; - for (auto vertPtr : vertex_list) - { - vp = vertPtr; - vp->transform(tmat); - } - } - - // Apply GL transformations before rendering - void transform(void) const - { - tr.reset(); - tr.scale(scale_factor); - tr.rotate(rotation); - tr.translate(position); - tr.apply(); - } - - // Apply the transformations for this object on the given vector - void transform(Vector3d& p) - { - tr.reset(); - tr.scale(scale_factor); - tr.rotate(rotation); - tr.translate(position); - Vector4d tp(p); tp[3] = 1.0; - tp = tr.matrix() * tp; - tp /= tp[3]; - p = tp; - } - - -protected: - - // Assign a unique ID for this instance - void assignID() { uID = suLastID++; }; - - // Free the memory allocated for the patches - /*void destroyPatches( ) { - TMPatchFacePtrList::iterator first = patch_list.begin(), last = patch_list.end(); - TMPatchFacePtr pfp = nullptr; - while ( first != last ) { - pfp = (*first); ++first; - delete pfp; - } - patch_list.clear(); - };*/ - - // Free all the pointers in the lists and clear the lists - void clearLists() - { - clear(vertex_list); - clear(edge_list); - clear(face_list); - clear(matl_list); - //destroyPatches(); - edgeMap.clear(); - faceMap.clear(); - }; - -private: - /// Copy Constructor - make proper copy, don't just copy pointers - DLFLObject(const DLFLObject& dlfl) - : position(dlfl.position), scale_factor(dlfl.scale_factor), rotation(dlfl.rotation), - vertex_list(dlfl.vertex_list), edge_list(dlfl.edge_list), face_list(dlfl.face_list), matl_list(dlfl.matl_list), - //patch_list(dlfl.patch_list), patchsize(dlfl.patchsize), - uID(dlfl.uID) - { - }; - - // Assignment operator - DLFLObject& operator=(const DLFLObject& dlfl) - { - position = dlfl.position; - scale_factor = dlfl.scale_factor; - rotation = dlfl.rotation; - - // Destroy the existing object - clearLists(); - - // Copy the lists from the new object - vertex_list = dlfl.vertex_list; - edge_list = dlfl.edge_list; - face_list = dlfl.face_list; - matl_list = dlfl.matl_list; - //patch_list = dlfl.patch_list; - //patchsize = dlfl.patchsize; - - edgeMap = dlfl.edgeMap; - faceMap = dlfl.faceMap; - - uID = dlfl.uID; - return (*this); - }; - -public: - static Transformation tr; // For doing GL transformations - - DLFLVertexPtrArray sel_vptr_array; // List of selected DLFLVertex pointers - - DLFLEdgePtrArray sel_eptr_array; // List of selected DLFLEdge pointers - DLFLFacePtrArray sel_fptr_array; // List of selected DLFLFace pointers - DLFLFaceVertexPtrArray sel_fvptr_array; // List of selected DLFLFaceVertex pointers - - std::unordered_map faceMap; - std::unordered_map edgeMap; - - static DLFLVertexPtrArray vparray; // For selection - static DLFLEdgePtrArray eparray; // For selection - static DLFLFacePtrArray fparray; // For selection - static DLFLFaceVertexPtrArray fvparray; // For selection - - Vector3d position; // Position of object - Vector3d scale_factor; // Scale of object - Quaternion rotation; // Rotation of object - -protected: - DLFLVertexPtrList vertex_list; // The vertex list - DLFLEdgePtrList edge_list; // The edge list - DLFLFacePtrList face_list; // The face list - DLFLMaterialPtrList matl_list; // Material list (for rendering) - - //TMPatchFacePtrList patch_list; // List of patch faces - //int patchsize; // Size of each patch - - // Distinct ID for each instance - static uint suLastID; - - uint uID; // ID for this object - char *mFilename; - char *mDirname; - -}; -// Build the list of patch faces -/*void createPatches() { -destroyPatches(); -DLFLFacePtrList::iterator ffirst = face_list.begin(), flast = face_list.end(); -DLFLFacePtr fp = nullptr; -TMPatchFacePtr pfp = nullptr; - -while ( ffirst != flast ) { -fp = (*ffirst); ++ffirst; -pfp = new TMPatchFace(patchsize); -pfp->setDLFLFace(fp); pfp->createPatches(); -patch_list.push_back(pfp); -} - -// Adjust the edge points for all patches -DLFLEdgePtrList::iterator efirst = edge_list.begin(), elast = edge_list.end(); -DLFLEdgePtr ep = nullptr; -DLFLFaceVertexPtr fvp1,fvp2; -TMPatchPtr pp1, pp2; -Vector3d p00,p01,p10,p11,ip; -while ( efirst != elast ) { -ep = (*efirst); ++efirst; -ep->getCorners(fvp1,fvp2); -pp1 = fvp1->getPatchPtr(); pp2 = fvp2->getPatchPtr(); - -p00 = pp1->getControlPoint(2,0); p01 = pp2->getControlPoint(2,0); -p10 = pp1->getControlPoint(3,1); p11 = pp2->getControlPoint(3,1); -ip = intersectCoplanarLines(p00,p01,p10,p11); - -pp1->setControlPoint(3,0,ip); pp2->setControlPoint(3,0,ip); -pp1->updateGLPointArray(); pp2->updateGLPointArray(); - -pp1 = fvp1->next()->getPatchPtr(); pp2 = fvp2->next()->getPatchPtr(); -pp1->setControlPoint(0,3,ip); pp2->setControlPoint(0,3,ip); -pp1->updateGLPointArray(); pp2->updateGLPointArray(); -} - -// Adjust the vertex points for 4-valence vertices -DLFLVertexPtrList::iterator vfirst = vertex_list.begin(), vlast = vertex_list.end(); -DLFLVertexPtr vp = nullptr; -while ( vfirst != vlast ) { -vp = (*vfirst); ++vfirst; -if ( vp->valence() == 4 ) { -DLFLFaceVertexPtrArray vcorners; -vp->getOrderedCorners(vcorners); -pp1 = vcorners[0]->getPatchPtr(); pp2 = vcorners[2]->getPatchPtr(); - -p00 = pp1->getControlPoint(1,0); p01 = pp2->getControlPoint(1,0); -p10 = pp1->getControlPoint(0,1); p11 = pp2->getControlPoint(0,1); -ip = intersectCoplanarLines(p00,p01,p10,p11); - -for (int i=0; i < 4; ++i) { -pp1 = vcorners[i]->getPatchPtr(); -pp1->setControlPoint(0,0,ip); -pp1->updateGLPointArray(); -} -} -} -} -};*/ -} // end namespace - -#endif /* _DLFL_OBJECT_HH_ */ diff --git a/topmodx/include/dlflcore/DLFLVertex.cc b/topmodx/include/dlflcore/DLFLVertex.cc deleted file mode 100644 index 8e3a18d..0000000 --- a/topmodx/include/dlflcore/DLFLVertex.cc +++ /dev/null @@ -1,535 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/** - * \file DLFLVertex.cc - */ - -// Non-inline function definitions for DLFLVertex class - -#include "DLFLVertex.h" -#include "DLFLFace.h" -#include "DLFLEdge.h" - -namespace DLFL -{ -uint DLFLVertex::suLastID = 0; - -// Dump contents of this object to an output stream -void DLFLVertex::dump(ostream& o) const -{ - o << "DLFLVertex" << endl - // << " ID : " << uID << endl - // << " Coords : " << coords << endl - // << " Type : " << vtType << endl - << " fvpList" << endl; - - DLFLFaceVertexPtrList::const_iterator first, last; - int i = 0; - - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - o << " " << i++ << " : " << (*first) << endl; - ++first; - } - o << endl; -} - -// Reset type of vertex, face-vertices and edges associated with this vertex -void DLFLVertex::resetTypeDeep(void) -{ - // Reset vertex type - resetType(); - - // Go through face-vertex list and reset type of each face-vertex - // and the edge starting at that face-vertex - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - fvp->resetType(); - fvp->getEdgePtr()->resetType(); - } -} - -// Set the texture coordinates for all FaceVertexes referring to this vertex -void DLFLVertex::setTexCoords(const Vector2d& texcoord) -{ - DLFLFaceVertexPtrList::iterator first, last; - - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - (*first)->texcoord = texcoord; - ++first; - } -} - -// Set the color values for all FaceVertexes referring to this vertex -void DLFLVertex::setColor(const RGBColor& color) -{ - DLFLFaceVertexPtrList::iterator first, last; - - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - (*first)->color = color; - ++first; - } -} - -// Set the normals for all FaceVertexes referring to this vertex -Vector3d DLFLVertex::computeNormal(bool set) -{ - DLFLFaceVertexPtrList::iterator first, last; - Vector3d normal; - int i = 0; - - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - normal += (*first)->computeNormal(); - ++first; ++i; - } - normal /= i; - if (set) - { - first = fvpList.begin(); - while (first != last) - { - (*first)->normal = normal; - ++first; - } - } - return normal; -} - -// Compute the normals for all FaceVertexes referring to this vertex -// Update the vertex normal and return it -Vector3d DLFLVertex::updateNormal(bool recompute) -{ - DLFLFaceVertexPtrList::iterator first, last; - - first = fvpList.begin(); last = fvpList.end(); - normal.reset(); - if (recompute) - while (first != last) - { - normal += (*first)->computeNormal(); - ++first; - } - else - while (first != last) - { - normal += (*first)->normal; - ++first; - } - - normalize(normal); - return normal; -} - -Vector3d DLFLVertex::getNormals(Vector3dArray& normals) -{ - // Return normals at all corners in an Vector3dArray - Vector3d avenormal; - int numnormals = fvpList.size(); - if (numnormals > 0) - { - normals.clear(); normals.reserve(numnormals); - - DLFLFaceVertexPtrList::const_iterator first, last; - DLFLFaceVertexPtr fvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - normals.push_back(fvp->normal); avenormal += fvp->normal; - } - avenormal /= numnormals; - } - return avenormal; -} - -// Set tex coordinates, color and normal info for all FaceVertexes referring to this vertex -void DLFLVertex::setFaceVertexProps(const Vector2d& texcoord, const RGBColor& color, const Vector3d& n) -{ - DLFLFaceVertexPtrList::iterator first, last; - - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - (*first)->texcoord = texcoord; - (*first)->color = color; - (*first)->normal = n; - ++first; - } -} - -void DLFLVertex::vertexTrace(void) const -{ - // Output all edges incident on this DLFLVertex in the specific rotation order - - // Pick a DLFLFaceVertex from the list - first one - DLFLFaceVertexPtr fvptr1 = fvpList.front(); - - if (fvptr1 == nullptr) return; - - DLFLEdgePtr e1, e2; - DLFLFaceVertexPtr fvptr2; - DLFLFacePtr f; - - // Find Edge starting at this DLFLFaceVertex - e1 = fvptr1->getEdgePtr(); - e2 = e1; - - do - { - cout << (*e2) << " "; - - // Find the other DLFLFaceVertex for this DLFLEdge - fvptr2 = e2->getOtherFaceVertexPtr(fvptr1); - if (fvptr2 == nullptr) return; - - // Find the Face to which the second DLFLFaceVertex belongs - f = fvptr2->getFacePtr(); - - // Find the DLFLFaceVertex following the second DLFLFaceVertex in this Face - fvptr1 = f->nextFaceVertex(fvptr2); - - // Find Edge starting at this DLFLFaceVertex - e2 = fvptr1->getEdgePtr(); - } while (e2 != e1); - - cout << endl; -} - -int DLFLVertex::getEdges(DLFLEdgePtr ** edges) const -{ - // Create an array of DLFLEdge's incident on this DLFLVertex. The number of DLFLEdges - // is returned. Memory will be allocated inside this function, which should - // be freed by the caller. Pass a pointer to the array (DLFLEdge ** or DLFLEdgePtr *) - // Equivalent to a vertex trace - // In case of an error -1 is returned, but memory is not freed - - int num_edges = fvpList.size(); - int i = 0; - - if (num_edges <= 0) return -1; - - // Allocate memory for the DLFLEdgePtr array - *edges = new DLFLEdgePtr[num_edges]; - - DLFLFaceVertexPtrList::const_iterator first, last; - DLFLFaceVertexPtr fvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - edges[0][i++] = fvp->getEdgePtr(); - } - return num_edges; -} - -void DLFLVertex::getEdges(DLFLEdgePtrArray& edges) const -{ - // Return edges in an DLFLEdgePtrArray - // int size; - // try { - // throw fvpList.size(); - // } - // catch (char c){ - // std::cout << c << " \t char exception\n"; - // } - // catch (int cause){ - // std::cout << cause << " \t int exception\n"; - // } - // catch (...){ - // std::cout << "default exception\n"; - // } - - if (fvpList.size() > 0) - { - edges.clear(); edges.reserve(fvpList.size()); - - DLFLFaceVertexPtrList::const_iterator first, last; - DLFLFaceVertexPtr fvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - edges.push_back(fvp->getEdgePtr()); - } - } -} - -DLFLEdgePtr DLFLVertex::getEdgeTo(DLFLVertexPtr vp) -{ - // Get the Edge incident on this Vertex which connects to given Vertex - // If no such edge exists, returns nullptr - DLFLEdgePtr ep, retep = nullptr; - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp = nullptr, ofvp; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - ep = fvp->getEdgePtr(); - if (ep != nullptr) - { - ofvp = ep->getOtherFaceVertexPtr(fvp); - if (ofvp && ofvp->vertex == vp) - { - retep = ep; break; - } - } - } - return retep; -} - -void DLFLVertex::getFaceVertices(DLFLFaceVertexPtrArray& fvparray) -{ - // Go through the face-vertex-pointer list and add each - // face vertex pointer to the array - fvparray.clear(); fvparray.reserve(fvpList.size()); - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - fvparray.push_back(fvp); - } -} - -void DLFLVertex::getOrderedFaceVertices(DLFLFaceVertexPtrArray& fvparray) -{ - // Get the face vertices associated with this vertex in the clockwise rotation order - fvparray.clear(); - - DLFLFaceVertexPtr fvpstart = fvpList.front(); - if (fvpstart == nullptr) return; - - fvparray.reserve(fvpList.size()); - DLFLFaceVertexPtr fvp = fvpstart; - - do - { - fvparray.push_back(fvp); - fvp = fvp->vnext(); - } while (fvp != fvpstart); -} - - -void DLFLVertex::getCornerAuxCoords(Vector3dArray& coords) const -{ - coords.clear(); coords.reserve(fvpList.size()); - DLFLFaceVertexPtrList::const_iterator first, last; - DLFLFaceVertexPtr fvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - coords.push_back(fvp->getAuxCoords()); - } -} - -void DLFLVertex::getOrderedCornerAuxCoords(Vector3dArray& coords) const -{ - // Get the aux coords of face vertices associated with this vertex in the clockwise rotation order - coords.clear(); - - DLFLFaceVertexPtr fvpstart = fvpList.front(); - if (fvpstart == nullptr) return; - - coords.reserve(fvpList.size()); - DLFLFaceVertexPtr fvp = fvpstart; - - do - { - coords.push_back(fvp->getAuxCoords()); - fvp = fvp->vnext(); - } while (fvp != fvpstart); -} - - -void DLFLVertex::getFaces(DLFLFacePtrArray& fparray) -{ - // Go through the face-vertex-pointer list and add - // face pointer of each face vertex pointer to the array - fparray.clear(); fparray.reserve(fvpList.size()); - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - fparray.push_back(fvp->getFacePtr()); - } -} - -DLFLFaceVertexPtr DLFLVertex::getFaceVertexInFace(DLFLFacePtr fp) -{ - // Get the FaceVertex belonging to the given face. If only 1 face-vertex - // is there in the list, return that. If more than 1 exist but nothing - // belongs to given face, return nullptr - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp, retfvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - if (fvpList.size() == 1) - retfvp = (*first); - else - { - while (first != last) - { - fvp = (*first); ++first; - if (fvp->getFacePtr() == fp) - { - retfvp = fvp; - break; - } - } - } - return retfvp; -} - -DLFLFaceVertexPtr DLFLVertex::getFaceVertexWithPrev(DLFLVertexPtr vp) -{ - // Get the FaceVertex which has the given Vertex before it in it's Face - // If only 1 FaceVertex refers to this Vertex, will return that - // If there are more than 1 and none of them satisfies the condition, returns nullptr - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp, retfvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - if (fvpList.size() == 1) - retfvp = (*first); - else - { - while (first != last) - { - fvp = (*first); ++first; - if (fvp->prev()->vertex == vp) - { - retfvp = fvp; - break; - } - } - } - return retfvp; -} - -DLFLFaceVertexPtr DLFLVertex::getFaceVertexWithNext(DLFLVertexPtr vp) -{ - // Get the FaceVertex which has the given Vertex after it in it's Face - // If only 1 FaceVertex refers to this Vertex, will return that - // If there are more than 1 and none of them satisfies the condition, returns nullptr - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp, retfvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - if (fvpList.size() == 1) - retfvp = (*first); - else - { - while (first != last) - { - fvp = (*first); ++first; - if (fvp->next()->vertex == vp) - { - retfvp = fvp; - break; - } - } - } - return retfvp; -} - -DLFLFaceVertexPtr DLFLVertex::getBackFaceVertex(void) -{ - // Get the FaceVertex which has the 'backface' flag set - // If no such FaceVertex is found, returns nullptr - DLFLFaceVertexPtrList::iterator first, last; - DLFLFaceVertexPtr fvp, retfvp = nullptr; - first = fvpList.begin(); last = fvpList.end(); - while (first != last) - { - fvp = (*first); ++first; - if (fvp->backface == true) - { - retfvp = fvp; break; - } - } - return retfvp; -} - -void makeVertexUnique(DLFLVertexPtr dvp) -{ - dvp->assignID(); -} - -void resetVertexType(DLFLVertexPtr dvp) -{ - dvp->resetType(); -} - -void vertexTrace(DLFLVertexPtr vertexptr) -{ - vertexptr->vertexTrace(); -} - -void vertexTrace(const DLFLVertex& vertex) -{ - vertex.vertexTrace(); -} - -istream& operator >> (istream& i, DLFLVertex& dv) -{ - // Read x,y,z coordinates. - double x, y, z; - i >> x >> y >> z; - dv.coords.set(x, y, z); - return i; -} - -ostream& operator << (ostream& o, const DLFLVertex& dv) -{ - // Only coordinates are written. - double x, y, z; - dv.coords.get(x, y, z); - o << "v " << x << ' ' << y << ' ' << z << endl; - return o; -} - -} // end namespace diff --git a/topmodx/include/dlflcore/DLFLVertex.h b/topmodx/include/dlflcore/DLFLVertex.h deleted file mode 100644 index 7889848..0000000 --- a/topmodx/include/dlflcore/DLFLVertex.h +++ /dev/null @@ -1,452 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * \file DLFLVertex.hh - */ - -#ifndef _DLFL_VERTEX_HH_ -#define _DLFL_VERTEX_HH_ - -// Class to store a vertex for the DLFLObject class -// Based on the OBJVertex class - -#include "DLFLCommon.h" - -namespace DLFL -{ - -class DLFLVertex -{ -public: - static void setLastID(uint id) - { - if (id > suLastID) - suLastID = id; - }; - - // Default constructor - DLFLVertex() - : coords(), flags(0), fvpList(), vtType(VTNormal), auxcoords(), auxnormal(), normal() - { - assignID(); - } - - // 1 argument constructor - DLFLVertex(const Vector3d& vec) - : coords(vec), flags(0), fvpList(), vtType(VTNormal), auxcoords(), auxnormal(), normal() - { - assignID(); - } - - // 3 argument constructor - DLFLVertex(double x, double y, double z) - : coords(x, y, z), flags(0), fvpList(), vtType(VTNormal), auxcoords(), auxnormal(), normal() - { - assignID(); - } - - // Copy constructor - DLFLVertex(const DLFLVertex& dv) - : coords(dv.coords), flags(dv.flags), - uID(dv.uID), index(dv.index), fvpList(dv.fvpList), vtType(dv.vtType), - auxcoords(dv.auxcoords), auxnormal(dv.auxnormal), normal(dv.normal) - { - } - - // Destructor - ~DLFLVertex() {} - - // Assignment operator - DLFLVertex& operator = (const DLFLVertex& dv) - { - coords = dv.coords; flags = dv.flags; - uID = dv.uID; index = dv.index; fvpList = dv.fvpList; vtType = dv.vtType; - auxcoords = dv.auxcoords; auxnormal = dv.auxnormal; normal = dv.normal; - return (*this); - } - - DLFLVertexPtr copy(void) const - { - DLFLVertexPtr newdv = new DLFLVertex(*this); - return newdv; - } - - // Dump contents of this object - void dump(ostream& o) const; - - void reset(void) - { - coords.reset(); flags = 0; fvpList.clear(); vtType = VTNormal; - auxcoords.reset(); auxnormal.reset(); normal.reset(); - } - - void makeUnique(void) - { - assignID(); - } - - friend void makeVertexUnique(DLFLVertexPtr dvp); - /* - friend void makeVertexUnique(DLFLVertexPtr dvp) { - dvp->assignID(); - } - */ - //--- Query functions ---// - - DLFLVertexType getType(void) const - { - return vtType; - } - - Vector3d getCoords(void) const - { - return coords; - } - - DLFLFaceVertexPtrList getFaceVertexList(void) const - { - return fvpList; - } - - // Number of Edges incident on this Vertex = no. of Faces adjacent to this Vertex - // = size of the FaceVertex list = valence of Vertex - uint numEdges(void) const - { - return fvpList.size(); - } - - uint numFaces(void) const - { - return fvpList.size(); - } - - uint valence(void) const - { - return fvpList.size(); - } - - uint getID(void) const - { - return uID; - } - - uint getIndex(void) const - { - return index; - } - - Vector3d getAuxCoords(void) const - { - return auxcoords; - } - - Vector3d getAuxNormal(void) const - { - return auxnormal; - } - - Vector3d getNormal(void) const - { - return normal; - } - - //--- Mutative functions ---// - - void setType(DLFLVertexType type) - { - vtType = type; - } - - void resetType(void) - { - vtType = VTNormal; - } - - // Reset type of vertex, all face-vertices and edges connected to this vertex - void resetTypeDeep(void); - - friend void resetVertexType(DLFLVertexPtr dvp); - /* - friend void resetVertexType(DLFLVertexPtr dvp) { - dvp->resetType(); - } - */ - - void setFaceVertexList(const DLFLFaceVertexPtrList& list) - { - fvpList = list; - } - - void setCoords(const Vector3d& p) - { - coords = p; - } - - // Set the aux. coords - void setAuxCoords(const Vector3d& p) - { - auxcoords = p; - } - - void setAuxNormal(const Vector3d& n) - { - auxnormal = n; - } - - // Add to the aux coords - void addToAuxCoords(const Vector3d& p) - { - auxcoords += p; - } - - void addToAuxNormal(const Vector3d& n) - { - auxnormal += n; - } - - // Reset the aux coords - void resetAuxCoords(void) - { - auxcoords.reset(); - } - - void resetAuxNormal(void) - { - auxnormal.reset(); - } - - // Set the texture coordinates for all FaceVertexes referring to this vertex - void setTexCoords(const Vector2d& texcoord); - - // Set the color values for all FaceVertexes referring to this vertex - void setColor(const RGBColor& color); - - // Set the normal for this vertex directly - void setNormal(const Vector3d& n) - { - normal = n; normalize(normal); - } - - // If flag is true recompute normals for all FaceVertexes referring to this vertex, - // Update the vertex normal. Returns the vertex normal - Vector3d updateNormal(bool recompute = true); - - Vector3d computeNormal(bool set = false); - - // Retained for backward compatibility - // Same as updateNormal but doesn't recompute the corner normals - Vector3d averageNormal(void) - { - return updateNormal(false); - } - - // Get normals of all corners referring to this vertex. Returns average normal - Vector3d getNormals(Vector3dArray& normals); - - // Set tex coordinates, color and normal info for all FaceVertexes referring to this vertex - void setFaceVertexProps(const Vector2d& texcoord, const RGBColor& color, const Vector3d& normal); - - // Update the DLFLFaceVertexList by adding a new DLFLFaceVertexPtr - void addToFaceVertexList(DLFLFaceVertexPtr fvptr) - { - fvpList.push_back(fvptr); - } - - void deleteFromFaceVertexList(DLFLFaceVertexPtr fvptr) - { - fvpList.remove(fvptr); - } - - // DLFL Vertex Trace - void vertexTrace(void) const; - friend void vertexTrace(DLFLVertexPtr vertexptr); - /* - friend void vertexTrace(DLFLVertexPtr vertexptr) { - vertexptr->vertexTrace(); - } - */ - friend void vertexTrace(const DLFLVertex& vertex); - /* - friend void vertexTrace(const DLFLVertex& vertex) { - vertex.vertexTrace(); - } - */ - - // Create an array of Edge's incident on this Vertex. The number of Edges - // is returned. Memory will be allocated inside this function, which should - // be freed by the caller. Pass a pointer to the array (DLFLEdgePtr **) - // Equivalent to a vertex trace - int getEdges(DLFLEdgePtr ** edges) const; - - // Same as above but uses the STL Array - void getEdges(DLFLEdgePtrArray& edges) const; - - // Get the Edge incident on this Vertex which connects to given Vertex - // If no such edge exists, returns nullptr - DLFLEdgePtr getEdgeTo(DLFLVertexPtr vp); - - // Create an array of FaceVertexes which share this Vertex. - void getFaceVertices(DLFLFaceVertexPtrArray& fvparray); - void getOrderedFaceVertices(DLFLFaceVertexPtrArray& fvparray); - - void getCorners(DLFLFaceVertexPtrArray& fvparray) - { - getFaceVertices(fvparray); - } - void getOrderedCorners(DLFLFaceVertexPtrArray& fvparray) - { - getOrderedFaceVertices(fvparray); - } - - // Get the aux coords from all corners which share this Vertex - void getCornerAuxCoords(Vector3dArray& coords) const; - void getOrderedCornerAuxCoords(Vector3dArray& coords) const; - - // Create an array of Faces which share this Vertex - void getFaces(DLFLFacePtrArray& fparray); - - // Get the FaceVertex belonging to the given face. If only 1 face-vertex - // is there in the list, return that. If more than 1 exist but nothing - // belongs to given face, return nullptr - DLFLFaceVertexPtr getFaceVertexInFace(DLFLFacePtr fp); - - // Get the FaceVertex which has the given Vertex before/after it in it's Face - // If only 1 FaceVertex refers to this Vertex, will return that - // If there are more than 1 and none of them satisfies the condition, returns nullptr - DLFLFaceVertexPtr getFaceVertexWithPrev(DLFLVertexPtr vp); - DLFLFaceVertexPtr getFaceVertexWithNext(DLFLVertexPtr vp); - - // Get the FaceVertex which has the 'backface' flag set - // If no such FaceVertex is found, returns nullptr - DLFLFaceVertexPtr getBackFaceVertex(void); - - // Apply a transformation specified by the matrix to the coordinates - void transform(const Matrix4x4& tmat) - { - Vector4d tp(coords); tp[3] = 1.0; - tp = tmat * tp; - tp /= tp[3]; - coords = tp; - } - - // Print out this Vertex - void print(void) const - { - cout << "DLFLVertex " << uID << "," << vtType << "," << valence() << " : " << coords << endl; - } - - // Write this vertex in DLFL format and set it's index value - void writeDLFL(ostream& o, uint newindex) - { - double x, y, z; coords.get(x, y, z); - o << "v " << x << ' ' << y << ' ' << z << endl; - index = newindex; - } - - // Read a vertex from an input stream. - // The 3 coordinates should be specified separated by spaces (as in OBJ format) - friend istream& operator >> (istream& i, DLFLVertex& dv); - /* - friend istream& operator >> (istream& i, DLFLVertex& dv) { - // Read x,y,z coordinates. - double x,y,z; - i >> x >> y >> z; - dv.coords.set(x,y,z); - return i; - } - */ - // Write a vertex to an output stream. Writes in OBJ format - friend ostream& operator << (ostream& o, const DLFLVertex& dv); - /* - friend ostream& operator << (ostream& o, const DLFLVertex& dv) { - // Only coordinates are written. - double x,y,z; - dv.coords.get(x,y,z); - o << "v " << x << ' ' << y << ' ' << z << endl; - return o; - } - */ - - /* - // Do a glVertex on this point - friend void glVertex(const DLFLVertex& dv) { - dv.render(); - } - - friend void glVertexP(const DLFLVertexPtr& dvp) { - dvp->render(); - } - */ - -protected: - // Assign a unique ID for this instance - void assignID(void) - { - uID = suLastID++; - index = 0; - isMarked = false; - isVisited = false; - }; - -public: - Vector3d coords; // Coordinates of vertex - bool isMarked; - bool isVisited; // flag for traverse - ozgur - unsigned long flags; // Variable for general use to store flags, etc. - uint CHullIndex; // Index used for convex hull - Esan - -protected: - // Distinct ID for each instance - // The last assigned ID is stored in this - // class variable - static uint suLastID; - - uint uID; // ID for this DLFLVertex - uint index; // Index for use in file output - DLFLFaceVertexPtrList fvpList; // List of DLFLFaceVertexes which - // refer to this DLFLVertex - - DLFLVertexType vtType; // For use in subdivision surfaces - Vector3d auxcoords; // Coords for use during subdivs, etc. - Vector3d auxnormal; // Extra storage for normal - Vector3d normal; // Average normal at this vertex - -}; - -void makeVertexUnique(DLFLVertexPtr dvp); -void resetVertexType(DLFLVertexPtr dvp); -void vertexTrace(DLFLVertexPtr vertexptr); -void vertexTrace(const DLFLVertex& vertex); -istream& operator >> (istream& i, DLFLVertex& dv); -ostream& operator << (ostream& o, const DLFLVertex& dv); - - -} // end namespace - -#endif /* _DLFL_VERTEX_HH_ */ diff --git a/topmodx/include/dlflcore/dlflcore.pro b/topmodx/include/dlflcore/dlflcore.pro deleted file mode 100644 index 64d043b..0000000 --- a/topmodx/include/dlflcore/dlflcore.pro +++ /dev/null @@ -1,51 +0,0 @@ -TEMPLATE = lib -CONFIG -= qt -CONFIG += staticlib #dll # build shared library -CONFIG += debug warn_off create_prl -# CONFIG += debug warn_off create_prl -TARGET = dlflcore -INCLUDEPATH += .. ../vecmat -CONFIG(debug, debug|release) { - LIB_CONF_SUB_DIR = Debug -} else { - LIB_CONF_SUB_DIR = Debug -} -DESTDIR = ../../lib/$${LIB_CONF_SUB_DIR} - -macx { - # compile release + universal binary - #QMAKE_LFLAGS += -F../../lib - #LIBS += -framework vecmat - #CONFIG += x86 ppc - #CONFIG += lib_bundle - #QMAKE_BUNDLE_EXTENSION = .framework -#} else:unix { - QMAKE_LFLAGS += -L../../lib/$${LIB_CONF_SUB_DIR} - #LIBS += -lvecmat -} -else:win32 { - -} - -HEADERS += \ - DLFLCommon.h \ - DLFLCore.h \ - DLFLCoreExt.h \ - DLFLEdge.h \ - DLFLFace.h \ - DLFLFaceVertex.h \ - DLFLMaterial.h \ - DLFLObject.h \ - DLFLVertex.h - -SOURCES += \ - DLFLCommon.cc \ - DLFLCore.cc \ - DLFLCoreExt.cc \ - DLFLEdge.cc \ - DLFLFace.cc \ - DLFLFaceVertex.cc \ - DLFLFile.cc \ - DLFLFileAlt.cc \ - DLFLObject.cc \ - DLFLVertex.cc diff --git a/topmodx/include/include.pro b/topmodx/include/include.pro deleted file mode 100644 index 301317f..0000000 --- a/topmodx/include/include.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = subdirs - -CONFIG += ordered - -SUBDIRS = \ - vecmat \ -# arcball \ - dlflcore \ - dlflaux - diff --git a/topmodx/include/pydlfl/CommandReference.html b/topmodx/include/pydlfl/CommandReference.html deleted file mode 100644 index 04622b9..0000000 --- a/topmodx/include/pydlfl/CommandReference.html +++ /dev/null @@ -1,184 +0,0 @@ - -TopMod :: Python Command Reference - - - - -

TopMod
Python Command Reference

- -
- - - - -
- -

Object Management

-
load(filename)

Loads a file of either Wavefront OBJ (.obj) or DLFL (.dlfl) into the scene. The file data becomes the current object. The filetype is recognized by the extension. Filename is given as a string (e.g., "myfile.obj"). In the TopMod interface this replaces any current object loaded. In stand-alone, this pushes any current object onto the stack.

Result:
objectid
-
save(filename)

Saves a file of either Wavefront OBJ (.obj) or DLFL (.dlfl) from the current object. The filetype is recognized by the extension. Filename is given as a string (e.g., "myfile.obj").

Result:
wasSuccess
-
kill(objectid)

Kills or destroys the object represented by objectid. This is disabled when using the TopMod interface! It serves only when working in python standalone.

Result:
None
-
switch(objectid)

Switches the current object to the object represented by objectid. This is disabled when using the TopMod interface!. Since the interface currently only allows one object to be open at a time.

Result:
objectid
- -

Core Operations

-
createVertex((x,y,z))

Creates an isolated vertex with it's point-sphere at a position specified by a 3-tuple. No edge is created. An object can be created this way. This is one of the minimal operators.

Result:
(faceid,vertexid),objectid
-
removeVertex(vertexid)

Removes/Deletes an isolated vertex and it's point-sphere. This is one of the minimal operators.

Result:
None
-
insertEdge((faceid,vertexid),(faceid,vertexid))

Inserts an edge connecting two corners. Each corner is represented by a tuple: (faceid,vertexid). When the new edge is created the input vertices become members of the same face. Since integers are immutable in Python, we must return these also.

Result:
edgeid,(faceid,vertexid),(faceid,vertexid),(faceid,vertexid),(faceid,vertexid)
-
deleteEdge(edgeid)

Deletes the edge represented by edgeid. When the edge is deleted then one face remains. If the deleted edge's sides belonged to two separate faces then the second one is deleted. A list (of size 1) with remaining face's ID is returned. Otherwise, if the deleted edge's sides belonged to the same face, then one new face is created. A list (of size 2) with the 2 face IDs is returned.

Result:
[faceid,...]
-
collapseEdge(edgeid)

Collapses the edge represented by edgeid.

Result:
vertexid
-
subdivideEdge([divisions,]edgeid)

Subdivides the edge represented by edgeid. By default it just subdivides it in half, but when given the optional argument divisions it subdivides the edge by that number. Then it returns a list of all the newly created vertices.

Result:
[vertexid,...]
- -

Auxiliary Operations

-
extrude(type,faceid[,...])

Extrudes a face with the type of extrusions specified by a string. Valid types include:

  • "doo-sabin" options: [distance, segments, rotation, scale]
  • -
  • "dodeca" options: [distance, segments, twist, scale, hexagonalize]
  • -
  • "icosa" options: [distance, segments, rotation, scale]
  • -
  • "octa" options: [distance, rotation, scale]
  • -
  • "stellate" options: [distance]
  • -
  • "double-stellate" options: [distance]
  • -
  • "cubical" options: [distance, segments, rotation, scale]

Result:
faceid
-
subdivide(scheme[,...])

Subdivides the current object with the specified scheme. Each scheme has a different set of optional arguments. Valid scheme names are:

  • "loop"
  • -
  • "checker" options: [thickness=0.33]
  • -
  • "simplest"
  • -
  • "vertex-cut" options: [offset=0.25]
  • -
  • "pentagon" options: [offset=0.0]
  • -
  • "dual-pentagon" options: [scale=0.75]
  • -
  • "honeycomb"
  • -
  • "doo-sabin" options: [check=true]
  • -
  • "doo-sabin-bc" options: [check=true]
  • -
  • "doo-sabin-bc-new" options: [length]
  • -
  • "corner-cut"
  • -
  • "modified-corner-cut" options: [thickness]
  • -
  • "root4" options: [a,twist]
  • -
  • "catmull-clark"
  • -
  • "star" options: [offset=0.0]
  • -
  • "sqrt3"
  • -
  • "fractal" options: [offset=1.0]
  • -
  • "stellate"
  • -
  • "double-stellate" options: [offset,curve]
  • -
  • "dome" options: [length,scale]
  • -
  • "dual-12.6.4" options: [scale]
  • -
  • "loop-style" options: [length]
  • -
  • "linear-vertex" options: [usequads=true]

Result:
None
-
subdivideFace(faceid[,usequads])

Subdivide a face into n faces (where n is the number of edges of the face). By default the new faces are quadralaterals, but if specified with False, then the new faces will be triangular.

Result:
None
-
subdivideFaces(faceidList[,usequads])

Subdivide faces in the list into n faces (where n is the number of edges of the face). By default the new faces are quadralaterals, but if specified with False, then the new faces will be triangular. If you want to do all faces you can also Use subdivide("linear-vertex")

Result:
None
-
dual()

Takes the dual of the current object.

Result:
None
-
connectEdges((edgeid,faceid),(edgeid,faceid)[,loopCheck])

Connect two half-edges with a face. If loopCheck is True then only connect if the edges are not adjacent to their corresponding faces.

Result:
None
-
connectCorners((faceid,vertexid),(faceid,vertexid)[,numsegs,maxconn,'dual'])

Connect two faces given a corner from each face. Uses repeated insertEdge operations

Result:
None
-
connectFaces(faceid,faceid[,numsegs,maxconn])

Connect two faces with multiple segments. Intermediate points are calculated by linear interpolation based on number of segments. Maximum connections should be set to -1 when connecting all is desired

Result:
None
-
addHandle(interp,(faceid,vertexid),(faceid,vertexid),numsegs
[,weight1,weight2,maxconn,numtwists]
)

Create an interpolated handle. The option interp should be set to either "hermite" or "bezier" depending on the desired interpolation method. Setting the number of segments and playing with the weights and number of twists will yield different results.

Result:
None
-
rind(facelist,useScaling,percent[,uniform])

Create a rind model - create a crust then punch the specified faces. The percentage is a thickness parameter when useScaling is false, otherwise it is a scaling parameter.

Result:
None
-
wireframe([thicknes,split])

Creates a solid wireframe from the object.

Result:
None
-
column(thickness,segments)

Creates a solid column wireframe from the object.

Result:
None
-

Finding IDs

-
faces([selected])

Returns a tuple containing the ids of the faces. If selected is True, then only those faces selected are returned (this is the default in the TopMod interface), otherwise all the faces. Since selection is impossible in stand-alone, the default is all the faces.

Result:
(faceid,...)
-
edges([selected])

Returns a tuple containing the ids of the edges. If selected is True, then only those edges selected are returned (this is the default in the TopMod interface), otherwise all the edges. Since selection is impossible in stand-alone, the default is all the edges.

Result:
(edgeid,...)
-
verts([selected])

Returns a tuple containing the ids of the vertices. If selected is True, then only those vertices selected are returned (this is the default in the TopMod interface), otherwise all the vertices. Since selection is impossible in stand-alone, the default is all the vertices.

Result:
(vertexid,...)
-
corners([selected])

Returns a tuple containing 2-tuples with the ids of the faces and the ids of the vertices. If selected is True, then only those corners selected are returned (this is the default in the TopMod interface), otherwise all the corners. Since selection is impossible in stand-alone, the default is all the corners.

Result:
((faceid,vertexid),...)
-
walk(faceid)

This does a boundary walk around a face. The format looks like this:

DLFLFace faceid (numsides) : vertexid[backface]--(edgeid)-->.... It returns a list of vertices and a list of edges

It continues until it walks through each side of the face.

Result:
vertexlist,edgelist
-
cornerWalk(faceid)

Performs the boundary walk as specified by the walk above, but instead of grabbing the vertices and edges walked, it returns the corners walked. This means the result will contain the tuples with the input faceid and each vertex.

Result:
[(faceid,vertexid),...]
-

Object Information

-
printObject()

Print out object information to standard out. For example, a cube:

Number of vertices : 8
-Number of faces : 6
-Number of edges : 12
-Number of materials : 1
-Genus : 0

Result:
None
-
vertexInfo(vertexid)

Store information about the vertex in a dictionary. The options can be accessed by there keys like this vertexInfo(vertexid)['coords']. Valid keys are:

  • 'id'
  • -
  • 'type'
  • -
  • 'coords'
  • -
  • 'valence'

Result:
{'key': value}
-
edgeInfo(edgeid)

Store information about the edge in a dictionary. The options can be accessed by there keys like this edgeInfo(edgeid)['midpoint']. Valid keys are:

  • 'id'
  • -
  • 'type'
  • -
  • 'midpoint'
  • -
  • 'normal'
  • -
  • 'cornerA'
  • -
  • 'cornerB'
  • -
  • 'length'

Result:
{'key': value}
-
faceInfo(faceid)

Store information about the face in a dictionary. The options can be accessed by there keys like this faceInfo(faceid)['centroid']. Valid keys are:

  • 'id'
  • -
  • 'type'
  • -
  • 'centroid'
  • -
  • 'normal'
  • -
  • 'size'

Result:
{'key': value}
-
cornerInfo((faceid,vertexid))

Store information about the corner in a dictionary. The options can be accessed by there keys like this cornerInfo((faceid,vertexid))['type']. Valid keys are:

  • 'face'
  • -
  • 'vertex'
  • -
  • 'edge'
  • -
  • 'type'

Result:
{'key': value}
-
centroid(vertexids)

Find the centroid of a given set of vertices.

Result:
centroid
-

Transformations

-
translate(x,y,z[,relative])

Translate the current object to <x y z> if relative is False, otherwise translate by x, y & z units. Relative is true by default.

Result:
None
-
scale((x,y,z))

Scale the current object to <x y z>.

Result:
None
-
move(vertexids,(x,y,z)[,relative])

Takes a tuple containing every vertexid that is to be moved. Then translates either to <x y z> (absolute) or by x, y, & z (relative). The default is relative.

Result:
None
-
-Return To Top - - diff --git a/topmodx/include/pydlfl/DLFLModule.cc b/topmodx/include/pydlfl/DLFLModule.cc deleted file mode 100644 index fa770c0..0000000 --- a/topmodx/include/pydlfl/DLFLModule.cc +++ /dev/null @@ -1,1631 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include - -#include -#include -#include -#include -#include -#include - -typedef DLFL::DLFLFaceVertex Corner; -typedef DLFL::DLFLFaceVertexPtr CornerPtr; -typedef DLFL::DLFLFaceVertexPtrArray CornerPtrArray; - -/// Prototypes - -/* Object Management */ -static PyObject *dlfl_load_obj(PyObject *self, PyObject *args); -static PyObject *dlfl_kill_obj(PyObject *self, PyObject *args); -static PyObject *dlfl_switch_obj(PyObject *self, PyObject *args); -static PyObject *dlfl_save_obj(PyObject *self, PyObject *args); -// static PyObject *dlfl_save_lg3d(PyObject *self, PyObject *args); -// static PyObject *dlfl_save_stl(PyObject *self, PyObject *args); -//static PyObject *dlfl_query_obj(PyObject *self, PyObject *args); - -/* Core */ -static PyObject *dlfl_insert_edge(PyObject *self, PyObject *args); -static PyObject *dlfl_delete_edge(PyObject *self, PyObject *args); -static PyObject *dlfl_collapse_edge(PyObject *self, PyObject *args); -static PyObject *dlfl_subdivide_edge(PyObject *self, PyObject *args); - -static PyObject *dlfl_create_vertex(PyObject *self, PyObject *args); -static PyObject *dlfl_remove_vertex(PyObject *self, PyObject *args); - -static PyObject *dlfl_create_face(PyObject *self, PyObject *args); - -/* Remove from then object's lists, then delete from memory */ -/* DANGEROUS!! - don't work in GUI mode, better to just use deleteEdge */ -//static PyObject *dlfl_destroy_vertex(PyObject *self, PyObject *args); -//static PyObject *dlfl_destroy_edge(PyObject *self, PyObject *args); -//static PyObject *dlfl_destroy_face(PyObject *self, PyObject *args); - -/* IDs */ -static PyObject *dlfl_faces(PyObject *self, PyObject *args); -static PyObject *dlfl_edges(PyObject *self, PyObject *args); -static PyObject *dlfl_verts(PyObject *self, PyObject *args); -static PyObject *dlfl_corners(PyObject *self, PyObject *args); - -//static PyObject *dlfl_boundary_walk(PyObject *self, PyObject *args); -static PyObject *dlfl_walk(PyObject *self, PyObject *args); -static PyObject *dlfl_corner_walk(PyObject *self, PyObject *args); -static PyObject *dlfl_next(PyObject *self, PyObject *args); -static PyObject *dlfl_prev(PyObject *self, PyObject *args); -static PyObject *dlfl_cornerFromEdgeFace(PyObject *self, PyObject *args); -static PyObject *dlfl_saveCorner(PyObject *self, PyObject *args); -static PyObject *dlfl_restoreCorner(PyObject *self, PyObject *args); -//static PyObject *dlfl_walk_vertices(PyObject *self, PyObject *args); -//static PyObject *dlfl_walk_edges(PyObject *self, PyObject *args); - -/* Info */ -static PyObject *dlfl_print_object(PyObject *self, PyObject *args); -static PyObject *dlfl_vertexInfo(PyObject *self, PyObject *args); -static PyObject *dlfl_vertexEdges(PyObject *self, PyObject *args); -static PyObject *dlfl_edgeInfo(PyObject *self, PyObject *args); -static PyObject *dlfl_faceInfo(PyObject *self, PyObject *args); -static PyObject *dlfl_cornerInfo(PyObject *self, PyObject *args); -static PyObject *dlfl_centroid(PyObject *self, PyObject *args); - -/* Auxiliary */ -static PyObject *dlfl_extrude(PyObject *self, PyObject *args); -static PyObject *dlfl_subdivide(PyObject *self, PyObject *args); -static PyObject *dlfl_subdivide_face(PyObject *self, PyObject *args); -static PyObject *dlfl_subdivide_faces(PyObject *self, PyObject *args); -static PyObject *dlfl_dual(PyObject *self, PyObject *args); -static PyObject *dlfl_connectEdges(PyObject *self, PyObject *args); -static PyObject *dlfl_connectCorners(PyObject *self, PyObject *args); -static PyObject *dlfl_connectFaces(PyObject *self, PyObject *args); -static PyObject *dlfl_addHandle(PyObject *self, PyObject *args); -static PyObject *dlfl_rindmodel(PyObject *self, PyObject *args); -static PyObject *dlfl_wireframe(PyObject *self, PyObject *args); -static PyObject *dlfl_column(PyObject *self, PyObject *args); -//static PyObject *dlfl_sierpinsky(PyObject *self, PyObject *args); -//static PyObject *dlfl_multiface(PyObject *self, PyObject *args); -//static PyObject *dlfl_menger(PyObject *self, PyObject *args); - -/* Transform */ -static PyObject *dlfl_translate(PyObject *self, PyObject *args); -static PyObject *dlfl_scale(PyObject *self, PyObject *args); -static PyObject *dlfl_freezeTrans(PyObject *self, PyObject *args); -static PyObject *dlfl_move(PyObject *self, PyObject *args); - -PyMODINIT_FUNC initdlfl(void); - -static PyMethodDef DLFLMethods[] = { - /* Object Management */ - {"load", dlfl_load_obj, METH_VARARGS, "load(string)"}, - {"save", dlfl_save_obj, METH_VARARGS, "save(string)"}, - // {"saveLG3d", dlfl_save_lg3d, METH_VARARGS, "saveLG3d(string)"}, - // {"saveSTL", dlfl_save_stl, METH_VARARGS, "saveSTL(string)"}, - {"kill", dlfl_kill_obj, METH_VARARGS, "kill(object id)"}, - {"switch", dlfl_switch_obj, METH_VARARGS, "switch(object id)"}, - //{"query", dlfl_query_obj, METH_VARARGS, "query()"}, - /* Core */ - {"insertEdge", dlfl_insert_edge, METH_VARARGS, "Inserts an Edge"}, - {"deleteEdge", dlfl_delete_edge, METH_VARARGS, "Delete an Edge."}, - {"collapseEdge", dlfl_collapse_edge, METH_VARARGS, "Collapse an Edge."}, - {"subdivideEdge", dlfl_subdivide_edge, METH_VARARGS, "Subdivide an Edge."}, - {"createVertex", dlfl_create_vertex, METH_VARARGS, "Create a vertex at (x,y,z)"}, - {"removeVertex", dlfl_remove_vertex, METH_VARARGS, "Remove a vertex by ID"}, - /*{"destroyVertex", dlfl_destroy_vertex, METH_VARARGS, "Remove a vertex from the object"}, - {"destroyEdge", dlfl_destroy_edge, METH_VARARGS, "Remove a edge from the object"}, - {"destroyFace", dlfl_destroy_face, METH_VARARGS, "Remove a face from the object"},*/ - {"createFace", dlfl_create_face, METH_VARARGS, "Create a face from a list of coordinates (specified as 3-tuples)"}, - /* IDs */ - {"faces", dlfl_faces, METH_VARARGS, "Grab all/selected the faces of the object"}, - {"edges", dlfl_edges, METH_VARARGS, "Grab all/selected the edges of the object"}, - {"verts", dlfl_verts, METH_VARARGS, "Grab all/selected the vertices of the object"}, - {"corners", dlfl_corners, METH_VARARGS, "Grab all/selected the face-vertices of the object"}, - {"walk", dlfl_walk, METH_VARARGS, "Walk around a face and get all of the vertices/edges in lists"}, - {"cornerWalk", dlfl_corner_walk, METH_VARARGS, "Walk around a face and get all of the corners in a list"}, - {"next", dlfl_next, METH_VARARGS, "Walk to next corner in Linked List"}, - {"prev", dlfl_prev, METH_VARARGS, "Walk to previous corner in Linked List"}, - {"getCorner", dlfl_cornerFromEdgeFace, METH_VARARGS, "Get a corner given an edge and a face pointer"}, - {"saveCorner", dlfl_saveCorner, METH_VARARGS, "Saves a corner by grabbing a corner ID. This can then be restored later. This is useful when performing operations like insertEdge that change face ids"}, - {"restoreCorner", dlfl_restoreCorner, METH_VARARGS, "Restores a corner from a corner ID. Returns (faceid,vertexid). This is useful when performing operations like insertEdge that change face ids"}, - /*{"walkVertices", dlfl_walk_vertices, METH_VARARGS, "walk_vertices(int)"}, - {"walkEdges", dlfl_walk_edges, METH_VARARGS, "walk_edges(int)"},*/ - /* Info */ - {"printObject", dlfl_print_object, METH_VARARGS, "Print object information"}, - {"vertexInfo", dlfl_vertexInfo, METH_VARARGS, "Position,Valence,etc into dictionary"}, - {"vertexEdges", dlfl_vertexEdges, METH_VARARGS, "List of Edges IDs"}, - {"edgeInfo", dlfl_edgeInfo, METH_VARARGS, "Midpoint,Verts,etc into dictionary"}, - {"faceInfo", dlfl_faceInfo, METH_VARARGS, "Centroid,Verts,etc into dictionary"}, - {"cornerInfo", dlfl_cornerInfo, METH_VARARGS, "Face,Vertex,Edge,etc into dictionary"}, - {"centroid", dlfl_centroid, METH_VARARGS, "Get centroid of vertices"}, - /* Auxiliary Below */ - {"extrude", dlfl_extrude, METH_VARARGS, "Extrude a face"}, - {"subdivide", dlfl_subdivide, METH_VARARGS, "Subdivide a mesh"}, - {"subdivideFace", dlfl_subdivide_face, METH_VARARGS, "Subdivide a Face"}, - {"subdivideFaces", dlfl_subdivide_faces, METH_VARARGS, "Subdivide a list of Faces"}, - {"dual", dlfl_dual, METH_VARARGS, "Dual of mesh"}, - {"connectEdges", dlfl_connectEdges, METH_VARARGS, "Connect an edge on one face with another"}, - {"connectCorners", dlfl_connectCorners, METH_VARARGS, "Connect two corners (i.e. Add Hole/Handle)"}, - {"connectFaces", dlfl_connectFaces, METH_VARARGS, "Connect two faces (i.e. Add Hole/Handle Closest Vertex)"}, - {"addHandle", dlfl_addHandle, METH_VARARGS, "Connect two faces (i.e. Add Hole/Handle Shape Interpolation). Choose either \"hermite\" or \"bezier\""}, - {"rind", dlfl_rindmodel, METH_VARARGS, "Rind modeling. Given a set of faces, create a crust"}, - {"wireframe", dlfl_wireframe, METH_VARARGS, "Creates a wireframe of the mesh"}, - {"column", dlfl_column, METH_VARARGS, "Creates a wireframe of the mesh via column modeling"}, - /* {"sierpinsky", dlfl_sierpinsky, METH_VARARGS, ""}, - {"multiface", dlfl_multiface, METH_VARARGS, ""}, - {"menger", dlfl_menger, METH_VARARGS, ""},*/ - /* Transform */ - {"translate", dlfl_translate, METH_VARARGS, "Translate Object"}, - {"scale", dlfl_scale, METH_VARARGS, "Scale Object"}, - {"freezeTrans", dlfl_freezeTrans, METH_VARARGS, "Freeze Transformations"}, - {"move", dlfl_move, METH_VARARGS, "Move Vertices"}, - {NULL, NULL, 0, NULL} /* Sentinel */ -}; - -static PyObject *DLFLError; -static bool usingGUI = false; - -// Pointer to the current object that we are editing -DLFL::DLFLObject *currObj = 0; -static DLFL::DLFLObjectPtrArray objArray; - -/** - * Load/Save Files - */ - -static PyObject * -dlfl_load_obj(PyObject *self, PyObject *args) -{ - char *filename; - int size; - int objId = -1; - - if( !PyArg_ParseTuple(args, "s#", &filename, &size) ) - return NULL; - - if( !usingGUI ) { - currObj = DLFL::readObjectFile( filename ); - objArray.push_back( currObj ); - - if( currObj ) - objId = objArray.size()-1; //currObj->getID(); - } - return Py_BuildValue("i", objId ); -} -/* -static PyObject * -dlfl_query_obj(PyObject *self, PyObject *args) -{ - return Py_BuildValue("i", usingGUI ); -} -*/ -static PyObject * -dlfl_kill_obj(PyObject *self, PyObject *args) -{ - int idx; - if( !PyArg_ParseTuple(args, "i", &idx) ) - return NULL; - - DLFL::DLFLObjectPtrArray::iterator it = objArray.begin(); - for( int i = 0; i < idx; i++) { it++; } - DLFL::DLFLObjectPtr obj = objArray[idx]; - - /*if( currObj == obj ) { - if( objArray.size() > 1 ) - currObj = objArray[objArray.size()-1]; - else - }*/ - - objArray.erase( it ); - currObj = NULL; - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -dlfl_switch_obj(PyObject *self, PyObject *args) -{ - int idx; - if( !PyArg_ParseTuple(args, "i", &idx) ) - return NULL; - - int objId = idx; - if( idx < 0 || idx >= objArray.size() ) { - objId = -1; - } else { - currObj = objArray[idx]; - } - return Py_BuildValue("i", objId ); -} - -static PyObject * -dlfl_save_obj(PyObject *self, PyObject *args) -{ - char *filename; int size; - if( !PyArg_ParseTuple(args, "s#", &filename, &size) ) - filename = NULL; - - bool wrote; - if( currObj ) - wrote = DLFL::writeObjectFile( currObj, filename ); - else - wrote = false; - - return Py_BuildValue( "b", wrote ); -} - -/** - * Insert/Delete/Collapse/Subdivide Edge - */ - -static PyObject * -dlfl_insert_edge(PyObject *self, PyObject *args) -{ - uint faceId1, faceId1b; - uint vertId1, vertId1b; - uint faceId2, faceId2b; - uint vertId2, vertId2b; - int edgeId = -1; - bool check = true; - - if( !PyArg_ParseTuple(args, "(ii)(ii)|b", &faceId1, &vertId1, &faceId2, &vertId2, &check) ) - return NULL; - - if( currObj ) { - edgeId = DLFL::insertEdge( currObj, - faceId1, vertId1, faceId2, vertId2, - faceId1b, vertId1b, faceId2b, vertId2b, - check, false ); - currObj->clearSelected( ); - } - - return Py_BuildValue("i,(ii)(ii)(ii)(ii)", edgeId, - faceId1, vertId1, faceId2, vertId2, - faceId1b, vertId1b, faceId2b, vertId2b ); -} - -static PyObject * -dlfl_delete_edge(PyObject *self, PyObject *args) -{ - int edgeId; - std::vector faceIds; - - if( !PyArg_ParseTuple(args, "i", &edgeId) ) - return NULL; - if( !currObj ) - return NULL; - - if( currObj ) { - faceIds = DLFL::deleteEdgeID( currObj, edgeId ); - currObj->clearSelected( ); - } - - PyObject *face; - PyObject *list = PyList_New(faceIds.size()); - for( int i = 0; i < (int)faceIds.size(); i++ ) { - face = Py_BuildValue("i", faceIds[i] ); - PyList_SetItem(list, i, face); - } - - Py_INCREF(list); - return list; -} - -static PyObject * -dlfl_collapse_edge(PyObject *self, PyObject *args) -{ - int edgeId; - - if( !PyArg_ParseTuple(args, "i", &edgeId) ) - return NULL; - if( !currObj ) - return NULL; - - int vertId = DLFL::collapseEdgeID( currObj, edgeId ); - currObj->clearSelected( ); - - return Py_BuildValue("i", vertId ); -} - -static PyObject * -dlfl_subdivide_edge(PyObject *self, PyObject *args) -{ - int edgeId, numDivs; - - if( !currObj ) - return NULL; - - if( PyArg_ParseTuple(args, "i", &edgeId) ) { - int vertId = DLFL::subdivideEdgeID( currObj, edgeId ); - currObj->clearSelected( ); - return Py_BuildValue("[i]", vertId ); - } else if( PyArg_ParseTuple(args, "ii", &numDivs, &edgeId ) ) { - vector verts = DLFL::subdivideEdgeID( currObj, numDivs, edgeId ); - PyObject *vert; - PyObject *list = PyList_New(verts.size()); - for( int i = 0; i < verts.size(); i++) { - vert = Py_BuildValue("i", verts[i]); - PyList_SetItem(list, i, vert); - } - currObj->clearSelected( ); - Py_INCREF(list); - return list; - } - - Py_INCREF(Py_None); - return Py_None; -} - - -static PyObject *dlfl_create_vertex(PyObject *self, PyObject *args) { - double x, y, z; - - if( !PyArg_ParseTuple(args, "(ddd)", &x, &y, &z) ) - return NULL; - - if( !usingGUI ) { - if( currObj == NULL ) - currObj = new DLFL::DLFLObject; - } - //uint *fvid = DLFL::createVertex( x, y, z, currObj ); - DLFL::DLFLFaceVertexPtr fvp = currObj->createPointSphere(Vector3d(x,y,z)); - uint fid = fvp->getFaceID();//fvid[0]; - uint vid = fvp->getVertexID();//fvid[1]; - //delete fvid; fvid = 0; - //uint oid = currObj->getID(); - return Py_BuildValue("(ii)", fid, vid ); -} - -static PyObject *dlfl_remove_vertex(PyObject *self, PyObject *args) { - uint vid, fid; - if( !PyArg_ParseTuple(args, "(ii)", &vid, &fid) ) - return NULL; - DLFL::removeVertex( currObj, vid, fid ); - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_create_face(PyObject *self, PyObject *args) { - PyObject *list, *tuple, *coord; - bool bothNew = false; - if( !PyArg_ParseTuple(args, "O!|b", &PyList_Type, &list, &bothNew) ) - return NULL; - int size = PyList_Size(list); - if( size < 0 ) - return NULL; - - Vector3d vec; - std::vector varray; - for( int i = 0; i < size; i++ ) { - tuple = PyList_GetItem(list, i); - if(!PyTuple_Check(tuple)) continue; - if(PyTuple_Size(tuple) != 3) continue; - for( int j = 0; j < 3; j++ ) { - coord = PyTuple_GetItem(tuple, j); - if( !PyFloat_Check(coord) ) break; - vec[j] = PyFloat_AsDouble( coord ); - } - varray.push_back(vec); - } - - DLFL::DLFLFacePtrArray fpa; - fpa = currObj->createFace( varray, NULL, bothNew ); - - if( !bothNew ) - currObj->lastFace()->setType(DLFL::FTNew); - - if( fpa.size() == 2 ) { - return Py_BuildValue( "ii", fpa[0]->getID(), fpa[1]->getID() ); - } - - Py_INCREF(Py_None); - return Py_None; -} - -/* Mesh Identification Helpers (Verts,Edges,Faces, FaceVertices ) */ - -static PyObject * -dlfl_faces(PyObject *self, PyObject *args) -{ - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - bool selected = false; - if( usingGUI ) { - selected = true; - if( !PyArg_ParseTuple(args, "|b", &selected ) ) - return NULL; - } - - PyObject *flist=0, *face=0; - if(selected) { - DLFL::DLFLFacePtrArray fpa = currObj->sel_fptr_array; - flist = PyList_New(fpa.size()); - for( int i = 0; i < (int)fpa.size(); i++ ) { - face = Py_BuildValue("i", fpa[i]->getID()); - PyList_SetItem(flist, i, face); - } - } else { - DLFL::DLFLFacePtrList fpl = currObj->getFaceList(); - DLFL::DLFLFacePtrList::iterator it; int i; - flist = PyList_New(fpl.size()); - for( i = 0, it = fpl.begin(); it != fpl.end(); i++, it++ ) { - face = Py_BuildValue("i", (*it)->getID()); - PyList_SetItem(flist, i, face); - } - } - Py_INCREF(flist); - return flist; -} - -static PyObject * -dlfl_edges(PyObject *self, PyObject *args) -{ - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - bool selected = false; - if( usingGUI ) { - selected = true; - if( !PyArg_ParseTuple(args, "|b", &selected ) ) - return NULL; - } - - PyObject *elist=0, *edge=0; - if(selected) { - DLFL::DLFLEdgePtrArray epa = currObj->sel_eptr_array; - elist = PyList_New(epa.size()); - for( int i = 0; i < (int)epa.size(); i++ ) { - edge = Py_BuildValue("i", epa[i]->getID()); - PyList_SetItem(elist, i, edge); - } - } else { - DLFL::DLFLEdgePtrList epl = currObj->getEdgeList(); - DLFL::DLFLEdgePtrList::iterator it; int i; - elist = PyList_New(epl.size()); - for( i = 0, it = epl.begin(); it != epl.end(); i++, it++ ) { - edge = Py_BuildValue("i", (*it)->getID()); - PyList_SetItem(elist, i, edge); - } - } - Py_INCREF(elist); - return elist; -} - -static PyObject * -dlfl_verts(PyObject *self, PyObject *args) -{ - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - bool selected = false; - if( usingGUI ) { - selected = true; - if( !PyArg_ParseTuple(args, "|b", &selected ) ) - return NULL; - } - - PyObject *vlist=0, *vert=0; - if(selected) { - DLFL::DLFLVertexPtrArray vpa = currObj->sel_vptr_array; - vlist = PyList_New(vpa.size()); - for( int i = 0; i < (int)vpa.size(); i++ ) { - vert = Py_BuildValue("i", vpa[i]->getID()); - PyList_SetItem(vlist, i, vert); - } - } else { - DLFL::DLFLVertexPtrList vpl = currObj->getVertexList(); - DLFL::DLFLVertexPtrList::iterator it; int i; - vlist = PyList_New(vpl.size()); - for( i = 0, it = vpl.begin(); it != vpl.end(); i++, it++ ) { - vert = Py_BuildValue("i", (*it)->getID()); - PyList_SetItem(vlist, i, vert); - } - } - Py_INCREF(vlist); - return vlist; -} - -static PyObject * -dlfl_corners(PyObject *self, PyObject *args) -{ - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - bool selected = false; - if( usingGUI ) { - selected = true; - if( !PyArg_ParseTuple(args, "|b", &selected ) ) - return NULL; - } - - PyObject *fvlist=0, *fvert=0; - if(selected) { - CornerPtrArray fvpa = currObj->sel_fvptr_array; - fvlist = PyList_New(fvpa.size()); - for( int i = 0; i < (int)fvpa.size(); i++ ) { - fvert = Py_BuildValue("(ii)", fvpa[i]->getFaceID(), fvpa[i]->getVertexID() ); - PyList_SetItem(fvlist, i, fvert); - } - } else { - CornerPtrArray fvpa; - DLFL::DLFLFacePtrList fpl = currObj->getFaceList(); - DLFL::DLFLFacePtrList::iterator it; int i; - for( i = 0, it = fpl.begin(); it != fpl.end(); i++, it++ ) { - CornerPtr head = (*it)->front(); - CornerPtr curr = head; - do { - fvpa.push_back(curr); - DLFL::advance(curr); - } while(curr != head); - } - fvlist = PyList_New(fvpa.size()); - for( int i = 0; i < (int)fvpa.size(); i++ ) { - fvert = Py_BuildValue("(ii)", fvpa[i]->getFaceID(), fvpa[i]->getVertexID() ); - PyList_SetItem(fvlist, i, fvert); - } - } - Py_INCREF(fvlist); - return fvlist; -} -/* -static PyObject * -dlfl_boundary_walk(PyObject *self, PyObject *args) { - int faceId; - - if( !currObj ) - return NULL; - if( !PyArg_ParseTuple(args, "i", &faceId) ) - return NULL; - currObj->boundaryWalkID( faceId ); - - Py_INCREF(Py_None); - return Py_None; -} -*/ -static PyObject *dlfl_corner_walk(PyObject *self, PyObject *args) { - int faceId; - - vector verts; // output: verts walked - vector edges; // not using here, just to pass - PyObject *list; // py output: corners walked - PyObject *corner; // for looping - - if( !currObj ) - return NULL; - - if( !PyArg_ParseTuple(args, "i", &faceId) ) - return NULL; - currObj->walk( faceId, verts, edges ); - - list = PyList_New(verts.size()); - for( int i = 0; i < verts.size(); i++) { - corner = Py_BuildValue("(ii)", faceId, verts[i]); - PyList_SetItem(list, i, corner); - } - Py_INCREF(list); - return list; -} - -static PyObject *dlfl_walk(PyObject *self, PyObject *args) { - int faceId; // input: face to walk - - vector verts; // output: verts walked - vector edges; // output: edges walked - PyObject *vlist; // py output: verts walked - PyObject *elist; // py output: edges walked - - if( !currObj ) - return NULL; - - if( !PyArg_ParseTuple(args, "i", &faceId) ) - return NULL; - currObj->walk( faceId, verts, edges ); - - vlist = PyList_New(verts.size()); - for( int i = 0; i < verts.size(); i++ ) { - PyList_SetItem(vlist, i, PyInt_FromLong(verts[i])); - } - elist = PyList_New(edges.size()); - for( int i = 0; i < edges.size(); i++) { - PyList_SetItem(elist, i, PyInt_FromLong(edges[i])); - } - - PyObject *ret = Py_BuildValue("OO", vlist, elist); - Py_DECREF(vlist); - Py_DECREF(elist); - return ret; -} - -static PyObject *dlfl_next(PyObject *self, PyObject *args) { - int faceId, vertId; - if( !PyArg_ParseTuple(args, "(ii)", &faceId, &vertId) ) - return NULL; - if( !currObj ) - return NULL; - DLFL::DLFLFacePtr fp1 = currObj->findFace(faceId); - if( !fp1 ) return Py_BuildValue("(ii)", -1, -1); - DLFL::DLFLFaceVertexPtr fvp1 = fp1->findFaceVertex(vertId); - if( !fvp1 ) return Py_BuildValue("(ii)", -1, -1); - DLFL::DLFLFaceVertexPtr fvp2 = fvp1->next(); - if( !fvp2 ) return Py_BuildValue("(ii)", -1, -1); - faceId = fvp2->getFaceID(); - vertId = fvp2->getVertexID(); - return Py_BuildValue("(ii)", faceId, vertId ); -} - -static PyObject *dlfl_prev(PyObject *self, PyObject *args) { - int faceId, vertId; - if( !PyArg_ParseTuple(args, "(ii)", &faceId, &vertId) ) - return NULL; - if( !currObj ) - return NULL; - DLFL::DLFLFacePtr fp1 = currObj->findFace(faceId); - if( !fp1 ) return Py_BuildValue("(ii)", -1, -1); - DLFL::DLFLFaceVertexPtr fvp1 = fp1->findFaceVertex(vertId); - if( !fvp1 ) return Py_BuildValue("(ii)", -1, -1); - DLFL::DLFLFaceVertexPtr fvp2 = fvp1->prev(); - if( !fvp2 ) return Py_BuildValue("(ii)", -1, -1); - faceId = fvp2->getFaceID(); - vertId = fvp2->getVertexID(); - return Py_BuildValue("(ii)", faceId, vertId ); -} - -static PyObject *dlfl_cornerFromEdgeFace(PyObject *self, PyObject *args) { - int faceId, edgeId, vertId; - if( !PyArg_ParseTuple(args, "ii", &edgeId, &faceId) ) - return NULL; - if( !currObj ) - return NULL; - DLFL::DLFLEdgePtr ep = currObj->findEdge(edgeId); - DLFL::DLFLFacePtr fp = currObj->findFace(faceId); - if( !ep || !fp ) return Py_BuildValue("(ii)", -1, -1 ); - DLFL::DLFLFaceVertexPtr fvp = ep->getFaceVertexPtr(fp); - if( !fvp ) return Py_BuildValue("(ii)", -1, -1 ); - faceId = fvp->getFaceID(); - vertId = fvp->getVertexID(); - return Py_BuildValue("(ii)", faceId, vertId ); -} - -static PyObject *dlfl_saveCorner(PyObject *self, PyObject *args) { - int faceId, vertId; - if( !PyArg_ParseTuple(args, "(ii)", &faceId, &vertId) ) - return NULL; - if( !currObj ) - return NULL; - DLFL::DLFLFacePtr fp = currObj->findFace(faceId); - if( !fp ) return Py_BuildValue("i", -1); - DLFL::DLFLFaceVertexPtr fvp = fp->findFaceVertex(vertId); - if( !fvp ) return Py_BuildValue("i", -1 ); - int cornerID = fvp->getID( ); - return Py_BuildValue("i", cornerID ); -} - -static PyObject *dlfl_restoreCorner(PyObject *self, PyObject *args) { - int cornerId, faceId, vertId; - if( !PyArg_ParseTuple(args, "i", &cornerId) ) - return NULL; - if( !currObj ) - return NULL; - DLFL::DLFLFaceVertexPtr fvp = currObj->findFaceVertex(cornerId); - if( !fvp ) return Py_BuildValue("(ii)", -1, -1 ); - faceId = fvp->getFaceID(); - vertId = fvp->getVertexID(); - return Py_BuildValue("(ii)", faceId, vertId ); -} - - -static PyObject * -dlfl_print_object(PyObject *self, PyObject *args) { - if( !currObj ) - return NULL; - - currObj->print(); - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_vertexInfo(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - int id; - if( !PyArg_ParseTuple(args, "i", &id) ) - return NULL; - DLFL::DLFLVertexPtr vp = currObj->findVertex(id); - - if( !vp ) { - Py_INCREF(Py_None); - return Py_None; - } - - const double *coords = (vp->getCoords()).getCArray(); - int valence = vp->valence(); - DLFL::DLFLVertexType vt = vp->getType(); - char* type = new char[10]; - - switch( vt ) { - case 0: - strcpy(type, "normal"); - break; - case 1: - strcpy(type, "newFace"); - break; - case 2: - strcpy(type, "newEdge"); - break; - case 3: - strcpy(type, "new"); - break; - case 4 : - strcpy(type, "old"); - break; - case 5: - strcpy(type, "newSub"); - break; - case 6 : - strcpy(type, "wireIn"); - break; - case 7 : - strcpy(type, "wire"); - break; - case 8 : - strcpy(type, "wireSub"); - break; - case 9 : - strcpy(type, "wireSubIn"); - break; - default : - strcpy(type, "normal"); - } - - PyObject *info = Py_BuildValue("{s:i,s:s,s:(ddd),s:i}", - "id", id, - "type", type, - "coords", coords[0], coords[1], coords[2], - "valence", valence); - - delete [] type; - return info; -} - -static PyObject *dlfl_vertexEdges(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - int id; - if( !PyArg_ParseTuple(args, "i", &id) ) - return NULL; - DLFL::DLFLVertexPtr vp = currObj->findVertex(id); - - if( !vp ) { - Py_INCREF(Py_None); - return Py_None; - } - - PyObject *elist=0, *edge=0; - DLFL::DLFLEdgePtrArray epa; - vp->getEdges(epa); - elist = PyList_New(epa.size()); - for( int i = 0; i < (int)epa.size(); i++ ) { - edge = Py_BuildValue("i", epa[i]->getID()); - PyList_SetItem(elist, i, edge); - } - Py_INCREF(elist); - return elist; -} - -static PyObject *dlfl_edgeInfo(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - int id; - if( !PyArg_ParseTuple(args, "i", &id) ) - return NULL; - DLFL::DLFLEdgePtr ep = currObj->findEdge(id); - if( !ep ) { - Py_INCREF(Py_None); - return Py_None; - } - const double *midpoint = (ep->getMidPoint()).getCArray(); - const double *normal = (ep->getNormal()).getCArray(); - - CornerPtr fvpa, fvpb; - ep->getFaceVertexPointers( fvpa, fvpb ); - int fa = fvpa->getFaceID(); - int va = fvpa->getVertexID(); - int fd = fvpb->getFaceID(); - int vd = fvpa->getVertexID(); - - fvpa = fvpa->next(); - fvpb = fvpb->next(); - - int fc = fvpa->getFaceID(); - int vc = fvpa->getVertexID(); - int fb = fvpb->getFaceID(); - int vb = fvpa->getVertexID(); - - double length = ep->length(); - - DLFL::DLFLEdgeType et = ep->getType(); - char* type = new char[10]; - switch( et ) { - case 0: - strcpy(type, "normal"); - break; - case 1: - strcpy(type, "new"); - break; - case 2: - strcpy(type, "collapse"); - break; - case 3: - strcpy(type, "collapseAux"); - break; - case 4 : - strcpy(type, "original"); - break; - case 5: - strcpy(type, "convexHull"); - break; - case 6 : - strcpy(type, "noDelete"); - break; - case 7 : - strcpy(type, "delete"); - break; - default : - strcpy(type, "normal"); - } - - PyObject *info = Py_BuildValue("{s:i,s:s,s:(ddd),s:(ddd),s:(ii),s:(ii),s:(ii),s:(ii),s:d}", - "id", id, - "type", type, - "midpoint", midpoint[0], midpoint[1], midpoint[2], - "normal", normal[0], normal[1], normal[2], - "cornerA", fa, va, - "cornerB", fb, vb, - "cornerC", fc, vc, - "cornerD", fd, vd, - "length", length ); - delete [] type; - return info; -} - -static PyObject *dlfl_faceInfo(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - int id; - if( !PyArg_ParseTuple(args, "i", &id) ) - return NULL; - DLFL::DLFLFacePtr fp = currObj->findFace(id); - if( !fp ) { - Py_INCREF(Py_None); - return Py_None; - } - DLFL::DLFLFaceType ft = fp->getType(); - const double *centroid = (fp->geomCentroid()).getCArray(); - const double *normal = (fp->getNormal(true)).getCArray(); - - char* type = new char[10]; - switch( ft ) { - case 0: - strcpy(type, "normal"); - break; - case 1: - strcpy(type, "new"); - break; - case 2: - strcpy(type, "hole"); - break; - case 3: - strcpy(type, "holeIn"); - break; - case 4 : - strcpy(type, "wire"); - break; - default : - strcpy(type, "normal"); - } - - PyObject *info = Py_BuildValue("{s:i,s:s,s:(ddd),s:(ddd),s:i}", - "id", id, - "type", type, - "centroid", centroid[0], centroid[1], centroid[2], - "normal", normal[0], normal[1], normal[2], - "size", fp->size()); - delete [] type; - return info; -} - -static PyObject *dlfl_cornerInfo(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } else { - int fid, vid; - if( !PyArg_ParseTuple(args, "(ii)", &fid, &vid) ) - return NULL; - DLFL::DLFLFacePtr fp = currObj->findFace(fid); - if( !fp ) { - Py_INCREF(Py_None); - return Py_None; - } - DLFL::DLFLFaceVertexPtr fvp = fp->findFaceVertex(vid); - if( !fvp ) { - Py_INCREF(Py_None); - return Py_None; - } - int eid = fvp->getEdgeID(); - - DLFL::DLFLFaceVertexType fvt = fvp->getType(); - char* type = new char[10]; - switch( fvt ) { - case 0: - strcpy(type, "normal"); - break; - case 1: - strcpy(type, "new"); - break; - case 2: - strcpy(type, "wire"); - break; - default : - strcpy(type, "normal"); - } - - PyObject *info = Py_BuildValue("{s:i,s:i,s:i,s:s}", - "face", fid, - "vertex", vid, - "edge", eid, - "type", type ); - delete [] type; - return info; - } -} - -static PyObject *dlfl_centroid(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } else { - Py_INCREF(Py_None); - return Py_None; - } -} - - /* Auxiliary */ - -static PyObject * -dlfl_extrude(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - const char* choices[] = { "doo-sabin", - "dodeca", - "icosa", - "octa", - "stellate", - "double-stellate", - "cubical" }; - - char* extrudeType; - int size, faceid; - double dist = 2.0; int num = 1; double rotTwist = 0.0; double sf = 1.0; bool boolean = false; - if( !PyArg_ParseTuple(args, "s#i|diddb", &extrudeType, &size, &faceid, - &dist, &num, &rotTwist, &sf, &boolean ) ) - return NULL; - - int choice = -1; - for(int i = 0; i < 7; i++ ) { - if( strncmp(extrudeType,choices[i],size) == 0 ) { - choice = i; - break; - } - } - - DLFL::DLFLFacePtr fp = currObj->findFace(faceid); - if( !fp ) return Py_BuildValue("i", -1 ); - DLFL::DLFLFacePtr ofp = 0; - int outFaceID = -1; - - if( choice != -1 && fp != NULL ) { - switch( choice ) { - case 0 : // doo-sabin - ofp = DLFL::extrudeFaceDS( currObj, fp, dist, num, rotTwist, sf ); - break; - case 1 : // dodeca - ofp = DLFL::extrudeFaceDodeca( currObj, fp, dist, num, rotTwist, sf, boolean ); - break; - case 2 : // icosa - ofp = DLFL::extrudeFaceIcosa( currObj, fp, dist, num, rotTwist, sf ); - break; - case 3 : // octa a.k.a. extrude dual face - ofp = DLFL::extrudeDualFace( currObj, fp, dist, num, rotTwist, sf, boolean ); - break; - case 4 : // stellate - DLFL::stellateFace( currObj, fp, dist ); - break; - case 5 : // double-stellate - DLFL::doubleStellateFace( currObj, fp, dist ); - break; - case 6 : // cubical - default : // cubical - ofp = DLFL::extrudeFace( currObj, fp, dist, num, rotTwist, sf ); - } - - if( ofp ) - outFaceID = ofp->getID(); - - currObj->clearSelected( ); - - return Py_BuildValue("i", outFaceID ); - } - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -dlfl_subdivide(PyObject *self, PyObject *args) { - if( !currObj ) { - Py_INCREF(Py_None); - return Py_None; - } - - int choiceSize = 26; - const char* choices[] = { "loop", - "checker", - "simplest", - "vertex-cut", - "pentagon", - "pentagon-preserve", - "honeycomb", - "doo-sabin", - "doo-sabin-bc", - "doo-sabin-bc-new", - "corner-cut", - "modified-corner-cut", - "root4", - "catmull-clark", - "star", - "sqrt3", - "fractal", - "stellate", - "double-stellate", - "dome", - "dual-12.6.4", - "loop-style", - "linear-vertex", - "allfaces", - "root3"}; - - char* subdivType; - int size; - double attrb1 = 0, attrb2 = 0; - bool battrb1 = false, battrb2 = false; - int argc = PyArg_ParseTuple(args, "s#|ddbb", &subdivType, &size, &attrb1, &attrb2 ); - if( !argc ) - return NULL; - if( argc >= 3 ) - battrb1 = true; - if( argc >= 4) - battrb2 = true; - - int choice = -1; - for(int i = 0; i < choiceSize; i++ ) { - if( strncmp(subdivType,choices[i],size) == 0 ) { - choice = i; - break; - } - } - - if( choice != -1 ) { - switch( choice ) { - case 0 : // loop - DLFL::loopSubdivide( currObj ); - break; - case 1 : // checker - if( battrb1 ) DLFL::checkerBoardRemeshing( currObj, attrb1 ); - else DLFL::checkerBoardRemeshing( currObj ); - break; - case 2 : // simplest - DLFL::simplestSubdivide( currObj ); - break; - case 3 : // vertex-cut - if( battrb1 ) DLFL::vertexCuttingSubdivide( currObj, attrb1 ); - else DLFL::vertexCuttingSubdivide( currObj ); - break; - case 4 : // pentagon - DLFL::pentagonalSubdivide( currObj, attrb1 ); // since default is 0 don't need if...else - break; - case 5 : // dual-pentagon - if( battrb1 ) DLFL::pentagonalSubdivide2( currObj, attrb1 ); - else DLFL::pentagonalSubdivide2( currObj ); - break; - case 6 : // honeycomb - DLFL::honeycombSubdivide( currObj ); - break; - case 7 : // doo-sabin - if( battrb1 ) DLFL::dooSabinSubdivide( currObj, (bool)attrb1 ); - else DLFL::dooSabinSubdivide( currObj ); - break; - case 8 : // doo-sabin-bc - if( battrb1 ) DLFL::dooSabinSubdivideBC( currObj, (bool)attrb1 ); - else DLFL::dooSabinSubdivideBC( currObj ); - break; - case 9 : // doo-sabin-bc-new - DLFL::dooSabinSubdivideBCNew( currObj, attrb1, attrb2 ); // no defaults - break; - case 10 : // corner-cut - DLFL::cornerCuttingSubdivide( currObj, attrb1 ); - break; - case 11 : // modified-corner-cut - DLFL::modifiedCornerCuttingSubdivide( currObj, attrb1 ); - break; - case 12 : // root4 - if( battrb1 && battrb2 ) DLFL::root4Subdivide( currObj, attrb1, attrb2 ); - else if( battrb1 ) DLFL::root4Subdivide( currObj, attrb1 ); - else DLFL::root4Subdivide( currObj ); - break; - case 13 : // catmull-clark - DLFL::catmullClarkSubdivide( currObj ); - break; - case 14 : // star - if( battrb1 ) DLFL::starSubdivide( currObj, attrb1 ); - else DLFL::starSubdivide( currObj ); - break; - case 15 : // sqrt3 - DLFL::sqrt3Subdivide( currObj ); - break; - case 16 : // fractal - if( battrb1 ) DLFL::fractalSubdivide( currObj, attrb1 ); - else DLFL::fractalSubdivide( currObj ); - break; - case 17 : // stellate - DLFL::stellateSubdivide( currObj ); - break; - case 18 : // double-stellate - DLFL::twostellateSubdivide( currObj, attrb1, attrb2 ); // no defaults - break; - case 19 : // dome - DLFL::domeSubdivide( currObj, attrb1, attrb2 ); // no defaults - break; - case 20 : // dual-12.6.4 - DLFL::dual1264Subdivide( currObj, attrb1 ); // no defaults - break; - case 21 : // loop style - DLFL::loopStyleSubdivide( currObj, attrb1 ); - break; - case 24 : // root3 - dave - DLFL::createDual(currObj, true); // Use accurate method - DLFL::honeycombSubdivide(currObj); - DLFL::createDual(currObj,true); // Use accurate method - break; - case 22 : // linear-vertex - case 23 : // allfaces - default : // allfaces - if( battrb1 ) DLFL::subdivideAllFaces( currObj, (bool)attrb1 ); - else DLFL::subdivideAllFaces( currObj ); - } - } - Py_INCREF(Py_None); - return Py_None; -} - - -static PyObject *dlfl_subdivide_face(PyObject *self, PyObject *args) { - int fid; - bool usequads = true; - - if( !PyArg_ParseTuple(args, "i|b", &fid, &usequads) ) - return NULL; - - if( currObj ) { - DLFL::DLFLFacePtr fp = currObj->findFace(fid); - if(fp) { - DLFL::subdivideFace( currObj, fp, usequads ); - currObj->clearSelected( ); - } - } - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_subdivide_faces(PyObject *self, PyObject *args) { - bool usequads = true; - - DLFL::DLFLFacePtrArray faces; - DLFL::DLFLFacePtrArray::iterator it; - - PyObject *list, *faceid; - - if( !PyArg_ParseTuple( args, "O!|b", &PyList_Type, &list, &usequads ) ) - return NULL; - - int size = PyList_Size(list); - - if( currObj && size > 0 ) { - - for( int i = 0; i < size; i++ ) { - faceid = PyList_GetItem(list,i); - if( !PyInt_Check(faceid) ) break; - uint id = (uint) PyInt_AsLong(faceid); - DLFL::DLFLFacePtr fp = currObj->findFace( id ); - if(fp) { faces.push_back(fp); } - } - - DLFL::subdivideFaces( currObj, faces, usequads ); - } - - Py_INCREF(Py_None); - return Py_None; -} - -static -PyObject *dlfl_dual(PyObject *self, PyObject *args) -{ - bool accurate = false; - PyArg_ParseTuple(args, "|b", &accurate); - if( currObj ) { - DLFL::createDual( currObj, accurate ); - currObj->clearSelected( ); - } - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_connectEdges(PyObject *self, PyObject *args) { - int edgeId1, edgeId2; - int faceId1, faceId2; - bool loopCheck = false; - - if( !PyArg_ParseTuple(args, "(ii)(ii)|b", &edgeId1, &faceId1, &edgeId2, &faceId2, &loopCheck ) ) - return NULL; - - DLFL::DLFLEdgePtr e1 = currObj->findEdge(edgeId1); - DLFL::DLFLEdgePtr e2 = currObj->findEdge(edgeId2); - DLFL::DLFLFacePtr f1 = currObj->findFace(faceId1); - DLFL::DLFLFacePtr f2 = currObj->findFace(faceId2); - - if( e1 && e2 && f1 && f2 ) { - - if( loopCheck ) - DLFL::connectEdges( currObj, e1, f1, e2, f2 ); - else - DLFL::connectEdgesWithoutLoopCheck( currObj, e1, f1, e2, f2 ); - } - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_connectCorners(PyObject *self, PyObject *args) { - int v1, v2; - int f1, f2; - int numsegs = 1; - int maxconn = -1; - - DLFL::DLFLFacePtr fp1, fp2; - DLFL::DLFLFaceVertexPtr fvp1, fvp2; - char* dual = 0; int size; - - if( !PyArg_ParseTuple( args, "(ii)(ii)|iis#", &f1, &v1, &f2, &v2, &numsegs, &maxconn, dual, &size) ) - return NULL; - - if( currObj ) { - fp1 = currObj->findFace(f1); - fp2 = currObj->findFace(f2); - if( fp1 && fp2 ) { - fvp1 = fp1->findFaceVertex(v1); - fvp2 = fp2->findFaceVertex(v2); - if( fvp1 && fvp2 ) { - if( dual && strncmp( dual, "dual", size) == 0 ) { - DLFL::dualConnectFaces( currObj, fvp1, fvp2 ); - } else { - DLFL::connectFaces( currObj, fvp1, fvp2, numsegs, maxconn); - } - } - } - } - - Py_INCREF( Py_None ); - return Py_None; -} - -static PyObject *dlfl_connectFaces(PyObject *self, PyObject *args) { - int f1, f2; - int numsegs = 1; - int maxconn = -1; - - DLFL::DLFLFacePtr fp1, fp2; - - if( !PyArg_ParseTuple( args, "ii|ii", &f1, &f2, &numsegs, &maxconn ) ) - return NULL; - - if( currObj ) { - fp1 = currObj->findFace(f1); - fp2 = currObj->findFace(f2); - if( fp1 && fp2 ) { - DLFL::connectFaces( currObj, fp1, fp2, numsegs );//, maxconn ); - } - } - - Py_INCREF( Py_None ); - return Py_None; -} - -static PyObject *dlfl_addHandle(PyObject *self, PyObject *args) { - char *type; - int size; - int f1, f2, v1, v2; - int numsegs, maxconn=-1, numtwists=0; - double wt1, wt2; // weights - - DLFL::DLFLFacePtr fp1, fp2; - DLFL::DLFLFaceVertexPtr fvp1, fvp2; - - if( !PyArg_ParseTuple( args, "s#(ii)(ii)i|ddii", type, &size, &f1, &v1, &f2, &v2, &numsegs, &wt1, &wt2, &maxconn, &numtwists ) ) - return NULL; - - fp1 = currObj->findFace(f1); - fp2 = currObj->findFace(f2); - if( fp1 && fp2 ) { - fvp1 = fp1->findFaceVertex(v1); - fvp2 = fp2->findFaceVertex(v2); - if( fvp1 && fvp2 ) { - - if( strncmp( type, "hermite", size) == 0 ) { - DLFL::hermiteConnectFaces( currObj, fvp1, fvp2, numsegs, wt1, wt2, maxconn, numtwists ); - } else if( strncmp( type, "bezier", size) == 0 ) { - DLFL::bezierConnectFaces( currObj, fvp1, fvp2, numsegs, wt1, wt2 ); - } - } - } - Py_INCREF( Py_None ); - return Py_None; -} - -static PyObject *dlfl_rindmodel(PyObject *self, PyObject *args) { - bool useScaling; - double thickScale; // thickness if useScaling is false, else scaleFactor - bool uniform = true; - - DLFL::DLFLFacePtrArray faces; - DLFL::DLFLFacePtrArray::iterator it; - - PyObject *list, *faceid; - - if( !PyArg_ParseTuple( args, "O!bd|d", &PyList_Type, &list, &useScaling, &thickScale, &uniform ) ) - return NULL; - - int size = PyList_Size(list); - - if( currObj && size > 0 ) { - - for( int i = 0; i < size; i++ ) { - faceid = PyList_GetItem(list,i); - if( !PyInt_Check(faceid) ) break; - uint id = (uint) PyInt_AsLong(faceid); - DLFL::DLFLFacePtr fp = currObj->findFace( id ); - if(fp) { faces.push_back(fp); } - } - - if( useScaling ) { - DLFL::createCrustWithScaling( currObj, thickScale ); - } else { - DLFL::createCrust( currObj, thickScale, uniform ); - } - - for( it = faces.begin(); it != faces.end(); it++ ) - (*it)->setType(DLFL::FTHole); - DLFL::punchHoles(currObj); - } - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_wireframe(PyObject *self, PyObject *args) { - double thickness = 0.1; - bool split = true; - - if( !PyArg_ParseTuple(args, "d|b", &thickness, &split) ) - return NULL; - - if( currObj && thickness != 0 ) - DLFL::makeWireframe( currObj, thickness, split); - - Py_INCREF( Py_None ); - return Py_None; -} - -static PyObject *dlfl_column(PyObject *self, PyObject *args) { - double thickness; - int segments; - - if( !PyArg_ParseTuple(args, "di", &thickness, &segments) ) - return NULL; - - if( currObj ) - DLFL::makeWireframeWithColumns( currObj, thickness, segments ); - - Py_INCREF( Py_None ); - return Py_None; -} - -//static PyObject *dlfl_sierpinsky(PyObject *self, PyObject *args) { return NULL; } - -//static PyObject *dlfl_multiface(PyObject *self, PyObject *args) { return NULL; } - -//static PyObject *dlfl_menger(PyObject *self, PyObject *args) { return NULL; } - -static PyObject *dlfl_translate(PyObject *self, PyObject *args) { - double x,y,z; - bool relative = true; - if( !PyArg_ParseTuple(args, "(ddd)|b", &x, &y, &z, &relative) ) - return NULL; - if( currObj ) { - Vector3d pos(x,y,z); - if( relative ) - pos = currObj->position + pos; - currObj->position = pos; - currObj->transform(); - } - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_scale(PyObject *self, PyObject *args) { - double x,y,z; - if( !PyArg_ParseTuple(args, "(ddd)", &x, &y, &z) ) - return NULL; - if( currObj ) { - Vector3d scale(x,y,z); - currObj->scale_factor = scale; - currObj->transform(); - } - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_freezeTrans(PyObject *self, PyObject *args) { - if( currObj ) { - currObj->freezeTransformations(); - } - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject *dlfl_move(PyObject *self, PyObject *args) { - PyObject *list, *id; - bool relative = true; - double x,y,z; - if( !PyArg_ParseTuple(args, "O!(ddd)|b", &PyList_Type, &list, &x, &y, &z, &relative) ) - return NULL; - int size = PyList_Size(list); - if( size < 0 ) - return NULL; - - if( currObj ) { - Vector3d vec = Vector3d(x,y,z); - DLFL::DLFLVertexPtrArray vparray; - for( int i = 0; i < size; i++ ) { - id = PyList_GetItem(list, i); - if( !PyInt_Check(id) ) break; - int vid = PyInt_AsLong( id ); - DLFL::DLFLVertexPtr vp = currObj->findVertex(vid); - if( vp ) - vparray.push_back(vp); - } - - for( int i = 0; i < (int)vparray.size(); i++ ) { - if( relative ) { - (vparray[i])->coords += vec; - } else { - (vparray[i])->coords = vec; - } - } - } - Py_INCREF(Py_None); - return Py_None; -} - -/* C API Stuff */ -//static void **PyDLFL_API; - -#define NUM_C_API_FUNCS 2 - -static void -PyDLFL_UsingGUI( bool ugui ) -{ - usingGUI = true; -} - -static void -PyDLFL_PassObject( DLFL::DLFLObject* obj ) -{ - currObj = obj; -} - -/** - * Initialize - */ - -PyMODINIT_FUNC initdlfl(void) -{ - PyObject *dlfl; - static void *PyDLFL_API[NUM_C_API_FUNCS]; - - dlfl = Py_InitModule("dlfl", DLFLMethods); - - DLFLError = PyErr_NewException("dlfl.error", NULL, NULL); - Py_INCREF(DLFLError); - PyModule_AddObject(dlfl, "error", DLFLError); - - PyObject *dlflDict = PyModule_GetDict(dlfl); - - /* Initialize the C API pointer array */ - PyDLFL_API[0] = (void *)PyDLFL_UsingGUI; - PyDLFL_API[1] = (void *)PyDLFL_PassObject; - /* Create a CObject containing the API pointer array's address */ - PyObject *c_api_object = PyCObject_FromVoidPtr((void *)PyDLFL_API, NULL); - if (c_api_object != NULL) { - /* Create a name for this object in the module’s namespace */ - PyDict_SetItemString(dlflDict, "_C_API", c_api_object); - Py_DECREF(c_api_object); - } -} - diff --git a/topmodx/include/pydlfl/Makefile b/topmodx/include/pydlfl/Makefile deleted file mode 100644 index d7a3ae9..0000000 --- a/topmodx/include/pydlfl/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# Makefile - -OS = $(shell uname) - -#ifeq ($(OS),Linux) -# setup for linux -#endif -#ifeq ($(OS),Darwin) -# setup for Mac -#endif -# Windows? - -dlfl: - @ echo Building DLFL Python Module... - @ python dlfl_setup.py build -c mingw32 - -install: - @ echo Installing DLFL Python Module... - @ python dlfl_setup.py build -c mingw32 install - -bundle: dlfl - @ echo Installing PyDLFL into Mac Bundle... - @ cp `find build -iname dlfl.so -print` ../../TopMod.app/ - -locinstall: dlfl - @ echo Installing PyDLFL into TopMod directory - @ cp `find build -iname dlfl.so -print` ../../ - -release: dlfl - @ echo Installing in Windows Release directory - @ cp \build\lib.win32-2.5\dlfl.pyd ../../release/ - diff --git a/topmodx/include/pydlfl/commands.css b/topmodx/include/pydlfl/commands.css deleted file mode 100644 index 6c3d858..0000000 --- a/topmodx/include/pydlfl/commands.css +++ /dev/null @@ -1,87 +0,0 @@ -body { - font-family: Century Gothic, Sans-serif; -} - -h1 { color: #454545; } -h2 { color: #8a8a8a; font-style: italic; } - -div.command, form { - background-color: #efefef; - width: 650px; - padding: 5px; - padding-left: 10px; - padding-right: 20px; - margin: 5px; - border: 1px dashed #8a8a8a; -} - -.fn { - font-weight: bold -} - -.args { - font-weight: normal; - font-style: italic; -} - -.indent { - margin-left: 95px; -} - -.description { - font-size: 10pt; - margin-left: 30px; -} - -#topmod { color: #004458; font-size: 50pt; } - -div.result { - font-size: 11pt; - font-weight: bold; - color: #454545; -} - -div.resultdesc { - font-size: 10pt; - font-weight: normal; - font-style: italic; - margin-left: 30px; -} - -ul { - font-size: 10pt; -} - -a.commandlink:link, a.commandlink:visited { - color: black; - font-weight: bold; - text-decoration: none; -} - -a.commandlink:hover { - color: black; - font-weight: bold; - text-decoration: underline; -} - -div.samp { - margin-left: 60px; -} - -label { - font-size: 11pt; - margin-right: 10px; -} - -select { - font-family: Century Gothic, Sans-Serif; - font-size: 10pt; - border: 1px solid black; - background-color: #9a9a9a; - margin-right: 30px; - } - -i.opts { - font-size: 8pt; - margin-left: 10px; -} \ No newline at end of file diff --git a/topmodx/include/pydlfl/dlfl_setup.py b/topmodx/include/pydlfl/dlfl_setup.py deleted file mode 100644 index e5fd087..0000000 --- a/topmodx/include/pydlfl/dlfl_setup.py +++ /dev/null @@ -1,24 +0,0 @@ -# Setup for DLFL Python Module - -from distutils.core import setup, Extension - -dlfl_module = Extension( 'dlfl', - sources = ['DLFLModule.cc'], - include_dirs = ['..','../vecmat','../dlflcore','../dlflaux'], - library_dirs = ['.','../../lib'], - libraries = ['dlflcore','dlflaux','vecmat'] ) - -setup( name = 'DLFL', - version = '1.0', - description = 'Python Bindings for DLFL Python Module', - long_description = '', - author = 'Stuart Tett', - author_email = 'stuart@tett.net', - maintainer = 'Texas A&M Vizualization Laboratory', - url = 'http://www-viz.tamu.edu', - download_url = 'http://www-viz.tamu.edu', - ext_modules = [dlfl_module] )#, - #packages=['TopModPkg'], - #package_dir={'TopModPkg': 'TopModPkg'}, - #py_modules = ['TopMod'] ) - diff --git a/topmodx/include/pydlfl/dooSabin.py b/topmodx/include/pydlfl/dooSabin.py deleted file mode 100644 index 6d91095..0000000 --- a/topmodx/include/pydlfl/dooSabin.py +++ /dev/null @@ -1,149 +0,0 @@ -#! /usr/bin/env python - -from dlfl import * -import math - -import sysx -from PyQt4 import QtCore, QtGui - -def add2tuples(x,y): - if( len(x) < 3 or len(y) < 3 ): - return - return (x[0]+y[0], x[1]+y[1], x[2]+y[2]) - -def scalarMult(s,t): - if( len(t) < 3 ): - return - return (s*t[0],s*t[1],s*t[2]) - -def deleteData(faces,edges,verts): - for f in faces: - destroyFace(f) - for e in edges: - destroyEdge(e) - for v in verts: - destroyVertex(v) - -def connEdges(e1,f1,e2,f2): - c1 = getCorner(e1,f1) - c2 = getCorner(e2,f2) - c1p = saveCorner(c1) - c2p = saveCorner(c2) - if( c1 < 0 or c2 < 0 ): - return - c1n = next(c1) - c2n = next(c2) - c1np = saveCorner(c1n) - c2np = saveCorner(c2n) - if( next(c1) != c2n and prev(c1) != c2n ): - e,c1,c2n,c3,c4 = insertEdge(c1,c2n,False) - c1 = restoreCorner(c1p) - c2 = restoreCorner(c2p) - c1n = restoreCorner(c1np) - c2n = restoreCorner(c2np) - if( next(c1n) != c2 and prev(c1n) != c2 ): - e,c1n,c2,c3,c4 = insertEdge(c1n,c2,False) - -def doosabin(): - """Doo-Sabin Remeshing Algorithm""" - # Store old info to delete later - oldfaces = faces(0) - oldedges = edges(0) - oldverts = verts(0) - edgestart = oldedges[0] # edge start for offset - firstface = oldfaces[0] - # Initialize to all -1's to size of oldedges - elist1 = [-1] - elist1 *= len(oldedges) - elist2 = [-1] - elist2 *= len(oldedges) - # Compute the coordinates for each face - for f in oldfaces: - vv,ee = walk(f) - coeff = 0.0; - numVerts = len(vv) - newvertexcoords = [] - # compute the new coordinates - i=-1 - for v1 in vv: - i = i+1 - vcoordnew = (0,0,0) - j=-1 - for v2 in vv: - j = j+1 - vcoord = vertexInfo(v2)['coords'] - if i == j: - coeff = 0.25 + 5.0/(4.0*numVerts) - else: - coeff = ( 3.0+2.0*math.cos(2.0*(i-j)*math.pi/numVerts) )/( 4.0*numVerts ) - vcoordnew = add2tuples( vcoordnew, scalarMult(coeff,vcoord)) - newvertexcoords += [vcoordnew] # newvertexcoords is a list of tuples so we must use [] - # create a new face with the new coordinates - nf1,nf2 = createFace(newvertexcoords) # will mark nf1,nf2 as "new" - # create an array of corners from which connections can be made - vw,ew = walk(f) - vw2,ew2 = walk(nf2) - while len(ew) > 0 and len(ew2) > 0: - e1 = ew.pop(0) - e2 = ew2.pop() - eindex = e1 - edgestart - if elist1[eindex] == -1: - elist1[eindex] = e2 - else: - elist2[eindex] = e2 - # Delete old stuff - deleteData(oldfaces,oldedges,oldverts) - # Go through and connect half-edges - i = 0 - while i < len(oldedges): - if elist1[i] != -1 and elist2[i] != -1 : - # Check Edge List 1 - einfo1 = edgeInfo(elist1[i]) - ca1 = einfo1['cornerA'] - cb1 = einfo1['cornerB'] - if faceInfo(ca1[0])['type'] == "new": - f1 = ca1[0] - elif faceInfo(cb1[0])['type'] == "new": - f1 = cb1[0] - # Check Edge List 2 - einfo2 = edgeInfo(elist2[i]) - ca2 = einfo2['cornerA'] - cb2 = einfo2['cornerB'] - if faceInfo(ca2[0])['type'] == "new": - f2 = ca2[0] - elif faceInfo(cb2[0])['type'] == "new": - f2 = cb2[0] - #connectEdges((elist1[i], f1), (elist2[i], f2), False) - connEdges(elist1[i], f1, elist2[i], f2) - #return - else : - return "NULL pointers found" - i = i + 1 - # Done with Doo-Sabin remeshing algorithm - - - class MyWidget(QtGui.QWidget): - def __init__(self, parent=None): - QtGui.QWidget.__init__(self, parent) - - self.setFixedSize(200, 120) - - self.quit = QtGui.QPushButton("Quit", self) - self.quit.setGeometry(62, 40, 75, 30) - self.quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold)) - - self.connect(self.quit, QtCore.SIGNAL("clicked()"), - QtGui.qApp, QtCore.SLOT("quit()")) - - - app = QtGui.QApplication(sys.argv) - widget = MyWidget() - widget.show() - sys.exit(app.exec_()) - -# Perform... -#load("/Users/stuart/topmod/topmodx/cube.obj") -#test() -#doosabin() -#doosabin() -#save("/Users/stuart/Desktop/test.obj") diff --git a/topmodx/include/pydlfl/extrude.py b/topmodx/include/pydlfl/extrude.py deleted file mode 100644 index 27a4890..0000000 --- a/topmodx/include/pydlfl/extrude.py +++ /dev/null @@ -1,112 +0,0 @@ -from dlfl import * -from math import * - -def scalarAdd(a,tuple): - if( len(tuple) < 3 ): - return - return (tuple[0]+a,tuple[1]+a,tuple[2]+a) - -def scalarMult(s,tuple): - if( len(tuple) < 3 ): - return - return (s*tuple[0],s*tuple[1],s*tuple[2]) - -def vectorAdd(x,y): - if( len(x) < 3 or len(y) < 3 ): - return - return (x[0]+y[0], x[1]+y[1], x[2]+y[2]) - -def vectorMinus(x,y): - if( len(x) < 3 or len(y) < 3 ): - return - return (x[0]-y[0], x[1]-y[1], x[2]-y[2]) - -#def rotate(tuple,theta): -# if( len(tuple) != 3 ): -# return - -def connEdges(e1,f1,e2,f2): - c1 = getCorner(e1,f1) - c2 = getCorner(e2,f2) - c1p = saveCorner(c1) - c2p = saveCorner(c2) - if( c1 < 0 or c2 < 0 ): - return - c1n = next(c1) - c2n = next(c2) - c1np = saveCorner(c1n) - c2np = saveCorner(c2n) - if( next(c1) != c2n and prev(c1) != c2n ): - e,c1,c2n,c3,c4 = insertEdge(c1,c2n,False) - c1 = restoreCorner(c1p) - c2 = restoreCorner(c2p) - c1n = restoreCorner(c1np) - c2n = restoreCorner(c2np) - if( next(c1n) != c2 and prev(c1n) != c2 ): - e,c1n,c2,c3,c4 = insertEdge(c1n,c2,False) - -def myextrude( faceid, dist, segs ): - for i in range(segs): - # Grab face normal - norm = faceInfo(faceid)['normal'] - norm = scalarMult(dist,norm) - # Grab the vertices of the face - vv,ee = walk(faceid) - newvertexcoords = [] - for v in vv: - vcoord = vertexInfo(v)['coords'] - vcoord = vectorAdd(vcoord,norm) - newvertexcoords += [vcoord] - f1,f2 = createFace(newvertexcoords) - vsoldface,esoldface = walk(faceid) - vsnewface,esnewface = walk(f2) - while len(esnewface) > 0 and len(esoldface) > 0: - enew = esnewface.pop(0) - eold = esoldface.pop() - einfo1 = edgeInfo(enew) - fnew = einfo1['cornerB'][0] - if( faceInfo(einfo1['cornerA'][0]) == "new"): - fnew = einfo1['cornerA'][0] - einfo2 = edgeInfo(eold) - fold = einfo2['cornerA'][0] - if( faceInfo(einfo2['cornerB'][0]) == "new"): - fnew = einfo2['cornerB'][0] - print enew, fnew, eold, fold - connEdges(enew,fnew,eold,fold) - faceid = f1 - return faceid - -def mywaveextrude( faceid, dist, segs ): - currentface = faceid - faceinfo = faceInfo(faceid) - norm = faceinfo['normal'] - centroid = faceinfo['centroid'] - for i in range(segs): - # Grab face normal - cdist = dist*(i+1) - norm = scalarMult(cdist,norm) - vv,ee = walk(faceid) - newvertexcoords = [] - for v in vv: - vcoord = vertexInfo(v)['coords'] - vcoord = vectorMinus(vcoord,centroid) - vcoord = scalarMult(0.5*sin(2.1*cdist)+1.1*cos(0.6*cdist),vcoord) - vcoord = vectorAdd(vcoord,centroid) - vcoord = vectorAdd(vcoord,norm) - newvertexcoords += [vcoord] - f1,f2 = createFace(newvertexcoords) - vsoldface,esoldface = walk(currentface) - vsnewface,esnewface = walk(f2) - while len(esnewface) > 0 and len(esoldface) > 0: - enew = esnewface.pop(0) - eold = esoldface.pop() - einfo1 = edgeInfo(enew) - fnew = einfo1['cornerB'][0] - einfo2 = edgeInfo(eold) - fold = einfo2['cornerA'][0] - print enew, fnew, eold, fold - connEdges(enew,fnew,eold,fold) - return - currentFace = f1 - norm = faceinfo['normal'] - return faceid diff --git a/topmodx/include/pydlfl/test01.py b/topmodx/include/pydlfl/test01.py deleted file mode 100644 index e24795a..0000000 --- a/topmodx/include/pydlfl/test01.py +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/env python - -from dlfl import * -from random import * -from math import * - -# Load in an object -load("cube.obj") - -face = 6 - -# 360 degree Loop to use sine for distance/scaling with random twisting -for i in range(0,370,10): - face = extrude( "cubical", face, abs(sin(radians(i)))+0.1,1, random()*20-10, abs(sin(radians(i)))+0.5 ) - -# Take the dual twice -dual() -dual() - -# Subdivide the mesh -subdivide("doo-sabin") - -# Insert an Edge -#insert_edge((7,8),(9,11)) - -# Save out as a new file -save("cuberandom.obj") - -##### - -import time - -load("cube.obj") -face = faces(0)[0] - -for i in range(14): - t = abs(sin(time.time())) - s = abs(sin(time.time())) - face = extrude("cubical", face, t, 1, 0, s) - time.sleep(1) - -dual() -subdivide("checker",0.33) -dual() - -oldfaces = faces(0) -punchfaces = [] -for face in oldfaces: - if( faceInfo(face)['size'] == 4 ): - vv,ee = walk(face) - punch = False - for v in vv: - if( vertexInfo(v)['valence'] == 3 ): - punch = True - if( punch ): - punchfaces += [face] - -rind(punchfaces,True,0.8) diff --git a/topmodx/include/vecmat/Matrix3x3.cc b/topmodx/include/vecmat/Matrix3x3.cc deleted file mode 100644 index 7c6ab71..0000000 --- a/topmodx/include/vecmat/Matrix3x3.cc +++ /dev/null @@ -1,159 +0,0 @@ -// -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Matrix3x3.cc,v 1.3 2000/04/12 21:28:08 vinod Exp $ */ - -// Non-inline source code for Matrix3x3 class - -#include "Matrix3x3.h" - -// Invert the matrix, using elementary row operations -void Matrix3x3::invert(void) -{ - Vector3d inv[3]; - int i, j, swaprow; - - for (i = 0; i < 3; ++i) - inv[i][i] = 1.0; - - // inv will be identity initially and will become the inverse at the end - for (i = 0; i < 3; ++i) - { - // i is column - // Find row in this column which has largest element (magnitude) - swaprow = i; - for (j = i + 1; j < 3; ++j) - if (fabs(row[j][i]) > fabs(row[i][i])) swaprow = j; - - if (swaprow != i) - { - // Swap the two rows to get largest element in main diagonal - // Do this for the RHS also - swap(row[i], row[swaprow]); swap(inv[i], inv[swaprow]); - } - - // Check if pivot is non-zero - if (!isNonZero(row[i][i])) - { - cerr << "Matrix3x3 inverse(const Matrix3x3&) : Singular matrix!" << endl; - // Return original matrix without change - return; - } - - // Divide matrix by main diagonal element to make it 1.0 - double fact = row[i][i]; - for (j = 0; j < 3; ++j) - { - row[j] /= fact; - inv[j] /= fact; - } - - // Make non-main-diagonal elements in this column 0 using main-diagonal row - for (j = 0; j < 3; ++j) - { - if (j != i) - { - double temp = row[j][i]; - row[j] -= row[i] * temp; - inv[j] -= inv[i] * temp; - } - } - } - - // Main-diagonal elements on LHS may not be 1.0 now. Divide to make LHS identity - // Last row will be 1.0 - for (i = 0; i < 2; ++i) - { - double pivot = row[i][i]; - row[i] /= pivot; - inv[i] /= pivot; - } - for (i = 0; i < 3; ++i) - row[i] = inv[i]; -} - -/* -The following functions are defined outside the class so that they use the -friend versions of member functions instead of the member functions themselves -*/ - -// Multiplication of 2 matrices - outer product -Matrix3x3 operator * (const Matrix3x3& mat1, const Matrix3x3& mat2) -{ - Matrix3x3 prod, trans; - - // Find the transpose of the 2nd matrix - trans = transpose(mat2); - - // The columns of mat2 are now the rows of trans - // Multiply appropriate rows and columns to get the product - prod.row[0].set(mat1.row[0] * trans.row[0], - mat1.row[0] * trans.row[1], - mat1.row[0] * trans.row[2]); - prod.row[1].set(mat1.row[1] * trans.row[0], - mat1.row[1] * trans.row[1], - mat1.row[1] * trans.row[2]); - prod.row[2].set(mat1.row[2] * trans.row[0], - mat1.row[2] * trans.row[1], - mat1.row[2] * trans.row[2]); - return prod; -} - -// Pre-multiplication by a Vector3d. Vector is assumed to be a row vector -Vector3d operator * (const Vector3d& vec, const Matrix3x3& mat) -{ - return (transpose(mat) * vec); -} - - - -/* - $Log: Matrix3x3.cc,v $ - Revision 1.3 2000/04/12 21:28:08 vinod - Bug fix: invert() function, vectors on the RHS (for row operations) weren't - being initialized to be the identity matrix. - - Revision 1.2 2000/02/09 22:15:06 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:22 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:42 vinod - Moved into VecMat directory - - Revision 1.1 2000/02/09 07:03:28 vinod - Moved invert fns, etc. and friend fns defined outside class to source file - -*/ diff --git a/topmodx/include/vecmat/Matrix3x3.h b/topmodx/include/vecmat/Matrix3x3.h deleted file mode 100644 index fa0c620..0000000 --- a/topmodx/include/vecmat/Matrix3x3.h +++ /dev/null @@ -1,396 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Matrix3x3.hh,v 1.2 2000/02/09 22:15:06 vinod Exp $ */ - -#ifndef _MATRIX3X3_HH_ - -#define _MATRIX3X3_HH_ - -// Class for a 3x3 matrix. Built from Vector3d -// Row-major form is used. (ie) each row of the matrix -// is a Vector3d. This makes inversion easier, since elementary -// row operations are simplified - -#include "Base/BaseObject.h" -#include "Vector3d.h" - -class Matrix3x3; -typedef Matrix3x3 * Matrix3x3Ptr; - -// Typedefs for backward compatibility with older name -typedef Matrix3x3 Matrix3_3; -typedef Matrix3_3 * Matrix3_3Ptr; - -class Matrix3x3 : public BaseObject -{ -public: - // Default constructor - creates an identity matrix - Matrix3x3() : BaseObject() - { - row[0].set(1.0, 0.0, 0.0); - row[1].set(0.0, 1.0, 0.0); - row[2].set(0.0, 0.0, 1.0); - } - - // 1 argument constructor - from scalar, set all elements to given value - Matrix3x3(double scalar) : BaseObject() - { - row[0] = scalar; row[1] = scalar; row[2] = scalar; - } - - // 3 argument constructor - from 3 Vector3ds - Matrix3x3(const Vector3d& r0, const Vector3d& r1, const Vector3d& r2) - : BaseObject() - { - row[0] = r0; row[1] = r1; row[2] = r2; - } - - // Copy constructor - Matrix3x3(const Matrix3x3& mat) : BaseObject() - { - copyFrom(mat); - } - - // Destructor - virtual ~Matrix3x3() - { - } - - // Assignment operator - Matrix3x3& operator = (const Matrix3x3& mat) - { - copyFrom(mat); - return (*this); - } - - // Assignment from a scalar - void operator = (double scalar) - { - row[0] = scalar; row[1] = scalar; row[2] = scalar; - } - - // Set the rows of the matrix to the given Vector3ds - void set(const Vector3d& r0, const Vector3d& r1, const Vector3d& r2) - { - row[0] = r0; row[1] = r1; row[2] = r2; - } - - void set(double scalar) - { - row[0] = scalar; row[1] = scalar; row[2] = scalar; - } - - // Reset the matrix to it's default state - identity - void reset(void) - { - row[0].set(1.0, 0.0, 0.0); - row[1].set(0.0, 1.0, 0.0); - row[2].set(0.0, 0.0, 1.0); - } - - // Make a copy of the object - // implement BaseObject class pure virtual function - virtual BaseObjectPtr copy(void) const - { - Matrix3x3Ptr mat = new Matrix3x3(*this); - return mat; - } - - // Access a row of the matrix - no range checks - Vector3d& operator [] (uint index) - { - return row[index]; - } - - // Access a row of the matrix - no range checks : const version - const Vector3d& operator [] (uint index) const - { - return row[index]; - } - - // Class member functions which return the identity matrix - static Matrix3x3 identity(void) - { - Matrix3x3 imat; // Default constructor creates an identity matrix - return imat; - } - - static Matrix3x3 I(void) - { - Matrix3x3 imat; // Default constructor creates an identity matrix - return imat; - } - - //--- Arithmetic assignment operators ---// - - void operator += (const Matrix3x3& mat) - { - for (int i = 0; i < 3; ++i) - row[i] += mat.row[i]; - } - - void operator -= (const Matrix3x3& mat) - { - for (int i = 0; i < 3; ++i) - row[i] -= mat.row[i]; - } - - void operator *= (double scalar) - { - for (int i = 0; i < 3; ++i) - row[i] *= scalar; - } - - void operator /= (double scalar) - { - for (int i = 0; i < 3; ++i) - row[i] /= scalar; - } - - //--- Special functions - inverse, transpose, etc. ---// - - // Find the transpose of a given matrix - void transpose(void) - { - for (int i = 0; i < 3; ++i) - for (int j = i + 1; j < 3; ++j) - swap(row[i][j], row[j][i]); - } - - friend Matrix3x3 transpose(const Matrix3x3& mat) - { - Matrix3x3 trans(mat); trans.transpose(); - return trans; - } - - friend double determinant(const Matrix3x3& mat) - { - double det = 0.0; - - det = mat[0][0] * mat[1][1] * mat[2][2] - + mat[0][1] * mat[1][2] * mat[2][0] - + mat[0][2] * mat[1][0] * mat[2][1] - - mat[2][0] * mat[1][1] * mat[0][2] - - mat[2][1] * mat[1][2] * mat[0][0] - - mat[2][2] * mat[1][0] * mat[0][1]; - return det; - } - - // Invert the matrix, using elementary row operations - void invert(void); - - // Find the inverse of a given matrix - // Using elementary row operations - friend Matrix3x3 inverse(const Matrix3x3& mat) - { - Matrix3x3 inv(mat); inv.invert(); - return inv; - } - - //--- Arithmetic operators, implemented as friend functions ---// - - // Negation - friend Matrix3x3 operator - (const Matrix3x3& mat) - { - Matrix3x3 neg; - - for (int i = 0; i < 3; ++i) - neg.row[i] = -mat.row[i]; - - return neg; - } - - friend Matrix3x3 operator + (const Matrix3x3& mat1, const Matrix3x3& mat2) - { - Matrix3x3 sum(mat1); - sum += mat2; - return sum; - } - - friend Matrix3x3 operator - (const Matrix3x3& mat1, const Matrix3x3& mat2) - { - Matrix3x3 diff(mat1); - diff -= mat2; - return diff; - } - - // Post-multiplication by a scalar - friend Matrix3x3 operator * (const Matrix3x3& mat, double scalar) - { - Matrix3x3 prod(mat); - prod *= scalar; - return prod; - } - - // Pre-multiplication by a scalar - friend Matrix3x3 operator * (double scalar, const Matrix3x3& mat) - { - Matrix3x3 prod(mat); - prod *= scalar; - return prod; - } - - // Division by a scalar - friend Matrix3x3 operator / (const Matrix3x3& mat, double scalar) - { - Matrix3x3 quot(mat); - quot /= scalar; - return quot; - } - - // Multiplication of 2 matrices - outer product - friend Matrix3x3 operator * (const Matrix3x3& mat1, const Matrix3x3& mat2); - - // Element-by-element multiplication of 2 matrices - friend Matrix3x3 product(const Matrix3x3& mat1, const Matrix3x3& mat2) - { - Matrix3x3 prod; - - prod.row[0] = product(mat1[0], mat2[0]); - prod.row[1] = product(mat1[1], mat2[1]); - prod.row[2] = product(mat1[2], mat2[2]); - - return prod; - } - - // Post-multiplication by a Vector3d. Vector is assumed to be a column vector - friend Vector3d operator * (const Matrix3x3& mat, const Vector3d& vec) - { - Vector3d prod; - - prod.set(mat.row[0] * vec, mat.row[1] * vec, mat.row[2] * vec); - return prod; - } - - // Pre-multiplication by a Vector3d. Vector is assumed to be a row vector - friend Vector3d operator * (const Vector3d& vec, const Matrix3x3& mat); - - // Multiplication of two Vector3ds to produce a Matrix3x3 - outer product - // or tensor product of two Vectors. - // Same as multiplying row vector (v1) with column vector (v2) - friend Matrix3x3 operator ^ (const Vector3d& v1, const Vector3d& v2) - { - return Matrix3x3(v1[0] * v2, v1[1] * v2, v1[2] * v2); - } - - friend void swap(Matrix3x3& mat1, Matrix3x3& mat2) - { - for (int i = 0; i < 3; ++i) - swap(mat1.row[i], mat2.row[i]); - } - - // Multiply self with another matrix. Simply calls above defined friend function - void operator *= (const Matrix3x3& mat) - { - Matrix3x3 prod = (*this) * mat; - *this = prod; - } - - void fillArrayRowMajor(double array[9]) const - { - // Fill an array with contents of the matrix - // Row - major form -> Row 1 == { array[0], array[1], array[2] } - int index = 0; - for (int i = 0; i < 3; ++i) - { - row[i].get(array[index], array[index + 1], array[index + 2]); - index += 3; - } - } - - void fillArrayColumnMajor(double array[9]) const - { - // Fill an array with contents of the matrix - // Row - major form -> Column 1 == { array[0], array[1], array[2] } - int index = 0; - for (int i = 0; i < 3; ++i) - { - row[i].get(array[index], array[index + 4], array[index + 8]); - index += 1; - } - } - - friend ostream& operator << (ostream& o, const Matrix3x3& mat) - { - o << "[ " << mat.row[0] << "," << endl - << " " << mat.row[1] << "," << endl - << " " << mat.row[2] << " ]" << endl; - return o; - } - - friend istream& operator >> (istream& i, Matrix3x3& mat) - { - char rowsep, dummy; - i >> dummy >> mat.row[0] >> rowsep - >> mat.row[1] >> rowsep - >> mat.row[2] >> dummy; - return i; - } - -protected: - // Copy values from another matrix - void copyFrom(const Matrix3x3& mat) - { - for (int i = 0; i < 3; ++i) - row[i] = mat.row[i]; - } - -protected: - // 3 rows of the matrix - Vector3d row[3]; - -}; - -#endif /* #ifndef _MATRIX3X3_HH_ */ - - -/* - $Log: Matrix3x3.hh,v $ - Revision 1.2 2000/02/09 22:15:06 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:22 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:42 vinod - Moved into VecMat directory - - Revision 1.4 2000/02/09 07:03:28 vinod - Moved invert fns, etc. and friend fns defined outside class to source file - - Revision 1.3 2000/02/01 06:24:16 vinod - Minor bug fix, in invert() - - Revision 1.2 2000/01/27 03:48:52 vinod - Added in-place inversion and transpose functions - - Revision 1.1 1999/10/18 05:32:02 vinod - Matrix classes using Vectors - -*/ diff --git a/topmodx/include/vecmat/Matrix4x4.cc b/topmodx/include/vecmat/Matrix4x4.cc deleted file mode 100644 index b9c497f..0000000 --- a/topmodx/include/vecmat/Matrix4x4.cc +++ /dev/null @@ -1,187 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Matrix4x4.cc,v 1.2 2000/02/09 22:15:06 vinod Exp $ */ - -// Non-inline source code for Matrix4x4 class - -#include "Matrix4x4.h" - -// Find the 3x3 sub-matrix which is the co-factor for the given element -Matrix3_3 Matrix4x4::cofactor(uint r, uint c) const -{ - Matrix3_3 cof; - Vector3d cofrow; - uint cfcol, cfrow; - - if ((r > 3) || (c > 3)) - { - cerr << "Matrix3_3 Matrix4x4 :: cofactor(int,int) : Index out of range!" << endl; - return cof; - } - - cfrow = 0; - for (int i = 0; i < 4; ++i) - { - if (i != r) - { - cfcol = 0; - for (int j = 0; j < 4; ++j) - if (j != c) cofrow[cfcol++] = row[i][j]; - cof[cfrow++] = cofrow; - } - } - return cof; -} - -// Invert the matrix. Using elementary row operations -void Matrix4x4::invert(void) -{ - Vector4d inv[4]; - int i, j, swaprow; - - for (i = 0; i < 4; ++i) - inv[i][i] = 1.0; - - // inv will be identity initially and will become the inverse at the end - for (i = 0; i < 4; ++i) - { - // i is column - // Find row in this column which has largest element (magnitude) - swaprow = i; - for (j = i + 1; j < 4; ++j) - if (fabs(row[j][i]) > fabs(row[i][i])) swaprow = j; - - if (swaprow != i) - { - // Swap the two rows to get largest element in main diagonal - // Do this for the RHS also - swap(row[i], row[swaprow]); swap(inv[i], inv[swaprow]); - } - - // Check if pivot is non-zero - if (!isNonZero(row[i][i])) - { - cerr << "Matrix4x4 inverse(const Matrix4x4&) : Singular matrix!" << endl; - // Return original matrix without change - return; - } - - // Divide matrix by main diagonal element to make it 1.0 - double fact = row[i][i]; - for (j = 0; j < 4; ++j) - { - row[j] /= fact; - inv[j] /= fact; - } - - // Make non-main-diagonal elements in this column 0 using main-diagonal row - for (j = 0; j < 4; ++j) - { - if (j != i) - { - double temp = row[j][i]; - row[j] -= row[i] * temp; - inv[j] -= inv[i] * temp; - } - } - } - - // Main-diagonal elements on LHS may not be 1.0 now. Divide to make LHS identity - // Last row will be 1.0 - for (i = 0; i < 3; ++i) - { - double pivot = row[i][i]; - row[i] /= pivot; - inv[i] /= pivot; - } - for (i = 0; i < 4; ++i) - row[i] = inv[i]; -} - -/* -The following functions are defined outside the class so that they use the -friend versions of member functions instead of the member functions themselves -*/ - -// Multiplication of 2 matrices - outer product -Matrix4x4 operator * (const Matrix4x4& mat1, const Matrix4x4& mat2) -{ - Matrix4x4 prod, trans; - - // Find the transpose of the 2nd matrix - trans = transpose(mat2); - - // The columns of mat2 are now the rows of trans - // Multiply appropriate rows and columns to get the product - prod.row[0].set(mat1.row[0] * trans.row[0], - mat1.row[0] * trans.row[1], - mat1.row[0] * trans.row[2], - mat1.row[0] * trans.row[3]); - prod.row[1].set(mat1.row[1] * trans.row[0], - mat1.row[1] * trans.row[1], - mat1.row[1] * trans.row[2], - mat1.row[1] * trans.row[3]); - prod.row[2].set(mat1.row[2] * trans.row[0], - mat1.row[2] * trans.row[1], - mat1.row[2] * trans.row[2], - mat1.row[2] * trans.row[3]); - prod.row[3].set(mat1.row[3] * trans.row[0], - mat1.row[3] * trans.row[1], - mat1.row[3] * trans.row[2], - mat1.row[3] * trans.row[3]); - return prod; -} - -// Pre-multiplication by a Vector4d. Vector is assumed to be a row vector -Vector4d operator * (const Vector4d& vec, const Matrix4x4& mat) -{ - return (transpose(mat) * vec); -} - - -/* - $Log: Matrix4x4.cc,v $ - Revision 1.2 2000/02/09 22:15:06 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:23 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:42 vinod - Moved into VecMat directory - - Revision 1.1 2000/02/09 07:03:28 vinod - Moved invert fns, etc. and friend fns defined outside class to source file - -*/ diff --git a/topmodx/include/vecmat/Matrix4x4.h b/topmodx/include/vecmat/Matrix4x4.h deleted file mode 100644 index 7a8662f..0000000 --- a/topmodx/include/vecmat/Matrix4x4.h +++ /dev/null @@ -1,442 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Matrix4x4.hh,v 1.3 2003/04/12 01:18:10 vinod Exp $ */ - -#ifndef _MATRIX4X4_HH_ - -#define _MATRIX4X4_HH_ - -// Class for a 4x4 matrix. Built from Vector4d -// Row-major form is used. (ie) each row of the matrix -// is a Vector4d. This makes inversion easier, since elementary -// row operations are simplified - -#include "Base/BaseObject.h" -#include "Vector3d.h" -#include "Vector4d.h" -#include "Matrix3x3.h" - -class Matrix4x4; -typedef Matrix4x4 * Matrix4x4Ptr; - -// Typedefs for backward compatibility with older name -typedef Matrix4x4 Matrix4_4; -typedef Matrix4_4 * Matrix4_4Ptr; - -class Matrix4x4 : public BaseObject -{ -public: - - // Default constructor - creates an identity matrix - Matrix4x4() : BaseObject() - { - row[0].set(1.0, 0.0, 0.0, 0.0); - row[1].set(0.0, 1.0, 0.0, 0.0); - row[2].set(0.0, 0.0, 1.0, 0.0); - row[3].set(0.0, 0.0, 0.0, 1.0); - } - - // 1 argument constructor - from scalar, set all elements to given value - Matrix4x4(double scalar) : BaseObject() - { - row[0] = scalar; row[1] = scalar; row[2] = scalar; row[3] = scalar; - } - - // 4 argument constructor - from 4 Vector4ds - Matrix4x4(const Vector4d& r0, const Vector4d& r1, const Vector4d& r2, const Vector4d& r3) - : BaseObject() - { - row[0] = r0; row[1] = r1; row[2] = r2; row[3] = r3; - } - - // Copy constructor - Matrix4x4(const Matrix4x4& mat) : BaseObject() - { - copyFrom(mat); - } - - // Constructor from a 3x3 matrix - Matrix4x4(const Matrix3_3& mat3) : BaseObject() - { - copyFrom(mat3); - } - - // Destructor - virtual ~Matrix4x4() - { - } - - // Assignment operator - Matrix4x4& operator = (const Matrix4x4& mat) - { - copyFrom(mat); - return (*this); - } - - // Assignment from a Matrix3_3 - Matrix4x4& operator = (const Matrix3_3& mat3) - { - copyFrom(mat3); - return (*this); - } - - // Assignment from a scalar - void operator = (double scalar) - { - row[0] = scalar; row[1] = scalar; row[2] = scalar; row[3] = scalar; - } - - // Set the rows of the matrix to the given Vector4ds - void set(const Vector4d& r0, const Vector4d& r1, const Vector4d& r2, const Vector4d& r3) - { - row[0] = r0; row[1] = r1; row[2] = r2; row[3] = r3; - } - - void set(double scalar) - { - row[0] = scalar; row[1] = scalar; row[2] = scalar; row[3] = scalar; - } - - // Reset the matrix to it's default state - identity - void reset(void) - { - row[0].set(1.0, 0.0, 0.0, 0.0); - row[1].set(0.0, 1.0, 0.0, 0.0); - row[2].set(0.0, 0.0, 1.0, 0.0); - row[3].set(0.0, 0.0, 0.0, 1.0); - } - - // Make a copy of the object - // implement BaseObject class pure virtual function - virtual BaseObjectPtr copy(void) const - { - Matrix4x4Ptr mat = new Matrix4x4(*this); - return mat; - } - - // Access a row of the matrix - no range checks - Vector4d& operator [] (uint index) - { - return row[index]; - } - - // Access a row of the matrix - no range checks : const version - const Vector4d& operator [] (uint index) const - { - return row[index]; - } - - // Class member functions which return the identity matrix - static Matrix4x4 identity(void) - { - Matrix4x4 imat; // Default constructor creates an identity matrix - return imat; - } - - static Matrix4x4 I(void) - { - Matrix4x4 imat; // Default constructor creates an identity matrix - return imat; - } - - //--- Arithmetic assignment operators ---// - - void operator += (const Matrix4x4& mat) - { - for (int i = 0; i < 4; ++i) - row[i] += mat.row[i]; - } - - void operator -= (const Matrix4x4& mat) - { - for (int i = 0; i < 4; ++i) - row[i] -= mat.row[i]; - } - - void operator *= (double scalar) - { - for (int i = 0; i < 4; ++i) - row[i] *= scalar; - } - - void operator /= (double scalar) - { - for (int i = 0; i < 4; ++i) - row[i] /= scalar; - } - - //--- Special functions - inverse, transpose, etc. ---// - - void transpose(void) - { - for (int i = 0; i < 4; ++i) - for (int j = i + 1; j < 4; ++j) - swap(row[i][j], row[j][i]); - } - - // Find the transpose of a given matrix - friend Matrix4x4 transpose(const Matrix4x4& mat) - { - Matrix4x4 trans(mat); trans.transpose(); - return trans; - } - - // Find the 3x3 sub-matrix which is the co-factor for the given element - Matrix3_3 cofactor(uint r, uint c) const; - - friend double determinant(const Matrix4x4& mat) - { - double det = 0.0; - - for (int i = 0; i < 4; ++i) - det += mat[0][i] * cofsign(0, i) * determinant(mat.cofactor(0, i)); - return det; - } - - // Invert the matrix. Using elementary row operations - void invert(void); - - // Find the inverse of a given matrix - // Using elementary row operations - friend Matrix4x4 inverse(const Matrix4x4& mat) - { - Matrix4x4 inv(mat); inv.invert(); - return inv; - } - - //--- Arithmetic operators, implemented as friend functions ---// - - // Negation - friend Matrix4x4 operator - (const Matrix4x4& mat) - { - Matrix4x4 neg; - - for (int i = 0; i < 4; ++i) - neg.row[i] = -mat.row[i]; - - return neg; - } - - friend Matrix4x4 operator + (const Matrix4x4& mat1, const Matrix4x4& mat2) - { - Matrix4x4 sum(mat1); - sum += mat2; - return sum; - } - - friend Matrix4x4 operator - (const Matrix4x4& mat1, const Matrix4x4& mat2) - { - Matrix4x4 diff(mat1); - diff -= mat2; - return diff; - } - - // Post-multiplication by a scalar - friend Matrix4x4 operator * (const Matrix4x4& mat, double scalar) - { - Matrix4x4 prod(mat); - prod *= scalar; - return prod; - } - - // Pre-multiplication by a scalar - friend Matrix4x4 operator * (double scalar, const Matrix4x4& mat) - { - Matrix4x4 prod(mat); - prod *= scalar; - return prod; - } - - // Division by a scalar - friend Matrix4x4 operator / (const Matrix4x4& mat, double scalar) - { - Matrix4x4 quot(mat); - quot /= scalar; - return quot; - } - - // Multiplication of 2 matrices - outer product - friend Matrix4x4 operator * (const Matrix4x4& mat1, const Matrix4x4& mat2); - - // Element-by-element multiplication of 2 matrices - friend Matrix4x4 product(const Matrix4x4& mat1, const Matrix4x4& mat2) - { - Matrix4x4 prod; - - prod.row[0] = product(mat1[0], mat2[0]); - prod.row[1] = product(mat1[1], mat2[1]); - prod.row[2] = product(mat1[2], mat2[2]); - prod.row[3] = product(mat1[3], mat2[3]); - - return prod; - } - - // Post-multiplication by a Vector4d. Vector is assumed to be a column vector - friend Vector4d operator * (const Matrix4x4& mat, const Vector4d& vec) - { - Vector4d prod; - - prod.set(mat.row[0] * vec, mat.row[1] * vec, mat.row[2] * vec, mat.row[3] * vec); - return prod; - } - - friend Vector3d operator*(const Matrix4x4& mat, const Vector3d& vec) - { - Vector3d prod3; - Vector4d prod4, vec4 = vec; vec4[3] = 1.0; - prod4 = mat * vec4; - prod3 = prod4; - return prod3; - } - - // Pre-multiplication by a Vector4d. Vector is assumed to be a row vector - friend Vector4d operator * (const Vector4d& vec, const Matrix4x4& mat); - - // Multiplication of two Vector4ds to produce a Matrix4x4 - outer product - // or tensor product of two Vectors. - // Same as multiplying row vector (v1) with column vector (v2) - friend Matrix4x4 operator ^ (const Vector4d& v1, const Vector4d& v2) - { - return Matrix4x4(v1[0] * v2, v1[1] * v2, v1[2] * v2, v1[3] * v2); - } - - friend void swap(Matrix4x4& mat1, Matrix4x4& mat2) - { - for (int i = 0; i < 4; ++i) - swap(mat1.row[i], mat2.row[i]); - } - - // Multiply self with another matrix. Simply calls above defined friend function - void operator *= (const Matrix4x4& mat) - { - Matrix4x4 prod = (*this) * mat; - *this = prod; - } - - void fillArrayRowMajor(double array[16]) const - { - // Fill an array with contents of the matrix - // Row - major form -> Row 1 == { array[0], array[1], array[2], array[3] } - int index = 0; - for (int i = 0; i < 4; ++i) - { - row[i].get(array[index], array[index + 1], array[index + 2], array[index + 3]); - index += 4; - } - } - - void fillArrayColumnMajor(double array[16]) const - { - // Fill an array with contents of the matrix - // Row - major form -> Column 1 == { array[0], array[1], array[2], array[3] } - int index = 0; - for (int i = 0; i < 4; ++i) - { - row[i].get(array[index], array[index + 4], array[index + 8], array[index + 12]); - index += 1; - } - } - - friend ostream& operator << (ostream& o, const Matrix4x4& mat) - { - o << "[ " << mat.row[0] << "," << endl - << " " << mat.row[1] << "," << endl - << " " << mat.row[2] << "," << endl - << " " << mat.row[3] << " ]" << endl; - return o; - } - - friend istream& operator >> (istream& i, Matrix4x4& mat) - { - char rowsep, dummy; - i >> dummy >> mat.row[0] >> rowsep - >> mat.row[1] >> rowsep - >> mat.row[2] >> rowsep - >> mat.row[3] >> dummy; - return i; - } - -protected: - // Copy values from another matrix - void copyFrom(const Matrix4x4& mat) - { - for (int i = 0; i < 4; ++i) - row[i] = mat.row[i]; - } - - // Copy from a 3x3 matrix. 4th row and column elements are all set to 0 - void copyFrom(const Matrix3_3& mat3) - { - for (int i = 0; i < 3; ++i) - row[i] = mat3[i]; - } - -protected: - // 4 rows of the matrix - Vector4d row[4]; - -}; - -#endif /* #ifndef _MATRIX4X4_HH_ */ - - -/* - $Log: Matrix4x4.hh,v $ - Revision 1.3 2003/04/12 01:18:10 vinod - MAJOR BUG FIX! Loop for determinant was missing last element! - - Revision 1.2 2000/02/09 22:15:06 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:23 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:43 vinod - Moved into VecMat directory - - Revision 1.6 2000/02/09 07:03:29 vinod - Moved invert fns, etc. and friend fns defined outside class to source file - - Revision 1.5 2000/01/27 00:10:22 vinod - Added inplace transpose and invert functions - - Revision 1.4 2000/01/21 18:44:05 vinod - Minor access problem in converting from Matrix3_3. - Changed fillArray functions to use double instead of reference (not allowed) - - Revision 1.3 1999/11/22 03:08:03 vinod - Added fillArray functions - - Revision 1.2 1999/10/26 05:00:38 vinod - Added conversion from Matrix3_3 - - Revision 1.1 1999/10/18 05:32:02 vinod - Matrix classes using Vectors - -*/ diff --git a/topmodx/include/vecmat/Quaternion.h b/topmodx/include/vecmat/Quaternion.h deleted file mode 100644 index 231f435..0000000 --- a/topmodx/include/vecmat/Quaternion.h +++ /dev/null @@ -1,489 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Quaternion.hh,v 1.3 2002/11/17 18:53:45 vinod Exp $ */ - -#ifndef _QUATERNION_HH_ - -#define _QUATERNION_HH_ - -// Class for a Quaternion - -#include "Base/BaseObject.h" -#include "Vector3d.h" -#include "Matrix4x4.h" - -class Quaternion : public BaseObject -{ -public: - - // Default constructor - create an identity quaternion - Quaternion() - : BaseObject(), v3Vec(), dScalar(1.0) - { - } - - // Construct from a vector. Scalar is set to 0 - Quaternion(const Vector3d& vec) - : BaseObject(), v3Vec(vec), dScalar(0.0) - { - } - - // Constructor from a vector and a scalar - Quaternion(const Vector3d& vec, double scalar) - : BaseObject(), v3Vec(vec), dScalar(scalar) - { - } - - // Same as above, but with reverse order - Quaternion(double scalar, const Vector3d& vec) - : BaseObject(), v3Vec(vec), dScalar(scalar) - { - } - - // Construct from 3/4 individual values. Scalar is set to 0 by default - Quaternion(double x, double y, double z, double scalar = 0.0) - : BaseObject(), v3Vec(x, y, z), dScalar(scalar) - { - } - - // Copy constructor - Quaternion(const Quaternion& quat) - : BaseObject(quat), v3Vec(quat.v3Vec), dScalar(quat.dScalar) - { - } - - // Destructor - ~Quaternion() - { - } - - // Assignment operator - Quaternion& operator = (const Quaternion& quat) - { - BaseObject :: operator = (quat); - v3Vec = quat.v3Vec; dScalar = quat.dScalar; - return (*this); - } - - // Assignment from Vector3d - Quaternion& operator = (const Vector3d& vec) - { - v3Vec = vec; dScalar = 0.0; - return (*this); - } - - // Set the vector and scalar parts of the quaternion - void set(const Vector3d& vec, double scalar = 0.0) - { - v3Vec = vec; dScalar = scalar; - } - - void set(double x, double y, double z, double scalar = 0.0) - { - v3Vec.set(x, y, z); dScalar = scalar; - } - - // Reset the quaternion to its default state - identity - void reset(void) - { - v3Vec.reset(); dScalar = 1.0; - } - - // Make a copy of the object - // implement BaseObject class pure virtual function - virtual BaseObject * copy(void) const - { - Quaternion * quat = new Quaternion(*this); - return quat; - } - - // Access the elements of the quaternion. Indices start at 0 and the - // scalar is at index=3 - double& operator [] (uint index) - { - if (index == 3) return dScalar; - return v3Vec[index]; - } - - double operator [] (uint index) const - { - if (index == 3) return dScalar; - return v3Vec[index]; - } - - // Class member functions which return the identity quaternion - // Identity quaternion is with the all vector components=0 and scalar=1 - static Quaternion identity(void) - { - Quaternion ident; // Default constructor creates an identity quaternion - return ident; - } - - static Quaternion I(void) - { - Quaternion ident; // Default constructor creates an identity quaternion - return ident; - } - - //--- Arithmetic assignment operators ---// - - void operator += (const Quaternion& quat) - { - dScalar += quat.dScalar; - v3Vec += quat.v3Vec; - } - - void operator -= (const Quaternion& quat) - { - dScalar -= quat.dScalar; - v3Vec -= quat.v3Vec; - } - - void operator *= (const Quaternion& quat) - { - Vector3d v; - double s; - - s = dScalar*quat.dScalar - v3Vec*quat.v3Vec; - v = quat.v3Vec*dScalar + v3Vec*quat.dScalar + v3Vec % quat.v3Vec; - - dScalar = s; v3Vec = v; - } - - void operator *= (const Vector3d& vec) - { - Quaternion v2q(vec); - - this->operator *= (v2q); - } - - void operator *= (double scalar) - { - dScalar *= scalar; - v3Vec *= scalar; - } - - void operator /= (double scalar) - { - dScalar /= scalar; - v3Vec /= scalar; - } - - // Arithmetic operators and various other functions, implemented as friend functions - - // Square of the length of a quaternion - friend double lengthsqr(const Quaternion& quat) - { - double lensqr = quat.v3Vec*quat.v3Vec + quat.dScalar*quat.dScalar; - return lensqr; - } - - // Length of a quaternion - friend double length(const Quaternion& quat) - { - return sqrt(lengthsqr(quat)); - } - - // For consistency define norm and normsqr also - friend double normsqr(const Quaternion& quat) - { - return lengthsqr(quat); - } - - friend double norm(const Quaternion& quat) - { - return length(quat); - } - - // Compute conjugate of this quaternion which -v,s - friend Quaternion conjugate(const Quaternion& quat) - { - return Quaternion(-quat.v3Vec, quat.dScalar); - } - - // Normalize a quaternion - make it a unit quaternion - // Returns the original length of the quaternion - // If length is 0, nothing is changed - friend double normalize(Quaternion& quat) - { - double len = length(quat); - if (isNonZero(len) == true) - quat /= len; - return len; - } - - friend Quaternion normalized(const Quaternion& quat) - { - Quaternion unitq = quat; - normalize(unitq); - return unitq; - } - - // Arithmetic operators - - // Negation - friend Quaternion operator - (const Quaternion& q) - { - Quaternion neg(-q.dScalar, -q.v3Vec); - return neg; - } - - friend Quaternion operator + (const Quaternion& q1, const Quaternion& q2) - { - Quaternion sum = q1; - sum += q2; - return sum; - } - - friend Quaternion operator - (const Quaternion& q1, const Quaternion& q2) - { - Quaternion diff = q1; - diff -= q2; - return diff; - } - - // Post-multiplication by a scalar - friend Quaternion operator * (const Quaternion& q, double scalar) - { - Quaternion prod = q; - prod *= scalar; - return prod; - } - - // Pre-multiplication by a scalara - friend Quaternion operator * (double scalar, const Quaternion& q) - { - Quaternion prod = q; - prod *= scalar; - return prod; - } - - // Division by a scalar - friend Quaternion operator / (const Quaternion& q, double scalar) - { - Quaternion quot = q; - quot /= scalar; - return quot; - } - - // Multiplication of 2 quaternions - friend Quaternion operator * (const Quaternion& q1, const Quaternion& q2) - { - Quaternion prod = q1; - prod *= q2; - return prod; - } - - // Post-multiplication of a quaternion by a Vector3d - // Same as above, except Vector3d is promoted to quaternion with scalar value 0.0 - friend Quaternion operator * (const Quaternion& q, const Vector3d& v) - { - Quaternion prod = q; - prod *= v; - return prod; - } - - // Pre-multiplication of a quaternion by a Vector3d - friend Quaternion operator * (const Vector3d& v, const Quaternion& q) - { - Quaternion prod(v); - prod *= q; - return prod; - } - - // Convert to a rotation matrix. Assumes that quaternion has been normalized - Matrix3_3 toMatrix(void) const - { - Matrix3_3 mat; - double x, y, z, s; - - v3Vec.get(x, y, z); s = dScalar; - - mat[0].set(1.0 - 2.0*(y*y + z*z), 2.0*(x*y - s*z), 2.0*(x*z + s*y)); - mat[1].set(2.0*(x*y + s*z), 1.0 - 2.0*(x*x + z*z), 2.0*(y*z - s*x)); - mat[2].set(2.0*(x*z - s*y), 2.0*(y*z + s*x), 1.0 - 2.0*(x*x + y*y)); - - return mat; - } - - Matrix4_4 toMatrix4(void) const - { - Matrix4_4 mat4 = toMatrix(); - mat4[3][3] = 1.0; - return mat4; - } - - void toMatrix(double array[16]) const - { - // Similar to toMatrix4, but fills a given array of 16 elements with the - // rotation matrix corresponding to this quaternion in column major form - Matrix4_4 mat4 = toMatrix4(); - mat4.fillArrayColumnMajor(array); - } - - friend Matrix3_3 toMatrix(const Quaternion& quat) - { - return quat.toMatrix(); - } - - friend Matrix4_4 toMatrix4(const Quaternion& quat) - { - return quat.toMatrix4(); - } - - //--- Conversion to and from axis and angle ---// - //--- All angles are specified in radians ---// - - // Get the angle of rotation. Returns value between 0 and PI - double getAngle(void) const - { - return 2.0 * acos(dScalar); - } - - // Get the angle of rotation. Returns value between 0 and PI - // Computes angle after normalizing the quaternion - friend double getAngle(const Quaternion& quat) - { - // Make the quaternion a unit quaternion first - Quaternion nq = normalized(quat); - - return nq.getAngle(); - } - - // Get the axis of rotation. Returns unit axis - friend Vector3d getAxis(const Quaternion& quat) - { - // Make the quaternion a unit quaternion first - Quaternion nq = normalized(quat); - - Vector3d axis = normalized(nq.v3Vec); - return axis; - } - - // Get the axis and angle. - void getAxisAndAngle(Vector3d& axis, double& theta) const - { - Quaternion nq = normalized(*this); - - theta = 2.0 * acos(nq.dScalar); - axis = normalized(nq.v3Vec); - } - - // Set the axis and angle. - void setAxisAndAngle(const Vector3d& axis, double theta) - { - dScalar = cos(theta / 2.0); - v3Vec = normalized(axis); - v3Vec *= sin(theta / 2.0); - } - - // Change the angle to a new value. Use same axis as before - void setAngle(double theta) - { - dScalar = cos(theta / 2.0); - normalize(v3Vec); - v3Vec *= sin(theta / 2.0); - } - - // Scale the angle by the given scale factor - void scaleAngle(double scale_factor) - { - setAngle(getAngle()*scale_factor); - } - - //--- Insertion and extraction operators ---// - friend ostream& operator << (ostream& o, const Quaternion& quat) - { - o << "{ " << quat.v3Vec << "," << quat.dScalar << " }"; - return o; - } - - friend istream& operator >> (istream& i, Quaternion& quat) - { - char c; - i >> c >> quat.v3Vec >> c >> quat.dScalar >> c; - return i; - } - -protected: - // Vector component - Vector3d v3Vec; - // Scalar component - double dScalar; - -}; - -#endif /* #ifndef _QUATERNION_HH_ */ - - -/* - $Log: Quaternion.hh,v $ - Revision 1.3 2002/11/17 18:53:45 vinod - Fixed bug in friend multiplication operator - Caught by Shannon - result was order independent, but should be order dependent - - Revision 1.2 2000/02/09 22:15:07 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 21:25:35 vinod - Moved into VecMat directory - - Revision 1.10 2000/01/21 18:44:33 vinod - Minor bug fixes. Changed toMatrix to not use references - - Revision 1.9 2000/01/13 23:35:16 vinod - Added assignment from Vector3d - - Revision 1.8 1999/11/22 03:23:14 vinod - Added conjugate function - - Revision 1.7 1999/11/22 03:08:54 vinod - Added toMatrix function which fills array - - Revision 1.6 1999/10/26 05:01:50 vinod - Added function to get rotation matrix as a Matrix4_4 - Added function to scale angle. - Fixed const correctness - - Revision 1.5 1999/10/20 19:05:36 vinod - Modified to use Matrix3_3 instead of Matrix3d. Other minor changes - - Revision 1.4 1999/04/04 07:08:26 vinod - Added reset function - - Revision 1.3 1999/04/04 06:16:07 vinod - Minor bug fixes - - Revision 1.2 1999/04/04 05:55:55 vinod - Added insertion and extraction operators - - Revision 1.1 1999/04/03 22:23:45 vinod - Quaternion class - -*/ diff --git a/topmodx/include/vecmat/Vector.cc b/topmodx/include/vecmat/Vector.cc deleted file mode 100644 index 86ce7c6..0000000 --- a/topmodx/include/vecmat/Vector.cc +++ /dev/null @@ -1,73 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Vector.cc,v 1.1 2000/04/30 02:50:51 vinod Exp $ */ - -#include "Vector.h" -#include "Vector2d.h" -#include "Vector3d.h" -#include "Vector4d.h" - -// Cross product between 2D vectors -Vector3d operator % (const Vector2d& vec1, const Vector2d& vec2) -{ - Vector3d crossp, v1(vec1), v2(vec2); - - crossp = v1 % v2; - return crossp; -} - -// Cross product between 3D and 2D vectors -Vector3d operator % (const Vector3d& vec1, const Vector2d& vec2) -{ - Vector3d crossp, v2(vec2); - - crossp = vec1 % v2; - return crossp; -} - -// Cross product between 2D and 3D vectors -Vector3d operator % (const Vector2d& vec1, const Vector3d& vec2) -{ - Vector3d crossp, v1(vec1); - - crossp = v1 % vec2; - return crossp; -} - -/* - $Log: Vector.cc,v $ - Revision 1.1 2000/04/30 02:50:51 vinod - Common subroutines for the Vector classes - -*/ diff --git a/topmodx/include/vecmat/Vector.h b/topmodx/include/vecmat/Vector.h deleted file mode 100644 index 6ac7c7b..0000000 --- a/topmodx/include/vecmat/Vector.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Vector.hh,v 1.2 2000/02/09 22:15:07 vinod Exp $ */ - -#ifndef _VECTOR_HH_ - -#define _VECTOR_HH_ - -// Common stuff for all the static Vector classes -// Forward declarations for all the classes is included here, along with -// common include files and prototypes for functions that use different kinds -// of Vectors - -// Common include files -#include "Base/BaseObject.h" -#include "Base/StreamIO.h" -#include "Base/Constants.h" -#include "Base/Inlines.h" - -#include -#include - -// Forward declarations -class Vector2d; -class Vector3d; -class Vector4d; - -// Function prototypes - -// Cross products for 2d and 3d Vectors -Vector3d operator % (const Vector2d& vec1, const Vector2d& vec2); -Vector3d operator % (const Vector3d& vec1, const Vector2d& vec2); -Vector3d operator % (const Vector2d& vec1, const Vector3d& vec2); - -#endif /* #ifndef _VECTOR_HH_ */ - - -/* - $Log: Vector.hh,v $ - Revision 1.2 2000/02/09 22:15:07 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:23 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:45 vinod - Moved into VecMat directory - - Revision 1.1 1999/10/18 05:31:35 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/Vector2d.cc b/topmodx/include/vecmat/Vector2d.cc deleted file mode 100644 index 1573b8a..0000000 --- a/topmodx/include/vecmat/Vector2d.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Vector2d.cc,v 1.2 2000/02/09 22:15:07 vinod Exp $ */ - -// Definitions for non-inline functions in Vector2d.hh - -#include "Vector2d.h" -#include "Vector3d.h" -#include "Vector4d.h" - -void Vector2d::copyFrom(const Vector3d& vec) -{ - elem[0] = vec[0]; elem[1] = vec[1]; -} - -void Vector2d::copyFrom(const Vector4d& vec) -{ - elem[0] = vec[0]; elem[1] = vec[1]; -} - -/* - $Log: Vector2d.cc,v $ - Revision 1.2 2000/02/09 22:15:07 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:23 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:43 vinod - Moved into VecMat directory - - Revision 1.1 1999/10/18 05:31:34 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/Vector2d.h b/topmodx/include/vecmat/Vector2d.h deleted file mode 100644 index 9c9e93d..0000000 --- a/topmodx/include/vecmat/Vector2d.h +++ /dev/null @@ -1,415 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Vector2d.hh,v 1.6 2002/10/25 15:44:14 vinod Exp $ */ - -#ifndef _VECTOR_2D_HH_ - -#define _VECTOR_2D_HH_ - -// Class for a 2-D vector. -// Derived from BaseObject -// Assumes existence of classes Vector3d and Vector4d, which are 3-D and 4-D -// versions of this class. -// All the Vector classes are forward declared in Vector.hh, along with any -// function prototypes for subroutines using 2 different kinds of Vectors - -// Functions which need the definition of the other Vector classes are defined in the -// source file, Vector2d.cc - -#include "Vector.h" - -class Vector2d; -typedef Vector2d *Vector2dPtr; - -class Vector2d : public BaseObject -{ - -public: - // Default constructor - Vector2d() : BaseObject() - { - elem[0] = elem[1] = 0.0; - } - - // 1 argument constructor - intialize all elements with given value - Vector2d(double val) : BaseObject() - { - elem[0] = elem[1] = val; - } - - // 1 argument constructor - initialize with given array - // Assumes array has atleast 2 elements - Vector2d(double * arr) : BaseObject() - { - elem[0] = arr[0]; elem[1] = arr[1]; - } - - // 2 argument constructor - Vector2d(double val1, double val2) : BaseObject() - { - elem[0] = val1; elem[1] = val2; - } - - // Copy constructor - Vector2d(const Vector2d& vec) : BaseObject(vec) - { - elem[0] = vec.elem[0]; elem[1] = vec.elem[1]; - } - - // Construct from a Vector3d - copies first 2 elements - Vector2d(const Vector3d& vec) : BaseObject() - { - copyFrom(vec); - } - - // Construct from a Vector4d - copies first 2 elements - Vector2d(const Vector4d& vec) : BaseObject() - { - copyFrom(vec); - } - - // Destructor - does nothing - virtual ~Vector2d() - { - } - - // Assignment operator - Vector2d& operator = (const Vector2d& vec) - { - elem[0] = vec.elem[0]; elem[1] = vec.elem[1]; - return (*this); - } - - // Assignment from a scalar - both elements are set to the scalar value - Vector2d& operator = (double scalar) - { - elem[0] = elem[1] = scalar; - return (*this); - } - - // Assignment from a Vector3d - copies first 2 elements - Vector2d& operator = (const Vector3d& vec) - { - copyFrom(vec); - return (*this); - } - - // Assignment from a Vector4d - copies first 2 elements - Vector2d& operator = (const Vector4d& vec) - { - copyFrom(vec); - return (*this); - } - - // Make a copy of the object - // implement BaseObject class pure virtual function - virtual BaseObjectPtr copy(void) const - { - Vector2dPtr vec = new Vector2d(*this); - return vec; - } - - // Set elements of vector to given values - void set(double v1, double v2) - { - elem[0] = v1; elem[1] = v2; - } - - void set(double val) - { - elem[0] = elem[1] = val; - } - - // Set elements of vector to default values - void reset(void) - { - set(0.0); - } - - // Get the elements of vector into given values - void get(double& v1, double& v2) const - { - v1 = elem[0]; v2 = elem[1]; - } - - // Get the vector as a C array (double *) - const double * getCArray(void) const - { - return (const double *)elem; - } - - double * getCArray(void) - { - return (double *)elem; - } - - // Fill a 2D array with elements of the vector - void fillArray(double arr[2]) const - { - arr[0] = elem[0]; arr[1] = elem[1]; - } - -#ifndef __GNUG__ - /* GCC 3.0 and later have problems with having this and the [] operator */ - // Pointer cast operator - operator const double * (void) const - { - return (const double *)elem; - } - - operator double * (void) - { - return (double *)elem; - } -#endif - - // Element access operator - doesn't check for valid indices - double& operator [] (uint index) - { - return elem[index]; - } - - double operator [] (uint index) const - { - return elem[index]; - } - - // Arithmetic operators - void operator += (const Vector2d& vec) // Additive-assignment - { - elem[0] += vec.elem[0]; elem[1] += vec.elem[1]; - } - - void operator -= (const Vector2d& vec) // Subtractive-assignment - { - elem[0] -= vec.elem[0]; elem[1] -= vec.elem[1]; - } - - void operator *= (double scalar) // Multiplicative-assignment (scalar) - { - elem[0] *= scalar; elem[1] *= scalar; - } - - void operator /= (double scalar) // Divisive-assignment (scalar) - { - elem[0] /= scalar; elem[1] /= scalar; - } - - Vector2d operator + (const Vector2d& vec) const // Addition - { - Vector2d sum(*this); - sum += vec; - return sum; - } - - Vector2d operator - (const Vector2d& vec) const // Subtraction - { - Vector2d diff(*this); - diff -= vec; - return diff; - } - - double operator * (const Vector2d& vec) const // Multiplication - dot product - { - double dotprod = elem[0] * vec.elem[0] + elem[1] * vec.elem[1]; - return dotprod; - } - - // Operators defined as friend's - friend Vector2d operator - (const Vector2d& vec) // Negation - { - Vector2d negv(-vec.elem[0], -vec.elem[1]); - return negv; - } - - friend Vector2d operator * (double scalar, const Vector2d& vec) // Pre-multiply by scalar - { - Vector2d prod(vec); - - prod *= scalar; - return prod; - } - - friend Vector2d operator * (const Vector2d& vec, double scalar) // Post-multiply by scalar - { - Vector2d prod(vec); - - prod *= scalar; - return prod; - } - - friend Vector2d operator / (const Vector2d& vec, double scalar) // Divide by scalar - { - Vector2d prod(vec); - - prod /= scalar; - return prod; - } - - friend Vector2d product(const Vector2d& vec1, const Vector2d& vec2) // Elem-by-elem product - { - Vector2d prod(vec1[0] * vec2[0], vec1[1] * vec2[1]); - - return prod; - } - - // Boolean operators - - bool operator == (const Vector2d& vec) const // Equality - { - if ((fabs(elem[0] - vec.elem[0]) > ZERO) || - (fabs(elem[1] - vec.elem[1]) > ZERO)) - return false; - return true; - } - - bool operator != (const Vector2d& vec) const // Inequality - { - return !((*this) == vec); - } - - // Other functions - - friend double normsqr(const Vector2d& vec) // Square of norm of the vector - { - double nsq = sqr(vec.elem[0]) + sqr(vec.elem[1]); - return nsq; - } - - friend double norm(const Vector2d& vec) // Norm of the vector - { - return sqrt(normsqr(vec)); - } - - friend double normalize(Vector2d& vec) // Normalize. Returns previous norm - { - double n = norm(vec); - if (!areEqual(n, 1.0) && (isNonZero(n) == true)) vec /= n; - return n; - } - - friend Vector2d normalized(const Vector2d& vec) // Return normalized vector - { - Vector2d nvec(vec); - normalize(nvec); - return nvec; - } - - friend void swap(Vector2d& vec1, Vector2d& vec2) // Swap elements of 2 Vector2ds - { - swap(vec1.elem[0], vec2.elem[0]); - swap(vec1.elem[1], vec2.elem[1]); - } - - // I/O Stream operators - - friend istream& operator >> (istream& i, Vector2d& vec) // Extraction operator - { - // Separating character can be anything - // If only 1 number is there in the input stream before reaching EOL - // both elements are set to that number - // If EOL is reached before reading a number, vec is not changed - // Caveat: Separator char need not be the same between each element - removeWhiteSpace(i); - if (readTillFloat(i)) - { - i >> vec.elem[0]; - if (readTillFloat(i)) i >> vec.elem[1]; - else vec.elem[1] = vec.elem[0]; - } - return i; - } - - friend ostream& operator << (ostream& o, const Vector2d& vec) // Insertion operator - { - // User can set precision from 0 to 6 - o << setiosflags(ios::fixed) << setiosflags(ios::showpoint); - - int oldprec = o.precision(); - if (oldprec < 0) o << setprecision(0); - if (oldprec > 6) o << setprecision(6); - - o << "[" - << vec.elem[0] << ' ' - << vec.elem[1] - << "]"; - - o << setprecision(oldprec); - return o; - } - -protected: - // Initialize the elements from a Vector3d or Vector4d - void copyFrom(const Vector3d& vec); - void copyFrom(const Vector4d& vec); - -protected: - // 2 elements of the vector - double elem[2]; - -}; - -#endif // #ifndef _VECTOR_2D_HH_ - -/* - $Log: Vector2d.hh,v $ - Revision 1.6 2002/10/25 15:44:14 vinod - Added getCArray() methods - - Revision 1.5 2002/10/17 01:34:05 vinod - Added pointer cast operator - - Revision 1.4 2000/04/19 20:41:49 vinod - Changed extraction operators - - Revision 1.3 2000/02/09 22:18:31 vinod - includes now refer to local directory - - Revision 1.2 2000/02/09 22:15:07 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:24 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:43 vinod - Moved into VecMat directory - - Revision 1.4 2000/02/04 21:51:06 vinod - Added check for norm=1 in normalize - - Revision 1.3 2000/01/21 18:44:54 vinod - Modified fillArray funcs to not use references - - Revision 1.2 1999/11/22 03:08:34 vinod - Modified arg of fillArray functions to be a reference - - Revision 1.1 1999/10/18 05:31:35 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/Vector3d.cc b/topmodx/include/vecmat/Vector3d.cc deleted file mode 100644 index 05dd90a..0000000 --- a/topmodx/include/vecmat/Vector3d.cc +++ /dev/null @@ -1,69 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Vector3d.cc,v 1.3 2000/04/30 02:50:08 vinod Exp $ */ - -// Definitions for non-inline functions in Vector3d.hh - -#include "Vector3d.h" -#include "Vector2d.h" -#include "Vector4d.h" - -void Vector3d::copyFrom(const Vector2d& vec) -{ - elem[0] = vec[0]; elem[1] = vec[1]; elem[2] = 0.0; -} - -void Vector3d::copyFrom(const Vector4d& vec) -{ - elem[0] = vec[0]; elem[1] = vec[1]; elem[2] = vec[2]; -} - -/* - $Log: Vector3d.cc,v $ - Revision 1.3 2000/04/30 02:50:08 vinod - Moved cross product functions into Vector.cc - - Revision 1.2 2000/02/09 22:15:07 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:24 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:44 vinod - Moved into VecMat directory - - Revision 1.1 1999/10/18 05:31:34 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/Vector3d.h b/topmodx/include/vecmat/Vector3d.h deleted file mode 100644 index bbe79d6..0000000 --- a/topmodx/include/vecmat/Vector3d.h +++ /dev/null @@ -1,449 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Vector3d.hh,v 1.6 2002/10/25 15:44:14 vinod Exp $ */ - -#ifndef _VECTOR_3D_HH_ - -#define _VECTOR_3D_HH_ - -// Class for a 3-D vector. -// Derived from BaseObject -// Assumes existence of classes Vector2d and Vector4d, which are 2-D and 4-D -// versions of this class. -// All the Vector classes are forward declared in Vector.hh, along with any -// function prototypes for subroutines using 2 different kinds of Vectors - -// Functions which need the definition of the other Vector classes are defined in the -// source file, Vector3d.cc - -#include "Vector.h" - -class Vector3d; -typedef Vector3d * Vector3dPtr; - -class Vector3d : public BaseObject -{ -protected: - - double elem[3]; // 3 elements of the vector - - // Initialize the elements from a Vector2d or Vector4d - void copyFrom(const Vector2d& vec); - void copyFrom(const Vector4d& vec); - -public: - - // Default constructor - Vector3d() - : BaseObject() - { - elem[0] = elem[1] = elem[2] = 0.0; - } - - // 1 argument constructor - initialize all elements with given value - Vector3d(double val) - : BaseObject() - { - elem[0] = elem[1] = elem[2] = val; - } - - // 1 argument constructor - initialize with given array - // Assumes array has at least 3 elements - Vector3d(double * arr) - : BaseObject() - { - elem[0] = arr[0]; elem[1] = arr[1]; elem[2] = arr[2]; - } - - // 3 argument constructor - Vector3d(double val1, double val2, double val3 = 0.0) - : BaseObject() - { - elem[0] = val1; elem[1] = val2; elem[2] = val3; - } - - // Copy constructor - Vector3d(const Vector3d& vec) - : BaseObject(vec) - { - elem[0] = vec.elem[0]; elem[1] = vec.elem[1]; elem[2] = vec.elem[2]; - } - - // Construct from a Vector2d - third element is set to 0 - Vector3d(const Vector2d& vec) - : BaseObject() - { - copyFrom(vec); - } - - // Construct from a Vector4d - copies first 3 elements - Vector3d(const Vector4d& vec) - : BaseObject() - { - copyFrom(vec); - } - - // Destructor - does nothing - virtual ~Vector3d() - { - } - - // Assignment operator - Vector3d& operator = (const Vector3d& vec) - { - elem[0] = vec.elem[0]; elem[1] = vec.elem[1]; elem[2] = vec.elem[2]; - return (*this); - } - - // Assignment from a scalar - all elements are set to the scalar value - Vector3d& operator = (double scalar) - { - elem[0] = elem[1] = elem[2] = scalar; - return (*this); - } - - // Assignment from a Vector2d - third element set to 0 - Vector3d& operator = (const Vector2d& vec) - { - copyFrom(vec); - return (*this); - } - - // Assignment from a Vector4d - copies first 3 elements - Vector3d& operator = (const Vector4d& vec) - { - copyFrom(vec); - return (*this); - } - - // Make a copy of the object - // implement BaseObject class pure virtual function - virtual BaseObjectPtr copy(void) const - { - Vector3dPtr vec = new Vector3d(*this); - return vec; - } - - // Set elements of vector to given values - void set(double v1, double v2, double v3) - { - elem[0] = v1; elem[1] = v2; elem[2] = v3; - } - - void set(double val) - { - elem[0] = elem[1] = elem[2] = val; - } - - // Set elements of vector to default values - void reset(void) - { - set(0.0); - } - - // Get the elements of vector into given values - void get(double& v1, double& v2, double& v3) const - { - v1 = elem[0]; v2 = elem[1]; v3 = elem[2]; - } - - // Get the vector as a C array (double *) - const double * getCArray(void) const - { - return (const double *)elem; - } - - double * getCArray(void) - { - return (double *)elem; - } - - // Fill a 2D array with elements of the vector - void fillArray(double arr[3]) const - { - arr[0] = elem[0]; arr[1] = elem[1]; arr[2] = elem[2]; - } - - double lengthsqr() - { - return elem[0] * elem[0] + elem[1] * elem[1] + elem[2] * elem[2]; - } - -#ifndef __GNUG__ - /* GCC 3.0 and later have problems with having this and the [] operator */ - // Pointer cast operator - operator const double * (void) const - { - return (const double *)elem; - } - - operator double * (void) - { - return (double *)elem; - } -#endif - - // Element access operator - doesn't check for valid indices - double& operator [] (size_t index) - { - return elem[index]; - } - - double operator [] (size_t index) const - { - return elem[index]; - } - - // Arithmetic operators - void operator += (const Vector3d& vec) // Additive-assignment - { - elem[0] += vec.elem[0]; elem[1] += vec.elem[1]; elem[2] += vec.elem[2]; - } - - void operator -= (const Vector3d& vec) // Subtractive-assignment - { - elem[0] -= vec.elem[0]; elem[1] -= vec.elem[1]; elem[2] -= vec.elem[2]; - } - - void operator *= (double scalar) // Multiplicative-assignment (scalar) - { - elem[0] *= scalar; elem[1] *= scalar; elem[2] *= scalar; - } - - void operator /= (double scalar) // Divisive-assignment (scalar) - { - elem[0] /= scalar; elem[1] /= scalar; elem[2] /= scalar; - } - - Vector3d operator + (const Vector3d& vec) const // Addition - { - Vector3d sum(*this); - sum += vec; - return sum; - } - - Vector3d operator - (const Vector3d& vec) const // Subtraction - { - Vector3d diff(*this); - diff -= vec; - return diff; - } - - double operator * (const Vector3d& vec) const // Multiplication - dot product - { - double dotprod = elem[0] * vec.elem[0] + elem[1] * vec.elem[1] + elem[2] * vec.elem[2]; - return dotprod; - } - - Vector3d operator % (const Vector3d& vec) const // Multiplication - cross product - { - Vector3d crossp; - - crossp.elem[0] = elem[1] * vec.elem[2] - elem[2] * vec.elem[1]; - crossp.elem[1] = elem[2] * vec.elem[0] - elem[0] * vec.elem[2]; - crossp.elem[2] = elem[0] * vec.elem[1] - elem[1] * vec.elem[0]; - - return crossp; - } - - // Operators defined as friend's - friend Vector3d operator - (const Vector3d& vec) // Negation - { - Vector3d negv(-vec.elem[0], -vec.elem[1], -vec.elem[2]); - return negv; - } - - friend Vector3d operator * (double scalar, const Vector3d& vec) // Pre-multiply by scalar - { - Vector3d prod(vec); - - prod *= scalar; - return prod; - } - - friend Vector3d operator * (const Vector3d& vec, double scalar) // Post-multiply by scalar - { - Vector3d prod(vec); - - prod *= scalar; - return prod; - } - - friend Vector3d operator / (const Vector3d& vec, double scalar) // Divide by scalar - { - Vector3d prod(vec); - - prod /= scalar; - return prod; - } - - friend Vector3d product(const Vector3d& vec1, const Vector3d& vec2) // Elem-by-elem product - { - Vector3d prod(vec1[0] * vec2[0], vec1[1] * vec2[1], vec1[2] * vec2[2]); - - return prod; - } - - // Boolean operators - - bool operator == (const Vector3d& vec) const // Equality - { - if ((fabs(elem[0] - vec.elem[0]) > ZERO) || - (fabs(elem[1] - vec.elem[1]) > ZERO) || - (fabs(elem[2] - vec.elem[2]) > ZERO)) - return false; - return true; - } - - bool operator != (const Vector3d& vec) const // Inequality - { - return !((*this) == vec); - } - - // Other functions - - friend double normsqr(const Vector3d& vec) // Square of norm of the vector - { - double nsq = sqr(vec.elem[0]) + sqr(vec.elem[1]) + sqr(vec.elem[2]); - return nsq; - } - - friend double norm(const Vector3d& vec) // Norm of the vector - { - return sqrt(normsqr(vec)); - } - - friend double normalize(Vector3d& vec) // Normalize. Returns previous norm - { - double n = norm(vec); - if (!areEqual(n, 1.0) && (isNonZero(n) == true)) vec /= n; - return n; - } - - friend Vector3d normalized(const Vector3d& vec) // Return normalized vector - { - Vector3d nvec(vec); - normalize(nvec); - return nvec; - } - - friend void swap(Vector3d& vec1, Vector3d& vec2) // Swap elements of 2 Vector3ds - { - swap(vec1.elem[0], vec2.elem[0]); - swap(vec1.elem[1], vec2.elem[1]); - swap(vec1.elem[2], vec2.elem[2]); - } - - // I/O Stream operators - - friend istream& operator >> (istream& i, Vector3d& vec) // Extraction operator - { - // Separating character can be anything - // If only 1 number is there in the input stream before reaching EOL - // both elements are set to that number. - // If only 2 numbers are there, third element is set to 0 - // If EOL is reached before reading a number, vec is not changed - // Caveat: Separator char need not be the same between each element - removeWhiteSpace(i); - if (readTillFloat(i)) - { - i >> vec.elem[0]; - if (readTillFloat(i)) - { - i >> vec.elem[1]; - if (readTillFloat(i)) i >> vec.elem[2]; - else vec.elem[2] = 0.0; - } - else - vec.elem[2] = vec.elem[1] = vec.elem[0]; - } - return i; - } - - friend ostream& operator << (ostream& o, const Vector3d& vec) // Insertion operator - { - // User can set precision from 0 to 6 - o << setiosflags(ios::fixed) << setiosflags(ios::showpoint); - - int oldprec = o.precision(); - if (oldprec < 0) o << setprecision(0); - if (oldprec > 6) o << setprecision(6); - - o << "[" - << vec.elem[0] << " " - << vec.elem[1] << " " - << vec.elem[2] - << "]"; - - o << setprecision(oldprec); - return o; - } -}; - -#endif // #ifndef _VECTOR_3D_HH_ - -/* - $Log: Vector3d.hh,v $ - Revision 1.6 2002/10/25 15:44:14 vinod - Added getCArray() methods - - Revision 1.5 2002/10/17 01:34:05 vinod - Added pointer cast operator - - Revision 1.4 2000/04/19 20:41:49 vinod - Changed extraction operators - - Revision 1.3 2000/02/09 22:18:31 vinod - includes now refer to local directory - - Revision 1.2 2000/02/09 22:15:08 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:24 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:44 vinod - Moved into VecMat directory - - Revision 1.5 2000/02/04 21:51:06 vinod - Added check for norm=1 in normalize - - Revision 1.4 2000/01/21 22:12:16 vinod - Added implicit 2 arg constructor - - Revision 1.3 2000/01/21 18:44:54 vinod - Modified fillArray funcs to not use references - - Revision 1.2 1999/11/22 03:08:35 vinod - Modified arg of fillArray functions to be a reference - - Revision 1.1 1999/10/18 05:31:36 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/Vector4d.cc b/topmodx/include/vecmat/Vector4d.cc deleted file mode 100644 index e76eacf..0000000 --- a/topmodx/include/vecmat/Vector4d.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: Vector4d.cc,v 1.2 2000/02/09 22:15:08 vinod Exp $ */ - -// Definitions for non-inline functions in Vector4d.hh - -#include "Vector4d.h" -#include "Vector2d.h" -#include "Vector3d.h" - -void Vector4d::copyFrom(const Vector2d& vec) -{ - elem[0] = vec[0]; elem[1] = vec[1]; elem[2] = elem[3] = 0.0; -} - -void Vector4d::copyFrom(const Vector3d& vec) -{ - elem[0] = vec[0]; elem[1] = vec[1]; elem[2] = vec[2]; elem[3] = 0.0; -} - -/* - $Log: Vector4d.cc,v $ - Revision 1.2 2000/02/09 22:15:08 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:25 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:44 vinod - Moved into VecMat directory - - Revision 1.1 1999/10/18 05:31:35 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/Vector4d.h b/topmodx/include/vecmat/Vector4d.h deleted file mode 100644 index bfd362c..0000000 --- a/topmodx/include/vecmat/Vector4d.h +++ /dev/null @@ -1,445 +0,0 @@ -/* $Id: Vector4d.hh,v 1.6 2002/10/25 15:44:14 vinod Exp $ */ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _VECTOR_4D_HH_ - -#define _VECTOR_4D_HH_ - -// Class for a 4-D vector. -// Derived from BaseObject -// Assumes existence of classes Vector3d and Vector4d, which are 3-D and 4-D -// versions of this class. -// All the Vector classes are forward declared in Vector.hh, along with any -// function prototypes for subroutines using 2 different kinds of Vectors - -// Functions which need the definition of the other Vector classes are defined in the -// source file, Vector4d.cc - -#include "Vector.h" - -class Vector4d; -typedef Vector4d *Vector4dPtr; - -class Vector4d : public BaseObject -{ -public: - - // Default constructor - Vector4d() - : BaseObject() - { - elem[0] = elem[1] = elem[2] = elem[3] = 0.0; - } - - // 1 argument constructor - intialize all elements with given value - Vector4d(double val) - : BaseObject() - { - elem[0] = elem[1] = elem[2] = elem[3] = val; - } - - // 1 argument constructor - initialize with given array - // Assumes array has atleast 4 elements - Vector4d(double * arr) - : BaseObject() - { - elem[0] = arr[0]; elem[1] = arr[1]; elem[2] = arr[2]; elem[3] = arr[3]; - } - - // 4 argument constructor - Vector4d(double val1, double val2, double val3, double val4) - : BaseObject() - { - elem[0] = val1; elem[1] = val2; elem[2] = val3; elem[3] = val4; - } - - // Copy constructor - Vector4d(const Vector4d& vec) - : BaseObject(vec) - { - elem[0] = vec.elem[0]; elem[1] = vec.elem[1]; - elem[2] = vec.elem[2]; elem[3] = vec.elem[3]; - } - - // Construct from a Vector2d - third and fourth elements are set to 0 - Vector4d(const Vector2d& vec) - : BaseObject() - { - copyFrom(vec); - } - - // Construct from a Vector3d - fourth element is set to 0 - Vector4d(const Vector3d& vec) - : BaseObject() - { - copyFrom(vec); - } - - // Destructor - does nothing - virtual ~Vector4d() - { - } - - // Assignment operator - Vector4d& operator = (const Vector4d& vec) - { - elem[0] = vec.elem[0]; elem[1] = vec.elem[1]; - elem[2] = vec.elem[2]; elem[3] = vec.elem[3]; - return (*this); - } - - // Assignment from a scalar - all elements are set to the scalar value - Vector4d& operator = (double scalar) - { - elem[0] = elem[1] = elem[2] = elem[3] = scalar; - return (*this); - } - - // Assignment from a Vector2d - third and fourth elements are set to 0 - Vector4d& operator = (const Vector2d& vec) - { - copyFrom(vec); - return (*this); - } - - // Assignment from a Vector3d - fourth element is set to 0 - Vector4d& operator = (const Vector3d& vec) - { - copyFrom(vec); - return (*this); - } - - // Make a copy of the object - // implement BaseObject class pure virtual function - virtual BaseObjectPtr copy(void) const - { - Vector4dPtr vec = new Vector4d(*this); - return vec; - } - - // Set elements of vector to given values - void set(double v1, double v2, double v3, double v4) - { - elem[0] = v1; elem[1] = v2; elem[2] = v3; elem[3] = v4; - } - - void set(double val) - { - elem[0] = elem[1] = elem[2] = elem[3] = val; - } - - // Set elements of vector to default values - void reset(void) - { - set(0.0); - } - - // Get the elements of vector into given values - void get(double& v1, double& v2, double& v3, double& v4) const - { - v1 = elem[0]; v2 = elem[1]; v3 = elem[2]; v4 = elem[3]; - } - - // Get the vector as a C array (double *) - const double * getCArray(void) const - { - return (const double *)elem; - } - - double * getCArray(void) - { - return (double *)elem; - } - - // Fill a 2D array with elements of the vector - void fillArray(double arr[4]) const - { - arr[0] = elem[0]; arr[1] = elem[1]; arr[2] = elem[2]; arr[3] = elem[3]; - } - -#ifndef __GNUG__ - /* GCC 3.0 and later have problems with having this and the [] operator */ - // Pointer cast operator - operator const double * (void) const - { - return (const double *)elem; - } - - operator double * (void) - { - return (double *)elem; - } -#endif - - // Element access operator - doesn't check for valid indices - double& operator [] (uint index) - { - return elem[index]; - } - - double operator [] (uint index) const - { - return elem[index]; - } - - // Arithmetic operators - void operator += (const Vector4d& vec) // Additive-assignment - { - elem[0] += vec.elem[0]; elem[1] += vec.elem[1]; - elem[2] += vec.elem[2]; elem[2] += vec.elem[2]; - } - - void operator -= (const Vector4d& vec) // Subtractive-assignment - { - elem[0] -= vec.elem[0]; elem[1] -= vec.elem[1]; - elem[2] -= vec.elem[2]; elem[3] -= vec.elem[3]; - } - - void operator *= (double scalar) // Multiplicative-assignment (scalar) - { - elem[0] *= scalar; elem[1] *= scalar; elem[2] *= scalar; elem[3] *= scalar; - } - - void operator /= (double scalar) // Divisive-assignment (scalar) - { - elem[0] /= scalar; elem[1] /= scalar; elem[2] /= scalar; elem[3] /= scalar; - } - - Vector4d operator + (const Vector4d& vec) const // Addition - { - Vector4d sum(*this); - sum += vec; - return sum; - } - - Vector4d operator - (const Vector4d& vec) const // Subtraction - { - Vector4d diff(*this); - diff -= vec; - return diff; - } - - double operator * (const Vector4d& vec) const // Multiplication - dot product - { - double dotprod = elem[0] * vec.elem[0] + elem[1] * vec.elem[1] - + elem[2] * vec.elem[2] + elem[3] * vec.elem[3]; - return dotprod; - } - - // Operators defined as friend's - friend Vector4d operator - (const Vector4d& vec) // Negation - { - Vector4d negv(-vec.elem[0], -vec.elem[1], -vec.elem[2], -vec.elem[3]); - return negv; - } - - friend Vector4d operator * (double scalar, const Vector4d& vec) // Pre-multiply by scalar - { - Vector4d prod(vec); - - prod *= scalar; - return prod; - } - - friend Vector4d operator * (const Vector4d& vec, double scalar) // Post-multiply by scalar - { - Vector4d prod(vec); - - prod *= scalar; - return prod; - } - - friend Vector4d operator / (const Vector4d& vec, double scalar) // Divide by scalar - { - Vector4d prod(vec); - - prod /= scalar; - return prod; - } - - friend Vector4d product(const Vector4d& vec1, const Vector4d& vec2) // Elem-by-elem product - { - Vector4d prod(vec1[0] * vec2[0], vec1[1] * vec2[1], vec1[2] * vec2[2], vec1[3] * vec2[3]); - - return prod; - } - - // Boolean operators - - bool operator == (const Vector4d& vec) const // Equality - { - if ((fabs(elem[0] - vec.elem[0]) > ZERO) || - (fabs(elem[1] - vec.elem[1]) > ZERO) || - (fabs(elem[2] - vec.elem[2]) > ZERO) || - (fabs(elem[3] - vec.elem[3]) > ZERO)) - return false; - return true; - } - - bool operator != (const Vector4d& vec) const // Inequality - { - return !((*this) == vec); - } - - // Other functions - - friend double normsqr(const Vector4d& vec) // Square of norm of the vector - { - double nsq = sqr(vec.elem[0]) + sqr(vec.elem[1]) + sqr(vec.elem[2]) + sqr(vec.elem[3]); - return nsq; - } - - friend double norm(const Vector4d& vec) // Norm of the vector - { - return sqrt(normsqr(vec)); - } - - friend double normalize(Vector4d& vec) // Normalize. Returns previous norm - { - double n = norm(vec); - if (!areEqual(n, 1.0) && (isNonZero(n) == true)) vec /= n; - return n; - } - - friend Vector4d normalized(const Vector4d& vec) // Return normalized vector - { - Vector4d nvec(vec); - normalize(nvec); - return nvec; - } - - friend void swap(Vector4d& vec1, Vector4d& vec2) // Swap elements of 2 Vector4ds - { - swap(vec1.elem[0], vec2.elem[0]); - swap(vec1.elem[1], vec2.elem[1]); - swap(vec1.elem[2], vec2.elem[2]); - swap(vec1.elem[3], vec2.elem[3]); - } - - // I/O Stream operators - - friend istream& operator >> (istream& i, Vector4d& vec) // Extraction operator - { - // Separating character can be anything - // If only 1 number is there in the input stream before reaching EOL - // both elements are set to that number. - // If only 2/3 numbers are there, remaining elements are set to 0 - // If EOL is reached before reading a number, vec is not changed - // Caveat: Separator char need not be the same between each element - removeWhiteSpace(i); - if (readTillFloat(i)) - { - i >> vec.elem[0]; - if (readTillFloat(i)) - { - i >> vec.elem[1]; - if (readTillFloat(i)) - { - i >> vec.elem[2]; - if (readTillFloat(i)) i >> vec.elem[3]; - else vec.elem[3] = 0.0; - } - else - vec.elem[3] = vec.elem[2] = 0.0; - } - else - vec.elem[3] = vec.elem[2] = vec.elem[1] = vec.elem[0]; - } - return i; - } - - friend ostream& operator << (ostream& o, const Vector4d& vec) // Insertion operator - { - // User can set precision from 0 to 6 - o << setiosflags(ios::fixed) << setiosflags(ios::showpoint); - - int oldprec = o.precision(); - if (oldprec < 0) o << setprecision(0); - if (oldprec > 6) o << setprecision(6); - - o << "[" - << vec.elem[0] << " " - << vec.elem[1] << " " - << vec.elem[2] << " " - << vec.elem[3] - << "]"; - - o << setprecision(oldprec); - return o; - } - -protected: - // Initialize the elements from a Vector2d or Vector3d - void copyFrom(const Vector2d& vec); - void copyFrom(const Vector3d& vec); - -protected: - // 4 elements of the vector - double elem[4]; - -}; - -#endif // #ifndef _VECTOR_4D_HH_ - -/* - $Log: Vector4d.hh,v $ - Revision 1.6 2002/10/25 15:44:14 vinod - Added getCArray() methods - - Revision 1.5 2002/10/17 01:34:06 vinod - Added pointer cast operator - - Revision 1.4 2000/04/19 20:41:49 vinod - Changed extraction operators - - Revision 1.3 2000/02/09 22:18:31 vinod - includes now refer to local directory - - Revision 1.2 2000/02/09 22:15:08 vinod - Code modifications to take care of file/class renames - - Revision 1.1 2000/02/09 22:01:25 vinod - Renamed - - Revision 1.1 2000/02/09 21:21:45 vinod - Moved into VecMat directory - - Revision 1.4 2000/02/04 21:51:06 vinod - Added check for norm=1 in normalize - - Revision 1.3 2000/01/21 18:44:55 vinod - Modified fillArray funcs to not use references - - Revision 1.2 1999/11/22 03:08:35 vinod - Modified arg of fillArray functions to be a reference - - Revision 1.1 1999/10/18 05:31:36 vinod - Vectors using statically allocated arrays - -*/ diff --git a/topmodx/include/vecmat/vecmat.pro b/topmodx/include/vecmat/vecmat.pro deleted file mode 100644 index e32985f..0000000 --- a/topmodx/include/vecmat/vecmat.pro +++ /dev/null @@ -1,40 +0,0 @@ -message (Compiler = $$QMAKE_CXX) -# QMAKE_CXX= -TEMPLATE = lib -CONFIG -= qt -CONFIG += staticlib #dll # build shared library -# CONFIG += debug warn_off create_prl -CONFIG += debug warn_off create_prl -TARGET = vecmat -CONFIG(debug, debug|release) { - LIB_CONF_SUB_DIR = Debug -} else { - LIB_CONF_SUB_DIR = Debug -} -DESTDIR = ../../lib/$${LIB_CONF_SUB_DIR} - -macx { - # compile release + universal binary - CONFIG += x86 ppc - #CONFIG += lib_bundle - #QMAKE_BUNDLE_EXTENSION = .framework -} - -INCLUDEPATH += ./.. - -HEADERS += \ - Matrix3x3.h \ - Matrix4x4.h \ - Quaternion.h \ - Vector.h \ - Vector2d.h \ - Vector3d.h \ - Vector4d.h - -SOURCES += \ - Matrix3x3.cc \ - Matrix4x4.cc \ - Vector.cc \ - Vector2d.cc \ - Vector3d.cc \ - Vector4d.cc diff --git a/topmodx/include/verse/DNA_ID.h b/topmodx/include/verse/DNA_ID.h deleted file mode 100644 index ee9867b..0000000 --- a/topmodx/include/verse/DNA_ID.h +++ /dev/null @@ -1,157 +0,0 @@ -/** - * blenlib/DNA_ID.h (mar-2001 nzc) - * - * ID and Library types, which are fundamental for sdna, - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef DNA_ID_H -#define DNA_ID_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* There's a nasty circular dependency here.... void* to the rescue! I - * really wonder why this is needed. */ - -struct Library; -struct FileData; - -/* watch it: Sequence has identical beginning. */ -/** - * ID is the first thing included in all serializable types. It - * provides a common handle to place all data in double-linked lists. - * */ -typedef struct ID { - void *next, *prev; - struct ID *newid; - struct Library *lib; - char name[24]; - short us; - /** - * LIB_... flags report on status of the datablock this ID belongs - * to. - */ - short flag; - int pad; -} ID; - -/** - * For each library file used, a Library struct is added to Main - */ -typedef struct Library { - ID id; - ID *idblock; - struct FileData *filedata; - char name[160]; - int tot, pad; /* tot, idblock and filedata are only fo read and write */ -} Library; - -/** - * Defines for working with IDs. - * - * The tags represent types! This is a dirty way of enabling RTTI. The - * sig_byte end endian defines aren't really used much. - * - **/ - -#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__) -/* big endian */ -#define MAKE_ID2(c, d) ( (c)<<8 | (d) ) -#define MOST_SIG_BYTE 0 -#define BBIG_ENDIAN -#else -/* little endian */ -#define MAKE_ID2(c, d) ( (d)<<8 | (c) ) -#define MOST_SIG_BYTE 1 -#define BLITTLE_ENDIAN -#endif - -/* ID */ -#define ID_SCE MAKE_ID2('S', 'C') -#define ID_LI MAKE_ID2('L', 'I') -#define ID_OB MAKE_ID2('O', 'B') -#define ID_ME MAKE_ID2('M', 'E') -#define ID_CU MAKE_ID2('C', 'U') -#define ID_MB MAKE_ID2('M', 'B') -#define ID_MA MAKE_ID2('M', 'A') -#define ID_TE MAKE_ID2('T', 'E') -#define ID_IM MAKE_ID2('I', 'M') -#define ID_IK MAKE_ID2('I', 'K') -#define ID_WV MAKE_ID2('W', 'V') -#define ID_LT MAKE_ID2('L', 'T') -#define ID_SE MAKE_ID2('S', 'E') -#define ID_LF MAKE_ID2('L', 'F') -#define ID_LA MAKE_ID2('L', 'A') -#define ID_CA MAKE_ID2('C', 'A') -#define ID_IP MAKE_ID2('I', 'P') -#define ID_KE MAKE_ID2('K', 'E') -#define ID_WO MAKE_ID2('W', 'O') -#define ID_SCR MAKE_ID2('S', 'R') -#define ID_VF MAKE_ID2('V', 'F') -#define ID_TXT MAKE_ID2('T', 'X') -#define ID_SO MAKE_ID2('S', 'O') -#define ID_SAMPLE MAKE_ID2('S', 'A') -#define ID_GR MAKE_ID2('G', 'R') -#define ID_ID MAKE_ID2('I', 'D') -#define ID_SEQ MAKE_ID2('S', 'Q') -#define ID_AR MAKE_ID2('A', 'R') -#define ID_AC MAKE_ID2('A', 'C') -#define ID_SCRIPT MAKE_ID2('P', 'Y') - -#define IPO_CO MAKE_ID2('C', 'O') /* NOTE! This is not an ID, but is needed for g.sipo->blocktype */ -#define ID_NLA MAKE_ID2('N', 'L') /* fake ID for outliner */ - -#define ID_VS MAKE_ID2('V', 'S') /* fake id for VerseSession, need for outliner */ -#define ID_VN MAKE_ID2('V', 'N') /* fake id for VerseNode, need for outliner */ - -/* id->flag: set frist 8 bits always at zero while reading */ -#define LIB_LOCAL 0 -#define LIB_EXTERN 1 -#define LIB_INDIRECT 2 -#define LIB_TEST 8 -#define LIB_TESTEXT 9 -#define LIB_TESTIND 10 -#define LIB_READ 16 -#define LIB_NEEDLINK 32 - -#define LIB_NEW 256 -#define LIB_FAKEUSER 512 -/* free test flag */ -#define LIB_DOIT 1024 - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/DNA_listBase.h b/topmodx/include/verse/DNA_listBase.h deleted file mode 100644 index 10a1b59..0000000 --- a/topmodx/include/verse/DNA_listBase.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * blenlib/BLI_listBase.h mar 2001 Nzc - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - * - * These structs are the foundation for all linked lists in the - * library system. - * - */ - -#ifndef DNA_LISTBASE_H -#define DNA_LISTBASE_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct Link -{ - struct Link *next,*prev; -} Link; - -/* never change the size of this! genfile.c detects pointerlen with it */ -typedef struct ListBase -{ - void *first, *last; -} ListBase; - -/* 8 byte alignment! */ - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/DNA_mesh_types.h b/topmodx/include/verse/DNA_mesh_types.h deleted file mode 100644 index f0eef23..0000000 --- a/topmodx/include/verse/DNA_mesh_types.h +++ /dev/null @@ -1,171 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef DNA_MESH_TYPES_H -#define DNA_MESH_TYPES_H - -#include "DNA_listBase.h" -#include "DNA_ID.h" - -struct DerivedMesh; -struct DispListMesh; -struct Ipo; -struct Key; -struct Material; -struct MVert; -struct MEdge; -struct MFace; -struct MCol; -struct MSticky; -struct Mesh; -struct OcInfo; - -typedef struct TFace { - - /* this one gets interpreted as a image in texture.c */ - void *tpage; - - float uv[4][2]; /* when you change this: also do function set_correct_uv in editmesh.c, and there are more locations that use the size of this part */ - unsigned int col[4]; - char flag, transp; - short mode, tile, unwrap; -} TFace; - -typedef struct Mesh { - ID id; - - struct BoundBox *bb; - - ListBase effect; - - struct Ipo *ipo; - struct Key *key; - struct Material **mat; - - struct MFace *mface; - struct TFace *tface; - void *dface; - struct MVert *mvert; - struct MEdge *medge; - struct MDeformVert *dvert; /* __NLA */ - struct MCol *mcol; - struct MSticky *msticky; - struct Mesh *texcomesh; - - struct OcInfo *oc; /* not written in file */ - void *sumohandle; - - int totvert, totedge, totface; - int texflag; - - float loc[3]; - float size[3]; - float rot[3]; - - float cubemapsize, pad; - - short smoothresh, flag; - - short subdiv, subdivr; - short totcol; - short subsurftype; - - /* not written in file, pointer at geometry VerseNode */ - void *vnode; -} Mesh; - - - -/* **************** MESH ********************* */ - -/* texflag */ -#define AUTOSPACE 1 - -/* me->flag */ -#define ME_ISDONE 1 -#define ME_NOPUNOFLIP 2 -#define ME_TWOSIDED 4 -#define ME_UVEFFECT 8 -#define ME_VCOLEFFECT 16 -#define ME_AUTOSMOOTH 32 -#define ME_SMESH 64 -#define ME_SUBSURF 128 -#define ME_OPT_EDGES 256 - -/* Subsurf Type */ -#define ME_CC_SUBSURF 0 -#define ME_SIMPLE_SUBSURF 1 - -#define TF_DYNAMIC 1 -/* #define TF_INVISIBLE 2 */ -#define TF_TEX 4 -#define TF_SHAREDVERT 8 -#define TF_LIGHT 16 - -#define TF_SHAREDCOL 64 -#define TF_TILES 128 -#define TF_BILLBOARD 256 -#define TF_TWOSIDE 512 -#define TF_INVISIBLE 1024 - -#define TF_OBCOL 2048 -#define TF_BILLBOARD2 4096 /* with Z axis constraint */ -#define TF_SHADOW 8192 -#define TF_BMFONT 16384 - -/* tface->flag: 1=select 2=active*/ -#define TF_SELECT 1 -#define TF_ACTIVE 2 -#define TF_SEL1 4 -#define TF_SEL2 8 -#define TF_SEL3 16 -#define TF_SEL4 32 -#define TF_HIDE 64 - -/* tface->transp */ -#define TF_SOLID 0 -#define TF_ADD 1 -#define TF_ALPHA 2 -#define TF_SUB 3 - -/* tface->unwrap */ -#define TF_SEAM1 1 -#define TF_SEAM2 2 -#define TF_SEAM3 4 -#define TF_SEAM4 8 -#define TF_PIN1 16 -#define TF_PIN2 32 -#define TF_PIN3 64 -#define TF_PIN4 128 - -#define MESH_MAX_VERTS 2000000000L - -#endif diff --git a/topmodx/include/verse/DNA_meshdata_types.h b/topmodx/include/verse/DNA_meshdata_types.h deleted file mode 100644 index eaacdb3..0000000 --- a/topmodx/include/verse/DNA_meshdata_types.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef DNA_MESHDATA_TYPES_H -#define DNA_MESHDATA_TYPES_H - -struct Bone; - -typedef struct MFace { - unsigned int v1, v2, v3, v4; - char pad, mat_nr; - char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */ -} MFace; - -typedef struct MEdge { - unsigned int v1, v2; - char crease, pad; - short flag; -} MEdge; - -typedef struct MDeformWeight { - int def_nr; - float weight; -} MDeformWeight; - -typedef struct MDeformVert { - struct MDeformWeight *dw; - int totweight; - int flag; // flag only in use for weightpaint now -} MDeformVert; - -typedef struct MVert { - float co[3]; - short no[3]; - char flag, mat_nr; -} MVert; - -typedef struct MCol { - char a, r, g, b; -} MCol; - -typedef struct MSticky { - float co[2]; -} MSticky; - -/* mvert->flag (1=SELECT) */ -#define ME_SPHERETEST 2 -#define ME_SPHERETEMP 4 -#define ME_HIDE 16 -#define ME_VERT_STEPINDEX (1<<7) - -/* medge->flag (1=SELECT)*/ -#define ME_EDGEDRAW (1<<1) -#define ME_SEAM (1<<2) -#define ME_FGON (1<<3) - // reserve 16 for ME_HIDE -#define ME_EDGERENDER (1<<5) -#define ME_LOOSEEDGE (1<<7) -#define ME_EDGE_STEPINDEX (1<<15) - -/* puno = vertexnormal (mface) */ -#define ME_FLIPV1 1 -#define ME_FLIPV2 2 -#define ME_FLIPV3 4 -#define ME_FLIPV4 8 -#define ME_PROJXY 16 -#define ME_PROJXZ 32 -#define ME_PROJYZ 64 - -/* edcode (mface) */ -#define ME_V1V2 1 -#define ME_V2V3 2 -#define ME_V3V1 4 -#define ME_V3V4 4 -#define ME_V4V1 8 - -/* flag (mface) */ -#define ME_SMOOTH 1 -#define ME_FACE_SEL 2 - /* flag ME_HIDE==16 is used here too */ -#define ME_FACE_STEPINDEX (1<<7) - -#endif diff --git a/topmodx/include/verse/DNA_object_types.h b/topmodx/include/verse/DNA_object_types.h deleted file mode 100644 index 62b1394..0000000 --- a/topmodx/include/verse/DNA_object_types.h +++ /dev/null @@ -1,387 +0,0 @@ -/** - * blenlib/DNA_object_types.h (mar-2001 nzc) - * - * Object is a sort of wrapper for general info. - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef DNA_OBJECT_TYPES_H -#define DNA_OBJECT_TYPES_H - -#include "DNA_listBase.h" -#include "DNA_ID.h" -#include "DNA_scriptlink_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct bPose; -struct Object; -struct Ipo; -struct BoundBox; -struct Path; -struct Material; -struct bConstraintChannel; -struct PartDeflect; -struct SoftBody; -struct FluidsimSettings; -struct DerivedMesh; - -typedef struct bDeformGroup { - struct bDeformGroup *next, *prev; - char name[32]; -} bDeformGroup; - -typedef struct BoundBox { - float vec[8][3]; -} BoundBox; - -/* OcInfo and LBuf structs are for the Enji gameengine */ - -typedef struct OcInfo { - float dvec[3]; - float size[3]; -} OcInfo; - -typedef struct LBuf { - short tot, max; - int pad; - struct Object **ob; -} LBuf; - - -typedef struct Object { - ID id; - - short type, partype; - int par1, par2, par3; /* can be vertexnrs */ - char parsubstr[32]; /* String describing subobject info */ - void *pardata; - struct Object *parent, *track; - struct Ipo *ipo; - struct Path *path; - struct BoundBox *bb; - struct bAction *action; - struct bPose *pose; - void *data; - - ListBase constraintChannels; - ListBase effect; - ListBase network; - ListBase disp; - ListBase defbase; - ListBase modifiers; /* list of ModifierData structures */ - - struct Material **mat; - - /* rot en drot have to be together! (transform('r' en 's')) */ - float loc[3], dloc[3], orig[3]; - float size[3], dsize[3]; - float rot[3], drot[3]; - float quat[4], dquat[4]; - float obmat[4][4]; - float parentinv[4][4]; - float imat[4][4]; /* for during render, old game engine, temporally: ipokeys of transform */ - - unsigned int lay; /* copy of Base */ - short flag; /* copy of Base */ - short colbits; /* when zero, from obdata */ - char transflag, ipoflag; - char trackflag, upflag; - short ipowin, scaflag; /* ipowin: blocktype last ipowindow */ - short scavisflag, boundtype; - - short dupon, dupoff, dupsta, dupend; - - float sf, ctime; - - /* during realtime */ - - /* note that inertia is only called inertia for historical reasons - * and is not changed to avoid DNA surgery. It actually reflects the - * Size value in the GameButtons (= radius) */ - - float mass, damping, inertia; - /* The form factor k is introduced to give the user more control - * and to fix incompatibility problems. - * For rotational symmetric objects, the inertia value can be - * expressed as: Theta = k * m * r^2 - * where m = Mass, r = Radius - * For a Sphere, the form factor is by default = 0.4 - */ - - float formfactor, softtime; /* softtime temp for softbody, remove it before release! */ - float rdamping, sizefac; - - char dt, dtx; - char totcol; /* copy of mesh or curve or meta */ - char actcol; - - ScriptLink scriptlink; - ListBase prop; - ListBase sensors; - ListBase controllers; - ListBase actuators; - - void *sumohandle; - - float bbsize[3]; - short dfras; - unsigned short actdef; /* current deformation group */ - float col[4]; - /** - * Settings for game objects - * bit 0: Object has dynamic behaviour - * bit 2: Object is evaluated by the gameengine - * bit 6: Use Fh settings in Materials - * bit 7: Use face normal to rotate Object - * bit 8: Friction is anisotropic - * bit 9: Object is a ghost - * bit 10: Do rigid body dynamics. - * bit 11: Use bounding object for physics - */ - int gameflag; - /** - * More settings - * bit 15: Always ignore activity culling - */ - int gameflag2; - short softflag; /* softboday settings */ - short recalc; /* dependency flag */ - float anisotropicFriction[3]; - - ListBase constraints; - ListBase nlastrips; - ListBase hooks; - - struct PartDeflect *pd; /* particle deflector/attractor/collision data */ - struct SoftBody *soft; /* if exists, saved in file */ - struct Life *life; - - LBuf lbuf; - LBuf port; - - float pad3, smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */ - - void *vnode; /* pointer at object VerseNode */ - - short fluidsimFlag; /* NT toggle fluidsim participation on/off */ - short dnapadFluidsimDummy1, dnapadFluidsimDummy2, dnapadFluidsimDummy3; /* 8byte align */ - struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ - - struct DerivedMesh *derivedDeform, *derivedFinal; -} Object; - -typedef struct ObHook { - struct ObHook *next, *prev; - - struct Object *parent; - float parentinv[4][4]; /* matrix making current transform unmodified */ - float mat[4][4]; /* temp matrix while hooking */ - float cent[3]; /* visualization of hook */ - float falloff; /* if not zero, falloff is distance where influence zero */ - - char name[32]; - - int *indexar; - int totindex, curindex; /* curindex is cache for fast lookup */ - short type, active; /* active is only first hook, for button menu */ - float force; -} ObHook; - - -/* this work object is defined in object.c */ -extern Object workob; - - -/* **************** OBJECT ********************* */ - -/* used many places... should be specialized */ -#define SELECT 1 - -/* type */ -#define OB_EMPTY 0 -#define OB_MESH 1 -#define OB_CURVE 2 -#define OB_SURF 3 -#define OB_FONT 4 -#define OB_MBALL 5 - -#define OB_LAMP 10 -#define OB_CAMERA 11 - -#define OB_WAVE 21 -#define OB_LATTICE 22 - -/* 23 and 24 are for life and sector (old file compat.) */ -#define OB_ARMATURE 25 - -/* partype: first 4 bits: type */ -#define PARTYPE 15 -#define PAROBJECT 0 -#define PARCURVE 1 -#define PARKEY 2 - -#define PARSKEL 4 -#define PARVERT1 5 -#define PARVERT3 6 -#define PARBONE 7 -#define PARSLOW 16 - -/* char! transflag */ -#define OB_OFFS_LOCAL 1 -#define OB_QUAT 2 -#define OB_NEG_SCALE 4 -#define OB_DUPLI (8+16) -#define OB_DUPLIFRAMES 8 -#define OB_DUPLIVERTS 16 -#define OB_DUPLIROT 32 -#define OB_DUPLINOSPEED 64 - -#define OB_POWERTRACK 128 - -/* char! ipoflag */ -#define OB_DRAWKEY 1 -#define OB_DRAWKEYSEL 2 -#define OB_OFFS_OB 4 -#define OB_OFFS_MAT 8 -#define OB_OFFS_VKEY 16 -#define OB_OFFS_PATH 32 -#define OB_OFFS_PARENT 64 -#define OB_OFFS_PARTICLE 128 - - -/* trackflag / upflag */ -#define OB_POSX 0 -#define OB_POSY 1 -#define OB_POSZ 2 -#define OB_NEGX 3 -#define OB_NEGY 4 -#define OB_NEGZ 5 - -/* gameflag in game.h */ - -/* dt: nummers */ -#define OB_BOUNDBOX 1 -#define OB_WIRE 2 -#define OB_SOLID 3 -#define OB_SHADED 4 -#define OB_TEXTURE 5 - -/* dtx: flags, char! */ -#define OB_AXIS 2 -#define OB_TEXSPACE 4 -#define OB_DRAWNAME 8 -#define OB_DRAWIMAGE 16 - /* for solid+wire display */ -#define OB_DRAWWIRE 32 - /* for overdraw */ -#define OB_DRAWXRAY 64 - /* enable transparent draw */ -#define OB_DRAWTRANSP 128 - -/* boundtype */ -#define OB_BOUND_BOX 0 -#define OB_BOUND_SPHERE 1 -#define OB_BOUND_CYLINDER 2 -#define OB_BOUND_CONE 3 -#define OB_BOUND_POLYH 4 -#define OB_BOUND_POLYT 5 - -/* also needed for base!!!!! or rather, thy interfere....*/ -/* base->flag and ob->flag */ -#define BA_WAS_SEL 2 -#define BA_HAS_RECALC_OB 4 -#define BA_HAS_RECALC_DATA 8 - -#define BA_DO_IPO 32 -#define OB_GONNA_MOVE 32 - -#define BA_FROMSET 128 -#define OB_DO_IMAT 256 -#define OB_FROMDUPLI 512 -#define OB_DONE 1024 -#define OB_RADIO 2048 -#define OB_FROMGROUP 4096 -#define OB_POSEMODE 8192 - -/* ob->recalc (flag bits!) */ -#define OB_RECALC_OB 1 -#define OB_RECALC_DATA 2 -#define OB_RECALC 3 - - -/* ob->gameflag */ -#define OB_DYNAMIC 1 -#define OB_CHILD 2 -#define OB_ACTOR 4 -#define OB_INERTIA_LOCK_X 8 -#define OB_INERTIA_LOCK_Y 16 -#define OB_INERTIA_LOCK_Z 32 -#define OB_DO_FH 64 -#define OB_ROT_FH 128 -#define OB_ANISOTROPIC_FRICTION 256 -#define OB_GHOST 512 -#define OB_RIGID_BODY 1024 -#define OB_BOUNDS 2048 - -#define OB_COLLISION_RESPONSE 4096 -#define OB_SECTOR 8192 -#define OB_PROP 16384 -#define OB_MAINACTOR 32768 - -/* ob->gameflag2 */ -#define OB_NEVER_DO_ACTIVITY_CULLING 1 - -#define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD) - -/* ob->scavisflag */ -#define OB_VIS_SENS 1 -#define OB_VIS_CONT 2 -#define OB_VIS_ACT 4 - -/* ob->scaflag */ -#define OB_SHOWSENS 64 -#define OB_SHOWACT 128 -#define OB_ADDSENS 256 -#define OB_ADDCONT 512 -#define OB_ADDACT 1024 -#define OB_SHOWCONT 2048 - -/* ob->softflag in DNA_object_force.h */ - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/DNA_scriptlink_types.h b/topmodx/include/verse/DNA_scriptlink_types.h deleted file mode 100644 index 8a08d3f..0000000 --- a/topmodx/include/verse/DNA_scriptlink_types.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * blenlib/DNA_object_types.h (mar-2001 nzc) - * - * Scriptlink is hard-coded in object for some reason. - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef DNA_SCRIPTLINK_TYPES_H -#define DNA_SCRIPTLINK_TYPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct ID; - -typedef struct ScriptLink { - struct ID **scripts; - short *flag; - - short actscript, totscript; - int pad; -} ScriptLink; - -/* **************** SCRIPTLINKS ********************* */ - -#define SCRIPT_FRAMECHANGED 1 -#define SCRIPT_ONLOAD 2 -#define SCRIPT_REDRAW 4 -#define SCRIPT_ONSAVE 8 -#define SCRIPT_RENDER 16 -/* POSTRENDER is not meant for the UI, it simply calls the - * RENDER script links for clean-up actions */ -#define SCRIPT_POSTRENDER 32 - -/* **************** SPACE HANDLERS ********************* */ -/* these are special scriptlinks that can be assigned to - * a given space in a given ScrArea to: - * - (EVENT type) handle events sent to that space; - * - (DRAW type) draw on the space after its own drawing function finishes - */ -#define SPACEHANDLER_VIEW3D_EVENT 1 -#define SPACEHANDLER_VIEW3D_DRAW 2 - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/topmodx/include/verse/MEM_guardedalloc.h b/topmodx/include/verse/MEM_guardedalloc.h deleted file mode 100644 index 511ff4e..0000000 --- a/topmodx/include/verse/MEM_guardedalloc.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * Guarded memory (de)allocation - * - * - * @mainpage MEM - c-style guarded memory allocation - * - * @section about About the MEM module - * - * MEM provides guarded malloc/calloc calls. All memory is enclosed by - * pads, to detect out-of-bound writes. All blocks are placed in a - * linked list, so they remain reachable at all times. There is no - * back-up in case the linked-list related data is lost. - * - * @section issues Known issues with MEM - * - * There are currently no known issues with MEM. Note that there is a - * second intern/ module with MEM_ prefix, for use in c++. - * - * @section dependencies Dependencies - * - * - stdlib - * - * - stdio - * - * */ - -#ifndef MEM_MALLOCN_H -#define MEM_MALLOCN_H - -/* Needed for FILE* */ -#include "stdio.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /** Returns the lenght of the allocated memory segment pointed at - * by vmemh. If the pointer was not previously allocated by this - * module, the result is undefined.*/ - int MEM_allocN_len(void *vmemh); - - /** - * Release memory previously allocatred by this module. - */ - short MEM_freeN(void *vmemh); - - /** - * Duplicates a block of memory, and returns a pointer to the - * newly allocated block. */ - void *MEM_dupallocN(void *vmemh); - - /** - * Allocate a block of memory of size len, with tag name str. The - * memory is cleared. The name must be static, because only a - * pointer to it is stored ! */ - void *MEM_callocN(unsigned int len, char * str); - - /** Allocate a block of memory of size len, with tag name str. The - * name must be a static, because only a pointer to it is stored ! - * */ - void *MEM_mallocN(unsigned int len, char * str); - - /** Print a list of the names and sizes of all allocated memory - * blocks. */ - void MEM_printmemlist(void); - - /** Set the callback function for error output. */ - void MEM_set_error_callback(void (*func)(char *)); - - /** - * Are the start/end block markers still correct ? - * - * @retval 0 for correct memory, 1 for corrupted memory. */ - int MEM_check_memory_integrity(void); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/TIF_editmesh.h b/topmodx/include/verse/TIF_editmesh.h deleted file mode 100644 index 44b1cc5..0000000 --- a/topmodx/include/verse/TIF_editmesh.h +++ /dev/null @@ -1,198 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/* External for editmesh_xxxx.c functions */ - -#ifndef BIF_EDITMESH_H -#define BIF_EDITMESH_H - -struct EditMesh; -struct EditFace; -struct EditEdge; -struct EditVert; -struct Mesh; -struct bDeformGroup; -struct View3D; - -// edge and face flag both -#define EM_FGON 2 -// face flag -#define EM_FGON_DRAW 1 - -extern unsigned int em_vertoffs, em_solidoffs, em_wireoffs; - -/* ******************* editmesh.c */ -extern void make_editMesh(void); -extern void load_editMesh(void); -extern void free_editMesh(struct EditMesh *); -extern void remake_editMesh(void); - - /* Editmesh Undo code */ -extern void undo_push_mesh(char *name); - -extern void separatemenu(void); -extern void separate_mesh(void); -extern void separate_mesh_loose(void); - -/* ******************* editmesh_add.c */ -extern void add_primitiveMesh(int type); -extern void adduplicate_mesh(void); -extern void addvert_mesh(void); -extern void addedgeface_mesh(void); - -/* ******************* editmesh_lib.c */ - -extern void EM_set_flag_all(int flag); -extern void EM_clear_flag_all(int flag); - -extern void EM_select_face(struct EditFace *efa, int sel); -extern void EM_select_edge(struct EditEdge *eed, int sel); - -extern void EM_deselect_flush(void); // vertices to edges/faces (exception!) -extern void EM_select_flush(void); // vertices to edges/faces (exception!) -extern void EM_selectmode_set(void); // when mode changes -extern void EM_selectmode_flush(void); // when selection changes - -extern int EM_nfaces_selected(void); -extern int EM_nvertices_selected(void); - -extern int faceselectedAND(struct EditFace *efa, int flag); -extern void recalc_editnormals(void); -extern void flip_editnormals(void); - -/* ******************* editmesh_mods.c */ - -extern void EM_init_index_arrays(int forVert, int forEdge, int forFace); -extern void EM_free_index_arrays(void); - -extern struct EditVert *EM_get_vert_for_index(int index); -extern struct EditEdge *EM_get_edge_for_index(int index); -extern struct EditFace *EM_get_face_for_index(int index); - -extern void EM_select_face_fgon(struct EditFace *efa, int sel); - -extern int EM_init_backbuf_border(short xmin, short ymin, short xmax, short ymax); -extern int EM_mask_init_backbuf_border(short mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax); -extern int EM_init_backbuf_circle(short xs, short ys, short rads); -extern int EM_check_backbuf(unsigned int index); -extern void EM_free_backbuf(void); - -extern void EM_selectmode_menu(void); - - -extern void vertexnoise(void); -extern void vertexsmooth(void); -extern void righthandfaces(int select); -extern void mouse_mesh(void); - -extern void deselectall_mesh(void); -extern void selectconnected_mesh(int qual); -extern void selectswap_mesh(void); - -extern void hide_mesh(int swap); -extern void reveal_mesh(void); - -extern void vertices_to_sphere(void); - - /** Aligns the selected TFace's of @a me to the @a v3d, - * using the given axis (0-2). Can give a user error. - */ -extern void faceselect_align_view_to_selected(struct View3D *v3d, struct Mesh *me, int axis); - /** Aligns the selected faces or vertices of @a me to the @a v3d, - * using the given axis (0-2). Can give a user error. - */ -extern void editmesh_align_view_to_selected(struct View3D *v3d, int axis); - - /* Selection */ -extern void select_non_manifold(void); -extern void select_faces_by_numverts(int numverts); -extern void select_more(void); -extern void select_less(void); -extern void selectrandom_mesh(void); -extern void editmesh_select_by_material(int index); -extern void editmesh_deselect_by_material(int index); - -extern void Edge_Menu(void); -extern void editmesh_mark_seam(int clear); - - -/* ******************* editmesh_loop.c */ - -#define KNIFE_PROMPT 0 -#define KNIFE_EXACT 1 -#define KNIFE_MIDPOINT 2 -#define KNIFE_MULTICUT 3 - -extern void CutEdgeloop(int numcuts); -extern void KnifeSubdivide(char mode); -extern void LoopMenu(void); - -#define LOOP_SELECT 1 -#define LOOP_CUT 2 - -extern short sharesFace(struct EditEdge* e1, struct EditEdge* e2); - -/* ******************* editmesh_tools.c */ - -#define SUBDIV_SELECT_ORIG 0 -#define SUBDIV_SELECT_INNER 1 -#define SUBDIV_SELECT_INNER_SEL 2 - -extern void convert_to_triface(int direction); -extern int removedoublesflag(short flag, float limit); -extern void xsortvert_flag(int flag); -extern void hashvert_flag(int flag); -extern void subdivideflag(int flag, float rad, int beauty); -extern void esubdivideflag(int flag, float rad, int beauty, int numcuts, int selecttype); -extern void extrude_mesh(void); -extern void split_mesh(void); -extern void extrude_repeat_mesh(int steps, float offs); -extern void spin_mesh(int steps,int degr,float *dvec, int mode); -extern void screw_mesh(int steps,int turns); -extern void delete_mesh(void); -extern void beauty_fill(void); -extern void join_triangles(void); -extern void edge_flip(void); -extern void fill_mesh(void); -extern void bevel_menu(); -void edge_rotate_selected(int dir); -int EdgeSlide(short immediate, float imperc); -void EdgeLoopDelete(void); - -struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *ev); -struct EditVert *editedge_getSharedVert(struct EditEdge *eed, struct EditEdge *eed2); -int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve); -int editface_containsVert(struct EditFace *efa, struct EditVert *eve); -int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed); - -#endif - diff --git a/topmodx/include/verse/TIF_space.h b/topmodx/include/verse/TIF_space.h deleted file mode 100644 index f04d7f9..0000000 --- a/topmodx/include/verse/TIF_space.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -#ifndef BIF_SPACE_H -#define BIF_SPACE_H - -struct ListBase; -struct ScrArea; -struct SpaceButs; -struct View2D; -struct BWinEvent; -struct SpaceOops; - -#define REMAKEIPO 1 -#define OOPS_TEST 2 - -#define BUT_HORIZONTAL 1 -#define BUT_VERTICAL 2 - -/* is hardcoded in DNA_space_types.h */ -#define SPACE_MAXHANDLER 8 - -/* view3d handler codes */ -#define VIEW3D_HANDLER_BACKGROUND 1 -#define VIEW3D_HANDLER_PROPERTIES 2 -#define VIEW3D_HANDLER_OBJECT 3 - -/* ipo handler codes */ -#define IPO_HANDLER_PROPERTIES 20 - -/* image handler codes */ -#define IMAGE_HANDLER_PROPERTIES 30 -#define IMAGE_HANDLER_PAINT 31 - -/* action handler codes */ -#define ACTION_HANDLER_PROPERTIES 40 - -/* nla handler codes */ -#define NLA_HANDLER_PROPERTIES 50 - -/* sequence handler codes */ -#define SEQ_HANDLER_PROPERTIES 60 - -/* theme codes */ -#define B_ADD_THEME 3301 -#define B_DEL_THEME 3302 -#define B_NAME_THEME 3303 -#define B_THEMECOL 3304 -#define B_UPDATE_THEME 3305 -#define B_CHANGE_THEME 3306 -#define B_THEME_COPY 3307 -#define B_THEME_PASTE 3308 - -#define B_RECALCLIGHT 3310 - - -void scrarea_do_windraw (struct ScrArea *sa); -void scrarea_do_winchange (struct ScrArea *sa); -void scrarea_do_winhandle (struct ScrArea *sa, struct BWinEvent *evt); -void scrarea_do_headdraw (struct ScrArea *sa); -void scrarea_do_headchange (struct ScrArea *sa); - -/* space.c */ -extern void add_blockhandler(struct ScrArea *sa, short eventcode, short action); -extern void rem_blockhandler(struct ScrArea *sa, short eventcode); -extern void toggle_blockhandler(struct ScrArea *sa, short eventcode, short action); - -extern void space_set_commmandline_options(void); -extern void allqueue(unsigned short event, short val); -extern void allspace(unsigned short event, short val); -extern void copy_view3d_lock(short val); -extern void drawemptyspace(struct ScrArea *sa, void *spacedata); -extern void drawinfospace(struct ScrArea *sa, void *spacedata); -extern void duplicatespacelist(struct ScrArea *area, struct ListBase *lb1, struct ListBase *lb2); -extern void extern_set_butspace(int fkey); -extern void force_draw(int header); -extern void force_draw_all(int header); -extern void force_draw_plus(int type, int header); -extern void freespacelist(struct ListBase *lb); -extern void handle_view3d_around(void); -extern void handle_view3d_lock(void); -extern void init_v2d_oops(struct ScrArea *, struct SpaceOops *); -extern void initipo(struct ScrArea *sa); -extern void newspace(struct ScrArea *sa, int type); -extern void set_rects_butspace(struct SpaceButs *buts); -extern void test_butspace(void); -extern void start_game(void); -extern void select_group_menu(void); -extern void select_group(short nr); - -extern void BIF_undo_push(char *str); -extern void BIF_undo(void); -extern void BIF_redo(void); -extern void BIF_undo_menu(void); - -// #if 0 -// //#ifdef _WIN32 // FULLSCREEN -// extern void mainwindow_toggle_fullscreen(int fullscreen); -// #endif - -extern void mainwindow_set_filename_to_title(char *title); -extern void mainwindow_raise(void); -extern void mainwindow_make_active(void); -extern void mainwindow_close(void); - -#endif - diff --git a/topmodx/include/verse/TIF_verse.h b/topmodx/include/verse/TIF_verse.h deleted file mode 100644 index 69311c6..0000000 --- a/topmodx/include/verse/TIF_verse.h +++ /dev/null @@ -1,122 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -// #ifdef WITH_VERSE - -#ifndef TIF_VERSE_H -#define TIF_VERSE_H - -#include "TKE_verse.h" -#include "DNA_meshdata_types.h" - -struct Object; - -struct EditVert; -struct EditFace; -struct MVert; -struct Mface; - -/* verse_object.c */ -void test_and_send_idbutton_cb(void *obj, void *ob_name); - -void t_verse_pop_node(struct VNode *vnode); -void t_verse_unsubscribe_node(struct VNode *vnode); -void t_verse_push_object(struct VerseSession *session, struct Object *ob); -void t_verse_delete_object(struct Object *ob); - -void post_transform(struct VNode *vnode); -void post_link_set(struct VLink *vlink); -void post_link_destroy(struct VLink *vlink); -void post_object_free_constraint(struct VNode *vnode); - -struct Object *create_object_from_verse_node(struct VNode *vnode); -void t_verse_send_transformation(struct Object *ob); - -/* verse_mesh.c */ -void t_verse_send_vertex_delete(struct EditVert *eve); -void t_verse_send_vertex_position(struct EditVert *eve); -void t_verse_send_vertex(struct EditVert *eve); - -void t_verse_send_face_delete(struct EditFace *efa); -void t_verse_send_face(struct EditFace *efa); -void t_verse_set_face_smooth(struct EditFace *efa); - -void sync_all_versefaces_with_editfaces(struct VNode *vnode); -void sync_all_verseverts_with_editverts(struct VNode *vnode); - -void restore_versevert_from_undovert(struct VNode *vnode, struct EditVert *eve, struct VerseVert *old_vvert, unsigned int vvert_id); -void push_editvert_to_verse_server(struct EditVert *ev, struct VNode *vnode, struct VLayer *vlayer); -void push_mvert_to_verse_server(struct MVert *vert, unsigned int i, struct VNode *vnode, struct VLayer *vlayer); -void push_all_verts(struct VNode *vnode, struct VLayer *vlayer); - -void restore_verseface_from_undoface(struct VNode *vnode, struct EditFace *efa, struct VerseFace *old_vface, unsigned int vface_id); -void push_mface_to_verse_server(struct MFace *fa, unsigned int i, struct VNode *vnode, struct VLayer *vlayer); -void push_edit_face_to_verse_server(struct EditFace *efa, struct VNode *vnode, struct VLayer *vlayer); -void push_all_faces(struct VNode *vnode, struct VLayer *vlayer); - -void create_edit_mesh_from_verse_node(struct VNode *vnode); -struct Mesh *create_mesh_from_verse_node(struct VNode *vnode); - -void destroy_unused_geometry(struct VNode *vnode); -void destroy_binding_between_versemesh_and_editmesh(struct VNode *vnode); - -void destroy_verse_mesh(struct VNode *vnode); -void push_mesh_geometry(struct VNode *vnode); - -void post_layer_create(struct VNode *vnode, struct VLayer *vlayer); -void post_layer_destroy(struct VNode *vnode, struct VLayer *vlayer); - -void post_vertex_create(struct VNode *vnode, struct VerseVert *vvert); -void post_vertex_set_xyz(struct VNode *vnode, struct VerseVert *vvert); -void post_vertex_delete(struct VNode *vnode, struct VerseVert *vvert); -void post_vertex_free_constraint(struct VNode *vnode, struct VerseVert *vvert); -void post_polygon_set_uint8(struct VNode *vnode, struct VLayer *vlayer, struct VerseFace *vface); -void post_polygon_create(struct VNode *vnode, struct VerseFace *vface); -void post_polygon_set_corner(struct VNode *vnode, struct VerseFace *vface); -void post_polygon_delete(struct VNode *vnode, struct VerseFace *vface); -void post_polygon_free_constraint(struct VNode *vnode, struct VerseFace *vface); - -void post_geometry_free_constraint(struct VNode *vnode); - -/* verse_common.c */ -struct VerseSession *session_menu(void); -char *verse_client_name(void); - -void post_tag_change(struct VNode *vnode, struct VTag *vatg); -void post_taggroup_create(struct VNode *vnode, struct VTagGroup *vtaggroup); - -void post_node_create(struct VNode *vnode); -void post_node_destroy(struct VNode *vnode); -void post_node_name_set(struct VNode *vnode); - -void post_connect_accept(struct VerseSession *session); -void post_connect_terminated(struct VerseSession *session); -void post_connect_update(struct VerseSession *session); - -// #endif - -#endif diff --git a/topmodx/include/verse/TKE_depsgraph.h b/topmodx/include/verse/TKE_depsgraph.h deleted file mode 100644 index 0c59236..0000000 --- a/topmodx/include/verse/TKE_depsgraph.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2004 Blender Foundation. - * All rights reserved. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -#ifndef DEPSGRAPH_API -#define DEPSGRAPH_API - -/* -#define DEPS_DEBUG -*/ - -struct Scene; -struct DagNodeQueue; -struct DagForest; -struct DagNode; - -/* **** DAG relation types *** */ - - /* scene link to object */ -#define DAG_RL_SCENE 1 - /* object link to data */ -#define DAG_RL_DATA 2 - - /* object changes object (parent, track, constraints) */ -#define DAG_RL_OB_OB 4 - /* object changes obdata (hooks, constraints) */ -#define DAG_RL_OB_DATA 8 - /* data changes object (vertex parent) */ -#define DAG_RL_DATA_OB 16 - /* data changes data (deformers) */ -#define DAG_RL_DATA_DATA 32 - -#define DAG_NO_RELATION 64 -#define DAG_RL_ALL 63 -#define DAG_RL_ALL_BUT_DATA 61 - - -typedef void (*graph_action_func)(void * ob, void **data); - -// queues are returned by all BFS & DFS queries -// opaque type -void *pop_ob_queue(struct DagNodeQueue *queue); -int queue_count(struct DagNodeQueue *queue); -void queue_delete(struct DagNodeQueue *queue); - -// queries -struct DagForest *build_dag(struct Scene *sce, short mask); -void free_forest(struct DagForest *Dag); - -// note : -// the meanings of the 2 returning values is a bit different : -// BFS return 1 for cross-edges and back-edges. the latter are considered harmfull, not the former -// DFS return 1 only for back-edges -int pre_and_post_BFS(struct DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data); -int pre_and_post_DFS(struct DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data); - -int pre_and_post_source_BFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data); -int pre_and_post_source_DFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data); - -struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob); -struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob); -struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob); // -short are_obs_related(struct DagForest *dag, void *ob1, void *ob2); -int is_acyclic(struct DagForest *dag); // -//int get_cycles(struct DagForest *dag, struct DagNodeQueue **queues, int *count); // - -void boundbox_deps(void); -void draw_all_deps(void); - -/* ********** API *************** */ - -void DAG_scene_sort(struct Scene *sce); -void DAG_scene_update_flags(struct Scene *sce, unsigned int lay); -void DAG_scene_flush_update(struct Scene *sce); -void DAG_object_flush_update(struct Scene *sce, struct Object *ob, short flag); -void DAG_pose_sort(struct Object *ob); - -#endif diff --git a/topmodx/include/verse/TKE_global.h b/topmodx/include/verse/TKE_global.h deleted file mode 100644 index 39de6b4..0000000 --- a/topmodx/include/verse/TKE_global.h +++ /dev/null @@ -1,237 +0,0 @@ -/** - * blenlib/BKE_global.h (mar-2001 nzc) - * - * Global settings, handles, pointers. This is the root for finding - * any data in Blender. This block is not serialized, but built anew - * for every fresh Blender run. - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef TKE_GLOBAL_H -#define TKE_GLOBAL_H - -#include "DNA_listBase.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* forwards */ -struct View3D; -struct View2D; -struct SpaceIpo; -struct SpaceButs; -struct SpaceImage; -struct SpaceOops; -struct SpaceText; -struct SpaceSound; -struct SpaceAction; -struct SpaceNla; -struct Main; -struct Scene; -struct bScreen; -struct Object; -struct bSoundListener; -struct BMF_Font; -struct EditMesh; - - -typedef struct Global { - - /* active pointers */ - struct View3D *vd; - struct View2D *v2d; - struct SpaceIpo *sipo; - struct SpaceButs *buts; - struct SpaceImage *sima; - struct SpaceOops *soops; - struct SpaceSound *ssound; - struct SpaceAction *saction; /* __NLA */ - struct SpaceNla *snla; - struct Main *main; - struct Scene *scene; /* denk aan file.c */ - struct bScreen *curscreen; - struct Object *obedit; - char editModeTitleExtra[64]; - - /* fonts, allocated global data */ - struct BMF_Font *font, *fonts, *fontss; - - /* strings: lastsaved */ - char ima[160], sce[160], lib[160]; - - /* totals */ - short totobj, totlamp, totobjsel, totcurve, totmesh, totbone, totbonesel; - int totvert, totedge, totface, totvertsel, totedgesel, totfacesel; - - short afbreek, moving; - short qual, background; - short winpos, displaymode; /* used to be in Render */ - - /** - * The current version of Blender. - */ - short version; - short simulf, order, rt; - int f; - - /* Editmode lists */ - struct EditMesh *editMesh; - - float textcurs[4][2]; - - /* Frank's variables */ - int save_over; - - /* Reevan's __NLA variables */ - struct ListBase edbo; /* Armature Editmode bones */ - - /* Rob's variables */ - int have_quicktime; - int ui_international; - int charstart; - int charmin; - int charmax; - struct VFont *selfont; - struct ListBase ttfdata; - - /* this variable is written to / read from FileGlobal->fileflags */ - int fileflags; - - /* save the allowed windowstate of blender when using -W or -w */ - int windowstate; - - /* Janco's playing ground */ - struct bSoundListener* listener; - - /* Test thingy for Nzc */ - int compat; /* toggle compatibility mode for edge rendering */ - int notonlysolid;/* T-> also edge-render transparent faces */ - - /* confusing... G.f and G.flags */ - int flags; - -} Global; - -/* **************** GLOBAL ********************* */ - -/* G.f */ -#define G_DISABLE_OK (1 << 0) -#define G_PLAYANIM (1 << 1) -/* also uses G_FILE_AUTOPLAY */ -#define G_SIMULATION (1 << 3) -#define G_BACKBUFSEL (1 << 4) -#define G_PICKSEL (1 << 5) -#define G_DRAWNORMALS (1 << 6) -#define G_DRAWFACES (1 << 7) -#define G_FACESELECT (1 << 8) -#define G_DRAW_EXT (1 << 9) -#define G_VERTEXPAINT (1 << 10) -#define G_ALLEDGES (1 << 11) -#define G_DEBUG (1 << 12) -#define G_DOSCRIPTLINKS (1 << 13) -#define G_DRAW_VNORMALS (1 << 14) -#define G_WEIGHTPAINT (1 << 15) -#define G_TEXTUREPAINT (1 << 16) -/* #define G_NOFROZEN (1 << 17) also removed */ -#define G_DRAWEDGES (1 << 18) -#define G_DRAWCREASES (1 << 19) -#define G_DRAWSEAMS (1 << 20) -#define G_HIDDENEDGES (1 << 21) - -/* Measurement info Drawing */ -#define G_DRAW_EDGELEN (1 << 22) -#define G_DRAW_FACEAREA (1 << 23) -#define G_DRAW_EDGEANG (1 << 24) - -#define G_RECORDKEYS (1 << 25) - -#define G_VERSE_CONNECTED (1 << 26) - -/* G.fileflags */ - -#define G_AUTOPACK (1 << 0) -#define G_FILE_COMPRESS (1 << 1) -#define G_FILE_AUTOPLAY (1 << 2) -#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) -#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) -#define G_FILE_SHOW_FRAMERATE (1 << 5) -#define G_FILE_SHOW_PROFILE (1 << 6) -#define G_FILE_LOCK (1 << 7) -#define G_FILE_SIGN (1 << 8) -#define G_FILE_PUBLISH (1 << 9) -#define G_FILE_NO_UI (1 << 10) -#define G_FILE_GAME_TO_IPO (1 << 11) - -/* G.windowstate */ -#define G_WINDOWSTATE_USERDEF 0 -#define G_WINDOWSTATE_BORDER 1 -#define G_WINDOWSTATE_FULLSCREEN 2 - -/* G.simulf */ -#define G_LOADFILE 2 -#define G_RESTART 4 -#define G_QUIT 8 -#define G_SETSCENE 16 - -/* G.qual */ -#define R_SHIFTKEY 1 -#define L_SHIFTKEY 2 -#define LR_SHIFTKEY 3 -#define R_ALTKEY 4 -#define L_ALTKEY 8 -#define LR_ALTKEY 12 -#define R_CTRLKEY 16 -#define L_CTRLKEY 32 -#define LR_CTRLKEY 48 -#define LR_COMMANDKEY 64 - -/* G.order: indicates what endianness the platform where the file was - * written had. */ -#define L_ENDIAN 1 -#define B_ENDIAN 0 - -/* G.moving, signals drawing in (3d) window to denote transform */ -#define G_TRANSFORM_OBJ 1 -#define G_TRANSFORM_EDIT 2 -#define G_TRANSFORM_MANIP 4 - -/* G.special1 */ - -/* Memory is allocated where? blender.c */ -extern Global G; - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/TKE_mesh.h b/topmodx/include/verse/TKE_mesh.h deleted file mode 100644 index 9f8ee3c..0000000 --- a/topmodx/include/verse/TKE_mesh.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * blenlib/BKE_mesh.h (mar-2001 nzc) - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef BKE_MESH_H -#define BKE_MESH_H - -/***/ - -struct BoundBox; -struct DispList; -struct ListBase; -struct MDeformVert; -struct Mesh; -struct MFace; -struct MVert; -struct MCol; -struct Object; -struct TFace; -struct VecNor; - -#ifdef __cplusplus -extern "C" { -#endif - -void unlink_mesh(struct Mesh *me); -void free_mesh(struct Mesh *me); -struct Mesh *add_mesh(void); -struct Mesh *copy_mesh(struct Mesh *me); -void make_local_tface(struct Mesh *me); -void make_local_mesh(struct Mesh *me); -void boundbox_mesh(struct Mesh *me, float *loc, float *size); -void tex_space_mesh(struct Mesh *me); -float *mesh_create_orco_render(struct Object *ob); -float *mesh_create_orco(struct Object *ob); -void test_index_face(struct MFace *mface, struct MCol *mc, struct TFace *tface, int nr); -struct Mesh *get_mesh(struct Object *ob); -void set_mesh(struct Object *ob, struct Mesh *me); -void mball_to_mesh(struct ListBase *lb, struct Mesh *me); -void nurbs_to_mesh(struct Object *ob); -void mcol_to_tface(struct Mesh *me, int freedata); -struct MCol *tface_to_mcol_p(struct TFace *tface, int totface); -void tface_to_mcol(struct Mesh *me); -void free_dverts(struct MDeformVert *dvert, int totvert); -void copy_dverts(struct MDeformVert *dst, struct MDeformVert *src, int totvert); /* __NLA */ -int update_realtime_texture(struct TFace *tface, double time); -void mesh_delete_material_index(struct Mesh *me, int index); -void mesh_set_smooth_flag(struct Object *meshOb, int enableSmooth); - -struct BoundBox *mesh_get_bb(struct Mesh *me); -void mesh_get_texspace(struct Mesh *me, float *loc_r, float *rot_r, float *size_r); - -/* if old, it converts mface->edcode to edge drawflags */ -void make_edges(struct Mesh *me, int old); -void mesh_strip_loose_faces(struct Mesh *me); - - /* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL - * and vertex normals are stored in actual mverts. - */ -void mesh_calc_normals(struct MVert *mverts, int numVerts, struct MFace *mfaces, int numFaces, float **faceNors_r); - - /* Return a newly MEM_malloc'd array of all the mesh vertex locations - * (_numVerts_r_ may be NULL) */ -float (*mesh_getVertexCos(struct Mesh *me, int *numVerts_r))[3]; - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/TKE_object.h b/topmodx/include/verse/TKE_object.h deleted file mode 100644 index a7e3742..0000000 --- a/topmodx/include/verse/TKE_object.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - * General operations, lookup, etc. for blender objects. - */ - -#ifndef BKE_OBJECT_H -#define BKE_OBJECT_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct Base; -struct Object; -struct Camera; -struct BoundBox; -struct View3D; -struct SoftBody; - -void clear_workob(void); -void copy_baseflags(void); -void copy_objectflags(void); -struct SoftBody *copy_softbody(struct SoftBody *sb); -void update_base_layer(struct Object *ob); -void free_object(struct Object *ob); -void object_free_modifiers(struct Object *ob); -void unlink_object(struct Object *ob); -int exist_object(struct Object *obtest); -void *add_camera(void); -struct Camera *copy_camera(struct Camera *cam); -void make_local_camera(struct Camera *cam); -void *add_lamp(void); -struct Lamp *copy_lamp(struct Lamp *la); -void make_local_lamp(struct Lamp *la); -void free_camera(struct Camera *ca); -void free_lamp(struct Lamp *la); -void *add_wave(void); - -struct Object *add_object(int type); -void base_init_from_view3d(struct Base *base, struct View3D *v3d); - -struct Object *copy_object(struct Object *ob); -void expand_local_object(struct Object *ob); -void make_local_object(struct Object *ob); -void set_mblur_offs(int blur); -void disable_speed_curve(int val); -float bsystem_time(struct Object *ob, struct Object *par, float cfra, float ofs); -void object_to_mat3(struct Object *ob, float mat[][3]); -void object_to_mat4(struct Object *ob, float mat[][4]); -void ob_parcurve(struct Object *ob, struct Object *par, float mat[][4]); -void ob_parlimb(struct Object *ob, struct Object *par, float mat[][4]); -void ob_parbone(struct Object *ob, struct Object *par, float mat[][4]); /* __NLA */ -void give_parvert(struct Object *par, int nr, float *vec); -void ob_parvert3(struct Object *ob, struct Object *par, float mat[][4]); -void set_no_parent_ipo(int val); -void set_dtime(int dtime); -void disable_where_script(short on); -int during_script(void); -void disable_where_scriptlink(short on); -int during_scriptlink(void); -void where_is_object_time(struct Object *ob, float ctime); -void where_is_object(struct Object *ob); -void where_is_object_simul(struct Object *ob); - -void what_does_parent(struct Object *ob); -struct BoundBox *unit_boundbox(void); -void boundbox_set_from_min_max(struct BoundBox *bb, float min[3], float max[3]); -void minmax_object(struct Object *ob, float *min, float *max); -void solve_tracking (struct Object *ob, float targetmat[][4]); -void solve_constraints (struct Object *ob, short obtype, void *obdata, float ctime); - -void object_handle_update(struct Object *ob); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/TKE_utildefines.h b/topmodx/include/verse/TKE_utildefines.h deleted file mode 100644 index a608b09..0000000 --- a/topmodx/include/verse/TKE_utildefines.h +++ /dev/null @@ -1,181 +0,0 @@ -/* util defines -- might go away ?*/ - -/* - $Id$ - - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** -*/ - -#ifndef TKE_UTILDEFINES_H -#define TKE_UTILDEFINES_H - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -/* also fill in structs itself, dna cannot handle defines, duplicate in blendef.h still */ -#ifndef FILE_MAXDIR -#define FILE_MAXDIR 160 -#define FILE_MAXFILE 80 -#endif - -#define ELEM(a, b, c) ( (a)==(b) || (a)==(c) ) -#define ELEM3(a, b, c, d) ( ELEM(a, b, c) || (a)==(d) ) -#define ELEM4(a, b, c, d, e) ( ELEM(a, b, c) || ELEM(a, d, e) ) -#define ELEM5(a, b, c, d, e, f) ( ELEM(a, b, c) || ELEM3(a, d, e, f) ) -#define ELEM6(a, b, c, d, e, f, g) ( ELEM(a, b, c) || ELEM4(a, d, e, f, g) ) -#define ELEM7(a, b, c, d, e, f, g, h) ( ELEM3(a, b, c, d) || ELEM4(a, e, f, g, h) ) -#define ELEM8(a, b, c, d, e, f, g, h, i) ( ELEM4(a, b, c, d, e) || ELEM4(a, f, g, h, i) ) - - -/* string compare */ -#define STREQ(str, a) ( strcmp((str), (a))==0 ) -#define STREQ2(str, a, b) ( STREQ(str, a) || STREQ(str, b) ) -#define STREQ3(str, a, b, c) ( STREQ2(str, a, b) || STREQ(str, c) ) - -/* min/max */ -#define MIN2(x,y) ( (x)<(y) ? (x) : (y) ) -#define MIN3(x,y,z) MIN2( MIN2((x),(y)) , (z) ) -#define MIN4(x,y,z,a) MIN2( MIN2((x),(y)) , MIN2((z),(a)) ) - -#define MAX2(x,y) ( (x)>(y) ? (x) : (y) ) -#define MAX3(x,y,z) MAX2( MAX2((x),(y)) , (z) ) -#define MAX4(x,y,z,a) MAX2( MAX2((x),(y)) , MAX2((z),(a)) ) - -#define INIT_MINMAX(min, max) { (min)[0]= (min)[1]= (min)[2]= 1.0e30f; (max)[0]= (max)[1]= (max)[2]= -1.0e30f; } - -#define INIT_MINMAX2(min, max) { (min)[0]= (min)[1]= 1.0e30f; (max)[0]= (max)[1]= -1.0e30f; } - -#define DO_MINMAX(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (min)[2]>(vec)[2] ) (min)[2]= (vec)[2]; \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; \ - if( (max)[2]<(vec)[2] ) (max)[2]= (vec)[2]; } \ - -#define DO_MINMAX2(vec, min, max) { if( (min)[0]>(vec)[0] ) (min)[0]= (vec)[0]; \ - if( (min)[1]>(vec)[1] ) (min)[1]= (vec)[1]; \ - if( (max)[0]<(vec)[0] ) (max)[0]= (vec)[0]; \ - if( (max)[1]<(vec)[1] ) (max)[1]= (vec)[1]; } - -#define MINSIZE(val, size) ( ((val)>=0.0) ? (((val)<(size)) ? (size): (val)) : ( ((val)>(-size)) ? (-size) : (val))) - -/* some math and copy defines */ - -#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; } - -#define ABS(a) ( (a)<0 ? (-(a)) : (a) ) - -#define VECCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);} -#define QUATCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2); *(v1+3)= *(v2+3);} -#define LONGCOPY(a, b, c) {int lcpc=c, *lcpa=(int *)a, *lcpb=(int *)b; while(lcpc-->0) *(lcpa++)= *(lcpb++);} - - -#define VECADD(v1,v2,v3) {*(v1)= *(v2) + *(v3); *(v1+1)= *(v2+1) + *(v3+1); *(v1+2)= *(v2+2) + *(v3+2);} -#define VECSUB(v1,v2,v3) {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1); *(v1+2)= *(v2+2) - *(v3+2);} - -#define INPR(v1, v2) ( (v1)[0]*(v2)[0] + (v1)[1]*(v2)[1] + (v1)[2]*(v2)[2] ) - - -/* some misc stuff.... */ -#define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) -#define CLAMPIS(a, b, c) ((a)<(b) ? (b) : (a)>(c) ? (c) : (a)) -#define CLAMPTEST(a, b, c) if((b)<(c)) {CLAMP(a, b, c);} else {CLAMP(a, c, b);} - -#define IS_EQ(a,b) ((fabs((double)(a)-(b)) >= (double) FLT_EPSILON) ? 0 : 1) - - -/* this weirdo pops up in two places ... */ -#if !defined(WIN32) && !defined(__BeOS) -#define O_BINARY 0 -#endif - -/* INTEGER CODES */ -#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__) - /* Big Endian */ -#define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) ) -#else - /* Little Endian */ -#define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) ) -#endif - -#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid - -#define FORM MAKE_ID('F','O','R','M') -#define DDG1 MAKE_ID('3','D','G','1') -#define DDG2 MAKE_ID('3','D','G','2') -#define DDG3 MAKE_ID('3','D','G','3') -#define DDG4 MAKE_ID('3','D','G','4') - -#define GOUR MAKE_ID('G','O','U','R') - -#define BLEN MAKE_ID('B','L','E','N') -#define DER_ MAKE_ID('D','E','R','_') -#define V100 MAKE_ID('V','1','0','0') - -#define DATA MAKE_ID('D','A','T','A') -#define GLOB MAKE_ID('G','L','O','B') -#define IMAG MAKE_ID('I','M','A','G') - -#define DNA1 MAKE_ID('D','N','A','1') -#define TEST MAKE_ID('T','E','S','T') -#define REND MAKE_ID('R','E','N','D') -#define USER MAKE_ID('U','S','E','R') - -#define ENDB MAKE_ID('E','N','D','B') - - -/* This one rotates the bytes in an int */ -#define SWITCH_INT(a) { \ - char s_i, *p_i; \ - p_i= (char *)&(a); \ - s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \ - s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; } - - -/* Bit operations */ -#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 ) -#define BSET(a,b) ( (a) | 1<<(b) ) -#define BCLR(a,b) ( (a) & ~(1<<(b)) ) -/* bit-row */ -#define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) ) - - -#ifdef GS -#undef GS -#endif -#define GS(a) (*((short *)(a))) - -#endif - diff --git a/topmodx/include/verse/TKE_verse.h b/topmodx/include/verse/TKE_verse.h deleted file mode 100644 index 1d60adc..0000000 --- a/topmodx/include/verse/TKE_verse.h +++ /dev/null @@ -1,395 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/* #define WITH_VERSE */ - -#ifndef TKE_VERSE_H -#define TKE_VERSE_H - -#include "DNA_listBase.h" -#include "TLI_dynamiclist.h" - -#include "verse.h" - -#ifndef T_VERSE_CONNECTED -#define T_VERSE_CONNECTED (1 << 10) -#endif -// static int VerseConnected; -static bool VerseConnected = false; - -struct VNode; - -/* - * verse data: 4 float value - */ -typedef struct quat_real32_item { - struct quat_real32_item *next, *prev; - real32 value[4]; -} quat_real32_item; - -/* - * verse data: 4 uint32 values - */ -typedef struct quat_uint32_item { - struct quat_uint32_item *next, *prev; - uint32 value[4]; -} quat_uint32_item; - -/* - * verse data: 3 float values - */ -typedef struct vec_real32_item { - struct vec_real32_item *next, *prev; - real32 value[3]; -} vec_real32_item; - -/* - * verse data: float value (weight) - */ -typedef struct real32_item { - struct real32_item *next, *prev; - real32 value; -} real32_item; - -/* - * verse data: uint32 value - */ -typedef struct uint32_item { - struct uint32_item *next, *prev; - uint32 value; -} uint32_item; - -/* - * verse data: uint8 value (smooth) - */ -typedef struct uint8_item { - struct uint8_item *next, *prev; - uint8 value; -} uint8_item; - -/* - * verse data: vertex - */ -typedef struct VerseVert { - struct VerseVert *next, *prev; - /* verse data */ - VSession vsession; /* session pointer */ - VNodeID node_id; /* vertex belongs to node with node_id */ - VLayerID layer_id; /* vertex belongs to layer with layer_id */ - uint32 id; /* id of vertex */ - real32 co[3]; /* x,y,z-coordinates of vertex */ - real32 no[3]; /* normal of vertex */ - /* blender internals */ - short flag; /* flags: VERT_DELETED, VERT_RECEIVED */ - void *vertex; /* pointer at EditVert or MVert */ - int counter; /* counter of VerseFaces using this VerseVert */ - unsigned int index; /* counter need during transformation to mesh */ - float *cos; /* modified coordinates of vertex */ -} VerseVert; - -/* - * verse data: polygon - */ -typedef struct VerseFace { - struct VerseFace *next, *prev; - /* verse data */ - VSession vsession; /* session pointer */ - VNodeID node_id; /* face belongs to node with node_id */ - VLayerID layer_id; /* face belongs to vlayer with layer_id */ - uint32 id; /* id of face */ - struct VerseVert *vvert0; /* pointer at 1st VerseVert */ - struct VerseVert *vvert1; /* pointer at 2nd VerseVert */ - struct VerseVert *vvert2; /* pointer at 3th VerseVert */ - struct VerseVert *vvert3; /* pointer at 4th VerseVert */ - unsigned int v0, v1, v2, v3; /* indexes of VerseVerts ... needed during receiving */ - /* blender internals */ - short flag; /* flags: FACE_SEND_READY, FACE_SENT, FACE_RECEIVED, FACE_CHANGED*/ - short counter; /* counter of missed VerseVertexes */ - void *face; /* pointer at EditFace or MFace */ - float no[3]; /* normal vector */ - struct uint8_item *smooth; /* smoothness */ -} VerseFace; - -/* - * verse data: layer - */ -typedef struct VLayer { - struct VLayer *next, *prev; - /* verse data*/ - VSession vsession; /* session pointer */ - VNodeID node_id; /* layer belongs to node with node_id */ - uint16 id; /* id of layer */ - char *name; /* name of layer */ - VNGLayerType type; /* type of layer (VN_G_LAYER_VERTEX_XYZ, VN_G_LAYER_POLYGON_CORNER_UINT32) */ - uint32 def_int; /* default integer value */ - real64 def_real; /* default float value */ - /* blender internals */ - short content; /* type of content (VERTEX_LAYER, POLYGON_LAYER, POLYGON_SMOOTH_LAYER) */ - struct DynamicList dl; /* vertexes, polygons, etc. */ - struct ListBase queue; /* queue of vertexes, polygons, etc. waiting for sending to verse server */ - struct ListBase orphans; /* list of versedata (polygons, etc.), that can be added to the DynamicList - * due to not received VerseVerts */ - /* client dependent methods */ - void (*post_layer_create)(struct VNode *vnode, struct VLayer *vlayer); - void (*post_layer_destroy)(struct VNode *vnode, struct VLayer *vlayer); -} VLayer; - -/* - * verse data: link - */ -typedef struct VLink{ - struct VLink *next, *prev; - /* verse data */ - VSession vsession; /* session pointer */ - struct VNode *source; /* object VerseNode "pointing" at some other VerseNode */ - struct VNode *target; /* VerseNode linked with some object node */ - unsigned int id; /* id of VerseLink */ - unsigned int target_id; /* some unknow id*/ - char *label; /* name/label of VerseLink */ - /* blender internals */ - short flag; /* flag: LINK_SEND_READY */ - /* client dependent methods */ - void (*post_link_set)(struct VLink *vlink); - void (*post_link_destroy)(struct VLink *vlink); -} VLink; - -/* - * data of geometry node - */ -typedef struct VGeomData { - struct DynamicList layers; /* dynamic list with access array of Layers */ - struct VLink *vlink; /* pointer at VerseLink connecting object node and geom node */ - struct ListBase queue; /* queue of our layers waiting for receiving from verse server */ - void *mesh; /* pointer at Mesh (object node) */ - void *editmesh; /* pointer at EditMesh (edit mode) */ - unsigned int smooth_layer; /* number of verse layer containing information about face smoothness */ - /* client dependent methods */ - void (*post_vertex_create)(struct VNode *vnode, struct VerseVert *vvert); - void (*post_vertex_set_xyz)(struct VNode *vnode, struct VerseVert *vvert); - void (*post_vertex_delete)(struct VNode *vnode, struct VerseVert *vvert); - void (*post_vertex_free_constraint)(struct VNode *vnode, struct VerseVert *vvert); - void (*post_polygon_create)(struct VNode *vnode, struct VerseFace *vface); - void (*post_polygon_set_corner)(struct VNode *vnode, struct VerseFace *vface); - void (*post_polygon_delete)(struct VNode *vnode, struct VerseFace *vface); - void (*post_polygon_free_constraint)(struct VNode *vnode, struct VerseFace *vface); - void (*post_geometry_free_constraint)(struct VNode *vnode); - void (*post_polygon_set_uint8)(struct VNode *vnode, struct VLayer *vlayer, struct VerseFace *vface); -} VGeomData; - -/* - * data of object node - */ -typedef struct VObjectData { - struct DynamicList links; /* dynamic list with access array of links between other nodes */ - struct ListBase queue; /* queue of links waiting for sending and receiving from verse server */ - float pos[3]; /* position of object VerseNode */ - float rot[4]; /* rotation of object VerseNode stored in quat */ - float scale[3]; /* scale of object VerseNode */ - void *object; /* pointer at object */ - short flag; /* flag: POS_RECEIVE_READY, ROT_RECEIVE_READY. SCALE_RECEIVE_READY */ - /* client dependent methods */ - void (*post_transform)(struct VNode *vnode); - void (*post_object_free_constraint)(struct VNode *vnode); -} VObjectData; - -/* - * Verse Tag - */ -typedef struct VTag { - struct VTag *next, *prev; - /* verse data*/ - VNodeID node_id; /* verse node containing this tag */ - uint16 group_id; /* tag group containing this tag */ - uint16 id; /* id of this tag */ - char *name; /* name of this tag*/ - VNTagType type; /* type: VN_TAG_BOOLEAN, VN_TAG_UINT32, VN_TAG_REAL64, VN_TAG_REAL64_VEC3, - VN_TAG_LINK, VN_TAG_ANIMATION, VN_TAG_BLOB */ - VNTag *tag; /* pointer at value (enum: vboolean, vuint32, vreal64, vstring, - vreal64_vec3, vlink, vanimation, vblob)*/ - /* blender internals */ - void *value; /* pointer at blender value */ -} VTag; - -/* - * Verse Tag Group (verse tags are grouped in tag groups) - */ -typedef struct VTagGroup { - struct VTagGroup *next, *prev; - /* verse data*/ - VNodeID node_id; /* verse node containing this tag group */ - uint16 id; /* id of this tag group */ - char *name; /* name of this tag group */ - /* blender internals */ - struct DynamicList tags; /* dynamic list with access array containing tags */ - struct ListBase queue; /* list of tags waiting for receiving from verse server */ - /* client dependent methods */ - void (*post_tag_change)(struct VNode *vnode, struct VTag *vatg); - void (*post_taggroup_create)(struct VNode *vnode, struct VTagGroup *vtaggroup); -} VTagGroup; - -/* - * Verse Node - */ -typedef struct VNode { - struct VNode *next, *prev; - /* verse data*/ - VSession vsession; /* session pointer */ - VNodeID id; /* node id */ - VNodeID owner_id; /* owner's id of this node */ - char *name; /* name of this node */ - uint32 type; /* type of node (V_NT_OBJECT, V_NT_GEOMETRY) */ - /* blender internals */ - struct DynamicList taggroups; /* dynamic list with access array of taggroups */ - struct ListBase queue; /* list of taggroups waiting for receiving from verse server */ - void *data; /* generic pointer at some data (VObjectData, VGeomData, ...) */ - /* client dependent methods */ - void (*post_node_create)(struct VNode *vnode); - void (*post_node_destroy)(struct VNode *vnode); - void (*post_node_name_set)(struct VNode *vnode); -} VNode; - -/* - * Verse Session: verse client can be connected to several verse servers - * it is neccessary to store some information about each session - */ -typedef struct VerseSession { - struct VerseSession *next, *prev; - /* verse data */ - VSession vsession; /* stupid pointer , index would be better */ - uint32 avatar; /* id of avatar */ - char *address; /* string containg IP/domain name of verse server and number of port */ - void *connection; /* no clue */ - uint8 *host_id; /* no clue */ - /* blender internals */ - short flag; /* flag: VERSE_DISCONNECTED, VERSE_CONNECTING, VERSE_CONNECTED */ - DynamicList nodes; /* list of verse nodes */ - ListBase queue; /* list of nodes waiting for sending to verse server */ - unsigned int counter; /* count of events, when connection wasn't accepted */ - /* client dependent methods */ - void (*post_connect_accept)(struct VerseSession *session); - void (*post_connect_terminated)(struct VerseSession *session); - void (*post_connect_update)(struct VerseSession *session); -} VerseSession; - -/* VerseSession->flag */ -#define VERSE_DISCONNECTED 1 -#define VERSE_CONNECTING 2 -#define VERSE_CONNECTED 4 - -/* max VerseSession->counter value */ -#define MAX_UNCONNECTED_EVENTS 100 - -/* VLink->flag */ -#define LINK_SEND_READY 1 - -/* VObjectData->flag */ -#define POS_RECEIVE_READY 1 -#define ROT_RECEIVE_READY 2 -#define SCALE_RECEIVE_READY 4 -#define POS_SEND_READY 8 -#define ROT_SEND_READY 16 -#define SCALE_SEND_READY 32 - -/* VLayer->content */ -#define VERTEX_LAYER 0 -#define POLYGON_LAYER 1 -#define POLYGON_SMOOTH_LAYER 2 - -/* VerseVert->flag */ -#define VERT_DELETED 1 -#define VERT_RECEIVED 2 -#define VERT_SEND_READY 4 - -/* VerseFace->flag */ -#define FACE_SEND_READY 1 -#define FACE_RECEIVED 2 -#define FACE_SENT 4 -#define FACE_DELETED 8 -#define FACE_CHANGED 16 - -/* queue type */ -#define VERSE_NODE 1 -#define VERSE_LINK 2 -#define VERSE_LAYER 3 -#define VERSE_VERT 4 -#define VERSE_FACE 5 -#define VERSE_TAG 6 -#define VERSE_TAG_GROUP 7 - -/* function prototypes */ - -/* functions from verse_session.c */ -void set_verse_session_callbacks(void); -struct VerseSession *versesession_from_vsession(VSession vsession); -struct VerseSession *current_verse_session(void); -void end_verse_session(struct VerseSession *session); -struct VerseSession *create_verse_session(const char *name, const char *pass, const char *address, uint8 *expected_key); -void free_verse_session(struct VerseSession *session); -void t_verse_update(void); -void t_verse_connect(char *address); -void end_verse_session(struct VerseSession *session); -void end_all_verse_sessions(void); - -/* functions from verse_node.c */ -void send_verse_tag(struct VTag *vtag); -void send_verse_taggroup(struct VTagGroup *vtaggroup); -void send_verse_node(struct VNode *vnode); -void free_verse_node_data(struct VNode *vnode); -void free_verse_node(struct VNode *vnode); -struct VNode* create_verse_node(VSession vsession, VNodeID node_id, uint8 type, VNodeID owner_id); -void set_node_callbacks(void); - -/* functions from verse_object_node.c */ -struct VLink *find_unsent_link(struct VerseSession *session, struct VNode *vnode); -struct VLink *create_verse_link(VSession vsession, struct VNode *source, struct VNode *target, uint16 link_id, uint32 target_id, const char *label); -void send_verse_object_position(struct VNode *vnode); -void send_verse_object_rotation(struct VNode *vnode); -void send_verse_object_scale(struct VNode *vnode); -void send_verse_link(struct VLink *vlink); - -void free_object_data(struct VNode *vnode); -void set_object_callbacks(void); -struct VObjectData *create_object_data(void); - -/* functions from verse_geometry_node.c */ -struct VerseFace* create_verse_face(VSession vsession, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3); -VerseVert* create_verse_vertex(VSession vsession, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 x, real32 y, real32 z); -struct VGeomData *create_geometry_data(void); - -void send_verse_vertex_delete(struct VerseVert *vvert); -void send_verse_vertex(struct VerseVert *vvert); -void send_verse_face_delete(struct VerseFace *vface); -void send_verse_face_smoothness(struct VerseFace *vface, uint8 value); - -void destroy_geometry(struct VNode *vnode); - -struct VLayer* find_verse_layer_type(struct VGeomData *geom, short content); -void add_item_to_send_queue(struct ListBase *lb, void *item, unsigned int type); -void free_geom_data(struct VNode *vnode); -void set_geometry_callbacks(void); - -#endif // diff --git a/topmodx/include/verse/TLI_arithb.h b/topmodx/include/verse/TLI_arithb.h deleted file mode 100644 index d5ff564..0000000 --- a/topmodx/include/verse/TLI_arithb.h +++ /dev/null @@ -1,880 +0,0 @@ -#undef TEST_ACTIVE -//#define ACTIVE 1 -/** - * blenlib/BLI_arithb.h mar 2001 Nzc - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - * - * The old math stuff from Ton. These will slowly phase out in favour - * of MTC calls. (or even MoTO :) ) - * */ - -#ifndef TLI_ARITHB_H -#define TLI_ARITHB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#ifndef M_PI_2 -#define M_PI_2 1.57079632679489661923 -#endif -#ifndef M_SQRT2 -#define M_SQRT2 1.41421356237309504880 -#endif -#ifndef M_SQRT1_2 -#define M_SQRT1_2 0.70710678118654752440 -#endif - -#define MAT4_UNITY {{ 1.0, 0.0, 0.0, 0.0},\ - { 0.0, 1.0, 0.0, 0.0},\ - { 0.0, 0.0, 1.0, 0.0},\ - { 0.0, 0.0, 0.0, 1.0}} - -#define MAT3_UNITY {{ 1.0, 0.0, 0.0},\ - { 0.0, 1.0, 0.0},\ - { 0.0, 0.0, 1.0}} - - -/* matrix operations */ -/* void Mat4MulMat4(float m1[][4], float m2[][4], float m3[][4]); */ -/* void Mat3MulVecfl(float mat[][3], float *vec); */ -/* or **mat, but it's the same */ -/*void Mat3MulVecd(float mat[][3], double *vec); */ - -/* void Mat4MulVecfl(float mat[][4], float *vec); */ -/* void Mat4MulSerie(float answ[][4], float m1[][4], float m2[][4], */ -/* float m3[][4], float m4[][4], float m5[][4], */ -/* float m6[][4], float m7[][4], float m8[][4]); */ -/* int Mat4Invert(float inverse[][4], float mat[][4]); */ - -/* m2 to m1 */ -/* void Mat3CpyMat4(float m1p[][3], float m2p[][4]); */ -/* void Mat3CpyMat4(float *m1p, float *m2p); */ - -/* m1 to m2 */ -/* void Mat3CpyMat3(float m1p[][3], float m2p[][3]); */ -/* void Mat3CpyMat3(float *m1p, float *m2p); */ - -/* m2 to m1 */ -/* void Mat4CpyMat3(float m1p[][4], float m2p[][3]); */ - -/* M1 = M3*M2 */ -/* void Mat3MulMat3(float m1[][3], float m2[][3], float m3[][3]); */ -/*void Mat3MulMat3(float *m1, float *m3, float *m2); */ - -/* m1 = m2 * m3, ignore the elements on the 4th row/column of m3 */ -/*void Mat3IsMat3MulMat4(float m1[][3], float m2[][3], float m3[][4]); */ - -/* m1 to m2 */ -/* void Mat4CpyMat4(float m1[][4], float m2[][4]); */ -/* void Mat4CpyMat4(float *m1, float *m2); */ - - -/* void Mat4Ortho(float mat[][4]); */ -/* void Mat4Mul3Vecfl(float mat[][4], float *vec); */ -/* void Mat4MulVec4fl(float mat[][4], float *vec); */ -/* void Mat4SwapMat4(float *m1, float *m2); */ - -/* void Mat3Inv(float m1[][3], float m2[][3]); */ -/* void Mat4One(float m[][4]); */ -/* void Mat3One(float m[][3]); */ - - - void -CalcCent3f( - float *cent, float *v1, float *v2, float *v3 -); - - void -CalcCent4f( - float *cent, float *v1, - float *v2, float *v3, - float *v4 -); - - void -Crossf( - float *c, float *a, float *b -); - - void -Projf( - float *c, float *v1, float *v2 -); - -/** - * Euler conversion routines - */ - - void -EulToMat3( - float *eul, - float mat[][3] -); - void -EulToMat4( - float* eul, - float mat[][4] -); - - void -Mat3ToEul( - float tmat[][3], - float *eul -); - -/** - * @section Quaternion arithmetic routines - */ - - void -QuatToEul( - float *quat, - float *eul -); - void -QuatOne( - float * -); - void -QuatMul( - float *, - float *, - float * -); - void -QuatMulVecf( - float *q, - float *v -); - void -NormalQuat( - float * -); - void -VecRotToQuat( - float *vec, - float phi, - float *quat -); - void -QuatSub( - float *q, - float *q1, - float *q2 -); - void -QuatConj( - float *q -); - void -QuatInv( - float *q -); - void -QuatMulf( - float *q, - float f -); - float -QuatDot( - float *q1, - float *q2 -); - void -printquat( - char *str, - float q[4] -); - - -void QuatInterpol(float *result, float *quat1, float *quat2, float t); -void QuatAdd(float *result, float *quat1, float *quat2, float t); - - -/** - * @section matrix multiplication can copying routines - */ - - void -Mat3MulFloat( - float *m, - float f -); - void -Mat4MulFloat( - float *m, - float f -); - void -Mat4MulFloat3( - float *m, - float f -); - void -Mat3Transp( - float mat[][3] -); - void -Mat4Transp( - float mat[][4] -); - int -Mat4Invert( - float inverse[][4], - float mat[][4] -); - void -Mat4InvertSimp( - float inverse[][4], - float mat[][4] -); - void -Mat4Inv( - float *m1, - float *m2 -); - void -Mat4InvGG( - float out[][4], - float in[][4] -); - void -Mat3CpyMat4( - float m1[][3], - float m2[][4] -); - - void -Mat3Inv( - float m1[][3], - float m2[][3] -); - - void -Mat4CpyMat3( - float m1[][4], - float m2[][3] -); - - float -Det2x2( - float a,float b,float c,float d -); - - float -Det3x3( - float a1, float a2, float a3, - float b1, float b2, float b3, - float c1, float c2, float c3 -); - - float -Det4x4( - float m[][4] -); - - void -Mat4Adj( - float out[][4], - float in[][4] -); - void -Mat3Adj( - float m1[][3], - float m[][3] -); - void -Mat4MulMat4( - float m1[][4], - float m2[][4], - float m3[][4] -); - void -subMat4MulMat4( - float *m1, - float *m2, - float *m3 -); -#ifndef TEST_ACTIVE - void -Mat3MulMat3( - float m1[][3], - float m3[][3], - float m2[][3] -); -#else - void -Mat3MulMat3( - float *m1, - float *m3, - float *m2 -); -#endif - void -Mat4MulMat34( - float (*m1)[4], - float (*m3)[3], - float (*m2)[4] -); - void -Mat4CpyMat4( - float m1[][4], - float m2[][4] -); - void -Mat4SwapMat4( - float *m1, - float *m2 -); - void -Mat3CpyMat3( - float m1[][3], - float m2[][3] -); - void -Mat3MulSerie( - float answ[][3], - float m1[][3], float m2[][3], float m3[][3], - float m4[][3], float m5[][3], float m6[][3], - float m7[][3], float m8[][3] -); - void -Mat4MulSerie( - float answ[][4], - float m1[][4], - float m2[][4], float m3[][4], float m4[][4], - float m5[][4], float m6[][4], float m7[][4], - float m8[][4] -); - void -Mat4Clr( - float *m -); - void -Mat3Clr( - float *m -); - void -Mat3One( - float m[][3] -); - void -Mat4MulVec( - float mat[][4], - int *vec -); - void -VecMat4MulVecfl( - float *in, - float mat[][4], - float *vec -); - void -Mat4MulMat43( - float (*m1)[4], - float (*m3)[4], - float (*m2)[3] -); - - void -Mat3IsMat3MulMat4( - float m1[][3], - float m2[][3], - float m3[][4] -); - void -Mat4One( - float m[][4] -); - void -Mat4Mul3Vecfl( - float mat[][4], - float *vec -); - void -Mat4MulVec4fl( - float mat[][4], - float *vec -); - void -Mat3MulVec( - float mat[][3], - int *vec -); - void -Mat4MulVecfl( - float mat[][4], - float *vec -); - void -Mat4ToQuat( - float m[][4], - float *q -); - void -VecUpMat3old( - float *vec, - float mat[][3], - short axis -); - int -FloatCompare( - float *v1, - float *v2, - float limit -); - float -Normalise( - float *n -); - float -CalcNormFloat( - float *v1, - float *v2, - float *v3, - float *n -); - - float -CalcNormFloat4( - float *v1, - float *v2, - float *v3, - float *v4, - float *n -); - float -VecLenf( - float *v1, - float *v2 -); - float -VecLength( - float *v -); - void -VecMulf( - float *v1, - float f -); - int -VecCompare( - float *v1, - float *v2, - float limit -); - float -Sqrt3f( - float f -); - double -Sqrt3d( - double d -); - - void -euler_rot( - float *beul, - float ang, - char axis -); - float -saacos( - float fac -); - float -sasqrt( - float fac -); - void -printvecf( - char *str, - float v[3] -); - void -printvec4f( - char *str, - float v[4] -); - float -Inpf( - float *v1, - float *v2 -); - void -VecSubf( - float *v, - float *v1, - float *v2 -); - void -VecAddf( - float *v, - float *v1, - float *v2 -); - void -VecLerpf( - float *target, - float *a, - float *b, - float t -); - void -VecUpMat3( - float *vec, - float mat[][3], - short axis -); - float -DistVL2Dfl( - float *v1, - float *v2, - float *v3 -); - float -PdistVL2Dfl( - float *v1, - float *v2, - float *v3 -); - float -AreaF2Dfl( - float *v1, - float *v2, - float *v3 -); - float -AreaQ3Dfl( - float *v1, - float *v2, - float *v3, - float *v4 -); - float -AreaT3Dfl( - float *v1, - float *v2, - float *v3 -); - float -AreaPoly3Dfl( - int nr, - float *verts, - float *normal -); - void -VecRotToMat3( - float *vec, - float phi, - float mat[][3] -); - -/* intersect Line-Line - return: - -1: colliniar - 0: no intersection of segments - 1: exact intersection of segments - 2: cross-intersection of segments -*/ -extern short IsectLL2Df(float *v1, float *v2, float *v3, float *v4); -extern short IsectLL2Ds(short *v1, short *v2, short *v3, short *v4); - - - float * -vectoquat( - float *vec, - short axis, - short upflag -); - - float -VecAngle3( - float *v1, - float *v2, - float *v3 -); - - void -i_lookat( - float vx, float vy, - float vz, float px, - float py, float pz, - float twist, float mat[][4] -); - void -i_window( - float left, float right, - float bottom, float top, - float nearClip, float farClip, - float mat[][4] -); - - void -hsv_to_rgb( - float h, float s, - float v, float *r, - float *g, float *b -); - - void -rgb_to_hsv( - float r, float g, float b, - float *lh, float *ls, float *lv -); - unsigned int -hsv_to_cpack( - float h, float s, float v -); - unsigned int -rgb_to_cpack( - float r, float g, float b -); - void -cpack_to_rgb( - unsigned int col, - float *r, float *g, float *b -); - - void -EulToQuat( - float *eul, - float *quat -); - - void -Mat3MulVecfl( - float mat[][3], - float *vec -); - void -Mat3MulVecd( - float mat[][3], - double *vec -); - void -Mat3TransMulVecfl( - float mat[][3], - float *vec -); - void -VecStar( - float mat[][3], - float *vec -); - short -EenheidsMat( - float mat[][3] -); - void -printmatrix3( - char *str, float m[][3] -); - void -QuatToMat3( - float *q, - float m[][3] -); - void -QuatToMat4( - float *q, - float m[][4] -); - void -Mat3ToQuat_is_ok( - float wmat[][3], - float *q -); - void -i_ortho( - float left, float right, - float bottom, float top, - float nearClip, float farClip, - float matrix[][4] -); - void -i_polarview( - float dist, float azimuth, float incidence, float twist, - float Vm[][4] -); - void -Mat3Ortho( - float mat[][3] -); - void -Mat4Ortho( - float mat[][4] -); - void -VecCopyf( - float *v1, - float *v2 -); - int -VecLen( - int *v1, - int *v2 -); - void -CalcNormShort( - short *v1, - short *v2, - short *v3, - float *n -) /* is ook uitprodukt */; - - void -CalcNormLong( - int* v1, - int*v2, - int*v3, - float *n -); - void -MinMax3( - float *min, - float *max, - float *vec -); - void -Mat3ToEuln( - float tmat[][3], - float *eul -); - void -SizeToMat3( - float *size, - float mat[][3] -); - void -printmatrix4( - char *str, - float m[][4] -); -/* uit Sig.Proc.85 pag 253 */ - void -Mat3ToQuat( - float wmat[][3], - float *q -); - void -i_translate( - float Tx, - float Ty, - float Tz, - float mat[][4] -); - void -i_multmatrix( - float icand[][4], - float Vm[][4] -); - void -i_rotate( - float angle, - char axis, - float mat[][4] -); - void -VecMidf( - float *v, float *v1, float *v2 -); - void -Mat3ToSize( - float mat[][3], float *size -); - void -Mat4ToSize( - float mat[][4], float *size -); - void -triatoquat( - float *v1, - float *v2, - float *v3, float *quat -); - void -MinMaxRGB( - short c[] -); - float -Vec2Lenf( - float *v1, - float *v2 -); - void -Vec2Mulf( - float *v1, - float f -); - void -Vec2Addf( - float *v, - float *v1, - float *v2 -); - void -Vec2Subf( - float *v, - float *v1, - float *v2 -); - void -Vec2Copyf( - float *v1, - float *v2 -); - float -Inp2f( - float *v1, - float *v2 -); - float -Normalise2( - float *n -); - -void tubemap(float x, float y, float z, float *u, float *v); -void spheremap(float x, float y, float z, float *u, float *v); - -int LineIntersectsTriangle(float p1[3], float p2[3], float v0[3], float v1[3], float v2[3], float *lambda); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/topmodx/include/verse/TLI_dynamiclist.h b/topmodx/include/verse/TLI_dynamiclist.h deleted file mode 100644 index 3307f8f..0000000 --- a/topmodx/include/verse/TLI_dynamiclist.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * Documentation of Two way dynamic list with access array can be found at: - * - * http://wiki.blender.org/bin/view.pl/Blenderwiki/DynamicListWithAccessArray - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -#ifndef T_DYNAMIC_LIST_H -#define T_DYNAMIC_LIST_H - -#define PAGE_SIZE 4 - -struct ListBase; - -/* - * Access array using realloc - */ -typedef struct DynamicArray{ - unsigned int count; /* count of items in list */ - unsigned int max_item_index; /* max available index */ - unsigned int last_item_index; /* max used index */ - void **items; /* dynamicaly allocated array of pointers - pointing at items in list */ -} DynamicArray; - -/* - * Two way dynamic list with access array - */ -typedef struct DynamicList { - struct DynamicArray da; /* access array */ - struct ListBase lb; /* two way linked dynamic list */ -} DynamicList; - -#endif diff --git a/topmodx/include/verse/TLI_editVert.h b/topmodx/include/verse/TLI_editVert.h deleted file mode 100644 index 950bb20..0000000 --- a/topmodx/include/verse/TLI_editVert.h +++ /dev/null @@ -1,112 +0,0 @@ -/** - * blenlib/BLI_editVert.h mar 2001 Nzc - * - * Some editing types needed in the lib (unfortunately) for - * scanfill.c - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -#ifndef BLI_EDITVERT_H -#define BLI_EDITVERT_H - -struct DerivedMesh; - -/* note; changing this also might affect the undo copy in editmesh.c */ -typedef struct EditVert -{ - struct EditVert *next, *prev, *vn; - float no[3]; - float co[3]; - short xs, ys; - unsigned char f, h, f1, f2; - short fast; /* only 0 or 1, for editmesh_fastmalloc */ - short totweight; /* __NLA */ - int hash; - struct MDeformWeight *dw; /* __NLA */ - int keyindex; /* original index #, for restoring key information */ - void *vvert; -} EditVert; - -struct EditEdge; - -typedef struct HashEdge { - struct EditEdge *eed; - struct HashEdge *next; -} HashEdge; - -/* note; changing this also might affect the undo copy in editmesh.c */ -typedef struct EditEdge -{ - struct EditEdge *next, *prev; - struct EditVert *v1, *v2, *vn; - short f1, f2; /* short, f1 is (ab)used in subdiv */ - unsigned char f, h, dir, seam; - float crease; - short fast; /* only 0 or 1, for editmesh_fastmalloc */ - short fgoni; /* index for fgon, for search */ - HashEdge hash; -} EditEdge; - -/* note; changing this also might affect the undo copy in editmesh.c */ -typedef struct EditFace -{ - struct EditFace *next, *prev; - struct EditVert *v1, *v2, *v3, *v4; - struct EditEdge *e1, *e2, *e3, *e4; - float n[3], cent[3]; - struct TFace tf; /* a copy of original tface. */ - unsigned char mat_nr, flag; - unsigned char f, f1, h; - unsigned char fast; /* only 0 or 1, for editmesh_fastmalloc */ - unsigned char fgonf; /* flag for fgon options */ - void *vface; -} EditFace; - -typedef struct EditMesh -{ - ListBase verts, edges, faces; - HashEdge *hashedgetab; - - /* this is for the editmesh_fastmalloc */ - EditVert *allverts, *curvert; - EditEdge *alledges, *curedge; - EditFace *allfaces, *curface; - - void *vnode; - /* DerivedMesh caches... note that derived cage can be equivalent - * to derived final, care should be taken on release. - */ - struct DerivedMesh *derivedCage, *derivedFinal; -} EditMesh; - -#endif - diff --git a/topmodx/include/verse/TLI_toplib.h b/topmodx/include/verse/TLI_toplib.h deleted file mode 100644 index df6473f..0000000 --- a/topmodx/include/verse/TLI_toplib.h +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef TLI_TOPLIB_H -#define TLI_TOPLIB_H - -/* braindamage for the masses... needed - because fillfacebase and fillvertbase are used outside */ -#include "DNA_listBase.h" - -extern ListBase fillfacebase; -extern ListBase fillvertbase; -/** - * @attention Defined in scanfill.c - */ -extern ListBase filledgebase; -extern int totblock; - -struct chardesc; -struct direntry; -struct rctf; -struct rcti; -struct EditVert; -struct PackedFile; -struct LinkNode; -struct DynamicList; - -#ifdef __cplusplus -extern "C" { -#endif - -/* util.c */ -char *TLI_gethome(void); -void TLI_make_file_string(char *relabase, char *string, char *dir, char *file); -void TLI_make_exist(char *dir); -void TLI_split_dirfile(char *string, char *dir, char *file); -int TLI_testextensie(char *str, char *ext); -void addlisttolist(ListBase *list1, ListBase *list2); -void TLI_insertlink(struct ListBase *listbase, void *vprevlink, void *vnewlink); -void * TLI_findlink(struct ListBase *listbase, int number); - -void TLI_freelistN(struct ListBase *listbase); - -void TLI_addtail(struct ListBase *listbase, void *vlink); -void TLI_remlink(struct ListBase *listbase, void *vlink); -void TLI_newname(char * name, int add); -int TLI_stringdec(char *string, char *kop, char *staart, unsigned short *numlen); -void TLI_stringenc(char *string, char *kop, char *staart, unsigned short numlen, int pic); -void TLI_addhead(struct ListBase *listbase, void *vlink); -void TLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink); - -void TLI_freelist(struct ListBase *listbase); - -int TLI_countlist(struct ListBase *listbase); -void TLI_freelinkN(ListBase *listbase, void *vlink); - -struct DynamicList *TLI_dlist_from_listbase(struct ListBase *lb); -struct ListBase *TLI_listbase_from_dlist(struct DynamicList *dlist, struct ListBase *lb); -void * TLI_dlist_find_link(struct DynamicList *dlist, unsigned int index); -unsigned int TLI_count_items(struct DynamicList *dlist); -void TLI_dlist_free_item(struct DynamicList *dlist, unsigned int index); -void TLI_dlist_rem_item(struct DynamicList *dlist, unsigned int index); -void * TLI_dlist_add_item_index(struct DynamicList *dlist, void *item, unsigned int index); - -void TLI_dlist_destroy(struct DynamicList *dlist); -void TLI_dlist_init(struct DynamicList *dlist); - -void TLI_splitdirstring(char *di,char *fi); - - /** - * Blender's path code replacement function. - * Bases @a path strings leading with "//" by the - * directory @a basepath, and replaces instances of - * '#' with the @a framenum. Results are written - * back into @a path. - * - * @a path The path to convert - * @a basepath The directory to base relative paths with. - * @a framenum The framenumber to replace the frame code with. - * @retval Returns true if the path was relative (started with "//"). - */ -int TLI_convertstringcode(char *path, char *basepath, int framenum); - -void TLI_makestringcode(char *fromfile, char *str); - - /** - * Change every @a from in @a string into @a to. The - * result will be in @a string - * - * @a string The string to work on - * @a from The character to replace - * @a to The character to replace with - */ -void TLI_char_switch(char *string, char from, char to); - - /** - * Makes sure @a path has platform-specific slashes. - * - * @a path The path to 'clean' - */ -void TLI_clean(char *path); - /** - * Duplicates the cstring @a str into a newly mallocN'd - * string and returns it. - * - * @param str The string to be duplicated - * @retval Returns the duplicated string - */ -char* TLI_strdup(char *str); - - /** - * Duplicates the first @a len bytes of cstring @a str - * into a newly mallocN'd string and returns it. @a str - * is assumed to be at least len bytes long. - * - * @param str The string to be duplicated - * @param len The number of bytes to duplicate - * @retval Returns the duplicated string - */ -char* TLI_strdupn(char *str, int len); - - /** - * Like strncpy but ensures dst is always - * '\0' terminated. - * - * @param dst Destination for copy - * @param src Source string to copy - * @param maxncpy Maximum number of characters to copy (generally - * the size of dst) - * @retval Returns dst - */ -char* TLI_strncpy(char *dst, char *src, int maxncpy); - - /** - * Compare two strings - * - * @retval True if the strings are equal, false otherwise. - */ -int TLI_streq(char *a, char *b); - - /** - * Compare two strings without regard to case. - * - * @retval True if the strings are equal, false otherwise. - */ -int TLI_strcaseeq(char *a, char *b); - - /** - * Read a file as ASCII lines. An empty list is - * returned if the file cannot be opened or read. - * - * @attention The returned list should be free'd with - * TLI_free_file_lines. - * - * @param name The name of the file to read. - * @retval A list of strings representing the file lines. - */ -struct LinkNode *TLI_read_file_as_lines(char *name); - - /** - * Free the list returned by TLI_read_file_as_lines. - */ -void TLI_free_file_lines(struct LinkNode *lines); - - /** - * Checks if name is a fully qualified filename to an executable. - * If not it searches $PATH for the file. On Windows it also - * adds the correct extension (.com .exe etc) from - * $PATHEXT if necessary. Also on Windows it translates - * the name to its 8.3 version to prevent problems with - * spaces and stuff. Final result is returned in fullname. - * - * @param fullname The full path and full name of the executable - * @param name The name of the executable (usually argv[0]) to be checked - */ -void TLI_where_am_i(char *fullname, char *name); - - /** - * determines the full path to the application bundle on OS X - * - * @return path to application bundle - */ -#ifdef __APPLE__ -char* TLI_getbundle(void); -#endif - -#ifdef WIN32 -int TLI_getInstallationDir( char * str ); -#endif - - -int TLI_strcasecmp(const char *s1, const char *s2); -int TLI_strncasecmp(const char *s1, const char *s2, int n); - -#define PRNTSUB(type,arg) printf(#arg ": %" #type " ", arg) - -#ifndef PRINT -#define PRINT(t,v) {PRNTSUB(t,v); printf("\n");} -#define PRINT2(t1,v1,t2,v2) {PRNTSUB(t1,v1); PRNTSUB(t2,v2); printf("\n");} -#define PRINT3(t1,v1,t2,v2,t3,v3) {PRNTSUB(t1,v1); PRNTSUB(t2,v2); PRNTSUB(t3,v3); printf("\n");} -#define PRINT4(t1,v1,t2,v2,t3,v3,t4,v4) {PRNTSUB(t1,v1); PRNTSUB(t2,v2); PRNTSUB(t3,v3); PRNTSUB(t4,v4); printf("\n");} -#endif - -/** - * @param array The array in question - * @retval The number of elements in the array. - */ -#define TLI_ARRAY_NELEMS(array) (sizeof((array))/sizeof((array)[0])) - -/** - * @param strct The structure of interest - * @param member The name of a member field of @a strct - * @retval The offset in bytes of @a member within @a strct - */ -#define TLI_STRUCT_OFFSET(strct, member) ((int) &((strct*) 0)->member) - - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/topmodx/include/verse/TLI_util.h b/topmodx/include/verse/TLI_util.h deleted file mode 100644 index b033c89..0000000 --- a/topmodx/include/verse/TLI_util.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * blenlib/BLI_storage_types.h - * - * Some types for dealing with directories - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ -#ifndef BLI_UTIL_H -#define BLI_UTIL_H - -#define mallocstructN(x,y,name) (x*)MEM_mallocN((y)* sizeof(x),name) -#define callocstructN(x,y,name) (x*)MEM_callocN((y)* sizeof(x),name) - -struct ListBase; - -#endif - diff --git a/topmodx/include/verse/mallocn.cc b/topmodx/include/verse/mallocn.cc deleted file mode 100644 index a246ac7..0000000 --- a/topmodx/include/verse/mallocn.cc +++ /dev/null @@ -1,467 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * Guarded memory allocation, and boundary-write detection. - */ - -#include -#include /* memcpy */ -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "MEM_guardedalloc.h" - -/* --------------------------------------------------------------------- */ -/* Data definition */ -/* --------------------------------------------------------------------- */ -/* all memory chunks are put in linked lists */ -typedef struct localLink -{ - struct localLink *next,*prev; -} localLink; - -typedef struct localListBase -{ - void *first, *last; -} localListBase; - -typedef struct MemHead { - int tag1; - int len; - struct MemHead *next,*prev; - char * name; - char * nextname; - /* int level; */ /* historical, can be removed, but check alignment issues - zr */ - int tag2; -} MemHead; - -typedef struct MemTail { - int tag3, pad; -} MemTail; - -/* --------------------------------------------------------------------- */ -/* local functions */ -/* --------------------------------------------------------------------- */ - -static void addtail(localListBase *listbase, void *vlink); -static void remlink(localListBase *listbase, void *vlink); -static void rem_memblock(MemHead *memh); -static void MemorY_ErroR(char *block, char *error); -static char *check_memlist(MemHead *memh); - -/* --------------------------------------------------------------------- */ -/* locally used defines */ -/* --------------------------------------------------------------------- */ - -#if defined( __sgi) || defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__APPLE__) -#define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) ) -#else -#define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) ) -#endif - -#define MEMTAG1 MAKE_ID('M', 'E', 'M', 'O') -#define MEMTAG2 MAKE_ID('R', 'Y', 'B', 'L') -#define MEMTAG3 MAKE_ID('O', 'C', 'K', '!') -#define MEMFREE MAKE_ID('F', 'R', 'E', 'E') - -#define MEMNEXT(x) ((MemHead *)(((char *) x) - ((char *) & (((MemHead *)0)->next)))) - -/* --------------------------------------------------------------------- */ -/* vars */ -/* --------------------------------------------------------------------- */ - - -int totblock= 0; -int mem_in_use= 0; - -static struct localListBase _membase; -static struct localListBase *membase = &_membase; -static void (*error_callback)(char *) = NULL; - -#ifdef malloc -#undef malloc -#endif - -#ifdef calloc -#undef calloc -#endif - -#ifdef free -#undef free -#endif - - -/* --------------------------------------------------------------------- */ -/* implementation */ -/* --------------------------------------------------------------------- */ - -static void print_error(char *str, ...) -{ - char buf[1024]; - va_list ap; - - va_start(ap, str); - vsprintf(buf, str, ap); - va_end(ap); - - if (error_callback) error_callback(buf); -} - -int MEM_check_memory_integrity() -{ - char* err_val = NULL; - MemHead* listend; - /* check_memlist starts from the front, and runs until it finds - * the requested chunk. For this test, that's the last one. */ - listend = (MemHead*)membase->last; - - err_val = check_memlist(listend); - - return (int)err_val; -} - - -void MEM_set_error_callback(void (*func)(char *)) -{ - error_callback = func; -} - - -int MEM_allocN_len(void *vmemh) -{ - if (vmemh) { - MemHead *memh= (MemHead*)vmemh; - - memh--; - return memh->len; - } else - return 0; -} - -void *MEM_dupallocN(void *vmemh) -{ - void *newp= NULL; - - if (vmemh) { - MemHead *memh= (MemHead*)vmemh; - memh--; - - newp= MEM_mallocN(memh->len, "dupli_alloc"); - memcpy(newp, vmemh, memh->len); - } - - return newp; -} - -void *MEM_mallocN(unsigned int len, char *str) -{ - MemHead *memh; - MemTail *memt; - - len = (len + 3 ) & ~3; /* allocate in units of 4 */ - - memh= (MemHead *)malloc(len+sizeof(MemHead)+sizeof(MemTail)); - - if(memh!=0) { - memh->tag1 = MEMTAG1; - memh->name = str; - memh->nextname = 0; - memh->len = len; -/* memh->level = 0; */ - memh->tag2 = MEMTAG2; - - memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + len); - memt->tag3 = MEMTAG3; - - addtail(membase,&memh->next); - if (memh->next) memh->nextname = MEMNEXT(memh->next)->name; - - totblock++; - mem_in_use += len; - return (++memh); - } - print_error("Malloc returns nill: len=%d in %s\n",len,str); - return 0; -} - -void *MEM_callocN(unsigned int len, char *str) -{ - MemHead *memh; - MemTail *memt; - - len = (len + 3 ) & ~3; /* allocate in units of 4 */ - - memh= (MemHead *)calloc(len+sizeof(MemHead)+sizeof(MemTail),1); - - if(memh!=0) { - memh->tag1 = MEMTAG1; - memh->name = str; - memh->nextname = 0; - memh->len = len; -/* memh->level = 0; */ - memh->tag2 = MEMTAG2; - - memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + len); - memt->tag3 = MEMTAG3; - - addtail(membase,&memh->next); - if (memh->next) memh->nextname = MEMNEXT(memh->next)->name; - - totblock++; - mem_in_use += len; - return (++memh); - } - print_error("Calloc returns nill: len=%d in %s\n",len,str); - return 0; -} - - -void MEM_printmemlist() -{ - MemHead *membl; - - membl = (MemHead*)membase->first; - if (membl) membl = MEMNEXT(membl); - while(membl) { - print_error("%s len: %d %p\n",membl->name,membl->len, membl+1); - if(membl->next) - membl= MEMNEXT(membl->next); - else break; - } -} - -short MEM_freeN(void *vmemh) /* anders compileertie niet meer */ -{ - short error = 0; - MemTail *memt; - MemHead *memh= (MemHead*)vmemh; - char *name; - - if (memh == 0){ - MemorY_ErroR("free","attempt to free NULL pointer"); - /* print_error(err_stream, "%d\n", (memh+4000)->tag1); */ - return(-1); - } - - if(sizeof(long)==8) { - if (((long) memh) & 0x7) { - MemorY_ErroR("free","attempt to free illegal pointer"); - return(-1); - } - } - else { - if (((long) memh) & 0x3) { - MemorY_ErroR("free","attempt to free illegal pointer"); - return(-1); - } - } - - memh--; - if(memh->tag1 == MEMFREE && memh->tag2 == MEMFREE) { - MemorY_ErroR(memh->name,"double free"); - return(-1); - } - - if ((memh->tag1 == MEMTAG1) && (memh->tag2 == MEMTAG2) && ((memh->len & 0x3) == 0)) { - memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + memh->len); - if (memt->tag3 == MEMTAG3){ - - memh->tag1 = MEMFREE; - memh->tag2 = MEMFREE; - memt->tag3 = MEMFREE; - /* na tags !!! */ - rem_memblock(memh); - - return(0); - } - error = 2; - MemorY_ErroR(memh->name,"end corrupt"); - name = check_memlist(memh); - if (name != 0){ - if (name != memh->name) MemorY_ErroR(name,"is also corrupt"); - } - } else{ - error = -1; - name = check_memlist(memh); - if (name == 0) MemorY_ErroR("free","pointer not in memlist"); - else MemorY_ErroR(name,"error in header"); - } - - totblock--; - /* hier moet een DUMP plaatsvinden */ - - return(error); -} - -/* --------------------------------------------------------------------- */ -/* local functions */ -/* --------------------------------------------------------------------- */ - -static void addtail(localListBase *listbase, void *vlink) -{ - struct localLink *link= (localLink*)vlink; - - if (link == 0) return; - if (listbase == 0) return; - - link->next = 0; - link->prev = (localLink*)listbase->last; - - if (listbase->last) ((struct localLink *)listbase->last)->next = link; - if (listbase->first == 0) listbase->first = link; - listbase->last = link; -} - -static void remlink(localListBase *listbase, void *vlink) -{ - struct localLink *link= (localLink*)vlink; - - if (link == 0) return; - if (listbase == 0) return; - - if (link->next) link->next->prev = link->prev; - if (link->prev) link->prev->next = link->next; - - if (listbase->last == link) listbase->last = link->prev; - if (listbase->first == link) listbase->first = link->next; -} - -static void rem_memblock(MemHead *memh) -{ - remlink(membase,&memh->next); - if (memh->prev){ - if (memh->next) MEMNEXT(memh->prev)->nextname = MEMNEXT(memh->next)->name; - else MEMNEXT(memh->prev)->nextname = 0; - } - - totblock--; - mem_in_use -= memh->len; - free(memh); -} - -static void MemorY_ErroR(char *block, char *error) -{ - print_error("Memoryblock %s: %s\n",block,error); -} - -static char *check_memlist(MemHead *memh) -{ - MemHead *forw,*back,*forwok,*backok; - char *name; - - forw = (MemHead*)membase->first; - if (forw) forw = MEMNEXT(forw); - forwok = 0; - while(forw){ - if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break; - forwok = forw; - if (forw->next) forw = MEMNEXT(forw->next); - else forw = 0; - } - - back = (MemHead *) membase->last; - if (back) back = MEMNEXT(back); - backok = 0; - while(back){ - if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break; - backok = back; - if (back->prev) back = MEMNEXT(back->prev); - else back = 0; - } - - if (forw != back) return ("MORE THAN 1 MEMORYBLOCK CORRUPT"); - - if (forw == 0 && back == 0){ - /* geen foute headers gevonden dan maar op zoek naar memblock*/ - - forw = (MemHead*)membase->first; - if (forw) forw = MEMNEXT(forw); - forwok = 0; - while(forw){ - if (forw == memh) break; - if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break; - forwok = forw; - if (forw->next) forw = MEMNEXT(forw->next); - else forw = 0; - } - if (forw == 0) return (0); - - back = (MemHead *) membase->last; - if (back) back = MEMNEXT(back); - backok = 0; - while(back){ - if (back == memh) break; - if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break; - backok = back; - if (back->prev) back = MEMNEXT(back->prev); - else back = 0; - } - } - - if (forwok) name = forwok->nextname; - else name = "No name found"; - - if (forw == memh){ - /* voor alle zekerheid wordt dit block maar uit de lijst gehaald */ - if (forwok){ - if (backok){ - forwok->next = (MemHead *)&backok->next; - backok->prev = (MemHead *)&forwok->next; - forwok->nextname = backok->name; - } else{ - forwok->next = 0; - membase->last = (struct localLink *) &forwok->next; -/* membase->last = (struct Link *) &forwok->next; */ - } - } else{ - if (backok){ - backok->prev = 0; - membase->first = &backok->next; - } else{ - membase->first = membase->last = 0; - } - } - } else{ - MemorY_ErroR(name,"Additional error in header"); - return("Additional error in header"); - } - - return(name); -} - -/* eof */ diff --git a/topmodx/include/verse/mydevice.h b/topmodx/include/verse/mydevice.h deleted file mode 100644 index 225b59f..0000000 --- a/topmodx/include/verse/mydevice.h +++ /dev/null @@ -1,254 +0,0 @@ - -#ifndef __MYDEVICE_H__ -#define __MYDEVICE_H__ - -/* - * This file has its origin at sgi, where all device defines were written down. - * Blender copied this concept quite some, and expanded it with internal new defines (ton) - * - * mouse / timer / window: until 0x020 - * custom codes: 0x4... - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/* MOUSE : 0x00x */ - -#define LEFTMOUSE 0x001 -#define MIDDLEMOUSE 0x002 -#define RIGHTMOUSE 0x003 -#define MOUSEX 0x004 -#define MOUSEY 0x005 -#define WHEELUPMOUSE 0x00a -#define WHEELDOWNMOUSE 0x00b - -/* timers */ - -#define TIMER0 0x006 -#define TIMER1 0x007 -#define TIMER2 0x008 -#define TIMER3 0x009 - -/* SYSTEM : 0x01x */ - -#define KEYBD 0x010 /* keyboard */ -#define RAWKEYBD 0x011 /* raw keyboard for keyboard manager */ -#define REDRAW 0x012 /* used by port manager to signal redraws */ -#define INPUTCHANGE 0x013 /* input connected or disconnected */ -#define QFULL 0x014 /* queue was filled */ -#define WINFREEZE 0x015 /* user wants process in this win to shut up */ -#define WINTHAW 0x016 /* user wants process in this win to go again */ -#define WINCLOSE 0x017 /* window close */ -#define WINQUIT 0x018 /* signal from user that app is to go away */ -#define Q_FIRSTTIME 0x019 /* on startup */ - -/* standard keyboard */ - -#define AKEY 'a' -#define BKEY 'b' -#define CKEY 'c' -#define DKEY 'd' -#define EKEY 'e' -#define FKEY 'f' -#define GKEY 'g' -#define HKEY 'h' -#define IKEY 'i' -#define JKEY 'j' -#define KKEY 'k' -#define LKEY 'l' -#define MKEY 'm' -#define NKEY 'n' -#define OKEY 'o' -#define PKEY 'p' -#define QKEY 'q' -#define RKEY 'r' -#define SKEY 's' -#define TKEY 't' -#define UKEY 'u' -#define VKEY 'v' -#define WKEY 'w' -#define XKEY 'x' -#define YKEY 'y' -#define ZKEY 'z' - -#define ZEROKEY '0' -#define ONEKEY '1' -#define TWOKEY '2' -#define THREEKEY '3' -#define FOURKEY '4' -#define FIVEKEY '5' -#define SIXKEY '6' -#define SEVENKEY '7' -#define EIGHTKEY '8' -#define NINEKEY '9' - -#define CAPSLOCKKEY 211 - -#define LEFTCTRLKEY 212 -#define LEFTALTKEY 213 -#define RIGHTALTKEY 214 -#define RIGHTCTRLKEY 215 -#define RIGHTSHIFTKEY 216 -#define LEFTSHIFTKEY 217 - -#define ESCKEY 218 -#define TABKEY 219 -#define RETKEY 220 -#define SPACEKEY 221 -#define LINEFEEDKEY 222 -#define BACKSPACEKEY 223 -#define DELKEY 224 -#define SEMICOLONKEY 225 -#define PERIODKEY 226 -#define COMMAKEY 227 -#define QUOTEKEY 228 -#define ACCENTGRAVEKEY 229 -#define MINUSKEY 230 -#define SLASHKEY 232 -#define BACKSLASHKEY 233 -#define EQUALKEY 234 -#define LEFTBRACKETKEY 235 -#define RIGHTBRACKETKEY 236 - -#define LEFTARROWKEY 137 -#define DOWNARROWKEY 138 -#define RIGHTARROWKEY 139 -#define UPARROWKEY 140 - -#define PAD0 150 -#define PAD1 151 -#define PAD2 152 -#define PAD3 153 -#define PAD4 154 -#define PAD5 155 -#define PAD6 156 -#define PAD7 157 -#define PAD8 158 -#define PAD9 159 - - -#define PADPERIOD 199 -#define PADSLASHKEY 161 -#define PADASTERKEY 160 - - -#define PADMINUS 162 -#define PADENTER 163 -#define PADPLUSKEY 164 - - -#define F1KEY 300 -#define F2KEY 301 -#define F3KEY 302 -#define F4KEY 303 -#define F5KEY 304 -#define F6KEY 305 -#define F7KEY 306 -#define F8KEY 307 -#define F9KEY 308 -#define F10KEY 309 -#define F11KEY 310 -#define F12KEY 311 - -#define PAUSEKEY 165 -#define INSERTKEY 166 -#define HOMEKEY 167 -#define PAGEUPKEY 168 -#define PAGEDOWNKEY 169 -#define ENDKEY 170 - -#define UNKNOWNKEY 171 -#define COMMANDKEY 172 -#define GRLESSKEY 173 - -/* used as fake leftmouse event, special handled in interface.c */ -#define BUT_ACTIVATE 200 - -/* **************** BLENDER QUEUE EVENTS ********************* */ - -#define CHANGED 0x4000 -#define DRAWEDGES 0x4001 -#define AFTERQUEUE 0x4002 -#define BACKBUFDRAW 0x4003 -#define EXECUTE 0x4004 -#define IGNORE_REDRAW 0x4005 -#define LOAD_FILE 0x4006 -#define RESHAPE 0x4007 -#define UI_BUT_EVENT 0x4008 -#define AUTOSAVE_FILE 0x4009 -#define UNDOPUSH 0x400A - -/* REDRAWVIEW3D has to be the first one (lowest number) for buttons! */ -#define REDRAWVIEW3D 0x4010 -#define REDRAWVIEWCAM 0x4011 -#define REDRAWVIEW3D_Z 0x4012 - -#define REDRAWALL 0x4013 -#define REDRAWHEADERS 0x4014 - -#define REDRAWBUTSHEAD 0x4015 -#define REDRAWBUTSALL 0x4016 - -#define REDRAWBUTSSCENE 0x4017 -#define REDRAWBUTSOBJECT 0x4018 -#define REDRAWBUTSEDIT 0x4019 -#define REDRAWBUTSSCRIPT 0x401A -#define REDRAWBUTSLOGIC 0x401B -#define REDRAWBUTSSHADING 0x401C -#define REDRAWBUTSGAME 0x401D -#define REDRAWBUTSEFFECTS 0x401D - -#define REDRAWINFO 0x4021 -#define RENDERPREVIEW 0x4022 -#define REDRAWIPO 0x4023 -#define REDRAWDATASELECT 0x4024 -#define REDRAWSEQ 0x4025 -#define REDRAWIMAGE 0x4026 -#define REDRAWOOPS 0x4027 -#define REDRAWIMASEL 0x4028 -#define AFTERIMASELIMA 0x4029 -#define AFTERIMASELGET 0x402A -#define AFTERIMAWRITE 0x402B -#define IMALEFTMOUSE 0x402C -#define AFTERPIBREAD 0x402D -#define REDRAWTEXT 0x402E -#define REDRAWSOUND 0x402F -#define REDRAWACTION 0x4030 -#define REDRAWNLA 0x4031 -#define REDRAWSCRIPT 0x4032 -#define REDRAWTIME 0x4033 -#define REDRAWBUTSCONSTRAINT 0x4034 -#define ONLOAD_SCRIPT 0x4035 -#define SCREEN_HANDLER 0x4036 -#define REDRAWANIM 0x4037 - -#endif /* !__MYDEVICE_H__ */ - diff --git a/topmodx/include/verse/util.cc b/topmodx/include/verse/util.cc deleted file mode 100644 index 99bd410..0000000 --- a/topmodx/include/verse/util.cc +++ /dev/null @@ -1,657 +0,0 @@ -/* util.c - * - * various string, file, list operations. - * - * - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - * - */ - -#include -#include -#include -#include -#include - -#include "MEM_guardedalloc.h" - -#include "TLI_toplib.h" -#include "DNA_listBase.h" -/*#include "TLI_storage.h"*/ -/*#include "BLI_storage_types.h"*/ -#include "TLI_dynamiclist.h" - -#include "TLI_util.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifndef WIN32 -#include -#else -#include -#endif - -#ifdef WIN32 -/*#include "BLI_winstuff.h"*/ -#endif - - -#ifndef WIN32 -#include -#endif - -#ifdef __APPLE__ -#include -#include -#endif - - -// copies from BKE_utildefines -#ifndef FILE_MAXDIR -#define FILE_MAXDIR 160 -#endif - -#ifndef FILE_MAXFILE -#define FILE_MAXFILE 80 -#endif - -/* local */ - -static int add_win32_extension(char *name); - -/* implementation */ - -/* Ripped this from blender.c - */ -void addlisttolist(ListBase *list1, ListBase *list2) -{ - - if(list2->first==0) return; - - if(list1->first==0) { - list1->first= list2->first; - list1->last= list2->last; - } - else { - ((struct Link *)list1->last)->next= (Link*)list2->first; - ((struct Link *)list2->first)->prev= (Link*)list1->last; - list1->last= list2->last; - } - list2->first= list2->last= 0; -} - - -void TLI_addhead(ListBase *listbase, void *vlink) -{ - struct Link *link= (Link*)vlink; - - if (link == 0) return; - if (listbase == 0) return; - - link->next = (Link*)listbase->first; - link->prev = 0; - - if (listbase->first) ((struct Link *)listbase->first)->prev = link; - if (listbase->last == 0) listbase->last = link; - listbase->first = link; -} - - -void TLI_addtail(ListBase *listbase, void *vlink) -{ - struct Link *link= (Link*)vlink; - - if (link == 0) return; - if (listbase == 0) return; - - link->next = 0; - link->prev = (Link*)listbase->last; - - if (listbase->last) ((struct Link *)listbase->last)->next = link; - if (listbase->first == 0) listbase->first = link; - listbase->last = link; -} - - -void TLI_remlink(ListBase *listbase, void *vlink) -{ - struct Link *link= (Link*)vlink; - - if (link == 0) return; - if (listbase == 0) return; - - if (link->next) link->next->prev = link->prev; - if (link->prev) link->prev->next = link->next; - - if (listbase->last == link) listbase->last = link->prev; - if (listbase->first == link) listbase->first = link->next; -} - - -void TLI_freelinkN(ListBase *listbase, void *vlink) -{ - struct Link *link= (Link*)vlink; - - if (link == 0) return; - if (listbase == 0) return; - - TLI_remlink(listbase,link); - MEM_freeN(link); -} - - -void TLI_insertlink(ListBase *listbase, void *vprevlink, void *vnewlink) -{ - struct Link *prevlink= (Link*)vprevlink, *newlink= (Link*)vnewlink; - - /* newlink comes after prevlink */ - - if (newlink == 0) return; - if (listbase == 0) return; - - if(listbase->first==0) { /* empty list */ - listbase->first= newlink; - listbase->last= newlink; - return; - } - if (prevlink== 0) { /* insert before first element */ - newlink->next= (Link*)listbase->first; - newlink->prev= 0; - newlink->next->prev= (Link*)newlink; - listbase->first= (Link*)newlink; - return; - } - - if (listbase->last== prevlink) /* at end of list */ - listbase->last = newlink; - - newlink->next= prevlink->next; - prevlink->next= newlink; - if(newlink->next) newlink->next->prev= newlink; - newlink->prev= prevlink; -} - -void TLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink) -{ - struct Link *nextlink= (Link*)vnextlink, *newlink= (Link*)vnewlink; - - /* newlink before nextlink */ - - if (newlink == 0) return; - if (listbase == 0) return; - - if(listbase->first==0) { /* empty list */ - listbase->first= newlink; - listbase->last= newlink; - return; - } - if (nextlink== 0) { /* insert at end of list */ - newlink->prev= (Link*)listbase->last; - newlink->next= 0; - ((struct Link *)listbase->last)->next= newlink; - listbase->last= newlink; - return; - } - - if (listbase->first== nextlink) /* at beginning of list */ - listbase->first = newlink; - - newlink->next= nextlink; - newlink->prev= nextlink->prev; - nextlink->prev= newlink; - if(newlink->prev) newlink->prev->next= newlink; -} - - -void TLI_freelist(ListBase *listbase) -{ - struct Link *link,*next; - - if (listbase == 0) return; - link= (Link*)listbase->first; - while(link) { - next= link->next; - free(link); - link= next; - } - listbase->first=0; - listbase->last=0; -} - -void TLI_freelistN(ListBase *listbase) -{ - struct Link *link,*next; - - if (listbase == 0) return; - link= (Link*)listbase->first; - while(link) { - next= link->next; - MEM_freeN(link); - link= next; - } - listbase->first=0; - listbase->last=0; -} - - -int TLI_countlist(ListBase *listbase) -{ - Link * link; - int count = 0; - - if (listbase){ - link = (Link*)listbase->first; - while(link) { - count++; - link= link->next; - } - } - return(count); -} - -void * TLI_findlink(ListBase *listbase, int number) -{ - Link * link = NULL; - - if (number >= 0) { - link = (Link*)listbase->first; - while (link != NULL && number != 0) { - number--; - link = link->next; - } - } - - return (link); -} - -/*=====================================================================================*/ -/* Methods for access array (realloc) */ -/*=====================================================================================*/ - -/* remove item with index */ -static void rem_array_item(struct DynamicArray *da, unsigned int index) -{ - da->items[index]=NULL; - da->count--; - if(index==da->last_item_index){ - while((!da->items[da->last_item_index]) && (da->last_item_index>0)){ - da->last_item_index--; - } - } -} - -/* add array (if needed, then realloc) */ -static void add_array_item(struct DynamicArray *da, void *item, unsigned int index) -{ - /* realloc of access array */ - if(da->max_item_index < index){ - unsigned int i, max = da->max_item_index; - void **nitems; - - do { - da->max_item_index += PAGE_SIZE; /* OS can allocate only PAGE_SIZE Bytes */ - } while(da->max_item_index<=index); - - nitems = (void**)MEM_mallocN(sizeof(void*)*(da->max_item_index+1), "dlist access array"); - for(i=0;i<=max;i++) - nitems[i] = da->items[i]; - - /* set rest pointers to the NULL */ - for(i=max+1; i<=da->max_item_index; i++) - nitems[i]=NULL; - - MEM_freeN(da->items); /* free old access array */ - da->items = nitems; - } - - da->items[index] = item; - da->count++; - if(index > da->last_item_index) da->last_item_index = index; -} - -/* free access array */ -static void destroy_array(DynamicArray *da) -{ - da->count=0; - da->last_item_index=0; - da->max_item_index=0; - MEM_freeN(da->items); -} - -/* init dynamic array */ -static void init_array(DynamicArray *da) -{ - unsigned int i; - - da->count=0; - da->last_item_index=0; - da->max_item_index = PAGE_SIZE-1; - da->items = (void**)MEM_mallocN(sizeof(void*)*(da->max_item_index+1),"dlist access array"); - for(i=0; i<=da->max_item_index; i++) da->items[i]=NULL; -} - - -/*=====================================================================================*/ -/* Methods for two way dynamic list with access array */ -/*=====================================================================================*/ - -/* create new two way dynamic list with access arrayfrom two way dynamic list - * it doesn't copy any items to new array or something like this It is strongly - * recomended to use TLI_dlist_ methods for adding/removing items from dynamic list - * unless you can end with inconsistence system !!! */ -DynamicList *TLI_dlist_from_listbase(ListBase *lb) -{ - DynamicList *dlist; - Link *item; - int i=0, count; - - if(!lb) return NULL; - - count = TLI_countlist(lb); - - dlist = (DynamicList*)MEM_mallocN(sizeof(DynamicList), "temp dynamic list"); - /* ListBase stuff */ - dlist->lb.first = lb->first; - dlist->lb.last = lb->last; - /* access array stuff */ - dlist->da.count=count; - dlist->da.max_item_index = count-1; - dlist->da.last_item_index = count -1; - dlist->da.items = (void**)MEM_mallocN(sizeof(void*)*count, "temp dlist access array"); - - item = (Link*)lb->first; - while(item){ - dlist->da.items[i] = (void*)item; - item = item->next; - i++; - } - - /* to prevent you of using original ListBase :-) */ - lb->first = lb->last = NULL; - - return dlist; -} - -/* take out ListBase from DynamicList and destroy all temporary structures of DynamicList */ -ListBase *TLI_listbase_from_dlist(DynamicList *dlist, ListBase *lb) -{ - if(!dlist) return NULL; - - if(!lb) lb = (ListBase*)MEM_mallocN(sizeof(ListBase), "ListBase"); - - lb->first = dlist->lb.first; - lb->last = dlist->lb.last; - - /* free all items of access array */ - MEM_freeN(dlist->da.items); - /* free DynamicList*/ - MEM_freeN(dlist); - - return lb; -} - -/* return pointer at item from th dynamic list with access array */ -void *TLI_dlist_find_link(DynamicList *dlist, unsigned int index) -{ - if(!dlist) return NULL; - - if((index <= dlist->da.last_item_index) && (index >= 0)){ - return dlist->da.items[index]; - } - else { - return NULL; - } -} - -/* return count of items in the dynamic list with access array */ -unsigned int TLI_count_items(DynamicList *dlist) -{ - if(!dlist) return 0; - - return dlist->da.count; -} - -/* free item from the dynamic list with access array */ -void TLI_dlist_free_item(DynamicList *dlist, unsigned int index) -{ - if(!dlist) return; - - if((index <= dlist->da.last_item_index) && (dlist->da.items[index])){ - TLI_freelinkN(&(dlist->lb), dlist->da.items[index]); - rem_array_item(&(dlist->da), index); - } -} - -/* remove item from the dynamic list with access array */ -void TLI_dlist_rem_item(DynamicList *dlist, unsigned int index) -{ - if(!dlist) return; - - if((index <= dlist->da.last_item_index) && (dlist->da.items[index])){ - TLI_remlink(&(dlist->lb), dlist->da.items[index]); - rem_array_item(&(dlist->da), index); - } -} - -/* add item to the dynamic list with access array (index) */ -void* TLI_dlist_add_item_index(DynamicList *dlist, void *item, unsigned int index) -{ - if(!dlist) return NULL; - - if((index <= dlist->da.max_item_index) && (dlist->da.items[index])) { - MEM_freeN(item); - return NULL; - } - else { - add_array_item(&(dlist->da), item, index); - TLI_addtail(&(dlist->lb), item); - return item; - } -} - -/* destroy dynamic list with access array */ -void TLI_dlist_destroy(DynamicList *dlist) -{ - if(!dlist) return; - - TLI_freelistN(&(dlist->lb)); - destroy_array(&(dlist->da)); -} - -/* init dynamic list with access array */ -void TLI_dlist_init(DynamicList *dlist) -{ - if(!dlist) return; - - dlist->lb.first = NULL; - dlist->lb.last = NULL; - - init_array(&(dlist->da)); -} - -/*=====================================================================================*/ - -char *TLI_strdupn(char *str, int len) { - char *n= (char*)MEM_mallocN(len+1, "strdup"); - memcpy(n, str, len); - n[len]= '\0'; - - return n; -} -char *TLI_strdup(char *str) { - return TLI_strdupn(str, strlen(str)); -} - -char *TLI_strncpy(char *dst, char *src, int maxncpy) { - int srclen= strlen(src); - int cpylen= (srclen>(maxncpy-1))?(maxncpy-1):srclen; - - memcpy(dst, src, cpylen); - dst[cpylen]= '\0'; - - return dst; -} - -int TLI_streq(char *a, char *b) { - return (strcmp(a, b)==0); -} -int TLI_strcaseeq(char *a, char *b) { - return (TLI_strcasecmp(a, b)==0); -} - -void TLI_makestringcode(char *fromfile, char *str) -{ - char *slash, len, temp[512]; - - strcpy(temp, fromfile); - - TLI_char_switch(temp, '\\', '/'); - TLI_char_switch(str, '\\', '/'); - - /* Find the last slash */ - slash = strrchr(temp, '/'); - if(slash) { - *(slash+1)= 0; - len= strlen(temp); - if(len) { - if(strncmp(str, temp, len)==0) { - temp[0]= '/'; - temp[1]= '/'; - strcpy(temp+2, str+len); -#ifdef WIN32 - TLI_char_switch(temp+2, '/', '\\'); -#endif - strcpy(str, temp); - } - } - } -} - -void TLI_clean(char *path) -{ - if(path==0) return; -#ifdef WIN32 - if(path && strlen(path)>2) { - TLI_char_switch(path+2, '/', '\\'); - } -#else - TLI_char_switch(path, '\\', '/'); -#endif -} - -void TLI_char_switch(char *string, char from, char to) -{ - if(string==0) return; - while (*string != 0) { - if (*string == from) *string = to; - string++; - } -} - - - -int TLI_testextensie(char *str, char *ext) -{ - short a, b; - int retval; - - a= strlen(str); - b= strlen(ext); - - if(a==0 || b==0 || b>=a) { - retval = 0; - } else if (TLI_strcasecmp(ext, str + a - b)) { - retval = 0; - } else { - retval = 1; - } - - return (retval); -} - - -/* - * returns absolute path to the app bundle - * only useful on OS X - */ -#ifdef __APPLE__ -char* TLI_getbundle(void) { - CFURLRef bundleURL; - CFStringRef pathStr; - static char path[MAXPATHLEN]; - CFBundleRef mainBundle = CFBundleGetMainBundle(); - - bundleURL = CFBundleCopyBundleURL(mainBundle); - pathStr = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle); - CFStringGetCString(pathStr, path, MAXPATHLEN, kCFStringEncodingASCII); - return path; -} -#endif - -int TLI_strcasecmp(const char *s1, const char *s2) { - int i; - - for (i=0; ; i++) { - char c1 = tolower(s1[i]); - char c2 = tolower(s2[i]); - - if (c1c2) { - return 1; - } else if (c1==0) { - break; - } - } - - return 0; -} - -int TLI_strncasecmp(const char *s1, const char *s2, int n) { - int i; - - for (i=0; ic2) { - return 1; - } else if (c1==0) { - break; - } - } - - return 0; -} diff --git a/topmodx/include/verse/verse_common.cc b/topmodx/include/verse/verse_common.cc deleted file mode 100644 index d545f8a..0000000 --- a/topmodx/include/verse/verse_common.cc +++ /dev/null @@ -1,263 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include -#include - -#include "MEM_guardedalloc.h" - -#include "mydevice.h" - -#include "DNA_object_types.h" -#include "DNA_mesh_types.h" - -#include "TKE_global.h" -/*#include "TKE_verse.h"*/ -/*#include "TKE_blender.h"*/ - -#include "TIF_verse.h" -#include "TIF_space.h" -/*#include "TIF_interface.h"*/ - -extern ListBase session_list; - -/* - * this function creates popup menu with all active VerseSessions - * it return pointer at selected VerseSession, if no VerseSession - * is selected, then NULL is returned - */ -VerseSession *session_menu(void) -{ - struct VerseSession *session; - char session_number[10]; - short i=1, num=1; - char session_address_list[1024]; /* pupmenu business */ - - session_number[0] = '\0'; - session_address_list[0] = '\0'; - - strcat(session_address_list, "Session list %t"); - - session = (VerseSession*)session_list.first; - - while(session){ - strcat(session_address_list, "| "); - strcat(session_address_list, session->address); - strcat(session_address_list, " %x"); - sprintf(session_number, "%d", num); - strcat(session_address_list, session_number); - num++; - session = session->next; - } - - printf("session list: %s\n", session_address_list); -/* num = pupmenu(session_address_list);*/ - - if(num==-1) return NULL; - - session = (VerseSession*)session_list.first; - - while(session) { - if(i==num) return session; - i++; - session = session->next; - } - - return NULL; -} - -/* - * returns name of verse client (it is used as avatar's name) - */ -char *verse_client_name(void) -{ - char *client_name; - char topmod_version[5]; - short name_length = 14; - -#ifndef WIN32 - char *hostname; - hostname = getenv("HOSTNAME"); - if(hostname) name_length += strlen(hostname); -#endif - - client_name = (char*)MEM_mallocN(sizeof(char)*name_length, "verse client name"); - client_name[0] = '\0'; - - strcat(client_name, "topmod_"); - topmod_version[0] = '\0'; - sprintf(topmod_version, "%d", 2);//TOPMOD_VERSION); - strcat(client_name, topmod_version); - -#ifndef WIN32 - /* add at the end of the client name hostname */ - if(hostname) { - strcat(client_name, ":"); - strcat(client_name, hostname); - } -#endif - - return client_name; -} - -/*=========================================================== - * - * functions executed after calling callback functions - * - ============================================================*/ - -/* - * this function is called, when some tag was changed or new tag was created - */ -void post_tag_change(VNode *vnode, VTag *vtag) -{ - printf("\tnew tag %s was created or changed\n", vtag->name); -} - -/* - * this function is called, when verse taggroup was created - */ -void post_taggroup_create(VNode *vnode, VTagGroup *vtaggroup) -{ - printf("\tnew taggroup %s was created\n", vtaggroup->name); -} - -/* - * this function is called after creating of new VerseNode - */ -void post_node_create(VNode *vnode) -{ -/* allqueue(REDRAWOOPS, 0);*/ -} - -/* - * this function is called after destroying of VerseNode - */ -void post_node_destroy(VNode *vnode) -{ -/* allqueue(REDRAWOOPS, 0);*/ - - /* \todo destroy bindings between vnode and blender data structures */ -} - -/* - * this function is calles after renaming of VerseNode by verse_server - */ -void post_node_name_set(VNode *vnode) -{ - /* if VerseNode has coresponding blender data structure, then - * change ID name of data structure */ - if(vnode->type==V_NT_OBJECT) { - struct Object *ob; - ob = (Object*)((VObjectData*)vnode->data)->object; - if(ob) { - char *str; - str = (char*)malloc(sizeof(char)*(strlen(vnode->name)+3)); - str[0] = '\0'; - strcat(str, "OB"); - strcat(str, vnode->name); - strncpy(ob->id.name, str, 23); - printf("\tob->id.name: %s\n", ob->id.name); - free(str); - } - } - else if(vnode->type==V_NT_GEOMETRY) { - struct Mesh *me; - - me = (Mesh*)((VGeomData*)vnode->data)->mesh; - if(me) { - char *str; - str = (char*)malloc(sizeof(char)*(strlen(vnode->name)+3)); - str[0] = '\0'; - strcat(str, "ME"); - strcat(str, vnode->name); - strncpy(me->id.name, str, 23); - printf("\tme->id.name: %s\n", me->id.name); - free(str); - } - } - -/* allqueue(REDRAWALL, 0);*/ -} - -/* - * this function is called after acception connection with verse server - */ -void post_connect_accept(VerseSession *session) -{ - // VerseConnected |= T_VERSE_CONNECTED; - VerseConnected = true; - printf("post_connect_accept called\n"); - - session->counter = 0; - -/* allqueue(REDRAWOOPS, 0);*/ -} - -/* - * this function is called, when connestion with verse server is ended/terminated/etc. - */ -void post_connect_terminated(VerseSession *session) -{ - /* if it is last session, then no other will exist ... set Global flag */ - if((session->prev==NULL) && (session->next==NULL)) - // VerseConnected &= ~T_VERSE_CONNECTED; - VerseConnected = false; - -/* allqueue(REDRAWOOPS, 0);*/ -} - -/* - * if connection wasn't accepted, then free VerseSession - * and print warning message with popupmenu - */ -void post_connect_update(VerseSession *session) -{ - if(session->flag & VERSE_CONNECTING) { - session->counter++; - if(session->counter > MAX_UNCONNECTED_EVENTS) { -// char *str; -// /* popup menu*/ -// str = malloc(sizeof(char)*(strlen(session->address)+35)); -// str[0]='\0'; -// strcat(str, "Error%t|No response from server: "); -// strcat(str, session->address); -// /* pupmenu(str);*/ -// free(str); - - session->flag = 0; - session->counter = 0; - session->post_connect_terminated(session); - free_verse_session(session); - } - } -} - -/*#endif*/ - diff --git a/topmodx/include/verse/verse_geometry_node.cc b/topmodx/include/verse/verse_geometry_node.cc deleted file mode 100644 index f957a62..0000000 --- a/topmodx/include/verse/verse_geometry_node.cc +++ /dev/null @@ -1,1425 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include - -#include "MEM_guardedalloc.h" - -#include "DNA_listBase.h" - -#include "TLI_dynamiclist.h" -#include "TLI_toplib.h" -#include "TLI_arithb.h" - -#include "TKE_verse.h" -#include "TKE_utildefines.h" - -#include "TIF_verse.h" - -#include "verse.h" - -/* function prototypes of static functions */ - -/* callback functions */ -static void cb_g_layer_create(void *user_data, VNodeID node_id, VLayerID layer_id, const char *name, VNGLayerType type, uint32 def_integer, real64 def_real); -static void cb_g_layer_destroy(void *user_data, VNodeID node_id, VLayerID layer_id); -static void cb_g_vertex_set_xyz_real32(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 x, real32 y, real32 z); -static void cb_g_polygon_set_corner_uint32(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3); -static void cb_g_vertex_delete_real32(void *user_data, VNodeID node_id, uint32 vertex_id); -static void cb_g_polygon_delete(void *user_data, VNodeID node_id, uint32 polygon_id); -static void cb_g_crease_set_edge(void *user_data, VNodeID node_id, const char *layer, uint32 def_crease); -static void cb_g_crease_set_vertex(void *user_data, VNodeID node_id, const char *layer, uint32 def_crease); - -/* other static functions */ - -static VLayer *create_vlayer(struct VerseSession *session, VNodeID node_id, VLayerID layer_id, const char *name, VNGLayerType type, uint32 def_integer, real64 def_real); - -static uint8_item *get_face_smooth_item(struct VerseFace *vface); -static void free_unneeded_verseverts_of_verseface(struct VNode *vnode, struct VerseFace *vface); -static void free_verse_vertex(struct VLayer *vlayer, struct VerseVert *vvert); -static void free_verse_face(struct VLayer *vlayer, struct VerseFace *vface); -static void free_verse_layer_data(struct VNode *vnode, struct VLayer *vlayer); - -static void send_verse_layer(struct VLayer *vlayer); -static void send_verse_face(struct VerseFace *vface); - -static VerseVert* find_verse_vert_in_queue(struct VLayer *vlayer, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 x, real32 y, real32 z); -static VerseFace* find_verse_face_in_queue(struct VLayer *vlayer, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3); - -static unsigned short test_incoming_verseface(struct VGeomData *geom, struct VerseFace *vface); -static void find_unsent_faces(struct VNode *vnode, struct VerseVert *vvert); -static void find_vlayer_orphans(struct VNode *vnode, struct VerseVert *vvert); -static void move_face_orphan_to_dlist(struct VNode *vnode, struct VLayer *vlayer, struct VerseFace *vface); -static void increase_verse_verts_references(struct VerseFace *vface); -static void recalculate_verseface_normals(struct VNode *vnode); - -/* - * recalcute normals of all VerseFaces - */ -static void recalculate_verseface_normals(VNode *vnode) -{ - struct VLayer *vert_layer, *face_layer; - struct VerseFace *vface; - struct VerseVert *vvert; - - if(vnode->type != V_NT_GEOMETRY) return; - - vert_layer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - face_layer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - - vvert = (VerseVert*)vert_layer->dl.lb.first; - while(vvert) { - vvert->no[0] = vvert->no[1] = vvert->no[2] = 0.0; - vvert = vvert->next; - } - - vface = (VerseFace*)face_layer->dl.lb.first; - while(vface) { - /* calculate face normals */ -/* if(vface->vvert3) { - CalcNormFloat4(vface->vvert0->co, vface->vvert1->co, - vface->vvert2->co, vface->vvert3->co, vface->no); - VecAddf(vface->vvert3->no, vface->vvert3->no, vface->no); - } - else - CalcNormFloat(vface->vvert0->co, vface->vvert1->co, - vface->vvert2->co, vface->no); -*/ - /* calculate vertex normals ... it is averadge of all face normals using the vertex */ -/* VecAddf(vface->vvert0->no, vface->vvert0->no, vface->no);*/ -/* VecAddf(vface->vvert1->no, vface->vvert1->no, vface->no);*/ -/* VecAddf(vface->vvert2->no, vface->vvert2->no, vface->no);*/ - - vface = vface->next; - } - - /* we have to normalise all vertex normals */ - vvert = (VerseVert*)vert_layer->dl.lb.first; - while(vvert) { -/* Normalise(vvert->no);*/ - vvert = vvert->next; - } -} - -/* - * add item to the queue and send it if possible - */ -void add_item_to_send_queue(ListBase *lb, void *item, unsigned int type) -{ - TLI_addtail(lb, item); - switch (type) { - case VERSE_NODE: - if(lb->first==lb->last) send_verse_node((VNode*)item); - break; - case VERSE_LINK: - if(((VLink*)item)->flag & LINK_SEND_READY) send_verse_link((VLink*)item); - break; - case VERSE_LAYER: - send_verse_layer((VLayer*)item); - break; - case VERSE_VERT: - send_verse_vertex((VerseVert*)item); - break; - case VERSE_FACE: - if(((VerseFace*)item)->flag & FACE_SEND_READY) - send_verse_face((VerseFace*)item); - break; - case VERSE_TAG: - send_verse_tag((VTag*)item); - break; - case VERSE_TAG_GROUP: - send_verse_taggroup((VTagGroup*)item); - break; - } -} - -/* - * return VerseLayer with certain content (vertexes, polygons, in the - * future: weight, red color, etc.) - */ -VLayer* find_verse_layer_type(VGeomData *geom, short content) -{ - struct VLayer *vlayer = NULL; - - switch(content) { - case VERTEX_LAYER: - /* VERTEX_LAYER equals 0 and vertex layer is - * always in 1st layer */ - vlayer = (VLayer*)geom->layers.da.items[VERTEX_LAYER]; - break; - case POLYGON_LAYER: - /* POLYGON_LAYER equals 1 and vertex layer is - * always in 2nd layer */ - vlayer = (VLayer*)geom->layers.da.items[POLYGON_LAYER]; - break; - case POLYGON_SMOOTH_LAYER: - /* POLYGON_SMOOTH_LAYER can be in various layer - * we store id of this layer in geom node - * variable, when this layer is created */ - vlayer = (VLayer*)TLI_dlist_find_link(&(geom->layers), geom->smooth_layer); - break; - } - - return vlayer; -} - -/* - * increase references of VerseVerts of new VerseFace - */ -static void increase_verse_verts_references(VerseFace *vface) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode; - struct VLayer *vlayer; - - if(!session) return; - - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), vface->node_id); - - vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - - if(vface->vvert0) vface->vvert0->counter++; - if(vface->vvert1) vface->vvert1->counter++; - if(vface->vvert2) vface->vvert2->counter++; - if(vface->vvert3) vface->vvert3->counter++; -} - -/* - * move VerseFace from list of orphans to dlist of VerseFaces (if VerseFace was only changed - * then this VerseFace is only removed from list of orphans) - */ -static void move_face_orphan_to_dlist(VNode *vnode, VLayer *vlayer, VerseFace *vface) -{ - /* remove vface from list of orphans */ - TLI_remlink(&(vlayer->orphans), vface); - /* increase references of all vertexes beying part of this face*/ - increase_verse_verts_references(vface); - - if(vface->flag & FACE_RECEIVED) { - /* set up vface flag */ - vface->flag &= ~FACE_RECEIVED; - /* move vface to dynamic list of faces */ - TLI_dlist_add_item_index(&(vlayer->dl), (void*)vface, vface->id); - /* try to set up pointer at face value */ - if(!(vface->smooth)) vface->smooth = get_face_smooth_item(vface); - /* recalculate all vertex and faces normals */ - recalculate_verseface_normals(vnode); - /* post create action (change local data) */ - ((VGeomData*)vnode->data)->post_polygon_create(vnode, vface); - } - else if(vface->flag & FACE_CHANGED) { - /* set up vface flag */ - vface->flag &= ~FACE_CHANGED; - /* move vface to dynamic list of faces */ - TLI_dlist_add_item_index(&(vlayer->dl), (void*)vface, vface->id); - /* recalculate all vertex and faces normals */ - recalculate_verseface_normals(vnode); - /* post create action (change local data) */ - ((VGeomData*)vnode->data)->post_polygon_set_corner(vnode, vface); - } -} - -/* - * find all VerseFaces waiting in queue, which needs id of new VerseVert - */ -static void find_unsent_faces(VNode *vnode, VerseVert *vvert) -{ - VLayer *vlayer; - VerseFace *vface, *next_vface; - - vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - - if(vlayer) { - vface = (VerseFace*)vlayer->queue.first; - while(vface) { - next_vface = vface->next; - if(vface->vvert0==vvert) { - vface->v0 = vvert->id; - vface->counter--; - } - else if(vface->vvert1==vvert) { - vface->v1 = vvert->id; - vface->counter--; - } - else if(vface->vvert2==vvert) { - vface->v2 = vvert->id; - vface->counter--; - } - else if(vface->vvert3==vvert){ - vface->v3 = vvert->id; - vface->counter--; - } - - if(vface->counter<1 && !(vface->flag & FACE_SENT)) { - /* when VerseFace was only changed, then it is neccessary - * put it back to list of VerseFaces*/ - if(vface->flag & FACE_CHANGED) { - TLI_remlink(&(vlayer->queue), vface); - TLI_dlist_add_item_index(&(vlayer->dl), vface, vface->id); - } - send_verse_face(vface); - } - - vface = next_vface; - } - } -} - -/* - * find all VerseFace orphans, which needs incoming VerseVert - */ -static void find_vlayer_orphans(VNode *vnode, VerseVert *vvert) -{ - VLayer *vlayer; - VerseFace *vface, *next_vface; - unsigned int vertex_id = vvert->id; - - vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - - if(vlayer) { - vface = (VerseFace*)vlayer->orphans.first; - while(vface){ - next_vface = vface->next; - if(vface->v0 == vertex_id) { - vface->vvert0 = vvert; - vface->counter--; - } - else if(vface->v1 == vertex_id) { - vface->vvert1 = vvert; - vface->counter--; - } - else if(vface->v2 == vertex_id) { - vface->vvert2 = vvert; - vface->counter--; - } - else if(vface->v3 == vertex_id) { - vface->vvert3 = vvert; - vface->counter--; - } - if(vface->counter<1) { - /* moving VerseFace orphan to dlist */ - move_face_orphan_to_dlist(vnode, vlayer, vface); - } - vface = next_vface; - } - } -} - -/* - * return number of VerseVerts missing to incoming VerseFace, set up pointers - * at VerseVerts - */ -static unsigned short test_incoming_verseface(VGeomData *geom, VerseFace *vface) -{ - struct VLayer *vert_layer; - struct VerseVert *vvert; - int counter=0; - - vert_layer = find_verse_layer_type(geom, VERTEX_LAYER); - - if(vface->v0 != -1){ - vvert = (VerseVert*)TLI_dlist_find_link(&(vert_layer->dl), vface->v0); - if(vvert==NULL) counter++; - else vface->vvert0 = vvert; - } - if(vface->v1 != -1){ - vvert = (VerseVert*)TLI_dlist_find_link(&(vert_layer->dl), vface->v1); - if(vvert==NULL) counter++; - else vface->vvert1 = vvert; - } - if(vface->v2 != -1){ - vvert = (VerseVert*)TLI_dlist_find_link(&(vert_layer->dl), vface->v2); - if(vvert==NULL) counter++; - else vface->vvert2 = vvert; - } - if(vface->v3 != -1){ - vvert = (VerseVert*)TLI_dlist_find_link(&(vert_layer->dl), vface->v3); - if(vvert==NULL) counter++; - else vface->vvert3 = vvert; - } - - return counter; -} - -/* - * try to find VerseFace in queue - */ -static VerseFace* find_verse_face_in_queue( - VLayer *vlayer, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - uint32 v0, - uint32 v1, - uint32 v2, - uint32 v3) -{ - struct VerseFace *vface = (VerseFace*)vlayer->queue.first; - - while(vface){ - if((vface->v0==v0) && (vface->v1==v1) && (vface->v2==v2) && (vface->v3==v3)){ - vface->id = polygon_id; - vface->layer_id = layer_id; - return vface; - } - vface = vface->next; - } - return NULL; -} - -/* - * try to find VerseVert in queue - */ -static VerseVert* find_verse_vert_in_queue( - VLayer *vlayer, - VNodeID node_id, - VLayerID layer_id, - uint32 vertex_id, - real32 x, - real32 y, - real32 z) -{ - VerseVert *vvert=NULL; - - vvert= (VerseVert*)vlayer->queue.first; - - while(vvert){ - if((vvert->node_id == node_id) && (vvert->co[0] == x) && (vvert->co[1] == y) && (vvert->co[2] == z)) - { - /* set layers */ - vvert->id = vertex_id; - vvert->layer_id = layer_id; - - return vvert; - } - vvert = vvert->next; - } - - return NULL; -} - -/* - * send delete command to verse server - */ -void send_verse_vertex_delete(VerseVert *vvert) -{ - verse_session_set(vvert->vsession); - - verse_send_g_vertex_delete_real32(vvert->node_id, vvert->id); -} - -/* - * send VerseLayer to verse server - */ -static void send_verse_layer(VLayer *vlayer) -{ - verse_session_set(vlayer->vsession); - - verse_send_g_layer_create( - vlayer->node_id, - vlayer->id, - vlayer->name, - vlayer->type, - vlayer->def_int, - vlayer->def_real); -} - -/* - * send VerseVert to verse server - */ -void send_verse_vertex(VerseVert *vvert) -{ - verse_session_set(vvert->vsession); - - vvert->flag &= ~VERT_SEND_READY; - - verse_send_g_vertex_set_xyz_real32( - vvert->node_id, - vvert->layer_id, - vvert->id, - vvert->co[0], - vvert->co[1], - vvert->co[2]); -} - -/* - * if exists VerseLayer containing smoothness, then this function try - * to return pointer at coresponding item storing information about - * face smoothness for this VerseFace - */ -static uint8_item *get_face_smooth_item(VerseFace *vface) -{ - struct VerseSession *session; - struct VNode *vnode; - struct VLayer *vlayer; - - verse_session_set(vface->vsession); - session = (VerseSession*)current_verse_session(); - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), vface->node_id); - vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_SMOOTH_LAYER); - if(vlayer) return (uint8_item*)TLI_dlist_find_link(&(vlayer->dl), vface->id); - else return NULL; -} - -/* - * send face smoothnes to verse server - */ -void send_verse_face_smoothness(VerseFace *vface, uint8 value) -{ - struct VerseSession *session; - struct VNode *vnode; - struct VLayer *smooth_layer; - - verse_session_set(vface->vsession); - session = (VerseSession*)current_verse_session(); - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), vface->node_id); - smooth_layer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_SMOOTH_LAYER); - - verse_send_g_polygon_set_face_uint8( - vface->node_id, - smooth_layer->id, - vface->id, - value); -} - -/* - * send delete command to verse server - */ -void send_verse_face_delete(VerseFace *vface) -{ - verse_session_set(vface->vsession); - - vface->flag |= FACE_DELETED; - - verse_send_g_polygon_delete(vface->node_id, vface->id); -} - -/* - * send VerseFace to verse server - */ -static void send_verse_face(VerseFace *vface) -{ - verse_session_set(vface->vsession); - - vface->flag |= FACE_SENT; - - if(vface->v3 != -1) { - verse_send_g_polygon_set_corner_uint32( - vface->node_id, - vface->layer_id, - vface->id, - vface->v0, - vface->v3, /* verse use clock-wise winding */ - vface->v2, - vface->v1); /* verse use clock-wise winding */ - } - else { - verse_send_g_polygon_set_corner_uint32( - vface->node_id, - vface->layer_id, - vface->id, - vface->v0, - vface->v2, /* verse use clock-wise winding */ - vface->v1, /* verse use clock-wise winding */ - vface->v3); - } -} - -/* - * free VerseVert (and blender vert) - */ -static void free_verse_vertex(VLayer *vlayer, VerseVert *vvert) -{ - /* free VerseVert */ - TLI_dlist_free_item(&(vlayer->dl), (unsigned int)vvert->id); -} - -/* - * free VerseFace (and blender face) - */ -static void free_verse_face(VLayer *vlayer, VerseFace *vface) -{ - /* free VerseFace */ - TLI_dlist_free_item(&(vlayer->dl), (unsigned int)vface->id); - -} - -/* - * free VerseLayer data - */ -static void free_verse_layer_data(VNode *vnode, VLayer *vlayer) -{ - struct VerseFace *vface; - struct VerseVert *vvert; - - /* set up EditVert->vvert and EditFace->vface pointers to NULL */ - switch(vlayer->content) { - case VERTEX_LAYER: - vvert = (VerseVert*)vlayer->dl.lb.first; - while(vvert) { - ((VGeomData*)vnode->data)->post_vertex_free_constraint(vnode, vvert); - vvert = vvert->next; - } - break; - case POLYGON_LAYER: - vface = (VerseFace*)vlayer->dl.lb.first; - while(vface) { - ((VGeomData*)vnode->data)->post_polygon_free_constraint(vnode, vface); - vface = vface->next; - } - break; - default: - break; - } - /* free Verse Layer name */ - MEM_freeN(vlayer->name); - /* destroy VerseLayer data (vertexes, polygons, etc.) */ - TLI_dlist_destroy(&(vlayer->dl)); - /* free unsent data */ - TLI_freelistN(&(vlayer->queue)); - /* free orphans */ - TLI_freelistN(&(vlayer->orphans)); -} - -/* - * free all unneeded VerseVerts waiting for deleting - */ -static void free_unneeded_verseverts_of_verseface(VNode *vnode, VerseFace *vface) -{ - struct VLayer *vlayer; - struct VerseVert *vverts[4]={NULL, NULL, NULL, NULL}; - int i; - - vverts[0] = vface->vvert0; - vverts[1] = vface->vvert1; - vverts[2] = vface->vvert2; - vverts[3] = vface->vvert3; - - /* find layer containing vertexes */ - vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - - /* free all "deleted" VerseVert waiting for deleting this VerseFace */ - for(i=0; i<4; i++) { - if(vverts[i]){ - if((vverts[i]->counter<1) && (vverts[i]->flag & VERT_DELETED)) { - ((VGeomData*)vnode->data)->post_vertex_delete(vnode, vverts[i]); - free_verse_vertex(vlayer, vverts[i]); - } - } - } -} - -/* - * This function create VerseVert and returns pointer on this vertex - */ -VerseVert* create_verse_vertex( - VSession vsession, - VNodeID node_id, - VLayerID layer_id, - uint32 vertex_id, - real32 x, - real32 y, - real32 z) -{ - VerseVert *vvert; - - vvert = (VerseVert*)MEM_mallocN(sizeof(VerseVert), "VerseVert"); - - /* verse data */ - vvert->vsession = vsession; - vvert->node_id = node_id; - vvert->layer_id = layer_id; - vvert->id = vertex_id; - /* position */ - vvert->co[0] = x; - vvert->co[1] = y; - vvert->co[2] = z; - /* normal */ - vvert->no[0] = vvert->no[1] = vvert->no[2] = 0.0; - /* blender internals */ - vvert->flag = 0; - vvert->counter = 0; - vvert->vertex = NULL; - - return vvert; -} - -/* - * this function will create new VerseFace and will return pointer on such Face - */ -VerseFace* create_verse_face( - VSession vsession, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - uint32 v0, - uint32 v1, - uint32 v2, - uint32 v3) -{ - struct VerseFace *vface; - - vface = (VerseFace*)MEM_mallocN(sizeof(VerseFace), "VerseFace"); - - /* verse data */ - vface->vsession = vsession; - vface->node_id = node_id; - vface->layer_id = layer_id; - vface->id = polygon_id; - - vface->vvert0 = NULL; - vface->vvert1 = NULL; - vface->vvert2 = NULL; - vface->vvert3 = NULL; - - vface->v0 = v0; - vface->v1 = v1; - vface->v2 = v2; - vface->v3 = v3; - - /* blender data */ - vface->face = NULL; - vface->flag = 0; - vface->counter = 4; - - vface->smooth = get_face_smooth_item(vface); - - return vface; -} - -/* - * create and return VerseLayer - */ -static VLayer *create_vlayer( - VerseSession *session, - VNodeID node_id, - VLayerID layer_id, - const char *name, - VNGLayerType type, - uint32 def_integer, - real64 def_real) -{ - struct VNode *vnode=NULL; - struct VLayer *vlayer=NULL; - - /* get vnode from the DynamicList due to node_id */ - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - if(!vnode) return NULL; - - /* add layer to the DynamicList */ - vlayer = (VLayer*)MEM_mallocN(sizeof(VLayer), "VerseLayer"); - - /* store all relevant info to the vlayer and set up vlayer */ - vlayer->vsession = session->vsession; - vlayer->node_id = node_id; - vlayer->id = layer_id; - vlayer->name = (char*)MEM_mallocN(sizeof(char)*(sizeof(name)+1),"Verse Layer name"); - strcpy(vlayer->name, name); - vlayer->type = type; - vlayer->def_int = def_integer; - vlayer->def_real = def_real; - - if((type == VN_G_LAYER_VERTEX_XYZ) && (layer_id == 0)) - vlayer->content = VERTEX_LAYER; - else if((type == VN_G_LAYER_POLYGON_CORNER_UINT32) && (layer_id == 1)) - vlayer->content = POLYGON_LAYER; - else if((type == VN_G_LAYER_POLYGON_FACE_UINT8) && (strcmp(name, "smooth")==0)) - vlayer->content = POLYGON_SMOOTH_LAYER; - else - vlayer->content = -1; - - /* initialize DynamicList in the vlayer (vertexes, polygons, etc.)*/ - TLI_dlist_init(&(vlayer->dl)); - /* initialization of queue of layer */ - vlayer->queue.first = vlayer->queue.last = NULL; - /* initialization of list of orphans */ - vlayer->orphans.first = vlayer->orphans.last = NULL; - - /* set up methods */ - vlayer->post_layer_create = post_layer_create; - vlayer->post_layer_destroy = post_layer_destroy; - - return vlayer; -} - -/* - * create geometry data - */ -VGeomData *create_geometry_data(void) -{ - struct VGeomData *geom; - - geom = (VGeomData*)MEM_mallocN(sizeof(VGeomData), "VerseGeometryData"); - TLI_dlist_init(&(geom->layers)); - geom->vlink = NULL; - geom->queue.first = geom->queue.last = NULL; - geom->mesh = NULL; - geom->editmesh = NULL; - - /* set up methods */ - geom->post_vertex_create = post_vertex_create; - geom->post_vertex_set_xyz = post_vertex_set_xyz; - geom->post_vertex_delete = post_vertex_delete; - geom->post_vertex_free_constraint = post_vertex_free_constraint; - geom->post_polygon_create = post_polygon_create; - geom->post_polygon_set_corner = post_polygon_set_corner; - geom->post_polygon_delete = post_polygon_delete; - geom->post_polygon_free_constraint = post_polygon_free_constraint; - geom->post_geometry_free_constraint = post_geometry_free_constraint; - geom->post_polygon_set_uint8 = post_polygon_set_uint8; - - return geom; -} - -/* - * callback function: vertex crease was set - */ -static void cb_g_crease_set_vertex( - void *user_data, - VNodeID node_id, - const char *layer, - uint32 def_crease) -{ -/* struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode;*/ -} - -/* - * callback function: edge crease was set - */ -static void cb_g_crease_set_edge( - void *user_data, - VNodeID node_id, - const char *layer, - uint32 def_crease) -{ -/* struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode;*/ -} - -/* - * callback function: float value for polygon was set up - */ -static void cb_g_polygon_set_face_real32( - void *user_def, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - real32 value) -{ -/* struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode;*/ -} - -/* - * callback function: int values for polygon was set up - */ -static void cb_g_polygon_set_face_uint32( - void *user_def, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - uint32 value) -{ -/* struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode;*/ -} - -static uint8_item *create_uint8_item(void) -{ - struct uint8_item *item; - - item = (uint8_item*)MEM_mallocN(sizeof(uint8_item), "uint8_item"); - item->value = 0; - - return item; -} - -/* - * callback function: uint8 value for polygon was set up - */ -static void cb_g_polygon_set_face_uint8( - void *user_def, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - uint8 value) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode; - struct VLayer *vlayer, *polygon_layer; - struct VerseFace *vface; - struct uint8_item *item; - - if(!session) return; - - /* find needed node (we can be sure, that it is geometry node) */ - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - - /* find layer containing face smoothness */ - vlayer = (VLayer*)TLI_dlist_find_link(&(((VGeomData*)vnode->data)->layers), (unsigned int)layer_id); - - item = (uint8_item*)TLI_dlist_find_link(&(vlayer->dl), polygon_id); - - if(item) { - item->value = value; - } - else { - item = create_uint8_item(); - TLI_dlist_add_item_index(&(vlayer->dl), item, polygon_id); - item->value = value; - } - - /* find layer containing polygons */ - polygon_layer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - /* find VerseFace with id polygon_id */ - vface = (VerseFace*)TLI_dlist_find_link(&(polygon_layer->dl), polygon_id); - - if(vface) { - if(strcmp(vlayer->name, "smooth")==0) { - if(!vface->smooth) vface->smooth = item; - } - ((VGeomData*)vnode->data)->post_polygon_set_uint8(vnode, vlayer, vface); - } -} - -/* - * callback function: float value for polygon corner was set up - */ -static void cb_g_polygon_set_corner_real32( - void *user_def, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - real32 v0, - real32 v1, - real32 v2, - real32 v3) -{ -} - -/* - * callback function: polygon is deleted - */ -static void cb_g_polygon_delete( - void *user_data, - VNodeID node_id, - uint32 polygon_id) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - VNode *vnode; - VLayer *vlayer; - VerseFace *vface; - - if(!session) return; - - /* find needed node (we can be sure, that it is geometry node) */ - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), node_id); - - /* find layer containing faces */ - vlayer = (VLayer*)find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - - /* find wanted VerseFace */ - vface = (VerseFace*)TLI_dlist_find_link(&(vlayer->dl), polygon_id); - - if(!vface) return; - - ((VGeomData*)vnode->data)->post_polygon_delete(vnode, vface); - - /* decrease references at coresponding VerseVertexes */ - vface->vvert0->counter--; - vface->vvert1->counter--; - vface->vvert2->counter--; - if(vface->vvert3) vface->vvert3->counter--; - - /* delete unneeded VerseVertexes */ - free_unneeded_verseverts_of_verseface(vnode, vface); - - free_verse_face(vlayer, vface); -} - -/* - * callback function: new polygon (face) created - */ -static void cb_g_polygon_set_corner_uint32( - void *user_data, - VNodeID node_id, - VLayerID layer_id, - uint32 polygon_id, - uint32 v0, - uint32 v1, - uint32 v2, - uint32 v3) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode; - struct VLayer *vlayer; - struct VerseFace *vface=NULL; - - if(!session) return; - - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - if(!vnode) return; - - vlayer = (VLayer*)TLI_dlist_find_link(&(((VGeomData*)vnode->data)->layers), (unsigned int)layer_id); - if(!vlayer) return; - - if(v3!=-1) { /* quat swap */ - unsigned int v; v = v1; v1 = v3; v3 = v; - } - else { /* triangle swap */ - unsigned int v; v = v1; v1 = v2; v2 = v; - } - - vface = (VerseFace*)TLI_dlist_find_link(&(vlayer->dl), (unsigned int)polygon_id); - - if(!vface) { - /* try to find VerseFace in list of VerseVaces created by me and set up polygon and - * layer ids */ - vface = find_verse_face_in_queue(vlayer, node_id, layer_id, polygon_id, v0, v1, v2, v3); - - if(vface){ - /* I creeated this face ... remove VerseFace from queue */ - TLI_remlink(&(vlayer->queue), (void*)vface); - vface->smooth = get_face_smooth_item(vface); - } - else { - /* some other client created this face*/ - vface = create_verse_face(session->vsession, node_id, layer_id, polygon_id, v0, v1, v2, v3); - } - - vface->flag &= ~FACE_SENT; - - /* return number of missing verse vertexes */ - vface->counter = test_incoming_verseface((VGeomData*)vnode->data, vface); - - if(vface->counter<1) { - /* when VerseFace received all needed VerseFaces, then it is moved - * to list of VerseFaces */ - TLI_dlist_add_item_index(&(vlayer->dl), (void*)vface, (unsigned int)polygon_id); - increase_verse_verts_references(vface); - recalculate_verseface_normals(vnode); - ((VGeomData*)vnode->data)->post_polygon_create(vnode, vface); - } - else { - /* when all needed VerseVertexes weren't received, then VerseFace is moved to - * the list of orphans waiting on needed vertexes */ - vface->flag |= FACE_RECEIVED; - TLI_addtail(&(vlayer->orphans), (void*)vface); - } - } - else { - /* VerseVertexes of existing VerseFace were changed (VerseFace will use some different - * VerseVertexes or it will use them in different order) */ - printf("\tFACE was changed: %d %d %d %d\n", v0, v1, v2, v3); - - /* decrease references of old VerseVertexes and set up new ids */ - if(vface->vvert0->id != v0) { - vface->vvert0->counter--; - vface->v0 = v0; - } - if(vface->vvert1->id != v1) { - vface->vvert1->counter--; - vface->v1 = v1; - } - if(vface->vvert2->id != v2) { - vface->vvert2->counter--; - vface->v2 = v2; - } - if(vface->vvert3) { - if(vface->vvert3->id != v3) { - vface->vvert3->counter--; - vface->v3 = v3; - } - } - else - vface->v3 = -1; - - /* delete unneeded VerseVertexes */ - free_unneeded_verseverts_of_verseface(vnode, vface); - - vface->flag &= ~FACE_SENT; - vface->flag |= FACE_CHANGED; - - /* set up new pointers at VerseVerts and return number of missing VerseVertexes */ - vface->counter = test_incoming_verseface((VGeomData*)vnode->data, vface); - - if(vface->counter<1) { - vface->flag &= ~FACE_CHANGED; - increase_verse_verts_references(vface); - recalculate_verseface_normals(vnode); - ((VGeomData*)vnode->data)->post_polygon_set_corner(vnode, vface); - } - else { - /* when all needed VerseVertexes weren't received, then VerseFace is added to - * the list of orphans waiting on needed vertexes */ - printf("\tchanged FACE was moved to ORPHAN list\n"); - TLI_dlist_rem_item(&(vlayer->dl), vface->id); - TLI_addtail(&(vlayer->orphans), (void*)vface); - } - } -} - -/* - * callback function: float value was set up for VerseVert with vertex_id - */ -static void cb_g_vertex_set_real32( - void *user_def, - VNodeID node_id, - VLayerID layer_id, - uint32 vertex_id, - real32 value) -{ -/* struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode;*/ -} - -/* - * callback function: int value was set up for VerseVert with vertex_id - */ -static void cb_g_vertex_set_uint32( - void *user_def, - VNodeID node_id, - VLayerID layer_id, - uint32 vertex_id, - uint32 value) -{ -/* struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode;*/ -} - -/* - * callback function: polygon was deleted - */ -static void cb_g_vertex_delete_real32( - void *user_data, - VNodeID node_id, - uint32 vertex_id) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - VNode *vnode=NULL; - VLayer *vlayer=NULL; - VerseVert *vvert=NULL; - - if(!session) return; - - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - - vlayer = (VLayer*)find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - - vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), (unsigned int)vertex_id); - - if(!vvert) return; - - if(vvert->counter < 1) { - ((VGeomData*)vnode->data)->post_vertex_delete(vnode, vvert); - free_verse_vertex(vlayer, vvert); - } - else { - /* some VerseFace(s) still need VerseVert, it is only marked as deleted */ - vvert->flag |= VERT_DELETED; - } -} - -/* - * callback function: position of one vertex was changed or new vertex was created - */ -static void cb_g_vertex_set_xyz_real32( - void *user_data, - VNodeID node_id, - VLayerID layer_id, - uint32 vertex_id, - real32 x, - real32 y, - real32 z) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode = NULL; - struct VLayer *vlayer = NULL; - struct VerseVert *vvert = NULL; - - if(!session) return; - - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - if(!vnode)return; - - vlayer = (VLayer*)TLI_dlist_find_link(&(((VGeomData*)vnode->data)->layers), (unsigned int)layer_id); - if(!vlayer) return; - - if(vlayer->id == 0) { - /* try to pick up verse vert from DynamicList */ - vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), (unsigned int)vertex_id); - - if(vvert) { - /* set VerseVert flags */ - vvert->flag |= VERT_SEND_READY; - - if((vvert->co[0]!=x) || (vvert->co[1]!=y) || (vvert->co[2]!=z)) { - vvert->co[0] = x; - vvert->co[1] = y; - vvert->co[2] = z; - - recalculate_verseface_normals(vnode); - ((VGeomData*)vnode->data)->post_vertex_set_xyz(vnode, vvert); - } - } - else { - /* create new verse vert */ - - /* test if we are authors of this vertex :-) */ - vvert = find_verse_vert_in_queue(vlayer, node_id, layer_id, vertex_id, x, y, z); - - if(vvert) { - /* remove vert from queue */ - TLI_remlink(&(vlayer->queue), (void*)vvert); - /* add vvert to the dynamic list */ - TLI_dlist_add_item_index(&(vlayer->dl), (void*)vvert, (unsigned int)vertex_id); - /* set VerseVert flags */ - vvert->flag |= VERT_RECEIVED; - vvert->flag |= VERT_SEND_READY; - /* find VerseFaces orphans */ - find_vlayer_orphans(vnode, vvert); - /* find unsent VerseFaces */ - find_unsent_faces(vnode, vvert); - } - else { - /* create new VerseVert */ - vvert = create_verse_vertex(session->vsession, node_id, layer_id, vertex_id, x, y, z); - /* add VerseVert to list of VerseVerts */ - TLI_dlist_add_item_index(&(vlayer->dl), (void*)vvert, (unsigned int)vertex_id); - /* set VerseVert flags */ - vvert->flag |= VERT_RECEIVED; - vvert->flag |= VERT_SEND_READY; - /* find VerseFaces orphans */ - find_vlayer_orphans(vnode, vvert); - } - - ((VGeomData*)vnode->data)->post_vertex_create(vnode, vvert); - } - } -} - -/* - * callback function for destroyng of verse layer - */ -static void cb_g_layer_destroy( - void *user_data, - VNodeID node_id, - VLayerID layer_id) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode; - struct VLayer *vlayer; - - if(!session) return; - - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), node_id); - vlayer = (VLayer*) TLI_dlist_find_link(&(((VGeomData*)vnode->data)->layers), layer_id); - - if(vlayer){ - /* free VerseLayer data */ - free_verse_layer_data(vnode, vlayer); - /* remove VerseLayer from list of verse layers */ - TLI_dlist_rem_item(&(((VGeomData*)vnode->data)->layers), layer_id); - /* do client dependent actions */ - vlayer->post_layer_destroy(vnode, vlayer); - /* free vlayer itself */ - MEM_freeN(vlayer); - } - -} - -/* - * callback function: new layer was created - */ -static void cb_g_layer_create( - void *user_data, - VNodeID node_id, - VLayerID layer_id, - const char *name, - VNGLayerType type, - uint32 def_integer, - real64 def_real) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode=NULL; - struct VLayer *vlayer=NULL; - - if(!session) return; - - /* find node of this layer*/ - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), node_id); - - if(!vnode) return; - - /* temp hack due to siggraph presentation ... client subscribe for all verse layers */ - verse_send_g_layer_subscribe(node_id, layer_id, (VNRealFormat)0); - - /* create new VerseLayer */ - vlayer = create_vlayer(session, node_id, layer_id, name, type, def_integer, def_real); - /* add layer to the list of VerseLayers */ - TLI_dlist_add_item_index(&(((VGeomData*)vnode->data)->layers), (void*)vlayer, (unsigned int)layer_id); - - /* if we are owners of VerseNode, then push geometry to verse server */ - if(vnode->owner_id == VN_OWNER_MINE) { - switch(type){ - case VN_G_LAYER_VERTEX_XYZ: - if(layer_id==0) push_all_verts(vnode, vlayer); - break; - case VN_G_LAYER_POLYGON_CORNER_UINT32: - if(layer_id==1) push_all_faces(vnode, vlayer); - break; - case VN_G_LAYER_VERTEX_UINT32: - case VN_G_LAYER_VERTEX_REAL: - case VN_G_LAYER_POLYGON_CORNER_REAL: - break; - case VN_G_LAYER_POLYGON_FACE_UINT8: - if(strcmp(name, "smooth")==0) - ((VGeomData*)vnode->data)->smooth_layer = layer_id; - break; - case VN_G_LAYER_POLYGON_FACE_UINT32: - case VN_G_LAYER_POLYGON_FACE_REAL: - break; - } - } - else { - switch(type) { - case VN_G_LAYER_VERTEX_XYZ: - case VN_G_LAYER_POLYGON_CORNER_UINT32: - case VN_G_LAYER_VERTEX_UINT32: - case VN_G_LAYER_VERTEX_REAL: - case VN_G_LAYER_POLYGON_CORNER_REAL: - break; - case VN_G_LAYER_POLYGON_FACE_UINT8: - if(strcmp(name, "smooth")==0) - ((VGeomData*)vnode->data)->smooth_layer = layer_id; - break; - case VN_G_LAYER_POLYGON_FACE_UINT32: - case VN_G_LAYER_POLYGON_FACE_REAL: - break; - } - } - - vlayer->post_layer_create(vnode, vlayer); -} - -/* - * this function will send destroy commands for all VerseVertexes and - * VerseFaces to verse server, but it will not send destroy commands - * for VerseLayers or geometry node, it can be used in other functions - * (undo, destroy geom node, some edit mesh commands, ... ), parameter of - * this function has to be geometry verse node - */ -void destroy_geometry(VNode *vnode) -{ - struct VLayer *vert_vlayer, *face_vlayer; - struct VerseFace *vface; - struct VerseVert *vvert; - - if(vnode->type != V_NT_GEOMETRY) return; - - face_vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - vface = (VerseFace*)face_vlayer->dl.lb.first; - - while(vface) { - send_verse_face_delete(vface); - vface = vface->next; - } - - vert_vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - vvert = (VerseVert*)vert_vlayer->dl.lb.first; - - while(vvert) { - send_verse_vertex_delete(vvert); - vvert = vvert->next; - } - - /* own destruction of local verse date will be executed, when client will - * receive apropriate callback commands from verse server */ -} - -/* - * free VGeomData - */ -void free_geom_data(VNode *vnode) -{ - struct VLayer *vlayer; - - if(vnode->data){ - vlayer = (VLayer*)((VGeomData*)vnode->data)->layers.lb.first; - while(vlayer){ - /* free VerseLayer data */ - free_verse_layer_data(vnode, vlayer); - /* unsunscribe from layer */ - verse_send_g_layer_unsubscribe(vnode->id, vlayer->id); - /* next layer */ - vlayer = vlayer->next; - } - /* free constraint between vnode and mesh */ - ((VGeomData*)vnode->data)->post_geometry_free_constraint(vnode); - /* free all VerseLayers */ - TLI_dlist_destroy(&(((VGeomData*)vnode->data)->layers)); - } -} - -void set_geometry_callbacks(void) -{ - /* new layer created */ - verse_callback_set((void*)verse_send_g_layer_create, (void*)cb_g_layer_create, NULL); - /* layer was destroyed */ - verse_callback_set((void*)verse_send_g_layer_destroy, (void*)cb_g_layer_destroy, NULL); - - /* position of vertex was changed */ - verse_callback_set((void*)verse_send_g_vertex_set_xyz_real32, (void*)cb_g_vertex_set_xyz_real32, NULL); - /* vertex was deleted */ - verse_callback_set((void*)verse_send_g_vertex_delete_real32, (void*)cb_g_vertex_delete_real32, NULL); - - /* callback functions for values being associated with vertexes */ - verse_callback_set((void*)verse_send_g_vertex_set_uint32, (void*)cb_g_vertex_set_uint32, NULL); - verse_callback_set((void*)verse_send_g_vertex_set_real32, (void*)cb_g_vertex_set_real32, NULL); - - /* new polygon was created / vertex of polygon was set */ - verse_callback_set((void*)verse_send_g_polygon_set_corner_uint32, (void*)cb_g_polygon_set_corner_uint32, NULL); - /* polygon was deleted */ - verse_callback_set((void*)verse_send_g_polygon_delete, (void*)cb_g_polygon_delete, NULL); - - /* callback functions for values being associated with polygon corners */ - verse_callback_set((void*)verse_send_g_polygon_set_corner_real32, (void*)cb_g_polygon_set_corner_real32, NULL); - /* callback functions for values being associated with faces */ - verse_callback_set((void*)verse_send_g_polygon_set_face_uint8, (void*)cb_g_polygon_set_face_uint8, NULL); - verse_callback_set((void*)verse_send_g_polygon_set_face_uint32, (void*)cb_g_polygon_set_face_uint32, NULL); - verse_callback_set((void*)verse_send_g_polygon_set_face_real32, (void*)cb_g_polygon_set_face_real32, NULL); - - /* crease of vertex was set */ - verse_callback_set((void*)verse_send_g_crease_set_vertex, (void*)cb_g_crease_set_vertex, NULL); - /* crease of edge was set */ - verse_callback_set((void*)verse_send_g_crease_set_edge, (void*)cb_g_crease_set_edge, NULL); -} - -/*#endif*/ diff --git a/topmodx/include/verse/verse_mesh.cc b/topmodx/include/verse/verse_mesh.cc deleted file mode 100644 index 58d6e8e..0000000 --- a/topmodx/include/verse/verse_mesh.cc +++ /dev/null @@ -1,1272 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include "MEM_guardedalloc.h" - -#include "mydevice.h" - -#include "DNA_object_types.h" -#include "DNA_mesh_types.h" - -#include "TLI_dynamiclist.h" -#include "TLI_toplib.h" -#include "TLI_editVert.h" - -#include "TKE_global.h" -#include "TKE_verse.h" -#include "TKE_mesh.h" -#include "TKE_depsgraph.h" -#include "TKE_utildefines.h" - -#include "TIF_verse.h" -/*#include "TIF_editmesh.h"*/ -/*#include "TIF_space.h"*/ -/*#include "TIF_screen.h"*/ - -/*#include "BSE_edit.h"*/ - -/*#include "editmesh.h"*/ - -/* prototypes of static functions */ - -static void sync_verseface_with_editface(struct VLayer *vlayer, struct VerseFace *vface); -static void sync_verseverts_with_editverts(struct VerseVert *vvert); - -/*============================================================================= - * - * functions handling verse/blender FACES - * - *===========================================================================*/ - -/* - * this function sends information about face smoothness - */ -void b_verse_set_face_smooth(EditFace *efa) -{ - // struct VerseFace *vface = (VerseFace*)efa->vface; - // - // send_verse_face_smoothness(vface, (efa->flag & ME_SMOOTH)?1:0); -} - -/* - * restore information about VerseFace from EditVert ... this function is used - * during poping EditFace form undo stack - */ -void restore_verseface_from_undoface(VNode *vnode, EditFace *efa, VerseFace *old_vface, unsigned int vface_id) -{ - // struct VLayer *vlayer; - // struct VerseFace *vface = NULL; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // - // vface = (VerseFace*)TLI_dlist_find_link(&(vlayer->dl), vface_id); - // - // if(vface) { - // if(old_vface == vface) { - // efa->vface = (void*)vface; - // vface->face = (void*)efa; - // - // sync_verseface_with_editface(vlayer, vface); - // - // /* send information about smoothness, when information in efa differs - // * from infomration stored in vface */ - // if((vface->smooth) && (vface->smooth->value != (efa->flag & ME_SMOOTH))) - // b_verse_set_face_smooth(efa); - // } - // else { - // printf("\tUNDO: old VerseFace was deleted\n"); - // push_edit_face_to_verse_server(efa, vnode, vlayer); - // } - // } - // else { - // /* VerseFace doesn't exist ... we have to recreate it again */ - // push_edit_face_to_verse_server(efa, vnode, vlayer); - // } -} - -/* - * create new VerseFace (polygon), due to information about MFace - * put VerseFace to queue ... send to verse host (server) - */ -void push_mface_to_verse_server( MFace *fa, unsigned int face_id, VNode *vnode, VLayer *vlayer) -{ - // VerseFace *vface; - // VerseVert *vvert; - // - // vface = (VerseFace*)create_verse_face(vnode->vsession, vnode->id, vlayer->id, face_id, - // fa->v1, fa->v2, fa->v3, fa->v4); - // - // vface->face = (void*)fa; - // - // vface->flag |= FACE_SEND_READY; - // - // /* MVert #1 */ - // vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), fa->v1); - // if(vvert) { - // vface->vvert0 = vvert; - // if(vvert->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // - // /* MVert #2 */ - // vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), fa->v1); - // if(vvert) { - // vface->vvert1 = vvert; - // if(vvert->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // - // /* MVert #3 */ - // vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), fa->v1); - // if(vvert) { - // vface->vvert2 = vvert; - // if(vvert->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // - // /* MVert #4 */ - // vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), fa->v1); - // if(vvert) { - // vface->vvert3 = vvert; - // if(vvert->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // - // add_item_to_send_queue(&(vlayer->queue), (void*)vface, VERSE_FACE); -} - -/* - * create new VerseFace (polygon), due to information about EditFace - * put VerseFace to queue ... send to verse host (server) - */ -void push_edit_face_to_verse_server(EditFace *efa, VNode *vnode, VLayer *vlayer) -{ - // struct VerseFace *vface; - // - // vface = (VerseFace*)create_verse_face(vnode->vsession, vnode->id, vlayer->id, -1, -1, -1, -1, -1); - // - // vface->face = (void*)efa; - // efa->vface = (void*)vface; - // - // vface->flag |= FACE_SEND_READY; - // - // /* EditVert #1 */ - // if(efa->v1) { - // if(efa->v1->vvert) { - // vface->vvert0 = (VerseVert*)efa->v1->vvert; - // if(((VerseVert*)efa->v1->vvert)->flag & VERT_RECEIVED) { - // vface->v0 = ((VerseVert*)efa->v1->vvert)->id; - // vface->counter--; - // } - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // } - // else - // vface->counter--; - // - // /* EditVert #2 */ - // if(efa->v2) { - // if(efa->v2->vvert) { - // vface->vvert1 = (VerseVert*)efa->v2->vvert; - // if(((VerseVert*)efa->v2->vvert)->flag & VERT_RECEIVED) { - // vface->v1 = ((VerseVert*)efa->v2->vvert)->id; - // vface->counter--; - // } - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // } - // else - // vface->counter--; - // /* EditVert #3 */ - // if(efa->v3) { - // if(efa->v3->vvert) { - // vface->vvert2 = (VerseVert*)efa->v3->vvert; - // if(((VerseVert*)efa->v3->vvert)->flag & VERT_RECEIVED) { - // vface->v2 = ((VerseVert*)efa->v3->vvert)->id; - // vface->counter--; - // } - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // } - // else - // vface->counter--; - // /* EditVert #4 */ - // if(efa->v4) { - // if(efa->v4->vvert) { - // vface->vvert3 = (VerseVert*)efa->v4->vvert; - // if(((VerseVert*)efa->v4->vvert)->flag & VERT_RECEIVED) { - // vface->v3 = ((VerseVert*)efa->v4->vvert)->id; - // vface->counter--; - // } - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // } - // else - // vface->counter--; - // - // add_item_to_send_queue(&(vlayer->queue), (void*)vface, VERSE_FACE); -} - -/* - * creates new verse faces, add all of then to queue ... send to verse server - */ -void push_all_faces(VNode *vnode, VLayer *vlayer) -{ - // if(G.obedit) { - // struct EditMesh *em; - // struct EditFace *efa; - // - // em = G.editMesh; - // - // efa = em->faces.first; - // /* push all EditFaces to the verse server */ - // while(efa){ - // push_edit_face_to_verse_server(efa, vnode, vlayer); - // efa = efa->next; - // } - // } - // else { - // struct VGeomData *geom; - // struct Mesh *me; - // unsigned int i; - // - // geom = (VGeomData*)vnode->data; - // me = (Mesh*)geom->mesh; - // for(i=0; itotface; i++) - // push_mface_to_verse_server(&(me->mface[i]), i, vnode, vlayer); - // } -} - -/* - * this function will sync EditFace and VerseFace and it will send changes to - * verse server too - */ -static void sync_verseface_with_editface(VLayer *vlayer, VerseFace *vface) -{ - // struct EditFace *efa = (EditFace*)vface->face; - // unsigned int old_verts[4]; - // int dosend = 0; - // - // if(!efa) return; - // - // vface->flag |= FACE_SEND_READY; - // - // vface->counter = 4; - // - // old_verts[0] = vface->v0; - // old_verts[1] = vface->v1; - // old_verts[2] = vface->v2; - // old_verts[3] = vface->v3; - // - // /* 1st vertex */ - // if(vface->vvert0 && (vface->vvert0->vertex != efa->v1)) { - // dosend = 1; - // vface->vvert0->counter--; - // vface->vvert0 = (VerseVert*)efa->v1->vvert; - // vface->v0 = vface->vvert0->id; - // if(vface->vvert0->flag & VERT_RECEIVED) { - // vface->counter--; - // } - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // else - // vface->counter--; - // - // /* 2nd vertex */ - // if(vface->vvert1 && (vface->vvert1->vertex != efa->v2)) { - // dosend = 1; - // vface->vvert1->counter--; - // vface->vvert1 = (VerseVert*)efa->v2->vvert; - // vface->v1 = vface->vvert1->id; - // if(vface->vvert1->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // else - // vface->counter--; - // - // /* 3th vertex */ - // if(vface->vvert2 && (vface->vvert2->vertex != efa->v3)) { - // dosend = 1; - // vface->vvert2->counter--; - // vface->vvert2 = (VerseVert*)efa->v3->vvert; - // vface->v2 = vface->vvert2->id; - // if(vface->vvert2->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // else - // vface->counter--; - // - // /* 4th vertex */ - // if(vface->vvert3 && (vface->vvert3->vertex != efa->v4)) { - // dosend = 1; - // if(efa->v4) { - // vface->vvert3->counter--; - // vface->vvert3 = (VerseVert*)efa->v4->vvert; - // vface->v3 = vface->vvert3->id; - // if(vface->vvert3->flag & VERT_RECEIVED) - // vface->counter--; - // else - // vface->flag &= ~FACE_SEND_READY; - // } - // else { - // if(vface->vvert3) vface->vvert3->counter--; - // vface->vvert3 = NULL; - // vface->v3 = -1; - // vface->counter--; - // } - // } - // else - // vface->counter--; - // - // if(dosend) { - // printf("\t\told: %d %d %d %d\n", old_verts[0], old_verts[1], old_verts[2], old_verts[3]); - // printf("\tsending CHANGED FACE\n"); - // printf("\t\tnew: %d %d %d %d\n", vface->v0, vface->v1, vface->v2, vface->v3); - // vface->flag |= FACE_CHANGED; - // TLI_dlist_rem_item(&(vlayer->dl), vface->id); - // add_item_to_send_queue(&(vlayer->queue), (void*)vface, VERSE_FACE); - // } -} - -/* - * this function will sync all VerseFaces with coresponding EditFaces - * this is useful, when some editmesh tool change editface pointers at - * vertexes (edges), parameter of this function is geometry node - */ -void sync_all_versefaces_with_editfaces(VNode *vnode) -{ - // struct VLayer *vlayer; - // struct VerseFace *vface, *nvface; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // - // vface = vlayer->dl.lb.first; - // - // while(vface) { - // nvface = vface->next; - // sync_verseface_with_editface(vlayer, vface); - // vface = nvface; - // } -} - -/* - * send delete polygon command to verse server - */ -void t_verse_send_face_delete(EditFace *efa) -{ - // ((VerseFace*)efa->vface)->face = NULL; - // send_verse_face_delete((VerseFace*)efa->vface); - // efa->vface = NULL; -} - -/* - * send new face to verse server, this function can be used only in edit mode - */ -void t_verse_send_face(EditFace *efa) -{ - // struct VNode *vnode; - // struct VLayer *vlayer; - // - // vnode = G.editMesh->vnode; - // vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // - // push_edit_face_to_verse_server(efa, vnode, vlayer); - // -} - -/* - * this function will destroy binding between EditFace and VersFace, it is used - * before restoring EditMesh from "UndoMesh" - */ -static void destroy_binding_between_verseface_and_editface(VerseFace *vface) -{ - // if(vface->face) { - // ((EditFace*)vface->face)->vface = NULL; - // vface->face = NULL; - // } -} - - -/*============================================================================= - * - * functions handling verse/blender VERTEXES - * - *===========================================================================*/ - -/* - * this function try to restore VerseVert from information about EditVert and - * vvert_id (stored in "undo vert") - */ -void restore_versevert_from_undovert(VNode *vnode, EditVert *eve, VerseVert *old_vvert, unsigned int vvert_id) -{ - // struct VLayer *vlayer; - // struct VerseVert *vvert = NULL; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // - // vvert = (VerseVert*)TLI_dlist_find_link(&(vlayer->dl), vvert_id); - // - // if(vvert) { - // if(old_vvert == vvert) { - // eve->vvert = (void*)vvert; - // vvert->vertex = (void*)eve; - // - // sync_verseverts_with_editverts(vvert); - // } - // else { - // printf("\tUNDO: old VerseVert was deleted\n"); - // push_editvert_to_verse_server(eve, vnode, vlayer); - // } - // } - // else { - // /* VerseVert doesn't exist ... it is neccesary to it create again */ - // push_editvert_to_verse_server(eve, vnode, vlayer); - // } -} - -/* - * this function will sync position of VerseVert with EditVert - */ -static void sync_verseverts_with_editverts(VerseVert *vvert) -{ - // struct EditVert *eve = (EditVert*)vvert->vertex; - // - // if(!eve) return; - // - // if((vvert->co[0] != eve->co[0]) || (vvert->co[1] != eve->co[1]) || (vvert->co[2] != eve->co[2])) { - // printf("\tVERT sync\n"); - // VECCOPY(vvert->co, eve->co); - // - // vvert->flag |= VERT_SEND_READY; - // send_verse_vertex(vvert); - // } -} - -/* - * this function will sync position of all VerseVerts with EditVerts - * this function is called after actions: Smooth, Noise and To Sphere, - * because position of vertexes isn't managed by transform system - */ -void sync_all_verseverts_with_editverts(VNode *vnode) -{ - // struct VLayer *vlayer; - // struct VerseVert *vvert; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // - // vvert = vlayer->dl.lb.first; - // - // while(vvert) { - // sync_verseverts_with_editverts(vvert); - // vvert = vvert->next; - // } - // - // verse_callback_update(0); -} - -/* - * send delete vertex command to verse server - */ -void t_verse_send_vertex_delete(EditVert *eve) -{ - // ((VerseVert*)eve->vvert)->vertex = NULL; - // send_verse_vertex_delete((VerseVert*)eve->vvert); - // eve->vvert = NULL; -} - -/* - * This function will destroy binding between EditVert and VerseVert - */ -static void destroy_binding_between_versevert_and_editvert(VerseVert *vvert) -{ - // if(vvert->vertex){ - // ((EditVert*)vvert->vertex)->vvert = NULL; - // vvert->vertex = NULL; - // } -} - -/* - * send position of verse vertex to verse server - */ -void t_verse_send_vertex_position(EditVert *eve) -{ - // struct VerseVert *vvert = (VerseVert*)eve->vvert; - // - // if((vvert->flag & VERT_RECEIVED) && (vvert->flag & VERT_SEND_READY)){ - // VECCOPY(vvert->co, eve->co); - // - // send_verse_vertex(vvert); - // } - // - // verse_callback_update(0); -} - -/* - * send new vertex to verse server - */ -void t_verse_send_vertex(EditVert *eve) -{ - // struct VNode *vnode; - // struct VLayer *vlayer; - // - // vnode = (VNode*)G.editMesh->vnode; - // - // if(!vnode) return; - // - // vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // - // push_editvert_to_verse_server(eve, vnode, vlayer); -} - -/* - * create new VerseVert due to information about EditVert, - * put VerseVert to queue ... send to verse host (server) - */ -void push_editvert_to_verse_server( EditVert *eve, VNode *vnode, VLayer *vlayer) -{ - // struct VerseVert *vvert; - // - // vvert = create_verse_vertex(vnode->vsession, vnode->id, vlayer->id, -1, - // eve->co[0], eve->co[1], eve->co[2]); - // - // vvert->vertex = (void*)eve; - // eve->vvert = (void*)vvert; - // - // /* add vvert to sending queue */ - // add_item_to_send_queue(&(vlayer->queue), (void*)vvert, VERSE_VERT); -} - -/* - * create new VerseVert due to information about MVert (object mode), - * put VerseVert to queue ... send to verse host (server) - */ -void push_mvert_to_verse_server( MVert *ve, unsigned int vert_id, VNode *vnode, VLayer *vlayer) -{ - // struct VerseVert *vvert; - // - // vvert = create_verse_vertex(vnode->vsession, vnode->id, vlayer->id, vert_id, - // ve->co[0], ve->co[1], ve->co[2]); - // - // vvert->vertex = (void*)ve; - // - // /* add vvert to sending queue */ - // add_item_to_send_queue(&(vlayer->queue), (void*)vvert, VERSE_VERT); -} - -/* - * create new verse vertexes due to all vertexes and send all of them to verse server - */ -void push_all_verts(VNode *vnode, VLayer *vlayer) -{ - // if(G.obedit) { - // struct EditMesh *em; - // struct EditVert *eve; - // - // em = G.editMesh; - // eve = em->verts.first; - // - // /* push all EditVertexes to the verse server */ - // while(eve){ - // push_editvert_to_verse_server(eve, vnode, vlayer); - // eve = eve->next; - // } - // } - // else { - // struct VGeomData *geom; - // struct Mesh *me; - // unsigned int i; - // - // geom = (VGeomData*)vnode->data; - // me = (Mesh*)geom->mesh; - // for(i=0; itotvert; i++) - // push_mvert_to_verse_server(&(me->mvert[i]), i, vnode, vlayer); - // } -} - -/* =================================================================================== - * - * Function executed after execution of callback functions - * - * ===================================================================================*/ - -/* - * Actions executed after new VerseLayer is created - */ -void post_layer_create(VNode *vnode, struct VLayer *vlayer) -{ -} - -/* - * Actions after destroying of VerseLayer - */ -void post_layer_destroy(VNode *vnode, struct VLayer *vlayer) -{ -} - -/* - * Actions executed after creating of new VerseVert, when object is in edit - * mode, and this client didn't create this VerseVert (vvert->vertex is NULL), - * then new editvert is created - */ -void post_vertex_create(VNode *vnode, VerseVert *vvert) -{ -// struct VNode *obj_vnode; -// struct EditMesh *em=NULL; -// -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// em = (EditMesh*)((VGeomData*)vnode->data)->editmesh; -// } -// -// if(em && !(vvert->vertex)) { -// struct EditVert *eve; -// -// printf("\tPOST_VERTEX_CREATE()\n"); -// -// /* to prevent never ending loop of sending and receiving -// * vertexes, because addvertlist() sends new vertex to verse -// * server if em->vnode isn't NULL */ -// em->vnode = NULL; -// /* eve = addvertlist(vvert->co);*/ -// em->vnode = (void*)vnode; -// -// eve->vvert = (void*)vvert; -// vvert->vertex = (void*)eve; -// -// /* countall();*/ -// -// /* recalc_editnormals();*/ -// } -// -// if(((VGeomData*)vnode->data)->vlink) { -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -// } -} - -/* - * Actions executed, when position of VerseVert was changed - * position of EditVert is changed in edit mode - */ -void post_vertex_set_xyz(VNode *vnode, VerseVert *vvert) -{ -// struct VNode *obj_vnode; -// struct EditVert *eve = NULL; -// -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// eve = (EditVert*)vvert->vertex; -// VECCOPY(eve->co, vvert->co); -// /* recalc_editnormals();*/ -// } -// -// if(((VGeomData*)vnode->data)->vlink) { -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -// } -} - -/* - * Actions executed after deleting of VerseVert - */ -void post_vertex_delete(VNode *vnode, VerseVert *vvert) -{ -// struct VNode *obj_vnode; -// struct EditMesh *em = NULL; -// struct EditEdge *ed, *edn; -// struct EditVert *eve = NULL; -// -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// em = (EditMesh*)((VGeomData*)vnode->data)->editmesh; -// eve = (EditVert*)vvert->vertex; -// } -// -// if(em && eve) { -// printf("\tPOST_VERTEX_DELETE()\n"); -// -// /* delete all edges needing eve vertex */ -// ed = em->edges.first; -// while(ed) { -// edn = ed->next; -// if(ed->v1==eve || ed->v2==eve) { -// /* remedge(ed);*/ -// /* free_editedge(ed);*/ -// } -// ed = edn; -// } -// -// eve->vvert = NULL; -// TLI_remlink(&em->verts, eve); -// /* free_editvert(eve);*/ -// vvert->vertex = NULL; -// -// /* countall();*/ -// -// /* recalc_editnormals();*/ -// } -// -// if(((VGeomData*)vnode->data)->vlink) { -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -// } -} - -/* - * free constraint between VerseVert and EditVert - */ -void post_vertex_free_constraint(VNode *vnode, VerseVert *vvert) -{ - // if(vvert->vertex) { - // ((EditVert*)vvert->vertex)->vvert=NULL; - // vvert->vertex=NULL; - // } -} - -/* - * Action executed after setting up uint8 value of polygon - */ -void post_polygon_set_uint8(VNode *vnode, VLayer *vlayer, VerseFace *vface) -{ -// struct VNode *obj_vnode; -// -// if(vlayer->content == POLYGON_SMOOTH_LAYER) { -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// if(vface->face) { -// if(vface->smooth->value) -// ((EditFace*)vface->face)->flag |= ME_SMOOTH; -// else -// ((EditFace*)vface->face)->flag &= ~ME_SMOOTH; -// } -// } -// } -// -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -} - -/* - * Action executed after creating of new VerseFace - */ -void post_polygon_create(VNode *vnode, VerseFace *vface) -{ -// struct VNode *obj_vnode; -// struct EditMesh *em = NULL; -// -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// em = (EditMesh*)((VGeomData*)vnode->data)->editmesh; -// } -// -// if(em && !(vface->face) && (vface->counter==0)) { -// struct VLayer *vlayer; -// struct VerseVert *vvert; -// struct EditFace *efa; -// struct EditVert *eves[4]={NULL, NULL, NULL, NULL}; -// uint32 vert_ids[4]={vface->v0, vface->v1, vface->v2, vface->v3}; -// int i; -// -// printf("\tPOST_POLYGON_CREATE()\n"); -// -// vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); -// -// for(i=0; i<4; i++) { -// if(vert_ids[i] != -1) { -// vvert = TLI_dlist_find_link(&(vlayer->dl), vert_ids[i]); -// if(vvert) eves[i] = (EditVert*)vvert->vertex; -// } -// } -// -// /* to prevent never ending loop of sending and receiving -// * faces, because addfacelist() sends new face to verse -// * server if em->vnode isn't NULL */ -// em->vnode = NULL; -// /* efa = addfacelist(eves[0], eves[1], eves[2], eves[3], NULL, NULL);*/ -// em->vnode = vnode; -// -// efa->vface = vface; -// vface->face = efa; -// -// /* countall();*/ -// -// /* recalc_editnormals();*/ -// } -// -// if(((VGeomData*)vnode->data)->vlink) { -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -// } -} - -/* - * Action executed after changes of VerseFace - * ... order of vertexes was fliped, etc. - */ -void post_polygon_set_corner(VNode *vnode, VerseFace *vface) -{ -// struct VNode *obj_vnode; -// struct EditMesh *em = NULL; -// struct EditFace *efa = NULL; -// struct EditEdge *eed, *eedn; -// -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// em = (EditMesh*)((VGeomData*)vnode->data)->editmesh; -// efa = (EditFace*)vface->face; -// } -// -// if(em && efa) { -// printf("\tPOST_POLYGON_CHANGE()\n"); -// -// /* mark all edges, which are part of face efa */ -// efa->e1->f2 = 1; -// efa->e2->f2 = 1; -// efa->e3->f2 = 1; -// if(efa->e4) efa->e4->f2 = 1; -// -// /* change pointers at EdtitVerts and decrease counters of "old" -// * VerseVertexes reference ... less VerseFaces will need them */ -// if(vface->vvert0 != efa->v1->vvert) -// efa->v1 = (EditVert*)vface->vvert0->vertex; -// if(vface->vvert1 != efa->v2->vvert) -// efa->v2 = (EditVert*)vface->vvert1->vertex; -// if(vface->vvert2 != efa->v3->vvert) -// efa->v3 = (EditVert*)vface->vvert2->vertex; -// if(efa->v4) { -// if(!vface->vvert3) -// efa->v4 = NULL; -// else if(vface->vvert3 != efa->v4->vvert) -// efa->v4 = (EditVert*)vface->vvert3->vertex; -// } -// -// /* change pointers at EditEdges */ -// -// /* 1st edge */ -// /* eed = findedgelist(efa->v1, efa->v2); -// if(eed) efa->e1 = eed; -// else efa->e1 = addedgelist(efa->v1, efa->v2, NULL); -// */ -// /* 2nd edge */ -// /* eed = findedgelist(efa->v2, efa->v3); -// if(eed) efa->e2 = eed; -// else efa->e2 = addedgelist(efa->v2, efa->v3, NULL); -// */ -// if(efa->v4) { -// /* 3th edge */ -// /* eed = findedgelist(efa->v2, efa->v3); -// if(eed) efa->e3 = eed; -// else efa->e3 = addedgelist(efa->v2, efa->v3, NULL); -// */ /* 4th edge */ -// /* eed = findedgelist(efa->v4, efa->v1); -// if(eed) efa->e4 = eed; -// else efa->e4 = addedgelist(efa->v4, efa->v1, NULL); -// */ } -// else { -// /* 3th edge */ -// /* eed = findedgelist(efa->v3, efa->v1); -// if(eed) efa->e3 = eed; -// else efa->e3 = addedgelist(efa->v3, efa->v1, NULL); -// */ /* 4th edge */ -// efa->e4 = NULL; -// } -// -// /* unmark needed edges */ -// efa = em->faces.first; -// while(efa) { -// efa->e1->f2 = 0; -// efa->e2->f2 = 0; -// efa->e3->f2 = 0; -// if(efa->e4) efa->e4->f2 = 0; -// efa = efa->next; -// } -// -// /* delete all unneeded edges */ -// eed = em->edges.first; -// while(eed) { -// eedn = eed->next; -// if(eed->f2) { -// /* remedge(eed);*/ -// /* free_editedge(eed);*/ -// } -// eed = eedn; -// } -// -// /* countall();*/ -// -// /* recalc_editnormals();*/ -// } -// -// if(((VGeomData*)vnode->data)->vlink) { -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -// } -} - -/* - * Action executed after deleting of VerseFace - */ -void post_polygon_delete(VNode *vnode, VerseFace *vface) -{ -// struct VNode *obj_vnode; -// struct EditMesh *em = NULL; -// struct EditFace *efa = NULL; -// struct EditEdge *eed, *eedn; -// -// if(G.obedit && (((Mesh*)G.obedit->data)->vnode==vnode)) { -// em = (EditMesh*)((VGeomData*)vnode->data)->editmesh; -// efa = (EditFace*)vface->face; -// } -// -// if(em && efa) { -// printf("\tPOST_POLYGON_DELETE()\n"); -// -// /* mark all edges, which are part of face efa */ -// efa->e1->f2 = 1; -// efa->e2->f2 = 1; -// efa->e3->f2 = 1; -// if(efa->e4) efa->e4->f2 = 1; -// -// efa->vface = NULL; -// TLI_remlink(&em->faces, efa); -// /* free_editface(efa);*/ -// vface->face = NULL; -// -// /* following two crazy loops wouldn't be neccessary if verse spec -// * would support edges */ -// -// /* unmark needed edges */ -// efa = em->faces.first; -// while(efa) { -// efa->e1->f2 = 0; -// efa->e2->f2 = 0; -// efa->e3->f2 = 0; -// if(efa->e4) efa->e4->f2 = 0; -// efa = efa->next; -// } -// -// /* delete all unneeded edges */ -// eed = em->edges.first; -// while(eed) { -// eedn = eed->next; -// if(eed->f2) { -// /* remedge(eed);*/ -// /* free_editedge(eed);*/ -// } -// eed = eedn; -// } -// -// /* countall();*/ -// } -// -// if(((VGeomData*)vnode->data)->vlink) { -// obj_vnode = ((VGeomData*)vnode->data)->vlink->source; -// /* DAG_object_flush_update(G.scene, (Object*)((VObjectData*)obj_vnode->data)->object, OB_RECALC_DATA);*/ -// -// /* allqueue(REDRAWVIEW3D, 1);*/ -// } -} - -/* - * free constraint between VerseFace and EditFace - */ -void post_polygon_free_constraint(VNode *vnode, VerseFace *vface) -{ - // if(vface->face) { - // ((EditFace*)vface->face)->vface = NULL; - // vface->face = NULL; - // } -} - -/* - * free constraint between VGeomData, EditMesh and Mesh - */ -void post_geometry_free_constraint(VNode *vnode) -{ - // if(((VGeomData*)vnode->data)->editmesh) { - // G.editMesh->vnode = NULL; - // ((VGeomData*)vnode->data)->editmesh = NULL; - // } - // if(((VGeomData*)vnode->data)->mesh) { - // ((Mesh*)((VGeomData*)vnode->data)->mesh)->vnode = NULL; - // ((VGeomData*)vnode->data)->mesh = NULL; - // } -} - -/* ========================================================================= - * - * Functions influencing whole EditMesh or VerseMesh - * - * ========================================================================= */ - -/* - * this function will destroy all unused VerseFace and VerseVerts after poping - * editmesh from undo stack - */ -void destroy_unused_geometry(VNode *vnode) -{ - // struct VLayer *vert_vlayer, *face_vlayer; - // struct VerseFace *vface; - // struct VerseVert *vvert; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vert_vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // vvert = vert_vlayer->dl.lb.first; - // while(vvert) { - // if(!(vvert->vertex)) send_verse_vertex_delete(vvert); - // vvert = vvert->next; - // } - // - // face_vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // vface = face_vlayer->dl.lb.first; - // while(vface) { - // if(!(vface->face)) send_verse_face_delete(vface); - // vface = vface->next; - // } -} - -/* - * free all bindings between EditMesh and "verse mesh" ... it is called between - * restorng editmesh from undo stack - */ -void destroy_binding_between_versemesh_and_editmesh(VNode *vnode) -{ - // struct VLayer *vert_vlayer, *face_vlayer; - // struct VerseVert *vvert; - // struct VerseFace *vface; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vert_vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // vvert = vert_vlayer->dl.lb.first; - // while(vvert) { - // destroy_binding_between_versevert_and_editvert(vvert); - // vvert = vvert->next; - // } - // - // face_vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // vface = face_vlayer->dl.lb.first; - // while(vface) { - // destroy_binding_between_verseface_and_editface(vface); - // vface = vface->next; - // } -} - -/* - * Create EditMesh from VerseMesh and keep system in consitant state, this - * function is called, when edit mode is entered ... edit mesh is generated - * from verse mesh (not from Mesh: (Mesh*)ob->data) - */ -void create_edit_mesh_from_verse_node(VNode *vnode) -{ -// struct VLayer *vert_layer, *face_layer; -// struct VerseVert *vvert; -// struct VerseFace *vface; -// struct Mesh *me; -// struct EditVert *eve, *eve0, *eve1, *eve2, *eve3; -// struct EditFace *efa; -// unsigned int keyindex; -// -// if(!(G.obedit && G.obedit->type==OB_MESH)) return; -// me = (Mesh*)G.obedit->data; -// if(vnode!=(VNode*)me->vnode || vnode->type!=V_NT_GEOMETRY) return; -// -// vert_layer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); -// face_layer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); -// -// if(!(vert_layer && face_layer)) return; -// -// /* waitcursor(1);*/ -// -// /* free old editMesh */ -// /* free_editMesh(G.editMesh);*/ -// -// G.editMesh->vnode = NULL; -// -// vvert = vert_layer->dl.lb.first; -// -// keyindex = 0; -// -// /* create all EditVerts */ -// while(vvert) { -// /* eve = addvertlist(vvert->co);*/ -// -// eve->f = 0; -// eve->h = 0; -// eve->dw = NULL; -// eve->keyindex = keyindex; -// eve->vvert = (void*)vvert; -// -// vvert->vertex = (void*)eve; -// -// keyindex++; -// vvert = vvert->next; -// } -// -// vface = face_layer->dl.lb.first; -// -// /* create all EditFaces and EditEdges */ -// while(vface) { -// if(vface->vvert0) eve0= vface->vvert0->vertex; -// else eve0 = NULL; -// if(vface->vvert1) eve1= vface->vvert1->vertex; -// else eve1 = NULL; -// if(vface->vvert2) eve2= vface->vvert2->vertex; -// else eve2 = NULL; -// if(vface->vvert3) eve3= vface->vvert3->vertex; -// else eve3 = NULL; -// -// /* efa= addfacelist(eve0, eve1, eve2, eve3, NULL, NULL);*/ -// if(efa) { -// efa->f = 0; -// efa->flag = ((vface->smooth) && (vface->smooth->value))?ME_SMOOTH:0; -// efa->h = 0; -// efa->vface = (void*)vface; -// vface->face = (void*)efa; -// } -// vface = vface->next; -// } -// -// /* countall();*/ -// -// /* recalc_editnormals();*/ -// -// G.editMesh->vnode = (void*)vnode; -// ((VGeomData*)vnode->data)->editmesh = (void*)G.editMesh; -// -// /* waitcursor(0);*/ -} - -/* - * push whole geometry to verse server, vert layer as well face layer has to - * exist. this function is used for example after editmesh undo pop, it is - * not used, when we push new geometry to verse server - */ -void push_mesh_geometry(VNode *vnode) -{ - // struct VLayer *vert_vlayer, *face_vlayer; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // vert_vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // push_all_verts(vnode, vert_vlayer); - // - // face_vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // push_all_faces(vnode, face_vlayer); -} - -/* - * destroy bindings between EditMesh and VerseMesh and send delete commands - * for all VerseVerts and VerseFaces to verse server, Verse Node has to be - * geometry node - */ - -void destroy_verse_mesh(VNode *vnode) -{ - // struct VLayer *vert_vlayer, *face_vlayer; - // struct VerseFace *vface; - // struct VerseVert *vvert; - // - // if(vnode->type != V_NT_GEOMETRY) return; - // - // face_vlayer = find_verse_layer_type((VGeomData*)vnode->data, POLYGON_LAYER); - // vface = face_vlayer->dl.lb.first; - // - // while(vface) { - // ((EditFace*)vface->face)->vface = NULL; - // vface->face = NULL; - // vface = vface->next; - // } - // - // vert_vlayer = find_verse_layer_type((VGeomData*)vnode->data, VERTEX_LAYER); - // vvert = vert_vlayer->dl.lb.first; - // - // while(vvert) { - // ((EditVert*)vvert->vertex)->vvert = NULL; - // vvert->vertex = NULL; - // vvert = vvert->next; - // } - // - // destroy_geometry(vnode); -} - -/* - * create new Mesh from geometry verse node ... it is temp hack, because - * this function creates only empty mesh without any data ... data will - * be added in editmode (after receiving whole geometry) - */ -Mesh *create_mesh_from_verse_node(VNode *vnode) -{ -// struct Mesh *me; -// -// if(!(vnode && vnode->type==V_NT_GEOMETRY)) return NULL; -// -// /* me = add_mesh();*/ -// -// me->vnode = (void*)vnode; -// ((VGeomData*)vnode->data)->mesh = (void*)me; -// -// return me; -} - - -/*#endif*/ - diff --git a/topmodx/include/verse/verse_node.cc b/topmodx/include/verse/verse_node.cc deleted file mode 100644 index a008601..0000000 --- a/topmodx/include/verse/verse_node.cc +++ /dev/null @@ -1,637 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include - -#include "MEM_guardedalloc.h" - -#include "DNA_listBase.h" - -#include "TLI_dynamiclist.h" -#include "TLI_toplib.h" - -#include "TIF_verse.h" - -#include "TKE_verse.h" - -#include "verse.h" - -/* function prototypes of static functions */ - /* for tags */ -static void free_verse_tag_data(struct VTag *vtag); -static struct VTag *find_tag_in_queue(struct VTagGroup *vtaggroup, const char *name); -static struct VTag *create_verse_tag(VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag); - /* for verse tag groups */ -static void free_verse_taggroup_data(struct VTagGroup *taggroup); -static struct VTagGroup *find_taggroup_in_queue(struct VNode *vnode, const char *name); -static struct VTagGroup *create_verse_taggroup(VNodeID node_id, uint16 group_id, const char *name); - /* for verse nodes */ -static void move_verse_node_to_dlist(struct VerseSession *session, VNodeID vnode_id); - /* function prototypes of node callback functions */ -static void cb_tag_destroy(void *user_data, VNodeID node_id, uint16 group_id, uint16 tag_id); -static void cb_tag_create(void *user_data, VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag); -static void cb_tag_group_destroy(void *user_data, VNodeID node_id, uint16 group_id); -static void cb_tag_group_create(void *user_data, VNodeID node_id, uint16 group_id, const char *name); -static void cb_node_name_set(void *user_data, VNodeID node_id, const char *name); -static void cb_node_destroy(void *user_data, VNodeID node_id); -static void cb_node_create(void *user_data, VNodeID node_id, uint8 type, VNodeID owner_id); - -/* - * send to verse server new tag - */ -void send_verse_tag(VTag *vtag) -{ - // verse_send_tag_create(vtag->node_id, - // vtag->group_id, - // vtag->id, - // vtag->name, - // vtag->type, - // vtag->tag); -} - -/* - * free tag data - */ -static void free_verse_tag_data(VTag *vtag) -{ - // /* free name of verse tag */ - // MEM_freeN(vtag->name); - // /* free value of tag */ - // MEM_freeN(vtag->tag); -} - -/* - * try to find tag in sending queue ... it tag will be found, then - * this function will removed tag from queue and will return pointer - * at this tag - */ -static VTag *find_tag_in_queue(VTagGroup *vtaggroup, const char *name) -{ - // struct VTag *vtag; - // - // vtag = vtaggroup->queue.first; - // - // while(vtag) { - // if(strcmp(vtag->name, name)==0) { - // TLI_remlink(&(vtaggroup->queue), vtag); - // break; - // } - // vtag = vtag->next; - // } - // - // return vtag; -} - -/* - * create new verse tag - */ -static VTag *create_verse_tag(VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag) { - // struct VTag *vtag; - // - // vtag = (VTag*)MEM_mallocN(sizeof(VTag), "VTag"); - // - // vtag->node_id = node_id; - // vtag->group_id = group_id; - // vtag->id = tag_id; - // vtag->name = (char*)MEM_mallocN(sizeof(char)*(strlen(name)+1), "VTag name"); - // strcpy(vtag->name, name); - // vtag->type = type; - // - // vtag->tag = (VNTag*)MEM_mallocN(sizeof(VNTag), "VNTag"); - // *vtag->tag = *tag; - // - // vtag->value = NULL; - // - // return vtag; -} - -/* - * send taggroup to verse server - */ -void send_verse_taggroup(VTagGroup *vtaggroup) -{ - // verse_send_tag_group_create( - // vtaggroup->node_id, - // vtaggroup->id, - // vtaggroup->name); -} - -/* - * free taggroup data - */ -static void free_verse_taggroup_data(VTagGroup *taggroup) -{ - // struct VTag *vtag; - // - // vtag = taggroup->tags.lb.first; - // - // while(vtag) { - // free_verse_tag_data(vtag); - // vtag = vtag->next; - // } - // - // /* unsubscribe from taggroup */ - // verse_send_tag_group_unsubscribe(taggroup->node_id, taggroup->id); - // - // TLI_dlist_destroy(&(taggroup->tags)); - // MEM_freeN(taggroup->name); -} - -/* - * move taggroup from queue to dynamic list with access array, - * set up taggroup id and return pointer at this taggroup - */ -static VTagGroup *find_taggroup_in_queue(VNode *vnode, const char *name) -{ - // struct VTagGroup *vtaggroup; - // - // vtaggroup = vnode->queue.first; - // - // while(vtaggroup) { - // if(strcmp(vtaggroup->name, name)==0) { - // TLI_remlink(&(vnode->queue), vtaggroup); - // break; - // } - // vtaggroup = vtaggroup->next; - // } - // - // return vtaggroup; -} - -/* - * create new verse group of tags - */ -static VTagGroup *create_verse_taggroup(VNodeID node_id, uint16 group_id, const char *name) -{ - // struct VTagGroup *taggroup; - // - // taggroup = (VTagGroup*)MEM_mallocN(sizeof(VTagGroup), "VTagGroup"); - // - // taggroup->node_id = node_id; - // taggroup->id = group_id; - // taggroup->name = (char*)MEM_mallocN(sizeof(char)*(strlen(name)+1), "VTagGroup name"); - // strcpy(taggroup->name, name); - // - // TLI_dlist_init(&(taggroup->tags)); - // taggroup->queue.first = taggroup->queue.last = NULL; - // - // taggroup->post_tag_change = post_tag_change; - // taggroup->post_taggroup_create = post_taggroup_create; - // - // return taggroup; -} - -/* - * move first VerseNode waiting in sending queue to dynamic list of VerseNodes - * (it usually happens, when "our" VerseNode was received from verse server) - */ -static void move_verse_node_to_dlist(VerseSession *session, VNodeID vnode_id) -{ - // VNode *vnode; - // - // vnode = session->queue.first; - // - // if(vnode) { - // TLI_remlink(&(session->queue), vnode); - // TLI_dlist_add_item_index(&(session->nodes), (void*)vnode, vnode_id); - // } -} - -/* - * send VerseNode to verse server - */ -void send_verse_node(VNode *vnode) -{ - // /* set verse node session */ - // struct VerseSession *session; - // session = versesession_from_vsession(vnode->vsession); - // - // verse_send_node_create( - // vnode->id, - // vnode->type, - // session->avatar); -} - -/* - * free Verse Node data - */ -void free_verse_node_data(VNode *vnode) -{ - // struct VTagGroup *vtaggroup; - // - // /* free node data (object, geometry, etc.) */ - // switch(vnode->type){ - // case V_NT_OBJECT: - // free_object_data(vnode); - // break; - // case V_NT_GEOMETRY: - // free_geom_data(vnode); - // break; - // default: - // break; - // } - // - // /* free all tag groups in dynamic list with access array */ - // vtaggroup = vnode->taggroups.lb.first; - // while(vtaggroup) { - // free_verse_taggroup_data(vtaggroup); - // vtaggroup = vtaggroup->next; - // } - // TLI_dlist_destroy(&(vnode->taggroups)); - // - // /* free all tag groups still waiting in queue */ - // vtaggroup = vnode->queue.first; - // while(vtaggroup) { - // free_verse_taggroup_data(vtaggroup); - // vtaggroup = vtaggroup->next; - // } - // TLI_freelistN(&(vnode->queue)); - // - // /* free node name */ - // MEM_freeN(vnode->name); - // /* free node data */ - // MEM_freeN(vnode->data); - // /* unsubscribe from node */ - // verse_send_node_unsubscribe(vnode->id); -} - -/* - * free VerseNode - */ -void free_verse_node(VNode *vnode) -{ - // struct VerseSession *session; - // - // free_verse_node_data(vnode); - // - // session = versesession_from_vsession(vnode->vsession); - // - // TLI_dlist_free_item(&(session->nodes), vnode->id); -} - -/* - * create new Verse Node - */ -VNode* create_verse_node(VSession vsession, VNodeID node_id, uint8 type, VNodeID owner_id) -{ - // struct VNode *vnode; - // - // vnode = (VNode*)MEM_mallocN(sizeof(VNode), "VerseNode"); - // - // vnode->vsession = vsession; - // vnode->id = node_id; - // vnode->owner_id = owner_id; - // vnode->name = NULL; - // vnode->type = type; - // - // TLI_dlist_init(&(vnode->taggroups)); - // vnode->queue.first = vnode->queue.last = NULL; - // - // vnode->data = NULL; - // - // vnode->post_node_create = post_node_create; - // vnode->post_node_destroy = post_node_destroy; - // vnode->post_node_name_set = post_node_name_set; - // - // return vnode; -} - -/* - * callback function: tag was destroyed - */ -static void cb_tag_destroy( void *user_data, VNodeID node_id, uint16 group_id, uint16 tag_id) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // struct VTagGroup *vtaggroup; - // struct VTag *vtag; - // - // if(!session) return; - // - // vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // if(!vnode) return; - // - // /* try to find tag group in list of tag groups */ - // vtaggroup = TLI_dlist_find_link(&(vnode->taggroups), group_id); - // - // if(!vtaggroup) return; - // - // /* try to find verse tag in dynamic list of tags in tag group */ - // vtag = (VTag*)TLI_dlist_find_link(&(vtaggroup->tags), tag_id); - // - // if(vtag) { - // free_verse_tag_data(vtag); - // TLI_dlist_free_item(&(vtaggroup->tags), vtag->id); - // } -} - -/* - * callback function: new tag was created - */ -static void cb_tag_create(void *user_data, VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // struct VTagGroup *vtaggroup; - // struct VTag *vtag; - // - // if(!session) return; - // - // vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // if(!vnode) return; - // - // /* try to find tag group in list of tag groups */ - // vtaggroup = TLI_dlist_find_link(&(vnode->taggroups), group_id); - // - // if(!vtaggroup) return; - // - // /* try to find verse tag in dynamic list of tags in tag group */ - // vtag = (VTag*)TLI_dlist_find_link(&(vtaggroup->tags), tag_id); - // - // if(!vtag) { - // /* we will try to find vtag in sending queue */ - // vtag = find_tag_in_queue(vtaggroup, name); - // - // /* when we didn't create this tag, then we will have to create one */ - // if(!vtag) vtag = create_verse_tag(node_id, group_id, tag_id, name, type, tag); - // else vtag->id = tag_id; - // - // /* add tag to the list of tags in tag group */ - // TLI_dlist_add_item_index(&(vtaggroup->tags), vtag, tag_id); - // - // /* post create method */ - // vtaggroup->post_tag_change(vnode, vtag); - // } - // else { - // /* this tag exists, then we will propably change value of this tag */ - // if((vtag->type != type) || (strcmp(vtag->name, name)!=0)) { - // /* changes of type or name are not allowed and such - // * stupid changes will be returned back */ - // send_verse_tag(vtag); - // } - // else { - // /* post create method */ - // vtaggroup->post_tag_change(vnode, vtag); - // } - // } -} - -/* - * callback function: tag group was destroyed - */ -static void cb_tag_group_destroy( void *user_data, VNodeID node_id, uint16 group_id) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // struct VTagGroup *vtaggroup; - // - // if(!session) return; - // - // vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // if(!vnode) return; - // - // vtaggroup = TLI_dlist_find_link(&(vnode->taggroups), group_id); - // - // if(vtaggroup) { - // free_verse_taggroup_data(vtaggroup); - // TLI_dlist_free_item(&(vnode->taggroups), vtaggroup->id); - // } -} - -/* - * callback function: new tag group was created - */ -static void cb_tag_group_create( void *user_data, VNodeID node_id, uint16 group_id, const char *name) { - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // struct VTagGroup *vtaggroup; - // - // if(!session) return; - // - // vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // if(!vnode) return; - // - // /* name of taggroup has to begin with string "topmod:" */ - // if(strncmp("topmod:", name, 8)) return; - // - // /* try to find tag group in list of tag groups */ - // vtaggroup = TLI_dlist_find_link(&(vnode->taggroups), group_id); - // - // if(!vtaggroup) { - // /* subscribe to tag group (when new tag will be created, then blender will - // * receive command about it) */ - // verse_send_tag_group_subscribe(node_id, group_id); - // - // /* try to find taggroup in waiting queue */ - // vtaggroup = find_taggroup_in_queue(vnode, name); - // - // /* if no taggroup exist, then new has to be created */ - // if(!vtaggroup) vtaggroup = create_verse_taggroup(node_id, group_id, name); - // else vtaggroup->id = group_id; - // - // /* add tag group to dynamic list with access array */ - // TLI_dlist_add_item_index(&(vnode->taggroups), (void*)vtaggroup, (unsigned int)group_id); - // - // /* post create method */ - // vtaggroup->post_taggroup_create(vnode, vtaggroup); - // } - // else { - // /* this taggroup exist and somebody try to change its name */ - // if(strcmp(vtaggroup->name, name)!=0) { - // /* blender doesn't allow such stupid and dangerous things */ - // send_verse_taggroup(vtaggroup); - // } - // } -} - -/* - * callback function: change name of node - */ -static void cb_node_name_set( void *user_data, VNodeID node_id, const char *name) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // - // if(!session) return; - // - // vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // if(vnode && name) { - // if(!vnode->name) { - // vnode->name = (char*)MEM_mallocN(sizeof(char)*(strlen(name)+1), "VerseNode name"); - // } - // else if(strlen(name) > strlen(vnode->name)) { - // MEM_freeN(vnode->name); - // vnode->name = (char*)MEM_mallocN(sizeof(char)*(strlen(name)+1), "VerseNode name"); - // } - // strcpy(vnode->name, name); - // - // vnode->post_node_name_set(vnode); - // } -} - -/* - * callback function for deleting node - */ -static void cb_node_destroy( void *user_data, VNodeID node_id) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // - // if(!session) return; - // - // vnode = TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // - // if(vnode) { - // /* remove VerseNode from dynamic list */ - // TLI_dlist_rem_item(&(session->nodes), (unsigned int)node_id); - // /* do post destroy operations */ - // vnode->post_node_destroy(vnode); - // /* free verse data */ - // free_verse_node_data(vnode); - // /* free VerseNode */ - // MEM_freeN(vnode); - // }; -} - - -/* - * callback function for new created node - */ -static void cb_node_create( void *user_data, VNodeID node_id, uint8 type, VNodeID owner_id) -{ - printf("cb_node_create called"); - - struct VerseSession *session = (VerseSession*)current_verse_session(); - struct VNode *vnode; - - if(!session) return; - - if((type==V_NT_OBJECT) || (type==V_NT_GEOMETRY)) - verse_send_node_subscribe(node_id); - else - return; - - switch(type){ - case V_NT_OBJECT : - if(owner_id==VN_OWNER_MINE) { - /* collect VerseNode from VerseNode queue */ - move_verse_node_to_dlist(session, node_id); - /* send next VerseNode waiting in queue */ - if(session->queue.first) send_verse_node((VNode*)session->queue.first); - /* get received VerseNode from list of VerseNodes */ - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), node_id); - /* set up ID */ - vnode->id = node_id; - /* send name of object node */ - verse_send_node_name_set(node_id, vnode->name); - /* subscribe to changes of object node transformations */ - verse_send_o_transform_subscribe(node_id, (VNRealFormat)0); - /* send object transformation matrix */ - send_verse_object_position(vnode); - send_verse_object_rotation(vnode); - send_verse_object_scale(vnode); - } - else { - /* create new VerseNode */ - vnode = create_verse_node(session->vsession, node_id, type, owner_id); - /* add VerseNode to list of nodes */ - TLI_dlist_add_item_index(&(session->nodes), (void*)vnode, (unsigned int)node_id); - /* create object data */ - vnode->data = create_object_data(); - /* set up avatar's name */ - if(node_id == session->avatar) { - char *client_name; - client_name = verse_client_name(); - verse_send_node_name_set(node_id, client_name); - MEM_freeN(client_name); - } - } - break; - case V_NT_GEOMETRY : - if(owner_id==VN_OWNER_MINE){ - struct VLink *vlink; - /* collect VerseNode from VerseNode queue */ - move_verse_node_to_dlist(session, node_id); - /* send next VerseNode waiting in queue */ - if(session->queue.first) send_verse_node((VNode*)session->queue.first); - /* get received VerseNode from list of VerseNodes */ - vnode = (VNode*)TLI_dlist_find_link(&(session->nodes), node_id); - /* set up ID */ - vnode->id = node_id; - /* find unsent link pointing at this VerseNode */ - vlink = find_unsent_link(session, vnode); - /* send VerseLink */ - send_verse_link(vlink); - /* send name of geometry node */ - verse_send_node_name_set(node_id, vnode->name); - /* send two verse layers to verse server */ - verse_send_g_layer_create(node_id, 0, "vertex", VN_G_LAYER_VERTEX_XYZ, 0, 0); - verse_send_g_layer_create(node_id, 1, "polygon", VN_G_LAYER_POLYGON_CORNER_UINT32, 0, 0); - verse_send_g_layer_create(node_id, -1, "smooth", VN_G_LAYER_POLYGON_FACE_UINT8, 0, 0); - } - else { - /* create new VerseNode*/ - vnode = create_verse_node(session->vsession, node_id, type, owner_id); - /* add VerseNode to dlist of nodes */ - TLI_dlist_add_item_index(&(session->nodes), (void*)vnode, (unsigned int)node_id); - /* create geometry data */ - vnode->data = create_geometry_data(); - } - break; - default: - break; - } - - vnode->post_node_create(vnode); -} - -/* - * set up all callbacks for verse nodes - */ -void set_node_callbacks(void) -{ - /* new node created */ - verse_callback_set((void*)verse_send_node_create, (void*)cb_node_create, NULL); - /* node was deleted */ - verse_callback_set((void*)verse_send_node_destroy, (void*)cb_node_destroy, NULL); - /* name of node was set */ - verse_callback_set((void*)verse_send_node_name_set, (void*)cb_node_name_set, NULL); - - /* new tag group was created */ - verse_callback_set((void*)verse_send_tag_group_create, (void*)cb_tag_group_create, NULL); - /* tag group was destroy */ - verse_callback_set((void*)verse_send_tag_group_destroy, (void*)cb_tag_group_destroy, NULL); - - /* new tag was created */ - verse_callback_set((void*)verse_send_tag_create, (void*)cb_tag_create, NULL); - /* tag was destroy */ - verse_callback_set((void*)verse_send_tag_destroy, (void*)cb_tag_destroy, NULL); -} - -/*#endif*/ diff --git a/topmodx/include/verse/verse_object.cc b/topmodx/include/verse/verse_object.cc deleted file mode 100644 index 421104c..0000000 --- a/topmodx/include/verse/verse_object.cc +++ /dev/null @@ -1,447 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include - -#include "MEM_guardedalloc.h" - -#include "mydevice.h" - -#include "DNA_object_types.h" -#include "DNA_mesh_types.h" -#include "DNA_listBase.h" - -#include "TLI_dynamiclist.h" -#include "TLI_toplib.h" -#include "TLI_editVert.h" -#include "TLI_arithb.h" - -#include "TIF_verse.h" -#include "TIF_space.h" -#include "TIF_editmesh.h" - -#include "TKE_verse.h" -#include "TKE_global.h" -#include "TKE_object.h" -#include "TKE_utildefines.h" -#include "TKE_depsgraph.h" - -/*#include "BDR_editobject.h"*/ - -#include "verse.h" - -/* button callback function, it test object name and send new name to verse server */ -void test_and_send_idbutton_cb(void *obj, void *ob_name) - -{ -// struct Object *ob = (Object*)obj; -// char *name= (char*)ob_name; -// -// /* test_idbutton(name+2);*/ -// -// if(ob->vnode) verse_send_node_name_set(((VNode*)ob->vnode)->id, name+2); -} - -/* - * temp hack: this function push mesh objects (edit mode only) to verse server - */ -void t_verse_push_object(VerseSession *session, Object *ob) -{ -// struct VNode *obj_vnode, *geom_vnode; -// -// if(!session) return; -// -// if(!(session->flag & VERSE_CONNECTED)) return; -// -// /* create "my" new object VerseNode */ -// obj_vnode= create_verse_node(session->vsession, -1 , V_NT_OBJECT, VN_OWNER_MINE); -// /* create object data */ -// obj_vnode->data = create_object_data(); -// -// /* set up name of VerseNode */ -// obj_vnode->name = (char*)MEM_mallocN(sizeof(char*)*(strlen(ob->id.name)-1), "object node name"); -// obj_vnode->name[0] = '\0'; -// strcat(obj_vnode->name, ob->id.name+2); -// -// /* set up object node transformation */ -// VECCOPY(((VObjectData*)obj_vnode->data)->pos, ob->loc); -// /* EulToQuat(ob->rot, ((VObjectData*)obj_vnode->data)->rot);*/ -// VECCOPY(((VObjectData*)obj_vnode->data)->scale, ob->size); -// -// /* set up pointers between Object and VerseNode */ -// ((VObjectData*)obj_vnode->data)->object = (void*)ob; -// ob->vnode = (void*)obj_vnode; -// -// /* add node to sending queue */ -// add_item_to_send_queue(&(session->queue), obj_vnode, VERSE_NODE); -// -// if(ob->type==OB_MESH) { -// struct VLink *vlink; -// struct EditMesh *em; -// -// /* create "my" new geometry VerseNode */ -// geom_vnode= create_verse_node(session->vsession, -1 , V_NT_GEOMETRY, VN_OWNER_MINE); -// /* create new geometry data */ -// geom_vnode->data = create_geometry_data(); -// -// /* create new link between VereseNodes */ -// vlink = create_verse_link(session->vsession, obj_vnode, geom_vnode, -1, -1, "geometry"); -// /* send link to verse server */ -// add_item_to_send_queue(&(((VObjectData*)obj_vnode->data)->queue), vlink, VERSE_LINK); -// -// /* set up name of VerseNode */ -// geom_vnode->name = (char*)MEM_mallocN(sizeof(char*)*(strlen(((Mesh*)ob->data)->id.name)-1), -// "object node name"); -// geom_vnode->name[0] = '\0'; -// strcat(geom_vnode->name, ((Mesh*)ob->data)->id.name+2); -// -// ((Mesh*)ob->data)->vnode = (void*)geom_vnode; -// -// if(G.obedit==ob) { -// /* set up pointers between EditMesh and VerseNode */ -// em = G.editMesh; -// em->vnode = (void*)geom_vnode; -// ((VGeomData*)geom_vnode->data)->editmesh = (void*)em; -// ((VGeomData*)geom_vnode->data)->mesh = ob->data; -// } -// else { -// /* set up pointer beteen Mesh and VerseNode */ -// ((VGeomData*)geom_vnode->data)->mesh = ob->data; -// ((Mesh*)ob->data)->vnode = (void*)geom_vnode; -// } -// -// /* add node to sending queue */ -// add_item_to_send_queue(&(session->queue), geom_vnode, VERSE_NODE); -// } -} - -/* - * create blender Object from object verse node, it will subscribe this verse - * node for changes of transformation matrix (subscription for changes of trans. - * mat. wasn't neccessary, when object verse node wasn't visualised) - */ -Object *create_object_from_verse_node(VNode *vnode) -{ -// struct Object *ob; -// -// if(!(vnode && vnode->type==V_NT_OBJECT)) return NULL; -// -// /* ob = add_object(OB_MESH);*/ -// -// ob->vnode = (void*)vnode; -// ((VObjectData*)vnode->data)->object = (void*)ob; -// -// ((VObjectData*)vnode->data)->flag |= POS_RECEIVE_READY; -// ((VObjectData*)vnode->data)->flag |= ROT_RECEIVE_READY; -// ((VObjectData*)vnode->data)->flag |= SCALE_RECEIVE_READY; -// -// if(ob) { -// char *str; -// str = (char*)malloc(sizeof(char)*(strlen(vnode->name)+3)); -// str[0] = '\0'; -// strcat(str, "OB"); -// strcat(str, vnode->name); -// strncpy(ob->id.name, str, 23); -// printf("\tob->id.name: %s\n", ob->id.name); -// free(str); -// } -// -// verse_send_o_transform_subscribe(vnode->id, 0); -// -// return ob; -} - -/* - * Create blender object-mesh from verse object node, verse geometry node, - * object will be in edit mode after "subscribing" - */ -void t_verse_pop_node(VNode *vnode) -{ -// struct VNode *geom_node=NULL; -// struct VLink *vlink; -// struct Object *ob; -// struct Mesh *me; -// -// if(!(vnode && vnode->type==V_NT_OBJECT)) return; -// -// if(((VObjectData*)vnode->data)->object) { -// printf("\talready subscribed to object node ... can't subscribe again\n"); -// return; -// } -// -// vlink = ((VObjectData*)vnode->data)->links.lb.first; -// -// while(vlink) { -// if(vlink->target && vlink->target->type==V_NT_GEOMETRY){ -// geom_node = vlink->target; -// break; -// } -// vlink = vlink->next; -// } -// -// if(!geom_node) return; -// -// /* if(G.obedit) exit_editmode(2);*/ -// -// ob = create_object_from_verse_node(vnode); -// -// me = create_mesh_from_verse_node(geom_node); -// -// if(ob && me) { -// ob->data = me; -// -// G.obedit = ob; -// -// create_edit_mesh_from_verse_node(geom_node); -// } -} - -/* - * "unsubscribe" verse node ... VerseNode is still subscribed, but constraint - * between VerseNode and Object is "deleted" as well constraint between Mesh and - * mesh geom VerseNode. - */ -void t_verse_unsubscribe_node(VNode *vnode) -{ -// struct Object *ob; -// struct Mesh *me; -// struct EditMesh *em; -// struct VNode *geom_node=NULL; -// struct VLink *vlink; -// -// if(!(vnode && vnode->type==V_NT_OBJECT)) return; -// -// if(!((VObjectData*)vnode->data)->object) { -// printf("\tnot subscribed to object node ... can't unsubscribe ;-)\n"); -// return; -// } -// -// vlink = ((VObjectData*)vnode->data)->links.lb.first; -// -// while(vlink) { -// if(vlink->target && vlink->target->type==V_NT_GEOMETRY){ -// geom_node = vlink->target; -// break; -// } -// vlink = vlink->next; -// } -// -// if(!geom_node) return; -// -// /* leave edit mode before unsubscribing */ -// /* if(G.obedit==((VObjectData*)vnode->data)->object) load_editMesh();*/ -// -// /* delete constraint between Object and object VerseNode */ -// ob = (Object*)((VObjectData*)vnode->data)->object; -// ob->vnode = NULL; -// ((VObjectData*)vnode->data)->object = NULL; -// -// /* delete constraint between Mesh and geometry VerseNode */ -// me = (Mesh*)((VGeomData*)geom_node->data)->mesh; -// me->vnode = NULL; -// ((VGeomData*)geom_node->data)->mesh = NULL; -// -// /* delete constraint between Mesh and geometry VerseNode */ -// em = (EditMesh*)((VGeomData*)geom_node->data)->editmesh; -// if(em) { -// em->vnode = NULL; -// ((VGeomData*)geom_node->data)->editmesh = NULL; -// } -} - -/* - * when blender Object is deleted, then we have to unsubscribe and free all - * VerseNode dependent on this object - */ -void t_verse_delete_object(Object *object) -{ - // struct VNode *vnode; - // struct VLink *vlink; - // - // vnode = (VNode*)object->vnode; - // - // if(vnode) { - // /* free all child VerseNodes */ - // vlink = ((VObjectData*)vnode->data)->links.lb.first; - // while(vlink) { - // free_verse_node(vlink->target); - // vlink = vlink->next; - // } - // - // free_verse_node(vnode); - // } -} - -/* - * whe VerseLink is created between two nodes, the Object start to point at - * coresponding data - */ -void post_link_set(VLink *vlink) -{ - // struct VNode *target, *source; - // struct Object *ob=NULL; - // struct Mesh *me=NULL; - // - // source = vlink->source; - // target = vlink->target; - // - // if(source->type==V_NT_OBJECT && target->type==V_NT_GEOMETRY){ - // if(((VObjectData*)source->data)->object) - // ob = (Object*)((VObjectData*)source->data)->object; - // if(((VGeomData*)target->data)->mesh) - // me = (Mesh*)((VGeomData*)target->data)->mesh; - // if(ob && me && ob->data!=me) ob->data = me; - // } - -/* allqueue(REDRAWALL, 1);*/ -} - -/* - * when VerseLink is deleted, then bindings between Object and data should be removed - */ -void post_link_destroy(VLink *vlink) -{ - // struct VNode *source, *target; - // struct Object *ob; - // - // source = vlink->source; - // target = vlink->target; - // - // if(source->type==V_NT_OBJECT && target->type==V_NT_GEOMETRY) { - // if(((VObjectData*)source->data)->object) { - // ob = (Object*)((VObjectData*)source->data)->object; - // ob->data=NULL; - // } - // } - // -/* allqueue(REDRAWALL, 1);*/ -} - -/* - * recalculate transformation matrix of object - */ -void post_transform(VNode *vnode) -{ -// struct VObjectData *obj_data = (VObjectData*)vnode->data; -// float mat_s[4][4]; -// float mat_r[4][4]; -// float mat_p[4][4]; -// float mat[4][4]; -// -// if(!obj_data->object) return; -// -// /* Mat4One(mat_s); -// Mat4One(mat_r); -// Mat4One(mat_p); -// */ -// /* scale */ -// VECCOPY(((Object*)obj_data->object)->size, obj_data->scale); -// mat_s[0][0] = obj_data->scale[0]; -// mat_s[1][1] = obj_data->scale[1]; -// mat_s[2][2] = obj_data->scale[2]; -// -// /* rotate */ -// /* QuatToEul(obj_data->rot, ((Object*)obj_data->object)->rot);*/ -// /* QuatToMat4(obj_data->rot, mat_r);*/ -// -// /* position */ -// VECCOPY(((Object*)obj_data->object)->loc, obj_data->pos) -// mat_p[3][0] = obj_data->pos[0]; -// mat_p[3][1] = obj_data->pos[1]; -// mat_p[3][2] = obj_data->pos[2]; - - /* matrix multiplication */ -/* Mat4MulMat4(mat, mat_r, mat_p);*/ -/* Mat4MulMat4(((Object*)obj_data->object)->obmat, mat_s, mat);*/ - -/* DAG_object_flush_update(G.scene, (Object*)obj_data->object, OB_RECALC_OB);*/ - -/* allqueue(REDRAWVIEW3D, 1);*/ -} - -/* - * free constraint between object VerseNode and blender Object - */ -void post_object_free_constraint(VNode *vnode) -{ - // if(((VObjectData*)vnode->data)->object) { - // ((Object*)((VObjectData*)vnode->data)->object)->vnode = NULL; - // ((VObjectData*)vnode->data)->object = NULL; - // } -} - -/* - * send transformation of Object to verse server - */ -void t_verse_send_transformation(Object *ob) -{ -// struct VNode *vnode= ob->vnode; -// float *pos = ((VObjectData*)vnode->data)->pos; -// float quat[4]; -// float *scale = ((VObjectData*)vnode->data)->scale; -// -// if(!vnode) return; -// -// /* if last sent position wasn't received yet, then next change of position -// * can't be send until last send change is received */ -// if( ((VObjectData*)vnode->data)->flag & POS_SEND_READY ) { -// if((pos[0]!=ob->loc[0]) || (pos[1]!=ob->loc[1]) || (pos[2]!=ob->loc[2])) { -// VECCOPY(pos, ob->loc); -// send_verse_object_position(vnode); -// } -// } -// -// /* if last sent rotation wasn't received yet, then next change of rotation -// * can't be send until last send change is received */ -// if( ((VObjectData*)vnode->data)->flag & ROT_SEND_READY ) { -// /* EulToQuat(ob->rot, quat);*/ -// -// if((((VObjectData*)vnode->data)->rot[0] != quat[0]) || -// (((VObjectData*)vnode->data)->rot[1] != quat[1]) || -// (((VObjectData*)vnode->data)->rot[2] != quat[2]) || -// (((VObjectData*)vnode->data)->rot[3] != quat[3])) { -// QUATCOPY(((VObjectData*)vnode->data)->rot, quat); -// send_verse_object_rotation(vnode); -// } -// } -// -// /* if last sent object size wasn't received yet, then next change of object size -// * can't be send until last send change is received */ -// if( ((VObjectData*)vnode->data)->flag & SCALE_SEND_READY ) { -// if((scale[0]!=ob->size[0]) || (scale[1]!=ob->size[1]) || (scale[2]!=ob->size[2])) { -// VECCOPY(scale, ob->size); -// send_verse_object_scale(vnode); -// } -// } -// -// verse_callback_update(0); -} - -/*#endif*/ - diff --git a/topmodx/include/verse/verse_object_node.cc b/topmodx/include/verse/verse_object_node.cc deleted file mode 100644 index 8404c34..0000000 --- a/topmodx/include/verse/verse_object_node.cc +++ /dev/null @@ -1,511 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include - -#include "MEM_guardedalloc.h" - -#include "DNA_listBase.h" - -#include "TLI_dynamiclist.h" -#include "TLI_toplib.h" - -#include "TIF_verse.h" - -#include "TKE_verse.h" - -#include "verse.h" - -/* function prototypes of static functions */ - -/* callback functions */ -static void cb_o_transform_pos_real32(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const real32 *pos, const real32 *speed, const real32 *accelerate, const real32 *drag_normal, real32 drag); -static void cb_o_transform_rot_real32(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag); -static void cb_o_transform_scale_real32(void *user_data, VNodeID node_id, real32 scale_x, real32 scale_y, real32 scale_z); -static void cb_o_link_set(void *user_data, VNodeID node_id, uint16 link_id, VNodeID link, const char *label, uint32 target_id); -static void cb_o_link_destroy(void *user_data, VNodeID node_id,uint16 link_id); - -/* other functions */ -static void set_target_node_link_pointer(struct VNode *vnode, struct VLink *vlink); -static void free_verse_link_data(struct VLink *vlink); - -/* - * find unsent VerseLink "pointing at this VerseNode" - */ -VLink *find_unsent_link(VerseSession *session, VNode *vnode) -{ - // struct VNode *tmp; - // struct VLink *vlink; - // - // tmp = session->nodes.lb.first; - // - // while(tmp) { - // if(tmp->type==V_NT_OBJECT) { - // vlink = ((VObjectData*)tmp->data)->queue.first; - // while(vlink) { - // if(vlink->target == vnode) - // return vlink; - // vlink = vlink->next; - // } - // } - // tmp = tmp->next; - // } - // return NULL; -} - -/* - * send object position to verse server - */ -void send_verse_object_position(VNode *vnode) -{ - // ((VObjectData*)vnode->data)->flag &= ~POS_SEND_READY; - // - // verse_send_o_transform_pos_real32( - // vnode->id, /* node id */ - // 0, /* time_s ... no interpolation */ - // 0, /* time_f ... no interpolation */ - // ((VObjectData*)vnode->data)->pos, - // NULL, /* speed ... no interpolation */ - // NULL, /* accelerate ... no interpolation */ - // NULL, /* drag normal ... no interpolation */ - // 0.0); /* drag ... no interpolation */ -} - -/* - * send object rotation to verse server - */ -void send_verse_object_rotation(VNode *vnode) -{ - // VNQuat32 rot; - // - // rot.x = ((VObjectData*)vnode->data)->rot[0]; - // rot.y = ((VObjectData*)vnode->data)->rot[1]; - // rot.z = ((VObjectData*)vnode->data)->rot[2]; - // rot.w = ((VObjectData*)vnode->data)->rot[3]; - // - // ((VObjectData*)vnode->data)->flag &= ~ROT_SEND_READY; - // - // verse_send_o_transform_rot_real32( - // vnode->id, /* node id */ - // 0, /* time_s ... no interpolation */ - // 0, /* time_f ... no interpolation */ - // &rot, - // NULL, /* speed ... no interpolation */ - // NULL, /* accelerate ... no interpolation */ - // NULL, /* drag normal ... no interpolation */ - // 0.0); /* drag ... no interpolation */ -} - -/* - * send object rotation to verse server - */ -void send_verse_object_scale(VNode *vnode) -{ - // ((VObjectData*)vnode->data)->flag &= ~SCALE_SEND_READY; - // - // verse_send_o_transform_scale_real32( - // vnode->id, - // ((VObjectData*)vnode->data)->scale[0], - // ((VObjectData*)vnode->data)->scale[1], - // ((VObjectData*)vnode->data)->scale[2]); -} - -/* - * send VerseLink to verse server - */ -void send_verse_link(VLink *vlink) -{ - // verse_session_set(vlink->vsession); - // - // verse_send_o_link_set( - // vlink->source->id, - // vlink->id, - // vlink->target->id, - // vlink->label, - // vlink->target_id); -} - -/* - * set up pointer at VerseLink of target node (geometry node, material node, etc.) - */ -static void set_target_node_link_pointer(VNode *vnode, VLink *vlink) -{ - // switch (vnode->type) { - // case V_NT_GEOMETRY: - // ((VGeomData*)vnode->data)->vlink = vlink; - // break; - // default: - // break; - // } -} - -/* - * free VerseLink and it's label - */ -static void free_verse_link_data(VLink *vlink) -{ - // MEM_freeN(vlink->label); -} - -/* - * create new VerseLink - */ -VLink *create_verse_link( - VSession vsession, - VNode *source, - VNode *target, - uint16 link_id, - uint32 target_id, - const char *label) -{ - // struct VLink *vlink; - // - // vlink = (VLink*)MEM_mallocN(sizeof(VLink), "VerseLink"); - // vlink->vsession = vsession; - // vlink->source = source; - // vlink->target = target; - // vlink->id = link_id; - // vlink->target_id = target_id; - // - // set_target_node_link_pointer(target, vlink); - // - // vlink->label = (char*)MEM_mallocN(sizeof(char)*(strlen(label)+1), "VerseLink label"); - // vlink->label[0] = '\0'; - // strcat(vlink->label, label); - // - // vlink->flag = 0; - // - // vlink->post_link_set = post_link_set; - // vlink->post_link_destroy = post_link_destroy; - // - // return vlink; -} - -/* - * free ObjectData (links, links in queue and lables of links) - */ -void free_object_data(VNode *vnode) -{ - // struct VObjectData *obj = (VObjectData*)vnode->data; - // struct VLink *vlink; - // - // if(!obj) return; - // - // /* free all labels of links in dlist */ - // vlink = obj->links.lb.first; - // while(vlink){ - // free_verse_link_data(vlink); - // vlink = vlink->next; - // } - // - // /* free all labels of links waiting in queue */ - // vlink = obj->queue.first; - // while(vlink){ - // free_verse_link_data(vlink); - // vlink = vlink->next; - // } - // - // /* free constraint between VerseNode and Object */ - // obj->post_object_free_constraint(vnode); - // - // /* unsubscribe from receiving changes of transformation matrix */ - // verse_send_o_transform_unsubscribe(vnode->id, 0); - // - // /* free dynamic list and sendig queue of links */ - // TLI_dlist_destroy(&(obj->links)); - // TLI_freelistN(&(obj->queue)); -} - -/* - * create new object data - */ -VObjectData *create_object_data(void) -{ - // VObjectData *obj; - // - // obj = (VObjectData*)MEM_mallocN(sizeof(VObjectData), "VerseObjectData"); - // obj->object = NULL; - // TLI_dlist_init(&(obj->links)); - // obj->queue.first = obj->queue.last = NULL; - // obj->flag = 0; - // - // /* transformation matrix */ - // obj->pos[0] = obj->pos[1] = obj->pos[2] = 0.0; - // obj->rot[0] = obj->rot[1] = obj->rot[2] = 0.0; obj->rot[3] = 1; - // obj->scale[0] = obj->scale[1] = obj->scale[2] = 1.0; - // - // /* transformation flags */ - // obj->flag |= POS_SEND_READY; - // obj->flag |= ROT_SEND_READY; - // obj->flag |= SCALE_SEND_READY; - // - // /* set up pointers at post callback functions */ - // obj->post_transform = post_transform; - // obj->post_object_free_constraint = post_object_free_constraint; - // - // return obj; -} - -/* - * callback function: - */ -static void cb_o_transform_pos_real32( - void *user_data, - VNodeID node_id, - uint32 time_s, - uint32 time_f, - const real32 *pos, - const real32 *speed, - const real32 *accelerate, - const real32 *drag_normal, - real32 drag) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // float vec[3], dt; - // - // if(!session) return; - // - // vnode = TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // - // ((VObjectData*)vnode->data)->flag |= POS_SEND_READY; - // - // /* verse server sends automaticaly some stupid default values ... - // * we have to ignore these values, when we created this object node */ - // if( (vnode->owner_id==VN_OWNER_MINE) && !(((VObjectData*)vnode->data)->flag & POS_RECEIVE_READY) ) { - // ((VObjectData*)vnode->data)->flag |= POS_RECEIVE_READY; - // return; - // } - // - // dt = time_s + time_f/(0xffff); - // - // if(pos) { - // vec[0] = pos[0]; - // vec[1] = pos[1]; - // vec[2] = pos[2]; - // } - // - // if(speed) { - // vec[0] += speed[0]*dt; - // vec[1] += speed[1]*dt; - // vec[2] += speed[2]*dt; - // } - // - // if(accelerate) { - // vec[0] += accelerate[0]*dt*dt/2; - // vec[1] += accelerate[1]*dt*dt/2; - // vec[2] += accelerate[2]*dt*dt/2; - // } - // - // if( (((VObjectData*)vnode->data)->pos[0] != vec[0]) || - // (((VObjectData*)vnode->data)->pos[1] != vec[1]) || - // (((VObjectData*)vnode->data)->pos[2] != vec[2])) - // { - // ((VObjectData*)vnode->data)->pos[0] = vec[0]; - // ((VObjectData*)vnode->data)->pos[1] = vec[1]; - // ((VObjectData*)vnode->data)->pos[2] = vec[2]; - // - // ((VObjectData*)vnode->data)->post_transform(vnode); - // } -} - -/* - * callback function: - */ -static void cb_o_transform_rot_real32(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, - const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // float vec[4]={0, 0, 0, 0}, dt; - // - // if(!session) return; - // - // vnode = TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // - // ((VObjectData*)vnode->data)->flag |= ROT_SEND_READY; - // - // /* verse server sends automaticaly some stupid default values ... - // * we have to ignore these values, when we created this object node */ - // if( (vnode->owner_id==VN_OWNER_MINE) && !(((VObjectData*)vnode->data)->flag & ROT_RECEIVE_READY) ) { - // ((VObjectData*)vnode->data)->flag |= ROT_RECEIVE_READY; - // return; - // } - // - // dt = time_s + time_f/(0xffff); - // - // if(rot) { - // vec[0] = rot->x; - // vec[1] = rot->y; - // vec[2] = rot->z; - // vec[3] = rot->w; - // } - // - // if(speed) { - // vec[0] += speed->x*dt; - // vec[1] += speed->y*dt; - // vec[2] += speed->z*dt; - // vec[3] += speed->w*dt; - // } - // - // if(accelerate) { - // vec[0] += accelerate->x*dt*dt/2; - // vec[1] += accelerate->y*dt*dt/2; - // vec[2] += accelerate->z*dt*dt/2; - // vec[3] += accelerate->w*dt*dt/2; - // } - // - // if( (((VObjectData*)vnode->data)->rot[0] != vec[0]) || - // (((VObjectData*)vnode->data)->rot[1] != vec[1]) || - // (((VObjectData*)vnode->data)->rot[2] != vec[2]) || - // (((VObjectData*)vnode->data)->rot[3] != vec[3])) - // { - // ((VObjectData*)vnode->data)->rot[0] = vec[0]; - // ((VObjectData*)vnode->data)->rot[1] = vec[1]; - // ((VObjectData*)vnode->data)->rot[2] = vec[2]; - // ((VObjectData*)vnode->data)->rot[3] = vec[3]; - // - // ((VObjectData*)vnode->data)->post_transform(vnode); - // } -} - -/* - * callback function: - */ -static void cb_o_transform_scale_real32( void *user_data, VNodeID node_id, real32 scale_x, real32 scale_y, real32 scale_z) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // - // if(!session) return; - // - // vnode = TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // - // ((VObjectData*)vnode->data)->flag |= SCALE_SEND_READY; - // - // /* verse server sends automaticaly some stupid default values ... - // * we have to ignore these values, when we created this object node */ - // if( (vnode->owner_id==VN_OWNER_MINE) && !(((VObjectData*)vnode->data)->flag & SCALE_RECEIVE_READY) ) { - // ((VObjectData*)vnode->data)->flag |= SCALE_RECEIVE_READY; - // return; - // } - // - // if( (((VObjectData*)vnode->data)->scale[0] != scale_x) || - // (((VObjectData*)vnode->data)->scale[1] != scale_y) || - // (((VObjectData*)vnode->data)->scale[2] != scale_z)) - // { - // ((VObjectData*)vnode->data)->scale[0] = scale_x; - // ((VObjectData*)vnode->data)->scale[1] = scale_y; - // ((VObjectData*)vnode->data)->scale[2] = scale_z; - // - // ((VObjectData*)vnode->data)->post_transform(vnode); - // } -} - -/* - * callback function: link between object node and some other node was created - */ -static void cb_o_link_set( void *user_data, VNodeID node_id, uint16 link_id, VNodeID link, const char *label, uint32 target_id) -{ - // struct VLink *vlink; - // struct VNode *source; - // struct VNode *target; - // - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // - // if(!session) return; - // - // source = TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // target = TLI_dlist_find_link(&(session->nodes), (unsigned int)link); - // - // if(!(source && target)) return; - // - // vlink = ((VObjectData*)source->data)->queue.first; - // - // if(vlink && (vlink->source==source) && (vlink->target==target)) { - // /* remove VerseLink from sending queue */ - // TLI_remlink(&(((VObjectData*)source->data)->queue), vlink); - // /* add VerseLink to dynamic list of VerseLinks */ - // TLI_dlist_add_item_index(&(((VObjectData*)source->data)->links), vlink, (unsigned int)link_id); - // /* send next link from sending queue */ - // if(((VObjectData*)source->data)->queue.first) - // send_verse_link(((VObjectData*)source->data)->queue.first); - // /* set up VerseLink variables */ - // vlink->flag = 0; - // vlink->id = link_id; - // vlink->target_id = target_id; - // } - // else { - // /* create new VerseLink */ - // vlink = create_verse_link(session->vsession, source, target, link_id, target_id, label); - // /* add VerseLink to dynamic list of VerseLinks */ - // TLI_dlist_add_item_index(&(((VObjectData*)source->data)->links), vlink, (unsigned int)link_id); - // } - // - // vlink->post_link_set(vlink); -} - -/* - * callback function: destroy link between two VerseNodes - */ -static void cb_o_link_destroy( void *user_data, VNodeID node_id, uint16 link_id) -{ - // struct VerseSession *session = (VerseSession*)current_verse_session(); - // struct VNode *vnode; - // struct VLink *vlink; - // - // if(!session) return; - // - // vnode = TLI_dlist_find_link(&(session->nodes), (unsigned int)node_id); - // - // vlink = TLI_dlist_find_link(&(((VObjectData*)vnode->data)->links), link_id); - // - // if(vlink) { - // free_verse_link_data(vlink); - // TLI_dlist_free_item(&(((VObjectData*)vnode->data)->links), link_id); - // } - // - // vlink->post_link_destroy(vlink); -} - -void set_object_callbacks(void) -{ - /* position of object was changed */ - verse_callback_set((void*)verse_send_o_transform_pos_real32, (void*)cb_o_transform_pos_real32, NULL); - /* rotation of object was changed */ - verse_callback_set((void*)verse_send_o_transform_rot_real32, (void*)cb_o_transform_rot_real32, NULL); - /* size of object was changed */ - verse_callback_set((void*)verse_send_o_transform_scale_real32, (void*)cb_o_transform_scale_real32, NULL); - /* new link between nodes was created */ - verse_callback_set((void*)verse_send_o_link_set, (void*)cb_o_link_set, NULL); - /* link between nodes was destroyed */ - verse_callback_set((void*)verse_send_o_link_destroy, (void*)cb_o_link_destroy, NULL); -} - -/*#endif*/ diff --git a/topmodx/include/verse/verse_session.cc b/topmodx/include/verse/verse_session.cc deleted file mode 100644 index 78c28ac..0000000 --- a/topmodx/include/verse/verse_session.cc +++ /dev/null @@ -1,334 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * 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 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Contributor(s): Jiri Hnidek. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/*#ifdef WITH_VERSE*/ - -#include - -#include "TKE_verse.h" - -#include "MEM_guardedalloc.h" - -#include "DNA_mesh_types.h" /* temp */ -#include "DNA_listBase.h" - -#include "TLI_dynamiclist.h" -#include "TLI_toplib.h" - -/*#include "TIF_screen.h"*/ -#include "TIF_verse.h" - -#include "TKE_global.h" - -#include "verse.h" - -#include "VerseTopMod.hh" - -class VerseTopMod; - -struct ListBase session_list={NULL, NULL}; - -/* list of static function prototypes */ -static void cb_connect_terminate(const char *address, const char *bye); -static void cb_connect_accept(void *user_data, uint32 avatar, void *address, void *connection, const uint8 *host_id); -static void set_all_callbacks(void); -static void free_verse_session_data(struct VerseSession *session); - -/* - * callback function for connection terminated - */ -static void cb_connect_terminate(const char *address, const char *bye) -{ - VerseSession *session = (VerseSession*)current_verse_session(); - - if(!session) return; - - /* remove session from list of session */ - TLI_remlink(&session_list, session); - /* do post connect operations */ - session->post_connect_terminated(session); - /* free session data */ - free_verse_session_data(session); - /* free session */ - MEM_freeN(session); -} - -/* - * callback function for accepted connection to verse server - */ -static void cb_connect_accept( void *user_data, uint32 avatar, void *address, void *connection, const uint8 *host_id) -{ - struct VerseSession *session = (VerseSession*)current_verse_session(); - uint32 i, mask=0; - - if(!session) return; - - session->flag |= VERSE_CONNECTED; - session->flag &= ~VERSE_CONNECTING; - - // VerseTopMod::Instance()->write("\nTopMod was connected to verse server: ");//" + address + "\n"); - // VerseTopMod::Instance()->write(QString("VerseSession->counter: %1\n").arg(session->counter)); - printf("\nTopMod was connected to verse server: %s\n", (char*)address); - printf("\tVerseSession->counter: %d\n", session->counter); - - session->avatar = avatar; - - session->post_connect_accept(session); - - for(i = 0; i < V_NT_NUM_TYPES; i++) - mask = mask | (1 << i); - verse_send_node_index_subscribe(mask); -} - -/* - * set up all callbacks for sessions - */ -void set_verse_session_callbacks(void) -{ - /* connection */ - verse_callback_set((void*)verse_send_connect_accept, (void*)cb_connect_accept, NULL); - /* connection was terminated */ - verse_callback_set((void*)verse_send_connect_terminate, (void*)cb_connect_terminate, NULL); -} - -/* - * set all callbacks used in Blender - */ -static void set_all_callbacks(void) -{ - /* set up all callbacks for sessions */ - set_verse_session_callbacks(); - - /* set up callbacks for nodes */ - set_node_callbacks(); - - /* set up all callbacks for object nodes */ - set_object_callbacks(); - - /* set up all callbacks for geometry nodes */ - set_geometry_callbacks(); -} - -/* - * this function sends and receive all packets for all sessions - */ -void t_verse_update(void) -{ - VerseSession *session, *next_session; - - session = (VerseSession*)session_list.first; - while(session){ - next_session = session->next; - verse_session_set(session->vsession); - if((session->flag & VERSE_CONNECTED) || (session->flag & VERSE_CONNECTING)) { - verse_callback_update(1000); - session->post_connect_update(session); - } - session = next_session; - } -} - -/* - * returns VerseSession coresponding to vsession pointer - */ -VerseSession *versesession_from_vsession(VSession vsession) -{ - struct VerseSession *session; - - session = (VerseSession*)session_list.first; - - while(session) { - if(session->vsession==vsession) return session; - session = session->next; - } - - return session; -} - -/* - * returns pointer at current VerseSession - */ -VerseSession *current_verse_session(void) -{ - struct VerseSession *session; - VSession vsession = verse_session_get(); - - session = (VerseSession*)session_list.first; - - while(session){ - if(session->vsession == vsession) - return session; - session = session->next; - } - - VerseTopMod::Instance()->write("error: non-existing SESSION occured!\n"); - // printf("error: non-existing SESSION occured!\n"); - return NULL; -} - -/* - * free VerseSession - */ -static void free_verse_session_data(VerseSession *session) -{ - struct VNode *vnode; - - /* free data of all nodes */ - vnode = (VNode*)session->nodes.lb.first; - while(vnode){ - free_verse_node_data(vnode); - vnode = vnode->next; - } - - /* free data of nodes waiting in queue */ - vnode = (VNode*)session->queue.first; - while(vnode){ - free_verse_node_data(vnode); - vnode = vnode->next; - } - - /* free all VerseNodes */ - TLI_dlist_destroy(&(session->nodes)); - /* free all VerseNodes waiting in queque */ - TLI_freelistN(&(session->queue)); - - /* free name of verse host for this session */ - MEM_freeN(session->address); -} - -/* - * free VerseSession - */ -void free_verse_session(VerseSession *session) -{ - /* remove session from session list*/ - TLI_remlink(&session_list, session); - /* do post terminated operations */ - session->post_connect_terminated(session); - /* free session data (nodes, layers) */ - free_verse_session_data(session); - /* free session */ - MEM_freeN(session); -} - -/* - * create new verse session and return coresponding data structure - */ -VerseSession *create_verse_session( const char *name, const char *pass, const char *address, uint8 *expected_key) -{ - struct VerseSession *session; - VSession vsession; - - vsession = verse_send_connect(name, pass, address, expected_key); - - if(!vsession) return NULL; - - session = (VerseSession*)MEM_mallocN(sizeof(VerseSession), "VerseSession"); - - session->flag = VERSE_CONNECTING; - - session->vsession = vsession; - session->avatar = -1; - - session->address = (char*)MEM_mallocN(sizeof(char)*(strlen(address)+1),"session adress name"); - strcpy(session->address, address); - - session->connection = NULL; - session->host_id = NULL; - session->counter = 0; - - /* initialize dynamic list of nodes and node queue */ - TLI_dlist_init(&(session->nodes)); - session->queue.first = session->queue.last = NULL; - - /* set up all client dependent functions */ - session->post_connect_accept = post_connect_accept; - session->post_connect_terminated = post_connect_terminated; - session->post_connect_update = post_connect_update; - - return session; -} - -/* - * end verse session and free all session data - */ -void end_verse_session(VerseSession *session) -{ - verse_send_connect_terminate(session->address, "topmod: bye bye"); - verse_session_destroy(session->vsession); - free_verse_session(session); -} - -/* - * end connection to all verse hosts (servers) ... free all VerseSessions - */ -void end_all_verse_sessions(void) -{ - VerseSession *session; - - session = (VerseSession*)session_list.first; - - while(session) { - free_verse_session_data(session); - session->post_connect_terminated(session); - session = session->next; - } - - TLI_freelistN(&session_list); -} - -/* - * connect to verse host, set up all callbacks, create session - */ -void t_verse_connect(char *address) -{ - VerseSession *session; - - /* if no session was created before, then set up all callbacks */ - if((session_list.first==NULL) && (session_list.last==NULL)){ - VerseTopMod::Instance()->write("establishing first connection to verse server..."); - set_all_callbacks(); - } - - /* create new session */ - if(address) - session = create_verse_session("TopMod", "pass", address, NULL); - - if(session) { - /* add new session to the list of sessions */ - TLI_addtail(&session_list, session); - - /* add verse handler if this is first session */ - if(session_list.first == session_list.last){ - t_verse_update(); - } -/* add_screenhandler(G.curscreen, SCREEN_HANDLER_VERSE, 1);*/ - - } -} - -/*#endif*/ \ No newline at end of file diff --git a/topmodx/lang/topmod_ca.qm b/topmodx/lang/topmod_ca.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_ca.qm and /dev/null differ diff --git a/topmodx/lang/topmod_ca.ts b/topmodx/lang/topmod_ca.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_ca.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_de.qm b/topmodx/lang/topmod_de.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_de.qm and /dev/null differ diff --git a/topmodx/lang/topmod_de.ts b/topmodx/lang/topmod_de.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_de.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_en.qm b/topmodx/lang/topmod_en.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_en.qm and /dev/null differ diff --git a/topmodx/lang/topmod_en.ts b/topmodx/lang/topmod_en.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_en.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_es.qm b/topmodx/lang/topmod_es.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_es.qm and /dev/null differ diff --git a/topmodx/lang/topmod_es.ts b/topmodx/lang/topmod_es.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_es.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_fr.qm b/topmodx/lang/topmod_fr.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_fr.qm and /dev/null differ diff --git a/topmodx/lang/topmod_fr.ts b/topmodx/lang/topmod_fr.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_fr.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_hi.qm b/topmodx/lang/topmod_hi.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_hi.qm and /dev/null differ diff --git a/topmodx/lang/topmod_hi.ts b/topmodx/lang/topmod_hi.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_hi.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_it.qm b/topmodx/lang/topmod_it.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_it.qm and /dev/null differ diff --git a/topmodx/lang/topmod_it.ts b/topmodx/lang/topmod_it.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_it.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/lang/topmod_tr.qm b/topmodx/lang/topmod_tr.qm deleted file mode 100644 index 403215c..0000000 Binary files a/topmodx/lang/topmod_tr.qm and /dev/null differ diff --git a/topmodx/lang/topmod_tr.ts b/topmodx/lang/topmod_tr.ts deleted file mode 100644 index b104e64..0000000 --- a/topmodx/lang/topmod_tr.ts +++ /dev/null @@ -1,4205 +0,0 @@ - - - - BasicsMode - - - Insert Edge - - - - - Enter Insert Edge Mode - - - - - Insert Edge Mode - - - - - Delete Edge - - - - - Enter Delete Edge Mode - - - - - Delete Edge Mode - - - - - Collapse Edge - - - - - Enter Collapse Edge Mode - - - - - Collapse Edge Mode - - - - - Subdivide Edge - - - - - Enter Subdivide Edge Mode - - - - - Subdivide Edge Mode - - - - - Connect Edges - - - - - Enter Connect Edges Mode - - - - - Connect Edges Mode - - - - - Splice Corners - - - - - Enter Splice Corners Mode - - - - - Splice Corners Mode - - - - - Transforms - - - - - Enter Transforms Mode - - - - - Transforms Mode - - - - - Selection Options - - - - - Enter Selection Options Mode - - - - - Selection Options Mode - - - - - Basics - - - - - No Options for this tool. - - - - - Cleanup - - - - - # Subdivisions - - - - - X-translate - - - - - Y-translate - - - - - Z-translate - - - - - X-scale - - - - - Y-scale - - - - - Z-scale - - - - - &Freeze Transforms - - - - - Face Area Sel. -Tolerance - - - - - Valence-2 Split -Offset - - - - - CommandCompleter - - - <font color="white">Type a command:</font> - - - - - ConicalMode - - - Cut by Edge - - - - - Enter Cut by Edge Mode - - - - - Cut by Edge Mode - - - - - Cut by Vertex - - - - - Enter Cut by Vertex Mode - - - - - Cut by Vertex Mode - - - - - Cut by Face - - - - - Enter Cut by Face Mode - - - - - Cut by Face Mode - - - - - Dual Convex Hull - - - - - Enter Dual Convex Hull Mode - - - - - Dual Convex Hull Mode - - - - - Conical - - - - - Offset: - - - - - Global Cut - - - - - Perform Cutting - - - - - Cut By Edge - - - - - Cut By Vertex - - - - - Cut By Face - - - - - Create Convex Hull - - - - - Create Dual Convex Hull - - - - - Convex Hull - - - - - DLFLScriptEditor - - - &Script - - - - - &Execute File - - - - - Execute an existing Python script - - - - - &Open File - - - - - Open the input window to a Python script - - - - - &Save File - - - - - Save the input window to a Python script - - - - - Save Out&put - - - - - Save the output window to a Python script - - - - - Clear &History - - - - - Clears both output window and history - - - - - &Clear Input - - - - - Clears everythin in the input window - - - - - &Toggle Echoing - - - - - Turn on/off command echoing - - - - - load(" - - - - - ") - - - - - Exec File - - - - - Python Files (*.py);;All Files (*) - - - - - Open Python File - - - - - Save Python File - - - - - &Format - - - - - &Convert Spaces To Tabs - - - - - Convert each set of spaces into a TAB character - - - - - &Set Tab Width - - - - - Will affect conversion of spaces to Tabs - - - - - ExperimentalMode - - - Paint Bucket - - - - - Enter Paint Bucket Mode - - - - - Paint Bucket Mode - - - - - Experimental - - - - - Paint Bucket -Color: - - - - - Paint Selected Faces - - - - - Reset Materials - - - - - Paint Bucket -Color - - - - - ExtrusionsMode - - - Doo Sabin - - - - - Enter Doo Sabin Extrude Mode - - - - - Doo Sabin Extrude Mode - - - - - Cubical - - - - - Enter Cubical Extrude Mode - - - - - Cubical Extrude Mode - - - - - Dodecahedral - - - - - Enter Dodecahedral Extrude Mode - - - - - Dodecahedral Extrude Mode - - - - - Icosahedral - - - - - Enter Icosahedral Extrude Mode - - - - - Icosahedral Extrude Mode - - - - - Octahedral - - - - - Enter Octahedral Extrude Mode - - - - - Octahedral Extrude Mode - - - - - Stellate - - - - - Enter Stellate Extrude Mode - - - - - Stellate Extrude Mode - - - - - Double Stellate - - - - - Enter Double Stellate Mode - - - - - Double Stellate Mode - - - - - Dome - - - - - Enter Dome Extrude Mode - - - - - Dome Extrude Mode - - - - - Extrusion - - - - - Length - - - - - Twist - - - - - Scale - - - - - Segments - - - - - Extrude Selected Faces - - - - - Doo Sabin Extrusion - - - - - Rotation - - - - - Cubical Extrusion - - - - - Length 1 - - - - - Length 2 - - - - - Length 3 - - - - - Angle - - - - - Hexagonalize - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Mesh Flat Edges - - - - - Octahedral Extrusion - - - - - Stellate Extrusion - - - - - Double Stellate Extrusion - - - - - Height: - - - - - Twist: - - - - - Scale: - - - - - Perform Extrusion - - - - - HighgenusMode - - - Add Hole/Handle - - - - - Enter Add Hole/Handle Mode - - - - - Add Hole/Handle Mode - - - - - Add Hole/Handle CV - - - - - Enter Add Hole/Handle CV Mode - - - - - Add Hole/Handle CV Mode - - - - - Add Handle SI - - - - - Enter Add Handle (Shape Interpolation) Mode - - - - - Add Handle (Shape Interpolation) Mode - - - - - Rind Modeling Scaling - - - - - Enter Rind Modeling Scaling Mode - - - - - Rind Modeling Scaling Mode - - - - - Rind Modeling Thickness - - - - - Enter Rind Modeling Thickness Mode - - - - - Rind Modeling Thickness Mode - - - - - Wireframe Modeling - - - - - Enter Wireframe Modeling Mode - - - - - Wireframe Modeling Mode - - - - - Wireframe Modeling 2 - - - - - Enter Wireframe Modeling 2 Mode - - - - - Wireframe Modeling 2 Mode - - - - - Column Modeling - - - - - Enter Column Modeling Mode - - - - - Column Modeling Mode - - - - - Sierpinsky - - - - - Enter Sierpinsky Mode - - - - - Sierpinsky Mode - - - - - Multi-face Handle - - - - - Enter Multi-face Handle Mode - - - - - Multi-face Handle Mode - - - - - Menger Sponge - - - - - Enter Menger Sponge Mode - - - - - Menger Sponge Mode - - - - - High Genus - - - - - # Segments - - - - - Add Hole/Handle (Closest Vertex) - - - - - Weight 1 - - - - - Symmetric Weights - - - - - Weight 2 - - - - - Extra Twists - - - - - Add Handle (Shape Interpolation) - - - - - Scale - - - - - Cleanup when peeling - - - - - Create Crust - - - - - Rind Modeling (Scaling) - - - - - Thickness: - - - - - Rind Modeling (Thickness) - - - - - Split Valence-2 Vertices - - - - - Create Wireframe - - - - - Width: - - - - - Create Wireframe 2 - - - - - # Segments: - - - - - Create Columns - - - - - Create Sierpinsky -Tetrahedra - - - - - Sierpinsky Tetrahedra - - - - - Use Convex Hull -Algorithm - - - - - Scale Factor: - - - - - Extrude Dist. -Factor: - - - - - Use max offsets - - - - - Connect Selected Faces - - - - - Multi-Face Handle - - - - - Edge Collapse -Threshold Factor: - - - - - Fractional Thickness - - - - - Create Menger Sponge - - - - - # Segments to -Connect (-1=all) - - - - - MainWindow - - - newfile[*] - TopMod - - - - - Script Editor - - - - - Verse-TopMod - - - - - Tool Options - Insert Edge - - - - - Learning Movies - - - - - &New File... - - - - - Open a blank file and clear the undo list - - - - - &Open... - - - - - Open an existing file - - - - - &Save - - - - - Save the document to disk - - - - - Save &As... - - - - - Save the document under a new name - - - - - Save &Patch OBJ... - - - - - Save a bezier patch .obj file - - - - - Export LiveGrahpics3D... - - - - - Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export LG3d (Sel. Faces)... - - - - - Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, Warning: you cannot import this file back into TopMod - - - - - Export STL... - - - - - Export a stereolithography (*.stl) file for use with various rapid prototyping software and hardware - - - - - Save Viewport Screenshot... - - - - - Save a screenshot of the contents of the OpenGL viewport (*.png) - - - - - Save App Screenshot... - - - - - Save a screenshot of the entire main application window (*.png) - - - - - Load &Texture... - - - - - Load Texture from file - - - - - Print &Information - - - - - Print Information to the console - - - - - Print &Face List - - - - - Print Face List to the console - - - - - Print &Vertex List - - - - - Print &Edge List - - - - - Print Edge list to the console - - - - - Print &CV List - - - - - Print CV list to the console - - - - - E&xit - - - - - Exit the application - - - - - Quick Command - - - - - Quick Command Access with Autocompletion - - - - - &Delete Selected - - - - - Delete Selected - - - - - &Undo - - - - - Undo the last operation - - - - - &Redo - - - - - Redo the last operation - - - - - &Clear Undo List - - - - - Clear the Undo List to free up some memory - - - - - &Reset Camera - - - - - Reset Camera Position to default - - - - - Zoom In - - - - - Zoom in on the Model - - - - - Zoom Out - - - - - &Full Screen - - - - - Toggle Full Screen - - - - - Show &Vertices - - - - - Show &Face IDs - - - - - Show &Edge IDs - - - - - Show &Vertex IDs - - - - - Show &Selected IDs - - - - - Show &Silhouette - - - - - Show &Wireframe - - - - - Show &Coordinate Axes - - - - - Reverse Object - - - - - Show &Normals - - - - - Show &Face Centroids - - - - - Show &Grid - - - - - Show &Heads Up Display - - - - - Show the Heads Up Display - - - - - &Use GPU Shading - - - - - Use GPU Shading - - - - - Toggle &Antialiasing - - - - - Toggle Antialiasing - - - - - Show the script editor to execute DLFL commands - - - - - Show the verse dialog to view verse server connection status - - - - - Show the tool options window - - - - - Show the startup screen with links to video tutorials - - - - - Show/Hide the animated help window - - - - - &Wireframe Renderer - - - - - Switch the current renderer to Wireframe - - - - - &Normal Renderer - - - - - Switch the current renderer to Normal - - - - - &Lighted Renderer - - - - - Switch the current renderer to Lighted - - - - - &Textured Renderer - - - - - Switch the current renderer to Textured - - - - - Te&xtured Lighted Renderer - - - - - Switch the current renderer to Textured Lit - - - - - &Patch Renderer - - - - - Switch the current renderer to Patch - - - - - &Cube - - - - - Load a Cube - - - - - &Octahedron - - - - - Load an octahedron - - - - - &Tetrahedron - - - - - Load a tetrahedron - - - - - &Dodecahedron - - - - - Load a dodecahedron - - - - - &Icosahedron - - - - - Load an icosahedron - - - - - &Soccer ball - - - - - Load a soccer ball - - - - - &Geodesic Dome - - - - - Load a geodesic dome - - - - - Subdivide All &Edges - - - - - Planarize All &Faces - - - - - Make &Object Spherical - - - - - Cleanup 2-gons - - - - - Remove valence-2 vertices - - - - - Split valence-2 vertices - - - - - Make Object &Smooth - - - - - Perform Cutting - - - - - Cut selected faces, edges, or vertices based on the current selection mask - - - - - &Create Crust (Scaling) - - - - - Create a crust using the currently selected faces with scaling mode - - - - - Create Crust (&Thickness) - - - - - Create a crust using the currently selected faces with thickness mode - - - - - Create Wireframe - - - - - Create a wireframe model using the current options - - - - - Create Columns - - - - - Create a column model using the current options - - - - - Create Sierpinski - - - - - Create a sierpinski tetrahedra - - - - - Compute &Lighting - - - - - Compute &Normals and Lighting - - - - - Assign &Texture Coordinates - - - - - Selection Window - - - - - Select &Vertex - - - - - Select a Vertex - - - - - Select Multiple Vertices - - - - - Select multiple vertices - - - - - Select Multiple - - - - - Select multiple - - - - - Edit Verte&x - - - - - Select and Move Vertices one at a time. - - - - - Select &Face - - - - - Select One Face. Just for practice. :) - - - - - Select Face Loo&p - - - - - Select a Face Loop. - - - - - Select &Multiple Faces - - - - - Select &Similar Faces - - - - - Select Similar - - - - - Select Faces By Surf. Area - - - - - C&heckerboard Select Faces - - - - - Select &All - - - - - Grow Selection - - - - - Shrink Selection - - - - - Select &Inverse - - - - - Select &Edge - - - - - Select one Edge - - - - - Select Multiple Edges - - - - - Select multiple edges - - - - - Collapse Selected Edges - - - - - Select Edge &Loop - - - - - Select an Edge Loop - - - - - Select Edge &Ring - - - - - Select an edge ring. - - - - - Select &Corner - - - - - Select a Corner - - - - - E&xit Selection Mode - - - - - &Clear Selected - - - - - Select Edges from Faces - - - - - Select Edges from Vertices - - - - - Select Faces from Edges - - - - - Select Faces from Vertices - - - - - Select Vertices from Edges - - - - - Select Vertices from Faces - - - - - Select &Vertices - - - - - Select by Component type: Vertices - - - - - Select &Edges - - - - - Select by Component type: Edges - - - - - Select &Faces - - - - - Select by Component type: Faces - - - - - Select by Component type: Corners - - - - - &Preferences - - - - - Open the Preferences Dialog - - - - - English - - - - - Spanish - - - - - German - - - - - French - - - - - Italian - - - - - Turkish - - - - - Catalan - - - - - Hindi - - - - - Connect to localhost... - - - - - Connect to localhost - - - - - Connect to host... - - - - - Disconnect session - - - - - Disconnect Verse Session - - - - - Disconnect All Sessions - - - - - Start Verse Server - - - - - Disconnect All Nodes - - - - - Kill Verse Server - - - - - Kill the Local Verse server process - - - - - Subdivide Selected Faces - - - - - Subdivide all Selected Faces - - - - - Subdivide Selected Edges - - - - - Subdivide all Selected Edges - - - - - Perform Remeshing - - - - - Perform the current remeshing scheme - - - - - Perform Extrusion - - - - - Perform the current extrusion operator on the selected faces - - - - - Extrude Multiple Faces - - - - - Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces - - - - - &Online User Manual - - - - - View the User Manual on the TopMod Wiki - - - - - &TopMod Video Tutorials on blip.tv - - - - - Go to http://topmod.blip.tv - - - - - &TopMod on the Web - - - - - Go to the TopMod web page - - - - - &TopMod Research Papers - - - - - Go to the TopMod Research web page - - - - - &Check for Updates - - - - - Check for updates to TopMod Online - - - - - &About TopMod - - - - - About TopMod - - - - - About &Qt - - - - - About Qt - - - - - Hide All ToolBars - - - - - Show All ToolBars - - - - - &File - - - - - &New - - - - - &Export - - - - - &Verse - - - - - &Edit - - - - - &Display - - - - - &Renderer - - - - - Special Mode?? - - - - - &Show IDs - - - - - &Primitives - - - - - &Selection - - - - - &Tools - - - - - &Object - - - - - Selection &Masks - - - - - &Window - - - - - &Help - - - - - &Language - - - - - Edit - - - - - Selection Masks - - - - - Primitives - - - - - Tools - - - - - Extrusion Tools - - - - - Conical Tools - - - - - High Genus Tools - - - - - Texturing Tools - - - - - Remeshing Tools - - - - - Navigation Basics - - - - - Interface Basics - - - - - Basic Operations - - - - - Extrusion Operations - - - - - Remeshing Operations - - - - - High genus Operations - - - - - Texturing Operations - - - - - Show this dialog at startup - - - - - Quicktime 7.2 or greater recommended. - - - - - <h5>Quicktime 7.2 or greater recommended.<br /><a href="http://apple.com/quicktime/">Download now.</a></h5> - - - - - Tool Options - - - - - - Welcome to TopMod - - - - - TopMod - - - - - The document has been modified. -Do you want to save your changes? - - - - - File loaded - - - - - File saved - - - - - Normal Mode - - - - - Select Vertex - - - - - Select Edge - - - - - Select Face - - - - - Select Corner - - - - - Multi-Select Vertex - - - - - Multi-Select Edge - - - - - Multi-Select Face - - - - - Multi-Select Corner - - - - - Select Checkerboard - - - - - Insert Edge - - - - - Delete Edge - - - - - Subdivide Edge - - - - - Collapse Edge - - - - - Splice Corners - - - - - Connect Edges - - - - - Cubical Extrusion - - - - - Doo Sabin Extrusion - - - - - Dual Extrusion - - - - - Dodecahedral Extrusion - - - - - Icosahedral Extrusion - - - - - Stellate Face - - - - - Double Stellate Face - - - - - Dome Extrusion - - - - - Connect Corners - - - - - Connect Faces - - - - - Bezier Connect Faces - - - - - Hermite Connect Faces - - - - - Reorder Face - - - - - Subdivide Face - - - - - Crust Modeling - - - - - Cut Edge - - - - - Cut Vertex - - - - - Cut Edge and Vertex - - - - - Cut Face - - - - - Truncate Edge - - - - - Mark Edge - - - - - Mark Vertex - - - - - Convex Hull Mode - - - - - Edit Vertex - - - - - Select Edge Loop - - - - - Select Edge Ring - - - - - Select Face Loop - - - - - - - - - - - Vertices - - - - - Edges - - - - - Faces - - - - - Corners - - - - - None - - - - - Dual - - - - - Root-3 - - - - - Dual Vertex Truncation - - - - - Global Stellate - - - - - Star - - - - - Generic 12.6.4 - - - - - Honeycomb - - - - - Vertex Truncation - - - - - Dual Generic 12.6.4 - - - - - Linear Vertex Truncation - - - - - Catmull-Clark - - - - - Modified Stellate - - - - - Doo Sabin - - - - - Corner Cutting - - - - - Modified Corner Cutting - - - - - Simplest - - - - - Pentagonal - - - - - Cubic Pentagonal - - - - - Dual Pentagonal - - - - - Loop Style - - - - - Loop - - - - - Root4 - - - - - Dual Loop - - - - - Global Cubic Extrude - - - - - Checkerboard - - - - - Dual Global Cubic Extrude - - - - - Dual Checkerboard - - - - - Pentagon Preserving - - - - - Dual Pentagon Preserving - - - - - Hexagon Preserving - - - - - Dual Hexagon Preserving - - - - - Fractal - - - - - Modified Double Stellate - - - - - Dome - - - - - Doo Sabin BC - - - - - Doo Sabin BC New - - - - - Open File... - - - - - All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*) - - - - - Saving File... - - - - - Save File As... - - - - - Save Bezier Patch (OBJ)... - - - - - Wavefront OBJ Files (*.obj);;All Files (*) - - - - - Export to LiveGraphics3D (M)... - - - - - Mathematica Graphics3D Files (*.m);;All Files (*) - - - - - Export Selected Faces to LiveGraphics3D (M)... - - - - - STL Files (*.stl);;All Files (*) - - - - - /untitled. - - - - - Save Viewport Screenshot As - - - - - %1 Files (*.%2);;All Files (*) - - - - - Save App Screenshot As - - - - - %1[*] - %2 - - - - - cube.obj - - - - - octahedron.obj - - - - - tetrahedron.obj - - - - - dodecahedron.obj - - - - - icosahedron.obj - - - - - soccerball.obj - - - - - geodesic.obj - - - - - Select and Move Vertices One at a time. - - - - - Select an Edge Ring. - - - - - All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*) - - - - - TopMod Error - - - - - No movie loaded - - - - - TopMod Animated Help - - - - - &Colorable Renderer - - - - - Switch the current renderer to Colorable - - - - - Select Faces By Color - - - - - Paint Selected Faces - - - - - Paint all Selected Faces - - - - - Clear Materials - - - - - Experimental Tools - - - - - QShortcut - - - Shift - - - - - Ctrl - - - - - Alt - - - - - Meta - - - - - RemeshingMode - - - Dual - - - - - Enter Dual Remeshing Mode - - - - - Dual Remeshing Mode - - - - - Root-3 - - - - - Enter Root-3 Remeshing Mode - - - - - Root-3 Remeshing Mode - - - - - Triangulate - - - - - Enter Triangulate Remeshing Mode - - - - - Triangulate Remeshing Mode - - - - - Dual Vertex Truncation - - - - - Enter Dual Vertex Truncation Remeshing Mode - - - - - Dual Vertex Truncation Remeshing Mode - - - - - Stellate - - - - - Enter Stellate Remeshing Mode - - - - - Stellate Remeshing Mode - - - - - Double Stellate - - - - - Enter Double Stellate Remeshing Mode - - - - - Double Stellate Remeshing Mode - - - - - 12.6.4 - - - - - Enter 12.6.4 Remeshing Mode - - - - - 12.6.4 Remeshing Mode - - - - - Honeycomb - - - - - Enter Honeycomb Remeshing Mode - - - - - Honeycomb Remeshing Mode - - - - - Vertex Truncation - - - - - Enter Vertex Truncation Remeshing Mode - - - - - Vertex Truncation Remeshing Mode - - - - - Dual 12.6.4 - - - - - Enter Dual 12.6.4 Remeshing Mode - - - - - Dual 12.6.4 Remeshing Mode - - - - - Linear Vertex Insertion - - - - - Enter Linear Vertex Insertion Remeshing Mode - - - - - Linear Vertex Insertion Remeshing Mode - - - - - Catmull Clark - - - - - Enter Catmull Clark Remeshing Mode - - - - - Catmull Clark Remeshing Mode - - - - - Stellate with Edge Removal - - - - - Enter Stellate with Edge Removal Remeshing Mode - - - - - Stellate with Edge Removal Remeshing Mode - - - - - Doo Sabin - - - - - Enter Doo Sabin Remeshing Mode - - - - - Doo Sabin Remeshing Mode - - - - - Corner Cutting - - - - - Enter Corner Cutting Remeshing Mode - - - - - Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting - - - - - Enter Modified Corner Cutting Remeshing Mode - - - - - Modified Corner Cutting Remeshing Mode - - - - - Simplest - - - - - Enter Simplest Remeshing Mode - - - - - Simplest Remeshing Mode - - - - - Pentagonalization - - - - - Enter Pentagonalization Remeshing Mode - - - - - Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization - - - - - Enter Cubic Pentagonalization Remeshing Mode - - - - - Cubic Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization - - - - - Enter Dual Pentagonalization Remeshing Mode - - - - - Dual Pentagonalization Remeshing Mode - - - - - Loop Style Remeshing - - - - - Enter Loop Style Remeshing Remeshing Mode - - - - - Loop Style Remeshing Remeshing Mode - - - - - Loop Subdivision - - - - - Enter Loop Subdivision Remeshing Mode - - - - - Loop Subdivision Remeshing Mode - - - - - Dual Loop Style Remeshing - - - - - Enter Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Style Remeshing Remeshing Mode - - - - - Dual Loop Subdivision - - - - - Enter Dual Loop Subdivision Remeshing Mode - - - - - Dual Loop Subdivision Remeshing Mode - - - - - Global Extrude - - - - - Enter Global Extrude Remeshing Mode - - - - - Global Extrude Remeshing Mode - - - - - Checkerboard - - - - - Enter Checkerboard Remeshing Mode - - - - - Checkerboard Remeshing Mode - - - - - Dual Global Extrude - - - - - Enter Dual Global Extrude Remeshing Mode - - - - - Dual Global Extrude Remeshing Mode - - - - - Dual Checkerboard - - - - - Enter Dual Checkerboard Remeshing Mode - - - - - Dual Checkerboard Remeshing Mode - - - - - Pentagon Preserving - - - - - Enter Pentagon Preserving Remeshing Mode - - - - - Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving - - - - - Enter Dual Pentagon Preserving Remeshing Mode - - - - - Dual Pentagon Preserving Remeshing Mode - - - - - Dual Loop Style - - - - - Loop Style - - - - - Fractal - - - - - Enter Fractal Remeshing Mode - - - - - Fractal Remeshing Mode - - - - - Doo Sabin BC - - - - - Enter Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC Remeshing Mode - - - - - Doo Sabin BC New - - - - - Enter Doo Sabin BC New Remeshing Mode - - - - - Doo Sabin BC New Remeshing Mode - - - - - Dome - - - - - Enter Dome Remeshing Mode - - - - - Dome Remeshing Mode - - - - - Subdivide Face - - - - - Enter Subdivide Face Remeshing Mode - - - - - Subdivide Face Remeshing Mode - - - - - Remeshing - - - - - 3-Conversion - - - - - 4-Conversion - - - - - 5-Conversion - - - - - 3-Preservation - - - - - 4-Preservation - - - - - 5-Preservation - - - - - 6-Preservation - - - - - Miscellaneous - - - - - Use Faster Method - - - - - Create Dual - - - - - Dual Remeshing - - - - - Perform Remeshing - - - - - Root-3 Remeshing - - - - - Triangulate Remeshing - - - - - Stellation Remeshing - - - - - Offset: - - - - - Double Stellation Remeshing - - - - - Honeycomb Remeshing - - - - - Vertex Truncation Remeshing - - - - - Dual 12.6.4 Remeshing - - - - - Linear Vertex Insertion Remeshing - - - - - Catmull-Clark Remeshing - - - - - Stellate with Edge Removal Remeshing - - - - - Check for multiple edges - - - - - Doo Sabin Remeshing - - - - - Alpha: - - - - - Corner Cutting Remeshing - - - - - Thickness: - - - - - Modified Corner Cutting Remeshing - - - - - Simplest Remeshing Scheme - - - - - Pentagonalization Remeshing - - - - - Cubic Pentagonalization Remeshing - - - - - Dual Pentagonalization Remeshing - - - - - Length: - - - - - Loop Subdivision Remeshing - - - - - Twist: - - - - - Weight: - - - - - Dual Loop Subdivision Remeshing - - - - - Global Extrude Remeshing - - - - - Checkerboard Remeshing - - - - - Dual Global Extrude Remeshing - - - - - Dual Checkerboard Remeshing - - - - - Scale Factor: - - - - - Pentagon Preserving Remeshing - - - - - Dual Pentagon Preserving Remeshing - - - - - Dual Loop Style Six Remeshing - - - - - Loop Style Six Remeshing - - - - - Multiplier: - - - - - Fractal Remeshing - - - - - Height: - - - - - Curve: - - - - - Double Stellate (Misc.) - - - - - Doo Sabin BC Remeshing - - - - - Scale: - - - - - Doo Sabin BC New Remeshing - - - - - Dome Remeshing - - - - - Use Quads (off -> triangles) - - - - - Subdivide Selected Faces - - - - - ShortcutDialog - - - Set shortcuts - - - - - Action - - - - - Shortcut - - - - - ShortcutGetter - - - Shortcut getter - - - - - Press the key combination -you want to assign. - - - - - OK - - - - - Cancel - - - - - StyleSheetEditor - - - Style Editor - - - - - Default - - - - - Modo - - - - - Style: - - - - - &Apply - - - - - Style Sheet: - - - - - TexturingMode - - - Tile Texturing - - - - - Enter Tile Texturing Mode - - - - - Tile Texturing Mode - - - - - Texturing - - - - - Tiling Number - - - - - Assign Texture -Coordinates - - - - - TopModPreferences - - - TopMod Preferences - - - - - OK - - - - - Cancel - - - - - Main - - - - - Colors - - - - - Shortcuts - - - - - Stylesheets - - - - - Script Editor - - - - - Near Plane: - - - - - Far Plane: - - - - - Field of View: - - - - - Auto Save: - - - - - Auto Save Delay -(in minutes): - - - - - Incremental Save: - - - - - Max Incremental Saves: - - - - - Default Save Directory - - - - - Command Completer -Single Word Completion - - - - - Single Click Extrusions - - - - - Viewport Background: - - - - - Object Render Color: - - - - - Cool Light Color: - - - - - Warm Light Color: - - - - - Wireframe Color: - - - - - Silhouette Color: - - - - - Patch Boundary Color: - - - - - Selected Vertex Color: - - - - - Selected Edge Color: - - - - - Selected Face Color: - - - - - Vertex ID Bg Color: - - - - - Face ID Bg Color: - - - - - Edge ID Bg Color: - - - - - Normal Color: - - - - - Face Centroid Color: - - - - - Light Intensity: - - - - - Wireframe Thickness: - - - - - Vertex Size: - - - - - Silhouette Thickness: - - - - - Selected Vertex Size: - - - - - Selected Edge Thickness: - - - - - Normal Thickness: - - - - - Normal Length: - - - - - Face Centroid Thickness: - - - - - Reset - - - - - VerseTopMod - - - Connecting to localhost! - - - - - Connect to Verse Server - - - - - Server Address: - - - - - localhost - - - - - Connecting to %1! - - - - - Disconnecting session %1! - - - - - Disconnecting all sessions! - - - - diff --git a/topmodx/makeall.bat b/topmodx/makeall.bat deleted file mode 100644 index 8608737..0000000 --- a/topmodx/makeall.bat +++ /dev/null @@ -1,10 +0,0 @@ -rem run in the cmd prompt or powershell by typing .\makeall.bat -@echo on -cd include -qmake -mingw32-make -cd .. -qmake -lupdate topmod.pro -lrelease topmod.pro -mingw32-make \ No newline at end of file diff --git a/topmodx/makeall.sh b/topmodx/makeall.sh deleted file mode 100644 index 16b5de2..0000000 --- a/topmodx/makeall.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# build libraries -cd include && qmake && make - -# python stuff for pydlfl library -# only works on OS/X and maybe linux for now -cd pydlfl -make -python dlfl_setup.py install - -# go back up 2 directory levels -cd ../../ - -# i18n stuff -lupdate topmod.pro -lrelease topmod.pro - -# build main project -qmake && make diff --git a/topmodx/makedmg.sh b/topmodx/makedmg.sh deleted file mode 100644 index b1938cd..0000000 --- a/topmodx/makedmg.sh +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/sh -# Copyright 2006 David Johnson -# The author grants unlimited permission to -# copy, distribute and modify this script - -APPNAME=TopMod - -### get system configuration ######################################## - -# as long as we can find qmake, we don't need QTDIR -FWPATH=`qmake -query QT_INSTALL_LIBS` -if [ ! -d $FWPATH/QtGui.framework ] ; then - echo "ERROR: cannot find the Qt frameworks. Make sure Qt is installed" - echo "and qmake is in your environment path." - exit -fi - -### get required user input ######################################### - -if [ -z $APPNAME ] ; then - echo - echo "This script prepares a Qt application bundle for deployment. It will" - echo "copy over the required Qt frameworks and sets the installation" - echo "identifications. Please see the \"Deploying an Application on Qt/Mac\"" - echo "page in the Qt documentation for more information." - echo - echo "This script assumes you have already built the application bundle." - echo - echo -n "What is the name of the application? " - read userinput - APPNAME=$userinput -fi - -BUNDLE=$APPNAME.app - -if [ ! -d $BUNDLE ] ; then - echo "ERROR: cannot find application bundle \"$BUNDLE\" in current directory" - exit -fi - -if [ ! -x $BUNDLE/Contents/MacOS/$APPNAME ] ; then - echo "ERROR: cannot find application in bundle. Did you forget to run make?" - exit -fi - -echo "application: $APPNAME" -echo "bundle: $BUNDLE" - -### query binary for frameworks ##################################### - -for n in `otool -L $BUNDLE/Contents/MacOS/$APPNAME | grep Qt` ; do - path=`echo $n | grep Qt` - if [ $path ] ; then - name=`basename $path` - FRAMEWORKS="$FRAMEWORKS $name" - # sanity check - if [ "$path" != "$FWPATH/$name.framework/Versions/4/$name" ] ; then - echo "ERROR: problem with framework paths. Perhaps this script has already been run?" - exit - fi - fi -done - -echo -n "Using frameworks" -for n in $FRAMEWORKS ; do - echo -n " $n" -done -echo - -### make install #################################################### - -# assumes install target populates the application bundle -echo "Running make install" -if [ -e Makefile.Release ] ; then - make -f Makefile.Release install -else - make install -fi -strip $BUNDLE/Contents/MacOS/$APPNAME - -### copy over frameworks ############################################ - -mkdir -p $BUNDLE/Contents/Frameworks -for framework in $FRAMEWORKS ; do - if [ ! -d $FWPATH/$framework.framework ] ; then - echo "ERROR: cannot find $FWPATH/$framework.framework" - exit - fi - echo "Copying $framework framework" - cp -fR $FWPATH/$framework.framework $BUNDLE/Contents/Frameworks - # strip libs (-x is max allowable for shared libs) - strip -x $BUNDLE/Contents/Frameworks/$framework.framework/Versions/4/$framework -done - -# copy over the 3dx framework -# cp -fR /Library/Frameworks/3DconnexionClient.framework $BUNDLE/Contents/Frameworks - -# remove unwanted parts -find $BUNDLE/Contents/Frameworks | egrep "debug|Headers" | xargs rm -rf - -### set the identification names for frameworks ##################### - -echo -n "Setting framework IDs..." - -for framework in $FRAMEWORKS ; do - echo -n " $framework" - install_name_tool \ - -id @executable_path/../Frameworks/$framework.framework/Versions/4/$framework \ - $BUNDLE/Contents/Frameworks/$framework.framework/Versions/4/$framework -done -echo - -# 3Dx framework -# framework="3DconnexionClient" -# install_name_tool \ - # -id @executable_path/../Frameworks/$framework.framework/Versions/A/$framework \ - # $BUNDLE/Contents/Frameworks/$framework.framework/Versions/A/$framework - -### change framework location ####################################### - -echo -n "Changing framework paths..." -for framework in $FRAMEWORKS ; do - echo -n " $framework" - install_name_tool \ - -change $FWPATH/$framework.framework/Versions/4/$framework \ - @executable_path/../Frameworks/$framework.framework/Versions/4/$framework \ - $BUNDLE/Contents/MacOS/$APPNAME -done -echo - -# 3Dx framework -# framework="3DconnexionClient" -# install_name_tool \ -# -change /Library/Frameworks/$framework.framework/Versions/A/$framework \ - # @executable_path/../Frameworks/$framework.framework/Versions/A/$framework \ - # $BUNDLE/Contents/MacOS/$APPNAME - -### change location for bundled frameworks ######################### - -echo -n "Fixing bundled frameworks..." -for framework in $FRAMEWORKS ; do - echo -n " $framework" - fwdeps="" - bundledfw="$BUNDLE/Contents/Frameworks/$framework.framework/Versions/4/$framework" - # get framework dependencies - for n in `otool -LX $bundledfw | grep Qt` ; do - path=`echo $n | grep Qt` - if [ $path ] ; then - name=`basename $path` - fwdeps="$fwdeps $name" - fi - done - # fix dependency location - for dep in $fwdeps ; do - if [ "$dep" != "$framework" ] ; then - install_name_tool \ - -change $FWPATH/$dep.framework/Versions/4/$dep \ - @executable_path/../Frameworks/$dep.framework/Versions/4/$dep \ - $bundledfw - fi - done -done -# echo - -# 3Dx framework -# framework="3DconnexionClient" -# echo -n " $framework" -# fwdeps="" -# bundledfw="$BUNDLE/Contents/Frameworks/$framework.framework/Versions/A/$framework" -# # get framework dependencies -# for n in `otool -LX $bundledfw | grep 3DConnexion` ; do -# path=`echo $n | grep 3DConnexion` -# if [ $path ] ; then -# name=`basename $path` -# fwdeps="$fwdeps $name" -# fi -# done -# # fix dependency location -# for dep in $fwdeps ; do -# if [ "$dep" != "$framework" ] ; then -# install_name_tool \ -# -change $FWPATH/$dep.framework/Versions/4/$dep \ -# @executable_path/../Frameworks/$dep.framework/Versions/4/$dep \ -# $bundledfw -# fi -# done - -### create disk image ############################################### - -# echo "Creating disk image" -# imagedir="/tmp/$APPNAME.$$" -# mkdir $imagedir -# cp -R $BUNDLE $imagedir -# -# # \todo copy over additional files, if any -# hdiutil create -ov -srcfolder $imagedir -format UDBZ -volname "$APPNAME" "$APPNAME.dmg" -# rm -rf $imagedir - -echo "Done" \ No newline at end of file diff --git a/topmodx/objs/beveledcube.obj b/topmodx/objs/beveledcube.obj deleted file mode 100644 index 0c64e2c..0000000 --- a/topmodx/objs/beveledcube.obj +++ /dev/null @@ -1,57 +0,0 @@ -# Blender OBJ File: cube.obj -# www.blender.org -mtllib beveledcube.mtl -o Cube_Cube -v 0.916796 1.000000 0.916796 -v 0.916796 1.000000 -0.916796 -v -0.916796 1.000000 -0.916796 -v -0.916795 1.000000 0.916796 -v 0.916796 -1.000000 0.916795 -v -0.916796 -1.000000 0.916796 -v -0.916796 -1.000000 -0.916795 -v 0.916795 -1.000000 -0.916796 -v 1.000000 0.916796 0.916796 -v 1.000000 -0.916796 0.916795 -v 0.999999 -0.916796 -0.916796 -v 1.000000 0.916796 -0.916796 -v 0.916796 0.916796 -1.000000 -v 0.916795 -0.916796 -1.000001 -v -0.916796 -0.916796 -1.000000 -v -0.916796 0.916796 -1.000000 -v -1.000000 0.916796 -0.916796 -v -1.000000 -0.916796 -0.916795 -v -1.000000 -0.916796 0.916796 -v -1.000000 0.916796 0.916796 -v 0.916796 -0.916796 1.000000 -v 0.916796 0.916796 1.000000 -v -0.916795 0.916796 1.000000 -v -0.916796 -0.916796 1.000000 -usemtl (null) -s off -f 1 2 3 4 -f 5 6 7 8 -f 9 10 11 12 -f 13 14 15 16 -f 17 18 19 20 -f 21 22 23 24 -f 2 1 9 12 -f 2 13 16 3 -f 3 17 20 4 -f 22 1 4 23 -f 5 21 24 6 -f 6 19 18 7 -f 7 8 14 15 -f 5 10 11 8 -f 9 22 21 10 -f 11 12 13 14 -f 15 18 17 16 -f 19 24 23 20 -f 1 22 9 -f 2 12 13 -f 3 16 17 -f 4 20 23 -f 5 10 21 -f 6 24 19 -f 7 18 15 -f 8 11 14 -1 14 diff --git a/topmodx/objs/buckminister.obj b/topmodx/objs/buckminister.obj deleted file mode 100644 index 75d3088..0000000 --- a/topmodx/objs/buckminister.obj +++ /dev/null @@ -1,816 +0,0 @@ -v 0.469893 0.416552 -0.778258 -v 0.125638 -0.740079 0.66068 -v 0.898002 -0.276142 -0.342546 -v 0.640559 -0.692695 0.331449 -v 0.501886 0.684956 0.528154 -v 0.632419 0.253481 0.731979 -v 0.523496 0.295086 -0.799297 -v 0.660871 -0.747474 0.0673183 -v -0.914352 0.337332 0.223979 -v 0.342546 -0.898002 0.276142 -v 0.443132 -0.828367 0.342698 -v 0.416552 -0.778258 0.469893 -v 0.295086 -0.799297 0.523496 -v 0.203286 -0.865717 0.457394 -v 0.223979 -0.914352 0.337332 -v 0.778258 0.469893 0.416552 -v 0.828367 0.342698 0.443132 -v 0.898002 0.276142 0.342546 -v 0.914352 0.337332 0.223979 -v 0.865717 0.457394 0.203286 -v 0.799297 0.523496 0.295086 -v -0.469893 0.416552 -0.778258 -v -0.342698 0.443132 -0.828367 -v -0.276142 0.342546 -0.898002 -v -0.337332 0.223979 -0.914352 -v -0.457394 0.203286 -0.865717 -v -0.523496 0.295086 -0.799297 -v 0.125638 0.740079 0.66068 -v 0.0673183 0.660871 0.747474 -v 0.137699 0.566553 0.812439 -v 0.27387 0.554497 0.78583 -v 0.997629 0.0688268 2.26384e-17 -v 0.983105 0.138444 -0.119744 -v 0.955957 0.270014 -0.115055 -v 0.828367 -0.342698 0.443132 -v 0.778258 -0.469893 0.416552 -v 0.799297 -0.523496 0.295086 -v 0.865717 -0.457394 0.203286 -v 0.914352 -0.337332 0.223979 -v 0.898002 -0.276142 0.342546 -v 0.968292 0.069706 -0.239899 -v 0.968292 -0.069706 -0.239899 -v 0.924855 -0.139989 -0.35362 -v 0.881774 -0.0702829 -0.466406 -v 0.881774 0.0702829 -0.466406 -v 0.924855 0.139989 -0.35362 -v 0.501886 -0.684956 -0.528154 -v 0.458448 -0.614672 -0.641875 -v 0.528154 -0.501886 -0.684956 -v 0.641875 -0.458448 -0.614672 -v 0.684956 -0.528154 -0.501886 -v 0.614672 -0.641875 -0.458448 -v 0.239899 0.968292 -0.069706 -v 0.239899 0.968292 0.069706 -v 0.35362 0.924855 0.139989 -v 0.466406 0.881774 0.0702829 -v 0.466406 0.881774 -0.0702829 -v 0.35362 0.924855 -0.139989 -v 0.497133 -0.0941308 0.862553 -v 0.591263 -0.058176 0.804378 -v 0.438957 -1.31131e-17 0.898508 -v 0.331756 -1.31771e-17 0.943365 -v 0.270014 0.115055 0.955957 -v 0.138444 0.119744 0.983105 -v 0.0688268 -1.32413e-17 0.997629 -v 0.138444 -0.119744 0.983105 -v 0.069706 0.239899 0.968292 -v -0.069706 0.239899 0.968292 -v 0.058176 0.804378 0.591263 -v 0.0941308 0.862553 0.497133 -v -1.22142e-17 0.898508 0.438957 -v -0.0941308 0.862553 0.497133 -v -0.497133 0.0941308 0.862553 -v -0.591263 0.058176 0.804378 -v -0.591263 -0.058176 0.804378 -v -0.497133 -0.0941308 0.862553 -v -0.438957 -1.31131e-17 0.898508 -v -0.058176 -0.804378 0.591263 -v -0.0941308 -0.862553 0.497133 -v 0.457394 -0.203286 0.865717 -v 0.591263 -0.058176 -0.804378 -v 0.497133 -0.0941308 -0.862553 -v 0.438957 -1.31131e-17 -0.898508 -v 0.139989 -0.35362 -0.924855 -v 0.0702829 -0.466406 -0.881774 -v -0.0702829 -0.466406 -0.881774 -v -0.139989 -0.35362 -0.924855 -v -0.069706 -0.239899 -0.968292 -v 0.069706 -0.239899 -0.968292 -v 0.058176 -0.804378 -0.591263 -v 0.0941308 -0.862553 -0.497133 -v -1.22142e-17 -0.898508 -0.438957 -v -0.0941308 -0.862553 -0.497133 -v -0.058176 -0.804378 -0.591263 -v -0.497133 0.0941308 -0.862553 -v -0.438957 -1.31131e-17 -0.898508 -v -0.497133 -0.0941308 -0.862553 -v -0.591263 -0.058176 -0.804378 -v -0.058176 0.804378 -0.591263 -v -0.0941308 0.862553 -0.497133 -v -1.22142e-17 0.898508 -0.438957 -v 0.0941308 0.862553 -0.497133 -v 0.058176 0.804378 -0.591263 -v 0.862553 -0.497133 0.0941308 -v 0.898508 -0.438957 2.24192e-17 -v 0.862553 0.497133 0.0941308 -v -0.804378 0.591263 0.058176 -v -0.804378 0.591263 -0.058176 -v -0.862553 0.497133 -0.0941308 -v -0.66068 0.125638 0.740079 -v -0.632419 0.253481 0.731979 -v -0.692695 0.331449 0.640559 -v -0.78583 0.27387 0.554497 -v -0.812439 0.137699 0.566553 -v -0.804378 -0.591263 -0.058176 -v -0.804378 -0.591263 0.058176 -v -0.862553 -0.497133 0.0941308 -v -0.898508 -0.438957 2.24192e-17 -v -0.862553 -0.497133 -0.0941308 -v -0.828367 -0.342698 -0.443132 -v -0.778258 -0.469893 -0.416552 -v -0.898002 -0.276142 -0.342546 -v 0.069706 -0.239899 0.968292 -v -0.069706 -0.239899 0.968292 -v -0.139989 -0.35362 0.924855 -v -0.0702829 -0.466406 0.881774 -v 0.0702829 -0.466406 0.881774 -v -0.641875 0.458448 0.614672 -v -0.528154 0.501886 0.684956 -v -0.458448 0.614672 0.641875 -v -0.501886 0.684956 0.528154 -v -0.614672 0.641875 0.458448 -v -0.684956 0.528154 0.501886 -v 0.528154 -0.501886 0.684956 -v -0.458448 -0.614672 0.641875 -v -0.528154 -0.501886 0.684956 -v -0.641875 -0.458448 0.614672 -v -0.684956 -0.528154 0.501886 -v -0.614672 -0.641875 0.458448 -v -0.501886 -0.684956 0.528154 -v -0.924855 -0.139989 -0.35362 -v -0.968292 -0.069706 -0.239899 -v -0.968292 0.069706 -0.239899 -v -0.924855 0.139989 -0.35362 -v -0.881774 0.0702829 -0.466406 -v 0.501886 0.684956 -0.528154 -v 0.614672 0.641875 -0.458448 -v 0.684956 0.528154 -0.501886 -v 0.458448 0.614672 -0.641875 -v 0.924855 0.139989 0.35362 -v 0.881774 0.0702829 0.466406 -v -0.466406 0.881774 0.0702829 -v -0.35362 0.924855 0.139989 -v -0.239899 0.968292 0.069706 -v -0.239899 0.968292 -0.069706 -v -0.35362 0.924855 -0.139989 -v -0.466406 0.881774 -0.0702829 -v 0.0702829 0.466406 -0.881774 -v 0.139989 0.35362 -0.924855 -v 0.069706 0.239899 -0.968292 -v -0.528154 0.501886 -0.684956 -v -0.641875 0.458448 -0.614672 -v -0.684956 0.528154 -0.501886 -v -0.614672 0.641875 -0.458448 -v -0.501886 0.684956 -0.528154 -v -0.458448 0.614672 -0.641875 -v 0.35362 -0.924855 -0.139989 -v 0.239899 -0.968292 -0.069706 -v -0.239899 -0.968292 -0.069706 -v -0.239899 -0.968292 0.069706 -v -0.35362 -0.924855 0.139989 -v -0.466406 -0.881774 0.0702829 -v -0.466406 -0.881774 -0.0702829 -v -0.35362 -0.924855 -0.139989 -v -0.684956 -0.528154 -0.501886 -v -0.641875 -0.458448 -0.614672 -v -0.528154 -0.501886 -0.684956 -v -0.458448 -0.614672 -0.641875 -v -0.501886 -0.684956 -0.528154 -v -0.614672 -0.641875 -0.458448 -v -0.968292 -0.069706 0.239899 -v -0.924855 -0.139989 0.35362 -v 0.342698 0.443132 0.828367 -v 0.203286 0.865717 0.457394 -v -0.469893 0.416552 0.778258 -v -0.523496 0.295086 0.799297 -v -0.457394 0.203286 0.865717 -v -0.342698 0.443132 0.828367 -v -0.331449 0.640559 0.692695 -v -0.27387 0.554497 0.78583 -v -0.119744 0.983105 0.138444 -v -0.138444 -0.119744 0.983105 -v -0.0688268 -1.32413e-17 0.997629 -v -0.138444 0.119744 0.983105 -v -0.137699 -0.566553 0.812439 -v 0.138444 0.119744 -0.983105 -v 0.983105 -0.138444 -0.119744 -v 0.997629 -0.0688268 2.26384e-17 -v 0.692695 -0.331449 -0.640559 -v 0.276142 -0.342546 -0.898002 -v 0.125638 -0.740079 -0.66068 -v -0.331449 -0.640559 -0.692695 -v 0.203286 -0.865717 -0.457394 -v -0.119744 -0.983105 -0.138444 -v -0.331756 -1.39741e-17 -0.943365 -v -0.270014 0.115055 -0.955957 -v -0.457394 -0.203286 -0.865717 -v -1.22738e-17 0.943365 -0.331756 -v 0.137699 0.566553 -0.812439 -v -0.125638 0.740079 -0.66068 -v 0.416552 0.778258 -0.469893 -v 0.865717 -0.457394 -0.203286 -v 0.66068 -0.125638 0.740079 -v 0.812439 0.137699 -0.566553 -v 0.566553 0.812439 0.137699 -v 0.640559 0.692695 -0.331449 -v 0.778258 0.469893 -0.416552 -v -0.416552 0.778258 0.469893 -v -0.640559 0.692695 0.331449 -v -0.342546 0.898002 -0.276142 -v -0.740079 0.66068 -0.125638 -v -0.66068 -0.125638 -0.740079 -v -0.119744 -0.983105 0.138444 -v -0.692695 0.331449 -0.640559 -v -0.632419 0.253481 -0.731979 -v -0.416552 -0.778258 -0.469893 -v -0.342546 -0.898002 0.276142 -v -0.740079 -0.66068 -0.125638 -v -0.469893 -0.416552 0.778258 -v -0.66068 -0.125638 0.740079 -v -0.740079 -0.66068 0.125638 -v -0.778258 -0.469893 0.416552 -v -0.865717 0.457394 -0.203286 -v -0.983105 -0.138444 -0.119744 -v 0.137699 -0.566553 0.812439 -v 0.270014 -0.115055 0.955957 -v -0.058176 0.804378 0.591263 -v 0.337332 -0.223979 0.914352 -v -0.591263 0.058176 -0.804378 -v 0.804378 0.591263 0.058176 -v -0.747474 0.0673183 0.660871 -v 0.139989 -0.35362 0.924855 -v -0.881774 -0.0702829 -0.466406 -v -0.66068 0.125638 -0.740079 -v -0.747474 -0.0673183 0.660871 -v 0.660871 -0.747474 -0.0673183 -v 0.731979 0.632419 -0.253481 -v 0.799297 0.523496 -0.295086 -v -0.955957 0.270014 0.115055 -v 0.862553 -0.497133 -0.0941308 -v 0.804378 0.591263 -0.058176 -v 0.276142 -0.342546 0.898002 -v 0.740079 -0.66068 -0.125638 -v 0.740079 0.66068 -0.125638 -v 0.804378 -0.591263 -0.058176 -v 0.804378 -0.591263 0.058176 -v 0.740079 -0.66068 0.125638 -v 0.731979 -0.632419 0.253481 -v 0.253481 0.731979 0.632419 -v 0.331449 0.640559 0.692695 -v 0.591263 0.058176 0.804378 -v 0.497133 0.0941308 0.862553 -v 0.469893 -0.416552 0.778258 -v 0.497133 0.0941308 -0.862553 -v 0.591263 0.058176 -0.804378 -v -0.898508 0.438957 2.24192e-17 -v -0.862553 0.497133 0.0941308 -v 0.458448 0.614672 0.641875 -v 0.528154 0.501886 0.684956 -v 0.641875 0.458448 -0.614672 -v 0.528154 0.501886 -0.684956 -v 0.466406 -0.881774 -0.0702829 -v -0.968292 0.069706 0.239899 -v 0.469893 0.416552 0.778258 -v 0.295086 0.799297 0.523496 -v 0.416552 0.778258 0.469893 -v 0.66068 0.125638 0.740079 -v 0.457394 0.203286 -0.865717 -v -0.983105 0.138444 0.119744 -v -0.828367 0.342698 0.443132 -v -0.778258 0.469893 0.416552 -v 0.342698 -0.443132 0.828367 -v 0.27387 -0.554497 0.78583 -v -0.139989 0.35362 0.924855 -v 0.523496 -0.295086 0.799297 -v -0.276142 0.342546 0.898002 -v 0.632419 -0.253481 0.731979 -v -0.337332 0.223979 0.914352 -v -0.270014 0.115055 0.955957 -v -0.331756 -1.31771e-17 0.943365 -v -0.270014 -0.115055 0.955957 -v 0.943365 0.331756 2.25286e-17 -v 0.955957 0.270014 0.115055 -v 0.983105 0.138444 0.119744 -v 0.523496 0.295086 0.799297 -v 0.139989 0.35362 0.924855 -v 0.0702829 0.466406 0.881774 -v -0.0702829 0.466406 0.881774 -v -1.22142e-17 -0.898508 0.438957 -v 0.0941308 -0.862553 0.497133 -v 0.058176 -0.804378 0.591263 -v 0.898508 0.438957 2.24192e-17 -v 0.862553 0.497133 -0.0941308 -v -0.799297 -0.523496 -0.295086 -v -0.865717 -0.457394 -0.203286 -v -0.914352 -0.337332 -0.223979 -v 0.614672 0.641875 0.458448 -v 0.684956 0.528154 0.501886 -v 0.641875 0.458448 0.614672 -v 0.458448 -0.614672 0.641875 -v 0.501886 -0.684956 0.528154 -v 0.614672 -0.641875 0.458448 -v 0.684956 -0.528154 0.501886 -v 0.641875 -0.458448 0.614672 -v 0.968292 0.069706 0.239899 -v 0.812439 0.137699 0.566553 -v 0.881774 -0.0702829 0.466406 -v 0.924855 -0.139989 0.35362 -v 0.968292 -0.069706 0.239899 -v -0.069706 0.239899 -0.968292 -v -0.139989 0.35362 -0.924855 -v -0.0702829 0.466406 -0.881774 -v -0.898002 0.276142 0.342546 -v 0.466406 -0.881774 0.0702829 -v 0.35362 -0.924855 0.139989 -v 0.239899 -0.968292 0.069706 -v -0.881774 -0.0702829 0.466406 -v -0.881774 0.0702829 0.466406 -v -0.924855 0.139989 0.35362 -v 0.276142 0.342546 0.898002 -v 0.337332 0.223979 0.914352 -v 0.457394 0.203286 0.865717 -v 0.443132 0.828367 0.342698 -v 0.342546 0.898002 0.276142 -v 0.223979 0.914352 0.337332 -v -0.137699 0.566553 0.812439 -v -0.0673183 0.660871 0.747474 -v -0.125638 0.740079 0.66068 -v -0.253481 0.731979 0.632419 -v -0.115055 0.955957 0.270014 -v -1.22738e-17 0.943365 0.331756 -v 0.115055 0.955957 0.270014 -v 0.119744 0.983105 0.138444 -v -1.23337e-17 0.997629 0.0688268 -v -0.27387 -0.554497 0.78583 -v -0.331449 -0.640559 0.692695 -v 0.331449 -0.640559 0.692695 -v 0.253481 -0.731979 0.632419 -v -0.253481 -0.731979 0.632419 -v -0.125638 -0.740079 0.66068 -v -0.0673183 -0.660871 0.747474 -v 0.566553 -0.812439 -0.137699 -v 0.554497 -0.78583 -0.27387 -v 0.640559 -0.692695 -0.331449 -v 0.731979 -0.632419 -0.253481 -v 0.270014 0.115055 -0.955957 -v 0.331756 -1.31771e-17 -0.943365 -v 0.270014 -0.115055 -0.955957 -v 0.138444 -0.119744 -0.983105 -v 0.0688268 -1.32413e-17 -0.997629 -v 0.983105 -0.138444 0.119744 -v 0.955957 -0.270014 0.115055 -v 0.943365 -0.331756 2.25286e-17 -v 0.955957 -0.270014 -0.115055 -v 0.632419 -0.253481 -0.731979 -v 0.66068 -0.125638 -0.740079 -v 0.914352 -0.337332 -0.223979 -v 0.898002 0.276142 -0.342546 -v 0.747474 -0.0673183 -0.660871 -v 0.812439 -0.137699 -0.566553 -v 0.78583 -0.27387 -0.554497 -v 0.337332 -0.223979 -0.914352 -v 0.457394 -0.203286 -0.865717 -v 0.523496 -0.295086 -0.799297 -v 0.469893 -0.416552 -0.778258 -v 0.342698 -0.443132 -0.828367 -v 0.0673183 -0.660871 -0.747474 -v 0.137699 -0.566553 -0.812439 -v 0.27387 -0.554497 -0.78583 -v 0.331449 -0.640559 -0.692695 -v 0.253481 -0.731979 -0.632419 -v -0.27387 -0.554497 -0.78583 -v -0.137699 -0.566553 -0.812439 -v -0.0673183 -0.660871 -0.747474 -v -0.125638 -0.740079 -0.66068 -v -0.253481 -0.731979 -0.632419 -v 0.295086 -0.799297 -0.523496 -v 0.416552 -0.778258 -0.469893 -v 0.443132 -0.828367 -0.342698 -v 0.342546 -0.898002 -0.276142 -v 0.223979 -0.914352 -0.337332 -v -0.115055 -0.955957 -0.270014 -v -1.22738e-17 -0.943365 -0.331756 -v 0.115055 -0.955957 -0.270014 -v 0.119744 -0.983105 -0.138444 -v -1.23337e-17 -0.997629 -0.0688268 -v -0.138444 0.119744 -0.983105 -v -0.0688268 -1.32413e-17 -0.997629 -v -0.138444 -0.119744 -0.983105 -v -0.270014 -0.115055 -0.955957 -v -0.337332 -0.223979 -0.914352 -v -0.276142 -0.342546 -0.898002 -v -0.342698 -0.443132 -0.828367 -v -0.469893 -0.416552 -0.778258 -v -0.523496 -0.295086 -0.799297 -v -0.115055 0.955957 -0.270014 -v -0.119744 0.983105 -0.138444 -v -1.23337e-17 0.997629 -0.0688268 -v 0.119744 0.983105 -0.138444 -v 0.115055 0.955957 -0.270014 -v -0.865717 0.457394 0.203286 -v 0.0673183 0.660871 -0.747474 -v 0.125638 0.740079 -0.66068 -v 0.660871 0.747474 -0.0673183 -v 0.253481 0.731979 -0.632419 -v 0.331449 0.640559 -0.692695 -v 0.27387 0.554497 -0.78583 -v -0.0673183 0.660871 -0.747474 -v -0.137699 0.566553 -0.812439 -v -0.27387 0.554497 -0.78583 -v -0.331449 0.640559 -0.692695 -v -0.253481 0.731979 -0.632419 -v 0.295086 0.799297 -0.523496 -v 0.203286 0.865717 -0.457394 -v 0.223979 0.914352 -0.337332 -v 0.342546 0.898002 -0.276142 -v 0.443132 0.828367 -0.342698 -v 0.799297 -0.523496 -0.295086 -v 0.778258 -0.469893 -0.416552 -v 0.828367 -0.342698 -0.443132 -v 0.566553 -0.812439 0.137699 -v 0.554497 -0.78583 0.27387 -v 0.692695 -0.331449 0.640559 -v 0.78583 -0.27387 0.554497 -v 0.812439 -0.137699 0.566553 -v 0.747474 -0.0673183 0.660871 -v 0.747474 0.0673183 -0.660871 -v 0.66068 0.125638 -0.740079 -v 0.78583 0.27387 -0.554497 -v 0.828367 0.342698 -0.443132 -v 0.632419 0.253481 -0.731979 -v 0.692695 0.331449 -0.640559 -v 0.554497 0.78583 0.27387 -v 0.640559 0.692695 0.331449 -v 0.731979 0.632419 0.253481 -v 0.740079 0.66068 0.125638 -v 0.660871 0.747474 0.0673183 -v 0.692695 0.331449 0.640559 -v 0.78583 0.27387 0.554497 -v 0.747474 0.0673183 0.660871 -v 0.554497 0.78583 -0.27387 -v 0.566553 0.812439 -0.137699 -v 0.337332 0.223979 -0.914352 -v 0.276142 0.342546 -0.898002 -v 0.342698 0.443132 -0.828367 -v 0.865717 0.457394 -0.203286 -v 0.914352 0.337332 -0.223979 -v -0.295086 0.799297 0.523496 -v -0.203286 0.865717 0.457394 -v -0.223979 0.914352 0.337332 -v -0.342546 0.898002 0.276142 -v -0.443132 0.828367 0.342698 -v -0.554497 0.78583 0.27387 -v -0.566553 0.812439 0.137699 -v -0.898002 0.276142 -0.342546 -v -0.660871 0.747474 0.0673183 -v -0.740079 0.66068 0.125638 -v -0.731979 0.632419 0.253481 -v -0.223979 0.914352 -0.337332 -v -0.203286 0.865717 -0.457394 -v -0.295086 0.799297 -0.523496 -v -0.416552 0.778258 -0.469893 -v -0.443132 0.828367 -0.342698 -v -0.660871 0.747474 -0.0673183 -v -0.566553 0.812439 -0.137699 -v -0.554497 0.78583 -0.27387 -v -0.640559 0.692695 -0.331449 -v -0.731979 0.632419 -0.253481 -v -0.632419 -0.253481 -0.731979 -v -0.692695 -0.331449 -0.640559 -v -0.78583 -0.27387 -0.554497 -v -0.812439 -0.137699 -0.566553 -v -0.747474 -0.0673183 -0.660871 -v -0.692695 -0.331449 0.640559 -v -0.914352 0.337332 -0.223979 -v -0.943365 0.331756 2.25286e-17 -v -0.997629 0.0688268 2.26384e-17 -v -0.997629 -0.0688268 2.26384e-17 -v -0.955957 0.270014 -0.115055 -v -0.983105 0.138444 -0.119744 -v -1.23337e-17 -0.997629 0.0688268 -v 0.119744 -0.983105 0.138444 -v 0.115055 -0.955957 0.270014 -v -1.22738e-17 -0.943365 0.331756 -v -0.115055 -0.955957 0.270014 -v -0.747474 0.0673183 -0.660871 -v -0.812439 0.137699 -0.566553 -v -0.78583 0.27387 -0.554497 -v -0.295086 -0.799297 -0.523496 -v -0.203286 -0.865717 -0.457394 -v -0.223979 -0.914352 -0.337332 -v -0.342546 -0.898002 -0.276142 -v -0.443132 -0.828367 -0.342698 -v -0.799297 0.523496 0.295086 -v -0.223979 -0.914352 0.337332 -v -0.203286 -0.865717 0.457394 -v -0.295086 -0.799297 0.523496 -v -0.416552 -0.778258 0.469893 -v -0.443132 -0.828367 0.342698 -v -0.731979 -0.632419 -0.253481 -v -0.640559 -0.692695 -0.331449 -v -0.554497 -0.78583 -0.27387 -v -0.566553 -0.812439 -0.137699 -v -0.660871 -0.747474 -0.0673183 -v -0.342698 -0.443132 0.828367 -v -0.276142 -0.342546 0.898002 -v -0.337332 -0.223979 0.914352 -v -0.457394 -0.203286 0.865717 -v -0.523496 -0.295086 0.799297 -v -0.812439 -0.137699 0.566553 -v -0.632419 -0.253481 0.731979 -v -0.865717 -0.457394 0.203286 -v -0.78583 -0.27387 0.554497 -v -0.660871 -0.747474 0.0673183 -v -0.566553 -0.812439 0.137699 -v -0.554497 -0.78583 0.27387 -v -0.640559 -0.692695 0.331449 -v -0.731979 -0.632419 0.253481 -v -0.828367 -0.342698 0.443132 -v -0.898002 -0.276142 0.342546 -v -0.799297 -0.523496 0.295086 -v -0.983105 -0.138444 0.119744 -v -0.914352 -0.337332 0.223979 -v -0.799297 0.523496 -0.295086 -v -0.778258 0.469893 -0.416552 -v -0.828367 0.342698 -0.443132 -v -0.955957 -0.270014 -0.115055 -v -0.943365 -0.331756 2.25286e-17 -v -0.955957 -0.270014 0.115055 -v 0.0673183 -0.660871 0.747474 -# 540 vertices - -f 518 517 291 290 77 76 -f 438 437 369 366 81 265 -f 503 502 174 173 513 512 -f 367 3 43 42 197 364 -f 216 247 248 217 148 147 -f 430 371 370 44 43 3 -f 443 333 276 5 307 444 -f 423 415 413 103 102 424 -f 401 400 399 88 87 402 -f 432 11 10 325 324 431 -f 442 270 148 217 440 439 -f 540 351 350 78 301 2 -f 10 11 12 13 14 15 -f 16 17 18 19 20 21 -f 22 23 24 25 26 27 -f 259 28 29 30 31 260 -f 32 33 34 292 293 294 -f 35 36 37 38 39 40 -f 457 34 33 41 46 368 -f 46 41 42 43 44 45 -f 47 48 49 50 51 52 -f 53 54 55 56 57 58 -f 61 59 60 261 262 -f 80 59 61 62 236 238 -f 236 62 63 64 65 66 -f 284 68 67 296 297 298 -f 69 70 71 72 237 -f 73 74 75 76 77 -f 194 68 284 286 288 289 -f 301 78 79 299 300 -f 80 238 252 282 263 285 -f 264 265 81 82 83 -f 84 85 86 87 88 89 -f 358 372 200 84 89 359 -f 90 91 92 93 94 -f 377 384 383 86 85 378 -f 95 96 97 98 239 -f 99 100 101 102 103 -f 5 276 275 259 260 268 -f 255 250 105 104 256 -f 251 240 106 302 303 -f 107 108 109 266 267 -f 110 111 112 113 114 241 -f 115 116 117 118 119 -f 304 510 228 115 119 305 -f 122 120 121 304 305 306 -f 308 307 5 268 269 309 -f 123 124 125 126 127 242 -f 128 129 130 131 132 133 -f 134 310 311 312 313 314 -f 135 136 137 138 139 140 -f 349 507 506 79 78 350 -f 141 142 143 144 145 243 -f 149 146 147 148 270 271 -f 415 423 211 146 149 416 -f 315 150 151 317 318 319 -f 152 153 154 155 156 157 -f 466 474 221 108 107 467 -f 158 159 160 320 321 322 -f 161 162 163 164 165 166 -f 168 167 272 324 325 326 -f 312 311 12 11 432 4 -f 169 170 171 172 173 174 -f 392 501 500 93 92 393 -f 175 176 177 178 179 180 -f 273 181 182 327 328 329 -f 274 183 330 331 332 295 -f 184 275 276 333 334 335 -f 288 286 188 185 186 187 -f 189 190 336 337 338 339 -f 191 340 341 342 343 344 -f 192 193 194 289 290 291 -f 195 345 346 349 350 351 -f 253 246 352 353 354 355 -f 196 356 357 358 359 360 -f 197 198 361 362 363 364 -f 199 365 366 369 370 371 -f 200 372 373 374 375 376 -f 201 377 378 379 380 381 -f 202 382 383 384 385 386 -f 203 387 388 389 390 391 -f 204 392 393 394 395 396 -f 205 206 397 398 399 400 -f 207 401 402 403 404 405 -f 208 406 407 408 409 410 -f 209 412 413 415 416 417 -f 210 418 419 420 421 422 -f 211 423 424 425 426 427 -f 367 212 428 429 430 3 -f 4 432 431 8 257 258 -f 213 287 433 434 435 436 -f 214 437 438 441 442 439 -f 215 443 444 445 446 447 -f 449 448 6 277 450 316 -f 254 247 216 451 452 414 -f 7 278 453 454 455 1 -f 440 217 248 456 457 368 -f 218 458 459 460 461 462 -f 219 463 464 466 467 468 -f 220 469 470 471 472 473 -f 221 474 475 476 477 478 -f 222 479 480 481 482 483 -f 279 249 486 489 490 487 -f 223 491 492 493 494 495 -f 224 225 244 496 497 498 -f 226 499 500 501 502 503 -f 9 323 280 281 504 411 -f 227 505 506 507 508 509 -f 228 510 511 512 513 514 -f 229 515 516 517 518 519 -f 521 230 245 520 523 484 -f 231 524 525 526 527 528 -f 531 232 529 530 533 522 -f 485 233 534 535 536 465 -f 488 234 537 538 539 532 -f 348 347 283 235 540 2 -f 361 198 32 294 315 319 -f 42 41 33 32 198 197 -f 199 371 430 429 51 50 -f 67 68 194 193 65 64 -f 332 331 63 62 61 262 -f 296 67 64 63 331 330 -f 297 296 330 183 31 30 -f 337 336 298 297 30 29 -f 338 337 29 28 69 237 -f 70 69 28 259 275 184 -f 342 341 71 70 184 335 -f 287 213 60 59 80 285 -f 433 287 285 263 134 314 -f 252 238 236 66 123 242 -f 214 439 440 368 46 45 -f 45 44 370 369 437 214 -f 366 365 374 373 82 81 -f 379 378 85 84 200 376 -f 387 203 91 90 201 381 -f 244 225 27 26 95 239 -f 206 205 96 95 26 25 -f 97 96 205 400 401 207 -f 363 362 39 38 104 105 -f 425 424 102 101 208 410 -f 258 257 256 104 38 37 -f 245 230 75 74 110 241 -f 428 212 250 255 253 355 -f 364 363 105 250 212 367 -f 414 452 57 56 215 447 -f 293 292 302 106 20 19 -f 303 302 292 34 457 456 -f 187 186 111 110 74 73 -f 282 252 242 127 235 283 -f 538 537 306 305 119 118 -f 150 315 294 293 19 18 -f 334 333 443 215 56 55 -f 269 268 260 31 183 274 -f 6 448 309 269 274 295 -f 40 39 362 361 319 318 -f 450 277 261 60 213 436 -f 16 21 445 444 307 308 -f 124 123 66 65 193 192 -f 517 516 125 124 192 291 -f 281 280 113 112 128 133 -f 195 351 540 235 127 126 -f 129 128 112 111 186 185 -f 188 286 284 298 336 190 -f 130 129 185 188 190 189 -f 458 218 131 130 189 339 -f 310 134 263 282 283 347 -f 347 348 13 12 311 310 -f 14 13 348 2 301 300 -f 504 281 133 132 219 468 -f 313 312 4 258 37 36 -f 434 433 314 313 36 35 -f 345 195 126 125 516 515 -f 346 345 515 229 136 135 -f 519 518 76 75 230 521 -f 137 136 229 519 521 484 -f 482 481 120 122 141 243 -f 117 116 231 528 531 522 -f 496 244 239 98 222 483 -f 142 141 122 306 537 234 -f 328 327 520 245 241 114 -f 144 143 490 489 485 465 -f 451 216 147 146 211 427 -f 254 414 447 446 240 251 -f 251 303 456 248 247 254 -f 459 458 339 338 237 72 -f 271 270 442 441 7 1 -f 321 320 397 206 25 24 -f 277 6 295 332 262 261 -f 435 434 35 40 318 317 -f 17 16 308 309 448 449 -f 151 150 18 17 449 316 -f 436 435 317 151 316 450 -f 463 219 132 131 218 462 -f 460 459 72 71 341 340 -f 58 57 452 451 427 426 -f 53 58 426 425 410 409 -f 408 407 155 154 191 344 -f 156 155 407 406 469 220 -f 421 420 23 22 161 166 -f 264 83 357 356 453 278 -f 278 7 441 438 265 264 -f 380 379 376 375 49 48 -f 99 103 413 412 418 210 -f 322 321 24 23 420 419 -f 419 418 412 209 158 322 -f 417 416 149 271 1 455 -f 159 158 209 417 455 454 -f 83 82 373 372 358 357 -f 360 359 89 88 399 398 -f 160 159 454 453 356 196 -f 464 463 462 461 153 152 -f 388 387 381 380 48 47 -f 398 397 320 160 196 360 -f 162 161 22 27 225 224 -f 497 496 483 482 243 145 -f 145 144 465 536 498 497 -f 163 162 224 498 536 535 -f 475 474 466 464 152 157 -f 477 476 473 472 165 164 -f 534 233 109 108 221 478 -f 470 469 406 208 101 100 -f 476 475 157 156 220 473 -f 164 163 535 534 478 477 -f 471 470 100 99 210 422 -f 52 51 429 428 355 354 -f 389 388 47 52 354 353 -f 246 253 255 256 257 8 -f 352 246 8 431 324 272 -f 394 393 92 91 203 391 -f 493 492 326 325 10 15 -f 395 394 391 390 167 168 -f 168 326 492 491 396 395 -f 204 396 491 223 170 169 -f 494 493 15 14 300 299 -f 299 79 506 505 495 494 -f 171 170 223 495 505 227 -f 9 411 267 266 486 249 -f 232 531 528 527 139 138 -f 509 508 140 139 527 526 -f 526 525 172 171 227 509 -f 524 231 116 115 228 514 -f 511 510 304 121 175 180 -f 176 175 121 120 481 480 -f 479 222 98 97 207 405 -f 173 172 525 524 514 513 -f 403 402 87 86 383 382 -f 177 176 480 479 405 404 -f 385 384 377 201 90 94 -f 94 93 500 499 386 385 -f 178 177 404 403 382 202 -f 202 386 499 226 179 178 -f 512 511 180 179 226 503 -f 411 504 468 467 107 267 -f 487 490 143 142 234 488 -f 530 529 523 520 327 182 -f 181 273 279 487 488 532 -f 539 538 118 117 522 533 -f 182 181 532 539 533 530 -f 529 232 138 137 484 523 -f 329 328 114 113 280 323 -f 266 109 233 485 489 486 -f 249 279 273 329 323 9 -f 343 342 335 334 55 54 -f 290 289 288 187 73 77 -f 461 460 340 191 154 153 -f 409 408 344 343 54 53 -f 508 507 349 346 135 140 -f 390 389 353 352 272 167 -f 375 374 365 199 50 49 -f 502 501 392 204 169 174 -f 472 471 422 421 166 165 -f 446 445 21 20 106 240 -# 272 faces - diff --git a/topmodx/objs/cube.obj b/topmodx/objs/cube.obj deleted file mode 100644 index bffe5d7..0000000 --- a/topmodx/objs/cube.obj +++ /dev/null @@ -1,16 +0,0 @@ -# -v 1.0, 1.0, 1.0 -v 1.0, 1.0, -1.0 -v -1.0, 1.0, -1.0 -v -1.0, 1.0, 1.0 -v 1.0, -1.0, 1.0 -v 1.0, -1.0, -1.0 -v -1.0, -1.0, -1.0 -v -1.0, -1.0, 1.0 -# -f 1 2 3 4 -f 5 6 2 1 -f 6 7 3 2 -f 7 8 4 3 -f 8 5 1 4 -f 8 7 6 5 diff --git a/topmodx/objs/dodecahedron.obj b/topmodx/objs/dodecahedron.obj deleted file mode 100644 index 925a659..0000000 --- a/topmodx/objs/dodecahedron.obj +++ /dev/null @@ -1,46 +0,0 @@ -# Tue May 26 19:41:44 1992 -# -# - -g -v 0.0 0.618034 1.61803 -v 0.0 -0.618034 1.61803 -v 0.0 -0.618034 -1.61803 -v 0.0 0.618034 -1.61803 -v 1.61803 0.0 0.618034 -v -1.61803 0.0 0.618034 -v -1.61803 0.0 -0.618034 -v 1.61803 0.0 -0.618034 -v 0.618034 1.61803 0.0 -v -0.618034 1.61803 0.0 -v -0.618034 -1.61803 0.0 -v 0.618034 -1.61803 0.0 -v 1.0 1.0 1.0 -v -1.0 1.0 1.0 -v -1.0 -1.0 1.0 -v 1.0 -1.0 1.0 -v 1.0 -1.0 -1.0 -v 1.0 1.0 -1.0 -v -1.0 1.0 -1.0 -v -1.0 -1.0 -1.0 -# 20 vertices - -# 0 vertex parms - -# 0 texture vertices - -# 0 normals -g dodecahedron -f 1 2 16 5 13 -f 1 13 9 10 14 -f 1 14 6 15 2 -f 2 15 11 12 16 -f 3 4 18 8 17 -f 3 17 12 11 20 -f 3 20 7 19 4 -f 19 10 9 18 4 -f 16 12 17 8 5 -f 5 8 18 9 13 -f 14 10 19 7 6 -f 6 7 20 11 15 -# 12 elements diff --git a/topmodx/objs/donuthexa1.obj b/topmodx/objs/donuthexa1.obj deleted file mode 100644 index f67eb62..0000000 --- a/topmodx/objs/donuthexa1.obj +++ /dev/null @@ -1,154 +0,0 @@ -v 0.542623 0.329768 -0.499002 -v 0.306899 0.329768 -0.670266 -v -0.542623 0.329768 -0.499002 -v -0.642259 0.329768 0.361865 -v 0.145686 0.329768 0.722647 -v 0.820095 0.378698 -0.471329 -v 0.194838 0.378698 -0.925603 -v -0.820095 0.378698 -0.471329 -v -0.701684 0.378698 0.634307 -v 0.38643 0.378698 0.863353 -v 0.701684 0.378698 0.634307 -v 0.850241 0.282977 -0.760675 -v 0.460707 0.282977 -1.04368 -v -0.850241 0.282977 -0.760675 -v -0.986185 0.282977 0.573564 -v 0.240744 0.282977 1.11516 -v 0.986185 0.282977 0.573564 -v 1.07709 0.0791693 -0.629518 -v 0.265869 0.0791693 -1.2189 -v -1.07709 0.0791693 -0.629518 -v -0.931547 0.0791693 0.829838 -v 0.501361 0.0791693 1.14239 -v 0.931547 0.0791693 0.829838 -v 0.914548 -0.154879 -0.815379 -v 0.492862 -0.154879 -1.12175 -v -0.914549 -0.154879 -0.815379 -v -1.05808 -0.154879 0.617819 -v 0.260617 -0.154879 1.19721 -v 1.05808 -0.154879 0.617819 -v 0.93643 -0.329768 -0.542939 -v 0.226992 -0.329768 -1.05837 -v -0.936431 -0.329768 -0.542939 -v -0.805737 -0.329768 0.72282 -v 0.438457 -0.329768 0.989666 -v 0.805737 -0.329768 0.72282 -v 0.646678 -0.378698 -0.587516 -v 0.358926 -0.378698 -0.79658 -v -0.646678 -0.378698 -0.587516 -v -0.758594 -0.378698 0.433475 -v 0.17784 -0.378698 0.855419 -v 0.758594 -0.378698 0.433475 -v 0.592506 -0.282977 -0.33124 -v 0.131934 -0.282977 -0.665865 -v -0.592506 -0.282977 -0.33124 -v -0.498122 -0.282977 0.461148 -v 0.284649 -0.282977 0.616245 -v 0.498122 -0.282977 0.461148 -v 0.589863 0.154879 -0.07383 -v 0.501601 -0.0791693 0.275286 -v 0.642259 0.329768 0.361865 -v 0.433813 0.154879 0.406443 -v 0.252494 0.154879 0.538179 -v 0.106809 -0.0791693 0.56212 -v -0.306899 0.329768 -0.670266 -v -0.732297 0.329768 0.084755 -v -0.145686 0.329768 0.722647 -v 0.732297 0.329768 0.084755 -v -0.194838 0.378698 -0.925603 -v -0.940512 0.378698 -0.100726 -v -0.38643 0.378698 0.863353 -v 0.940512 0.378698 -0.100726 -v -0.460707 0.282977 -1.04368 -v -1.13497 0.282977 0.115641 -v -0.240744 0.282977 1.11516 -v 1.13497 0.282977 0.115641 -v -0.265869 0.0791693 -1.2189 -v -1.24141 0.0791693 -0.123805 -v -0.501361 0.0791693 1.14239 -v 1.24141 0.0791693 -0.123805 -v -0.492862 -0.154879 -1.12175 -v -1.21915 -0.154879 0.122098 -v -0.260617 -0.154879 1.19721 -v 1.21915 -0.154879 0.122098 -v -0.226993 -0.329768 -1.05837 -v -1.07672 -0.329768 -0.111173 -v -0.438457 -0.329768 0.989666 -v 1.07672 -0.329768 -0.111173 -v -0.358927 -0.378698 -0.79658 -v -0.868505 -0.378698 0.095203 -v -0.17784 -0.378698 0.855419 -v 0.868505 -0.378698 0.095203 -v -0.131934 -0.282977 -0.665865 -v -0.674045 -0.282977 -0.0802867 -v -0.284649 -0.282977 0.616245 -v 0.674045 -0.282977 -0.0802867 -v -0.112061 0.154879 -0.583808 -v 0.416816 -0.0791693 -0.391984 -v 0.243995 -0.0791693 -0.517545 -v -0.589863 0.154879 -0.07383 -v -0.243995 -0.0791693 -0.517545 -v -0.416816 -0.0791693 -0.391984 -v -0.252494 0.154879 0.538179 -v -0.567613 -0.0791693 0.0721233 -v -0.501601 -0.0791693 0.275286 -v -0.106809 -0.0791693 0.56212 -v 0.567613 -0.0791693 0.0721233 -v 0.520606 0.154879 -0.286983 -v 0.112061 0.154879 -0.583808 -v -0.520606 0.154879 -0.286983 -v -0.433813 0.154879 0.406443 -# 100 vertices - -f 97 48 57 61 6 1 -f 7 2 1 6 12 13 -f 14 8 3 54 58 62 -f 15 9 4 55 59 63 -f 16 10 5 56 60 64 -f 61 57 50 11 17 65 -f 62 58 7 13 19 66 -f 63 59 8 14 20 67 -f 64 60 9 15 21 68 -f 17 11 10 16 22 23 -f 18 12 6 61 65 69 -f 19 13 12 18 24 25 -f 26 20 14 62 66 70 -f 27 21 15 63 67 71 -f 28 22 16 64 68 72 -f 69 65 17 23 29 73 -f 70 66 19 25 31 74 -f 71 67 20 26 32 75 -f 72 68 21 27 33 76 -f 29 23 22 28 34 35 -f 30 24 18 69 73 77 -f 31 25 24 30 36 37 -f 38 32 26 70 74 78 -f 39 33 27 71 75 79 -f 40 34 28 72 76 80 -f 77 73 29 35 41 81 -f 78 74 31 37 43 82 -f 79 75 32 38 44 83 -f 80 76 33 39 45 84 -f 41 35 34 40 46 47 -f 42 36 30 77 81 85 -f 43 37 36 42 87 88 -f 44 38 78 82 90 91 -f 45 39 79 83 93 94 -f 53 46 40 80 84 95 -f 85 81 41 47 49 96 -f 90 82 43 88 98 86 -f 93 83 44 91 99 89 -f 95 84 45 94 100 92 -f 52 51 49 47 46 53 -f 97 87 42 85 96 48 -f 1 2 98 88 87 97 -f 86 98 2 7 58 54 -f 54 3 99 91 90 86 -f 89 99 3 8 59 55 -f 55 4 100 94 93 89 -f 92 100 4 9 60 56 -f 56 5 52 53 95 92 -f 51 52 5 10 11 50 -f 50 57 48 96 49 51 -# 50 faces - diff --git a/topmodx/objs/donuthexa3.obj b/topmodx/objs/donuthexa3.obj deleted file mode 100644 index a370f95..0000000 --- a/topmodx/objs/donuthexa3.obj +++ /dev/null @@ -1,7207 +0,0 @@ -# This file uses centimeters as units for non-parametric coordinates. - -mtllib donuthexa4.mtl -g default -v 0.708584 0.280823 -0.150321 -v 0.662513 0.251773 -0.177069 -v 0.639532 0.218220 -0.135029 -v 0.651577 0.217681 -0.067681 -v 0.686823 0.253829 -0.035290 -v 0.720850 0.283418 -0.075890 -v 0.538667 0.286007 -0.484456 -v 0.484726 0.284629 -0.537424 -v 0.432701 0.255849 -0.533965 -v 0.439395 0.221143 -0.487859 -v 0.487719 0.219407 -0.439847 -v 0.534966 0.255491 -0.432986 -v -0.538667 0.286007 -0.484456 -v -0.593661 0.305981 -0.479838 -v -0.641353 0.305054 -0.415522 -v -0.627786 0.283418 -0.362309 -v -0.573278 0.253224 -0.372610 -v -0.534966 0.255491 -0.432986 -v -0.627203 0.286007 0.362597 -v -0.639804 0.305981 0.416327 -v -0.593374 0.305054 0.481559 -v -0.538573 0.283418 0.485101 -v -0.577108 0.255491 0.374983 -v 0.151034 0.286007 0.708554 -v 0.198240 0.305981 0.737143 -v 0.274628 0.305054 0.713142 -v 0.294930 0.283418 0.662118 -v 0.245803 0.253829 0.642303 -v 0.178294 0.255491 0.664739 -v 0.666858 0.328444 0.600266 -v 0.661783 0.327668 0.536450 -v 0.599991 0.319714 0.541131 -v 0.541224 0.321544 0.601014 -v 0.535703 0.327916 0.660916 -v 0.599545 0.326861 0.664850 -v 0.238172 0.068663 -1.121880 -v 0.291654 0.116784 -1.092310 -v 0.402605 0.117192 -1.053970 -v 0.462206 0.068042 -1.044820 -v 0.409525 0.016982 -1.070970 -v 0.296443 0.018012 -1.109690 -v 0.852108 0.068663 0.767625 -v 0.765472 0.068332 0.848995 -v 0.722044 0.018305 0.890729 -v 0.768382 -0.032361 0.852048 -v 0.851788 -0.032985 0.766204 -v 0.892087 0.018012 0.723516 -v 0.209985 -0.286007 -0.988177 -v 0.269803 -0.255491 -1.007790 -v 0.373298 -0.253829 -0.973434 -v 0.408096 -0.283418 -0.921026 -v 0.344473 -0.305054 -0.902595 -v 0.249857 -0.305981 -0.935388 -v 0.750716 -0.286007 0.676026 -v 0.674656 -0.284629 0.748208 -v 0.608825 -0.306098 0.751062 -v 0.620088 -0.320726 0.688437 -v 0.687148 -0.319231 0.619440 -v 0.751945 -0.305981 0.609883 -v 0.141064 -0.245426 -0.661260 -v 0.184722 -0.274687 -0.686230 -v 0.255894 -0.274068 -0.664092 -v 0.275790 -0.243204 -0.618328 -v 0.231159 -0.205516 -0.603304 -v 0.167605 -0.207118 -0.624099 -v 0.502803 -0.245426 0.452056 -v 0.452603 -0.244243 0.501774 -v 0.406233 -0.207484 0.501351 -v 0.415916 -0.165858 0.461682 -v 0.461917 -0.164310 0.416440 -v 0.502432 -0.207118 0.406391 -v -0.892326 0.328444 -0.093657 -v -0.850710 0.327668 -0.045011 -v -0.803472 0.319714 -0.085118 -v -0.791127 0.321544 -0.168107 -v -0.821870 0.327916 -0.219814 -v -0.875830 0.326861 -0.185471 -v -0.364817 0.328444 0.819712 -v -0.305692 0.327668 0.795165 -v -0.329239 0.319714 0.737844 -v -0.404351 0.321544 0.700459 -v -0.463027 0.327916 0.713719 -v -0.447040 0.326861 0.775651 -v -1.140570 0.068663 -0.120165 -v -1.118310 0.068332 -0.236918 -v -1.107710 0.018305 -0.296208 -v -1.122460 -0.032361 -0.237678 -v -1.139480 -0.032985 -0.119204 -v -1.146990 0.018012 -0.060981 -v -0.466740 0.068663 1.047610 -v -0.570899 0.068332 0.990361 -v -0.624010 0.018305 0.961956 -v -0.572903 -0.032361 0.994071 -v -0.465487 -0.032985 1.046870 -v -0.412435 0.018012 1.072000 -v 1.140570 0.068663 -0.120165 -v 1.128970 0.116784 -0.060163 -v 1.126800 0.117192 0.057205 -v 1.136520 0.068042 0.116715 -v 1.145110 0.016982 0.058530 -v 1.146990 0.018012 -0.060981 -v -1.004700 -0.286007 -0.105656 -v -0.985593 -0.284629 -0.208760 -v -0.934014 -0.306098 -0.249763 -v -0.906316 -0.320726 -0.192478 -v -0.920014 -0.319231 -0.097241 -v -0.966820 -0.305981 -0.051423 -v -0.410955 -0.286007 0.922876 -v -0.503108 -0.284629 0.872844 -v -0.526165 -0.306098 0.811118 -v -0.463125 -0.320726 0.802478 -v -0.376782 -0.319231 0.844935 -v -0.347669 -0.305981 0.903607 -v 1.004700 -0.286007 -0.105656 -v 1.041840 -0.255491 -0.054827 -v 1.041150 -0.253829 0.054219 -v 1.002060 -0.283418 0.103509 -v 0.964870 -0.305054 0.048696 -v 0.966820 -0.305981 -0.051423 -v -0.672487 -0.245426 -0.070181 -v -0.661099 -0.244243 -0.139910 -v -0.623336 -0.207484 -0.166823 -v -0.607853 -0.165858 -0.129038 -v -0.618476 -0.164310 -0.065398 -v -0.645347 -0.207118 -0.033455 -v -0.274556 -0.245426 0.617887 -v -0.337353 -0.244243 0.585508 -v -0.351280 -0.207484 0.541277 -v -0.310559 -0.165858 0.538228 -v -0.253317 -0.164310 0.567996 -v -0.231241 -0.207118 0.603424 -v 0.672487 -0.245426 -0.070181 -v 0.709725 -0.274687 -0.036376 -v 0.710665 -0.274068 0.038154 -v 0.673288 -0.243204 0.071219 -v 0.645208 -0.205516 0.033415 -v 0.645347 -0.207118 -0.033455 -v -0.508755 -0.068663 0.294474 -v -0.536992 -0.068332 0.239704 -v -0.543189 -0.018305 0.208620 -v -0.533030 0.032361 0.237853 -v -0.506505 0.032985 0.292622 -v -0.488427 -0.018012 0.318159 -v 1.047790 -0.032361 -0.467477 -v 0.991924 -0.032985 -0.573328 -v 0.963777 0.018012 -0.624846 -v 0.993373 0.068663 -0.573194 -v 1.043990 0.068332 -0.465652 -v 1.070260 0.018305 -0.411454 -v 0.846361 -0.320726 -0.377001 -v 0.801464 -0.319231 -0.462100 -v 0.812398 -0.305981 -0.526679 -v 0.874924 -0.286007 -0.505071 -v 0.920069 -0.284629 -0.410428 -v 0.902440 -0.306098 -0.346936 -v 0.567610 -0.165858 -0.252893 -v 0.538798 -0.164310 -0.310622 -v 0.541761 -0.207118 -0.352260 -v 0.585305 -0.245426 -0.338501 -v 0.617077 -0.244243 -0.275395 -v 0.602345 -0.207484 -0.231424 -v 0.916822 0.245426 0.529168 -v 0.856642 0.274687 0.555269 -v 0.792833 0.274068 0.639505 -v 0.785574 0.243204 0.704470 -v 0.843002 0.205516 0.681813 -v 0.910442 0.207118 0.590747 -v 0.977367 -0.134326 0.563989 -v 0.955771 -0.085726 0.619792 -v 0.884699 -0.084446 0.714832 -v 0.837209 -0.133110 0.750330 -v 0.857240 -0.178038 0.691676 -v 0.926325 -0.177975 0.600375 -v 0.725168 -0.328444 0.418942 -v 0.737505 -0.327668 0.479386 -v 0.683553 -0.326258 0.554138 -v 0.622122 -0.325471 0.559305 -v 0.616412 -0.315550 0.497518 -v 0.665506 -0.317113 0.431908 -v -0.186672 0.328444 -0.877593 -v -0.220076 0.327668 -0.822981 -v -0.167334 0.319714 -0.790449 -v -0.084592 0.321544 -0.804353 -v -0.044916 0.327916 -0.849569 -v -0.094253 0.326861 -0.890276 -v -0.238172 0.068663 -1.121880 -v -0.120253 0.068332 -1.136780 -v -0.060589 0.018305 -1.145020 -v -0.120813 -0.032361 -1.140960 -v -0.238748 -0.032985 -1.120540 -v -0.296443 0.018012 -1.109690 -v -0.209985 -0.286007 -0.988177 -v -0.106023 -0.284629 -1.001870 -v -0.051087 -0.306098 -0.965478 -v -0.097009 -0.320726 -0.921435 -v -0.191818 -0.319231 -0.905033 -v -0.249857 -0.305981 -0.935388 -v -0.141064 -0.245426 -0.661260 -v -0.071229 -0.244243 -0.671977 -v -0.033963 -0.207484 -0.644379 -v -0.065114 -0.165858 -0.617977 -v -0.128922 -0.164310 -0.608414 -v -0.167605 -0.207118 -0.624099 -v -0.238504 -0.068663 -0.537274 -v -0.214480 -0.116784 -0.561364 -v -0.155050 -0.117192 -0.581732 -v -0.121589 -0.068042 -0.577061 -v -0.150651 -0.016982 -0.563905 -v -0.208137 -0.018012 -0.544486 -v -0.584679 -0.068663 0.060805 -v -0.600166 -0.116784 0.030512 -v -0.601173 -0.117192 -0.032304 -v -0.586390 -0.068042 -0.062684 -v -0.582860 -0.016982 -0.030978 -v -0.582155 -0.018012 0.029694 -v 0.584679 -0.068663 0.060805 -v 0.575330 -0.068332 0.121712 -v 0.562073 -0.018305 0.150503 -v 0.571037 0.032361 0.120881 -v 0.581770 0.032985 0.060980 -v 0.582155 -0.018012 0.029694 -v -0.503450 -0.300726 -0.559081 -v -0.558299 -0.298845 -0.503585 -v -0.616422 -0.317113 -0.499468 -v -0.622528 -0.328444 -0.560217 -v -0.559839 -0.326861 -0.620783 -v -0.498884 -0.317411 -0.615530 -v -0.687291 -0.300726 0.306043 -v -0.651461 -0.298845 0.375357 -v -0.665506 -0.317113 0.431908 -v -0.725168 -0.328444 0.418942 -v -0.763398 -0.326861 0.340606 -v -0.739566 -0.317411 0.284257 -v -0.437276 -0.068663 -0.392858 -v -0.393912 -0.068332 -0.436638 -v -0.366263 -0.018305 -0.452137 -v -0.390926 0.032361 -0.433442 -v -0.434819 0.032985 -0.391290 -v -0.453520 -0.018012 -0.366205 -v 0.566918 0.217681 -0.328232 -v 0.525876 0.177975 -0.342630 -v 0.524758 0.134326 -0.303678 -v 0.553734 0.133679 -0.247165 -v 0.584694 0.177866 -0.224552 -v 0.596760 0.218220 -0.266666 -v 0.508755 -0.068663 0.294474 -v 0.503479 -0.116784 0.328085 -v 0.467371 -0.117192 0.379496 -v 0.437555 -0.068042 0.395384 -v 0.453335 -0.016982 0.367659 -v 0.488427 -0.018012 0.318159 -v 0.776958 0.328444 -0.448727 -v 0.714697 0.327668 -0.463621 -v 0.700054 0.319714 -0.403407 -v 0.738846 0.321544 -0.329012 -v 0.794110 0.327916 -0.305250 -v 0.817579 0.326861 -0.364751 -v 0.430688 0.245426 -0.966997 -v 0.527088 0.244243 -0.914410 -v 0.589557 0.207484 -0.908731 -v 0.553768 0.165858 -0.961575 -v 0.449942 0.164310 -1.013320 -v 0.389331 0.207118 -1.013060 -v 0.459202 -0.134326 -1.030760 -v 0.561740 -0.133679 -0.974483 -v 0.599797 -0.177866 -0.924667 -v 0.538281 -0.218220 -0.933299 -v 0.437543 -0.217681 -0.982548 -v 0.396522 -0.177975 -1.030190 -v 0.340427 -0.328444 -0.765174 -v 0.417400 -0.326861 -0.724270 -v 0.431240 -0.317411 -0.664675 -v 0.376143 -0.300726 -0.651574 -v 0.306415 -0.298845 -0.686590 -v 0.284538 -0.317113 -0.740595 -v -0.585305 -0.245426 -0.338501 -v -0.595562 -0.274687 -0.387737 -v -0.552514 -0.274068 -0.448586 -v -0.502841 -0.243204 -0.453366 -v -0.502344 -0.205516 -0.406277 -v -0.541761 -0.207118 -0.352260 -v -0.502803 -0.245426 0.452056 -v -0.552799 -0.274687 0.446595 -v -0.597366 -0.274068 0.386851 -v -0.586563 -0.243204 0.338132 -v -0.541625 -0.205516 0.352211 -v -0.502432 -0.207118 0.406391 -v 0.627203 0.286007 0.362597 -v 0.660909 0.284629 0.294929 -v 0.641543 0.255849 0.246520 -v 0.599762 0.221143 0.267133 -v 0.569033 0.219407 0.327929 -v 0.577108 0.255491 0.374983 -v -0.294287 0.286007 -0.662007 -v -0.361331 0.284629 -0.627075 -v -0.374118 0.255849 -0.576528 -v -0.328200 0.221143 -0.568646 -v -0.267605 0.219407 -0.599769 -v -0.246480 0.255491 -0.642583 -v -0.720547 0.286007 0.075313 -v -0.708042 0.284629 0.149870 -v -0.663920 0.255849 0.177651 -v -0.642234 0.221143 0.136416 -v -0.653109 0.219407 0.069169 -v -0.687300 0.255491 0.035848 -v -0.151034 0.286007 0.708554 -v -0.076262 0.284629 0.719701 -v -0.036206 0.255849 0.686323 -v -0.068722 0.221143 0.652957 -v -0.136038 0.219407 0.642519 -v -0.178294 0.255491 0.664739 -v -0.430688 0.245426 -0.966997 -v -0.366659 0.274687 -0.952740 -v -0.265523 0.274068 -0.983384 -v -0.221465 0.243204 -1.031670 -v -0.281243 0.205516 -1.047100 -v -0.389331 0.207118 -1.013060 -v -1.052760 0.245426 0.110788 -v -1.019410 0.274687 0.054299 -v -1.017300 0.274068 -0.051355 -v -1.049620 0.243204 -0.108180 -v -1.082760 0.205516 -0.056095 -v -1.083790 0.207118 0.057220 -v -0.219955 0.245426 1.035470 -v -0.263375 0.274687 0.986302 -v -0.363206 0.274068 0.951647 -v -0.427235 0.243204 0.964819 -v -0.387941 0.205516 1.012430 -v -0.280492 0.207118 1.048430 -v 1.052760 0.245426 0.110788 -v 1.032540 0.244243 0.218720 -v 1.046440 0.207484 0.279887 -v 1.085640 0.165858 0.229520 -v 1.102770 0.164310 0.114785 -v 1.083790 0.207118 0.057220 -v -0.459202 -0.134326 -1.030760 -v -0.408931 -0.085726 -1.063210 -v -0.295569 -0.084446 -1.098320 -v -0.236284 -0.133110 -1.099130 -v -0.286965 -0.178038 -1.063450 -v -0.396522 -0.177975 -1.030190 -v -1.122220 -0.134326 0.118205 -v -1.137550 -0.085726 0.060365 -v -1.135910 -0.084446 -0.058299 -v -1.118350 -0.133110 -0.114931 -v -1.100080 -0.178038 -0.055705 -v -1.102310 -0.177975 0.058767 -v -0.234364 -0.134326 1.103810 -v -0.294109 -0.085726 1.100520 -v -0.406460 -0.084446 1.062290 -v -0.454895 -0.133110 1.028090 -v -0.392922 -0.178038 1.029020 -v -0.284741 -0.177975 1.066510 -v 1.122220 -0.134326 0.118205 -v 1.100380 -0.133679 0.233114 -v 1.064760 -0.177866 0.284702 -v 1.053960 -0.218220 0.223529 -v 1.069670 -0.217681 0.112503 -v 1.102310 -0.177975 0.058767 -v -0.340427 -0.328444 -0.765174 -v -0.314880 -0.327668 -0.821326 -v -0.227293 -0.326258 -0.850089 -v -0.174557 -0.325471 -0.818161 -v -0.206255 -0.315550 -0.764819 -v -0.284538 -0.317113 -0.740595 -v -0.832921 -0.328444 0.087313 -v -0.878431 -0.327668 0.045664 -v -0.878721 -0.326258 -0.046524 -v -0.832060 -0.325471 -0.086812 -v -0.791123 -0.315550 -0.040182 -v -0.792275 -0.317113 0.041755 -v -0.174348 -0.328444 0.819137 -v -0.228021 -0.327668 0.849548 -v -0.315787 -0.326258 0.821336 -v -0.339684 -0.325471 0.764509 -v -0.282686 -0.315550 0.739986 -v -0.205116 -0.317113 0.766402 -v 0.832921 -0.328444 0.087313 -v 0.817805 -0.326861 0.173160 -v 0.765403 -0.317411 0.204738 -v 0.735917 -0.300726 0.156386 -v 0.747672 -0.298845 0.079250 -v 0.792274 -0.317113 0.041755 -v -0.122848 -0.068663 0.574853 -v -0.156444 -0.116784 0.580221 -v -0.216496 -0.117192 0.561767 -v -0.240820 -0.068042 0.538320 -v -0.209576 -0.016982 0.544760 -v -0.151655 -0.018012 0.562839 -v 0.103629 0.300726 -0.973180 -v 0.049337 0.317411 -0.934880 -v 0.094253 0.326861 -0.890276 -v 0.186672 0.328444 -0.877593 -v 0.242982 0.317113 -0.906128 -v 0.204856 0.298845 -0.957111 -v -0.743393 0.165858 -0.823806 -v -0.824692 0.164310 -0.741053 -v -0.843177 0.207118 -0.683329 -v -0.786583 0.245426 -0.708425 -v -0.706781 0.244243 -0.783857 -v -0.682076 0.207484 -0.841513 -v -1.013210 0.165858 0.452437 -v -0.959630 0.164310 0.555329 -v -0.910442 0.207118 0.590747 -v -0.916822 0.245426 0.529168 -v -0.963903 0.244243 0.429962 -v -1.011100 0.207484 0.388649 -v 0.117194 0.165858 1.103430 -v 0.231608 0.164310 1.084260 -v 0.280492 0.207118 1.048430 -v 0.219955 0.245426 1.035470 -v 0.111056 0.244243 1.049590 -v 0.057180 0.207484 1.081710 -v -0.721285 -0.218220 -0.800340 -v -0.799253 -0.217681 -0.719751 -v -0.857243 -0.177975 -0.695461 -v -0.838411 -0.134326 -0.755248 -v -0.753202 -0.133679 -0.835376 -v -0.694066 -0.177866 -0.856177 -v -0.984058 -0.218220 0.438663 -v -0.931506 -0.217681 0.537718 -v -0.926325 -0.177975 0.600375 -v -0.977367 -0.134326 0.563989 -v -1.027240 -0.133679 0.458190 -v -1.028750 -0.177866 0.395521 -v 0.113103 -0.218220 1.071450 -v 0.223549 -0.217681 1.052080 -v 0.284741 -0.177975 1.066510 -v 0.234364 -0.134326 1.103810 -v 0.118331 -0.133679 1.118560 -v 0.058261 -0.177866 1.100630 -v 0.414892 -0.162451 -0.459656 -v 0.461645 -0.162299 -0.414867 -v 0.467611 -0.116784 -0.377453 -v 0.437276 -0.068663 -0.392858 -v 0.393912 -0.068332 -0.436638 -v 0.377494 -0.116605 -0.466023 -v 0.078679 -0.300726 0.748227 -v 0.155673 -0.298845 0.735570 -v 0.205116 -0.317113 0.766402 -v 0.174348 -0.328444 0.819137 -v 0.088032 -0.326861 0.831290 -v 0.041806 -0.317411 0.791211 -v 0.328200 0.221143 -0.568646 -v 0.374118 0.255849 -0.576528 -v 0.361331 0.284629 -0.627075 -v 0.294287 0.286007 -0.662007 -v 0.246480 0.255491 -0.642583 -v 0.267605 0.219407 -0.599769 -v 0.061496 0.032361 0.580443 -v 0.121781 0.032985 0.572141 -v 0.151655 -0.018012 0.562839 -v 0.122848 -0.068663 0.574853 -v 0.062032 -0.068332 0.584783 -v 0.030554 -0.018305 0.581071 -v 0.272901 0.305981 -0.712882 -v 0.196996 0.305054 -0.738365 -v 0.150579 0.283418 -0.709019 -v 0.178677 0.253829 -0.664112 -v -0.846965 0.298845 -0.490593 -v -0.893528 0.300726 -0.399287 -v -0.873880 0.317411 -0.335817 -v -0.817579 0.326861 -0.364751 -v -0.776958 0.328444 -0.448727 -v -0.786696 0.317113 -0.511099 -v -0.728309 0.298845 0.653910 -v -0.655860 0.300726 0.726409 -v -0.589425 0.317411 0.727337 -v -0.599545 0.326861 0.664850 -v -0.666858 0.328444 0.600266 -v -0.729187 0.317113 0.590254 -v 0.396845 0.298845 0.894733 -v 0.488184 0.300726 0.848233 -v 0.509596 0.317411 0.785336 -v 0.447040 0.326861 0.775651 -v 0.364817 0.328444 0.819712 -v 0.336033 0.317113 0.875896 -v 0.687300 0.255491 0.035848 -v 0.720547 0.286007 0.075313 -v 0.762324 0.305981 0.039252 -v 0.763103 0.305054 -0.040813 -v 0.706781 0.244243 -0.783857 -v 0.786583 0.245426 -0.708425 -v 0.843177 0.207118 -0.683329 -v 0.824692 0.164310 -0.741053 -v 0.743393 0.165858 -0.823806 -v 0.682076 0.207484 -0.841513 -v -1.043990 0.068332 -0.465652 -v -0.993373 0.068663 -0.573194 -v -0.963777 0.018012 -0.624846 -v -0.991924 -0.032985 -0.573328 -v -1.047790 -0.032361 -0.467477 -v -1.070260 0.018305 -0.411454 -v -0.765472 0.068332 0.848995 -v -0.852108 0.068663 0.767625 -v -0.892087 0.018012 0.723516 -v -0.851788 -0.032985 0.766204 -v -0.768382 -0.032361 0.852048 -v -0.722044 0.018305 0.890729 -v 0.570899 0.068332 0.990361 -v 0.466740 0.068663 1.047610 -v 0.412435 0.018012 1.072000 -v 0.465487 -0.032985 1.046870 -v 0.572903 -0.032361 0.994071 -v 0.624010 0.018305 0.961956 -v 0.753202 -0.133679 -0.835376 -v 0.838411 -0.134326 -0.755248 -v 0.857243 -0.177975 -0.695461 -v 0.799253 -0.217681 -0.719751 -v 0.721285 -0.218220 -0.800340 -v 0.694066 -0.177866 -0.856177 -v -0.920070 -0.284629 -0.410428 -v -0.874925 -0.286007 -0.505071 -v -0.812398 -0.305981 -0.526679 -v -0.801465 -0.319231 -0.462100 -v -0.846362 -0.320726 -0.377001 -v -0.902441 -0.306098 -0.346936 -v -0.674656 -0.284629 0.748208 -v -0.750716 -0.286007 0.676026 -v -0.751945 -0.305981 0.609883 -v -0.687148 -0.319231 0.619440 -v -0.620088 -0.320726 0.688437 -v -0.608825 -0.306098 0.751062 -v 0.503108 -0.284629 0.872844 -v 0.410955 -0.286007 0.922876 -v 0.347669 -0.305981 0.903607 -v 0.376782 -0.319231 0.844935 -v 0.463125 -0.320726 0.802478 -v 0.526165 -0.306098 0.811118 -v 0.559838 -0.326861 -0.620783 -v 0.622527 -0.328444 -0.560217 -v 0.616421 -0.317113 -0.499468 -v 0.558299 -0.298845 -0.503585 -v 0.503449 -0.300726 -0.559081 -v 0.498883 -0.317411 -0.615530 -v 0.337353 -0.244243 0.585508 -v 0.274556 -0.245426 0.617887 -v 0.231241 -0.207118 0.603424 -v 0.253317 -0.164310 0.567996 -v 0.310559 -0.165858 0.538228 -v 0.351280 -0.207484 0.541277 -v 0.488366 0.177975 0.394259 -v 0.450974 0.134326 0.405233 -v 0.406182 0.133679 0.450255 -v 0.394242 0.177866 0.486687 -v 0.438024 0.218220 0.485148 -v 0.487355 0.217681 0.437742 -v 0.488105 0.178038 -0.396413 -v 0.451203 0.133110 -0.407505 -v 0.460646 0.084446 -0.373257 -v 0.496430 0.085726 -0.323213 -v 0.640063 0.251773 -0.246163 -v 0.605016 0.177866 -0.162008 -v -0.103629 0.300726 -0.973180 -v -0.054292 0.273722 -1.012390 -v -0.111461 0.240977 -1.044610 -v -0.204856 0.298845 -0.957111 -v -0.973571 0.298845 -0.100935 -v -0.957573 0.300726 -0.202173 -v -0.979615 0.273722 -0.261210 -v -1.027930 0.240977 -0.216797 -v -0.396845 0.298845 0.894733 -v -0.488184 0.300726 0.848233 -v -0.551143 0.273722 0.850952 -v -0.523833 0.240977 0.910624 -v 0.704181 0.240977 0.779593 -v 0.728309 0.298845 0.653910 -v 0.655860 0.300726 0.726409 -v 0.638990 0.273722 0.787127 -v 0.566626 0.067418 -0.985463 -v 0.610852 0.118117 -0.942864 -v 1.112330 0.067418 0.234367 -v 1.085480 0.118117 0.289592 -v -0.060224 -0.082603 -1.132020 -v -0.118874 -0.131891 -1.112400 -v -1.095230 -0.082603 -0.292535 -v -1.094690 -0.131891 -0.230694 -v -0.616660 -0.082603 0.951218 -v -0.557680 -0.131891 0.969818 -v 0.750022 -0.131891 0.830075 -v 0.714105 -0.082603 0.880421 -v 0.500411 -0.280823 -0.869656 -v 0.566351 -0.251773 -0.872816 -v 0.981731 -0.280823 0.207180 -v 1.005110 -0.251773 0.268916 -v -0.045922 -0.324773 -0.878367 -v -0.087996 -0.322490 -0.830037 -v -0.849569 -0.324773 -0.227756 -v -0.816605 -0.322490 -0.172807 -v -0.479140 -0.324773 0.737607 -v -0.416694 -0.322490 0.723237 -v 0.559073 -0.322490 0.619792 -v 0.553443 -0.324773 0.683622 -v 0.388339 -0.273722 -0.597236 -v 0.338506 -0.240977 -0.586487 -v -0.448002 -0.273722 -0.553888 -v -0.453178 -0.240977 -0.503173 -v -0.665218 -0.273722 0.254914 -v -0.618585 -0.240977 0.275509 -v 0.662386 -0.240977 0.140704 -v 0.688007 -0.273722 0.184776 -v 0.031151 -0.118117 -0.601976 -v 0.065114 -0.165858 -0.617977 -v 0.128922 -0.164310 -0.608414 -v 0.155050 -0.117192 -0.581732 -v 0.121589 -0.068042 -0.577061 -v 0.061498 -0.067418 -0.587742 -v -0.577980 -0.067418 -0.123134 -v -0.582140 -0.118117 -0.156394 -v -0.328630 -0.118117 0.505319 -v -0.295713 -0.067418 0.511641 -v 0.395913 0.178556 -0.489609 -v 0.343301 0.178556 -0.527833 -v -0.136980 0.217681 -0.640601 -v -0.069206 0.218220 -0.649957 -v -0.036324 0.251773 -0.684804 -v -0.076000 0.280823 -0.720354 -v -0.150579 0.283418 -0.709019 -v -0.178677 0.253829 -0.664112 -v -0.343301 0.178556 -0.527833 -v -0.432701 0.255849 -0.533965 -v -0.439395 0.221143 -0.487859 -v -0.395913 0.178556 -0.489609 -v -0.763103 0.305054 -0.040813 -v -0.720850 0.283418 -0.075890 -v -0.708584 0.280823 -0.150321 -v -0.738492 0.304289 -0.198233 -v -0.608085 0.178556 0.163390 -v -0.641543 0.255849 0.246520 -v -0.599762 0.221143 0.267133 -v -0.587989 0.178556 0.225239 -v -0.274628 0.305054 0.713142 -v -0.294930 0.283418 0.662118 -v -0.361928 0.280823 0.627452 -v -0.416737 0.304289 0.641091 -v -0.032516 0.178556 0.628815 -v 0.036206 0.255849 0.686323 -v 0.068722 0.221143 0.652957 -v 0.032516 0.178556 0.628815 -v 0.526990 0.133110 0.303194 -v 0.556407 0.131891 0.247511 -v 0.553278 0.082603 0.212305 -v 0.533030 0.032361 0.237853 -v 0.506505 0.032985 0.292622 -v 0.497336 0.084446 0.322758 -v 0.150651 -0.016982 -0.563905 -v 0.214480 -0.116784 -0.561364 -v 0.238504 -0.068663 -0.537274 -v 0.208137 -0.018012 -0.544486 -v 0.593261 0.133679 -0.125516 -v 0.603036 0.134326 -0.062764 -v 0.626836 0.177975 -0.031908 -v 0.463027 0.327916 0.713719 -v 0.589425 0.317411 0.727337 -v 0.293795 0.117192 1.089320 -v 0.406092 0.116784 1.055130 -v 0.451354 0.162299 1.014070 -v 0.387941 0.205516 1.012430 -v 0.270167 -0.253829 1.006940 -v 0.374091 -0.255491 0.973906 -v 0.435654 -0.219407 0.981551 -v 0.392922 -0.178038 1.029020 -v 0.183322 -0.274068 0.687674 -v 0.253913 -0.274687 0.663749 -v 0.303835 -0.297900 0.685229 -v 0.282686 -0.315550 0.739986 -v -0.877976 0.117192 -0.708594 -v -0.948725 0.116784 -0.614921 -v -0.961211 0.162299 -0.555101 -v -0.908947 0.205516 -0.591049 -v -0.945223 0.117192 0.616036 -v -0.877997 0.116784 0.712268 -v -0.824963 0.162299 0.742628 -v -0.843002 0.205516 0.681813 -v -0.810438 -0.253829 -0.655835 -v -0.875095 -0.255491 -0.568023 -v -0.929395 -0.219407 -0.538022 -v -0.922727 -0.178038 -0.601544 -v -0.874174 -0.253829 0.568107 -v -0.810640 -0.255491 0.656735 -v -0.798887 -0.219407 0.717647 -v -0.857240 -0.178038 0.691676 -v -0.163356 0.177975 -0.606016 -v -0.226179 0.178038 -0.586714 -v -0.626836 0.177975 -0.031908 -v -0.651577 0.217681 -0.067681 -v -0.686823 0.253829 -0.035290 -v -0.627891 0.178038 0.033805 -v -0.224050 0.177975 0.586297 -v -0.265717 0.217681 0.598772 -v -0.245803 0.253829 0.642303 -v -0.161879 0.178038 0.607607 -v 0.265717 0.217681 0.598772 -v 0.224050 0.177975 0.586297 -v 0.161879 0.178038 0.607607 -v 0.136038 0.219407 0.642519 -v 0.534908 0.253829 0.432255 -v 0.527844 0.178038 0.341717 -v 0.851732 -0.035295 -0.765874 -v 0.892012 0.016982 -0.720430 -v 0.953236 -0.084446 -0.620503 -v 0.884809 -0.085726 -0.717465 -v 0.686616 -0.319714 -0.616364 -v 0.751972 -0.305054 -0.606531 -v 0.738247 -0.326258 -0.478860 -v 0.683825 -0.327668 -0.553272 -v 0.904372 0.317411 -0.241973 -v 0.873880 0.317411 -0.335817 -v 0.821870 0.327916 -0.219814 -v 0.875830 0.326861 -0.185471 -v 0.576394 0.253829 -0.375154 -v 0.163356 0.177975 -0.606016 -v 0.226179 0.178038 -0.586714 -v 0.136980 0.217681 -0.640601 -v -0.566918 0.217681 -0.328232 -v -0.525876 0.177975 -0.342630 -v -0.488105 0.178038 -0.396413 -v -0.487719 0.219407 -0.439847 -v -0.487355 0.217681 0.437742 -v -0.488366 0.177975 0.394259 -v -0.527844 0.178038 0.341717 -v -0.569033 0.219407 0.327929 -v 0.326476 0.319231 -0.736385 -v 0.220076 0.327668 -0.822981 -v 0.167334 0.319714 -0.790449 -v -0.728934 0.315550 -0.590571 -v -0.728808 0.297900 -0.656782 -v -0.792810 0.274687 -0.643125 -v -0.853205 0.274068 -0.556409 -v -0.786921 0.315550 0.510759 -v -0.849852 0.297900 0.490179 -v -0.856642 0.274687 0.555269 -v -0.792833 0.274068 0.639505 -v 0.242589 0.315550 0.906239 -v 0.203569 0.297900 0.959731 -v 0.263375 0.274687 0.986302 -v 0.363206 0.274068 0.951647 -v 0.801232 0.319231 0.082942 -v 0.849250 0.326258 0.042984 -v 0.850710 0.327668 -0.045011 -v 0.803472 0.319714 -0.085118 -v 0.908947 0.205516 -0.591049 -v 0.961211 0.162299 -0.555101 -v 0.948725 0.116784 -0.614921 -v 0.877976 0.117192 -0.708594 -v -0.892012 0.016982 -0.720430 -v -0.851733 -0.035295 -0.765874 -v -0.884810 -0.085726 -0.717465 -v -0.953236 -0.084446 -0.620503 -v -0.960816 0.016982 0.625727 -v -0.991589 -0.035295 0.573375 -v -0.955771 -0.085726 0.619792 -v -0.884699 -0.084446 0.714832 -v 0.298193 0.016982 1.107150 -v 0.238895 -0.035295 1.120240 -v 0.294109 -0.085726 1.100520 -v 0.406460 -0.084446 1.062290 -v 0.922726 -0.178038 -0.601544 -v 0.929394 -0.219407 -0.538022 -v 0.875095 -0.255491 -0.568023 -v 0.810438 -0.253829 -0.655835 -v -0.751972 -0.305054 -0.606531 -v -0.686617 -0.319714 -0.616364 -v -0.683826 -0.327668 -0.553272 -v -0.738247 -0.326258 -0.478860 -v -0.809216 -0.305054 0.527739 -v -0.798372 -0.319714 0.462544 -v -0.737505 -0.327668 0.479386 -v -0.683553 -0.326258 0.554138 -v 0.251848 -0.305054 0.932691 -v 0.193195 -0.319714 0.902231 -v 0.228021 -0.327668 0.849548 -v 0.315787 -0.326258 0.821336 -v 0.663650 -0.315550 -0.432502 -v 0.648575 -0.297900 -0.375772 -v 0.595562 -0.274687 -0.387737 -v 0.552514 -0.274068 -0.448586 -v 0.167602 -0.205516 0.623956 -v 0.129626 -0.162299 0.606982 -v 0.156444 -0.116784 0.580221 -v 0.216496 -0.117192 0.561767 -v 0.372271 0.086058 0.459522 -v 0.321993 0.086058 0.496051 -v 0.302701 0.133679 0.525438 -v 0.341039 0.177866 0.525341 -v 0.434819 0.032985 -0.391290 -v 0.453520 -0.018012 -0.366205 -v 0.489752 -0.016982 -0.317534 -v 0.506835 0.035295 -0.292575 -v 0.713971 0.304289 -0.273701 -v 0.661613 0.280823 -0.294883 -v 0.738492 0.304289 -0.198233 -v -0.510419 0.313794 -0.786050 -v -0.589853 0.313794 -0.728338 -v -0.598285 0.322490 -0.662972 -v -0.533548 0.324773 -0.657391 -v -0.460342 0.324773 -0.710578 -v -0.445645 0.322490 -0.773870 -v -0.905308 0.313794 0.242533 -v -0.874967 0.313794 0.335913 -v -0.815406 0.322490 0.364132 -v -0.790093 0.324773 0.304288 -v -0.818054 0.324773 0.218230 -v -0.873708 0.322490 0.184694 -v -0.049093 0.313794 0.935946 -v 0.049093 0.313794 0.935946 -v 0.094336 0.322490 0.888020 -v 0.045244 0.324773 0.845453 -v -0.045244 0.324773 0.845453 -v -0.094336 0.322490 0.888020 -v 0.905308 0.313794 0.242533 -v 0.873708 0.322490 0.184694 -v 0.818054 0.324773 0.218230 -v 0.790093 0.324773 0.304288 -v 0.815406 0.322490 0.364132 -v 0.874967 0.313794 0.335913 -v 0.054292 0.273722 -1.012390 -v 0.111461 0.240977 -1.044610 -v 0.057169 0.203440 -1.080000 -v -0.057169 0.203440 -1.080000 -v -1.009490 0.203440 -0.388111 -v -1.044820 0.203440 -0.279370 -v -0.946061 0.273722 -0.364480 -v -0.959042 0.240977 -0.428808 -v -0.681063 0.203440 0.840142 -v -0.588562 0.203440 0.907348 -v -0.638990 0.273722 0.787127 -v -0.704181 0.240977 0.779593 -v 0.588562 0.203440 0.907348 -v 0.681063 0.203440 0.840142 -v 0.551143 0.273722 0.850952 -v 0.523833 0.240977 0.910623 -v 1.027930 0.240977 -0.216797 -v 1.044820 0.203440 -0.279370 -v 1.009490 0.203440 -0.388111 -v 0.959042 0.240977 -0.428808 -v 0.946061 0.273722 -0.364480 -v 0.979615 0.273722 -0.261210 -v 0.621320 0.015379 -0.958641 -v 0.707958 0.118117 -0.872314 -v 0.762140 0.067418 -0.843418 -v 0.719728 0.015379 -0.887146 -v -0.621320 0.015379 -0.958640 -v -0.719728 0.015379 -0.887145 -v -0.762140 0.067418 -0.843417 -v -0.707958 0.118117 -0.872313 -v -0.610852 0.118117 -0.942864 -v -0.566626 0.067418 -0.985463 -v -1.103730 0.015379 0.294672 -v -1.066140 0.015379 0.410357 -v -1.037650 0.067418 0.464206 -v -1.048390 0.118117 0.403746 -v -1.085480 0.118117 0.289592 -v -1.112330 0.067418 0.234367 -v -0.060819 0.015379 1.140760 -v 0.060819 0.015379 1.140760 -v 0.120834 0.067418 1.130310 -v 0.060015 0.118117 1.121840 -v -0.060015 0.118117 1.121840 -v -0.120834 0.067418 1.130310 -v 1.103730 0.015379 0.294672 -v 1.048390 0.118117 0.403746 -v 1.037650 0.067418 0.464206 -v 1.066140 0.015379 0.410357 -v 0.060224 -0.082603 -1.132020 -v 0.118874 -0.131891 -1.112400 -v 0.058650 -0.178556 -1.095010 -v -0.058650 -0.178556 -1.095010 -v -1.023290 -0.178556 -0.394155 -v -1.059540 -0.178556 -0.282596 -v -1.058010 -0.082603 -0.407088 -v -1.021220 -0.131891 -0.456805 -v -0.691077 -0.178556 0.851405 -v -0.596180 -0.178556 0.920351 -v -0.714105 -0.082603 0.880421 -v -0.750022 -0.131891 0.830075 -v 0.596180 -0.178556 0.920351 -v 0.691078 -0.178556 0.851405 -v 0.616661 -0.082603 0.951218 -v 0.557680 -0.131891 0.969818 -v 1.094690 -0.131891 -0.230694 -v 1.059540 -0.178556 -0.282596 -v 1.023290 -0.178556 -0.394155 -v 1.021220 -0.131891 -0.456805 -v 1.058010 -0.082603 -0.407088 -v 1.095230 -0.082603 -0.292535 -v 0.522745 -0.304289 -0.807095 -v 0.655086 -0.251773 -0.808346 -v 0.672458 -0.280823 -0.744657 -v 0.606057 -0.304289 -0.746566 -v -0.522745 -0.304289 -0.807095 -v -0.606058 -0.304289 -0.746566 -v -0.672459 -0.280823 -0.744657 -v -0.655087 -0.251773 -0.808346 -v -0.566351 -0.251773 -0.872816 -v -0.500411 -0.280823 -0.869656 -v -0.929131 -0.304289 0.247754 -v -0.897308 -0.304289 0.345693 -v -0.916012 -0.280823 0.409434 -v -0.971217 -0.251773 0.373231 -v -1.005110 -0.251773 0.268916 -v -0.981731 -0.280823 0.207180 -v -0.051490 -0.304289 0.960216 -v 0.051490 -0.304289 0.960216 -v 0.106331 -0.280823 0.997701 -v 0.054841 -0.251773 1.039020 -v -0.054841 -0.251773 1.039020 -v -0.106331 -0.280823 0.997701 -v 0.929131 -0.304289 0.247754 -v 0.971217 -0.251773 0.373231 -v 0.916012 -0.280823 0.409434 -v 0.897308 -0.304289 0.345693 -v 0.045922 -0.324773 -0.878367 -v 0.087996 -0.322490 -0.830037 -v 0.042073 -0.313794 -0.787875 -v -0.042073 -0.313794 -0.787875 -v -0.736313 -0.313794 -0.283481 -v -0.762316 -0.313794 -0.203453 -v -0.821188 -0.324773 -0.315105 -v -0.762221 -0.322490 -0.340185 -v -0.497139 -0.313794 0.612675 -v -0.429064 -0.313794 0.662135 -v -0.553443 -0.324773 0.683622 -v -0.559073 -0.322490 0.619792 -v 0.429064 -0.313794 0.662135 -v 0.497139 -0.313794 0.612675 -v 0.479140 -0.324773 0.737607 -v 0.416694 -0.322490 0.723237 -v 0.816604 -0.322490 -0.172807 -v 0.762315 -0.313794 -0.203453 -v 0.736312 -0.313794 -0.283481 -v 0.762220 -0.322490 -0.340185 -v 0.821187 -0.324773 -0.315105 -v 0.849568 -0.324773 -0.227756 -v 0.448001 -0.273722 -0.553888 -v 0.453178 -0.240977 -0.503173 -v 0.405929 -0.203440 -0.500873 -v 0.350920 -0.203440 -0.540840 -v -0.388339 -0.273722 -0.597236 -v -0.338506 -0.240977 -0.586487 -v -0.350920 -0.203440 -0.540840 -v -0.405929 -0.203440 -0.500873 -v -0.688007 -0.273722 0.184776 -v -0.662386 -0.240977 0.140704 -v -0.622809 -0.203440 0.166616 -v -0.601797 -0.203440 0.231283 -v -0.033997 -0.203440 0.643814 -v 0.033997 -0.203440 0.643814 -v 0.070871 -0.240977 0.673447 -v 0.036874 -0.273722 0.711434 -v -0.036874 -0.273722 0.711434 -v -0.070871 -0.240977 0.673447 -v 0.665218 -0.273722 0.254914 -v 0.618585 -0.240977 0.275509 -v 0.601797 -0.203440 0.231283 -v 0.622809 -0.203440 0.166616 -v 0.030347 -0.015379 -0.583058 -v -0.030347 -0.015379 -0.583058 -v -0.061498 -0.067418 -0.587742 -v -0.031151 -0.118117 -0.601976 -v -0.545144 -0.015379 -0.209036 -v -0.563899 -0.015379 -0.151313 -v -0.562887 -0.118117 -0.215647 -v -0.539972 -0.067418 -0.240110 -v -0.379034 -0.118117 0.468699 -v -0.395219 -0.067418 0.439346 -v -0.367264 -0.015379 0.453866 -v -0.318161 -0.015379 0.489541 -v 0.318161 -0.015379 0.489541 -v 0.367264 -0.015379 0.453866 -v 0.395219 -0.067418 0.439346 -v 0.379034 -0.118117 0.468699 -v 0.328630 -0.118117 0.505319 -v 0.295713 -0.067418 0.511641 -v 0.545143 -0.015379 -0.209036 -v 0.539972 -0.067418 -0.240110 -v 0.562886 -0.118117 -0.215647 -v 0.582139 -0.118117 -0.156394 -v 0.577980 -0.067418 -0.123134 -v 0.563898 -0.015379 -0.151313 -v 0.407336 0.131891 -0.452689 -v 0.304659 0.131891 -0.527288 -v 0.322821 0.082603 -0.496967 -v 0.372886 0.082603 -0.460593 -v 0.036324 0.251773 -0.684804 -v 0.076000 0.280823 -0.720354 -v 0.039676 0.304289 -0.763604 -v -0.039676 0.304289 -0.763604 -v -0.407336 0.131891 -0.452689 -v -0.372886 0.082603 -0.460593 -v -0.322821 0.082603 -0.496967 -v -0.304659 0.131891 -0.527288 -v -0.556407 0.131891 0.247511 -v -0.553278 0.082603 0.212305 -v -0.572401 0.082603 0.153451 -v -0.595626 0.131891 0.126807 -v -0.030942 0.082603 0.591805 -v -0.063458 0.131891 0.605660 -v 0.063458 0.131891 0.605660 -v 0.030942 0.082603 0.591805 -v 0.484900 0.280823 0.538107 -v 0.431905 0.251773 0.532667 -v 0.373131 0.251773 0.575369 -v 0.361928 0.280823 0.627452 -v 0.416737 0.304289 0.641091 -v 0.480935 0.304289 0.594448 -v 0.587989 0.178556 0.225239 -v 0.608085 0.178556 0.163390 -v 0.595626 0.131891 0.126807 -v 0.572401 0.082603 0.153451 -v 0.265523 0.274068 -0.983384 -v 0.336415 0.315550 -0.875750 -v 0.399425 0.297900 -0.896090 -v 0.366659 0.274687 -0.952740 -v 0.554759 0.274729 -0.855216 -v 0.641934 0.274729 -0.791881 -v 0.846965 0.298845 -0.490593 -v 0.853205 0.274068 -0.556409 -v 0.792810 0.274687 -0.643125 -v 0.728808 0.297900 -0.656782 -v 0.728934 0.315550 -0.590571 -v 0.786696 0.317113 -0.511099 -v 0.661793 0.326258 -0.533952 -v 0.599458 0.319231 -0.538054 -v 0.593661 0.305981 -0.479838 -v 0.641353 0.305054 -0.415522 -v 0.479482 0.306098 -0.591803 -v 0.414670 0.306098 -0.638891 -v -0.589557 0.207484 -0.908731 -v -0.641934 0.274729 -0.791881 -v -0.554759 0.274729 -0.855216 -v -0.527088 0.244243 -0.914410 -v -0.399425 0.297900 -0.896090 -v -0.336415 0.315550 -0.875750 -v -0.242982 0.317113 -0.906128 -v -0.049337 0.317411 -0.934880 -v 0.044916 0.327916 -0.849569 -v -0.303313 0.326258 -0.794400 -v -0.326476 0.319231 -0.736385 -v -0.272901 0.305981 -0.712882 -v -0.196996 0.305054 -0.738365 -v -0.414670 0.306098 -0.638891 -v -0.479482 0.306098 -0.591803 -v -0.484726 0.284629 -0.537424 -v -0.661793 0.326258 -0.533952 -v -0.714697 0.327668 -0.463621 -v -0.700054 0.319714 -0.403407 -v -0.599458 0.319231 -0.538054 -v -1.046440 0.207484 0.279887 -v -0.951496 0.274729 0.365808 -v -0.984793 0.274729 0.263329 -v -1.032540 0.244243 0.218720 -v -0.975663 0.297900 0.102967 -v -0.936848 0.315550 0.049327 -v -0.936866 0.317113 -0.048920 -v -0.794110 0.327916 -0.305250 -v -0.904372 0.317411 -0.241973 -v -0.849250 0.326258 0.042984 -v -0.801232 0.319231 0.082942 -v -0.762324 0.305981 0.039252 -v -0.735763 0.306098 0.196947 -v -0.711007 0.306098 0.273137 -v -0.660909 0.284629 0.294929 -v -0.712324 0.326258 0.464401 -v -0.661783 0.327668 0.536450 -v -0.599991 0.319714 0.541131 -v -0.696962 0.319231 0.403850 -v -0.057180 0.207484 1.081710 -v 0.053876 0.274729 1.017970 -v -0.053876 0.274729 1.017970 -v -0.111056 0.244243 1.049590 -v -0.203569 0.297900 0.959731 -v -0.242589 0.315550 0.906239 -v -0.336033 0.317113 0.875896 -v -0.535703 0.327916 0.660916 -v -0.509596 0.317411 0.785336 -v -0.221552 0.326258 0.820968 -v -0.168712 0.319231 0.787648 -v -0.198240 0.305981 0.737143 -v -0.040056 0.306098 0.760612 -v 0.040056 0.306098 0.760612 -v 0.076262 0.284629 0.719701 -v 0.221552 0.326258 0.820968 -v 0.305692 0.327668 0.795165 -v 0.329239 0.319714 0.737844 -v 0.168712 0.319231 0.787648 -v 1.017300 0.274068 -0.051355 -v 0.973571 0.298845 -0.100935 -v 0.936866 0.317113 -0.048920 -v 0.936848 0.315550 0.049327 -v 0.975663 0.297900 0.102967 -v 1.019410 0.274687 0.054299 -v 1.011100 0.207484 0.388649 -v 0.984793 0.274729 0.263329 -v 0.951496 0.274729 0.365808 -v 0.963903 0.244243 0.429962 -v 0.849852 0.297900 0.490179 -v 0.786921 0.315550 0.510759 -v 0.729187 0.317113 0.590254 -v 0.696962 0.319231 0.403850 -v 0.639804 0.305981 0.416327 -v 0.593374 0.305054 0.481559 -v 0.712324 0.326258 0.464401 -v 0.735763 0.306098 0.196947 -v 0.708042 0.284629 0.149870 -v 0.663920 0.255849 0.177651 -v 0.711007 0.306098 0.273137 -v -0.402605 0.117192 -1.053970 -v -0.449942 0.164310 -1.013320 -v -0.230904 0.162299 -1.085690 -v -0.291654 0.116784 -1.092310 -v -0.059664 0.116605 -1.127180 -v 0.059664 0.116605 -1.127180 -v 0.120253 0.068332 -1.136780 -v 0.060589 0.018305 -1.145020 -v 0.230904 0.162299 -1.085690 -v 0.281243 0.205516 -1.047100 -v -1.126800 0.117192 0.057205 -v -1.102770 0.164310 0.114785 -v -1.103910 0.162299 -0.115897 -v -1.128970 0.116784 -0.060163 -v -1.090460 0.116605 -0.291575 -v -1.053580 0.116605 -0.405063 -v -0.293795 0.117192 1.089320 -v -0.231608 0.164310 1.084260 -v -0.451354 0.162299 1.014070 -v -0.406092 0.116784 1.055130 -v -0.614275 0.116605 0.946984 -v -0.710814 0.116605 0.876844 -v 0.945223 0.117192 0.616036 -v 0.959630 0.164310 0.555329 -v 0.824963 0.162299 0.742628 -v 0.877997 0.116784 0.712268 -v 0.710814 0.116605 0.876844 -v 0.614275 0.116605 0.946984 -v 1.107710 0.018305 -0.296208 -v 1.053580 0.116605 -0.405063 -v 1.090460 0.116605 -0.291575 -v 1.118310 0.068332 -0.236918 -v 1.103910 0.162299 -0.115897 -v 1.082760 0.205516 -0.056095 -v 0.295569 -0.084446 -1.098320 -v 0.238748 -0.032985 -1.120540 -v 0.465192 -0.035295 -1.046710 -v 0.408931 -0.085726 -1.063210 -v 0.618843 -0.086058 -0.953958 -v 0.716036 -0.086058 -0.883341 -v -0.599797 -0.177866 -0.924667 -v -0.716037 -0.086058 -0.883341 -v -0.618843 -0.086058 -0.953958 -v -0.561740 -0.133679 -0.974483 -v -0.465192 -0.035295 -1.046710 -v -0.409525 0.016982 -1.070970 -v -1.064760 -0.177866 0.284702 -v -1.061380 -0.086058 0.408022 -v -1.098510 -0.086058 0.293764 -v -1.100380 -0.133679 0.233114 -v -1.139240 -0.035295 0.118971 -v -1.145110 0.016982 0.058530 -v -0.058261 -0.177866 1.100630 -v 0.060069 -0.086058 1.135520 -v -0.060069 -0.086058 1.135520 -v -0.118331 -0.133679 1.118560 -v -0.238895 -0.035295 1.120240 -v -0.298193 0.016982 1.107150 -v 1.135910 -0.084446 -0.058299 -v 1.139480 -0.032985 -0.119204 -v 1.139240 -0.035295 0.118971 -v 1.137550 -0.085726 0.060365 -v 1.028750 -0.177866 0.395521 -v 1.098510 -0.086058 0.293764 -v 1.061380 -0.086058 0.408022 -v 1.027240 -0.133679 0.458190 -v 0.991589 -0.035295 0.573375 -v 0.960816 0.016982 0.625727 -v -0.373298 -0.253829 -0.973434 -v -0.437543 -0.217681 -0.982548 -v -0.224491 -0.219407 -1.050160 -v -0.269803 -0.255491 -1.007790 -v -0.054936 -0.255849 -1.039770 -v 0.054936 -0.255849 -1.039770 -v 0.106023 -0.284629 -1.001870 -v 0.051087 -0.306098 -0.965478 -v 0.224491 -0.219407 -1.050160 -v 0.286965 -0.178038 -1.063450 -v -1.041150 -0.253829 0.054219 -v -1.069670 -0.217681 0.112503 -v -1.068130 -0.219407 -0.111014 -v -1.041840 -0.255491 -0.054827 -v -1.005860 -0.255849 -0.269059 -v -0.971905 -0.255849 -0.373554 -v -0.270167 -0.253829 1.006940 -v -0.223549 -0.217681 1.052080 -v -0.435654 -0.219407 0.981551 -v -0.374091 -0.255491 0.973906 -v -0.566717 -0.255849 0.873480 -v -0.655605 -0.255849 0.808900 -v 0.874174 -0.253829 0.568107 -v 0.931506 -0.217681 0.537718 -v 0.798887 -0.219407 0.717647 -v 0.810640 -0.255491 0.656735 -v 0.655605 -0.255849 0.808900 -v 0.566717 -0.255849 0.873480 -v 0.934013 -0.306098 -0.249763 -v 0.971905 -0.255849 -0.373554 -v 1.005860 -0.255849 -0.269059 -v 0.985593 -0.284629 -0.208760 -v 1.068140 -0.219407 -0.111014 -v 1.100080 -0.178038 -0.055705 -v 0.227292 -0.326258 -0.850089 -v 0.191817 -0.319231 -0.905033 -v 0.374020 -0.319714 -0.843477 -v 0.314879 -0.327668 -0.821326 -v 0.477809 -0.327916 -0.736292 -v 0.552604 -0.327916 -0.681950 -v -0.431241 -0.317411 -0.664675 -v -0.552605 -0.327916 -0.681950 -v -0.477810 -0.327916 -0.736292 -v -0.417401 -0.326861 -0.724270 -v -0.374021 -0.319714 -0.843477 -v -0.344474 -0.305054 -0.902595 -v -0.765403 -0.317411 0.204738 -v -0.819336 -0.327916 0.314824 -v -0.847906 -0.327916 0.226897 -v -0.817805 -0.326861 0.173160 -v -0.917774 -0.319714 0.095066 -v -0.964870 -0.305054 0.048696 -v -0.041806 -0.317411 0.791211 -v 0.046226 -0.327916 0.876523 -v -0.046226 -0.327916 0.876523 -v -0.088032 -0.326861 0.831290 -v -0.193195 -0.319714 0.902231 -v -0.251848 -0.305054 0.932691 -v 0.878721 -0.326258 -0.046524 -v 0.920014 -0.319231 -0.097241 -v 0.917774 -0.319714 0.095066 -v 0.878431 -0.327668 0.045664 -v 0.739566 -0.317411 0.284257 -v 0.847906 -0.327916 0.226897 -v 0.819336 -0.327916 0.314824 -v 0.763398 -0.326861 0.340606 -v 0.798372 -0.319714 0.462544 -v 0.809216 -0.305054 0.527739 -v -0.255894 -0.274068 -0.664092 -v -0.306415 -0.298845 -0.686590 -v -0.156960 -0.297900 -0.732951 -v -0.184722 -0.274687 -0.686230 -v -0.037266 -0.274729 -0.708126 -v 0.037266 -0.274729 -0.708126 -v 0.071229 -0.244243 -0.671977 -v 0.033963 -0.207484 -0.644379 -v 0.156960 -0.297900 -0.732951 -v 0.206255 -0.315550 -0.764819 -v -0.710665 -0.274068 0.038154 -v -0.747672 -0.298845 0.079250 -v -0.745581 -0.297900 -0.077217 -v -0.709725 -0.274687 -0.036376 -v -0.684985 -0.274729 -0.183381 -v -0.661953 -0.274729 -0.254265 -v -0.617078 -0.244243 -0.275395 -v -0.602346 -0.207484 -0.231424 -v -0.648575 -0.297900 -0.375772 -v -0.663651 -0.315550 -0.432502 -v -0.183322 -0.274068 0.687674 -v -0.155673 -0.298845 0.735570 -v -0.303835 -0.297900 0.685229 -v -0.253913 -0.274687 0.663749 -v -0.386078 -0.274729 0.594791 -v -0.446375 -0.274729 0.550983 -v -0.452603 -0.244243 0.501774 -v -0.406233 -0.207484 0.501351 -v -0.557801 -0.297900 0.500712 -v -0.616413 -0.315550 0.497518 -v 0.597366 -0.274068 0.386851 -v 0.651461 -0.298845 0.375357 -v 0.557800 -0.297900 0.500712 -v 0.552799 -0.274687 0.446595 -v 0.502344 -0.205516 -0.406277 -v 0.505347 -0.117192 -0.327226 -v 0.446375 -0.274729 0.550983 -v 0.386078 -0.274729 0.594791 -v 0.623335 -0.207484 -0.166823 -v 0.661953 -0.274729 -0.254265 -v 0.684984 -0.274729 -0.183381 -v 0.661098 -0.244243 -0.139910 -v 0.745581 -0.297900 -0.077217 -v 0.791122 -0.315550 -0.040182 -v 0.251906 -0.162299 -0.567251 -v 0.293542 -0.068332 -0.509561 -v 0.326562 -0.116605 -0.503028 -v 0.366263 -0.018305 -0.452137 -v 0.316826 -0.018305 -0.488056 -v -0.505348 -0.117192 -0.327226 -v -0.538798 -0.164310 -0.310622 -v -0.461645 -0.162299 -0.414867 -v -0.467611 -0.116784 -0.377453 -v -0.377494 -0.116605 -0.466023 -v -0.326562 -0.116605 -0.503028 -v -0.293542 -0.068332 -0.509561 -v -0.316826 -0.018305 -0.488056 -v -0.251906 -0.162299 -0.567251 -v -0.231159 -0.205516 -0.603304 -v -0.467371 -0.117192 0.379496 -v -0.461917 -0.164310 0.416440 -v -0.537218 -0.162299 0.310849 -v -0.503479 -0.116784 0.328085 -v -0.559866 -0.116605 0.215010 -v -0.579320 -0.116605 0.155135 -v -0.575330 -0.068332 0.121712 -v -0.562073 -0.018305 0.150503 -v -0.617331 -0.162299 0.064287 -v -0.645208 -0.205516 0.033415 -v -0.030554 -0.018305 0.581071 -v 0.031478 -0.116605 0.598906 -v -0.031478 -0.116605 0.598906 -v -0.062032 -0.068332 0.584783 -v -0.129626 -0.162299 0.606982 -v -0.167602 -0.205516 0.623956 -v 0.617331 -0.162299 0.064287 -v 0.600166 -0.116784 0.030512 -v 0.601173 -0.117192 -0.032304 -v 0.618475 -0.164310 -0.065398 -v 0.543189 -0.018305 0.208620 -v 0.579320 -0.116605 0.155135 -v 0.559866 -0.116605 0.215010 -v 0.536992 -0.068332 0.239704 -v 0.537218 -0.162299 0.310849 -v 0.541625 -0.205516 0.352211 -v -0.121634 0.035295 -0.572439 -v -0.153988 0.085726 -0.572011 -v -0.212641 0.084446 -0.553443 -v -0.237772 0.032985 -0.534452 -v -0.063955 0.133679 -0.603011 -v -0.031073 0.086058 -0.590577 -v 0.031073 0.086058 -0.590577 -v 0.063955 0.133679 -0.603011 -v 0.032881 0.177866 -0.625468 -v -0.032881 0.177866 -0.625468 -v 0.153988 0.085726 -0.572011 -v 0.121634 0.035295 -0.572439 -v 0.237772 0.032985 -0.534452 -v 0.212641 0.084446 -0.553443 -v -0.582009 0.035295 -0.061212 -v -0.591600 0.085726 -0.030309 -v -0.592066 0.084446 0.031211 -v -0.581770 0.032985 0.060980 -v -0.593261 0.133679 -0.125516 -v -0.571275 0.086058 -0.152946 -v -0.552070 0.086058 -0.212051 -v -0.553735 0.133679 -0.247165 -v -0.584694 0.177866 -0.224552 -v -0.605016 0.177866 -0.162008 -v -0.496430 0.085726 -0.323213 -v -0.506835 0.035295 -0.292575 -v -0.489752 -0.016982 -0.317534 -v -0.460646 0.084446 -0.373257 -v -0.153275 0.084446 0.572733 -v -0.121781 0.032985 0.572141 -v -0.238067 0.035295 0.534608 -v -0.211640 0.085726 0.553280 -v -0.302701 0.133679 0.525438 -v -0.321993 0.086058 0.496051 -v -0.372271 0.086058 0.459522 -v -0.406182 0.133679 0.450255 -v -0.394242 0.177866 0.486687 -v -0.341039 0.177866 0.525341 -v -0.460799 0.085726 0.372255 -v -0.434876 0.035295 0.391619 -v -0.453335 -0.016982 0.367659 -v -0.497336 0.084446 0.322758 -v 0.211640 0.085726 0.553280 -v 0.238067 0.035295 0.534608 -v 0.209576 -0.016982 0.544760 -v 0.153275 0.084446 0.572733 -v 0.434876 0.035295 0.391619 -v 0.460799 0.085726 0.372255 -v 0.627891 0.178038 0.033805 -v 0.653109 0.219407 0.069169 -v 0.552070 0.086058 -0.212051 -v 0.571274 0.086058 -0.152946 -v 0.591600 0.085726 -0.030309 -v 0.582009 0.035295 -0.061212 -v 0.582860 -0.016982 -0.030978 -v 0.592066 0.084446 0.031211 -v 0.084592 0.321544 -0.804353 -v 0.363342 0.325471 -0.818634 -v -0.912748 0.243204 -0.529430 -v -0.657733 0.299125 -0.730107 -v -0.666291 0.325471 -0.598530 -v -0.785574 0.243204 0.704470 -v -0.897626 0.299125 0.399924 -v -0.775133 0.325471 0.448723 -v 0.427235 0.243204 0.964819 -v 0.102969 0.299125 0.977276 -v 0.187232 0.325471 0.875858 -v 0.791127 0.321544 -0.168107 -v 0.892326 0.328444 -0.093657 -v 0.890847 0.325471 0.092586 -v 0.787176 0.320726 0.166080 -v 0.850859 0.068042 -0.762451 -v 1.015460 0.162451 -0.452785 -v 0.912748 0.243204 -0.529430 -v -0.972322 -0.133110 -0.564368 -v -0.768168 -0.036275 -0.851623 -v -0.850859 0.068042 -0.762451 -v -0.837209 -0.133110 0.750330 -v -1.047320 -0.036275 0.467403 -v -0.988063 0.068042 0.573603 -v 0.454895 -0.133110 1.028090 -v 0.120889 -0.036275 1.140500 -v 0.240201 0.068042 1.116960 -v 0.749841 -0.283418 -0.672735 -v 0.981059 -0.221143 -0.438196 -v 0.972321 -0.133110 -0.564368 -v -0.724178 -0.325471 -0.418840 -v -0.618085 -0.321544 -0.684476 -v -0.749841 -0.283418 -0.672735 -v -0.622122 -0.325471 0.559305 -v -0.841973 -0.321544 0.376318 -v -0.871521 -0.283418 0.505254 -v 0.339684 -0.325471 0.764509 -v 0.097716 -0.321544 0.917053 -v 0.211210 -0.283418 0.984997 -v 0.502841 -0.243204 -0.453366 -v 0.683194 -0.299125 -0.305406 -v 0.724177 -0.325471 -0.418840 -v 0.240820 -0.068042 0.538320 -v 0.065476 -0.162451 0.615737 -v 0.140325 -0.243204 0.662344 -v 0.326047 0.218220 0.566505 -v 0.246041 0.134326 0.554126 -v 0.291760 0.036275 0.506068 -v 0.391141 0.036275 0.433865 -v 0.533499 0.036275 -0.237925 -v 0.511245 -0.068042 -0.293959 -v 0.390926 0.032361 -0.433442 -v 0.460342 0.324773 -0.710578 -v 0.533548 0.324773 -0.657391 -v 0.598285 0.322490 -0.662972 -v 0.589853 0.313794 -0.728338 -v 0.510419 0.313794 -0.786050 -v 0.627786 0.283418 -0.362309 -v 0.491125 0.299125 -0.851153 -v 0.657733 0.299125 -0.730107 -v 0.666291 0.325471 -0.598530 -v 0.539219 0.320726 -0.597051 -v -0.491125 0.299125 -0.851153 -v -0.363342 0.325471 -0.818634 -v -0.401202 0.320726 -0.697326 -v -0.539219 0.320726 -0.597051 -v -0.961263 0.299125 0.204065 -v -0.890847 0.325471 0.092586 -v -0.787176 0.320726 0.166080 -v -0.734458 0.320726 0.328328 -v -0.102969 0.299125 0.977276 -v -0.187232 0.325471 0.875858 -v -0.085299 0.320726 0.799971 -v 0.085299 0.320726 0.799971 -v 0.961263 0.299125 0.204065 -v 0.897626 0.299125 0.399924 -v 0.775133 0.325471 0.448723 -v 0.734458 0.320726 0.328328 -v -0.116833 0.162451 -1.105660 -v 0.116833 0.162451 -1.105660 -v 0.221465 0.243204 -1.031670 -v -1.087660 0.162451 -0.230556 -v -1.015460 0.162451 -0.452785 -v -0.555378 0.162451 0.963180 -v -0.744417 0.162451 0.825834 -v 0.744417 0.162451 0.825834 -v 0.555378 0.162451 0.963180 -v 1.087660 0.162451 -0.230556 -v 1.049620 0.243204 -0.108180 -v 0.957573 0.300726 -0.202173 -v 0.893528 0.300726 -0.399287 -v 0.572567 -0.036275 -0.993734 -v 0.768168 -0.036275 -0.851623 -v -0.572567 -0.036275 -0.993734 -v -0.462206 0.068042 -1.044820 -v -0.553768 0.165858 -0.961575 -v -1.122040 -0.036275 0.237461 -v -1.136520 0.068042 0.116715 -v -1.085640 0.165858 0.229520 -v -0.120889 -0.036275 1.140500 -v -0.240201 0.068042 1.116960 -v -0.117194 0.165858 1.103430 -v 1.122040 -0.036275 0.237461 -v 1.047320 -0.036275 0.467403 -v 0.988063 0.068042 0.573603 -v 1.013210 0.165858 0.452437 -v -0.113586 -0.221143 -1.068450 -v 0.113586 -0.221143 -1.068450 -v 0.236284 -0.133110 -1.099130 -v 0.120813 -0.032361 -1.140960 -v -1.051260 -0.221143 -0.222143 -v -0.981059 -0.221143 -0.438196 -v -0.536127 -0.221143 0.931157 -v -0.719912 -0.221143 0.797630 -v 0.719912 -0.221143 0.797630 -v 0.536127 -0.221143 0.931157 -v 1.051260 -0.221143 -0.222143 -v 1.118350 -0.133110 -0.114931 -v 1.122460 -0.032361 -0.237678 -v 0.459977 -0.321544 -0.799347 -v 0.618084 -0.321544 -0.684476 -v -0.459977 -0.321544 -0.799347 -v -0.408096 -0.283418 -0.921026 -v -0.538281 -0.218220 -0.933299 -v -0.902365 -0.321544 0.190452 -v -1.002060 -0.283418 0.103509 -v -1.053960 -0.218220 0.223529 -v -0.097716 -0.321544 0.917053 -v -0.211210 -0.283418 0.984997 -v -0.113103 -0.218220 1.071450 -v 0.902365 -0.321544 0.190452 -v 0.841973 -0.321544 0.376318 -v 0.871521 -0.283418 0.505254 -v 0.984058 -0.218220 0.438663 -v -0.079339 -0.299125 -0.744131 -v 0.079339 -0.299125 -0.744131 -v 0.174557 -0.325471 -0.818161 -v 0.097009 -0.320726 -0.921435 -v -0.732229 -0.299125 -0.154493 -v -0.683195 -0.299125 -0.305406 -v -0.373203 -0.299125 0.648650 -v -0.501576 -0.299125 0.555381 -v 0.501576 -0.299125 0.555381 -v 0.373203 -0.299125 0.648650 -v 0.732228 -0.299125 -0.154493 -v 0.832059 -0.325471 -0.086812 -v 0.906316 -0.320726 -0.192478 -v 0.308950 -0.162451 -0.536627 -v -0.414892 -0.162451 -0.459656 -v -0.308950 -0.162451 -0.536627 -v -0.275790 -0.243204 -0.618328 -v -0.376144 -0.300726 -0.651574 -v -0.565367 -0.162451 0.252544 -v -0.605833 -0.162451 0.128002 -v -0.673288 -0.243204 0.071219 -v -0.735917 -0.300726 0.156386 -v -0.065476 -0.162451 0.615737 -v -0.140325 -0.243204 0.662344 -v -0.078679 -0.300726 0.748227 -v 0.605833 -0.162451 0.128002 -v 0.565367 -0.162451 0.252544 -v 0.586563 -0.243204 0.338132 -v 0.687291 -0.300726 0.306043 -v -0.061420 0.036275 -0.580911 -v 0.061420 0.036275 -0.580911 -v -0.571459 0.036275 -0.121097 -v -0.533499 0.036275 -0.237925 -v -0.511245 -0.068042 -0.293959 -v -0.567611 -0.165858 -0.252893 -v -0.291760 0.036275 0.506068 -v -0.391141 0.036275 0.433865 -v -0.437555 -0.068042 0.395384 -v -0.415916 -0.165858 0.461682 -v 0.571459 0.036275 -0.121097 -v 0.586390 -0.068042 -0.062684 -v 0.607852 -0.165858 -0.129038 -v 0.291424 0.032361 -0.505734 -v 0.248131 0.133110 -0.555046 -v 0.069206 0.218220 -0.649957 -v 0.126656 0.134326 -0.592916 -v -0.126656 0.134326 -0.592916 -v -0.248131 0.133110 -0.555046 -v -0.291424 0.032361 -0.505734 -v -0.451203 0.133110 -0.407505 -v -0.738846 0.321544 -0.329012 -v -0.713971 0.304289 -0.273701 -v -0.662780 0.277623 -0.292968 -v -0.524758 0.134326 -0.303678 -v -0.640063 0.251773 -0.246163 -v -0.662513 0.251773 -0.177069 -v -0.639532 0.218220 -0.135029 -v -0.598142 0.214411 -0.268393 -v -0.604557 0.133110 0.064468 -v -0.603036 0.134326 -0.062764 -v -0.571037 0.032361 0.120881 -v -0.526990 0.133110 0.303194 -v -0.541224 0.321544 0.601014 -v -0.480934 0.304289 0.594448 -v -0.450974 0.134326 0.405233 -v -0.431905 0.251773 0.532667 -v -0.373130 0.251773 0.575369 -v -0.326047 0.218220 0.566505 -v -0.125506 0.133110 0.594890 -v -0.246041 0.134326 0.554126 -v -0.061496 0.032361 0.580443 -v 0.125506 0.133110 0.594890 -v 0.538573 0.283418 0.485101 -v 0.404351 0.321544 0.700459 -v 0.604557 0.133110 0.064468 -v 0.642234 0.221143 0.136416 -v 0.307944 0.325241 -0.786511 -v 0.397599 0.315408 -0.702360 -v 0.450058 0.318243 -0.771391 -v -0.483449 0.277512 0.539581 -v -0.529779 0.253137 0.432188 -v -0.440707 0.214901 0.485918 -vn -0.665651 0.739160 0.102717 -vn -0.665651 0.739160 0.102717 -vn -0.665651 0.739160 0.102717 -vn -0.665651 0.739160 0.102717 -vn -0.665651 0.739160 0.102717 -vn -0.665651 0.739160 0.102717 -vn -0.486457 0.720698 0.493917 -vn -0.486457 0.720698 0.493917 -vn -0.486457 0.720698 0.493917 -vn -0.486457 0.720698 0.493917 -vn -0.486457 0.720698 0.493917 -vn -0.486457 0.720698 0.493917 -vn 0.437498 0.836273 0.330518 -vn 0.437498 0.836273 0.330518 -vn 0.437498 0.836273 0.330518 -vn 0.437498 0.836273 0.330518 -vn 0.437498 0.836273 0.330518 -vn 0.437498 0.836273 0.330518 -vn 0.499497 0.734225 -0.459800 -vn 0.499497 0.734225 -0.459800 -vn 0.499497 0.734225 -0.459800 -vn 0.499497 0.734225 -0.459800 -vn 0.499497 0.734225 -0.459800 -vn 0.499497 0.734225 -0.459800 -vn -0.157586 0.831195 -0.533181 -vn -0.157586 0.831195 -0.533181 -vn -0.157586 0.831195 -0.533181 -vn -0.157586 0.831195 -0.533181 -vn -0.157586 0.831195 -0.533181 -vn -0.157586 0.831195 -0.533181 -vn -0.054720 0.996936 -0.055897 -vn -0.054720 0.996936 -0.055897 -vn -0.054720 0.996936 -0.055897 -vn -0.054720 0.996936 -0.055897 -vn -0.054720 0.996936 -0.055897 -vn -0.054720 0.996936 -0.055897 -vn 0.320359 0.179455 -0.930143 -vn 0.320359 0.179455 -0.930143 -vn 0.320359 0.179455 -0.930143 -vn 0.320359 0.179455 -0.930143 -vn 0.320359 0.179455 -0.930143 -vn 0.320359 0.179455 -0.930143 -vn 0.701164 0.014876 0.712845 -vn 0.701164 0.014876 0.712845 -vn 0.701164 0.014876 0.712845 -vn 0.701164 0.014876 0.712845 -vn 0.701164 0.014876 0.712845 -vn 0.701164 0.014876 0.712845 -vn 0.188896 -0.829249 -0.525989 -vn 0.188896 -0.829249 -0.525989 -vn 0.188896 -0.829249 -0.525989 -vn 0.188896 -0.829249 -0.525989 -vn 0.188896 -0.829249 -0.525989 -vn 0.188896 -0.829249 -0.525989 -vn 0.270990 -0.922392 0.275241 -vn 0.270990 -0.922392 0.275241 -vn 0.270990 -0.922392 0.275241 -vn 0.270990 -0.922392 0.275241 -vn 0.270990 -0.922392 0.275241 -vn 0.270990 -0.922392 0.275241 -vn -0.209326 -0.691760 0.691123 -vn -0.209326 -0.691760 0.691123 -vn -0.209326 -0.691760 0.691123 -vn -0.209326 -0.691760 0.691123 -vn -0.209326 -0.691760 0.691123 -vn -0.209326 -0.691760 0.691123 -vn -0.579791 -0.563557 -0.588426 -vn -0.579791 -0.563557 -0.588426 -vn -0.579791 -0.563557 -0.588426 -vn -0.579791 -0.563557 -0.588426 -vn -0.579791 -0.563557 -0.588426 -vn -0.579791 -0.563557 -0.588426 -vn 0.077126 0.996936 0.013057 -vn 0.077126 0.996936 0.013057 -vn 0.077126 0.996936 0.013057 -vn 0.077126 0.996936 0.013057 -vn 0.077126 0.996936 0.013057 -vn 0.077126 0.996936 0.013057 -vn 0.036251 0.996936 -0.069316 -vn 0.036251 0.996936 -0.069316 -vn 0.036251 0.996936 -0.069316 -vn 0.036251 0.996936 -0.069316 -vn 0.036251 0.996936 -0.069316 -vn 0.036251 0.996936 -0.069316 -vn -0.986254 0.014902 -0.164561 -vn -0.986254 0.014902 -0.164561 -vn -0.986254 0.014902 -0.164561 -vn -0.986254 0.014902 -0.164561 -vn -0.986254 0.014902 -0.164561 -vn -0.986254 0.014902 -0.164561 -vn -0.461274 0.014884 0.887133 -vn -0.461274 0.014884 0.887133 -vn -0.461274 0.014884 0.887133 -vn -0.461274 0.014884 0.887133 -vn -0.461274 0.014884 0.887133 -vn -0.461274 0.014884 0.887133 -vn 0.983603 0.179523 0.017216 -vn 0.983603 0.179523 0.017216 -vn 0.983603 0.179523 0.017216 -vn 0.983603 0.179523 0.017216 -vn 0.983603 0.179523 0.017216 -vn 0.983603 0.179523 0.017216 -vn -0.381025 -0.922389 -0.063395 -vn -0.381025 -0.922389 -0.063395 -vn -0.381025 -0.922389 -0.063395 -vn -0.381025 -0.922389 -0.063395 -vn -0.381025 -0.922389 -0.063395 -vn -0.381025 -0.922389 -0.063395 -vn -0.178033 -0.922389 0.342786 -vn -0.178033 -0.922389 0.342786 -vn -0.178033 -0.922389 0.342786 -vn -0.178033 -0.922389 0.342786 -vn -0.178033 -0.922389 0.342786 -vn -0.178033 -0.922389 0.342786 -vn 0.558621 -0.829247 0.017099 -vn 0.558621 -0.829247 0.017099 -vn 0.558621 -0.829247 0.017099 -vn 0.558621 -0.829247 0.017099 -vn 0.558621 -0.829247 0.017099 -vn 0.558621 -0.829247 0.017099 -vn 0.814931 -0.563555 0.135254 -vn 0.814931 -0.563555 0.135254 -vn 0.814931 -0.563555 0.135254 -vn 0.814931 -0.563555 0.135254 -vn 0.814931 -0.563555 0.135254 -vn 0.814931 -0.563555 0.135254 -vn 0.380462 -0.563559 -0.733246 -vn 0.380462 -0.563559 -0.733246 -vn 0.380462 -0.563559 -0.733246 -vn 0.380462 -0.563559 -0.733246 -vn 0.380462 -0.563559 -0.733246 -vn 0.380462 -0.563559 -0.733246 -vn -0.721984 -0.691758 0.014485 -vn -0.721984 -0.691758 0.014485 -vn -0.721984 -0.691758 0.014485 -vn -0.721984 -0.691758 0.014485 -vn -0.721984 -0.691758 0.014485 -vn -0.721984 -0.691758 0.014485 -vn 0.893781 -0.035876 -0.447066 -vn 0.893781 -0.035876 -0.447066 -vn 0.893781 -0.035876 -0.447066 -vn 0.893781 -0.035876 -0.447066 -vn 0.893781 -0.035876 -0.447066 -vn 0.893781 -0.035876 -0.447066 -vn 0.894628 0.014869 -0.446565 -vn 0.894628 0.014869 -0.446565 -vn 0.894628 0.014869 -0.446565 -vn 0.894628 0.014869 -0.446565 -vn 0.894628 0.014869 -0.446565 -vn 0.894628 0.014869 -0.446565 -vn 0.345511 -0.922392 -0.172671 -vn 0.345511 -0.922392 -0.172671 -vn 0.345511 -0.922392 -0.172671 -vn 0.345511 -0.922392 -0.172671 -vn 0.345511 -0.922392 -0.172671 -vn 0.345511 -0.922392 -0.172671 -vn -0.738794 -0.563558 0.369576 -vn -0.738794 -0.563558 0.369576 -vn -0.738794 -0.563558 0.369576 -vn -0.738794 -0.563558 0.369576 -vn -0.738794 -0.563558 0.369576 -vn -0.738794 -0.563558 0.369576 -vn 0.575533 0.689678 0.439438 -vn 0.575533 0.689678 0.439438 -vn 0.575533 0.689678 0.439438 -vn 0.575533 0.689678 0.439438 -vn 0.575533 0.689678 0.439438 -vn 0.575533 0.689678 0.439438 -vn 0.745457 -0.356957 0.562917 -vn 0.745457 -0.356957 0.562917 -vn 0.745457 -0.356957 0.562917 -vn 0.745457 -0.356957 0.562917 -vn 0.745457 -0.356957 0.562917 -vn 0.745457 -0.356957 0.562917 -vn -0.105817 -0.992743 -0.057135 -vn -0.105817 -0.992743 -0.057135 -vn -0.105817 -0.992743 -0.057135 -vn -0.105817 -0.992743 -0.057135 -vn -0.105817 -0.992743 -0.057135 -vn -0.105817 -0.992743 -0.057135 -vn 0.011415 0.996936 0.077386 -vn 0.011415 0.996936 0.077386 -vn 0.011415 0.996936 0.077386 -vn 0.011415 0.996936 0.077386 -vn 0.011415 0.996936 0.077386 -vn 0.011415 0.996936 0.077386 -vn -0.148241 0.014861 -0.988840 -vn -0.148241 0.014861 -0.988840 -vn -0.148241 0.014861 -0.988840 -vn -0.148241 0.014861 -0.988840 -vn -0.148241 0.014861 -0.988840 -vn -0.148241 0.014861 -0.988840 -vn -0.057450 -0.922397 -0.381948 -vn -0.057450 -0.922397 -0.381948 -vn -0.057450 -0.922397 -0.381948 -vn -0.057450 -0.922397 -0.381948 -vn -0.057450 -0.922397 -0.381948 -vn -0.057450 -0.922397 -0.381948 -vn 0.123196 -0.563559 0.816838 -vn 0.123196 -0.563559 0.816838 -vn 0.123196 -0.563559 0.816838 -vn 0.123196 -0.563559 0.816838 -vn 0.123196 -0.563559 0.816838 -vn 0.123196 -0.563559 0.816838 -vn 0.317287 -0.180229 0.931046 -vn 0.317287 -0.180229 0.931046 -vn 0.317287 -0.180229 0.931046 -vn 0.317287 -0.180229 0.931046 -vn 0.317287 -0.180229 0.931046 -vn 0.317287 -0.180229 0.931046 -vn 0.983526 -0.180220 -0.014053 -vn 0.983526 -0.180220 -0.014053 -vn 0.983526 -0.180220 -0.014053 -vn 0.983526 -0.180220 -0.014053 -vn 0.983526 -0.180220 -0.014053 -vn 0.983526 -0.180220 -0.014053 -vn -0.985863 -0.035875 -0.163666 -vn -0.985863 -0.035875 -0.163666 -vn -0.985863 -0.035875 -0.163666 -vn -0.985863 -0.035875 -0.163666 -vn -0.985863 -0.035875 -0.163666 -vn -0.985863 -0.035875 -0.163666 -vn 0.218324 -0.950283 0.222028 -vn 0.218324 -0.950283 0.222028 -vn 0.218324 -0.950283 0.222028 -vn 0.218324 -0.950283 0.222028 -vn 0.218324 -0.950283 0.222028 -vn 0.218324 -0.950283 0.222028 -vn 0.278628 -0.950283 -0.139028 -vn 0.278628 -0.950283 -0.139028 -vn 0.278628 -0.950283 -0.139028 -vn 0.278628 -0.950283 -0.139028 -vn 0.278628 -0.950283 -0.139028 -vn 0.278628 -0.950283 -0.139028 -vn 0.701375 -0.035882 0.711889 -vn 0.701375 -0.035882 0.711889 -vn 0.701375 -0.035882 0.711889 -vn 0.701375 -0.035882 0.711889 -vn 0.701375 -0.035882 0.711889 -vn 0.701375 -0.035882 0.711889 -vn -0.776479 0.497307 0.386996 -vn -0.776479 0.497307 0.386996 -vn -0.776479 0.497307 0.386996 -vn -0.776479 0.497307 0.386996 -vn -0.776479 0.497307 0.386996 -vn -0.776479 0.497307 0.386996 -vn -0.803950 -0.180223 -0.566731 -vn -0.803950 -0.180223 -0.566731 -vn -0.803950 -0.180223 -0.566731 -vn -0.803950 -0.180223 -0.566731 -vn -0.803950 -0.180223 -0.566731 -vn -0.803950 -0.180223 -0.566731 -vn -0.070071 0.996936 0.034769 -vn -0.070071 0.996936 0.034769 -vn -0.070071 0.996936 0.034769 -vn -0.070071 0.996936 0.034769 -vn -0.070071 0.996936 0.034769 -vn -0.070071 0.996936 0.034769 -vn 0.385535 0.547002 -0.743069 -vn 0.385535 0.547002 -0.743069 -vn 0.385535 0.547002 -0.743069 -vn 0.385535 0.547002 -0.743069 -vn 0.385535 0.547002 -0.743069 -vn 0.385535 0.547002 -0.743069 -vn 0.396258 -0.512349 -0.761891 -vn 0.396258 -0.512349 -0.761891 -vn 0.396258 -0.512349 -0.761891 -vn 0.396258 -0.512349 -0.761891 -vn 0.396258 -0.512349 -0.761891 -vn 0.396258 -0.512349 -0.761891 -vn -0.143697 -0.950282 0.276251 -vn -0.143697 -0.950282 0.276251 -vn -0.143697 -0.950282 0.276251 -vn -0.143697 -0.950282 0.276251 -vn -0.143697 -0.950282 0.276251 -vn -0.143697 -0.950282 0.276251 -vn 0.592610 -0.691761 0.412651 -vn 0.592610 -0.691761 0.412651 -vn 0.592610 -0.691761 0.412651 -vn 0.592610 -0.691761 0.412651 -vn 0.592610 -0.691761 0.412651 -vn 0.592610 -0.691761 0.412651 -vn 0.575584 -0.691759 -0.436087 -vn 0.575584 -0.691759 -0.436087 -vn 0.575584 -0.691759 -0.436087 -vn 0.575584 -0.691759 -0.436087 -vn 0.575584 -0.691759 -0.436087 -vn 0.575584 -0.691759 -0.436087 -vn -0.620068 0.720697 -0.310020 -vn -0.620068 0.720697 -0.310020 -vn -0.620068 0.720697 -0.310020 -vn -0.620068 0.720697 -0.310020 -vn -0.620068 0.720697 -0.310020 -vn -0.620068 0.720697 -0.310020 -vn 0.319419 0.720695 0.615280 -vn 0.319419 0.720695 0.615280 -vn 0.319419 0.720695 0.615280 -vn 0.319419 0.720695 0.615280 -vn 0.319419 0.720695 0.615280 -vn 0.319419 0.720695 0.615280 -vn 0.683868 0.720699 -0.113655 -vn 0.683868 0.720699 -0.113655 -vn 0.683868 0.720699 -0.113655 -vn 0.683868 0.720699 -0.113655 -vn 0.683868 0.720699 -0.113655 -vn 0.683868 0.720699 -0.113655 -vn 0.103237 0.720695 -0.685522 -vn 0.103237 0.720695 -0.685522 -vn 0.103237 0.720695 -0.685522 -vn 0.103237 0.720695 -0.685522 -vn 0.103237 0.720695 -0.685522 -vn 0.103237 0.720695 -0.685522 -vn -0.207325 0.689664 -0.693816 -vn -0.207325 0.689664 -0.693816 -vn -0.207325 0.689664 -0.693816 -vn -0.207325 0.689664 -0.693816 -vn -0.207325 0.689664 -0.693816 -vn -0.207325 0.689664 -0.693816 -vn -0.723897 0.689694 -0.017215 -vn -0.723897 0.689694 -0.017215 -vn -0.723897 0.689694 -0.017215 -vn -0.723897 0.689694 -0.017215 -vn -0.723897 0.689694 -0.017215 -vn -0.723897 0.689694 -0.017215 -vn -0.240083 0.689662 0.683174 -vn -0.240083 0.689662 0.683174 -vn -0.240083 0.689662 0.683174 -vn -0.240083 0.689662 0.683174 -vn -0.240083 0.689662 0.683174 -vn -0.240083 0.689662 0.683174 -vn 0.825830 0.547014 0.137041 -vn 0.825830 0.547014 0.137041 -vn 0.825830 0.547014 0.137041 -vn 0.825830 0.547014 0.137041 -vn 0.825830 0.547014 0.137041 -vn 0.825830 0.547014 0.137041 -vn -0.272212 -0.356955 -0.893579 -vn -0.272212 -0.356955 -0.893579 -vn -0.272212 -0.356955 -0.893579 -vn -0.272212 -0.356955 -0.893579 -vn -0.272212 -0.356955 -0.893579 -vn -0.272212 -0.356955 -0.893579 -vn -0.933947 -0.356995 -0.017274 -vn -0.933947 -0.356995 -0.017274 -vn -0.933947 -0.356995 -0.017274 -vn -0.933947 -0.356995 -0.017274 -vn -0.933947 -0.356995 -0.017274 -vn -0.933947 -0.356995 -0.017274 -vn -0.305022 -0.356977 0.882909 -vn -0.305022 -0.356977 0.882909 -vn -0.305022 -0.356977 0.882909 -vn -0.305022 -0.356977 0.882909 -vn -0.305022 -0.356977 0.882909 -vn -0.305022 -0.356977 0.882909 -vn 0.847032 -0.512376 0.141446 -vn 0.847032 -0.512376 0.141446 -vn 0.847032 -0.512376 0.141446 -vn 0.847032 -0.512376 0.141446 -vn 0.847032 -0.512376 0.141446 -vn 0.847032 -0.512376 0.141446 -vn 0.052025 -0.992743 0.108421 -vn 0.052025 -0.992743 0.108421 -vn 0.052025 -0.992743 0.108421 -vn 0.052025 -0.992743 0.108421 -vn 0.052025 -0.992743 0.108421 -vn 0.052025 -0.992743 0.108421 -vn 0.119191 -0.992743 -0.015976 -vn 0.119191 -0.992743 -0.015976 -vn 0.119191 -0.992743 -0.015976 -vn 0.119191 -0.992743 -0.015976 -vn 0.119191 -0.992743 -0.015976 -vn 0.119191 -0.992743 -0.015976 -vn 0.021639 -0.992743 -0.118295 -vn 0.021639 -0.992743 -0.118295 -vn 0.021639 -0.992743 -0.118295 -vn 0.021639 -0.992743 -0.118295 -vn 0.021639 -0.992743 -0.118295 -vn 0.021639 -0.992743 -0.118295 -vn -0.307132 -0.950284 -0.051298 -vn -0.307132 -0.950284 -0.051298 -vn -0.307132 -0.950284 -0.051298 -vn -0.307132 -0.950284 -0.051298 -vn -0.307132 -0.950284 -0.051298 -vn -0.307132 -0.950284 -0.051298 -vn 0.290567 -0.180221 -0.939729 -vn 0.290567 -0.180221 -0.939729 -vn 0.290567 -0.180221 -0.939729 -vn 0.290567 -0.180221 -0.939729 -vn 0.290567 -0.180221 -0.939729 -vn 0.290567 -0.180221 -0.939729 -vn 0.049423 0.947042 -0.317285 -vn 0.049423 0.947042 -0.317285 -vn 0.049423 0.947042 -0.317285 -vn 0.049423 0.947042 -0.317285 -vn 0.049423 0.947042 -0.317285 -vn 0.049423 0.947042 -0.317285 -vn -0.587546 0.547014 -0.596292 -vn -0.587546 0.547014 -0.596292 -vn -0.587546 0.547014 -0.596292 -vn -0.587546 0.547014 -0.596292 -vn -0.587546 0.547014 -0.596292 -vn -0.587546 0.547014 -0.596292 -vn -0.748670 0.547015 0.374524 -vn -0.748670 0.547015 0.374524 -vn -0.748670 0.547015 0.374524 -vn -0.748670 0.547015 0.374524 -vn -0.748670 0.547015 0.374524 -vn -0.748670 0.547015 0.374524 -vn 0.124854 0.546993 0.827774 -vn 0.124854 0.546993 0.827774 -vn 0.124854 0.546993 0.827774 -vn 0.124854 0.546993 0.827774 -vn 0.124854 0.546993 0.827774 -vn 0.124854 0.546993 0.827774 -vn -0.602150 -0.512336 -0.612313 -vn -0.602150 -0.512336 -0.612313 -vn -0.602150 -0.512336 -0.612313 -vn -0.602150 -0.512336 -0.612313 -vn -0.602150 -0.512336 -0.612313 -vn -0.602150 -0.512336 -0.612313 -vn -0.768424 -0.512327 0.383465 -vn -0.768424 -0.512327 0.383465 -vn -0.768424 -0.512327 0.383465 -vn -0.768424 -0.512327 0.383465 -vn -0.768424 -0.512327 0.383465 -vn -0.768424 -0.512327 0.383465 -vn 0.127282 -0.512338 0.849299 -vn 0.127282 -0.512338 0.849299 -vn 0.127282 -0.512338 0.849299 -vn 0.127282 -0.512338 0.849299 -vn 0.127282 -0.512338 0.849299 -vn 0.127282 -0.512338 0.849299 -vn -0.663639 -0.323160 0.674649 -vn -0.663639 -0.323160 0.674649 -vn -0.663639 -0.323160 0.674649 -vn -0.663639 -0.323160 0.674649 -vn -0.663639 -0.323160 0.674649 -vn -0.663639 -0.323160 0.674649 -vn -0.046124 -0.950283 -0.307954 -vn -0.046124 -0.950283 -0.307954 -vn -0.046124 -0.950283 -0.307954 -vn -0.046124 -0.950283 -0.307954 -vn -0.046124 -0.950283 -0.307954 -vn -0.046124 -0.950283 -0.307954 -vn -0.319420 0.720695 0.615280 -vn -0.319420 0.720695 0.615280 -vn -0.319420 0.720695 0.615280 -vn -0.319420 0.720695 0.615280 -vn -0.319420 0.720695 0.615280 -vn -0.319420 0.720695 0.615280 -vn -0.148988 -0.035876 -0.988188 -vn -0.148988 -0.035876 -0.988188 -vn -0.148988 -0.035876 -0.988188 -vn -0.148988 -0.035876 -0.988188 -vn -0.148988 -0.035876 -0.988188 -vn -0.148988 -0.035876 -0.988188 -vn -0.185907 0.831194 0.523981 -vn -0.185907 0.831194 0.523981 -vn -0.185907 0.831194 0.523981 -vn -0.185907 0.831194 0.523981 -vn -0.185907 0.831194 0.523981 -vn -0.185907 0.831194 0.523981 -vn -0.286483 0.947042 -0.145050 -vn -0.286483 0.947042 -0.145050 -vn -0.286483 0.947042 -0.145050 -vn -0.286483 0.947042 -0.145050 -vn -0.286483 0.947042 -0.145050 -vn -0.286483 0.947042 -0.145050 -vn -0.226479 0.947042 0.227638 -vn -0.226479 0.947042 0.227638 -vn -0.226479 0.947042 0.227638 -vn -0.226479 0.947042 0.227638 -vn -0.226479 0.947042 0.227638 -vn -0.226479 0.947042 0.227638 -vn 0.146509 0.947042 0.285738 -vn 0.146509 0.947042 0.285738 -vn 0.146509 0.947042 0.285738 -vn 0.146509 0.947042 0.285738 -vn 0.146509 0.947042 0.285738 -vn 0.146509 0.947042 0.285738 -vn -0.555780 0.831196 -0.014888 -vn -0.555780 0.831196 -0.014888 -vn -0.555780 0.831196 -0.014888 -vn -0.555780 0.831196 -0.014888 -vn -0.555780 0.831196 -0.014888 -vn -0.555780 0.831196 -0.014888 -vn 0.587546 0.547014 -0.596292 -vn 0.587546 0.547014 -0.596292 -vn 0.587546 0.547014 -0.596292 -vn 0.587546 0.547014 -0.596292 -vn 0.587546 0.547014 -0.596292 -vn 0.587546 0.547014 -0.596292 -vn -0.894628 0.014868 -0.446565 -vn -0.894628 0.014868 -0.446565 -vn -0.894628 0.014868 -0.446565 -vn -0.894628 0.014868 -0.446565 -vn -0.894628 0.014868 -0.446565 -vn -0.894628 0.014868 -0.446565 -vn -0.701164 0.014875 0.712844 -vn -0.701164 0.014875 0.712844 -vn -0.701164 0.014875 0.712844 -vn -0.701164 0.014875 0.712844 -vn -0.701164 0.014875 0.712844 -vn -0.701164 0.014875 0.712844 -vn 0.461274 0.014884 0.887133 -vn 0.461274 0.014884 0.887133 -vn 0.461274 0.014884 0.887133 -vn 0.461274 0.014884 0.887133 -vn 0.461274 0.014884 0.887133 -vn 0.461274 0.014884 0.887133 -vn 0.602151 -0.512336 -0.612313 -vn 0.602151 -0.512336 -0.612313 -vn 0.602151 -0.512336 -0.612313 -vn 0.602151 -0.512336 -0.612313 -vn 0.602151 -0.512336 -0.612313 -vn 0.602151 -0.512336 -0.612313 -vn -0.345510 -0.922392 -0.172672 -vn -0.345510 -0.922392 -0.172672 -vn -0.345510 -0.922392 -0.172672 -vn -0.345510 -0.922392 -0.172672 -vn -0.345510 -0.922392 -0.172672 -vn -0.345510 -0.922392 -0.172672 -vn -0.270990 -0.922392 0.275241 -vn -0.270990 -0.922392 0.275241 -vn -0.270990 -0.922392 0.275241 -vn -0.270990 -0.922392 0.275241 -vn -0.270990 -0.922392 0.275241 -vn -0.270990 -0.922392 0.275241 -vn 0.178032 -0.922389 0.342786 -vn 0.178032 -0.922389 0.342786 -vn 0.178032 -0.922389 0.342786 -vn 0.178032 -0.922389 0.342786 -vn 0.178032 -0.922389 0.342786 -vn 0.178032 -0.922389 0.342786 -vn -0.218324 -0.950283 0.222029 -vn -0.218324 -0.950283 0.222029 -vn -0.218324 -0.950283 0.222029 -vn -0.218324 -0.950283 0.222029 -vn -0.218324 -0.950283 0.222029 -vn -0.218324 -0.950283 0.222029 -vn -0.380463 -0.563559 -0.733246 -vn -0.380463 -0.563559 -0.733246 -vn -0.380463 -0.563559 -0.733246 -vn -0.380463 -0.563559 -0.733246 -vn -0.380463 -0.563559 -0.733246 -vn -0.380463 -0.563559 -0.733246 -vn -0.608002 0.497305 -0.618887 -vn -0.608002 0.497305 -0.618887 -vn -0.608002 0.497305 -0.618887 -vn -0.608002 0.497305 -0.618887 -vn -0.608002 0.497305 -0.618887 -vn -0.608002 0.497305 -0.618887 -vn -0.763495 0.358330 0.537285 -vn -0.763495 0.358330 0.537285 -vn -0.763495 0.358330 0.537285 -vn -0.763495 0.358330 0.537285 -vn -0.763495 0.358330 0.537285 -vn -0.763495 0.358330 0.537285 -vn -0.740326 0.627736 0.240549 -vn -0.740326 0.627736 0.240549 -vn -0.740326 0.627736 0.240549 -vn -0.740326 0.627736 0.240549 -vn -0.740326 0.627736 0.240549 -vn -0.740326 0.627736 0.240549 -vn -0.081471 0.788532 -0.609574 -vn -0.081471 0.788532 -0.609574 -vn -0.081471 0.788532 -0.609574 -vn -0.081471 0.788532 -0.609574 -vn -0.081471 0.788532 -0.609574 -vn -0.081471 0.788532 -0.609574 -vn -0.604890 0.788551 -0.110881 -vn -0.604890 0.788551 -0.110881 -vn -0.604890 0.788551 -0.110881 -vn -0.604890 0.788551 -0.110881 -vn -0.604890 0.788551 -0.110881 -vn -0.604890 0.788551 -0.110881 -vn -0.292395 0.788540 0.541027 -vn -0.292395 0.788540 0.541027 -vn -0.292395 0.788540 0.541027 -vn -0.292395 0.788540 0.541027 -vn -0.292395 0.788540 0.541027 -vn -0.292395 0.788540 0.541027 -vn 0.424192 0.788539 0.445272 -vn 0.424192 0.788539 0.445272 -vn 0.424192 0.788539 0.445272 -vn 0.424192 0.788539 0.445272 -vn 0.424192 0.788539 0.445272 -vn 0.424192 0.788539 0.445272 -vn 0.448687 0.297884 -0.842583 -vn 0.448687 0.297884 -0.842583 -vn 0.448687 0.297884 -0.842583 -vn 0.448687 0.297884 -0.842583 -vn 0.448687 0.297884 -0.842583 -vn 0.448687 0.297884 -0.842583 -vn 0.939992 0.297883 0.166374 -vn 0.939992 0.297883 0.166374 -vn 0.939992 0.297883 0.166374 -vn 0.939992 0.297883 0.166374 -vn 0.939992 0.297883 0.166374 -vn 0.939992 0.297883 0.166374 -vn -0.135827 -0.243541 -0.960333 -vn -0.135827 -0.243541 -0.960333 -vn -0.135827 -0.243541 -0.960333 -vn -0.135827 -0.243541 -0.960333 -vn -0.135827 -0.243541 -0.960333 -vn -0.135827 -0.243541 -0.960333 -vn -0.955284 -0.243612 -0.167587 -vn -0.955284 -0.243612 -0.167587 -vn -0.955284 -0.243612 -0.167587 -vn -0.955284 -0.243612 -0.167587 -vn -0.955284 -0.243612 -0.167587 -vn -0.955284 -0.243612 -0.167587 -vn -0.454582 -0.243628 0.856739 -vn -0.454582 -0.243628 0.856739 -vn -0.454582 -0.243628 0.856739 -vn -0.454582 -0.243628 0.856739 -vn -0.454582 -0.243628 0.856739 -vn -0.454582 -0.243628 0.856739 -vn 0.674334 -0.243586 0.697093 -vn 0.674334 -0.243586 0.697093 -vn 0.674334 -0.243586 0.697093 -vn 0.674334 -0.243586 0.697093 -vn 0.674334 -0.243586 0.697093 -vn 0.674334 -0.243586 0.697093 -vn 0.315114 -0.742298 -0.591352 -vn 0.315114 -0.742298 -0.591352 -vn 0.315114 -0.742298 -0.591352 -vn 0.315114 -0.742298 -0.591352 -vn 0.315114 -0.742298 -0.591352 -vn 0.315114 -0.742298 -0.591352 -vn 0.659789 -0.742293 0.116962 -vn 0.659789 -0.742293 0.116962 -vn 0.659789 -0.742293 0.116962 -vn 0.659789 -0.742293 0.116962 -vn 0.659789 -0.742293 0.116962 -vn 0.659789 -0.742293 0.116962 -vn -0.000283 -0.998946 -0.045896 -vn -0.000283 -0.998946 -0.045896 -vn -0.000283 -0.998946 -0.045896 -vn -0.000283 -0.998946 -0.045896 -vn -0.000283 -0.998946 -0.045896 -vn -0.000283 -0.998946 -0.045896 -vn -0.043736 -0.998946 -0.013913 -vn -0.043736 -0.998946 -0.013913 -vn -0.043736 -0.998946 -0.013913 -vn -0.043736 -0.998946 -0.013913 -vn -0.043736 -0.998946 -0.013913 -vn -0.043736 -0.998946 -0.013913 -vn -0.026748 -0.998946 0.037296 -vn -0.026748 -0.998946 0.037296 -vn -0.026748 -0.998946 0.037296 -vn -0.026748 -0.998946 0.037296 -vn -0.026748 -0.998946 0.037296 -vn -0.026748 -0.998946 0.037296 -vn 0.027205 -0.998946 0.036964 -vn 0.027205 -0.998946 0.036964 -vn 0.027205 -0.998946 0.036964 -vn 0.027205 -0.998946 0.036964 -vn 0.027205 -0.998946 0.036964 -vn 0.027205 -0.998946 0.036964 -vn -0.273619 -0.793446 0.543669 -vn -0.273619 -0.793446 0.543669 -vn -0.273619 -0.793446 0.543669 -vn -0.273619 -0.793446 0.543669 -vn -0.273619 -0.793446 0.543669 -vn -0.273619 -0.793446 0.543669 -vn 0.432506 -0.793447 0.428230 -vn 0.432506 -0.793447 0.428230 -vn 0.432506 -0.793447 0.428230 -vn 0.432506 -0.793447 0.428230 -vn 0.432506 -0.793447 0.428230 -vn 0.432506 -0.793447 0.428230 -vn 0.540926 -0.793444 -0.279007 -vn 0.540926 -0.793444 -0.279007 -vn 0.540926 -0.793444 -0.279007 -vn 0.540926 -0.793444 -0.279007 -vn 0.540926 -0.793444 -0.279007 -vn 0.540926 -0.793444 -0.279007 -vn -0.601616 -0.793443 -0.092229 -vn -0.601616 -0.793443 -0.092229 -vn -0.601616 -0.793443 -0.092229 -vn -0.601616 -0.793443 -0.092229 -vn -0.601616 -0.793443 -0.092229 -vn -0.601616 -0.793443 -0.092229 -vn -0.150684 -0.306871 0.939747 -vn -0.150684 -0.306871 0.939747 -vn -0.150684 -0.306871 0.939747 -vn -0.150684 -0.306871 0.939747 -vn -0.150684 -0.306871 0.939747 -vn -0.150684 -0.306871 0.939747 -vn 0.940315 -0.306879 0.147084 -vn 0.940315 -0.306879 0.147084 -vn 0.940315 -0.306879 0.147084 -vn 0.940315 -0.306879 0.147084 -vn 0.940315 -0.306879 0.147084 -vn 0.940315 -0.306879 0.147084 -vn 0.430463 -0.306878 -0.848839 -vn 0.430463 -0.306878 -0.848839 -vn 0.430463 -0.306878 -0.848839 -vn 0.430463 -0.306878 -0.848839 -vn 0.430463 -0.306878 -0.848839 -vn 0.430463 -0.306878 -0.848839 -vn -0.470782 0.598735 0.647982 -vn -0.470782 0.598735 0.647982 -vn -0.470782 0.598735 0.647982 -vn -0.470782 0.598735 0.647982 -vn -0.470782 0.598735 0.647982 -vn -0.470782 0.598735 0.647982 -vn 0.108008 0.739155 0.664819 -vn 0.108008 0.739155 0.664819 -vn 0.108008 0.739155 0.664819 -vn 0.108008 0.739155 0.664819 -vn 0.108008 0.739155 0.664819 -vn 0.108008 0.739155 0.664819 -vn 0.470782 0.598735 0.647982 -vn 0.470782 0.598735 0.647982 -vn 0.470782 0.598735 0.647982 -vn 0.470782 0.598735 0.647982 -vn 0.470782 0.598735 0.647982 -vn 0.470782 0.598735 0.647982 -vn 0.411829 0.909202 0.061222 -vn 0.411829 0.909202 0.061222 -vn 0.411829 0.909202 0.061222 -vn 0.411829 0.909202 0.061222 -vn 0.411829 0.909202 0.061222 -vn 0.411829 0.909202 0.061222 -vn 0.761744 0.598739 -0.247504 -vn 0.761744 0.598739 -0.247504 -vn 0.761744 0.598739 -0.247504 -vn 0.761744 0.598739 -0.247504 -vn 0.761744 0.598739 -0.247504 -vn 0.761744 0.598739 -0.247504 -vn 0.185486 0.909202 -0.372755 -vn 0.185486 0.909202 -0.372755 -vn 0.185486 0.909202 -0.372755 -vn 0.185486 0.909202 -0.372755 -vn 0.185486 0.909202 -0.372755 -vn 0.185486 0.909202 -0.372755 -vn 0.000000 0.598731 -0.800950 -vn 0.000000 0.598731 -0.800950 -vn 0.000000 0.598731 -0.800950 -vn 0.000000 0.598731 -0.800950 -vn 0.000000 0.598731 -0.800950 -vn 0.000000 0.598731 -0.800950 -vn -0.865360 0.235631 -0.442301 -vn -0.865360 0.235631 -0.442301 -vn -0.865360 0.235631 -0.442301 -vn -0.865360 0.235631 -0.442301 -vn -0.865360 0.235631 -0.442301 -vn -0.865360 0.235631 -0.442301 -vn -0.317287 -0.180229 0.931046 -vn -0.317287 -0.180229 0.931046 -vn -0.317287 -0.180229 0.931046 -vn -0.317287 -0.180229 0.931046 -vn -0.317287 -0.180229 0.931046 -vn -0.317287 -0.180229 0.931046 -vn -0.855654 0.497309 0.143317 -vn -0.855654 0.497309 0.143317 -vn -0.855654 0.497309 0.143317 -vn -0.855654 0.497309 0.143317 -vn -0.855654 0.497309 0.143317 -vn -0.855654 0.497309 0.143317 -vn 0.072667 0.992329 0.100018 -vn 0.072667 0.992329 0.100018 -vn 0.072667 0.992329 0.100018 -vn 0.072667 0.992329 0.100018 -vn 0.072667 0.992329 0.100018 -vn 0.072667 0.992329 0.100018 -vn 0.275681 0.446903 0.851045 -vn 0.275681 0.446903 0.851045 -vn 0.275681 0.446903 0.851045 -vn 0.275681 0.446903 0.851045 -vn 0.275681 0.446903 0.851045 -vn 0.275681 0.446903 0.851045 -vn 0.244717 -0.614512 0.749993 -vn 0.244717 -0.614512 0.749993 -vn 0.244717 -0.614512 0.749993 -vn 0.244717 -0.614512 0.749993 -vn 0.244717 -0.614512 0.749993 -vn 0.244717 -0.614512 0.749993 -vn -0.141264 -0.889845 -0.433844 -vn -0.141264 -0.889845 -0.433844 -vn -0.141264 -0.889845 -0.433844 -vn -0.141264 -0.889845 -0.433844 -vn -0.141264 -0.889845 -0.433844 -vn -0.141264 -0.889845 -0.433844 -vn -0.723277 0.446891 -0.526458 -vn -0.723277 0.446891 -0.526458 -vn -0.723277 0.446891 -0.526458 -vn -0.723277 0.446891 -0.526458 -vn -0.723277 0.446891 -0.526458 -vn -0.723277 0.446891 -0.526458 -vn -0.724192 0.446890 0.525201 -vn -0.724192 0.446890 0.525201 -vn -0.724192 0.446890 0.525201 -vn -0.724192 0.446890 0.525201 -vn -0.724192 0.446890 0.525201 -vn -0.724192 0.446890 0.525201 -vn -0.638809 -0.614519 -0.462914 -vn -0.638809 -0.614519 -0.462914 -vn -0.638809 -0.614519 -0.462914 -vn -0.638809 -0.614519 -0.462914 -vn -0.638809 -0.614519 -0.462914 -vn -0.638809 -0.614519 -0.462914 -vn -0.637659 -0.614519 0.464497 -vn -0.637659 -0.614519 0.464497 -vn -0.637659 -0.614519 0.464497 -vn -0.637659 -0.614519 0.464497 -vn -0.637659 -0.614519 0.464497 -vn -0.637659 -0.614519 0.464497 -vn 0.242813 0.615554 0.749757 -vn 0.242813 0.615554 0.749757 -vn 0.242813 0.615554 0.749757 -vn 0.242813 0.615554 0.749757 -vn 0.242813 0.615554 0.749757 -vn 0.242813 0.615554 0.749757 -vn 0.788092 0.615558 0.000758 -vn 0.788092 0.615558 0.000758 -vn 0.788092 0.615558 0.000758 -vn 0.788092 0.615558 0.000758 -vn 0.788092 0.615558 0.000758 -vn 0.788092 0.615558 0.000758 -vn 0.244257 0.615555 -0.749286 -vn 0.244257 0.615555 -0.749286 -vn 0.244257 0.615555 -0.749286 -vn 0.244257 0.615555 -0.749286 -vn 0.244257 0.615555 -0.749286 -vn 0.244257 0.615555 -0.749286 -vn -0.244257 0.615555 -0.749286 -vn -0.244257 0.615555 -0.749286 -vn -0.244257 0.615555 -0.749286 -vn -0.244257 0.615555 -0.749286 -vn -0.244257 0.615555 -0.749286 -vn -0.244257 0.615555 -0.749286 -vn -0.637134 0.615556 -0.463843 -vn -0.637134 0.615556 -0.463843 -vn -0.637134 0.615556 -0.463843 -vn -0.637134 0.615556 -0.463843 -vn -0.637134 0.615556 -0.463843 -vn -0.637134 0.615556 -0.463843 -vn 0.805585 -0.090576 -0.585515 -vn 0.805585 -0.090576 -0.585515 -vn 0.805585 -0.090576 -0.585515 -vn 0.805585 -0.090576 -0.585515 -vn 0.805585 -0.090576 -0.585515 -vn 0.805585 -0.090576 -0.585515 -vn 0.193122 -0.970939 -0.141357 -vn 0.193122 -0.970939 -0.141357 -vn 0.193122 -0.970939 -0.141357 -vn 0.193122 -0.970939 -0.141357 -vn 0.193122 -0.970939 -0.141357 -vn 0.193122 -0.970939 -0.141357 -vn 0.117580 0.992328 -0.038204 -vn 0.117580 0.992328 -0.038204 -vn 0.117580 0.992328 -0.038204 -vn 0.117580 0.992328 -0.038204 -vn 0.117580 0.992328 -0.038204 -vn 0.117580 0.992328 -0.038204 -vn -0.638027 0.615556 0.462615 -vn -0.638027 0.615556 0.462615 -vn -0.638027 0.615556 0.462615 -vn -0.638027 0.615556 0.462615 -vn -0.638027 0.615556 0.462615 -vn -0.638027 0.615556 0.462615 -vn -0.242812 0.615554 0.749757 -vn -0.242812 0.615554 0.749757 -vn -0.242812 0.615554 0.749757 -vn -0.242812 0.615554 0.749757 -vn -0.242812 0.615554 0.749757 -vn -0.242812 0.615554 0.749757 -vn 0.649136 0.603929 0.462485 -vn 0.649136 0.603929 0.462485 -vn 0.649136 0.603929 0.462485 -vn 0.649136 0.603929 0.462485 -vn 0.649136 0.603929 0.462485 -vn 0.649136 0.603929 0.462485 -vn -0.073702 0.971082 0.227087 -vn -0.073702 0.971082 0.227087 -vn -0.073702 0.971082 0.227087 -vn -0.073702 0.971082 0.227087 -vn -0.073702 0.971082 0.227087 -vn -0.073702 0.971082 0.227087 -vn -0.371119 0.888965 -0.268351 -vn -0.371119 0.888965 -0.268351 -vn -0.371119 0.888965 -0.268351 -vn -0.371119 0.888965 -0.268351 -vn -0.371119 0.888965 -0.268351 -vn -0.371119 0.888965 -0.268351 -vn -0.369898 0.888966 0.270028 -vn -0.369898 0.888966 0.270028 -vn -0.369898 0.888966 0.270028 -vn -0.369898 0.888966 0.270028 -vn -0.369898 0.888966 0.270028 -vn -0.369898 0.888966 0.270028 -vn 0.142506 0.888966 0.435237 -vn 0.142506 0.888966 0.435237 -vn 0.142506 0.888966 0.435237 -vn 0.142506 0.888966 0.435237 -vn 0.142506 0.888966 0.435237 -vn 0.142506 0.888966 0.435237 -vn -0.237275 0.971443 0.000120 -vn -0.237275 0.971443 0.000120 -vn -0.237275 0.971443 0.000120 -vn -0.237275 0.971443 0.000120 -vn -0.237275 0.971443 0.000120 -vn -0.237275 0.971443 0.000120 -vn 0.723277 0.446892 -0.526458 -vn 0.723277 0.446892 -0.526458 -vn 0.723277 0.446892 -0.526458 -vn 0.723277 0.446892 -0.526458 -vn 0.723277 0.446892 -0.526458 -vn 0.723277 0.446892 -0.526458 -vn -0.805588 -0.090573 -0.585513 -vn -0.805588 -0.090573 -0.585513 -vn -0.805588 -0.090573 -0.585513 -vn -0.805588 -0.090573 -0.585513 -vn -0.805588 -0.090573 -0.585513 -vn -0.805588 -0.090573 -0.585513 -vn -0.805794 -0.090579 0.585227 -vn -0.805794 -0.090579 0.585227 -vn -0.805794 -0.090579 0.585227 -vn -0.805794 -0.090579 0.585227 -vn -0.805794 -0.090579 0.585227 -vn -0.805794 -0.090579 0.585227 -vn 0.307588 -0.090567 0.947200 -vn 0.307588 -0.090567 0.947200 -vn 0.307588 -0.090567 0.947200 -vn 0.307588 -0.090567 0.947200 -vn 0.307588 -0.090567 0.947200 -vn 0.307588 -0.090567 0.947200 -vn 0.638812 -0.614516 -0.462913 -vn 0.638812 -0.614516 -0.462913 -vn 0.638812 -0.614516 -0.462913 -vn 0.638812 -0.614516 -0.462913 -vn 0.638812 -0.614516 -0.462913 -vn 0.638812 -0.614516 -0.462913 -vn -0.193124 -0.970939 -0.141357 -vn -0.193124 -0.970939 -0.141357 -vn -0.193124 -0.970939 -0.141357 -vn -0.193124 -0.970939 -0.141357 -vn -0.193124 -0.970939 -0.141357 -vn -0.193124 -0.970939 -0.141357 -vn -0.194117 -0.970939 0.139990 -vn -0.194117 -0.970939 0.139990 -vn -0.194117 -0.970939 0.139990 -vn -0.194117 -0.970939 0.139990 -vn -0.194117 -0.970939 0.139990 -vn -0.194117 -0.970939 0.139990 -vn 0.073152 -0.970938 0.227876 -vn 0.073152 -0.970938 0.227876 -vn 0.073152 -0.970938 0.227876 -vn 0.073152 -0.970938 0.227876 -vn 0.073152 -0.970938 0.227876 -vn 0.073152 -0.970938 0.227876 -vn -0.369292 -0.889844 0.267957 -vn -0.369292 -0.889844 0.267957 -vn -0.369292 -0.889844 0.267957 -vn -0.369292 -0.889844 0.267957 -vn -0.369292 -0.889844 0.267957 -vn -0.369292 -0.889844 0.267957 -vn -0.275613 -0.447751 -0.850621 -vn -0.275613 -0.447751 -0.850621 -vn -0.275613 -0.447751 -0.850621 -vn -0.275613 -0.447751 -0.850621 -vn -0.275613 -0.447751 -0.850621 -vn -0.275613 -0.447751 -0.850621 -vn -0.549230 0.356204 -0.755953 -vn -0.549230 0.356204 -0.755953 -vn -0.549230 0.356204 -0.755953 -vn -0.549230 0.356204 -0.755953 -vn -0.549230 0.356204 -0.755953 -vn -0.549230 0.356204 -0.755953 -vn -0.805567 0.090770 0.585511 -vn -0.805567 0.090770 0.585511 -vn -0.805567 0.090770 0.585511 -vn -0.805567 0.090770 0.585511 -vn -0.805567 0.090770 0.585511 -vn -0.805567 0.090770 0.585511 -vn -0.526334 0.832902 0.171016 -vn -0.526334 0.832902 0.171016 -vn -0.526334 0.832902 0.171016 -vn -0.526334 0.832902 0.171016 -vn -0.526334 0.832902 0.171016 -vn -0.526334 0.832902 0.171016 -vn -0.071291 0.992617 -0.098125 -vn -0.071291 0.992617 -0.098125 -vn -0.071291 0.992617 -0.098125 -vn -0.071291 0.992617 -0.098125 -vn -0.071291 0.992617 -0.098125 -vn -0.071291 0.992617 -0.098125 -vn -0.115352 0.992617 0.037480 -vn -0.115352 0.992617 0.037480 -vn -0.115352 0.992617 0.037480 -vn -0.115352 0.992617 0.037480 -vn -0.115352 0.992617 0.037480 -vn -0.115352 0.992617 0.037480 -vn 0.000000 0.992617 0.121288 -vn 0.000000 0.992617 0.121288 -vn 0.000000 0.992617 0.121288 -vn 0.000000 0.992617 0.121288 -vn 0.000000 0.992617 0.121288 -vn 0.000000 0.992617 0.121288 -vn 0.115352 0.992617 0.037480 -vn 0.115352 0.992617 0.037480 -vn 0.115352 0.992617 0.037480 -vn 0.115352 0.992617 0.037480 -vn 0.115352 0.992617 0.037480 -vn 0.115352 0.992617 0.037480 -vn 0.000000 0.693209 -0.720737 -vn 0.000000 0.693209 -0.720737 -vn 0.000000 0.693209 -0.720737 -vn 0.000000 0.693209 -0.720737 -vn 0.000000 0.693209 -0.720737 -vn 0.000000 0.693209 -0.720737 -vn -0.685383 0.693295 -0.222695 -vn -0.685383 0.693295 -0.222695 -vn -0.685383 0.693295 -0.222695 -vn -0.685383 0.693295 -0.222695 -vn -0.685383 0.693295 -0.222695 -vn -0.685383 0.693295 -0.222695 -vn -0.423610 0.693261 0.583047 -vn -0.423610 0.693261 0.583047 -vn -0.423610 0.693261 0.583047 -vn -0.423610 0.693261 0.583047 -vn -0.423610 0.693261 0.583047 -vn -0.423610 0.693261 0.583047 -vn 0.423609 0.693261 0.583048 -vn 0.423609 0.693261 0.583048 -vn 0.423609 0.693261 0.583048 -vn 0.423609 0.693261 0.583048 -vn 0.423609 0.693261 0.583048 -vn 0.423609 0.693261 0.583048 -vn 0.685383 0.693294 -0.222695 -vn 0.685383 0.693294 -0.222695 -vn 0.685383 0.693294 -0.222695 -vn 0.685383 0.693294 -0.222695 -vn 0.685383 0.693294 -0.222695 -vn 0.685383 0.693294 -0.222695 -vn 0.578053 0.181122 -0.795644 -vn 0.578053 0.181122 -0.795644 -vn 0.578053 0.181122 -0.795644 -vn 0.578053 0.181122 -0.795644 -vn 0.578053 0.181122 -0.795644 -vn 0.578053 0.181122 -0.795644 -vn -0.578056 0.181118 -0.795643 -vn -0.578056 0.181118 -0.795643 -vn -0.578056 0.181118 -0.795643 -vn -0.578056 0.181118 -0.795643 -vn -0.578056 0.181118 -0.795643 -vn -0.578056 0.181118 -0.795643 -vn -0.935313 0.181197 0.303904 -vn -0.935313 0.181197 0.303904 -vn -0.935313 0.181197 0.303904 -vn -0.935313 0.181197 0.303904 -vn -0.935313 0.181197 0.303904 -vn -0.935313 0.181197 0.303904 -vn 0.000000 0.181148 0.983456 -vn 0.000000 0.181148 0.983456 -vn 0.000000 0.181148 0.983456 -vn 0.000000 0.181148 0.983456 -vn 0.000000 0.181148 0.983456 -vn 0.000000 0.181148 0.983456 -vn 0.935313 0.181197 0.303904 -vn 0.935313 0.181197 0.303904 -vn 0.935313 0.181197 0.303904 -vn 0.935313 0.181197 0.303904 -vn 0.935313 0.181197 0.303904 -vn 0.935313 0.181197 0.303904 -vn 0.000000 -0.359914 -0.932985 -vn 0.000000 -0.359914 -0.932985 -vn 0.000000 -0.359914 -0.932985 -vn 0.000000 -0.359914 -0.932985 -vn 0.000000 -0.359914 -0.932985 -vn 0.000000 -0.359914 -0.932985 -vn -0.887301 -0.359964 -0.288309 -vn -0.887301 -0.359964 -0.288309 -vn -0.887301 -0.359964 -0.288309 -vn -0.887301 -0.359964 -0.288309 -vn -0.887301 -0.359964 -0.288309 -vn -0.887301 -0.359964 -0.288309 -vn -0.548391 -0.359913 0.754804 -vn -0.548391 -0.359913 0.754804 -vn -0.548391 -0.359913 0.754804 -vn -0.548391 -0.359913 0.754804 -vn -0.548391 -0.359913 0.754804 -vn -0.548391 -0.359913 0.754804 -vn 0.548391 -0.359913 0.754804 -vn 0.548391 -0.359913 0.754804 -vn 0.548391 -0.359913 0.754804 -vn 0.548391 -0.359913 0.754804 -vn 0.548391 -0.359913 0.754804 -vn 0.548391 -0.359913 0.754804 -vn 0.887301 -0.359964 -0.288309 -vn 0.887301 -0.359964 -0.288309 -vn 0.887301 -0.359964 -0.288309 -vn 0.887301 -0.359964 -0.288309 -vn 0.887301 -0.359964 -0.288309 -vn 0.887301 -0.359964 -0.288309 -vn 0.326106 -0.831979 -0.448848 -vn 0.326106 -0.831979 -0.448848 -vn 0.326106 -0.831979 -0.448848 -vn 0.326106 -0.831979 -0.448848 -vn 0.326106 -0.831979 -0.448848 -vn 0.326106 -0.831979 -0.448848 -vn -0.326105 -0.831979 -0.448849 -vn -0.326105 -0.831979 -0.448849 -vn -0.326105 -0.831979 -0.448849 -vn -0.326105 -0.831979 -0.448849 -vn -0.326105 -0.831979 -0.448849 -vn -0.326105 -0.831979 -0.448849 -vn -0.527649 -0.831981 0.171448 -vn -0.527649 -0.831981 0.171448 -vn -0.527649 -0.831981 0.171448 -vn -0.527649 -0.831981 0.171448 -vn -0.527649 -0.831981 0.171448 -vn -0.527649 -0.831981 0.171448 -vn 0.000000 -0.831993 0.554787 -vn 0.000000 -0.831993 0.554787 -vn 0.000000 -0.831993 0.554787 -vn 0.000000 -0.831993 0.554787 -vn 0.000000 -0.831993 0.554787 -vn 0.000000 -0.831993 0.554787 -vn 0.527649 -0.831981 0.171448 -vn 0.527649 -0.831981 0.171448 -vn 0.527649 -0.831981 0.171448 -vn 0.527649 -0.831981 0.171448 -vn 0.527649 -0.831981 0.171448 -vn 0.527649 -0.831981 0.171448 -vn 0.000000 -0.992857 0.119315 -vn 0.000000 -0.992857 0.119315 -vn 0.000000 -0.992857 0.119315 -vn 0.000000 -0.992857 0.119315 -vn 0.000000 -0.992857 0.119315 -vn 0.000000 -0.992857 0.119315 -vn 0.113474 -0.992857 0.036870 -vn 0.113474 -0.992857 0.036870 -vn 0.113474 -0.992857 0.036870 -vn 0.113474 -0.992857 0.036870 -vn 0.113474 -0.992857 0.036870 -vn 0.113474 -0.992857 0.036870 -vn 0.070132 -0.992857 -0.096527 -vn 0.070132 -0.992857 -0.096527 -vn 0.070132 -0.992857 -0.096527 -vn 0.070132 -0.992857 -0.096527 -vn 0.070132 -0.992857 -0.096527 -vn 0.070132 -0.992857 -0.096527 -vn -0.070132 -0.992857 -0.096527 -vn -0.070132 -0.992857 -0.096527 -vn -0.070132 -0.992857 -0.096527 -vn -0.070132 -0.992857 -0.096527 -vn -0.070132 -0.992857 -0.096527 -vn -0.070132 -0.992857 -0.096527 -vn -0.113474 -0.992857 0.036870 -vn -0.113474 -0.992857 0.036870 -vn -0.113474 -0.992857 0.036870 -vn -0.113474 -0.992857 0.036870 -vn -0.113474 -0.992857 0.036870 -vn -0.113474 -0.992857 0.036870 -vn -0.423046 -0.694258 0.582270 -vn -0.423046 -0.694258 0.582270 -vn -0.423046 -0.694258 0.582270 -vn -0.423046 -0.694258 0.582270 -vn -0.423046 -0.694258 0.582270 -vn -0.423046 -0.694258 0.582270 -vn 0.423044 -0.694260 0.582269 -vn 0.423044 -0.694260 0.582269 -vn 0.423044 -0.694260 0.582269 -vn 0.423044 -0.694260 0.582269 -vn 0.423044 -0.694260 0.582269 -vn 0.423044 -0.694260 0.582269 -vn 0.684502 -0.694256 -0.222409 -vn 0.684502 -0.694256 -0.222409 -vn 0.684502 -0.694256 -0.222409 -vn 0.684502 -0.694256 -0.222409 -vn 0.684502 -0.694256 -0.222409 -vn 0.684502 -0.694256 -0.222409 -vn 0.000000 -0.694261 -0.719723 -vn 0.000000 -0.694261 -0.719723 -vn 0.000000 -0.694261 -0.719723 -vn 0.000000 -0.694261 -0.719723 -vn 0.000000 -0.694261 -0.719723 -vn 0.000000 -0.694261 -0.719723 -vn -0.684502 -0.694256 -0.222409 -vn -0.684502 -0.694256 -0.222409 -vn -0.684502 -0.694256 -0.222409 -vn -0.684502 -0.694256 -0.222409 -vn -0.684502 -0.694256 -0.222409 -vn -0.684502 -0.694256 -0.222409 -vn 0.000000 -0.181489 0.983393 -vn 0.000000 -0.181489 0.983393 -vn 0.000000 -0.181489 0.983393 -vn 0.000000 -0.181489 0.983393 -vn 0.000000 -0.181489 0.983393 -vn 0.000000 -0.181489 0.983393 -vn 0.935262 -0.181489 0.303886 -vn 0.935262 -0.181489 0.303886 -vn 0.935262 -0.181489 0.303886 -vn 0.935262 -0.181489 0.303886 -vn 0.935262 -0.181489 0.303886 -vn 0.935262 -0.181489 0.303886 -vn 0.578021 -0.181492 -0.795583 -vn 0.578021 -0.181492 -0.795583 -vn 0.578021 -0.181492 -0.795583 -vn 0.578021 -0.181492 -0.795583 -vn 0.578021 -0.181492 -0.795583 -vn 0.578021 -0.181492 -0.795583 -vn -0.578021 -0.181492 -0.795583 -vn -0.578021 -0.181492 -0.795583 -vn -0.578021 -0.181492 -0.795583 -vn -0.578021 -0.181492 -0.795583 -vn -0.578021 -0.181492 -0.795583 -vn -0.578021 -0.181492 -0.795583 -vn -0.935262 -0.181489 0.303887 -vn -0.935262 -0.181489 0.303887 -vn -0.935262 -0.181489 0.303887 -vn -0.935262 -0.181489 0.303887 -vn -0.935262 -0.181489 0.303887 -vn -0.935262 -0.181489 0.303887 -vn -0.548241 0.360583 0.754594 -vn -0.548241 0.360583 0.754594 -vn -0.548241 0.360583 0.754594 -vn -0.548241 0.360583 0.754594 -vn -0.548241 0.360583 0.754594 -vn -0.548241 0.360583 0.754594 -vn 0.000000 0.832901 0.553422 -vn 0.000000 0.832901 0.553422 -vn 0.000000 0.832901 0.553422 -vn 0.000000 0.832901 0.553422 -vn 0.000000 0.832901 0.553422 -vn 0.000000 0.832901 0.553422 -vn 0.548241 0.360584 0.754594 -vn 0.548241 0.360584 0.754594 -vn 0.548241 0.360584 0.754594 -vn 0.548241 0.360584 0.754594 -vn 0.548241 0.360584 0.754594 -vn 0.548241 0.360584 0.754594 -vn 0.887077 0.360581 -0.288229 -vn 0.887077 0.360581 -0.288229 -vn 0.887077 0.360581 -0.288229 -vn 0.887077 0.360581 -0.288229 -vn 0.887077 0.360581 -0.288229 -vn 0.887077 0.360581 -0.288229 -vn 0.000000 0.360591 -0.932724 -vn 0.000000 0.360591 -0.932724 -vn 0.000000 0.360591 -0.932724 -vn 0.000000 0.360591 -0.932724 -vn 0.000000 0.360591 -0.932724 -vn 0.000000 0.360591 -0.932724 -vn -0.325291 0.832905 -0.447722 -vn -0.325291 0.832905 -0.447722 -vn -0.325291 0.832905 -0.447722 -vn -0.325291 0.832905 -0.447722 -vn -0.325291 0.832905 -0.447722 -vn -0.325291 0.832905 -0.447722 -vn -0.887077 0.360581 -0.288229 -vn -0.887077 0.360581 -0.288229 -vn -0.887077 0.360581 -0.288229 -vn -0.887077 0.360581 -0.288229 -vn -0.887077 0.360581 -0.288229 -vn -0.887077 0.360581 -0.288229 -vn 0.140538 0.888966 -0.435876 -vn 0.140538 0.888966 -0.435876 -vn 0.140538 0.888966 -0.435876 -vn 0.140538 0.888966 -0.435876 -vn 0.140538 0.888966 -0.435876 -vn 0.140538 0.888966 -0.435876 -vn 0.426737 0.687678 -0.587362 -vn 0.426737 0.687678 -0.587362 -vn 0.426737 0.687678 -0.587362 -vn 0.426737 0.687678 -0.587362 -vn 0.426737 0.687678 -0.587362 -vn 0.426737 0.687678 -0.587362 -vn 0.371119 0.888965 -0.268351 -vn 0.371119 0.888965 -0.268351 -vn 0.371119 0.888965 -0.268351 -vn 0.371119 0.888965 -0.268351 -vn 0.371119 0.888965 -0.268351 -vn 0.371119 0.888965 -0.268351 -vn -0.192027 0.971443 0.139368 -vn -0.192027 0.971443 0.139368 -vn -0.192027 0.971443 0.139368 -vn -0.192027 0.971443 0.139368 -vn -0.192027 0.971443 0.139368 -vn -0.192027 0.971443 0.139368 -vn -0.328378 0.829388 0.451977 -vn -0.328378 0.829388 0.451977 -vn -0.328378 0.829388 0.451977 -vn -0.328378 0.829388 0.451977 -vn -0.328378 0.829388 0.451977 -vn -0.328378 0.829388 0.451977 -vn -0.426737 0.687678 -0.587362 -vn -0.426737 0.687678 -0.587362 -vn -0.426737 0.687678 -0.587362 -vn -0.426737 0.687678 -0.587362 -vn -0.426737 0.687678 -0.587362 -vn -0.426737 0.687678 -0.587362 -vn -0.140538 0.888966 -0.435876 -vn -0.140538 0.888966 -0.435876 -vn -0.140538 0.888966 -0.435876 -vn -0.140538 0.888966 -0.435876 -vn -0.140538 0.888966 -0.435876 -vn -0.140538 0.888966 -0.435876 -vn 0.000000 0.992328 -0.123631 -vn 0.000000 0.992328 -0.123631 -vn 0.000000 0.992328 -0.123631 -vn 0.000000 0.992328 -0.123631 -vn 0.000000 0.992328 -0.123631 -vn 0.000000 0.992328 -0.123631 -vn 0.073209 0.971443 0.225699 -vn 0.073209 0.971443 0.225699 -vn 0.073209 0.971443 0.225699 -vn 0.073209 0.971443 0.225699 -vn 0.073209 0.971443 0.225699 -vn 0.073209 0.971443 0.225699 -vn 0.328378 0.829388 0.451977 -vn 0.328378 0.829388 0.451977 -vn 0.328378 0.829388 0.451977 -vn 0.328378 0.829388 0.451977 -vn 0.328378 0.829388 0.451977 -vn 0.328378 0.829388 0.451977 -vn 0.192027 0.971443 0.139368 -vn 0.192027 0.971443 0.139368 -vn 0.192027 0.971443 0.139368 -vn 0.192027 0.971443 0.139368 -vn 0.192027 0.971443 0.139368 -vn 0.192027 0.971443 0.139368 -vn -0.690494 0.687664 0.224357 -vn -0.690494 0.687664 0.224357 -vn -0.690494 0.687664 0.224357 -vn -0.690494 0.687664 0.224357 -vn -0.690494 0.687664 0.224357 -vn -0.690494 0.687664 0.224357 -vn -0.457999 0.888952 -0.001038 -vn -0.457999 0.888952 -0.001038 -vn -0.457999 0.888952 -0.001038 -vn -0.457999 0.888952 -0.001038 -vn -0.457999 0.888952 -0.001038 -vn -0.457999 0.888952 -0.001038 -vn -0.117580 0.992328 -0.038204 -vn -0.117580 0.992328 -0.038204 -vn -0.117580 0.992328 -0.038204 -vn -0.117580 0.992328 -0.038204 -vn -0.117580 0.992328 -0.038204 -vn -0.117580 0.992328 -0.038204 -vn 0.237275 0.971443 0.000120 -vn 0.237275 0.971443 0.000120 -vn 0.237275 0.971443 0.000120 -vn 0.237275 0.971443 0.000120 -vn 0.237275 0.971443 0.000120 -vn 0.237275 0.971443 0.000120 -vn 0.531326 0.829390 -0.172640 -vn 0.531326 0.829390 -0.172640 -vn 0.531326 0.829390 -0.172640 -vn 0.531326 0.829390 -0.172640 -vn 0.531326 0.829390 -0.172640 -vn 0.531326 0.829390 -0.172640 -vn 0.191887 0.971443 -0.139561 -vn 0.191887 0.971443 -0.139561 -vn 0.191887 0.971443 -0.139561 -vn 0.191887 0.971443 -0.139561 -vn 0.191887 0.971443 -0.139561 -vn 0.191887 0.971443 -0.139561 -vn 0.000000 0.687632 0.726059 -vn 0.000000 0.687632 0.726059 -vn 0.000000 0.687632 0.726059 -vn 0.000000 0.687632 0.726059 -vn 0.000000 0.687632 0.726059 -vn 0.000000 0.687632 0.726059 -vn -0.142505 0.888966 0.435237 -vn -0.142505 0.888966 0.435237 -vn -0.142505 0.888966 0.435237 -vn -0.142505 0.888966 0.435237 -vn -0.142505 0.888966 0.435237 -vn -0.142505 0.888966 0.435237 -vn -0.072667 0.992329 0.100018 -vn -0.072667 0.992329 0.100018 -vn -0.072667 0.992329 0.100018 -vn -0.072667 0.992329 0.100018 -vn -0.072667 0.992329 0.100018 -vn -0.072667 0.992329 0.100018 -vn 0.073436 0.971443 -0.225624 -vn 0.073436 0.971443 -0.225624 -vn 0.073436 0.971443 -0.225624 -vn 0.073436 0.971443 -0.225624 -vn 0.073436 0.971443 -0.225624 -vn 0.073436 0.971443 -0.225624 -vn 0.000000 0.829389 -0.558671 -vn 0.000000 0.829389 -0.558671 -vn 0.000000 0.829389 -0.558671 -vn 0.000000 0.829389 -0.558671 -vn 0.000000 0.829389 -0.558671 -vn 0.000000 0.829389 -0.558671 -vn -0.073436 0.971443 -0.225624 -vn -0.073436 0.971443 -0.225624 -vn -0.073436 0.971443 -0.225624 -vn -0.073436 0.971443 -0.225624 -vn -0.073436 0.971443 -0.225624 -vn -0.073436 0.971443 -0.225624 -vn 0.457998 0.888952 -0.001038 -vn 0.457998 0.888952 -0.001038 -vn 0.457998 0.888952 -0.001038 -vn 0.457998 0.888952 -0.001038 -vn 0.457998 0.888952 -0.001038 -vn 0.457998 0.888952 -0.001038 -vn 0.690494 0.687664 0.224356 -vn 0.690494 0.687664 0.224356 -vn 0.690494 0.687664 0.224356 -vn 0.690494 0.687664 0.224356 -vn 0.690494 0.687664 0.224356 -vn 0.690494 0.687664 0.224356 -vn 0.369898 0.888966 0.270028 -vn 0.369898 0.888966 0.270028 -vn 0.369898 0.888966 0.270028 -vn 0.369898 0.888966 0.270028 -vn 0.369898 0.888966 0.270028 -vn 0.369898 0.888966 0.270028 -vn -0.191887 0.971443 -0.139561 -vn -0.191887 0.971443 -0.139561 -vn -0.191887 0.971443 -0.139561 -vn -0.191887 0.971443 -0.139561 -vn -0.191887 0.971443 -0.139561 -vn -0.191887 0.971443 -0.139561 -vn -0.531326 0.829391 -0.172640 -vn -0.531326 0.829391 -0.172640 -vn -0.531326 0.829391 -0.172640 -vn -0.531326 0.829391 -0.172640 -vn -0.531326 0.829391 -0.172640 -vn -0.531326 0.829391 -0.172640 -vn -0.277175 0.446925 -0.850548 -vn -0.277175 0.446925 -0.850548 -vn -0.277175 0.446925 -0.850548 -vn -0.277175 0.446925 -0.850548 -vn -0.277175 0.446925 -0.850548 -vn -0.277175 0.446925 -0.850548 -vn 0.000000 0.178527 -0.983935 -vn 0.000000 0.178527 -0.983935 -vn 0.000000 0.178527 -0.983935 -vn 0.000000 0.178527 -0.983935 -vn 0.000000 0.178527 -0.983935 -vn 0.000000 0.178527 -0.983935 -vn 0.277175 0.446925 -0.850548 -vn 0.277175 0.446925 -0.850548 -vn 0.277175 0.446925 -0.850548 -vn 0.277175 0.446925 -0.850548 -vn 0.277175 0.446925 -0.850548 -vn 0.277175 0.446925 -0.850548 -vn -0.894579 0.446910 0.000758 -vn -0.894579 0.446910 0.000758 -vn -0.894579 0.446910 0.000758 -vn -0.894579 0.446910 0.000758 -vn -0.894579 0.446910 0.000758 -vn -0.894579 0.446910 0.000758 -vn -0.935778 0.178507 -0.304065 -vn -0.935778 0.178507 -0.304065 -vn -0.935778 0.178507 -0.304065 -vn -0.935778 0.178507 -0.304065 -vn -0.935778 0.178507 -0.304065 -vn -0.935778 0.178507 -0.304065 -vn -0.275681 0.446903 0.851045 -vn -0.275681 0.446903 0.851045 -vn -0.275681 0.446903 0.851045 -vn -0.275681 0.446903 0.851045 -vn -0.275681 0.446903 0.851045 -vn -0.275681 0.446903 0.851045 -vn -0.578350 0.178472 0.796027 -vn -0.578350 0.178472 0.796027 -vn -0.578350 0.178472 0.796027 -vn -0.578350 0.178472 0.796027 -vn -0.578350 0.178472 0.796027 -vn -0.578350 0.178472 0.796027 -vn 0.724191 0.446890 0.525201 -vn 0.724191 0.446890 0.525201 -vn 0.724191 0.446890 0.525201 -vn 0.724191 0.446890 0.525201 -vn 0.724191 0.446890 0.525201 -vn 0.724191 0.446890 0.525201 -vn 0.578350 0.178472 0.796027 -vn 0.578350 0.178472 0.796027 -vn 0.578350 0.178472 0.796027 -vn 0.578350 0.178472 0.796027 -vn 0.578350 0.178472 0.796027 -vn 0.578350 0.178472 0.796027 -vn 0.935778 0.178507 -0.304065 -vn 0.935778 0.178507 -0.304065 -vn 0.935778 0.178507 -0.304065 -vn 0.935778 0.178507 -0.304065 -vn 0.935778 0.178507 -0.304065 -vn 0.935778 0.178507 -0.304065 -vn 0.894579 0.446909 0.000758 -vn 0.894579 0.446909 0.000758 -vn 0.894579 0.446909 0.000758 -vn 0.894579 0.446909 0.000758 -vn 0.894579 0.446909 0.000758 -vn 0.894579 0.446909 0.000758 -vn 0.307917 -0.090561 -0.947093 -vn 0.307917 -0.090561 -0.947093 -vn 0.307917 -0.090561 -0.947093 -vn 0.307917 -0.090561 -0.947093 -vn 0.307917 -0.090561 -0.947093 -vn 0.307917 -0.090561 -0.947093 -vn 0.549472 -0.355150 -0.756273 -vn 0.549472 -0.355150 -0.756273 -vn 0.549472 -0.355150 -0.756273 -vn 0.549472 -0.355150 -0.756273 -vn 0.549472 -0.355150 -0.756273 -vn 0.549472 -0.355150 -0.756273 -vn -0.549470 -0.355152 -0.756273 -vn -0.549470 -0.355152 -0.756273 -vn -0.549470 -0.355152 -0.756273 -vn -0.549470 -0.355152 -0.756273 -vn -0.549470 -0.355152 -0.756273 -vn -0.549470 -0.355152 -0.756273 -vn -0.307917 -0.090561 -0.947093 -vn -0.307917 -0.090561 -0.947093 -vn -0.307917 -0.090561 -0.947093 -vn -0.307917 -0.090561 -0.947093 -vn -0.307917 -0.090561 -0.947093 -vn -0.307917 -0.090561 -0.947093 -vn -0.889026 -0.355209 0.288895 -vn -0.889026 -0.355209 0.288895 -vn -0.889026 -0.355209 0.288895 -vn -0.889026 -0.355209 0.288895 -vn -0.889026 -0.355209 0.288895 -vn -0.889026 -0.355209 0.288895 -vn -0.995894 -0.090525 0.000173 -vn -0.995894 -0.090525 0.000173 -vn -0.995894 -0.090525 0.000173 -vn -0.995894 -0.090525 0.000173 -vn -0.995894 -0.090525 0.000173 -vn -0.995894 -0.090525 0.000173 -vn 0.000000 -0.355142 0.934812 -vn 0.000000 -0.355142 0.934812 -vn 0.000000 -0.355142 0.934812 -vn 0.000000 -0.355142 0.934812 -vn 0.000000 -0.355142 0.934812 -vn 0.000000 -0.355142 0.934812 -vn -0.307588 -0.090567 0.947200 -vn -0.307588 -0.090567 0.947200 -vn -0.307588 -0.090567 0.947200 -vn -0.307588 -0.090567 0.947200 -vn -0.307588 -0.090567 0.947200 -vn -0.307588 -0.090567 0.947200 -vn 0.995894 -0.090525 0.000173 -vn 0.995894 -0.090525 0.000173 -vn 0.995894 -0.090525 0.000173 -vn 0.995894 -0.090525 0.000173 -vn 0.995894 -0.090525 0.000173 -vn 0.995894 -0.090525 0.000173 -vn 0.889026 -0.355208 0.288895 -vn 0.889026 -0.355208 0.288895 -vn 0.889026 -0.355208 0.288895 -vn 0.889026 -0.355208 0.288895 -vn 0.889026 -0.355208 0.288895 -vn 0.889026 -0.355208 0.288895 -vn 0.805794 -0.090580 0.585227 -vn 0.805794 -0.090580 0.585227 -vn 0.805794 -0.090580 0.585227 -vn 0.805794 -0.090580 0.585227 -vn 0.805794 -0.090580 0.585227 -vn 0.805794 -0.090580 0.585227 -vn -0.242850 -0.614513 -0.750598 -vn -0.242850 -0.614513 -0.750598 -vn -0.242850 -0.614513 -0.750598 -vn -0.242850 -0.614513 -0.750598 -vn -0.242850 -0.614513 -0.750598 -vn -0.242850 -0.614513 -0.750598 -vn 0.000000 -0.827928 -0.560835 -vn 0.000000 -0.827928 -0.560835 -vn 0.000000 -0.827928 -0.560835 -vn 0.000000 -0.827928 -0.560835 -vn 0.000000 -0.827928 -0.560835 -vn 0.000000 -0.827928 -0.560835 -vn 0.242850 -0.614513 -0.750598 -vn 0.242850 -0.614513 -0.750598 -vn 0.242850 -0.614513 -0.750598 -vn 0.242850 -0.614513 -0.750598 -vn 0.242850 -0.614513 -0.750598 -vn 0.242850 -0.614513 -0.750598 -vn -0.788891 -0.614533 -0.001009 -vn -0.788891 -0.614533 -0.001009 -vn -0.788891 -0.614533 -0.001009 -vn -0.788891 -0.614533 -0.001009 -vn -0.788891 -0.614533 -0.001009 -vn -0.788891 -0.614533 -0.001009 -vn -0.533391 -0.827924 -0.173306 -vn -0.533391 -0.827924 -0.173306 -vn -0.533391 -0.827924 -0.173306 -vn -0.533391 -0.827924 -0.173306 -vn -0.533391 -0.827924 -0.173306 -vn -0.533391 -0.827924 -0.173306 -vn -0.244718 -0.614512 0.749993 -vn -0.244718 -0.614512 0.749993 -vn -0.244718 -0.614512 0.749993 -vn -0.244718 -0.614512 0.749993 -vn -0.244718 -0.614512 0.749993 -vn -0.244718 -0.614512 0.749993 -vn -0.329660 -0.827915 0.453742 -vn -0.329660 -0.827915 0.453742 -vn -0.329660 -0.827915 0.453742 -vn -0.329660 -0.827915 0.453742 -vn -0.329660 -0.827915 0.453742 -vn -0.329660 -0.827915 0.453742 -vn 0.637659 -0.614518 0.464497 -vn 0.637659 -0.614518 0.464497 -vn 0.637659 -0.614518 0.464497 -vn 0.637659 -0.614518 0.464497 -vn 0.637659 -0.614518 0.464497 -vn 0.637659 -0.614518 0.464497 -vn 0.329660 -0.827915 0.453741 -vn 0.329660 -0.827915 0.453741 -vn 0.329660 -0.827915 0.453741 -vn 0.329660 -0.827915 0.453741 -vn 0.329660 -0.827915 0.453741 -vn 0.329660 -0.827915 0.453741 -vn 0.533385 -0.827928 -0.173306 -vn 0.533385 -0.827928 -0.173306 -vn 0.533385 -0.827928 -0.173306 -vn 0.533385 -0.827928 -0.173306 -vn 0.533385 -0.827928 -0.173306 -vn 0.533385 -0.827928 -0.173306 -vn 0.788891 -0.614532 -0.000986 -vn 0.788891 -0.614532 -0.000986 -vn 0.788891 -0.614532 -0.000986 -vn 0.788891 -0.614532 -0.000986 -vn 0.788891 -0.614532 -0.000986 -vn 0.788891 -0.614532 -0.000986 -vn 0.074760 -0.970939 -0.227352 -vn 0.074760 -0.970939 -0.227352 -vn 0.074760 -0.970939 -0.227352 -vn 0.074760 -0.970939 -0.227352 -vn 0.074760 -0.970939 -0.227352 -vn 0.074760 -0.970939 -0.227352 -vn -0.070818 -0.992716 0.097473 -vn -0.070818 -0.992716 0.097473 -vn -0.070818 -0.992716 0.097473 -vn -0.070818 -0.992716 0.097473 -vn -0.070818 -0.992716 0.097473 -vn -0.070818 -0.992716 0.097473 -vn 0.070818 -0.992715 0.097473 -vn 0.070818 -0.992715 0.097473 -vn 0.070818 -0.992715 0.097473 -vn 0.070818 -0.992715 0.097473 -vn 0.070818 -0.992715 0.097473 -vn 0.070818 -0.992715 0.097473 -vn -0.074760 -0.970939 -0.227353 -vn -0.074760 -0.970939 -0.227353 -vn -0.074760 -0.970939 -0.227353 -vn -0.074760 -0.970939 -0.227353 -vn -0.074760 -0.970939 -0.227353 -vn -0.074760 -0.970939 -0.227353 -vn 0.114585 -0.992716 -0.037231 -vn 0.114585 -0.992716 -0.037231 -vn 0.114585 -0.992716 -0.037231 -vn 0.114585 -0.992716 -0.037231 -vn 0.114585 -0.992716 -0.037231 -vn 0.114585 -0.992716 -0.037231 -vn -0.239321 -0.970940 0.000846 -vn -0.239321 -0.970940 0.000846 -vn -0.239321 -0.970940 0.000846 -vn -0.239321 -0.970940 0.000846 -vn -0.239321 -0.970940 0.000846 -vn -0.239321 -0.970940 0.000846 -vn 0.000000 -0.992715 -0.120482 -vn 0.000000 -0.992715 -0.120482 -vn 0.000000 -0.992715 -0.120482 -vn 0.000000 -0.992715 -0.120482 -vn 0.000000 -0.992715 -0.120482 -vn 0.000000 -0.992715 -0.120482 -vn -0.073152 -0.970939 0.227875 -vn -0.073152 -0.970939 0.227875 -vn -0.073152 -0.970939 0.227875 -vn -0.073152 -0.970939 0.227875 -vn -0.073152 -0.970939 0.227875 -vn -0.073152 -0.970939 0.227875 -vn 0.239321 -0.970940 0.000846 -vn 0.239321 -0.970940 0.000846 -vn 0.239321 -0.970940 0.000846 -vn 0.239321 -0.970940 0.000846 -vn 0.239321 -0.970940 0.000846 -vn 0.239321 -0.970940 0.000846 -vn -0.114585 -0.992716 -0.037231 -vn -0.114585 -0.992716 -0.037231 -vn -0.114585 -0.992716 -0.037231 -vn -0.114585 -0.992716 -0.037231 -vn -0.114585 -0.992716 -0.037231 -vn -0.114585 -0.992716 -0.037231 -vn 0.194117 -0.970939 0.139990 -vn 0.194117 -0.970939 0.139990 -vn 0.194117 -0.970939 0.139990 -vn 0.194117 -0.970939 0.139990 -vn 0.194117 -0.970939 0.139990 -vn 0.194117 -0.970939 0.139990 -vn 0.140724 -0.889845 0.434019 -vn 0.140724 -0.889845 0.434019 -vn 0.140724 -0.889845 0.434019 -vn 0.140724 -0.889845 0.434019 -vn 0.140724 -0.889845 0.434019 -vn 0.140724 -0.889845 0.434019 -vn 0.000000 -0.689252 0.724522 -vn 0.000000 -0.689252 0.724522 -vn 0.000000 -0.689252 0.724522 -vn 0.000000 -0.689252 0.724522 -vn 0.000000 -0.689252 0.724522 -vn 0.000000 -0.689252 0.724522 -vn -0.140724 -0.889845 0.434019 -vn -0.140724 -0.889845 0.434019 -vn -0.140724 -0.889845 0.434019 -vn -0.140724 -0.889845 0.434019 -vn -0.140724 -0.889845 0.434019 -vn -0.140724 -0.889845 0.434019 -vn 0.456260 -0.889847 0.000281 -vn 0.456260 -0.889847 0.000281 -vn 0.456260 -0.889847 0.000281 -vn 0.456260 -0.889847 0.000281 -vn 0.456260 -0.889847 0.000281 -vn 0.456260 -0.889847 0.000281 -vn 0.689057 -0.689258 0.223886 -vn 0.689057 -0.689258 0.223886 -vn 0.689057 -0.689258 0.223886 -vn 0.689057 -0.689258 0.223886 -vn 0.689057 -0.689258 0.223886 -vn 0.689057 -0.689258 0.223886 -vn 0.369289 -0.889846 0.267955 -vn 0.369289 -0.889846 0.267955 -vn 0.369289 -0.889846 0.267955 -vn 0.369289 -0.889846 0.267955 -vn 0.369289 -0.889846 0.267955 -vn 0.369289 -0.889846 0.267955 -vn 0.141264 -0.889845 -0.433844 -vn 0.141264 -0.889845 -0.433844 -vn 0.141264 -0.889845 -0.433844 -vn 0.141264 -0.889845 -0.433844 -vn 0.141264 -0.889845 -0.433844 -vn 0.141264 -0.889845 -0.433844 -vn 0.425861 -0.689255 -0.586148 -vn 0.425861 -0.689255 -0.586148 -vn 0.425861 -0.689255 -0.586148 -vn 0.425861 -0.689255 -0.586148 -vn 0.425861 -0.689255 -0.586148 -vn 0.425861 -0.689255 -0.586148 -vn 0.368960 -0.889845 -0.268411 -vn 0.368960 -0.889845 -0.268411 -vn 0.368960 -0.889845 -0.268411 -vn 0.368960 -0.889845 -0.268411 -vn 0.368960 -0.889845 -0.268411 -vn 0.368960 -0.889845 -0.268411 -vn -0.368960 -0.889844 -0.268414 -vn -0.368960 -0.889844 -0.268414 -vn -0.368960 -0.889844 -0.268414 -vn -0.368960 -0.889844 -0.268414 -vn -0.368960 -0.889844 -0.268414 -vn -0.368960 -0.889844 -0.268414 -vn -0.722961 -0.447747 0.526166 -vn -0.722961 -0.447747 0.526166 -vn -0.722961 -0.447747 0.526166 -vn -0.722961 -0.447747 0.526166 -vn -0.722961 -0.447747 0.526166 -vn -0.722961 -0.447747 0.526166 -vn -0.425861 -0.689256 -0.586148 -vn -0.425861 -0.689256 -0.586148 -vn -0.425861 -0.689256 -0.586148 -vn -0.425861 -0.689256 -0.586148 -vn -0.425861 -0.689256 -0.586148 -vn -0.425861 -0.689256 -0.586148 -vn -0.689054 -0.689261 0.223884 -vn -0.689054 -0.689261 0.223884 -vn -0.689054 -0.689261 0.223884 -vn -0.689054 -0.689261 0.223884 -vn -0.689054 -0.689261 0.223884 -vn -0.689054 -0.689261 0.223884 -vn -0.456265 -0.889844 0.000281 -vn -0.456265 -0.889844 0.000281 -vn -0.456265 -0.889844 0.000281 -vn -0.456265 -0.889844 0.000281 -vn -0.456265 -0.889844 0.000281 -vn -0.456265 -0.889844 0.000281 -vn -0.277004 -0.447741 0.850175 -vn -0.277004 -0.447741 0.850175 -vn -0.277004 -0.447741 0.850175 -vn -0.277004 -0.447741 0.850175 -vn -0.277004 -0.447741 0.850175 -vn -0.277004 -0.447741 0.850175 -vn -0.578290 -0.179039 0.795943 -vn -0.578290 -0.179039 0.795943 -vn -0.578290 -0.179039 0.795943 -vn -0.578290 -0.179039 0.795943 -vn -0.578290 -0.179039 0.795943 -vn -0.578290 -0.179039 0.795943 -vn 0.722961 -0.447744 0.526168 -vn 0.722961 -0.447744 0.526168 -vn 0.722961 -0.447744 0.526168 -vn 0.722961 -0.447744 0.526168 -vn 0.722961 -0.447744 0.526168 -vn 0.722961 -0.447744 0.526168 -vn 0.578290 -0.179039 0.795943 -vn 0.578290 -0.179039 0.795943 -vn 0.578290 -0.179039 0.795943 -vn 0.578290 -0.179039 0.795943 -vn 0.578290 -0.179039 0.795943 -vn 0.578290 -0.179039 0.795943 -vn 0.277004 -0.447741 0.850174 -vn 0.277004 -0.447741 0.850174 -vn 0.277004 -0.447741 0.850174 -vn 0.277004 -0.447741 0.850174 -vn 0.277004 -0.447741 0.850174 -vn 0.277004 -0.447741 0.850174 -vn 0.723824 -0.447743 -0.524981 -vn 0.723824 -0.447743 -0.524981 -vn 0.723824 -0.447743 -0.524981 -vn 0.723824 -0.447743 -0.524981 -vn 0.723824 -0.447743 -0.524981 -vn 0.723824 -0.447743 -0.524981 -vn 0.935690 -0.179034 -0.304025 -vn 0.935690 -0.179034 -0.304025 -vn 0.935690 -0.179034 -0.304025 -vn 0.935690 -0.179034 -0.304025 -vn 0.935690 -0.179034 -0.304025 -vn 0.935690 -0.179034 -0.304025 -vn 0.894160 -0.447746 -0.000736 -vn 0.894160 -0.447746 -0.000736 -vn 0.894160 -0.447746 -0.000736 -vn 0.894160 -0.447746 -0.000736 -vn 0.894160 -0.447746 -0.000736 -vn 0.894160 -0.447746 -0.000736 -vn 0.000000 -0.179036 -0.983843 -vn 0.000000 -0.179036 -0.983843 -vn 0.000000 -0.179036 -0.983843 -vn 0.000000 -0.179036 -0.983843 -vn 0.000000 -0.179036 -0.983843 -vn 0.000000 -0.179036 -0.983843 -vn 0.275613 -0.447751 -0.850621 -vn 0.275613 -0.447751 -0.850621 -vn 0.275613 -0.447751 -0.850621 -vn 0.275613 -0.447751 -0.850621 -vn 0.275613 -0.447751 -0.850621 -vn 0.275613 -0.447751 -0.850621 -vn -0.894160 -0.447746 -0.000732 -vn -0.894160 -0.447746 -0.000732 -vn -0.894160 -0.447746 -0.000732 -vn -0.894160 -0.447746 -0.000732 -vn -0.894160 -0.447746 -0.000732 -vn -0.894160 -0.447746 -0.000732 -vn -0.935690 -0.179034 -0.304025 -vn -0.935690 -0.179034 -0.304025 -vn -0.935690 -0.179034 -0.304025 -vn -0.935690 -0.179034 -0.304025 -vn -0.935690 -0.179034 -0.304025 -vn -0.935690 -0.179034 -0.304025 -vn -0.723824 -0.447743 -0.524981 -vn -0.723824 -0.447743 -0.524981 -vn -0.723824 -0.447743 -0.524981 -vn -0.723824 -0.447743 -0.524981 -vn -0.723824 -0.447743 -0.524981 -vn -0.723824 -0.447743 -0.524981 -vn 0.307921 0.090771 0.947072 -vn 0.307921 0.090771 0.947072 -vn 0.307921 0.090771 0.947072 -vn 0.307921 0.090771 0.947072 -vn 0.307921 0.090771 0.947072 -vn 0.307921 0.090771 0.947072 -vn 0.000000 0.356204 0.934408 -vn 0.000000 0.356204 0.934408 -vn 0.000000 0.356204 0.934408 -vn 0.000000 0.356204 0.934408 -vn 0.000000 0.356204 0.934408 -vn 0.000000 0.356204 0.934408 -vn -0.307921 0.090771 0.947072 -vn -0.307921 0.090771 0.947072 -vn -0.307921 0.090771 0.947072 -vn -0.307921 0.090771 0.947072 -vn -0.307921 0.090771 0.947072 -vn -0.307921 0.090771 0.947072 -vn 0.995872 0.090771 -0.000188 -vn 0.995872 0.090771 -0.000188 -vn 0.995872 0.090771 -0.000188 -vn 0.995872 0.090771 -0.000188 -vn 0.995872 0.090771 -0.000188 -vn 0.995872 0.090771 -0.000188 -vn 0.888678 0.356195 0.288750 -vn 0.888678 0.356195 0.288750 -vn 0.888678 0.356195 0.288750 -vn 0.888678 0.356195 0.288750 -vn 0.888678 0.356195 0.288750 -vn 0.888678 0.356195 0.288750 -vn 0.805567 0.090770 0.585511 -vn 0.805567 0.090770 0.585511 -vn 0.805567 0.090770 0.585511 -vn 0.805567 0.090770 0.585511 -vn 0.805567 0.090770 0.585511 -vn 0.805567 0.090770 0.585511 -vn 0.307564 0.090772 -0.947188 -vn 0.307564 0.090772 -0.947188 -vn 0.307564 0.090772 -0.947188 -vn 0.307564 0.090772 -0.947188 -vn 0.307564 0.090772 -0.947188 -vn 0.307564 0.090772 -0.947188 -vn 0.549230 0.356205 -0.755953 -vn 0.549230 0.356205 -0.755953 -vn 0.549230 0.356205 -0.755953 -vn 0.549230 0.356205 -0.755953 -vn 0.549230 0.356205 -0.755953 -vn 0.549230 0.356205 -0.755953 -vn 0.805792 0.090769 -0.585201 -vn 0.805792 0.090769 -0.585201 -vn 0.805792 0.090769 -0.585201 -vn 0.805792 0.090769 -0.585201 -vn 0.805792 0.090769 -0.585201 -vn 0.805792 0.090769 -0.585201 -vn -0.307565 0.090772 -0.947188 -vn -0.307565 0.090772 -0.947188 -vn -0.307565 0.090772 -0.947188 -vn -0.307565 0.090772 -0.947188 -vn -0.307565 0.090772 -0.947188 -vn -0.307565 0.090772 -0.947188 -vn -0.805792 0.090770 -0.585201 -vn -0.805792 0.090770 -0.585201 -vn -0.805792 0.090770 -0.585201 -vn -0.805792 0.090770 -0.585201 -vn -0.805792 0.090770 -0.585201 -vn -0.805792 0.090770 -0.585201 -vn -0.788092 0.615558 0.000758 -vn -0.788092 0.615558 0.000758 -vn -0.788092 0.615558 0.000758 -vn -0.788092 0.615558 0.000758 -vn -0.788092 0.615558 0.000758 -vn -0.788092 0.615558 0.000758 -vn -0.888676 0.356200 0.288752 -vn -0.888676 0.356200 0.288752 -vn -0.888676 0.356200 0.288752 -vn -0.888676 0.356200 0.288752 -vn -0.888676 0.356200 0.288752 -vn -0.888676 0.356200 0.288752 -vn -0.995872 0.090771 -0.000188 -vn -0.995872 0.090771 -0.000188 -vn -0.995872 0.090771 -0.000188 -vn -0.995872 0.090771 -0.000188 -vn -0.995872 0.090771 -0.000188 -vn -0.995872 0.090771 -0.000188 -vn -0.069037 0.909202 0.410591 -vn -0.069037 0.909202 0.410591 -vn -0.069037 0.909202 0.410591 -vn -0.069037 0.909202 0.410591 -vn -0.069037 0.909202 0.410591 -vn -0.069037 0.909202 0.410591 -vn -0.011415 0.996936 0.077386 -vn -0.011415 0.996936 0.077386 -vn -0.011415 0.996936 0.077386 -vn -0.011415 0.996936 0.077386 -vn -0.011415 0.996936 0.077386 -vn -0.011415 0.996936 0.077386 -vn -0.156471 0.932443 0.325680 -vn -0.156471 0.932443 0.325680 -vn -0.156471 0.932443 0.325680 -vn -0.156471 0.932443 0.325680 -vn -0.156471 0.932443 0.325680 -vn -0.156471 0.932443 0.325680 -vn -0.554557 0.788543 -0.265834 -vn -0.554557 0.788543 -0.265834 -vn -0.554557 0.788543 -0.265834 -vn -0.554557 0.788543 -0.265834 -vn -0.554557 0.788543 -0.265834 -vn -0.554557 0.788543 -0.265834 -vn -0.595773 0.689684 -0.411571 -vn -0.595773 0.689684 -0.411571 -vn -0.595773 0.689684 -0.411571 -vn -0.595773 0.689684 -0.411571 -vn -0.595773 0.689684 -0.411571 -vn -0.595773 0.689684 -0.411571 -vn -0.408190 0.813184 -0.414863 -vn -0.408190 0.813184 -0.414863 -vn -0.408190 0.813184 -0.414863 -vn -0.408190 0.813184 -0.414863 -vn -0.408190 0.813184 -0.414863 -vn -0.408190 0.813184 -0.414863 -vn -0.191824 0.959958 -0.204166 -vn -0.191824 0.959958 -0.204166 -vn -0.191824 0.959958 -0.204166 -vn -0.191824 0.959958 -0.204166 -vn -0.191824 0.959958 -0.204166 -vn -0.191824 0.959958 -0.204166 -vn -0.090076 0.992230 -0.085823 -vn -0.090076 0.992230 -0.085823 -vn -0.090076 0.992230 -0.085823 -vn -0.090076 0.992230 -0.085823 -vn -0.090076 0.992230 -0.085823 -vn -0.090076 0.992230 -0.085823 -vn -0.424192 0.788539 0.445272 -vn -0.424192 0.788539 0.445272 -vn -0.424192 0.788539 0.445272 -vn -0.424192 0.788539 0.445272 -vn -0.424192 0.788539 0.445272 -vn -0.424192 0.788539 0.445272 -vn -0.575533 0.689678 0.439438 -vn -0.575533 0.689678 0.439438 -vn -0.575533 0.689678 0.439438 -vn -0.575533 0.689678 0.439438 -vn -0.575533 0.689678 0.439438 -vn -0.575533 0.689678 0.439438 -vn -0.520690 0.813188 0.260013 -vn -0.520690 0.813188 0.260013 -vn -0.520690 0.813188 0.260013 -vn -0.520690 0.813188 0.260013 -vn -0.520690 0.813188 0.260013 -vn -0.520690 0.813188 0.260013 -vn -0.253451 0.959958 0.119346 -vn -0.253451 0.959958 0.119346 -vn -0.253451 0.959958 0.119346 -vn -0.253451 0.959958 0.119346 -vn -0.253451 0.959958 0.119346 -vn -0.253451 0.959958 0.119346 -vn -0.109457 0.992230 0.059146 -vn -0.109457 0.992230 0.059146 -vn -0.109457 0.992230 0.059146 -vn -0.109457 0.992230 0.059146 -vn -0.109457 0.992230 0.059146 -vn -0.109457 0.992230 0.059146 -vn 0.292397 0.788538 0.541029 -vn 0.292397 0.788538 0.541029 -vn 0.292397 0.788538 0.541029 -vn 0.292397 0.788538 0.541029 -vn 0.292397 0.788538 0.541029 -vn 0.292397 0.788538 0.541029 -vn 0.240083 0.689662 0.683174 -vn 0.240083 0.689662 0.683174 -vn 0.240083 0.689662 0.683174 -vn 0.240083 0.689662 0.683174 -vn 0.240083 0.689662 0.683174 -vn 0.240083 0.689662 0.683174 -vn 0.086392 0.813183 0.575561 -vn 0.086392 0.813183 0.575561 -vn 0.086392 0.813183 0.575561 -vn 0.086392 0.813183 0.575561 -vn 0.086392 0.813183 0.575561 -vn 0.086392 0.813183 0.575561 -vn 0.035184 0.959958 0.277925 -vn 0.035184 0.959958 0.277925 -vn 0.035184 0.959958 0.277925 -vn 0.035184 0.959958 0.277925 -vn 0.035184 0.959958 0.277925 -vn 0.035184 0.959958 0.277925 -vn 0.022428 0.992230 0.122377 -vn 0.022428 0.992230 0.122377 -vn 0.022428 0.992230 0.122377 -vn 0.022428 0.992230 0.122377 -vn 0.022428 0.992230 0.122377 -vn 0.022428 0.992230 0.122377 -vn -0.411829 0.909202 0.061222 -vn -0.411829 0.909202 0.061222 -vn -0.411829 0.909202 0.061222 -vn -0.411829 0.909202 0.061222 -vn -0.411829 0.909202 0.061222 -vn -0.411829 0.909202 0.061222 -vn -0.077126 0.996936 0.013058 -vn -0.077126 0.996936 0.013058 -vn -0.077126 0.996936 0.013058 -vn -0.077126 0.996936 0.013058 -vn -0.077126 0.996936 0.013058 -vn -0.077126 0.996936 0.013058 -vn 0.123318 0.992230 0.016487 -vn 0.123318 0.992230 0.016487 -vn 0.123318 0.992230 0.016487 -vn 0.123318 0.992230 0.016487 -vn 0.123318 0.992230 0.016487 -vn 0.123318 0.992230 0.016487 -vn -0.044224 0.999020 0.001692 -vn -0.044224 0.999020 0.001692 -vn -0.044224 0.999020 0.001692 -vn -0.044224 0.999020 0.001692 -vn -0.044224 0.999020 0.001692 -vn -0.044224 0.999020 0.001692 -vn -0.386731 0.919790 -0.066521 -vn -0.386731 0.919790 -0.066521 -vn -0.386731 0.919790 -0.066521 -vn -0.386731 0.919790 -0.066521 -vn -0.386731 0.919790 -0.066521 -vn -0.386731 0.919790 -0.066521 -vn 0.662689 0.297890 -0.687099 -vn 0.662689 0.297890 -0.687099 -vn 0.662689 0.297890 -0.687099 -vn 0.662689 0.297890 -0.687099 -vn 0.662689 0.297890 -0.687099 -vn 0.662689 0.297890 -0.687099 -vn 0.785628 0.179492 -0.592091 -vn 0.785628 0.179492 -0.592091 -vn 0.785628 0.179492 -0.592091 -vn 0.785628 0.179492 -0.592091 -vn 0.785628 0.179492 -0.592091 -vn 0.785628 0.179492 -0.592091 -vn 0.841081 0.341223 -0.419701 -vn 0.841081 0.341223 -0.419701 -vn 0.841081 0.341223 -0.419701 -vn 0.841081 0.341223 -0.419701 -vn 0.841081 0.341223 -0.419701 -vn 0.841081 0.341223 -0.419701 -vn 0.726412 0.588697 -0.354628 -vn 0.726412 0.588697 -0.354628 -vn 0.726412 0.588697 -0.354628 -vn 0.726412 0.588697 -0.354628 -vn 0.726412 0.588697 -0.354628 -vn 0.726412 0.588697 -0.354628 -vn 0.595773 0.689684 -0.411571 -vn 0.595773 0.689684 -0.411571 -vn 0.595773 0.689684 -0.411571 -vn 0.595773 0.689684 -0.411571 -vn 0.595773 0.689684 -0.411571 -vn 0.595773 0.689684 -0.411571 -vn -0.871353 -0.243582 -0.425924 -vn -0.871353 -0.243582 -0.425924 -vn -0.871353 -0.243582 -0.425924 -vn -0.871353 -0.243582 -0.425924 -vn -0.871353 -0.243582 -0.425924 -vn -0.871353 -0.243582 -0.425924 -vn -0.765720 -0.356962 -0.535024 -vn -0.765720 -0.356962 -0.535024 -vn -0.765720 -0.356962 -0.535024 -vn -0.765720 -0.356962 -0.535024 -vn -0.765720 -0.356962 -0.535024 -vn -0.765720 -0.356962 -0.535024 -vn -0.687895 -0.195005 -0.699124 -vn -0.687895 -0.195005 -0.699124 -vn -0.687895 -0.195005 -0.699124 -vn -0.687895 -0.195005 -0.699124 -vn -0.687895 -0.195005 -0.699124 -vn -0.687895 -0.195005 -0.699124 -vn -0.693698 0.063445 -0.717467 -vn -0.693698 0.063445 -0.717467 -vn -0.693698 0.063445 -0.717467 -vn -0.693698 0.063445 -0.717467 -vn -0.693698 0.063445 -0.717467 -vn -0.693698 0.063445 -0.717467 -vn -0.785628 0.179492 -0.592091 -vn -0.785628 0.179492 -0.592091 -vn -0.785628 0.179492 -0.592091 -vn -0.785628 0.179492 -0.592091 -vn -0.785628 0.179492 -0.592091 -vn -0.785628 0.179492 -0.592091 -vn -0.674334 -0.243586 0.697093 -vn -0.674334 -0.243586 0.697093 -vn -0.674334 -0.243586 0.697093 -vn -0.674334 -0.243586 0.697093 -vn -0.674334 -0.243586 0.697093 -vn -0.674334 -0.243586 0.697093 -vn -0.745458 -0.356957 0.562917 -vn -0.745458 -0.356957 0.562917 -vn -0.745458 -0.356957 0.562917 -vn -0.745458 -0.356957 0.562917 -vn -0.745458 -0.356957 0.562917 -vn -0.745458 -0.356957 0.562917 -vn -0.877469 -0.195016 0.438198 -vn -0.877469 -0.195016 0.438198 -vn -0.877469 -0.195016 0.438198 -vn -0.877469 -0.195016 0.438198 -vn -0.877469 -0.195016 0.438198 -vn -0.877469 -0.195016 0.438198 -vn -0.896706 0.063456 0.438054 -vn -0.896706 0.063456 0.438054 -vn -0.896706 0.063456 0.438054 -vn -0.896706 0.063456 0.438054 -vn -0.896706 0.063456 0.438054 -vn -0.896706 0.063456 0.438054 -vn -0.805884 0.179483 0.564214 -vn -0.805884 0.179483 0.564214 -vn -0.805884 0.179483 0.564214 -vn -0.805884 0.179483 0.564214 -vn -0.805884 0.179483 0.564214 -vn -0.805884 0.179483 0.564214 -vn 0.454581 -0.243628 0.856739 -vn 0.454581 -0.243628 0.856739 -vn 0.454581 -0.243628 0.856739 -vn 0.454581 -0.243628 0.856739 -vn 0.454581 -0.243628 0.856739 -vn 0.454581 -0.243628 0.856739 -vn 0.305023 -0.356977 0.882909 -vn 0.305023 -0.356977 0.882909 -vn 0.305023 -0.356977 0.882909 -vn 0.305023 -0.356977 0.882909 -vn 0.305023 -0.356977 0.882909 -vn 0.305023 -0.356977 0.882909 -vn 0.145621 -0.195014 0.969930 -vn 0.145621 -0.195014 0.969930 -vn 0.145621 -0.195014 0.969930 -vn 0.145621 -0.195014 0.969930 -vn 0.145621 -0.195014 0.969930 -vn 0.145621 -0.195014 0.969930 -vn 0.139500 0.063469 0.988186 -vn 0.139500 0.063469 0.988186 -vn 0.139500 0.063469 0.988186 -vn 0.139500 0.063469 0.988186 -vn 0.139500 0.063469 0.988186 -vn 0.139500 0.063469 0.988186 -vn 0.287573 0.179479 0.940792 -vn 0.287573 0.179479 0.940792 -vn 0.287573 0.179479 0.940792 -vn 0.287573 0.179479 0.940792 -vn 0.287573 0.179479 0.940792 -vn 0.287573 0.179479 0.940792 -vn 0.465030 -0.742300 -0.482430 -vn 0.465030 -0.742300 -0.482430 -vn 0.465030 -0.742300 -0.482430 -vn 0.465030 -0.742300 -0.482430 -vn 0.465030 -0.742300 -0.482430 -vn 0.465030 -0.742300 -0.482430 -vn 0.441867 -0.829255 -0.342185 -vn 0.441867 -0.829255 -0.342185 -vn 0.441867 -0.829255 -0.342185 -vn 0.441867 -0.829255 -0.342185 -vn 0.441867 -0.829255 -0.342185 -vn 0.441867 -0.829255 -0.342185 -vn 0.631215 -0.708175 -0.316315 -vn 0.631215 -0.708175 -0.316315 -vn 0.631215 -0.708175 -0.316315 -vn 0.631215 -0.708175 -0.316315 -vn 0.631215 -0.708175 -0.316315 -vn 0.631215 -0.708175 -0.316315 -vn 0.792177 -0.473829 -0.384632 -vn 0.792177 -0.473829 -0.384632 -vn 0.792177 -0.473829 -0.384632 -vn 0.792177 -0.473829 -0.384632 -vn 0.792177 -0.473829 -0.384632 -vn 0.792177 -0.473829 -0.384632 -vn 0.765721 -0.356962 -0.535022 -vn 0.765721 -0.356962 -0.535022 -vn 0.765721 -0.356962 -0.535022 -vn 0.765721 -0.356962 -0.535022 -vn 0.765721 -0.356962 -0.535022 -vn 0.765721 -0.356962 -0.535022 -vn -0.043561 -0.998946 -0.014451 -vn -0.043561 -0.998946 -0.014451 -vn -0.043561 -0.998946 -0.014451 -vn -0.043561 -0.998946 -0.014451 -vn -0.043561 -0.998946 -0.014451 -vn -0.043561 -0.998946 -0.014451 -vn 0.087038 -0.992743 0.082983 -vn 0.087038 -0.992743 0.082983 -vn 0.087038 -0.992743 0.082983 -vn 0.087038 -0.992743 0.082983 -vn 0.087038 -0.992743 0.082983 -vn 0.087038 -0.992743 0.082983 -vn -0.059648 -0.996551 -0.057698 -vn -0.059648 -0.996551 -0.057698 -vn -0.059648 -0.996551 -0.057698 -vn -0.059648 -0.996551 -0.057698 -vn -0.059648 -0.996551 -0.057698 -vn -0.059648 -0.996551 -0.057698 -vn -0.289178 -0.906447 -0.307781 -vn -0.289178 -0.906447 -0.307781 -vn -0.289178 -0.906447 -0.307781 -vn -0.289178 -0.906447 -0.307781 -vn -0.289178 -0.906447 -0.307781 -vn -0.289178 -0.906447 -0.307781 -vn -0.441866 -0.829255 -0.342186 -vn -0.441866 -0.829255 -0.342186 -vn -0.441866 -0.829255 -0.342186 -vn -0.441866 -0.829255 -0.342186 -vn -0.441866 -0.829255 -0.342186 -vn -0.441866 -0.829255 -0.342186 -vn -0.027205 -0.998946 0.036964 -vn -0.027205 -0.998946 0.036964 -vn -0.027205 -0.998946 0.036964 -vn -0.027205 -0.998946 0.036964 -vn -0.027205 -0.998946 0.036964 -vn -0.027205 -0.998946 0.036964 -vn 0.105818 -0.992743 -0.057134 -vn 0.105818 -0.992743 -0.057134 -vn 0.105818 -0.992743 -0.057134 -vn 0.105818 -0.992743 -0.057134 -vn 0.105818 -0.992743 -0.057134 -vn 0.105818 -0.992743 -0.057134 -vn -0.073306 -0.996551 0.038899 -vn -0.073306 -0.996551 0.038899 -vn -0.073306 -0.996551 0.038899 -vn -0.073306 -0.996551 0.038899 -vn -0.073306 -0.996551 0.038899 -vn -0.073306 -0.996551 0.038899 -vn -0.382076 -0.906448 0.179916 -vn -0.382076 -0.906448 0.179916 -vn -0.382076 -0.906448 0.179916 -vn -0.382076 -0.906448 0.179916 -vn -0.382076 -0.906448 0.179916 -vn -0.382076 -0.906448 0.179916 -vn -0.461983 -0.829254 0.314500 -vn -0.461983 -0.829254 0.314500 -vn -0.461983 -0.829254 0.314500 -vn -0.461983 -0.829254 0.314500 -vn -0.461983 -0.829254 0.314500 -vn -0.461983 -0.829254 0.314500 -vn 0.026748 -0.998946 0.037296 -vn 0.026748 -0.998946 0.037296 -vn 0.026748 -0.998946 0.037296 -vn 0.026748 -0.998946 0.037296 -vn 0.026748 -0.998946 0.037296 -vn 0.026748 -0.998946 0.037296 -vn -0.021639 -0.992743 -0.118296 -vn -0.021639 -0.992743 -0.118296 -vn -0.021639 -0.992743 -0.118296 -vn -0.021639 -0.992743 -0.118296 -vn -0.021639 -0.992743 -0.118296 -vn -0.021639 -0.992743 -0.118296 -vn 0.014343 -0.996551 0.081740 -vn 0.014343 -0.996551 0.081740 -vn 0.014343 -0.996551 0.081740 -vn 0.014343 -0.996551 0.081740 -vn 0.014343 -0.996551 0.081740 -vn 0.014343 -0.996551 0.081740 -vn 0.053043 -0.906447 0.418976 -vn 0.053043 -0.906447 0.418976 -vn 0.053043 -0.906447 0.418976 -vn 0.053043 -0.906447 0.418976 -vn 0.053043 -0.906447 0.418976 -vn 0.053043 -0.906447 0.418976 -vn 0.156347 -0.829245 0.536570 -vn 0.156347 -0.829245 0.536570 -vn 0.156347 -0.829245 0.536570 -vn 0.156347 -0.829245 0.536570 -vn 0.156347 -0.829245 0.536570 -vn 0.156347 -0.829245 0.536570 -vn -0.432505 -0.793446 0.428233 -vn -0.432505 -0.793446 0.428233 -vn -0.432505 -0.793446 0.428233 -vn -0.432505 -0.793446 0.428233 -vn -0.432505 -0.793446 0.428233 -vn -0.432505 -0.793446 0.428233 -vn -0.592610 -0.691760 0.412651 -vn -0.592610 -0.691760 0.412651 -vn -0.592610 -0.691760 0.412651 -vn -0.592610 -0.691760 0.412651 -vn -0.592610 -0.691760 0.412651 -vn -0.592610 -0.691760 0.412651 -vn -0.529650 -0.806548 0.262586 -vn -0.529650 -0.806548 0.262586 -vn -0.529650 -0.806548 0.262586 -vn -0.529650 -0.806548 0.262586 -vn -0.529650 -0.806548 0.262586 -vn -0.529650 -0.806548 0.262586 -vn -0.247120 -0.959825 0.132917 -vn -0.247120 -0.959825 0.132917 -vn -0.247120 -0.959825 0.132917 -vn -0.247120 -0.959825 0.132917 -vn -0.247120 -0.959825 0.132917 -vn -0.247120 -0.959825 0.132917 -vn -0.087037 -0.992743 0.082983 -vn -0.087037 -0.992743 0.082983 -vn -0.087037 -0.992743 0.082983 -vn -0.087037 -0.992743 0.082983 -vn -0.087037 -0.992743 0.082983 -vn -0.087037 -0.992743 0.082983 -vn -0.430463 -0.306877 -0.848839 -vn -0.430463 -0.306877 -0.848839 -vn -0.430463 -0.306877 -0.848839 -vn -0.430463 -0.306877 -0.848839 -vn -0.430463 -0.306877 -0.848839 -vn -0.430463 -0.306877 -0.848839 -vn -0.290567 -0.180221 -0.939729 -vn -0.290567 -0.180221 -0.939729 -vn -0.290567 -0.180221 -0.939729 -vn -0.290567 -0.180221 -0.939729 -vn -0.290567 -0.180221 -0.939729 -vn -0.290567 -0.180221 -0.939729 -vn -0.140348 -0.323158 -0.935880 -vn -0.140348 -0.323158 -0.935880 -vn -0.140348 -0.323158 -0.935880 -vn -0.140348 -0.323158 -0.935880 -vn -0.140348 -0.323158 -0.935880 -vn -0.140348 -0.323158 -0.935880 -vn -0.128730 -0.583667 -0.801724 -vn -0.128730 -0.583667 -0.801724 -vn -0.128730 -0.583667 -0.801724 -vn -0.128730 -0.583667 -0.801724 -vn -0.128730 -0.583667 -0.801724 -vn -0.128730 -0.583667 -0.801724 -vn -0.236883 -0.691760 -0.682169 -vn -0.236883 -0.691760 -0.682169 -vn -0.236883 -0.691760 -0.682169 -vn -0.236883 -0.691760 -0.682169 -vn -0.236883 -0.691760 -0.682169 -vn -0.236883 -0.691760 -0.682169 -vn -0.457552 0.627732 -0.629761 -vn -0.457552 0.627732 -0.629761 -vn -0.457552 0.627732 -0.629761 -vn -0.457552 0.627732 -0.629761 -vn -0.457552 0.627732 -0.629761 -vn -0.457552 0.627732 -0.629761 -vn -0.400718 0.497309 -0.769486 -vn -0.400718 0.497309 -0.769486 -vn -0.400718 0.497309 -0.769486 -vn -0.400718 0.497309 -0.769486 -vn -0.400718 0.497309 -0.769486 -vn -0.400718 0.497309 -0.769486 -vn -0.449625 0.215790 -0.866760 -vn -0.449625 0.215790 -0.866760 -vn -0.449625 0.215790 -0.866760 -vn -0.449625 0.215790 -0.866760 -vn -0.449625 0.215790 -0.866760 -vn -0.449625 0.215790 -0.866760 -vn -0.452093 -0.054653 -0.890295 -vn -0.452093 -0.054653 -0.890295 -vn -0.452093 -0.054653 -0.890295 -vn -0.452093 -0.054653 -0.890295 -vn -0.452093 -0.054653 -0.890295 -vn -0.452093 -0.054653 -0.890295 -vn -0.586151 0.074382 -0.806780 -vn -0.586151 0.074382 -0.806780 -vn -0.586151 0.074382 -0.806780 -vn -0.586151 0.074382 -0.806780 -vn -0.586151 0.074382 -0.806780 -vn -0.586151 0.074382 -0.806780 -vn -0.685401 0.215780 -0.695460 -vn -0.685401 0.215780 -0.695460 -vn -0.685401 0.215780 -0.695460 -vn -0.685401 0.215780 -0.695460 -vn -0.685401 0.215780 -0.695460 -vn -0.685401 0.215780 -0.695460 -vn -0.873222 0.215779 0.436948 -vn -0.873222 0.215779 0.436948 -vn -0.873222 0.215779 0.436948 -vn -0.873222 0.215779 0.436948 -vn -0.873222 0.215779 0.436948 -vn -0.873222 0.215779 0.436948 -vn -0.889052 -0.054651 0.454532 -vn -0.889052 -0.054651 0.454532 -vn -0.889052 -0.054651 0.454532 -vn -0.889052 -0.054651 0.454532 -vn -0.889052 -0.054651 0.454532 -vn -0.889052 -0.054651 0.454532 -vn -0.787431 -0.180224 0.589467 -vn -0.787431 -0.180224 0.589467 -vn -0.787431 -0.180224 0.589467 -vn -0.787431 -0.180224 0.589467 -vn -0.787431 -0.180224 0.589467 -vn -0.787431 -0.180224 0.589467 -vn -0.701375 -0.035883 0.711889 -vn -0.701375 -0.035883 0.711889 -vn -0.701375 -0.035883 0.711889 -vn -0.701375 -0.035883 0.711889 -vn -0.701375 -0.035883 0.711889 -vn -0.701375 -0.035883 0.711889 -vn -0.688065 0.235625 0.686329 -vn -0.688065 0.235625 0.686329 -vn -0.688065 0.235625 0.686329 -vn -0.688065 0.235625 0.686329 -vn -0.688065 0.235625 0.686329 -vn -0.688065 0.235625 0.686329 -vn 0.058873 0.992581 -0.106378 -vn 0.058873 0.992581 -0.106378 -vn 0.058873 0.992581 -0.106378 -vn 0.058873 0.992581 -0.106378 -vn 0.058873 0.992581 -0.106378 -vn 0.058873 0.992581 -0.106378 -vn -0.598896 0.739162 0.308161 -vn -0.598896 0.739162 0.308161 -vn -0.598896 0.739162 0.308161 -vn -0.598896 0.739162 0.308161 -vn -0.598896 0.739162 0.308161 -vn -0.598896 0.739162 0.308161 -vn -0.369160 0.909203 0.192537 -vn -0.369160 0.909203 0.192537 -vn -0.369160 0.909203 0.192537 -vn -0.369160 0.909203 0.192537 -vn -0.369160 0.909203 0.192537 -vn -0.369160 0.909203 0.192537 -vn -0.249563 0.964958 0.081088 -vn -0.249563 0.964958 0.081088 -vn -0.249563 0.964958 0.081088 -vn -0.249563 0.964958 0.081088 -vn -0.249563 0.964958 0.081088 -vn -0.249563 0.964958 0.081088 -vn 0.253568 0.902161 -0.349011 -vn 0.253568 0.902161 -0.349011 -vn 0.253568 0.902161 -0.349011 -vn 0.253568 0.902161 -0.349011 -vn 0.253568 0.902161 -0.349011 -vn 0.253568 0.902161 -0.349011 -vn 0.408190 0.813185 -0.414863 -vn 0.408190 0.813185 -0.414863 -vn 0.408190 0.813185 -0.414863 -vn 0.408190 0.813185 -0.414863 -vn 0.408190 0.813185 -0.414863 -vn 0.408190 0.813185 -0.414863 -vn 0.191824 0.959958 -0.204166 -vn 0.191824 0.959958 -0.204166 -vn 0.191824 0.959958 -0.204166 -vn 0.191824 0.959958 -0.204166 -vn 0.191824 0.959958 -0.204166 -vn 0.191824 0.959958 -0.204166 -vn -0.036772 0.999020 0.024626 -vn -0.036772 0.999020 0.024626 -vn -0.036772 0.999020 0.024626 -vn -0.036772 0.999020 0.024626 -vn -0.036772 0.999020 0.024626 -vn -0.036772 0.999020 0.024626 -vn -0.142873 0.976691 0.160193 -vn -0.142873 0.976691 0.160193 -vn -0.142873 0.976691 0.160193 -vn -0.142873 0.976691 0.160193 -vn -0.142873 0.976691 0.160193 -vn -0.142873 0.976691 0.160193 -vn -0.253568 0.902161 -0.349011 -vn -0.253568 0.902161 -0.349011 -vn -0.253568 0.902161 -0.349011 -vn -0.253568 0.902161 -0.349011 -vn -0.253568 0.902161 -0.349011 -vn -0.253568 0.902161 -0.349011 -vn -0.134896 0.959957 -0.245530 -vn -0.134896 0.959957 -0.245530 -vn -0.134896 0.959957 -0.245530 -vn -0.134896 0.959957 -0.245530 -vn -0.134896 0.959957 -0.245530 -vn -0.134896 0.959957 -0.245530 -vn 0.012057 0.999020 0.042583 -vn 0.012057 0.999020 0.042583 -vn 0.012057 0.999020 0.042583 -vn 0.012057 0.999020 0.042583 -vn 0.012057 0.999020 0.042583 -vn 0.012057 0.999020 0.042583 -vn 0.124796 0.977201 0.171769 -vn 0.124796 0.977201 0.171769 -vn 0.124796 0.977201 0.171769 -vn 0.124796 0.977201 0.171769 -vn 0.124796 0.977201 0.171769 -vn 0.124796 0.977201 0.171769 -vn 0.036772 0.999020 0.024625 -vn 0.036772 0.999020 0.024625 -vn 0.036772 0.999020 0.024625 -vn 0.036772 0.999020 0.024625 -vn 0.036772 0.999020 0.024625 -vn 0.036772 0.999020 0.024625 -vn -0.410277 0.902165 0.133305 -vn -0.410277 0.902165 0.133305 -vn -0.410277 0.902165 0.133305 -vn -0.410277 0.902165 0.133305 -vn -0.410277 0.902165 0.133305 -vn -0.410277 0.902165 0.133305 -vn -0.275196 0.959958 0.052421 -vn -0.275196 0.959958 0.052421 -vn -0.275196 0.959958 0.052421 -vn -0.275196 0.959958 0.052421 -vn -0.275196 0.959958 0.052421 -vn -0.275196 0.959958 0.052421 -vn 0.044224 0.999020 0.001692 -vn 0.044224 0.999020 0.001692 -vn 0.044224 0.999020 0.001692 -vn 0.044224 0.999020 0.001692 -vn 0.044224 0.999020 0.001692 -vn 0.044224 0.999020 0.001692 -vn 0.201927 0.977201 -0.065610 -vn 0.201927 0.977201 -0.065610 -vn 0.201927 0.977201 -0.065610 -vn 0.201927 0.977201 -0.065610 -vn 0.201927 0.977201 -0.065610 -vn 0.201927 0.977201 -0.065610 -vn 0.034783 0.999020 -0.027363 -vn 0.034783 0.999020 -0.027363 -vn 0.034783 0.999020 -0.027363 -vn 0.034783 0.999020 -0.027363 -vn 0.034783 0.999020 -0.027363 -vn 0.034783 0.999020 -0.027363 -vn 0.000000 0.902171 0.431379 -vn 0.000000 0.902171 0.431379 -vn 0.000000 0.902171 0.431379 -vn 0.000000 0.902171 0.431379 -vn 0.000000 0.902171 0.431379 -vn 0.000000 0.902171 0.431379 -vn -0.035184 0.959958 0.277925 -vn -0.035184 0.959958 0.277925 -vn -0.035184 0.959958 0.277925 -vn -0.035184 0.959958 0.277925 -vn -0.035184 0.959958 0.277925 -vn -0.035184 0.959958 0.277925 -vn 0.015275 0.999020 -0.041538 -vn 0.015275 0.999020 -0.041538 -vn 0.015275 0.999020 -0.041538 -vn 0.015275 0.999020 -0.041538 -vn 0.015275 0.999020 -0.041538 -vn 0.015275 0.999020 -0.041538 -vn 0.000000 0.977201 -0.212318 -vn 0.000000 0.977201 -0.212318 -vn 0.000000 0.977201 -0.212318 -vn 0.000000 0.977201 -0.212318 -vn 0.000000 0.977201 -0.212318 -vn 0.000000 0.977201 -0.212318 -vn -0.015275 0.999020 -0.041537 -vn -0.015275 0.999020 -0.041537 -vn -0.015275 0.999020 -0.041537 -vn -0.015275 0.999020 -0.041537 -vn -0.015275 0.999020 -0.041537 -vn -0.015275 0.999020 -0.041537 -vn 0.275196 0.959958 0.052421 -vn 0.275196 0.959958 0.052421 -vn 0.275196 0.959958 0.052421 -vn 0.275196 0.959958 0.052421 -vn 0.275196 0.959958 0.052421 -vn 0.275196 0.959958 0.052421 -vn 0.410278 0.902165 0.133305 -vn 0.410278 0.902165 0.133305 -vn 0.410278 0.902165 0.133305 -vn 0.410278 0.902165 0.133305 -vn 0.410278 0.902165 0.133305 -vn 0.410278 0.902165 0.133305 -vn 0.253451 0.959958 0.119345 -vn 0.253451 0.959958 0.119345 -vn 0.253451 0.959958 0.119345 -vn 0.253451 0.959958 0.119345 -vn 0.253451 0.959958 0.119345 -vn 0.253451 0.959958 0.119345 -vn -0.034783 0.999020 -0.027363 -vn -0.034783 0.999020 -0.027363 -vn -0.034783 0.999020 -0.027363 -vn -0.034783 0.999020 -0.027363 -vn -0.034783 0.999020 -0.027363 -vn -0.034783 0.999020 -0.027363 -vn -0.201927 0.977201 -0.065610 -vn -0.201927 0.977201 -0.065610 -vn -0.201927 0.977201 -0.065610 -vn -0.201927 0.977201 -0.065610 -vn -0.201927 0.977201 -0.065610 -vn -0.201927 0.977201 -0.065610 -vn -0.112778 0.588633 -0.800495 -vn -0.112778 0.588633 -0.800495 -vn -0.112778 0.588633 -0.800495 -vn -0.112778 0.588633 -0.800495 -vn -0.112778 0.588633 -0.800495 -vn -0.112778 0.588633 -0.800495 -vn 0.000000 0.477035 -0.878884 -vn 0.000000 0.477035 -0.878884 -vn 0.000000 0.477035 -0.878884 -vn 0.000000 0.477035 -0.878884 -vn 0.000000 0.477035 -0.878884 -vn 0.000000 0.477035 -0.878884 -vn 0.112778 0.588633 -0.800495 -vn 0.112778 0.588633 -0.800495 -vn 0.112778 0.588633 -0.800495 -vn 0.112778 0.588633 -0.800495 -vn 0.112778 0.588633 -0.800495 -vn 0.112778 0.588633 -0.800495 -vn 0.081471 0.788532 -0.609574 -vn 0.081471 0.788532 -0.609574 -vn 0.081471 0.788532 -0.609574 -vn 0.081471 0.788532 -0.609574 -vn 0.081471 0.788532 -0.609574 -vn 0.081471 0.788532 -0.609574 -vn 0.000000 0.870393 -0.492358 -vn 0.000000 0.870393 -0.492358 -vn 0.000000 0.870393 -0.492358 -vn 0.000000 0.870393 -0.492358 -vn 0.000000 0.870393 -0.492358 -vn 0.000000 0.870393 -0.492358 -vn -0.796160 0.588651 -0.140071 -vn -0.796160 0.588651 -0.140071 -vn -0.796160 0.588651 -0.140071 -vn -0.796160 0.588651 -0.140071 -vn -0.796160 0.588651 -0.140071 -vn -0.796160 0.588651 -0.140071 -vn -0.841082 0.341222 -0.419701 -vn -0.841082 0.341222 -0.419701 -vn -0.841082 0.341222 -0.419701 -vn -0.841082 0.341222 -0.419701 -vn -0.841082 0.341222 -0.419701 -vn -0.841082 0.341222 -0.419701 -vn -0.835895 0.476990 -0.271587 -vn -0.835895 0.476990 -0.271587 -vn -0.835895 0.476990 -0.271587 -vn -0.835895 0.476990 -0.271587 -vn -0.835895 0.476990 -0.271587 -vn -0.835895 0.476990 -0.271587 -vn -0.726412 0.588697 -0.354628 -vn -0.726412 0.588697 -0.354628 -vn -0.726412 0.588697 -0.354628 -vn -0.726412 0.588697 -0.354628 -vn -0.726412 0.588697 -0.354628 -vn -0.726412 0.588697 -0.354628 -vn -0.468283 0.870380 -0.152152 -vn -0.468283 0.870380 -0.152152 -vn -0.468283 0.870380 -0.152152 -vn -0.468283 0.870380 -0.152152 -vn -0.468283 0.870380 -0.152152 -vn -0.468283 0.870380 -0.152152 -vn -0.379250 0.588672 0.713888 -vn -0.379250 0.588672 0.713888 -vn -0.379250 0.588672 0.713888 -vn -0.379250 0.588672 0.713888 -vn -0.379250 0.588672 0.713888 -vn -0.379250 0.588672 0.713888 -vn -0.659067 0.341235 0.670216 -vn -0.659067 0.341235 0.670216 -vn -0.659067 0.341235 0.670216 -vn -0.659067 0.341235 0.670216 -vn -0.659067 0.341235 0.670216 -vn -0.659067 0.341235 0.670216 -vn -0.516598 0.477033 0.711032 -vn -0.516598 0.477033 0.711032 -vn -0.516598 0.477033 0.711032 -vn -0.516598 0.477033 0.711032 -vn -0.516598 0.477033 0.711032 -vn -0.516598 0.477033 0.711032 -vn -0.561743 0.588674 0.581298 -vn -0.561743 0.588674 0.581298 -vn -0.561743 0.588674 0.581298 -vn -0.561743 0.588674 0.581298 -vn -0.561743 0.588674 0.581298 -vn -0.561743 0.588674 0.581298 -vn -0.289415 0.870379 0.398345 -vn -0.289415 0.870379 0.398345 -vn -0.289415 0.870379 0.398345 -vn -0.289415 0.870379 0.398345 -vn -0.289415 0.870379 0.398345 -vn -0.289415 0.870379 0.398345 -vn 0.561743 0.588673 0.581298 -vn 0.561743 0.588673 0.581298 -vn 0.561743 0.588673 0.581298 -vn 0.561743 0.588673 0.581298 -vn 0.561743 0.588673 0.581298 -vn 0.561743 0.588673 0.581298 -vn 0.433754 0.341230 0.833918 -vn 0.433754 0.341230 0.833918 -vn 0.433754 0.341230 0.833918 -vn 0.433754 0.341230 0.833918 -vn 0.433754 0.341230 0.833918 -vn 0.433754 0.341230 0.833918 -vn 0.516598 0.477034 0.711031 -vn 0.516598 0.477034 0.711031 -vn 0.516598 0.477034 0.711031 -vn 0.516598 0.477034 0.711031 -vn 0.516598 0.477034 0.711031 -vn 0.516598 0.477034 0.711031 -vn 0.379250 0.588674 0.713885 -vn 0.379250 0.588674 0.713885 -vn 0.379250 0.588674 0.713885 -vn 0.379250 0.588674 0.713885 -vn 0.379250 0.588674 0.713885 -vn 0.379250 0.588674 0.713885 -vn 0.289415 0.870379 0.398345 -vn 0.289415 0.870379 0.398345 -vn 0.289415 0.870379 0.398345 -vn 0.289415 0.870379 0.398345 -vn 0.289415 0.870379 0.398345 -vn 0.289415 0.870379 0.398345 -vn 0.835896 0.476990 -0.271587 -vn 0.835896 0.476990 -0.271587 -vn 0.835896 0.476990 -0.271587 -vn 0.835896 0.476990 -0.271587 -vn 0.835896 0.476990 -0.271587 -vn 0.835896 0.476990 -0.271587 -vn 0.796160 0.588651 -0.140071 -vn 0.796160 0.588651 -0.140071 -vn 0.796160 0.588651 -0.140071 -vn 0.796160 0.588651 -0.140071 -vn 0.796160 0.588651 -0.140071 -vn 0.796160 0.588651 -0.140071 -vn 0.604890 0.788551 -0.110882 -vn 0.604890 0.788551 -0.110882 -vn 0.604890 0.788551 -0.110882 -vn 0.604890 0.788551 -0.110882 -vn 0.604890 0.788551 -0.110882 -vn 0.604890 0.788551 -0.110882 -vn 0.317030 0.947041 -0.051041 -vn 0.317030 0.947041 -0.051041 -vn 0.317030 0.947041 -0.051041 -vn 0.317030 0.947041 -0.051041 -vn 0.317030 0.947041 -0.051041 -vn 0.317030 0.947041 -0.051041 -vn 0.468283 0.870380 -0.152152 -vn 0.468283 0.870380 -0.152152 -vn 0.468283 0.870380 -0.152152 -vn 0.468283 0.870380 -0.152152 -vn 0.468283 0.870380 -0.152152 -vn 0.468283 0.870380 -0.152152 -vn 0.554557 0.788542 -0.265834 -vn 0.554557 0.788542 -0.265834 -vn 0.554557 0.788542 -0.265834 -vn 0.554557 0.788542 -0.265834 -vn 0.554557 0.788542 -0.265834 -vn 0.554557 0.788542 -0.265834 -vn 0.467973 0.063459 -0.881462 -vn 0.467973 0.063459 -0.881462 -vn 0.467973 0.063459 -0.881462 -vn 0.467973 0.063459 -0.881462 -vn 0.467973 0.063459 -0.881462 -vn 0.467973 0.063459 -0.881462 -vn 0.687896 -0.195001 -0.699124 -vn 0.687896 -0.195001 -0.699124 -vn 0.687896 -0.195001 -0.699124 -vn 0.687896 -0.195001 -0.699124 -vn 0.687896 -0.195001 -0.699124 -vn 0.687896 -0.195001 -0.699124 -vn 0.587000 -0.051554 -0.807944 -vn 0.587000 -0.051554 -0.807944 -vn 0.587000 -0.051554 -0.807944 -vn 0.587000 -0.051554 -0.807944 -vn 0.587000 -0.051554 -0.807944 -vn 0.587000 -0.051554 -0.807944 -vn 0.693701 0.063438 -0.717464 -vn 0.693701 0.063438 -0.717464 -vn 0.693701 0.063438 -0.717464 -vn 0.693701 0.063438 -0.717464 -vn 0.693701 0.063438 -0.717464 -vn 0.693701 0.063438 -0.717464 -vn 0.536306 0.409239 -0.738173 -vn 0.536306 0.409239 -0.738173 -vn 0.536306 0.409239 -0.738173 -vn 0.536306 0.409239 -0.738173 -vn 0.536306 0.409239 -0.738173 -vn 0.536306 0.409239 -0.738173 -vn -0.587000 -0.051544 -0.807944 -vn -0.587000 -0.051544 -0.807944 -vn -0.587000 -0.051544 -0.807944 -vn -0.587000 -0.051544 -0.807944 -vn -0.587000 -0.051544 -0.807944 -vn -0.587000 -0.051544 -0.807944 -vn -0.467975 0.063459 -0.881460 -vn -0.467975 0.063459 -0.881460 -vn -0.467975 0.063459 -0.881460 -vn -0.467975 0.063459 -0.881460 -vn -0.467975 0.063459 -0.881460 -vn -0.467975 0.063459 -0.881460 -vn -0.448687 0.297884 -0.842583 -vn -0.448687 0.297884 -0.842583 -vn -0.448687 0.297884 -0.842583 -vn -0.448687 0.297884 -0.842583 -vn -0.448687 0.297884 -0.842583 -vn -0.448687 0.297884 -0.842583 -vn -0.536308 0.409236 -0.738173 -vn -0.536308 0.409236 -0.738173 -vn -0.536308 0.409236 -0.738173 -vn -0.536308 0.409236 -0.738173 -vn -0.536308 0.409236 -0.738173 -vn -0.536308 0.409236 -0.738173 -vn -0.662688 0.297887 -0.687101 -vn -0.662688 0.297887 -0.687101 -vn -0.662688 0.297887 -0.687101 -vn -0.662688 0.297887 -0.687101 -vn -0.662688 0.297887 -0.687101 -vn -0.662688 0.297887 -0.687101 -vn -0.949783 -0.051556 0.308633 -vn -0.949783 -0.051556 0.308633 -vn -0.949783 -0.051556 0.308633 -vn -0.949783 -0.051556 0.308633 -vn -0.949783 -0.051556 0.308633 -vn -0.949783 -0.051556 0.308633 -vn -0.982930 0.063496 0.172678 -vn -0.982930 0.063496 0.172678 -vn -0.982930 0.063496 0.172678 -vn -0.982930 0.063496 0.172678 -vn -0.982930 0.063496 0.172678 -vn -0.982930 0.063496 0.172678 -vn -0.939992 0.297883 0.166374 -vn -0.939992 0.297883 0.166374 -vn -0.939992 0.297883 0.166374 -vn -0.939992 0.297883 0.166374 -vn -0.939992 0.297883 0.166374 -vn -0.939992 0.297883 0.166374 -vn -0.867778 0.409221 0.281957 -vn -0.867778 0.409221 0.281957 -vn -0.867778 0.409221 0.281957 -vn -0.867778 0.409221 0.281957 -vn -0.867778 0.409221 0.281957 -vn -0.867778 0.409221 0.281957 -vn -0.858266 0.297852 0.417929 -vn -0.858266 0.297852 0.417929 -vn -0.858266 0.297852 0.417929 -vn -0.858266 0.297852 0.417929 -vn -0.858266 0.297852 0.417929 -vn -0.858266 0.297852 0.417929 -vn 0.000000 -0.051490 0.998674 -vn 0.000000 -0.051490 0.998674 -vn 0.000000 -0.051490 0.998674 -vn 0.000000 -0.051490 0.998674 -vn 0.000000 -0.051490 0.998674 -vn 0.000000 -0.051490 0.998674 -vn -0.139500 0.063469 0.988186 -vn -0.139500 0.063469 0.988186 -vn -0.139500 0.063469 0.988186 -vn -0.139500 0.063469 0.988186 -vn -0.139500 0.063469 0.988186 -vn -0.139500 0.063469 0.988186 -vn -0.132266 0.297902 0.945389 -vn -0.132266 0.297902 0.945389 -vn -0.132266 0.297902 0.945389 -vn -0.132266 0.297902 0.945389 -vn -0.132266 0.297902 0.945389 -vn -0.132266 0.297902 0.945389 -vn 0.000000 0.409227 0.912433 -vn 0.000000 0.409227 0.912433 -vn 0.000000 0.409227 0.912433 -vn 0.000000 0.409227 0.912433 -vn 0.000000 0.409227 0.912433 -vn 0.000000 0.409227 0.912433 -vn 0.132266 0.297902 0.945389 -vn 0.132266 0.297902 0.945389 -vn 0.132266 0.297902 0.945389 -vn 0.132266 0.297902 0.945389 -vn 0.132266 0.297902 0.945389 -vn 0.132266 0.297902 0.945389 -vn 0.982930 0.063496 0.172678 -vn 0.982930 0.063496 0.172678 -vn 0.982930 0.063496 0.172678 -vn 0.982930 0.063496 0.172678 -vn 0.982930 0.063496 0.172678 -vn 0.982930 0.063496 0.172678 -vn 0.949783 -0.051556 0.308633 -vn 0.949783 -0.051556 0.308633 -vn 0.949783 -0.051556 0.308633 -vn 0.949783 -0.051556 0.308633 -vn 0.949783 -0.051556 0.308633 -vn 0.949783 -0.051556 0.308633 -vn 0.896706 0.063456 0.438054 -vn 0.896706 0.063456 0.438054 -vn 0.896706 0.063456 0.438054 -vn 0.896706 0.063456 0.438054 -vn 0.896706 0.063456 0.438054 -vn 0.896706 0.063456 0.438054 -vn 0.858265 0.297853 0.417929 -vn 0.858265 0.297853 0.417929 -vn 0.858265 0.297853 0.417929 -vn 0.858265 0.297853 0.417929 -vn 0.858265 0.297853 0.417929 -vn 0.858265 0.297853 0.417929 -vn 0.867778 0.409221 0.281957 -vn 0.867778 0.409221 0.281957 -vn 0.867778 0.409221 0.281957 -vn 0.867778 0.409221 0.281957 -vn 0.867778 0.409221 0.281957 -vn 0.867778 0.409221 0.281957 -vn -0.121027 -0.473857 -0.872245 -vn -0.121027 -0.473857 -0.872245 -vn -0.121027 -0.473857 -0.872245 -vn -0.121027 -0.473857 -0.872245 -vn -0.121027 -0.473857 -0.872245 -vn -0.121027 -0.473857 -0.872245 -vn 0.000000 -0.580864 -0.814001 -vn 0.000000 -0.580864 -0.814001 -vn 0.000000 -0.580864 -0.814001 -vn 0.000000 -0.580864 -0.814001 -vn 0.000000 -0.580864 -0.814001 -vn 0.000000 -0.580864 -0.814001 -vn 0.121027 -0.473857 -0.872245 -vn 0.121027 -0.473857 -0.872245 -vn 0.121027 -0.473857 -0.872245 -vn 0.121027 -0.473857 -0.872245 -vn 0.121027 -0.473857 -0.872245 -vn 0.121027 -0.473857 -0.872245 -vn 0.135827 -0.243541 -0.960333 -vn 0.135827 -0.243541 -0.960333 -vn 0.135827 -0.243541 -0.960333 -vn 0.135827 -0.243541 -0.960333 -vn 0.135827 -0.243541 -0.960333 -vn 0.135827 -0.243541 -0.960333 -vn 0.000000 -0.127726 -0.991810 -vn 0.000000 -0.127726 -0.991810 -vn 0.000000 -0.127726 -0.991810 -vn 0.000000 -0.127726 -0.991810 -vn 0.000000 -0.127726 -0.991810 -vn 0.000000 -0.127726 -0.991810 -vn -0.866956 -0.473854 -0.154433 -vn -0.866956 -0.473854 -0.154433 -vn -0.866956 -0.473854 -0.154433 -vn -0.866956 -0.473854 -0.154433 -vn -0.866956 -0.473854 -0.154433 -vn -0.866956 -0.473854 -0.154433 -vn -0.631218 -0.708173 -0.316316 -vn -0.631218 -0.708173 -0.316316 -vn -0.631218 -0.708173 -0.316316 -vn -0.631218 -0.708173 -0.316316 -vn -0.631218 -0.708173 -0.316316 -vn -0.631218 -0.708173 -0.316316 -vn -0.774177 -0.580836 -0.251554 -vn -0.774177 -0.580836 -0.251554 -vn -0.774177 -0.580836 -0.251554 -vn -0.774177 -0.580836 -0.251554 -vn -0.774177 -0.580836 -0.251554 -vn -0.774177 -0.580836 -0.251554 -vn -0.792178 -0.473830 -0.384628 -vn -0.792178 -0.473830 -0.384628 -vn -0.792178 -0.473830 -0.384628 -vn -0.792178 -0.473830 -0.384628 -vn -0.792178 -0.473830 -0.384628 -vn -0.792178 -0.473830 -0.384628 -vn -0.943260 -0.127743 -0.306499 -vn -0.943260 -0.127743 -0.306499 -vn -0.943260 -0.127743 -0.306499 -vn -0.943260 -0.127743 -0.306499 -vn -0.943260 -0.127743 -0.306499 -vn -0.943260 -0.127743 -0.306499 -vn -0.414800 -0.473802 0.776822 -vn -0.414800 -0.473802 0.776822 -vn -0.414800 -0.473802 0.776822 -vn -0.414800 -0.473802 0.776822 -vn -0.414800 -0.473802 0.776822 -vn -0.414800 -0.473802 0.776822 -vn -0.495891 -0.708172 0.502578 -vn -0.495891 -0.708172 0.502578 -vn -0.495891 -0.708172 0.502578 -vn -0.495891 -0.708172 0.502578 -vn -0.495891 -0.708172 0.502578 -vn -0.495891 -0.708172 0.502578 -vn -0.478463 -0.580845 0.658553 -vn -0.478463 -0.580845 0.658553 -vn -0.478463 -0.580845 0.658553 -vn -0.478463 -0.580845 0.658553 -vn -0.478463 -0.580845 0.658553 -vn -0.478463 -0.580845 0.658553 -vn -0.610603 -0.473829 0.634547 -vn -0.610603 -0.473829 0.634547 -vn -0.610603 -0.473829 0.634547 -vn -0.610603 -0.473829 0.634547 -vn -0.610603 -0.473829 0.634547 -vn -0.610603 -0.473829 0.634547 -vn -0.582965 -0.127790 0.802385 -vn -0.582965 -0.127790 0.802385 -vn -0.582965 -0.127790 0.802385 -vn -0.582965 -0.127790 0.802385 -vn -0.582965 -0.127790 0.802385 -vn -0.582965 -0.127790 0.802385 -vn 0.610604 -0.473829 0.634546 -vn 0.610604 -0.473829 0.634546 -vn 0.610604 -0.473829 0.634546 -vn 0.610604 -0.473829 0.634546 -vn 0.610604 -0.473829 0.634546 -vn 0.610604 -0.473829 0.634546 -vn 0.324743 -0.708172 0.626924 -vn 0.324743 -0.708172 0.626924 -vn 0.324743 -0.708172 0.626924 -vn 0.324743 -0.708172 0.626924 -vn 0.324743 -0.708172 0.626924 -vn 0.324743 -0.708172 0.626924 -vn 0.478462 -0.580847 0.658553 -vn 0.478462 -0.580847 0.658553 -vn 0.478462 -0.580847 0.658553 -vn 0.478462 -0.580847 0.658553 -vn 0.478462 -0.580847 0.658553 -vn 0.478462 -0.580847 0.658553 -vn 0.414801 -0.473802 0.776822 -vn 0.414801 -0.473802 0.776822 -vn 0.414801 -0.473802 0.776822 -vn 0.414801 -0.473802 0.776822 -vn 0.414801 -0.473802 0.776822 -vn 0.414801 -0.473802 0.776822 -vn 0.582966 -0.127787 0.802385 -vn 0.582966 -0.127787 0.802385 -vn 0.582966 -0.127787 0.802385 -vn 0.582966 -0.127787 0.802385 -vn 0.582966 -0.127787 0.802385 -vn 0.582966 -0.127787 0.802385 -vn 0.774177 -0.580836 -0.251554 -vn 0.774177 -0.580836 -0.251554 -vn 0.774177 -0.580836 -0.251554 -vn 0.774177 -0.580836 -0.251554 -vn 0.774177 -0.580836 -0.251554 -vn 0.774177 -0.580836 -0.251554 -vn 0.866974 -0.473816 -0.154449 -vn 0.866974 -0.473816 -0.154449 -vn 0.866974 -0.473816 -0.154449 -vn 0.866974 -0.473816 -0.154449 -vn 0.866974 -0.473816 -0.154449 -vn 0.866974 -0.473816 -0.154449 -vn 0.955284 -0.243611 -0.167587 -vn 0.955284 -0.243611 -0.167587 -vn 0.955284 -0.243611 -0.167587 -vn 0.955284 -0.243611 -0.167587 -vn 0.955284 -0.243611 -0.167587 -vn 0.955284 -0.243611 -0.167587 -vn 0.943260 -0.127743 -0.306499 -vn 0.943260 -0.127743 -0.306499 -vn 0.943260 -0.127743 -0.306499 -vn 0.943260 -0.127743 -0.306499 -vn 0.943260 -0.127743 -0.306499 -vn 0.943260 -0.127743 -0.306499 -vn 0.871352 -0.243587 -0.425924 -vn 0.871352 -0.243587 -0.425924 -vn 0.871352 -0.243587 -0.425924 -vn 0.871352 -0.243587 -0.425924 -vn 0.871352 -0.243587 -0.425924 -vn 0.871352 -0.243587 -0.425924 -vn 0.203355 -0.906448 -0.370134 -vn 0.203355 -0.906448 -0.370134 -vn 0.203355 -0.906448 -0.370134 -vn 0.203355 -0.906448 -0.370134 -vn 0.203355 -0.906448 -0.370134 -vn 0.203355 -0.906448 -0.370134 -vn 0.059648 -0.996551 -0.057699 -vn 0.059648 -0.996551 -0.057699 -vn 0.059648 -0.996551 -0.057699 -vn 0.059648 -0.996551 -0.057699 -vn 0.059648 -0.996551 -0.057699 -vn 0.059648 -0.996551 -0.057699 -vn 0.160829 -0.961838 -0.221363 -vn 0.160829 -0.961838 -0.221363 -vn 0.160829 -0.961838 -0.221363 -vn 0.160829 -0.961838 -0.221363 -vn 0.160829 -0.961838 -0.221363 -vn 0.160829 -0.961838 -0.221363 -vn 0.289177 -0.906448 -0.307781 -vn 0.289177 -0.906448 -0.307781 -vn 0.289177 -0.906448 -0.307781 -vn 0.289177 -0.906448 -0.307781 -vn 0.289177 -0.906448 -0.307781 -vn 0.289177 -0.906448 -0.307781 -vn 0.451762 -0.639746 -0.621801 -vn 0.451762 -0.639746 -0.621801 -vn 0.451762 -0.639746 -0.621801 -vn 0.451762 -0.639746 -0.621801 -vn 0.451762 -0.639746 -0.621801 -vn 0.451762 -0.639746 -0.621801 -vn -0.160829 -0.961838 -0.221365 -vn -0.160829 -0.961838 -0.221365 -vn -0.160829 -0.961838 -0.221365 -vn -0.160829 -0.961838 -0.221365 -vn -0.160829 -0.961838 -0.221365 -vn -0.160829 -0.961838 -0.221365 -vn -0.203357 -0.906447 -0.370134 -vn -0.203357 -0.906447 -0.370134 -vn -0.203357 -0.906447 -0.370134 -vn -0.203357 -0.906447 -0.370134 -vn -0.203357 -0.906447 -0.370134 -vn -0.203357 -0.906447 -0.370134 -vn -0.315114 -0.742298 -0.591352 -vn -0.315114 -0.742298 -0.591352 -vn -0.315114 -0.742298 -0.591352 -vn -0.315114 -0.742298 -0.591352 -vn -0.315114 -0.742298 -0.591352 -vn -0.315114 -0.742298 -0.591352 -vn -0.451762 -0.639744 -0.621802 -vn -0.451762 -0.639744 -0.621802 -vn -0.451762 -0.639744 -0.621802 -vn -0.451762 -0.639744 -0.621802 -vn -0.451762 -0.639744 -0.621802 -vn -0.451762 -0.639744 -0.621802 -vn -0.465033 -0.742298 -0.482430 -vn -0.465033 -0.742298 -0.482430 -vn -0.465033 -0.742298 -0.482430 -vn -0.465033 -0.742298 -0.482430 -vn -0.465033 -0.742298 -0.482430 -vn -0.465033 -0.742298 -0.482430 -vn -0.260226 -0.961838 0.084554 -vn -0.260226 -0.961838 0.084554 -vn -0.260226 -0.961838 0.084554 -vn -0.260226 -0.961838 0.084554 -vn -0.260226 -0.961838 0.084554 -vn -0.260226 -0.961838 0.084554 -vn -0.414847 -0.906453 0.079027 -vn -0.414847 -0.906453 0.079027 -vn -0.414847 -0.906453 0.079027 -vn -0.414847 -0.906453 0.079027 -vn -0.414847 -0.906453 0.079027 -vn -0.414847 -0.906453 0.079027 -vn -0.659789 -0.742293 0.116962 -vn -0.659789 -0.742293 0.116962 -vn -0.659789 -0.742293 0.116962 -vn -0.659789 -0.742293 0.116962 -vn -0.659789 -0.742293 0.116962 -vn -0.659789 -0.742293 0.116962 -vn -0.730972 -0.639741 0.237511 -vn -0.730972 -0.639741 0.237511 -vn -0.730972 -0.639741 0.237511 -vn -0.730972 -0.639741 0.237511 -vn -0.730972 -0.639741 0.237511 -vn -0.730972 -0.639741 0.237511 -vn -0.602517 -0.742299 0.293198 -vn -0.602517 -0.742299 0.293198 -vn -0.602517 -0.742299 0.293198 -vn -0.602517 -0.742299 0.293198 -vn -0.602517 -0.742299 0.293198 -vn -0.602517 -0.742299 0.293198 -vn 0.000000 -0.961837 0.273623 -vn 0.000000 -0.961837 0.273623 -vn 0.000000 -0.961837 0.273623 -vn 0.000000 -0.961837 0.273623 -vn 0.000000 -0.961837 0.273623 -vn 0.000000 -0.961837 0.273623 -vn -0.053044 -0.906446 0.418976 -vn -0.053044 -0.906446 0.418976 -vn -0.053044 -0.906446 0.418976 -vn -0.053044 -0.906446 0.418976 -vn -0.053044 -0.906446 0.418976 -vn -0.053044 -0.906446 0.418976 -vn -0.092672 -0.742307 0.663621 -vn -0.092672 -0.742307 0.663621 -vn -0.092672 -0.742307 0.663621 -vn -0.092672 -0.742307 0.663621 -vn -0.092672 -0.742307 0.663621 -vn -0.092672 -0.742307 0.663621 -vn 0.000000 -0.639761 0.768574 -vn 0.000000 -0.639761 0.768574 -vn 0.000000 -0.639761 0.768574 -vn 0.000000 -0.639761 0.768574 -vn 0.000000 -0.639761 0.768574 -vn 0.000000 -0.639761 0.768574 -vn 0.092673 -0.742307 0.663621 -vn 0.092673 -0.742307 0.663621 -vn 0.092673 -0.742307 0.663621 -vn 0.092673 -0.742307 0.663621 -vn 0.092673 -0.742307 0.663621 -vn 0.092673 -0.742307 0.663621 -vn 0.414846 -0.906453 0.079027 -vn 0.414846 -0.906453 0.079027 -vn 0.414846 -0.906453 0.079027 -vn 0.414846 -0.906453 0.079027 -vn 0.414846 -0.906453 0.079027 -vn 0.414846 -0.906453 0.079027 -vn 0.260226 -0.961838 0.084554 -vn 0.260226 -0.961838 0.084554 -vn 0.260226 -0.961838 0.084554 -vn 0.260226 -0.961838 0.084554 -vn 0.260226 -0.961838 0.084554 -vn 0.260226 -0.961838 0.084554 -vn 0.382076 -0.906448 0.179916 -vn 0.382076 -0.906448 0.179916 -vn 0.382076 -0.906448 0.179916 -vn 0.382076 -0.906448 0.179916 -vn 0.382076 -0.906448 0.179916 -vn 0.382076 -0.906448 0.179916 -vn 0.602517 -0.742300 0.293198 -vn 0.602517 -0.742300 0.293198 -vn 0.602517 -0.742300 0.293198 -vn 0.602517 -0.742300 0.293198 -vn 0.602517 -0.742300 0.293198 -vn 0.602517 -0.742300 0.293198 -vn 0.730972 -0.639741 0.237511 -vn 0.730972 -0.639741 0.237511 -vn 0.730972 -0.639741 0.237511 -vn 0.730972 -0.639741 0.237511 -vn 0.730972 -0.639741 0.237511 -vn 0.730972 -0.639741 0.237511 -vn 0.050047 -0.959825 0.276099 -vn 0.050047 -0.959825 0.276099 -vn 0.050047 -0.959825 0.276099 -vn 0.050047 -0.959825 0.276099 -vn 0.050047 -0.959825 0.276099 -vn 0.050047 -0.959825 0.276099 -vn 0.000000 -0.899254 0.437427 -vn 0.000000 -0.899254 0.437427 -vn 0.000000 -0.899254 0.437427 -vn 0.000000 -0.899254 0.437427 -vn 0.000000 -0.899254 0.437427 -vn 0.000000 -0.899254 0.437427 -vn -0.050047 -0.959825 0.276099 -vn -0.050047 -0.959825 0.276099 -vn -0.050047 -0.959825 0.276099 -vn -0.050047 -0.959825 0.276099 -vn -0.050047 -0.959825 0.276099 -vn -0.050047 -0.959825 0.276099 -vn 0.000283 -0.998946 -0.045895 -vn 0.000283 -0.998946 -0.045895 -vn 0.000283 -0.998946 -0.045895 -vn 0.000283 -0.998946 -0.045895 -vn 0.000283 -0.998946 -0.045895 -vn 0.000283 -0.998946 -0.045895 -vn 0.000000 -0.977358 -0.211592 -vn 0.000000 -0.977358 -0.211592 -vn 0.000000 -0.977358 -0.211592 -vn 0.000000 -0.977358 -0.211592 -vn 0.000000 -0.977358 -0.211592 -vn 0.000000 -0.977358 -0.211592 -vn 0.278049 -0.959826 0.037720 -vn 0.278049 -0.959826 0.037720 -vn 0.278049 -0.959826 0.037720 -vn 0.278049 -0.959826 0.037720 -vn 0.278049 -0.959826 0.037720 -vn 0.278049 -0.959826 0.037720 -vn 0.416018 -0.899254 0.135172 -vn 0.416018 -0.899254 0.135172 -vn 0.416018 -0.899254 0.135172 -vn 0.416018 -0.899254 0.135172 -vn 0.416018 -0.899254 0.135172 -vn 0.416018 -0.899254 0.135172 -vn 0.247119 -0.959826 0.132917 -vn 0.247119 -0.959826 0.132917 -vn 0.247119 -0.959826 0.132917 -vn 0.247119 -0.959826 0.132917 -vn 0.247119 -0.959826 0.132917 -vn 0.247119 -0.959826 0.132917 -vn -0.201233 -0.977359 -0.065384 -vn -0.201233 -0.977359 -0.065384 -vn -0.201233 -0.977359 -0.065384 -vn -0.201233 -0.977359 -0.065384 -vn -0.201233 -0.977359 -0.065384 -vn -0.201233 -0.977359 -0.065384 -vn 0.121798 -0.959825 -0.252786 -vn 0.121798 -0.959825 -0.252786 -vn 0.121798 -0.959825 -0.252786 -vn 0.121798 -0.959825 -0.252786 -vn 0.121798 -0.959825 -0.252786 -vn 0.121798 -0.959825 -0.252786 -vn 0.257114 -0.899253 -0.353886 -vn 0.257114 -0.899253 -0.353886 -vn 0.257114 -0.899253 -0.353886 -vn 0.257114 -0.899253 -0.353886 -vn 0.257114 -0.899253 -0.353886 -vn 0.257114 -0.899253 -0.353886 -vn 0.202778 -0.959825 -0.193953 -vn 0.202778 -0.959825 -0.193953 -vn 0.202778 -0.959825 -0.193953 -vn 0.202778 -0.959825 -0.193953 -vn 0.202778 -0.959825 -0.193953 -vn 0.202778 -0.959825 -0.193953 -vn -0.124369 -0.977359 0.171178 -vn -0.124369 -0.977359 0.171178 -vn -0.124369 -0.977359 0.171178 -vn -0.124369 -0.977359 0.171178 -vn -0.124369 -0.977359 0.171178 -vn -0.124369 -0.977359 0.171178 -vn -0.202778 -0.959825 -0.193951 -vn -0.202778 -0.959825 -0.193951 -vn -0.202778 -0.959825 -0.193951 -vn -0.202778 -0.959825 -0.193951 -vn -0.202778 -0.959825 -0.193951 -vn -0.202778 -0.959825 -0.193951 -vn -0.274153 -0.806548 -0.523756 -vn -0.274153 -0.806548 -0.523756 -vn -0.274153 -0.806548 -0.523756 -vn -0.274153 -0.806548 -0.523756 -vn -0.274153 -0.806548 -0.523756 -vn -0.274153 -0.806548 -0.523756 -vn -0.257114 -0.899253 -0.353886 -vn -0.257114 -0.899253 -0.353886 -vn -0.257114 -0.899253 -0.353886 -vn -0.257114 -0.899253 -0.353886 -vn -0.257114 -0.899253 -0.353886 -vn -0.257114 -0.899253 -0.353886 -vn -0.121798 -0.959825 -0.252786 -vn -0.121798 -0.959825 -0.252786 -vn -0.121798 -0.959825 -0.252786 -vn -0.121798 -0.959825 -0.252786 -vn -0.121798 -0.959825 -0.252786 -vn -0.121798 -0.959825 -0.252786 -vn 0.124369 -0.977359 0.171179 -vn 0.124369 -0.977359 0.171179 -vn 0.124369 -0.977359 0.171179 -vn 0.124369 -0.977359 0.171179 -vn 0.124369 -0.977359 0.171179 -vn 0.124369 -0.977359 0.171179 -vn -0.416021 -0.899253 0.135172 -vn -0.416021 -0.899253 0.135172 -vn -0.416021 -0.899253 0.135172 -vn -0.416021 -0.899253 0.135172 -vn -0.416021 -0.899253 0.135172 -vn -0.416021 -0.899253 0.135172 -vn -0.278051 -0.959825 0.037721 -vn -0.278051 -0.959825 0.037721 -vn -0.278051 -0.959825 0.037721 -vn -0.278051 -0.959825 0.037721 -vn -0.278051 -0.959825 0.037721 -vn -0.278051 -0.959825 0.037721 -vn 0.043736 -0.998946 -0.013913 -vn 0.043736 -0.998946 -0.013913 -vn 0.043736 -0.998946 -0.013913 -vn 0.043736 -0.998946 -0.013913 -vn 0.043736 -0.998946 -0.013913 -vn 0.043736 -0.998946 -0.013913 -vn 0.201233 -0.977359 -0.065384 -vn 0.201233 -0.977359 -0.065384 -vn 0.201233 -0.977359 -0.065384 -vn 0.201233 -0.977359 -0.065384 -vn 0.201233 -0.977359 -0.065384 -vn 0.201233 -0.977359 -0.065384 -vn 0.043561 -0.998946 -0.014451 -vn 0.043561 -0.998946 -0.014451 -vn 0.043561 -0.998946 -0.014451 -vn 0.043561 -0.998946 -0.014451 -vn 0.043561 -0.998946 -0.014451 -vn 0.043561 -0.998946 -0.014451 -vn -0.367093 -0.583664 0.724278 -vn -0.367093 -0.583664 0.724278 -vn -0.367093 -0.583664 0.724278 -vn -0.367093 -0.583664 0.724278 -vn -0.367093 -0.583664 0.724278 -vn -0.367093 -0.583664 0.724278 -vn -0.521665 -0.460792 0.718009 -vn -0.521665 -0.460792 0.718009 -vn -0.521665 -0.460792 0.718009 -vn -0.521665 -0.460792 0.718009 -vn -0.521665 -0.460792 0.718009 -vn -0.521665 -0.460792 0.718009 -vn -0.575389 -0.583663 0.572943 -vn -0.575389 -0.583663 0.572943 -vn -0.575389 -0.583663 0.572943 -vn -0.575389 -0.583663 0.572943 -vn -0.575389 -0.583663 0.572943 -vn -0.575389 -0.583663 0.572943 -vn -0.280906 -0.878411 0.386634 -vn -0.280906 -0.878411 0.386634 -vn -0.280906 -0.878411 0.386634 -vn -0.280906 -0.878411 0.386634 -vn -0.280906 -0.878411 0.386634 -vn -0.280906 -0.878411 0.386634 -vn 0.575390 -0.583663 0.572944 -vn 0.575390 -0.583663 0.572944 -vn 0.575390 -0.583663 0.572944 -vn 0.575390 -0.583663 0.572944 -vn 0.575390 -0.583663 0.572944 -vn 0.575390 -0.583663 0.572944 -vn 0.521665 -0.460792 0.718009 -vn 0.521665 -0.460792 0.718009 -vn 0.521665 -0.460792 0.718009 -vn 0.521665 -0.460792 0.718009 -vn 0.521665 -0.460792 0.718009 -vn 0.521665 -0.460792 0.718009 -vn 0.367094 -0.583664 0.724278 -vn 0.367094 -0.583664 0.724278 -vn 0.367094 -0.583664 0.724278 -vn 0.367094 -0.583664 0.724278 -vn 0.367094 -0.583664 0.724278 -vn 0.367094 -0.583664 0.724278 -vn 0.273617 -0.793447 0.543668 -vn 0.273617 -0.793447 0.543668 -vn 0.273617 -0.793447 0.543668 -vn 0.273617 -0.793447 0.543668 -vn 0.273617 -0.793447 0.543668 -vn 0.273617 -0.793447 0.543668 -vn 0.280905 -0.878411 0.386634 -vn 0.280905 -0.878411 0.386634 -vn 0.280905 -0.878411 0.386634 -vn 0.280905 -0.878411 0.386634 -vn 0.280905 -0.878411 0.386634 -vn 0.280905 -0.878411 0.386634 -vn 0.722708 -0.583663 -0.370177 -vn 0.722708 -0.583663 -0.370177 -vn 0.722708 -0.583663 -0.370177 -vn 0.722708 -0.583663 -0.370177 -vn 0.722708 -0.583663 -0.370177 -vn 0.722708 -0.583663 -0.370177 -vn 0.844071 -0.460791 -0.274254 -vn 0.844071 -0.460791 -0.274254 -vn 0.844071 -0.460791 -0.274254 -vn 0.844071 -0.460791 -0.274254 -vn 0.844071 -0.460791 -0.274254 -vn 0.844071 -0.460791 -0.274254 -vn 0.802268 -0.583662 -0.125315 -vn 0.802268 -0.583662 -0.125315 -vn 0.802268 -0.583662 -0.125315 -vn 0.802268 -0.583662 -0.125315 -vn 0.802268 -0.583662 -0.125315 -vn 0.802268 -0.583662 -0.125315 -vn 0.601616 -0.793443 -0.092229 -vn 0.601616 -0.793443 -0.092229 -vn 0.601616 -0.793443 -0.092229 -vn 0.601616 -0.793443 -0.092229 -vn 0.601616 -0.793443 -0.092229 -vn 0.601616 -0.793443 -0.092229 -vn 0.454516 -0.878411 -0.147679 -vn 0.454516 -0.878411 -0.147679 -vn 0.454516 -0.878411 -0.147679 -vn 0.454516 -0.878411 -0.147679 -vn 0.454516 -0.878411 -0.147679 -vn 0.454516 -0.878411 -0.147679 -vn 0.000000 -0.460793 -0.887508 -vn 0.000000 -0.460793 -0.887508 -vn 0.000000 -0.460793 -0.887508 -vn 0.000000 -0.460793 -0.887508 -vn 0.000000 -0.460793 -0.887508 -vn 0.000000 -0.460793 -0.887508 -vn 0.128730 -0.583667 -0.801724 -vn 0.128730 -0.583667 -0.801724 -vn 0.128730 -0.583667 -0.801724 -vn 0.128730 -0.583667 -0.801724 -vn 0.128730 -0.583667 -0.801724 -vn 0.128730 -0.583667 -0.801724 -vn 0.098193 -0.793449 -0.600664 -vn 0.098193 -0.793449 -0.600664 -vn 0.098193 -0.793449 -0.600664 -vn 0.098193 -0.793449 -0.600664 -vn 0.098193 -0.793449 -0.600664 -vn 0.098193 -0.793449 -0.600664 -vn 0.000000 -0.878412 -0.477904 -vn 0.000000 -0.878412 -0.477904 -vn 0.000000 -0.878412 -0.477904 -vn 0.000000 -0.878412 -0.477904 -vn 0.000000 -0.878412 -0.477904 -vn 0.000000 -0.878412 -0.477904 -vn -0.098193 -0.793449 -0.600664 -vn -0.098193 -0.793449 -0.600664 -vn -0.098193 -0.793449 -0.600664 -vn -0.098193 -0.793449 -0.600664 -vn -0.098193 -0.793449 -0.600664 -vn -0.098193 -0.793449 -0.600664 -vn -0.802268 -0.583663 -0.125315 -vn -0.802268 -0.583663 -0.125315 -vn -0.802268 -0.583663 -0.125315 -vn -0.802268 -0.583663 -0.125315 -vn -0.802268 -0.583663 -0.125315 -vn -0.802268 -0.583663 -0.125315 -vn -0.844071 -0.460792 -0.274254 -vn -0.844071 -0.460792 -0.274254 -vn -0.844071 -0.460792 -0.274254 -vn -0.844071 -0.460792 -0.274254 -vn -0.844071 -0.460792 -0.274254 -vn -0.844071 -0.460792 -0.274254 -vn -0.722708 -0.583663 -0.370177 -vn -0.722708 -0.583663 -0.370177 -vn -0.722708 -0.583663 -0.370177 -vn -0.722708 -0.583663 -0.370177 -vn -0.722708 -0.583663 -0.370177 -vn -0.722708 -0.583663 -0.370177 -vn -0.540926 -0.793444 -0.279007 -vn -0.540926 -0.793444 -0.279007 -vn -0.540926 -0.793444 -0.279007 -vn -0.540926 -0.793444 -0.279007 -vn -0.540926 -0.793444 -0.279007 -vn -0.540926 -0.793444 -0.279007 -vn -0.454516 -0.878411 -0.147679 -vn -0.454516 -0.878411 -0.147679 -vn -0.454516 -0.878411 -0.147679 -vn -0.454516 -0.878411 -0.147679 -vn -0.454516 -0.878411 -0.147679 -vn -0.454516 -0.878411 -0.147679 -vn 0.000000 -0.430254 0.902708 -vn 0.000000 -0.430254 0.902708 -vn 0.000000 -0.430254 0.902708 -vn 0.000000 -0.430254 0.902708 -vn 0.000000 -0.430254 0.902708 -vn 0.000000 -0.430254 0.902708 -vn 0.150684 -0.306871 0.939747 -vn 0.150684 -0.306871 0.939747 -vn 0.150684 -0.306871 0.939747 -vn 0.150684 -0.306871 0.939747 -vn 0.150684 -0.306871 0.939747 -vn 0.150684 -0.306871 0.939747 -vn 0.157561 -0.054651 0.985996 -vn 0.157561 -0.054651 0.985996 -vn 0.157561 -0.054651 0.985996 -vn 0.157561 -0.054651 0.985996 -vn 0.157561 -0.054651 0.985996 -vn 0.157561 -0.054651 0.985996 -vn 0.000000 0.074383 0.997230 -vn 0.000000 0.074383 0.997230 -vn 0.000000 0.074383 0.997230 -vn 0.000000 0.074383 0.997230 -vn 0.000000 0.074383 0.997230 -vn 0.000000 0.074383 0.997230 -vn -0.157561 -0.054651 0.985996 -vn -0.157561 -0.054651 0.985996 -vn -0.157561 -0.054651 0.985996 -vn -0.157561 -0.054651 0.985996 -vn -0.157561 -0.054651 0.985996 -vn -0.157561 -0.054651 0.985996 -vn 0.986427 -0.054649 0.154842 -vn 0.986427 -0.054649 0.154842 -vn 0.986427 -0.054649 0.154842 -vn 0.986427 -0.054649 0.154842 -vn 0.986427 -0.054649 0.154842 -vn 0.986427 -0.054649 0.154842 -vn 0.948421 0.074384 0.308163 -vn 0.948421 0.074384 0.308163 -vn 0.948421 0.074384 0.308163 -vn 0.948421 0.074384 0.308163 -vn 0.948421 0.074384 0.308163 -vn 0.948421 0.074384 0.308163 -vn 0.889050 -0.054651 0.454536 -vn 0.889050 -0.054651 0.454536 -vn 0.889050 -0.054651 0.454536 -vn 0.889050 -0.054651 0.454536 -vn 0.889050 -0.054651 0.454536 -vn 0.889050 -0.054651 0.454536 -vn 0.847188 -0.306880 0.433702 -vn 0.847188 -0.306880 0.433702 -vn 0.847188 -0.306880 0.433702 -vn 0.847188 -0.306880 0.433702 -vn 0.847188 -0.306880 0.433702 -vn 0.847188 -0.306880 0.433702 -vn 0.858528 -0.430252 0.278949 -vn 0.858528 -0.430252 0.278949 -vn 0.858528 -0.430252 0.278949 -vn 0.858528 -0.430252 0.278949 -vn 0.858528 -0.430252 0.278949 -vn 0.858528 -0.430252 0.278949 -vn 0.452094 -0.054653 -0.890295 -vn 0.452094 -0.054653 -0.890295 -vn 0.452094 -0.054653 -0.890295 -vn 0.452094 -0.054653 -0.890295 -vn 0.452094 -0.054653 -0.890295 -vn 0.452094 -0.054653 -0.890295 -vn 0.586151 0.074382 -0.806780 -vn 0.586151 0.074382 -0.806780 -vn 0.586151 0.074382 -0.806780 -vn 0.586151 0.074382 -0.806780 -vn 0.586151 0.074382 -0.806780 -vn 0.586151 0.074382 -0.806780 -vn 0.707017 -0.054645 -0.705082 -vn 0.707017 -0.054645 -0.705082 -vn 0.707017 -0.054645 -0.705082 -vn 0.707017 -0.054645 -0.705082 -vn 0.707017 -0.054645 -0.705082 -vn 0.707017 -0.054645 -0.705082 -vn 0.674273 -0.306879 -0.671701 -vn 0.674273 -0.306879 -0.671701 -vn 0.674273 -0.306879 -0.671701 -vn 0.674273 -0.306879 -0.671701 -vn 0.674273 -0.306879 -0.671701 -vn 0.674273 -0.306879 -0.671701 -vn 0.530595 -0.430259 -0.730305 -vn 0.530595 -0.430259 -0.730305 -vn 0.530595 -0.430259 -0.730305 -vn 0.530595 -0.430259 -0.730305 -vn 0.530595 -0.430259 -0.730305 -vn 0.530595 -0.430259 -0.730305 -vn -0.530595 -0.430259 -0.730305 -vn -0.530595 -0.430259 -0.730305 -vn -0.530595 -0.430259 -0.730305 -vn -0.530595 -0.430259 -0.730305 -vn -0.530595 -0.430259 -0.730305 -vn -0.530595 -0.430259 -0.730305 -vn -0.674273 -0.306879 -0.671701 -vn -0.674273 -0.306879 -0.671701 -vn -0.674273 -0.306879 -0.671701 -vn -0.674273 -0.306879 -0.671701 -vn -0.674273 -0.306879 -0.671701 -vn -0.674273 -0.306879 -0.671701 -vn -0.707017 -0.054645 -0.705082 -vn -0.707017 -0.054645 -0.705082 -vn -0.707017 -0.054645 -0.705082 -vn -0.707017 -0.054645 -0.705082 -vn -0.707017 -0.054645 -0.705082 -vn -0.707017 -0.054645 -0.705082 -vn -0.948422 0.074389 0.308160 -vn -0.948422 0.074389 0.308160 -vn -0.948422 0.074389 0.308160 -vn -0.948422 0.074389 0.308160 -vn -0.948422 0.074389 0.308160 -vn -0.948422 0.074389 0.308160 -vn -0.986426 -0.054648 0.154847 -vn -0.986426 -0.054648 0.154847 -vn -0.986426 -0.054648 0.154847 -vn -0.986426 -0.054648 0.154847 -vn -0.986426 -0.054648 0.154847 -vn -0.986426 -0.054648 0.154847 -vn -0.940317 -0.306870 0.147090 -vn -0.940317 -0.306870 0.147090 -vn -0.940317 -0.306870 0.147090 -vn -0.940317 -0.306870 0.147090 -vn -0.940317 -0.306870 0.147090 -vn -0.940317 -0.306870 0.147090 -vn -0.858528 -0.430252 0.278949 -vn -0.858528 -0.430252 0.278949 -vn -0.858528 -0.430252 0.278949 -vn -0.858528 -0.430252 0.278949 -vn -0.858528 -0.430252 0.278949 -vn -0.858528 -0.430252 0.278949 -vn -0.847190 -0.306876 0.433701 -vn -0.847190 -0.306876 0.433701 -vn -0.847190 -0.306876 0.433701 -vn -0.847190 -0.306876 0.433701 -vn -0.847190 -0.306876 0.433701 -vn -0.847190 -0.306876 0.433701 -vn -0.620992 0.482051 0.618058 -vn -0.620992 0.482051 0.618058 -vn -0.620992 0.482051 0.618058 -vn -0.620992 0.482051 0.618058 -vn -0.620992 0.482051 0.618058 -vn -0.620992 0.482051 0.618058 -vn -0.584472 0.106018 0.804458 -vn -0.584472 0.106018 0.804458 -vn -0.584472 0.106018 0.804458 -vn -0.584472 0.106018 0.804458 -vn -0.584472 0.106018 0.804458 -vn -0.584472 0.106018 0.804458 -vn -0.460302 -0.035887 0.887037 -vn -0.460302 -0.035887 0.887037 -vn -0.460302 -0.035887 0.887037 -vn -0.460302 -0.035887 0.887037 -vn -0.460302 -0.035887 0.887037 -vn -0.460302 -0.035887 0.887037 -vn -0.440113 0.235632 0.866475 -vn -0.440113 0.235632 0.866475 -vn -0.440113 0.235632 0.866475 -vn -0.440113 0.235632 0.866475 -vn -0.440113 0.235632 0.866475 -vn -0.440113 0.235632 0.866475 -vn -0.395918 0.482047 0.781587 -vn -0.395918 0.482047 0.781587 -vn -0.395918 0.482047 0.781587 -vn -0.395918 0.482047 0.781587 -vn -0.395918 0.482047 0.781587 -vn -0.395918 0.482047 0.781587 -vn 0.069037 0.909202 0.410591 -vn 0.069037 0.909202 0.410591 -vn 0.069037 0.909202 0.410591 -vn 0.069037 0.909202 0.410591 -vn 0.069037 0.909202 0.410591 -vn 0.069037 0.909202 0.410591 -vn 0.000000 0.964957 0.262408 -vn 0.000000 0.964957 0.262408 -vn 0.000000 0.964957 0.262408 -vn 0.000000 0.964957 0.262408 -vn 0.000000 0.964957 0.262408 -vn 0.000000 0.964957 0.262408 -vn -0.108008 0.739155 0.664819 -vn -0.108008 0.739155 0.664819 -vn -0.108008 0.739155 0.664819 -vn -0.108008 0.739155 0.664819 -vn -0.108008 0.739155 0.664819 -vn -0.108008 0.739155 0.664819 -vn -0.275050 0.358333 0.892157 -vn -0.275050 0.358333 0.892157 -vn -0.275050 0.358333 0.892157 -vn -0.275050 0.358333 0.892157 -vn -0.275050 0.358333 0.892157 -vn -0.275050 0.358333 0.892157 -vn 0.000000 0.627729 0.778432 -vn 0.000000 0.627729 0.778432 -vn 0.000000 0.627729 0.778432 -vn 0.000000 0.627729 0.778432 -vn 0.000000 0.627729 0.778432 -vn 0.000000 0.627729 0.778432 -vn 0.128113 0.497309 0.858062 -vn 0.128113 0.497309 0.858062 -vn 0.128113 0.497309 0.858062 -vn 0.128113 0.497309 0.858062 -vn 0.128113 0.497309 0.858062 -vn 0.128113 0.497309 0.858062 -vn 0.395919 0.482047 0.781587 -vn 0.395919 0.482047 0.781587 -vn 0.395919 0.482047 0.781587 -vn 0.395919 0.482047 0.781587 -vn 0.395919 0.482047 0.781587 -vn 0.395919 0.482047 0.781587 -vn 0.440113 0.235632 0.866475 -vn 0.440113 0.235632 0.866475 -vn 0.440113 0.235632 0.866475 -vn 0.440113 0.235632 0.866475 -vn 0.440113 0.235632 0.866475 -vn 0.440113 0.235632 0.866475 -vn 0.584472 0.106018 0.804458 -vn 0.584472 0.106018 0.804458 -vn 0.584472 0.106018 0.804458 -vn 0.584472 0.106018 0.804458 -vn 0.584472 0.106018 0.804458 -vn 0.584472 0.106018 0.804458 -vn 0.688065 0.235625 0.686329 -vn 0.688065 0.235625 0.686329 -vn 0.688065 0.235625 0.686329 -vn 0.688065 0.235625 0.686329 -vn 0.688065 0.235625 0.686329 -vn 0.688065 0.235625 0.686329 -vn 0.620993 0.482051 0.618058 -vn 0.620993 0.482051 0.618058 -vn 0.620993 0.482051 0.618058 -vn 0.620993 0.482051 0.618058 -vn 0.620993 0.482051 0.618058 -vn 0.620993 0.482051 0.618058 -vn 0.070071 0.996936 0.034769 -vn 0.070071 0.996936 0.034769 -vn 0.070071 0.996936 0.034769 -vn 0.070071 0.996936 0.034769 -vn 0.070071 0.996936 0.034769 -vn 0.070071 0.996936 0.034769 -vn 0.249563 0.964958 0.081088 -vn 0.249563 0.964958 0.081088 -vn 0.249563 0.964958 0.081088 -vn 0.249563 0.964958 0.081088 -vn 0.249563 0.964958 0.081088 -vn 0.249563 0.964958 0.081088 -vn 0.763495 0.358330 0.537285 -vn 0.763495 0.358330 0.537285 -vn 0.763495 0.358330 0.537285 -vn 0.763495 0.358330 0.537285 -vn 0.763495 0.358330 0.537285 -vn 0.763495 0.358330 0.537285 -vn 0.746264 0.627103 0.223230 -vn 0.746264 0.627103 0.223230 -vn 0.746264 0.627103 0.223230 -vn 0.746264 0.627103 0.223230 -vn 0.746264 0.627103 0.223230 -vn 0.746264 0.627103 0.223230 -vn 0.665652 0.739160 0.102717 -vn 0.665652 0.739160 0.102717 -vn 0.665652 0.739160 0.102717 -vn 0.665652 0.739160 0.102717 -vn 0.665652 0.739160 0.102717 -vn 0.665652 0.739160 0.102717 -vn 0.865680 0.482048 -0.135014 -vn 0.865680 0.482048 -0.135014 -vn 0.865680 0.482048 -0.135014 -vn 0.865680 0.482048 -0.135014 -vn 0.865680 0.482048 -0.135014 -vn 0.865680 0.482048 -0.135014 -vn 0.855654 0.497309 0.143317 -vn 0.855654 0.497309 0.143317 -vn 0.855654 0.497309 0.143317 -vn 0.855654 0.497309 0.143317 -vn 0.855654 0.497309 0.143317 -vn 0.855654 0.497309 0.143317 -vn 0.960069 0.235630 -0.150818 -vn 0.960069 0.235630 -0.150818 -vn 0.960069 0.235630 -0.150818 -vn 0.960069 0.235630 -0.150818 -vn 0.960069 0.235630 -0.150818 -vn 0.960069 0.235630 -0.150818 -vn 0.945695 0.106020 -0.307280 -vn 0.945695 0.106020 -0.307280 -vn 0.945695 0.106020 -0.307280 -vn 0.945695 0.106020 -0.307280 -vn 0.945695 0.106020 -0.307280 -vn 0.945695 0.106020 -0.307280 -vn 0.865360 0.235631 -0.442301 -vn 0.865360 0.235631 -0.442301 -vn 0.865360 0.235631 -0.442301 -vn 0.865360 0.235631 -0.442301 -vn 0.865360 0.235631 -0.442301 -vn 0.865360 0.235631 -0.442301 -vn 0.779706 0.482051 -0.399606 -vn 0.779706 0.482051 -0.399606 -vn 0.779706 0.482051 -0.399606 -vn 0.779706 0.482051 -0.399606 -vn 0.779706 0.482051 -0.399606 -vn 0.779706 0.482051 -0.399606 -vn 0.054720 0.996936 -0.055897 -vn 0.054720 0.996936 -0.055897 -vn 0.054720 0.996936 -0.055897 -vn 0.054720 0.996936 -0.055897 -vn 0.054720 0.996936 -0.055897 -vn 0.054720 0.996936 -0.055897 -vn 0.154240 0.964958 -0.212290 -vn 0.154240 0.964958 -0.212290 -vn 0.154240 0.964958 -0.212290 -vn 0.154240 0.964958 -0.212290 -vn 0.154240 0.964958 -0.212290 -vn 0.154240 0.964958 -0.212290 -vn 0.311458 0.902250 -0.298226 -vn 0.311458 0.902250 -0.298226 -vn 0.311458 0.902250 -0.298226 -vn 0.311458 0.902250 -0.298226 -vn 0.311458 0.902250 -0.298226 -vn 0.311458 0.902250 -0.298226 -vn 0.746920 0.358331 -0.560098 -vn 0.746920 0.358331 -0.560098 -vn 0.746920 0.358331 -0.560098 -vn 0.746920 0.358331 -0.560098 -vn 0.746920 0.358331 -0.560098 -vn 0.746920 0.358331 -0.560098 -vn 0.443073 0.627101 -0.640648 -vn 0.443073 0.627101 -0.640648 -vn 0.443073 0.627101 -0.640648 -vn 0.443073 0.627101 -0.640648 -vn 0.443073 0.627101 -0.640648 -vn 0.443073 0.627101 -0.640648 -vn 0.303392 0.739159 -0.601330 -vn 0.303392 0.739159 -0.601330 -vn 0.303392 0.739159 -0.601330 -vn 0.303392 0.739159 -0.601330 -vn 0.303392 0.739159 -0.601330 -vn 0.303392 0.739159 -0.601330 -vn 0.139107 0.482052 -0.865029 -vn 0.139107 0.482052 -0.865029 -vn 0.139107 0.482052 -0.865029 -vn 0.139107 0.482052 -0.865029 -vn 0.139107 0.482052 -0.865029 -vn 0.139107 0.482052 -0.865029 -vn 0.400718 0.497309 -0.769486 -vn 0.400718 0.497309 -0.769486 -vn 0.400718 0.497309 -0.769486 -vn 0.400718 0.497309 -0.769486 -vn 0.400718 0.497309 -0.769486 -vn 0.400718 0.497309 -0.769486 -vn 0.153241 0.235629 -0.959685 -vn 0.153241 0.235629 -0.959685 -vn 0.153241 0.235629 -0.959685 -vn 0.153241 0.235629 -0.959685 -vn 0.153241 0.235629 -0.959685 -vn 0.153241 0.235629 -0.959685 -vn 0.000000 0.106023 -0.994364 -vn 0.000000 0.106023 -0.994364 -vn 0.000000 0.106023 -0.994364 -vn 0.000000 0.106023 -0.994364 -vn 0.000000 0.106023 -0.994364 -vn 0.000000 0.106023 -0.994364 -vn -0.153241 0.235629 -0.959685 -vn -0.153241 0.235629 -0.959685 -vn -0.153241 0.235629 -0.959685 -vn -0.153241 0.235629 -0.959685 -vn -0.153241 0.235629 -0.959685 -vn -0.153241 0.235629 -0.959685 -vn -0.301874 0.358335 -0.883441 -vn -0.301874 0.358335 -0.883441 -vn -0.301874 0.358335 -0.883441 -vn -0.301874 0.358335 -0.883441 -vn -0.301874 0.358335 -0.883441 -vn -0.301874 0.358335 -0.883441 -vn -0.139107 0.482052 -0.865029 -vn -0.139107 0.482052 -0.865029 -vn -0.139107 0.482052 -0.865029 -vn -0.139107 0.482052 -0.865029 -vn -0.139107 0.482052 -0.865029 -vn -0.139107 0.482052 -0.865029 -vn -0.478146 0.739160 -0.474361 -vn -0.478146 0.739160 -0.474361 -vn -0.478146 0.739160 -0.474361 -vn -0.478146 0.739160 -0.474361 -vn -0.478146 0.739160 -0.474361 -vn -0.478146 0.739160 -0.474361 -vn -0.297192 0.909202 -0.291596 -vn -0.297192 0.909202 -0.291596 -vn -0.297192 0.909202 -0.291596 -vn -0.297192 0.909202 -0.291596 -vn -0.297192 0.909202 -0.291596 -vn -0.297192 0.909202 -0.291596 -vn -0.154240 0.964957 -0.212291 -vn -0.154240 0.964957 -0.212291 -vn -0.154240 0.964957 -0.212291 -vn -0.154240 0.964957 -0.212291 -vn -0.154240 0.964957 -0.212291 -vn -0.154240 0.964957 -0.212291 -vn -0.036251 0.996936 -0.069316 -vn -0.036251 0.996936 -0.069316 -vn -0.036251 0.996936 -0.069316 -vn -0.036251 0.996936 -0.069316 -vn -0.036251 0.996936 -0.069316 -vn -0.036251 0.996936 -0.069316 -vn -0.185486 0.909202 -0.372755 -vn -0.185486 0.909202 -0.372755 -vn -0.185486 0.909202 -0.372755 -vn -0.185486 0.909202 -0.372755 -vn -0.185486 0.909202 -0.372755 -vn -0.185486 0.909202 -0.372755 -vn -0.303391 0.739159 -0.601330 -vn -0.303391 0.739159 -0.601330 -vn -0.303391 0.739159 -0.601330 -vn -0.303391 0.739159 -0.601330 -vn -0.303391 0.739159 -0.601330 -vn -0.303391 0.739159 -0.601330 -vn -0.945695 0.106020 -0.307280 -vn -0.945695 0.106020 -0.307280 -vn -0.945695 0.106020 -0.307280 -vn -0.945695 0.106020 -0.307280 -vn -0.945695 0.106020 -0.307280 -vn -0.945695 0.106020 -0.307280 -vn -0.960069 0.235630 -0.150818 -vn -0.960069 0.235630 -0.150818 -vn -0.960069 0.235630 -0.150818 -vn -0.960069 0.235630 -0.150818 -vn -0.960069 0.235630 -0.150818 -vn -0.960069 0.235630 -0.150818 -vn -0.933488 0.358331 0.014100 -vn -0.933488 0.358331 0.014100 -vn -0.933488 0.358331 0.014100 -vn -0.933488 0.358331 0.014100 -vn -0.933488 0.358331 0.014100 -vn -0.933488 0.358331 0.014100 -vn -0.865680 0.482048 -0.135014 -vn -0.865680 0.482048 -0.135014 -vn -0.865680 0.482048 -0.135014 -vn -0.865680 0.482048 -0.135014 -vn -0.865680 0.482048 -0.135014 -vn -0.865680 0.482048 -0.135014 -vn -0.683867 0.720700 -0.113655 -vn -0.683867 0.720700 -0.113655 -vn -0.683867 0.720700 -0.113655 -vn -0.683867 0.720700 -0.113655 -vn -0.683867 0.720700 -0.113655 -vn -0.683867 0.720700 -0.113655 -vn -0.761744 0.598738 -0.247504 -vn -0.761744 0.598738 -0.247504 -vn -0.761744 0.598738 -0.247504 -vn -0.761744 0.598738 -0.247504 -vn -0.761744 0.598738 -0.247504 -vn -0.761744 0.598738 -0.247504 -vn -0.746920 0.358331 -0.560098 -vn -0.746920 0.358331 -0.560098 -vn -0.746920 0.358331 -0.560098 -vn -0.746920 0.358331 -0.560098 -vn -0.746920 0.358331 -0.560098 -vn -0.746920 0.358331 -0.560098 -vn -0.779706 0.482051 -0.399606 -vn -0.779706 0.482051 -0.399606 -vn -0.779706 0.482051 -0.399606 -vn -0.779706 0.482051 -0.399606 -vn -0.779706 0.482051 -0.399606 -vn -0.779706 0.482051 -0.399606 -vn 0.207325 0.689664 -0.693816 -vn 0.207325 0.689664 -0.693816 -vn 0.207325 0.689664 -0.693816 -vn 0.207325 0.689664 -0.693816 -vn 0.207325 0.689664 -0.693816 -vn 0.207325 0.689664 -0.693816 -vn 0.268419 0.813187 -0.516409 -vn 0.268419 0.813187 -0.516409 -vn 0.268419 0.813187 -0.516409 -vn 0.268419 0.813187 -0.516409 -vn 0.268419 0.813187 -0.516409 -vn 0.268419 0.813187 -0.516409 -vn 0.286483 0.947042 -0.145050 -vn 0.286483 0.947042 -0.145050 -vn 0.286483 0.947042 -0.145050 -vn 0.286483 0.947042 -0.145050 -vn 0.286483 0.947042 -0.145050 -vn 0.286483 0.947042 -0.145050 -vn 0.090076 0.992230 -0.085823 -vn 0.090076 0.992230 -0.085823 -vn 0.090076 0.992230 -0.085823 -vn 0.090076 0.992230 -0.085823 -vn 0.090076 0.992230 -0.085823 -vn 0.090076 0.992230 -0.085823 -vn -0.440883 0.831197 0.338723 -vn -0.440883 0.831197 0.338723 -vn -0.440883 0.831197 0.338723 -vn -0.440883 0.831197 0.338723 -vn -0.440883 0.831197 0.338723 -vn -0.440883 0.831197 0.338723 -vn -0.273771 0.919790 0.281133 -vn -0.273771 0.919790 0.281133 -vn -0.273771 0.919790 0.281133 -vn -0.273771 0.919790 0.281133 -vn -0.273771 0.919790 0.281133 -vn -0.273771 0.919790 0.281133 -vn -0.385535 0.547002 -0.743069 -vn -0.385535 0.547002 -0.743069 -vn -0.385535 0.547002 -0.743069 -vn -0.385535 0.547002 -0.743069 -vn -0.385535 0.547002 -0.743069 -vn -0.385535 0.547002 -0.743069 -vn -0.268419 0.813187 -0.516409 -vn -0.268419 0.813187 -0.516409 -vn -0.268419 0.813187 -0.516409 -vn -0.268419 0.813187 -0.516409 -vn -0.268419 0.813187 -0.516409 -vn -0.268419 0.813187 -0.516409 -vn -0.049423 0.947042 -0.317284 -vn -0.049423 0.947042 -0.317284 -vn -0.049423 0.947042 -0.317284 -vn -0.049423 0.947042 -0.317284 -vn -0.049423 0.947042 -0.317284 -vn -0.049423 0.947042 -0.317284 -vn -0.053788 0.992230 -0.112188 -vn -0.053788 0.992230 -0.112188 -vn -0.053788 0.992230 -0.112188 -vn -0.053788 0.992230 -0.112188 -vn -0.053788 0.992230 -0.112188 -vn -0.053788 0.992230 -0.112188 -vn 0.185907 0.831194 0.523981 -vn 0.185907 0.831194 0.523981 -vn 0.185907 0.831194 0.523981 -vn 0.185907 0.831194 0.523981 -vn 0.185907 0.831194 0.523981 -vn 0.185907 0.831194 0.523981 -vn 0.182771 0.919790 0.347249 -vn 0.182771 0.919790 0.347249 -vn 0.182771 0.919790 0.347249 -vn 0.182771 0.919790 0.347249 -vn 0.182771 0.919790 0.347249 -vn 0.182771 0.919790 0.347249 -vn 0.486457 0.720698 0.493917 -vn 0.486457 0.720698 0.493917 -vn 0.486457 0.720698 0.493917 -vn 0.486457 0.720698 0.493917 -vn 0.486457 0.720698 0.493917 -vn 0.486457 0.720698 0.493917 -vn 0.273771 0.919790 0.281133 -vn 0.273771 0.919790 0.281133 -vn 0.273771 0.919790 0.281133 -vn 0.273771 0.919790 0.281133 -vn 0.273771 0.919790 0.281133 -vn 0.273771 0.919790 0.281133 -vn -0.825830 0.547015 0.137041 -vn -0.825830 0.547015 0.137041 -vn -0.825830 0.547015 0.137041 -vn -0.825830 0.547015 0.137041 -vn -0.825830 0.547015 0.137041 -vn -0.825830 0.547015 0.137041 -vn -0.574076 0.813192 0.095683 -vn -0.574076 0.813192 0.095683 -vn -0.574076 0.813192 0.095683 -vn -0.574076 0.813192 0.095683 -vn -0.574076 0.813192 0.095683 -vn -0.574076 0.813192 0.095683 -vn -0.317030 0.947041 -0.051041 -vn -0.317030 0.947041 -0.051041 -vn -0.317030 0.947041 -0.051041 -vn -0.317030 0.947041 -0.051041 -vn -0.317030 0.947041 -0.051041 -vn -0.317030 0.947041 -0.051041 -vn -0.123318 0.992230 0.016487 -vn -0.123318 0.992230 0.016487 -vn -0.123318 0.992230 0.016487 -vn -0.123318 0.992230 0.016487 -vn -0.123318 0.992230 0.016487 -vn -0.123318 0.992230 0.016487 -vn 0.555781 0.831196 -0.014888 -vn 0.555781 0.831196 -0.014888 -vn 0.555781 0.831196 -0.014888 -vn 0.555781 0.831196 -0.014888 -vn 0.555781 0.831196 -0.014888 -vn 0.555781 0.831196 -0.014888 -vn 0.386731 0.919790 -0.066520 -vn 0.386731 0.919790 -0.066520 -vn 0.386731 0.919790 -0.066520 -vn 0.386731 0.919790 -0.066520 -vn 0.386731 0.919790 -0.066520 -vn 0.386731 0.919790 -0.066520 -vn 0.620068 0.720697 -0.310020 -vn 0.620068 0.720697 -0.310020 -vn 0.620068 0.720697 -0.310020 -vn 0.620068 0.720697 -0.310020 -vn 0.620068 0.720697 -0.310020 -vn 0.620068 0.720697 -0.310020 -vn 0.351973 0.919790 -0.173499 -vn 0.351973 0.919790 -0.173499 -vn 0.351973 0.919790 -0.173499 -vn 0.351973 0.919790 -0.173499 -vn 0.351973 0.919790 -0.173499 -vn 0.351973 0.919790 -0.173499 -vn -0.124854 0.546993 0.827774 -vn -0.124854 0.546993 0.827774 -vn -0.124854 0.546993 0.827774 -vn -0.124854 0.546993 0.827774 -vn -0.124854 0.546993 0.827774 -vn -0.124854 0.546993 0.827774 -vn -0.086392 0.813183 0.575561 -vn -0.086392 0.813183 0.575561 -vn -0.086392 0.813183 0.575561 -vn -0.086392 0.813183 0.575561 -vn -0.086392 0.813183 0.575561 -vn -0.086392 0.813183 0.575561 -vn -0.146509 0.947042 0.285738 -vn -0.146509 0.947042 0.285738 -vn -0.146509 0.947042 0.285738 -vn -0.146509 0.947042 0.285738 -vn -0.146509 0.947042 0.285738 -vn -0.146509 0.947042 0.285738 -vn -0.022427 0.992230 0.122377 -vn -0.022427 0.992230 0.122377 -vn -0.022427 0.992230 0.122377 -vn -0.022427 0.992230 0.122377 -vn -0.022427 0.992230 0.122377 -vn -0.022427 0.992230 0.122377 -vn 0.157586 0.831195 -0.533181 -vn 0.157586 0.831195 -0.533181 -vn 0.157586 0.831195 -0.533181 -vn 0.157586 0.831195 -0.533181 -vn 0.157586 0.831195 -0.533181 -vn 0.157586 0.831195 -0.533181 -vn 0.056241 0.919791 -0.388358 -vn 0.056241 0.919791 -0.388358 -vn 0.056241 0.919791 -0.388358 -vn 0.056241 0.919791 -0.388358 -vn 0.056241 0.919791 -0.388358 -vn 0.056241 0.919791 -0.388358 -vn -0.103237 0.720696 -0.685522 -vn -0.103237 0.720696 -0.685522 -vn -0.103237 0.720696 -0.685522 -vn -0.103237 0.720696 -0.685522 -vn -0.103237 0.720696 -0.685522 -vn -0.103237 0.720696 -0.685522 -vn -0.056241 0.919791 -0.388358 -vn -0.056241 0.919791 -0.388358 -vn -0.056241 0.919791 -0.388358 -vn -0.056241 0.919791 -0.388358 -vn -0.056241 0.919791 -0.388358 -vn -0.056241 0.919791 -0.388358 -vn 0.723897 0.689694 -0.017215 -vn 0.723897 0.689694 -0.017215 -vn 0.723897 0.689694 -0.017215 -vn 0.723897 0.689694 -0.017215 -vn 0.723897 0.689694 -0.017215 -vn 0.723897 0.689694 -0.017215 -vn 0.574077 0.813192 0.095684 -vn 0.574077 0.813192 0.095684 -vn 0.574077 0.813192 0.095684 -vn 0.574077 0.813192 0.095684 -vn 0.574077 0.813192 0.095684 -vn 0.574077 0.813192 0.095684 -vn 0.748670 0.547015 0.374524 -vn 0.748670 0.547015 0.374524 -vn 0.748670 0.547015 0.374524 -vn 0.748670 0.547015 0.374524 -vn 0.748670 0.547015 0.374524 -vn 0.748670 0.547015 0.374524 -vn 0.520690 0.813188 0.260013 -vn 0.520690 0.813188 0.260013 -vn 0.520690 0.813188 0.260013 -vn 0.520690 0.813188 0.260013 -vn 0.520690 0.813188 0.260013 -vn 0.520690 0.813188 0.260013 -vn 0.226479 0.947042 0.227638 -vn 0.226479 0.947042 0.227638 -vn 0.226479 0.947042 0.227638 -vn 0.226479 0.947042 0.227638 -vn 0.226479 0.947042 0.227638 -vn 0.226479 0.947042 0.227638 -vn 0.109457 0.992230 0.059146 -vn 0.109457 0.992230 0.059146 -vn 0.109457 0.992230 0.059146 -vn 0.109457 0.992230 0.059146 -vn 0.109457 0.992230 0.059146 -vn 0.109457 0.992230 0.059146 -vn -0.458388 0.831195 -0.314635 -vn -0.458388 0.831195 -0.314635 -vn -0.458388 0.831195 -0.314635 -vn -0.458388 0.831195 -0.314635 -vn -0.458388 0.831195 -0.314635 -vn -0.458388 0.831195 -0.314635 -vn -0.351973 0.919790 -0.173499 -vn -0.351973 0.919790 -0.173499 -vn -0.351973 0.919790 -0.173499 -vn -0.351973 0.919790 -0.173499 -vn -0.351973 0.919790 -0.173499 -vn -0.351973 0.919790 -0.173499 -vn -0.320359 0.179455 -0.930143 -vn -0.320359 0.179455 -0.930143 -vn -0.320359 0.179455 -0.930143 -vn -0.320359 0.179455 -0.930143 -vn -0.320359 0.179455 -0.930143 -vn -0.320359 0.179455 -0.930143 -vn -0.139219 0.341315 -0.929582 -vn -0.139219 0.341315 -0.929582 -vn -0.139219 0.341315 -0.929582 -vn -0.139219 0.341315 -0.929582 -vn -0.139219 0.341315 -0.929582 -vn -0.139219 0.341315 -0.929582 -vn 0.148241 0.014861 -0.988840 -vn 0.148241 0.014861 -0.988840 -vn 0.148241 0.014861 -0.988840 -vn 0.148241 0.014861 -0.988840 -vn 0.148241 0.014861 -0.988840 -vn 0.148241 0.014861 -0.988840 -vn 0.139219 0.341315 -0.929582 -vn 0.139219 0.341315 -0.929582 -vn 0.139219 0.341315 -0.929582 -vn 0.139219 0.341315 -0.929582 -vn 0.139219 0.341315 -0.929582 -vn 0.139219 0.341315 -0.929582 -vn -0.983603 0.179522 0.017216 -vn -0.983603 0.179522 0.017216 -vn -0.983603 0.179522 0.017216 -vn -0.983603 0.179522 0.017216 -vn -0.983603 0.179522 0.017216 -vn -0.983603 0.179522 0.017216 -vn -0.927130 0.341276 -0.154793 -vn -0.927130 0.341276 -0.154793 -vn -0.927130 0.341276 -0.154793 -vn -0.927130 0.341276 -0.154793 -vn -0.927130 0.341276 -0.154793 -vn -0.927130 0.341276 -0.154793 -vn -0.287573 0.179479 0.940792 -vn -0.287573 0.179479 0.940792 -vn -0.287573 0.179479 0.940792 -vn -0.287573 0.179479 0.940792 -vn -0.287573 0.179479 0.940792 -vn -0.287573 0.179479 0.940792 -vn -0.433754 0.341231 0.833918 -vn -0.433754 0.341231 0.833918 -vn -0.433754 0.341231 0.833918 -vn -0.433754 0.341231 0.833918 -vn -0.433754 0.341231 0.833918 -vn -0.433754 0.341231 0.833918 -vn 0.805884 0.179483 0.564214 -vn 0.805884 0.179483 0.564214 -vn 0.805884 0.179483 0.564214 -vn 0.805884 0.179483 0.564214 -vn 0.805884 0.179483 0.564214 -vn 0.805884 0.179483 0.564214 -vn 0.659066 0.341235 0.670216 -vn 0.659066 0.341235 0.670216 -vn 0.659066 0.341235 0.670216 -vn 0.659066 0.341235 0.670216 -vn 0.659066 0.341235 0.670216 -vn 0.659066 0.341235 0.670216 -vn 0.986254 0.014901 -0.164561 -vn 0.986254 0.014901 -0.164561 -vn 0.986254 0.014901 -0.164561 -vn 0.986254 0.014901 -0.164561 -vn 0.986254 0.014901 -0.164561 -vn 0.986254 0.014901 -0.164561 -vn 0.927130 0.341275 -0.154793 -vn 0.927130 0.341275 -0.154793 -vn 0.927130 0.341275 -0.154793 -vn 0.927130 0.341275 -0.154793 -vn 0.927130 0.341275 -0.154793 -vn 0.927130 0.341275 -0.154793 -vn 0.272212 -0.356955 -0.893579 -vn 0.272212 -0.356955 -0.893579 -vn 0.272212 -0.356955 -0.893579 -vn 0.272212 -0.356955 -0.893579 -vn 0.272212 -0.356955 -0.893579 -vn 0.272212 -0.356955 -0.893579 -vn 0.452330 -0.194977 -0.870277 -vn 0.452330 -0.194977 -0.870277 -vn 0.452330 -0.194977 -0.870277 -vn 0.452330 -0.194977 -0.870277 -vn 0.452330 -0.194977 -0.870277 -vn 0.452330 -0.194977 -0.870277 -vn -0.396258 -0.512349 -0.761892 -vn -0.396258 -0.512349 -0.761892 -vn -0.396258 -0.512349 -0.761892 -vn -0.396258 -0.512349 -0.761892 -vn -0.396258 -0.512349 -0.761892 -vn -0.396258 -0.512349 -0.761892 -vn -0.452330 -0.194978 -0.870277 -vn -0.452330 -0.194978 -0.870277 -vn -0.452330 -0.194978 -0.870277 -vn -0.452330 -0.194978 -0.870277 -vn -0.452330 -0.194978 -0.870277 -vn -0.452330 -0.194978 -0.870277 -vn -0.847032 -0.512377 0.141446 -vn -0.847032 -0.512377 0.141446 -vn -0.847032 -0.512377 0.141446 -vn -0.847032 -0.512377 0.141446 -vn -0.847032 -0.512377 0.141446 -vn -0.847032 -0.512377 0.141446 -vn -0.967454 -0.195001 0.161266 -vn -0.967454 -0.195001 0.161266 -vn -0.967454 -0.195001 0.161266 -vn -0.967454 -0.195001 0.161266 -vn -0.967454 -0.195001 0.161266 -vn -0.967454 -0.195001 0.161266 -vn -0.127282 -0.512338 0.849299 -vn -0.127282 -0.512338 0.849299 -vn -0.127282 -0.512338 0.849299 -vn -0.127282 -0.512338 0.849299 -vn -0.127282 -0.512338 0.849299 -vn -0.127282 -0.512338 0.849299 -vn -0.145621 -0.195014 0.969930 -vn -0.145621 -0.195014 0.969930 -vn -0.145621 -0.195014 0.969930 -vn -0.145621 -0.195014 0.969930 -vn -0.145621 -0.195014 0.969930 -vn -0.145621 -0.195014 0.969930 -vn 0.933946 -0.356996 -0.017274 -vn 0.933946 -0.356996 -0.017274 -vn 0.933946 -0.356996 -0.017274 -vn 0.933946 -0.356996 -0.017274 -vn 0.933946 -0.356996 -0.017274 -vn 0.933946 -0.356996 -0.017274 -vn 0.967455 -0.195000 0.161266 -vn 0.967455 -0.195000 0.161266 -vn 0.967455 -0.195000 0.161266 -vn 0.967455 -0.195000 0.161266 -vn 0.967455 -0.195000 0.161266 -vn 0.967455 -0.195000 0.161266 -vn 0.768424 -0.512327 0.383465 -vn 0.768424 -0.512327 0.383465 -vn 0.768424 -0.512327 0.383465 -vn 0.768424 -0.512327 0.383465 -vn 0.768424 -0.512327 0.383465 -vn 0.768424 -0.512327 0.383465 -vn 0.877468 -0.195017 0.438198 -vn 0.877468 -0.195017 0.438198 -vn 0.877468 -0.195017 0.438198 -vn 0.877468 -0.195017 0.438198 -vn 0.877468 -0.195017 0.438198 -vn 0.877468 -0.195017 0.438198 -vn -0.188896 -0.829249 -0.525989 -vn -0.188896 -0.829249 -0.525989 -vn -0.188896 -0.829249 -0.525989 -vn -0.188896 -0.829249 -0.525989 -vn -0.188896 -0.829249 -0.525989 -vn -0.188896 -0.829249 -0.525989 -vn -0.105792 -0.708151 -0.698090 -vn -0.105792 -0.708151 -0.698090 -vn -0.105792 -0.708151 -0.698090 -vn -0.105792 -0.708151 -0.698090 -vn -0.105792 -0.708151 -0.698090 -vn -0.105792 -0.708151 -0.698090 -vn 0.057450 -0.922397 -0.381947 -vn 0.057450 -0.922397 -0.381947 -vn 0.057450 -0.922397 -0.381947 -vn 0.057450 -0.922397 -0.381947 -vn 0.057450 -0.922397 -0.381947 -vn 0.057450 -0.922397 -0.381947 -vn 0.105792 -0.708151 -0.698090 -vn 0.105792 -0.708151 -0.698090 -vn 0.105792 -0.708151 -0.698090 -vn 0.105792 -0.708151 -0.698090 -vn 0.105792 -0.708151 -0.698090 -vn 0.105792 -0.708151 -0.698090 -vn -0.558621 -0.829247 0.017099 -vn -0.558621 -0.829247 0.017099 -vn -0.558621 -0.829247 0.017099 -vn -0.558621 -0.829247 0.017099 -vn -0.558621 -0.829247 0.017099 -vn -0.558621 -0.829247 0.017099 -vn -0.696599 -0.708169 -0.115095 -vn -0.696599 -0.708169 -0.115095 -vn -0.696599 -0.708169 -0.115095 -vn -0.696599 -0.708169 -0.115095 -vn -0.696599 -0.708169 -0.115095 -vn -0.696599 -0.708169 -0.115095 -vn -0.156348 -0.829245 0.536570 -vn -0.156348 -0.829245 0.536570 -vn -0.156348 -0.829245 0.536570 -vn -0.156348 -0.829245 0.536570 -vn -0.156348 -0.829245 0.536570 -vn -0.156348 -0.829245 0.536570 -vn -0.324743 -0.708172 0.626924 -vn -0.324743 -0.708172 0.626924 -vn -0.324743 -0.708172 0.626924 -vn -0.324743 -0.708172 0.626924 -vn -0.324743 -0.708172 0.626924 -vn -0.324743 -0.708172 0.626924 -vn 0.461983 -0.829254 0.314500 -vn 0.461983 -0.829254 0.314500 -vn 0.461983 -0.829254 0.314500 -vn 0.461983 -0.829254 0.314500 -vn 0.461983 -0.829254 0.314500 -vn 0.461983 -0.829254 0.314500 -vn 0.495891 -0.708172 0.502578 -vn 0.495891 -0.708172 0.502578 -vn 0.495891 -0.708172 0.502578 -vn 0.495891 -0.708172 0.502578 -vn 0.495891 -0.708172 0.502578 -vn 0.495891 -0.708172 0.502578 -vn 0.381025 -0.922388 -0.063397 -vn 0.381025 -0.922388 -0.063397 -vn 0.381025 -0.922388 -0.063397 -vn 0.381025 -0.922388 -0.063397 -vn 0.381025 -0.922388 -0.063397 -vn 0.381025 -0.922388 -0.063397 -vn 0.696570 -0.708196 -0.115102 -vn 0.696570 -0.708196 -0.115102 -vn 0.696570 -0.708196 -0.115102 -vn 0.696570 -0.708196 -0.115102 -vn 0.696570 -0.708196 -0.115102 -vn 0.696570 -0.708196 -0.115102 -vn -0.052025 -0.992743 0.108422 -vn -0.052025 -0.992743 0.108422 -vn -0.052025 -0.992743 0.108422 -vn -0.052025 -0.992743 0.108422 -vn -0.052025 -0.992743 0.108422 -vn -0.052025 -0.992743 0.108422 -vn 0.036442 -0.996551 -0.074559 -vn 0.036442 -0.996551 -0.074559 -vn 0.036442 -0.996551 -0.074559 -vn 0.036442 -0.996551 -0.074559 -vn 0.036442 -0.996551 -0.074559 -vn 0.036442 -0.996551 -0.074559 -vn 0.143696 -0.950282 0.276251 -vn 0.143696 -0.950282 0.276251 -vn 0.143696 -0.950282 0.276251 -vn 0.143696 -0.950282 0.276251 -vn 0.143696 -0.950282 0.276251 -vn 0.143696 -0.950282 0.276251 -vn -0.036442 -0.996551 -0.074558 -vn -0.036442 -0.996551 -0.074558 -vn -0.036442 -0.996551 -0.074558 -vn -0.036442 -0.996551 -0.074558 -vn -0.036442 -0.996551 -0.074558 -vn -0.036442 -0.996551 -0.074558 -vn 0.307131 -0.950284 -0.051299 -vn 0.307131 -0.950284 -0.051299 -vn 0.307131 -0.950284 -0.051299 -vn 0.307131 -0.950284 -0.051299 -vn 0.307131 -0.950284 -0.051299 -vn 0.307131 -0.950284 -0.051299 -vn -0.082169 -0.996551 0.011619 -vn -0.082169 -0.996551 0.011619 -vn -0.082169 -0.996551 0.011619 -vn -0.082169 -0.996551 0.011619 -vn -0.082169 -0.996551 0.011619 -vn -0.082169 -0.996551 0.011619 -vn 0.046123 -0.950283 -0.307954 -vn 0.046123 -0.950283 -0.307954 -vn 0.046123 -0.950283 -0.307954 -vn 0.046123 -0.950283 -0.307954 -vn 0.046123 -0.950283 -0.307954 -vn 0.046123 -0.950283 -0.307954 -vn -0.014343 -0.996551 0.081740 -vn -0.014343 -0.996551 0.081740 -vn -0.014343 -0.996551 0.081740 -vn -0.014343 -0.996551 0.081740 -vn -0.014343 -0.996551 0.081740 -vn -0.014343 -0.996551 0.081740 -vn -0.119190 -0.992743 -0.015976 -vn -0.119190 -0.992743 -0.015976 -vn -0.119190 -0.992743 -0.015976 -vn -0.119190 -0.992743 -0.015976 -vn -0.119190 -0.992743 -0.015976 -vn -0.119190 -0.992743 -0.015976 -vn 0.082169 -0.996551 0.011619 -vn 0.082169 -0.996551 0.011619 -vn 0.082169 -0.996551 0.011619 -vn 0.082169 -0.996551 0.011619 -vn 0.082169 -0.996551 0.011619 -vn 0.082169 -0.996551 0.011619 -vn -0.278628 -0.950283 -0.139028 -vn -0.278628 -0.950283 -0.139028 -vn -0.278628 -0.950283 -0.139028 -vn -0.278628 -0.950283 -0.139028 -vn -0.278628 -0.950283 -0.139028 -vn -0.278628 -0.950283 -0.139028 -vn 0.073306 -0.996551 0.038899 -vn 0.073306 -0.996551 0.038899 -vn 0.073306 -0.996551 0.038899 -vn 0.073306 -0.996551 0.038899 -vn 0.073306 -0.996551 0.038899 -vn 0.073306 -0.996551 0.038899 -vn 0.209326 -0.691760 0.691123 -vn 0.209326 -0.691760 0.691123 -vn 0.209326 -0.691760 0.691123 -vn 0.209326 -0.691760 0.691123 -vn 0.209326 -0.691760 0.691123 -vn 0.209326 -0.691760 0.691123 -vn 0.086062 -0.806547 0.584872 -vn 0.086062 -0.806547 0.584872 -vn 0.086062 -0.806547 0.584872 -vn 0.086062 -0.806547 0.584872 -vn 0.086062 -0.806547 0.584872 -vn 0.086062 -0.806547 0.584872 -vn -0.123196 -0.563559 0.816838 -vn -0.123196 -0.563559 0.816838 -vn -0.123196 -0.563559 0.816838 -vn -0.123196 -0.563559 0.816838 -vn -0.123196 -0.563559 0.816838 -vn -0.123196 -0.563559 0.816838 -vn -0.086062 -0.806547 0.584872 -vn -0.086062 -0.806547 0.584872 -vn -0.086062 -0.806547 0.584872 -vn -0.086062 -0.806547 0.584872 -vn -0.086062 -0.806547 0.584872 -vn -0.086062 -0.806547 0.584872 -vn 0.721983 -0.691759 0.014485 -vn 0.721983 -0.691759 0.014485 -vn 0.721983 -0.691759 0.014485 -vn 0.721983 -0.691759 0.014485 -vn 0.721983 -0.691759 0.014485 -vn 0.721983 -0.691759 0.014485 -vn 0.582840 -0.806549 0.098878 -vn 0.582840 -0.806549 0.098878 -vn 0.582840 -0.806549 0.098878 -vn 0.582840 -0.806549 0.098878 -vn 0.582840 -0.806549 0.098878 -vn 0.582840 -0.806549 0.098878 -vn 0.738791 -0.563558 0.369582 -vn 0.738791 -0.563558 0.369582 -vn 0.738791 -0.563558 0.369582 -vn 0.738791 -0.563558 0.369582 -vn 0.738791 -0.563558 0.369582 -vn 0.738791 -0.563558 0.369582 -vn 0.529649 -0.806548 0.262588 -vn 0.529649 -0.806548 0.262588 -vn 0.529649 -0.806548 0.262588 -vn 0.529649 -0.806548 0.262588 -vn 0.529649 -0.806548 0.262588 -vn 0.529649 -0.806548 0.262588 -vn 0.236883 -0.691760 -0.682169 -vn 0.236883 -0.691760 -0.682169 -vn 0.236883 -0.691760 -0.682169 -vn 0.236883 -0.691760 -0.682169 -vn 0.236883 -0.691760 -0.682169 -vn 0.236883 -0.691760 -0.682169 -vn 0.274153 -0.806548 -0.523757 -vn 0.274153 -0.806548 -0.523757 -vn 0.274153 -0.806548 -0.523757 -vn 0.274153 -0.806548 -0.523757 -vn 0.274153 -0.806548 -0.523757 -vn 0.274153 -0.806548 -0.523757 -vn 0.579791 -0.563557 -0.588426 -vn 0.579791 -0.563557 -0.588426 -vn 0.579791 -0.563557 -0.588426 -vn 0.579791 -0.563557 -0.588426 -vn 0.579791 -0.563557 -0.588426 -vn 0.579791 -0.563557 -0.588426 -vn 0.413406 -0.806547 -0.422585 -vn 0.413406 -0.806547 -0.422585 -vn 0.413406 -0.806547 -0.422585 -vn 0.413406 -0.806547 -0.422585 -vn 0.413406 -0.806547 -0.422585 -vn 0.413406 -0.806547 -0.422585 -vn -0.575584 -0.691759 -0.436088 -vn -0.575584 -0.691759 -0.436088 -vn -0.575584 -0.691759 -0.436088 -vn -0.575584 -0.691759 -0.436088 -vn -0.575584 -0.691759 -0.436088 -vn -0.575584 -0.691759 -0.436088 -vn -0.413408 -0.806545 -0.422585 -vn -0.413408 -0.806545 -0.422585 -vn -0.413408 -0.806545 -0.422585 -vn -0.413408 -0.806545 -0.422585 -vn -0.413408 -0.806545 -0.422585 -vn -0.413408 -0.806545 -0.422585 -vn -0.814928 -0.563558 0.135260 -vn -0.814928 -0.563558 0.135260 -vn -0.814928 -0.563558 0.135260 -vn -0.814928 -0.563558 0.135260 -vn -0.814928 -0.563558 0.135260 -vn -0.814928 -0.563558 0.135260 -vn -0.582839 -0.806548 0.098884 -vn -0.582839 -0.806548 0.098884 -vn -0.582839 -0.806548 0.098884 -vn -0.582839 -0.806548 0.098884 -vn -0.582839 -0.806548 0.098884 -vn -0.582839 -0.806548 0.098884 -vn -0.436552 -0.323157 0.839638 -vn -0.436552 -0.323157 0.839638 -vn -0.436552 -0.323157 0.839638 -vn -0.436552 -0.323157 0.839638 -vn -0.436552 -0.323157 0.839638 -vn -0.436552 -0.323157 0.839638 -vn 0.787430 -0.180228 0.589468 -vn 0.787430 -0.180228 0.589468 -vn 0.787430 -0.180228 0.589468 -vn 0.787430 -0.180228 0.589468 -vn 0.787430 -0.180228 0.589468 -vn 0.787430 -0.180228 0.589468 -vn 0.663639 -0.323159 0.674649 -vn 0.663639 -0.323159 0.674649 -vn 0.663639 -0.323159 0.674649 -vn 0.663639 -0.323159 0.674649 -vn 0.663639 -0.323159 0.674649 -vn 0.663639 -0.323159 0.674649 -vn 0.460302 -0.035887 0.887037 -vn 0.460302 -0.035887 0.887037 -vn 0.460302 -0.035887 0.887037 -vn 0.460302 -0.035887 0.887037 -vn 0.460302 -0.035887 0.887037 -vn 0.460302 -0.035887 0.887037 -vn 0.436552 -0.323158 0.839638 -vn 0.436552 -0.323158 0.839638 -vn 0.436552 -0.323158 0.839638 -vn 0.436552 -0.323158 0.839638 -vn 0.436552 -0.323158 0.839638 -vn 0.436552 -0.323158 0.839638 -vn 0.803950 -0.180223 -0.566731 -vn 0.803950 -0.180223 -0.566731 -vn 0.803950 -0.180223 -0.566731 -vn 0.803950 -0.180223 -0.566731 -vn 0.803950 -0.180223 -0.566731 -vn 0.803950 -0.180223 -0.566731 -vn 0.846704 -0.323162 -0.422681 -vn 0.846704 -0.323162 -0.422681 -vn 0.846704 -0.323162 -0.422681 -vn 0.846704 -0.323162 -0.422681 -vn 0.846704 -0.323162 -0.422681 -vn 0.846704 -0.323162 -0.422681 -vn 0.985863 -0.035875 -0.163666 -vn 0.985863 -0.035875 -0.163666 -vn 0.985863 -0.035875 -0.163666 -vn 0.985863 -0.035875 -0.163666 -vn 0.985863 -0.035875 -0.163666 -vn 0.985863 -0.035875 -0.163666 -vn 0.933443 -0.323163 -0.155726 -vn 0.933443 -0.323163 -0.155726 -vn 0.933443 -0.323163 -0.155726 -vn 0.933443 -0.323163 -0.155726 -vn 0.933443 -0.323163 -0.155726 -vn 0.933443 -0.323163 -0.155726 -vn 0.148988 -0.035876 -0.988188 -vn 0.148988 -0.035876 -0.988188 -vn 0.148988 -0.035876 -0.988188 -vn 0.148988 -0.035876 -0.988188 -vn 0.148988 -0.035876 -0.988188 -vn 0.148988 -0.035876 -0.988188 -vn 0.140348 -0.323158 -0.935880 -vn 0.140348 -0.323158 -0.935880 -vn 0.140348 -0.323158 -0.935880 -vn 0.140348 -0.323158 -0.935880 -vn 0.140348 -0.323158 -0.935880 -vn 0.140348 -0.323158 -0.935880 -vn -0.983526 -0.180221 -0.014053 -vn -0.983526 -0.180221 -0.014053 -vn -0.983526 -0.180221 -0.014053 -vn -0.983526 -0.180221 -0.014053 -vn -0.983526 -0.180221 -0.014053 -vn -0.983526 -0.180221 -0.014053 -vn -0.933443 -0.323162 -0.155726 -vn -0.933443 -0.323162 -0.155726 -vn -0.933443 -0.323162 -0.155726 -vn -0.933443 -0.323162 -0.155726 -vn -0.933443 -0.323162 -0.155726 -vn -0.933443 -0.323162 -0.155726 -vn -0.893781 -0.035877 -0.447066 -vn -0.893781 -0.035877 -0.447066 -vn -0.893781 -0.035877 -0.447066 -vn -0.893781 -0.035877 -0.447066 -vn -0.893781 -0.035877 -0.447066 -vn -0.893781 -0.035877 -0.447066 -vn -0.846704 -0.323163 -0.422681 -vn -0.846704 -0.323163 -0.422681 -vn -0.846704 -0.323163 -0.422681 -vn -0.846704 -0.323163 -0.422681 -vn -0.846704 -0.323163 -0.422681 -vn -0.846704 -0.323163 -0.422681 -vn 0.275050 0.358333 0.892157 -vn 0.275050 0.358333 0.892157 -vn 0.275050 0.358333 0.892157 -vn 0.275050 0.358333 0.892157 -vn 0.275050 0.358333 0.892157 -vn 0.275050 0.358333 0.892157 -vn 0.145727 0.215782 0.965506 -vn 0.145727 0.215782 0.965506 -vn 0.145727 0.215782 0.965506 -vn 0.145727 0.215782 0.965506 -vn 0.145727 0.215782 0.965506 -vn 0.145727 0.215782 0.965506 -vn -0.128113 0.497309 0.858062 -vn -0.128113 0.497309 0.858062 -vn -0.128113 0.497309 0.858062 -vn -0.128113 0.497309 0.858062 -vn -0.128113 0.497309 0.858062 -vn -0.128113 0.497309 0.858062 -vn -0.145727 0.215782 0.965506 -vn -0.145727 0.215782 0.965506 -vn -0.145727 0.215782 0.965506 -vn -0.145727 0.215782 0.965506 -vn -0.145727 0.215782 0.965506 -vn -0.145727 0.215782 0.965506 -vn 0.933488 0.358331 0.014100 -vn 0.933488 0.358331 0.014100 -vn 0.933488 0.358331 0.014100 -vn 0.933488 0.358331 0.014100 -vn 0.933488 0.358331 0.014100 -vn 0.933488 0.358331 0.014100 -vn 0.963282 0.215785 0.159762 -vn 0.963282 0.215785 0.159762 -vn 0.963282 0.215785 0.159762 -vn 0.963282 0.215785 0.159762 -vn 0.963282 0.215785 0.159762 -vn 0.963282 0.215785 0.159762 -vn 0.873220 0.215784 0.436949 -vn 0.873220 0.215784 0.436949 -vn 0.873220 0.215784 0.436949 -vn 0.873220 0.215784 0.436949 -vn 0.873220 0.215784 0.436949 -vn 0.873220 0.215784 0.436949 -vn 0.301874 0.358335 -0.883441 -vn 0.301874 0.358335 -0.883441 -vn 0.301874 0.358335 -0.883441 -vn 0.301874 0.358335 -0.883441 -vn 0.301874 0.358335 -0.883441 -vn 0.301874 0.358335 -0.883441 -vn 0.449625 0.215790 -0.866760 -vn 0.449625 0.215790 -0.866760 -vn 0.449625 0.215790 -0.866760 -vn 0.449625 0.215790 -0.866760 -vn 0.449625 0.215790 -0.866760 -vn 0.449625 0.215790 -0.866760 -vn 0.685401 0.215780 -0.695460 -vn 0.685401 0.215780 -0.695460 -vn 0.685401 0.215780 -0.695460 -vn 0.685401 0.215780 -0.695460 -vn 0.685401 0.215780 -0.695460 -vn 0.685401 0.215780 -0.695460 -vn -0.963281 0.215786 0.159767 -vn -0.963281 0.215786 0.159767 -vn -0.963281 0.215786 0.159767 -vn -0.963281 0.215786 0.159767 -vn -0.963281 0.215786 0.159767 -vn -0.963281 0.215786 0.159767 -vn 0.530678 0.832583 0.158703 -vn 0.530678 0.832583 0.158703 -vn 0.530678 0.832583 0.158703 -vn 0.530678 0.832583 0.158703 -vn 0.530678 0.832583 0.158703 -vn 0.530678 0.832583 0.158703 -vn 0.314952 0.832586 -0.455638 -vn 0.314952 0.832586 -0.455638 -vn 0.314952 0.832586 -0.455638 -vn 0.314952 0.832586 -0.455638 -vn 0.314952 0.832586 -0.455638 -vn 0.314952 0.832586 -0.455638 -vn 0.052004 0.993412 -0.102115 -vn 0.052004 0.993412 -0.102115 -vn 0.052004 0.993412 -0.102115 -vn 0.052004 0.993412 -0.102115 -vn 0.052004 0.993412 -0.102115 -vn 0.052004 0.993412 -0.102115 -vn 0.001114 0.998544 0.053933 -vn 0.001114 0.998544 0.053933 -vn 0.001114 0.998544 0.053933 -vn 0.001114 0.998544 0.053933 -vn 0.001114 0.998544 0.053933 -vn 0.001114 0.998544 0.053933 -vn 0.130501 0.965903 -0.223609 -vn 0.130501 0.965903 -0.223609 -vn 0.130501 0.965903 -0.223609 -vn 0.130501 0.965903 -0.223609 -vn 0.130501 0.965903 -0.223609 -vn 0.130501 0.965903 -0.223609 -vn 0.379761 0.902319 0.203964 -vn 0.379761 0.902319 0.203964 -vn 0.379761 0.902319 0.203964 -vn 0.379761 0.902319 0.203964 -vn 0.379761 0.902319 0.203964 -vn 0.379761 0.902319 0.203964 -vn 0.591661 0.733920 0.333616 -vn 0.591661 0.733920 0.333616 -vn 0.591661 0.733920 0.333616 -vn 0.591661 0.733920 0.333616 -vn 0.591661 0.733920 0.333616 -vn 0.591661 0.733920 0.333616 -vn 0.763175 0.513752 0.391947 -vn 0.763175 0.513752 0.391947 -vn 0.763175 0.513752 0.391947 -vn 0.763175 0.513752 0.391947 -vn 0.763175 0.513752 0.391947 -vn 0.763175 0.513752 0.391947 -vn 0.449801 0.835986 -0.314336 -vn 0.449801 0.835986 -0.314336 -vn 0.449801 0.835986 -0.314336 -vn 0.449801 0.835986 -0.314336 -vn 0.449801 0.835986 -0.314336 -vn 0.449801 0.835986 -0.314336 -vn 0.640205 0.604195 -0.474433 -vn 0.640205 0.604195 -0.474433 -vn 0.640205 0.604195 -0.474433 -vn 0.640205 0.604195 -0.474433 -vn 0.640205 0.604195 -0.474433 -vn 0.640205 0.604195 -0.474433 -vn 0.608488 0.514147 -0.604479 -vn 0.608488 0.514147 -0.604479 -vn 0.608488 0.514147 -0.604479 -vn 0.608488 0.514147 -0.604479 -vn 0.608488 0.514147 -0.604479 -vn 0.608488 0.514147 -0.604479 -s off -g Mesh1 -usemtl initialShadingGroup -f 1//1 2//2 3//3 4//4 5//5 6//6 -f 7//7 8//8 9//9 10//10 11//11 12//12 -f 13//13 14//14 15//15 16//16 17//17 18//18 -f 1600//19 719//20 1599//21 22//22 1598//23 1584//24 -f 24//25 25//26 26//27 27//28 28//29 29//30 -f 30//31 31//32 32//33 33//34 34//35 35//36 -f 36//37 37//38 38//39 39//40 40//41 41//42 -f 42//43 43//44 44//45 45//46 46//47 47//48 -f 48//49 49//50 50//51 51//52 52//53 53//54 -f 54//55 55//56 56//57 57//58 58//59 59//60 -f 60//61 61//62 62//63 63//64 64//65 65//66 -f 66//67 67//68 68//69 69//70 70//71 71//72 -f 72//73 73//74 74//75 75//76 76//77 77//78 -f 78//79 79//80 80//81 81//82 82//83 83//84 -f 84//85 85//86 86//87 87//88 88//89 89//90 -f 90//91 91//92 92//93 93//94 94//95 95//96 -f 96//97 97//98 98//99 99//100 100//101 101//102 -f 102//103 103//104 104//105 105//106 106//107 107//108 -f 108//109 109//110 110//111 111//112 112//113 113//114 -f 114//115 115//116 116//117 117//118 118//119 119//120 -f 120//121 121//122 122//123 123//124 124//125 125//126 -f 126//127 127//128 128//129 129//130 130//131 131//132 -f 132//133 133//134 134//135 135//136 136//137 137//138 -f 138//139 139//140 140//141 141//142 142//143 143//144 -f 144//145 145//146 146//147 147//148 148//149 149//150 -f 150//151 151//152 152//153 153//154 154//155 155//156 -f 156//157 157//158 158//159 159//160 160//161 161//162 -f 162//163 163//164 164//165 165//166 166//167 167//168 -f 168//169 169//170 170//171 171//172 172//173 173//174 -f 174//175 175//176 176//177 177//178 178//179 179//180 -f 180//181 181//182 182//183 183//184 184//185 185//186 -f 186//187 187//188 188//189 189//190 190//191 191//192 -f 192//193 193//194 194//195 195//196 196//197 197//198 -f 198//199 199//200 200//201 201//202 202//203 203//204 -f 204//205 205//206 206//207 207//208 208//209 209//210 -f 210//211 211//212 212//213 213//214 214//215 215//216 -f 216//217 217//218 218//219 219//220 220//221 221//222 -f 222//223 223//224 224//225 225//226 226//227 227//228 -f 228//229 229//230 230//231 231//232 232//233 233//234 -f 234//235 235//236 236//237 237//238 238//239 239//240 -f 240//241 241//242 242//243 243//244 244//245 245//246 -f 246//247 247//248 248//249 249//250 250//251 251//252 -f 252//253 253//254 254//255 255//256 256//257 257//258 -f 258//259 259//260 260//261 261//262 262//263 263//264 -f 264//265 265//266 266//267 267//268 268//269 269//270 -f 270//271 271//272 272//273 273//274 274//275 275//276 -f 276//277 277//278 278//279 279//280 280//281 281//282 -f 282//283 283//284 284//285 285//286 286//287 287//288 -f 288//289 289//290 290//291 291//292 292//293 293//294 -f 294//295 295//296 296//297 297//298 298//299 299//300 -f 300//301 301//302 302//303 303//304 304//305 305//306 -f 306//307 307//308 308//309 309//310 310//311 311//312 -f 312//313 313//314 314//315 315//316 316//317 317//318 -f 318//319 319//320 320//321 321//322 322//323 323//324 -f 324//325 325//326 326//327 327//328 328//329 329//330 -f 330//331 331//332 332//333 333//334 334//335 335//336 -f 336//337 337//338 338//339 339//340 340//341 341//342 -f 342//343 343//344 344//345 345//346 346//347 347//348 -f 348//349 349//350 350//351 351//352 352//353 353//354 -f 354//355 355//356 356//357 357//358 358//359 359//360 -f 360//361 361//362 362//363 363//364 364//365 365//366 -f 366//367 367//368 368//369 369//370 370//371 371//372 -f 372//373 373//374 374//375 375//376 376//377 377//378 -f 378//379 379//380 380//381 381//382 382//383 383//384 -f 384//385 385//386 386//387 387//388 388//389 389//390 -f 390//391 391//392 392//393 393//394 394//395 395//396 -f 396//397 397//398 398//399 399//400 400//401 401//402 -f 402//403 403//404 404//405 405//406 406//407 407//408 -f 408//409 409//410 410//411 411//412 412//413 413//414 -f 414//415 415//416 416//417 417//418 418//419 419//420 -f 420//421 421//422 422//423 423//424 424//425 425//426 -f 426//427 427//428 428//429 429//430 430//431 431//432 -f 432//433 433//434 434//435 435//436 436//437 437//438 -f 438//439 439//440 440//441 441//442 442//443 443//444 -f 444//445 445//446 446//447 447//448 448//449 449//450 -f 450//451 451//452 452//453 453//454 454//455 455//456 -f 448//457 447//458 456//459 457//460 458//461 459//462 -f 460//463 461//464 462//465 463//466 464//467 465//468 -f 466//469 467//470 468//471 469//472 470//473 471//474 -f 472//475 473//476 474//477 475//478 476//479 477//480 -f 478//481 479//482 480//483 481//484 6//485 5//486 -f 482//487 483//488 484//489 485//490 486//491 487//492 -f 488//493 489//494 490//495 491//496 492//497 493//498 -f 494//499 495//500 496//501 497//502 498//503 499//504 -f 500//505 501//506 502//507 503//508 504//509 505//510 -f 506//511 507//512 508//513 509//514 510//515 511//516 -f 512//517 513//518 514//519 515//520 516//521 517//522 -f 518//523 519//524 520//525 521//526 522//527 523//528 -f 524//529 525//530 526//531 527//532 528//533 529//534 -f 530//535 531//536 532//537 533//538 534//539 535//540 -f 536//541 537//542 538//543 539//544 540//545 541//546 -f 542//547 543//548 544//549 545//550 546//551 547//552 -f 548//553 549//554 550//555 551//556 242//557 241//558 -f 552//559 245//560 244//561 553//562 3//563 2//564 -f 554//565 555//566 556//567 315//568 314//569 557//570 -f 558//571 559//572 560//573 561//574 321//575 320//576 -f 562//577 563//578 564//579 565//580 327//581 326//582 -f 566//583 165//584 164//585 567//586 568//587 569//588 -f 570//589 39//590 38//591 262//592 261//593 571//594 -f 572//595 99//596 98//597 334//598 333//599 573//600 -f 190//601 189//602 574//603 575//604 339//605 338//606 -f 88//607 87//608 576//609 577//610 345//611 344//612 -f 94//613 93//614 578//615 579//616 351//617 350//618 -f 580//619 171//620 170//621 46//622 45//623 581//624 -f 582//625 51//626 50//627 268//628 267//629 583//630 -f 584//631 117//632 116//633 358//634 357//635 585//636 -f 196//637 195//638 586//639 587//640 363//641 362//642 -f 106//643 105//644 588//645 589//646 369//647 368//648 -f 112//649 111//650 590//651 591//652 375//653 374//654 -f 592//655 177//656 176//657 58//658 57//659 593//660 -f 274//661 273//662 594//663 595//664 63//665 62//666 -f 222//667 596//668 597//669 279//670 278//671 223//672 -f 228//673 598//674 599//675 285//676 284//677 229//678 -f 600//679 135//680 134//681 382//682 381//683 601//684 -f 602//685 603//686 604//687 605//688 606//689 607//690 -f 608//691 213//692 212//693 124//694 123//695 609//696 -f 130//697 129//698 610//699 611//700 387//701 386//702 -f 612//703 10//704 9//705 445//706 444//707 613//708 -f 614//709 615//710 616//711 617//712 618//713 619//714 -f 620//715 297//716 296//717 621//718 622//719 623//720 -f 624//721 625//722 626//723 627//724 75//725 74//726 -f 628//727 303//728 302//729 629//730 630//731 631//732 -f 632//733 633//734 634//735 635//736 81//737 80//738 -f 636//739 309//740 308//741 637//742 638//743 639//744 -f 640//745 641//746 642//747 643//748 644//749 645//750 -f 646//751 606//752 605//753 647//754 648//755 649//756 -f 4//757 3//758 553//759 650//760 651//761 652//762 -f 35//763 34//764 653//765 475//766 474//767 654//768 -f 655//769 656//770 657//771 658//772 410//773 409//774 -f 659//775 660//776 661//777 662//778 428//779 427//780 -f 663//781 664//782 665//783 666//784 440//785 439//786 -f 667//787 668//788 669//789 670//790 398//791 397//792 -f 671//793 672//794 673//795 674//796 404//797 403//798 -f 675//799 676//800 677//801 678//802 416//803 415//804 -f 679//805 680//806 681//807 682//808 422//809 421//810 -f 683//811 614//812 619//813 299//814 298//815 684//816 -f 685//817 686//818 687//819 305//820 304//821 688//822 -f 689//823 690//824 691//825 311//826 310//827 692//828 -f 693//829 694//830 695//831 696//832 29//833 28//834 -f 542//835 547//836 697//837 293//838 292//839 698//840 -f 699//841 700//842 146//843 145//844 701//845 702//846 -f 703//847 704//848 152//849 151//850 705//851 706//852 -f 707//853 708//854 257//855 256//856 709//857 710//858 -f 240//859 711//860 12//861 11//862 548//863 241//864 -f 712//865 713//866 449//867 448//868 459//869 714//870 -f 715//871 716//872 717//873 718//874 18//875 17//876 -f 457//877 456//878 723//879 1595//880 724//881 725//882 -f 460//883 465//884 726//885 727//886 728//887 729//888 -f 466//889 471//890 730//891 731//892 732//893 733//894 -f 472//895 477//896 734//897 735//898 736//899 737//900 -f 481//901 480//902 738//903 739//904 740//905 741//906 -f 485//907 484//908 742//909 743//910 744//911 745//912 -f 491//913 490//914 746//915 747//916 748//917 749//918 -f 497//919 496//920 750//921 751//922 752//923 753//924 -f 503//925 502//926 754//927 755//928 756//929 757//930 -f 509//931 508//932 758//933 759//934 760//935 761//936 -f 515//937 514//938 762//939 763//940 764//941 765//942 -f 521//943 520//944 766//945 767//946 768//947 769//948 -f 527//949 526//950 770//951 771//952 772//953 773//954 -f 533//955 532//956 774//957 775//958 776//959 777//960 -f 539//961 538//962 778//963 779//964 780//965 781//966 -f 545//967 544//968 782//969 783//970 784//971 785//972 -f 551//973 550//974 786//975 787//976 788//977 789//978 -f 790//979 791//980 552//981 2//982 1//983 792//984 -f 793//985 794//986 795//987 796//988 797//989 798//990 -f 799//991 800//992 801//993 802//994 803//995 804//996 -f 805//997 806//998 807//999 808//1000 809//1001 810//1002 -f 811//1003 812//1004 813//1005 814//1006 815//1007 816//1008 -f 556//1009 555//1010 817//1011 818//1012 819//1013 820//1014 -f 821//1015 822//1016 561//1017 560//1018 823//1019 824//1020 -f 825//1021 826//1022 565//1023 564//1024 827//1025 828//1026 -f 829//1027 830//1028 566//1029 569//1030 831//1031 832//1032 -f 833//1033 834//1034 835//1035 836//1036 837//1037 838//1038 -f 839//1039 570//1040 571//1041 840//1042 841//1043 842//1044 -f 843//1045 844//1046 845//1047 846//1048 847//1049 848//1050 -f 849//1051 850//1052 851//1053 852//1054 853//1055 854//1056 -f 855//1057 856//1058 857//1059 858//1060 859//1061 860//1062 -f 861//1063 572//1064 573//1065 862//1066 863//1067 864//1068 -f 575//1069 574//1070 865//1071 866//1072 867//1073 868//1074 -f 869//1075 870//1076 577//1077 576//1078 871//1079 872//1080 -f 873//1081 874//1082 579//1083 578//1084 875//1085 876//1086 -f 877//1087 878//1088 580//1089 581//1090 879//1091 880//1092 -f 881//1093 882//1094 883//1095 884//1096 885//1097 886//1098 -f 887//1099 582//1100 583//1101 888//1102 889//1103 890//1104 -f 891//1105 892//1106 893//1107 894//1108 895//1109 896//1110 -f 897//1111 898//1112 899//1113 900//1114 901//1115 902//1116 -f 903//1117 904//1118 905//1119 906//1120 907//1121 908//1122 -f 909//1123 584//1124 585//1125 910//1126 911//1127 912//1128 -f 587//1129 586//1130 913//1131 914//1132 915//1133 916//1134 -f 917//1135 918//1136 589//1137 588//1138 919//1139 920//1140 -f 921//1141 922//1142 591//1143 590//1144 923//1145 924//1146 -f 925//1147 926//1148 592//1149 593//1150 927//1151 928//1152 -f 929//1153 930//1154 931//1155 932//1156 933//1157 934//1158 -f 595//1159 594//1160 935//1161 936//1162 937//1163 938//1164 -f 597//1165 596//1166 939//1167 940//1168 941//1169 942//1170 -f 599//1171 598//1172 943//1173 944//1174 945//1175 946//1176 -f 947//1177 948//1178 949//1179 950//1180 951//1181 952//1182 -f 600//1183 601//1184 953//1185 954//1186 955//1187 956//1188 -f 602//1189 607//1190 957//1191 958//1192 959//1193 960//1194 -f 961//1195 962//1196 608//1197 609//1198 963//1199 964//1200 -f 611//1201 610//1202 965//1203 966//1204 967//1205 968//1206 -f 969//1207 970//1208 971//1209 972//1210 973//1211 974//1212 -f 975//1213 976//1214 977//1215 978//1216 979//1217 980//1218 -f 981//1219 612//1220 613//1221 982//1222 983//1223 984//1224 -f 617//1225 616//1226 985//1227 986//1228 987//1229 988//1230 -f 620//1231 623//1232 989//1233 990//1234 991//1235 992//1236 -f 628//1237 631//1238 993//1239 994//1240 995//1241 996//1242 -f 997//1243 998//1244 636//1245 639//1246 999//1247 1000//1248 -f 1001//1249 1002//1250 1003//1251 1004//1252 1005//1253 1006//1254 -f 642//1255 641//1256 1007//1257 1008//1258 1009//1259 1010//1260 -f 1011//1261 395//1262 394//1263 1012//1264 1013//1265 1014//1266 -f 259//1267 1015//1268 1016//1269 482//1270 487//1271 260//1272 -f 1017//1273 1018//1274 1019//1275 1020//1276 1021//1277 1022//1278 -f 254//1279 253//1280 1023//1281 1024//1282 1025//1283 1026//1284 -f 8//1285 1027//1286 1028//1287 446//1288 445//1289 9//1290 -f 1029//1291 401//1292 400//1293 1030//1294 1031//1295 1032//1296 -f 557//1297 314//1298 313//1299 1033//1300 1034//1301 1035//1302 -f 392//1303 391//1304 1036//1305 185//1306 184//1307 1037//1308 -f 181//1309 1038//1310 1039//1311 1040//1312 1041//1313 182//1314 -f 621//1315 296//1316 295//1317 1042//1318 1043//1319 1044//1320 -f 1045//1321 1046//1322 1047//1323 15//1324 14//1325 1048//1326 -f 1049//1327 407//1328 406//1329 1050//1330 1051//1331 1052//1332 -f 319//1333 1053//1334 1054//1335 1055//1336 558//1337 320//1338 -f 76//1339 1056//1340 463//1341 462//1342 1057//1343 77//1344 -f 73//1345 1058//1346 1059//1347 1060//1348 624//1349 74//1350 -f 629//1351 302//1352 301//1353 1061//1354 1062//1355 1063//1356 -f 1064//1357 1065//1358 1066//1359 21//1360 20//1361 1067//1362 -f 1068//1363 413//1364 412//1365 1069//1366 1070//1367 1071//1368 -f 325//1369 1072//1370 1073//1371 1074//1372 562//1373 326//1374 -f 82//1375 1075//1376 469//1377 468//1378 1076//1379 83//1380 -f 79//1381 1077//1382 1078//1383 1079//1384 632//1385 80//1386 -f 637//1387 308//1388 307//1389 1080//1390 1081//1391 1082//1392 -f 1083//1393 1084//1394 1085//1395 26//1396 25//1397 1086//1398 -f 1087//1399 1088//1400 1089//1401 1090//1402 1091//1403 1092//1404 -f 1093//1405 332//1406 331//1407 1094//1408 1095//1409 1096//1410 -f 163//1411 1097//1412 1098//1413 1099//1414 567//1415 164//1416 -f 1100//1417 1101//1418 1102//1419 32//1420 31//1421 1103//1422 -f 1104//1423 1105//1424 1106//1425 290//1426 289//1427 1107//1428 -f 1108//1429 1109//1430 317//1431 316//1432 1110//1433 1111//1434 -f 187//1435 1112//1436 1113//1437 1114//1438 1115//1439 188//1440 -f 37//1441 1116//1442 1117//1443 263//1444 262//1445 38//1446 -f 1118//1447 1119//1448 323//1449 322//1450 1120//1451 1121//1452 -f 85//1453 1122//1454 1123//1455 488//1456 493//1457 86//1458 -f 1124//1459 1125//1460 329//1461 328//1462 1126//1463 1127//1464 -f 91//1465 1128//1466 1129//1467 494//1468 499//1469 92//1470 -f 1130//1471 1131//1472 167//1473 166//1474 1132//1475 1133//1476 -f 43//1477 1134//1478 1135//1479 500//1480 505//1481 44//1482 -f 1136//1483 149//1484 148//1485 1137//1486 1138//1487 1139//1488 -f 97//1489 1140//1490 1141//1491 335//1492 334//1493 98//1494 -f 1142//1495 1143//1496 41//1497 40//1498 1144//1499 1145//1500 -f 265//1501 1146//1502 1147//1503 506//1504 511//1505 266//1506 -f 1148//1507 419//1508 418//1509 1149//1510 1150//1511 1151//1512 -f 337//1513 1152//1514 1153//1515 191//1516 190//1517 338//1518 -f 1154//1519 425//1520 424//1521 1155//1522 1156//1523 1157//1524 -f 343//1525 1158//1526 1159//1527 89//1528 88//1529 344//1530 -f 1160//1531 431//1532 430//1533 1161//1534 1162//1535 1163//1536 -f 349//1537 1164//1538 1165//1539 95//1540 94//1541 350//1542 -f 1166//1543 1167//1544 101//1545 100//1546 1168//1547 1169//1548 -f 1170//1549 356//1550 355//1551 1171//1552 1172//1553 1173//1554 -f 169//1555 1174//1556 1175//1557 47//1558 46//1559 170//1560 -f 1176//1561 1177//1562 341//1563 340//1564 1178//1565 1179//1566 -f 193//1567 1180//1568 1181//1569 1182//1570 1183//1571 194//1572 -f 49//1573 1184//1574 1185//1575 269//1576 268//1577 50//1578 -f 1186//1579 1187//1580 347//1581 346//1582 1188//1583 1189//1584 -f 103//1585 1190//1586 1191//1587 512//1588 517//1589 104//1590 -f 1192//1591 1193//1592 353//1593 352//1594 1194//1595 1195//1596 -f 109//1597 1196//1598 1197//1599 518//1600 523//1601 110//1602 -f 1198//1603 1199//1604 173//1605 172//1606 1200//1607 1201//1608 -f 55//1609 1202//1610 1203//1611 524//1612 529//1613 56//1614 -f 1204//1615 155//1616 154//1617 1205//1618 1206//1619 1207//1620 -f 115//1621 1208//1622 1209//1623 359//1624 358//1625 116//1626 -f 1210//1627 1211//1628 53//1629 52//1630 1212//1631 1213//1632 -f 271//1633 1214//1634 1215//1635 530//1636 535//1637 272//1638 -f 1216//1639 227//1640 226//1641 1217//1642 1218//1643 1219//1644 -f 361//1645 1220//1646 1221//1647 197//1648 196//1649 362//1650 -f 1222//1651 233//1652 232//1653 1223//1654 1224//1655 1225//1656 -f 367//1657 1226//1658 1227//1659 107//1660 106//1661 368//1662 -f 1228//1663 443//1664 442//1665 1229//1666 1230//1667 1231//1668 -f 373//1669 1232//1670 1233//1671 113//1672 112//1673 374//1674 -f 1234//1675 1235//1676 119//1677 118//1678 1236//1679 1237//1680 -f 1238//1681 380//1682 379//1683 1239//1684 1240//1685 1241//1686 -f 175//1687 1242//1688 1243//1689 59//1690 58//1691 176//1692 -f 1244//1693 1245//1694 365//1695 364//1696 1246//1697 1247//1698 -f 199//1699 1248//1700 1249//1701 1250//1702 1251//1703 200//1704 -f 61//1705 1252//1706 1253//1707 275//1708 274//1709 62//1710 -f 1254//1711 1255//1712 371//1713 370//1714 1256//1715 1257//1716 -f 121//1717 1258//1718 1259//1719 1260//1720 1261//1721 122//1722 -f 223//1723 278//1724 277//1725 1262//1726 1263//1727 224//1728 -f 1264//1729 1265//1730 377//1731 376//1732 1266//1733 1267//1734 -f 127//1735 1268//1736 1269//1737 1270//1738 1271//1739 128//1740 -f 229//1741 284//1742 283//1743 1272//1744 1273//1745 230//1746 -f 1274//1747 1275//1748 179//1749 178//1750 1276//1751 1277//1752 -f 433//1753 1278//1754 158//1755 157//1756 1279//1757 434//1758 -f 67//1759 1280//1760 1281//1761 536//1762 541//1763 68//1764 -f 1282//1765 161//1766 160//1767 1283//1768 1284//1769 1285//1770 -f 133//1771 1286//1772 1287//1773 383//1774 382//1775 134//1776 -f 647//1777 605//1778 604//1779 65//1780 64//1781 1288//1782 -f 1289//1783 1290//1784 437//1785 436//1786 1291//1787 1292//1788 -f 1293//1789 1294//1790 281//1791 280//1792 1295//1793 1296//1794 -f 235//1795 1297//1796 1298//1797 1299//1798 1300//1799 236//1800 -f 205//1801 1301//1802 1302//1803 203//1804 202//1805 206//1806 -f 1303//1807 1304//1808 287//1809 286//1810 1305//1811 1306//1812 -f 139//1813 1307//1814 1308//1815 1309//1816 1310//1817 140//1818 -f 211//1819 1311//1820 1312//1821 125//1822 124//1823 212//1824 -f 1313//1825 455//1826 454//1827 1314//1828 1315//1829 1316//1830 -f 385//1831 1317//1832 1318//1833 131//1834 130//1835 386//1836 -f 137//1837 136//1838 1319//1839 1320//1840 1321//1841 1322//1842 -f 1323//1843 218//1844 217//1845 1324//1846 1325//1847 1326//1848 -f 247//1849 1327//1850 1328//1851 71//1852 70//1853 248//1854 -f 209//1855 208//1856 1329//1857 1330//1858 1331//1859 1332//1860 -f 1333//1861 1334//1862 1335//1863 1336//1864 1337//1865 1338//1866 -f 1339//1867 1340//1868 646//1869 649//1870 1341//1871 1342//1872 -f 215//1873 214//1874 1343//1875 1344//1876 1345//1877 1346//1878 -f 1347//1879 1348//1880 1349//1881 1350//1882 1351//1883 1352//1884 -f 1353//1885 1354//1886 1355//1887 239//1888 238//1889 1356//1890 -f 1357//1891 1358//1892 389//1893 388//1894 1359//1895 1360//1896 -f 1361//1897 1362//1898 1363//1899 1364//1900 1365//1901 1366//1902 -f 1367//1903 1368//1904 1369//1905 143//1906 142//1907 1370//1908 -f 1371//1909 1372//1910 1373//1911 452//1912 451//1913 1374//1914 -f 645//1915 644//1916 251//1917 250//1918 1375//1919 1376//1920 -f 1377//1921 1378//1922 478//1923 5//1924 4//1925 652//1926 -f 650//1927 553//1928 244//1929 243//1930 1379//1931 1380//1932 -f 1381//1933 1382//1934 1383//1935 221//1936 220//1937 1384//1938 -f 987//1939 986//1940 458//1941 457//1942 725//1943 1385//1944 -f 1385//1945 725//1946 724//1947 393//1948 392//1949 1037//1950 -f 446//1951 1028//1952 1596//1953 723//1954 456//1955 447//1956 -f 1387//1957 824//1958 823//1959 461//1960 460//1961 729//1962 -f 1387//1963 729//1964 728//1965 399//1966 398//1967 670//1968 -f 1030//1969 400//1970 399//1971 728//1972 727//1973 1388//1974 -f 795//1975 794//1976 1388//1977 727//1978 726//1979 1389//1980 -f 1389//1981 726//1982 465//1983 464//1984 1046//1985 1045//1986 -f 1390//1987 828//1988 827//1989 467//1990 466//1991 733//1992 -f 1390//1993 733//1994 732//1995 405//1996 404//1997 674//1998 -f 1050//1999 406//2000 405//2001 732//2002 731//2003 1391//2004 -f 801//2005 800//2006 1391//2007 731//2008 730//2009 1392//2010 -f 1392//2011 730//2012 471//2013 470//2014 1065//2015 1064//2016 -f 1393//2017 832//2018 831//2019 473//2020 472//2021 737//2022 -f 1393//2023 737//2024 736//2025 411//2026 410//2027 658//2028 -f 1069//2029 412//2030 411//2031 736//2032 735//2033 1394//2034 -f 807//2035 806//2036 1394//2037 735//2038 734//2039 1395//2040 -f 1395//2041 734//2042 477//2043 476//2044 1084//2045 1083//2046 -f 1396//2047 792//2048 1//2049 6//2050 481//2051 741//2052 -f 1396//2053 741//2054 740//2055 1397//2056 710//2057 709//2058 -f 1090//2059 1089//2060 1397//2061 740//2062 739//2063 1398//2064 -f 813//2065 812//2066 1398//2067 739//2068 738//2069 1399//2070 -f 1105//2071 1104//2072 1399//2073 738//2074 480//2075 479//2076 -f 1400//2077 841//2078 840//2079 486//2080 485//2081 745//2082 -f 1400//2083 745//2084 744//2085 147//2086 146//2087 700//2088 -f 1137//2089 148//2090 147//2091 744//2092 743//2093 1401//2094 -f 1401//2095 743//2096 742//2097 1402//2098 836//2099 835//2100 -f 1402//2101 742//2102 484//2103 483//2104 1019//2105 1018//2106 -f 1403//2107 872//2108 871//2109 492//2110 491//2111 749//2112 -f 1403//2113 749//2114 748//2115 417//2116 416//2117 678//2118 -f 1149//2119 418//2120 417//2121 748//2122 747//2123 1404//2124 -f 1404//2125 747//2126 746//2127 1405//2128 845//2129 844//2130 -f 1405//2131 746//2132 490//2133 489//2134 668//2135 667//2136 -f 1406//2137 876//2138 875//2139 498//2140 497//2141 753//2142 -f 1406//2143 753//2144 752//2145 423//2146 422//2147 682//2148 -f 1155//2149 424//2150 423//2151 752//2152 751//2153 1407//2154 -f 1407//2155 751//2156 750//2157 1408//2158 851//2159 850//2160 -f 1408//2161 750//2162 496//2163 495//2164 672//2165 671//2166 -f 1409//2167 880//2168 879//2169 504//2170 503//2171 757//2172 -f 1409//2173 757//2174 756//2175 429//2176 428//2177 662//2178 -f 1161//2179 430//2180 429//2181 756//2182 755//2183 1410//2184 -f 1410//2185 755//2186 754//2187 1411//2188 857//2189 856//2190 -f 1411//2191 754//2192 502//2193 501//2194 656//2195 655//2196 -f 1412//2197 889//2198 888//2199 510//2200 509//2201 761//2202 -f 1412//2203 761//2204 760//2205 153//2206 152//2207 704//2208 -f 1205//2209 154//2210 153//2211 760//2212 759//2213 1413//2214 -f 1413//2215 759//2216 758//2217 1414//2218 884//2219 883//2220 -f 1414//2221 758//2222 508//2223 507//2224 702//2225 701//2226 -f 1415//2227 920//2228 919//2229 516//2230 515//2231 765//2232 -f 1415//2233 765//2234 764//2235 225//2236 224//2237 1263//2238 -f 1217//2239 226//2240 225//2241 764//2242 763//2243 1416//2244 -f 1416//2245 763//2246 762//2247 1417//2248 893//2249 892//2250 -f 1417//2251 762//2252 514//2253 513//2254 676//2255 675//2256 -f 1418//2257 924//2258 923//2259 522//2260 521//2261 769//2262 -f 1418//2263 769//2264 768//2265 231//2266 230//2267 1273//2268 -f 1223//2269 232//2270 231//2271 768//2272 767//2273 1419//2274 -f 1419//2275 767//2276 766//2277 1420//2278 899//2279 898//2280 -f 1420//2281 766//2282 520//2283 519//2284 680//2285 679//2286 -f 1421//2287 928//2288 927//2289 528//2290 527//2291 773//2292 -f 1421//2293 773//2294 772//2295 441//2296 440//2297 666//2298 -f 1229//2299 442//2300 441//2301 772//2302 771//2303 1422//2304 -f 1422//2305 771//2306 770//2307 1423//2308 905//2309 904//2310 -f 1423//2311 770//2312 526//2313 525//2314 660//2315 659//2316 -f 1424//2317 936//2318 935//2319 534//2320 533//2321 777//2322 -f 1424//2323 777//2324 776//2325 159//2326 158//2327 1278//2328 -f 1283//2329 160//2330 159//2331 776//2332 775//2333 1425//2334 -f 1425//2335 775//2336 774//2337 1426//2338 932//2339 931//2340 -f 1426//2341 774//2342 532//2343 531//2344 706//2345 705//2346 -f 974//2347 973//2348 540//2349 539//2350 781//2351 1427//2352 -f 1427//2353 781//2354 780//2355 453//2356 452//2357 1373//2358 -f 1314//2359 454//2360 453//2361 780//2362 779//2363 1428//2364 -f 1428//2365 779//2366 778//2367 1429//2368 949//2369 948//2370 -f 1429//2371 778//2372 538//2373 537//2374 664//2375 663//2376 -f 1430//2377 1003//2378 1002//2379 546//2380 545//2381 785//2382 -f 1430//2383 785//2384 784//2385 1431//2386 694//2387 693//2388 -f 1431//2389 784//2390 783//2391 1432//2392 1372//2393 1371//2394 -f 969//2395 974//2396 1427//2397 1373//2398 1372//2399 1432//2400 -f 1432//2401 783//2402 782//2403 1433//2404 970//2405 969//2406 -f 1433//2407 782//2408 544//2409 543//2410 1376//2411 1375//2412 -f 1379//2413 243//2414 242//2415 551//2416 789//2417 1434//2418 -f 1434//2419 789//2420 788//2421 1435//2422 976//2423 975//2424 -f 1435//2425 788//2426 787//2427 435//2428 434//2429 1279//2430 -f 1291//2431 436//2432 435//2433 787//2434 786//2435 1436//2436 -f 1436//2437 786//2438 550//2439 549//2440 981//2441 984//2442 -f 1597//2443 1437//2444 1438//2445 1439//2446 1440//2447 1441//2448 -f 1442//2449 711//2450 240//2451 245//2452 552//2453 791//2454 -f 255//2455 254//2456 1026//2457 1442//2458 791//2459 790//2460 -f 255//2461 790//2462 792//2463 1396//2464 709//2465 256//2466 -f 1016//2467 1015//2468 1443//2469 1441//2470 1440//2471 1444//2472 -f 1020//2473 1019//2474 483//2475 482//2476 1016//2477 1444//2478 -f 1444//2479 1440//2480 1439//2481 1445//2482 1021//2483 1020//2484 -f 1445//2485 1439//2486 1438//2487 1446//2488 1024//2489 1023//2490 -f 1446//2491 1438//2492 1437//2493 1596//2494 1028//2495 1027//2496 -f 1031//2497 1030//2498 1388//2499 794//2500 793//2501 1447//2502 -f 1034//2503 1033//2504 1447//2505 793//2506 798//2507 1448//2508 -f 1448//2509 798//2510 797//2511 1449//2512 1039//2513 1038//2514 -f 1043//2515 1042//2516 1449//2517 797//2518 796//2519 1450//2520 -f 1450//2521 796//2522 795//2523 1389//2524 1045//2525 1048//2526 -f 1051//2527 1050//2528 1391//2529 800//2530 799//2531 1451//2532 -f 1054//2533 1053//2534 1451//2535 799//2536 804//2537 1452//2538 -f 1452//2539 804//2540 803//2541 1453//2542 1059//2543 1058//2544 -f 1062//2545 1061//2546 1453//2547 803//2548 802//2549 1454//2550 -f 1454//2551 802//2552 801//2553 1392//2554 1064//2555 1067//2556 -f 1070//2557 1069//2558 1394//2559 806//2560 805//2561 1455//2562 -f 1073//2563 1072//2564 1455//2565 805//2566 810//2567 1456//2568 -f 1456//2569 810//2570 809//2571 1457//2572 1078//2573 1077//2574 -f 1081//2575 1080//2576 1457//2577 809//2578 808//2579 1458//2580 -f 1458//2581 808//2582 807//2583 1395//2584 1083//2585 1086//2586 -f 1091//2587 1090//2588 1398//2589 812//2590 811//2591 1459//2592 -f 1095//2593 1094//2594 1459//2595 811//2596 816//2597 1460//2598 -f 1460//2599 816//2600 815//2601 1461//2602 1098//2603 1097//2604 -f 1461//2605 815//2606 814//2607 1462//2608 1100//2609 1103//2610 -f 1462//2611 814//2612 813//2613 1399//2614 1104//2615 1107//2616 -f 1110//2617 316//2618 315//2619 556//2620 820//2621 1463//2622 -f 1113//2623 1112//2624 1463//2625 820//2626 819//2627 1464//2628 -f 1117//2629 1116//2630 1464//2631 819//2632 818//2633 1465//2634 -f 1465//2635 818//2636 817//2637 390//2638 395//2639 1011//2640 -f 1036//2641 391//2642 390//2643 817//2644 555//2645 554//2646 -f 1466//2647 1120//2648 322//2649 321//2650 561//2651 822//2652 -f 669//2653 668//2654 489//2655 488//2656 1123//2657 1467//2658 -f 1467//2659 1123//2660 1122//2661 1466//2662 822//2663 821//2664 -f 1467//2665 821//2666 824//2667 1387//2668 670//2669 669//2670 -f 1057//2671 462//2672 461//2673 823//2674 560//2675 559//2676 -f 1468//2677 1126//2678 328//2679 327//2680 565//2681 826//2682 -f 673//2683 672//2684 495//2685 494//2686 1129//2687 1469//2688 -f 1469//2689 1129//2690 1128//2691 1468//2692 826//2693 825//2694 -f 1469//2695 825//2696 828//2697 1390//2698 674//2699 673//2700 -f 1076//2701 468//2702 467//2703 827//2704 564//2705 563//2706 -f 1470//2707 1132//2708 166//2709 165//2710 566//2711 830//2712 -f 657//2713 656//2714 501//2715 500//2716 1135//2717 1471//2718 -f 1471//2719 1135//2720 1134//2721 1470//2722 830//2723 829//2724 -f 1471//2725 829//2726 832//2727 1393//2728 658//2729 657//2730 -f 654//2731 474//2732 473//2733 831//2734 569//2735 568//2736 -f 1138//2737 1137//2738 1401//2739 835//2740 834//2741 1472//2742 -f 1141//2743 1140//2744 1472//2745 834//2746 833//2747 1473//2748 -f 1088//2749 1087//2750 1473//2751 833//2752 838//2753 1474//2754 -f 707//2755 710//2756 1397//2757 1089//2758 1088//2759 1474//2760 -f 1474//2761 838//2762 837//2763 1475//2764 708//2765 707//2766 -f 1475//2767 837//2768 836//2769 1402//2770 1018//2771 1017//2772 -f 1144//2773 40//2774 39//2775 570//2776 839//2777 1476//2778 -f 699//2779 702//2780 507//2781 506//2782 1147//2783 1477//2784 -f 1477//2785 1147//2786 1146//2787 1476//2788 839//2789 842//2790 -f 1477//2791 842//2792 841//2793 1400//2794 700//2795 699//2796 -f 260//2797 487//2798 486//2799 840//2800 571//2801 261//2802 -f 1150//2803 1149//2804 1404//2805 844//2806 843//2807 1478//2808 -f 1153//2809 1152//2810 1478//2811 843//2812 848//2813 1479//2814 -f 1479//2815 848//2816 847//2817 1480//2818 1109//2819 1108//2820 -f 1480//2821 847//2822 846//2823 396//2824 401//2825 1029//2826 -f 396//2827 846//2828 845//2829 1405//2830 667//2831 397//2832 -f 1156//2833 1155//2834 1407//2835 850//2836 849//2837 1481//2838 -f 1159//2839 1158//2840 1481//2841 849//2842 854//2843 1482//2844 -f 1482//2845 854//2846 853//2847 1483//2848 1119//2849 1118//2850 -f 1483//2851 853//2852 852//2853 402//2854 407//2855 1049//2856 -f 402//2857 852//2858 851//2859 1408//2860 671//2861 403//2862 -f 1162//2863 1161//2864 1410//2865 856//2866 855//2867 1484//2868 -f 1165//2869 1164//2870 1484//2871 855//2872 860//2873 1485//2874 -f 1485//2875 860//2876 859//2877 1486//2878 1125//2879 1124//2880 -f 1486//2881 859//2882 858//2883 408//2884 413//2885 1068//2886 -f 408//2887 858//2888 857//2889 1411//2890 655//2891 409//2892 -f 1168//2893 100//2894 99//2895 572//2896 861//2897 1487//2898 -f 1172//2899 1171//2900 1487//2901 861//2902 864//2903 1488//2904 -f 1488//2905 864//2906 863//2907 1489//2908 1175//2909 1174//2910 -f 1489//2911 863//2912 862//2913 1490//2914 1131//2915 1130//2916 -f 1490//2917 862//2918 573//2919 333//2920 332//2921 1093//2922 -f 1178//2923 340//2924 339//2925 575//2926 868//2927 1491//2928 -f 1181//2929 1180//2930 1491//2931 868//2932 867//2933 1492//2934 -f 1185//2935 1184//2936 1492//2937 867//2938 866//2939 1493//2940 -f 1493//2941 866//2942 865//2943 1494//2944 1143//2945 1142//2946 -f 188//2947 1115//2948 1494//2949 865//2950 574//2951 189//2952 -f 1495//2953 1188//2954 346//2955 345//2956 577//2957 870//2958 -f 677//2959 676//2960 513//2961 512//2962 1191//2963 1496//2964 -f 1496//2965 1191//2966 1190//2967 1495//2968 870//2969 869//2970 -f 1496//2971 869//2972 872//2973 1403//2974 678//2975 677//2976 -f 86//2977 493//2978 492//2979 871//2980 576//2981 87//2982 -f 1497//2983 1194//2984 352//2985 351//2986 579//2987 874//2988 -f 681//2989 680//2990 519//2991 518//2992 1197//2993 1498//2994 -f 1498//2995 1197//2996 1196//2997 1497//2998 874//2999 873//3000 -f 1498//3001 873//3002 876//3003 1406//3004 682//3005 681//3006 -f 92//3007 499//3008 498//3009 875//3010 578//3011 93//3012 -f 1499//3013 1200//3014 172//3015 171//3016 580//3017 878//3018 -f 661//3019 660//3020 525//3021 524//3022 1203//3023 1500//3024 -f 1500//3025 1203//3026 1202//3027 1499//3028 878//3029 877//3030 -f 1500//3031 877//3032 880//3033 1409//3034 662//3035 661//3036 -f 44//3037 505//3038 504//3039 879//3040 581//3041 45//3042 -f 1206//3043 1205//3044 1413//3045 883//3046 882//3047 1501//3048 -f 1209//3049 1208//3050 1501//3051 882//3052 881//3053 1502//3054 -f 1167//3055 1166//3056 1502//3057 881//3058 886//3059 1503//3060 -f 1503//3061 886//3062 885//3063 144//3064 149//3065 1136//3066 -f 144//3067 885//3068 884//3069 1414//3070 701//3071 145//3072 -f 1212//3073 52//3074 51//3075 582//3076 887//3077 1504//3078 -f 703//3079 706//3080 531//3081 530//3082 1215//3083 1505//3084 -f 1505//3085 1215//3086 1214//3087 1504//3088 887//3089 890//3090 -f 1505//3091 890//3092 889//3093 1412//3094 704//3095 703//3096 -f 266//3097 511//3098 510//3099 888//3100 583//3101 267//3102 -f 1218//3103 1217//3104 1416//3105 892//3106 891//3107 1506//3108 -f 1221//3109 1220//3110 1506//3111 891//3112 896//3113 1507//3114 -f 1507//3115 896//3116 895//3117 1508//3118 1177//3119 1176//3120 -f 1508//3121 895//3122 894//3123 414//3124 419//3125 1148//3126 -f 414//3127 894//3128 893//3129 1417//3130 675//3131 415//3132 -f 1224//3133 1223//3134 1419//3135 898//3136 897//3137 1509//3138 -f 1227//3139 1226//3140 1509//3141 897//3142 902//3143 1510//3144 -f 1510//3145 902//3146 901//3147 1511//3148 1187//3149 1186//3150 -f 1511//3151 901//3152 900//3153 420//3154 425//3155 1154//3156 -f 420//3157 900//3158 899//3159 1420//3160 679//3161 421//3162 -f 1230//3163 1229//3164 1422//3165 904//3166 903//3167 1512//3168 -f 1233//3169 1232//3170 1512//3171 903//3172 908//3173 1513//3174 -f 1513//3175 908//3176 907//3177 1514//3178 1193//3179 1192//3180 -f 1514//3181 907//3182 906//3183 426//3184 431//3185 1160//3186 -f 426//3187 906//3188 905//3189 1423//3190 659//3191 427//3192 -f 1236//3193 118//3194 117//3195 584//3196 909//3197 1515//3198 -f 1240//3199 1239//3200 1515//3201 909//3202 912//3203 1516//3204 -f 1516//3205 912//3206 911//3207 1517//3208 1243//3209 1242//3210 -f 1517//3211 911//3212 910//3213 1518//3214 1199//3215 1198//3216 -f 1518//3217 910//3218 585//3219 357//3220 356//3221 1170//3222 -f 1246//3223 364//3224 363//3225 587//3226 916//3227 1519//3228 -f 1249//3229 1248//3230 1519//3231 916//3232 915//3233 1520//3234 -f 1253//3235 1252//3236 1520//3237 915//3238 914//3239 1521//3240 -f 1521//3241 914//3242 913//3243 1522//3244 1211//3245 1210//3246 -f 194//3247 1183//3248 1522//3249 913//3250 586//3251 195//3252 -f 1523//3253 1256//3254 370//3255 369//3256 589//3257 918//3258 -f 1259//3259 1258//3260 1523//3261 918//3262 917//3263 1524//3264 -f 1524//3265 917//3266 920//3267 1415//3268 1263//3269 1262//3270 -f 104//3271 517//3272 516//3273 919//3274 588//3275 105//3276 -f 1525//3277 1266//3278 376//3279 375//3280 591//3281 922//3282 -f 1269//3283 1268//3284 1525//3285 922//3286 921//3287 1526//3288 -f 1526//3289 921//3290 924//3291 1418//3292 1273//3293 1272//3294 -f 110//3295 523//3296 522//3297 923//3298 590//3299 111//3300 -f 1527//3301 1276//3302 178//3303 177//3304 592//3305 926//3306 -f 665//3307 664//3308 537//3309 536//3310 1281//3311 1528//3312 -f 1528//3313 1281//3314 1280//3315 1527//3316 926//3317 925//3318 -f 1528//3319 925//3320 928//3321 1421//3322 666//3323 665//3324 -f 56//3325 529//3326 528//3327 927//3328 593//3329 57//3330 -f 1284//3331 1283//3332 1425//3333 931//3334 930//3335 1529//3336 -f 1287//3337 1286//3338 1529//3339 930//3340 929//3341 1530//3342 -f 1235//3343 1234//3344 1530//3345 929//3346 934//3347 1531//3348 -f 1531//3349 934//3350 933//3351 150//3352 155//3353 1204//3354 -f 150//3355 933//3356 932//3357 1426//3358 705//3359 151//3360 -f 1532//3361 1288//3362 64//3363 63//3364 595//3365 938//3366 -f 437//3367 1290//3368 1532//3369 938//3370 937//3371 432//3372 -f 432//3373 937//3374 936//3375 1424//3376 1278//3377 433//3378 -f 272//3379 535//3380 534//3381 935//3382 594//3383 273//3384 -f 1533//3385 1295//3386 280//3387 279//3388 597//3389 942//3390 -f 1298//3391 1297//3392 1533//3393 942//3394 941//3395 1534//3396 -f 1534//3397 941//3398 940//3399 1535//3400 1302//3401 1301//3402 -f 1535//3403 940//3404 939//3405 1536//3406 1245//3407 1244//3408 -f 1536//3409 939//3410 596//3411 222//3412 227//3413 1216//3414 -f 1537//3415 1305//3416 286//3417 285//3418 599//3419 946//3420 -f 1537//3421 946//3422 945//3423 1538//3424 1308//3425 1307//3426 -f 1312//3427 1311//3428 1538//3429 945//3430 944//3431 1539//3432 -f 1539//3433 944//3434 943//3435 1540//3436 1255//3437 1254//3438 -f 1540//3439 943//3440 598//3441 228//3442 233//3443 1222//3444 -f 1315//3445 1314//3446 1428//3447 948//3448 947//3449 1541//3450 -f 1318//3451 1317//3452 1541//3453 947//3454 952//3455 1542//3456 -f 1542//3457 952//3458 951//3459 1543//3460 1265//3461 1264//3462 -f 1543//3463 951//3464 950//3465 438//3466 443//3467 1228//3468 -f 438//3469 950//3470 949//3471 1429//3472 663//3473 439//3474 -f 1319//3475 136//3476 135//3477 600//3478 956//3479 1544//3480 -f 1544//3481 956//3482 955//3483 1545//3484 1325//3485 1324//3486 -f 1545//3487 955//3488 954//3489 1546//3490 1328//3491 1327//3492 -f 1546//3493 954//3494 953//3495 1547//3496 1275//3497 1274//3498 -f 1547//3499 953//3500 601//3501 381//3502 380//3503 1238//3504 -f 201//3505 200//3506 1251//3507 603//3508 602//3509 960//3510 -f 201//3511 960//3512 959//3513 207//3514 206//3515 202//3516 -f 207//3517 959//3518 958//3519 1548//3520 1329//3521 208//3522 -f 1335//3523 1334//3524 1548//3525 958//3526 957//3527 1549//3528 -f 1549//3529 957//3530 607//3531 606//3532 646//3533 1340//3534 -f 1550//3535 1343//3536 214//3537 213//3538 608//3539 962//3540 -f 1551//3541 1349//3542 1348//3543 1550//3544 962//3545 961//3546 -f 1355//3547 1354//3548 1551//3549 961//3550 964//3551 1552//3552 -f 1552//3553 964//3554 963//3555 1553//3556 1294//3557 1293//3558 -f 1553//3559 963//3560 609//3561 123//3562 122//3563 1261//3564 -f 1554//3565 1359//3566 388//3567 387//3568 611//3569 968//3570 -f 1554//3571 968//3572 967//3573 1555//3574 1363//3575 1362//3576 -f 1369//3577 1368//3578 1555//3579 967//3580 966//3581 1556//3582 -f 1556//3583 966//3584 965//3585 1557//3586 1304//3587 1303//3588 -f 1557//3589 965//3590 610//3591 129//3592 128//3593 1271//3594 -f 68//3595 541//3596 540//3597 973//3598 972//3599 69//3600 -f 69//3601 972//3602 971//3603 249//3604 248//3605 70//3606 -f 249//3607 971//3608 970//3609 1433//3610 1375//3611 250//3612 -f 1380//3613 1379//3614 1434//3615 975//3616 980//3617 1558//3618 -f 1558//3619 980//3620 979//3621 1559//3622 1383//3623 1382//3624 -f 1322//3625 1321//3626 1559//3627 979//3628 978//3629 1560//3630 -f 1560//3631 978//3632 977//3633 156//3634 161//3635 1282//3636 -f 156//3637 977//3638 976//3639 1435//3640 1279//3641 157//3642 -f 10//3643 612//3644 981//3645 549//3646 548//3647 11//3648 -f 1292//3649 1291//3650 1436//3651 984//3652 983//3653 1561//3654 -f 1341//3655 649//3656 648//3657 1289//3658 1292//3659 1561//3660 -f 1561//3661 983//3662 982//3663 1562//3664 1342//3665 1341//3666 -f 1562//3667 982//3668 613//3669 444//3670 449//3671 713//3672 -f 182//3673 1041//3674 618//3675 617//3676 988//3677 183//3678 -f 183//3679 988//3680 987//3681 1385//3682 1037//3683 184//3684 -f 714//3685 459//3686 458//3687 986//3688 985//3689 1563//3690 -f 1339//3691 1342//3692 1562//3693 713//3694 712//3695 1564//3696 -f 1563//3697 985//3698 616//3699 615//3700 1338//3701 1337//3702 -f 1333//3703 1338//3704 615//3705 614//3706 683//3707 1565//3708 -f 1566//3709 684//3710 298//3711 297//3712 620//3713 992//3714 -f 1332//3715 1331//3716 1566//3717 992//3718 991//3719 1567//3720 -f 236//3721 1300//3722 1567//3723 991//3724 990//3725 237//3726 -f 237//3727 990//3728 989//3729 1568//3730 1356//3731 238//3732 -f 1568//3733 989//3734 623//3735 622//3736 718//3737 717//3738 -f 1047//3739 1046//3740 464//3741 463//3742 1056//3743 1569//3744 -f 1569//3745 1056//3746 76//3747 75//3748 627//3749 1570//3750 -f 1353//3751 1356//3752 1568//3753 717//3754 716//3755 1572//3756 -f 1576//3757 1573//3758 1574//3759 1575//3760 1352//3761 1351//3762 -f 687//3763 686//3764 1575//3765 1574//3766 626//3767 625//3768 -f 1577//3769 688//3770 304//3771 303//3772 628//3773 996//3774 -f 1347//3775 1352//3776 1575//3777 686//3778 685//3779 1578//3780 -f 1577//3781 996//3782 995//3783 1579//3784 1346//3785 1345//3786 -f 1579//3787 995//3788 994//3789 141//3790 140//3791 1310//3792 -f 141//3793 994//3794 993//3795 1580//3796 1370//3797 142//3798 -f 1580//3799 993//3800 631//3801 630//3802 722//3803 721//3804 -f 1066//3805 1065//3806 470//3807 469//3808 1075//3809 1581//3810 -f 1581//3811 1075//3812 82//3813 81//3814 635//3815 1582//3816 -f 22//3817 21//3818 1066//3819 1581//3820 1582//3821 1598//3822 -f 1367//3823 1370//3824 1580//3825 721//3826 720//3827 1583//3828 -f 1600//3829 1584//3830 1585//3831 1586//3832 1366//3833 1365//3834 -f 691//3835 690//3836 1586//3837 1585//3838 634//3839 633//3840 -f 1587//3841 692//3842 310//3843 309//3844 636//3845 998//3846 -f 1361//3847 1366//3848 1586//3849 690//3850 689//3851 1588//3852 -f 1587//3853 998//3854 997//3855 1589//3856 1358//3857 1357//3858 -f 455//3859 1313//3860 1589//3861 997//3862 1000//3863 450//3864 -f 1374//3865 451//3866 450//3867 1000//3868 999//3869 1590//3870 -f 695//3871 694//3872 1431//3873 1371//3874 1374//3875 1590//3876 -f 1590//3877 999//3878 639//3879 638//3880 696//3881 695//3882 -f 697//3883 547//3884 546//3885 1002//3886 1001//3887 1591//3888 -f 33//3889 32//3890 1102//3891 1591//3892 1001//3893 1006//3894 -f 33//3895 1006//3896 1005//3897 1592//3898 653//3899 34//3900 -f 1085//3901 1084//3902 476//3903 475//3904 653//3905 1592//3906 -f 1592//3907 1005//3908 1004//3909 27//3910 26//3911 1085//3912 -f 27//3913 1004//3914 1003//3915 1430//3916 693//3917 28//3918 -f 218//3919 1323//3920 643//3921 642//3922 1010//3923 219//3924 -f 219//3925 1010//3926 1009//3927 1593//3928 1384//3929 220//3930 -f 1377//3931 652//3932 651//3933 1381//3934 1384//3935 1593//3936 -f 1593//3937 1009//3938 1008//3939 1594//3940 1378//3941 1377//3942 -f 1106//3943 1105//3944 479//3945 478//3946 1378//3947 1594//3948 -f 1594//3949 1008//3950 1007//3951 291//3952 290//3953 1106//3954 -f 640//3955 645//3956 1376//3957 543//3958 542//3959 698//3960 -f 698//3961 292//3962 291//3963 1007//3964 641//3965 640//3966 -f 263//3967 1117//3968 1465//3969 1011//3970 1014//3971 258//3972 -f 258//3973 1014//3974 1013//3975 1443//3976 1015//3977 259//3978 -f 257//3979 708//3980 1475//3981 1017//3982 1022//3983 252//3984 -f 252//3985 1022//3986 1021//3987 1445//3988 1023//3989 253//3990 -f 12//3991 711//3992 1442//3993 1026//3994 1025//3995 7//3996 -f 7//3997 1025//3998 1024//3999 1446//4000 1027//4001 8//4002 -f 317//4003 1109//4004 1480//4005 1029//4006 1032//4007 312//4008 -f 312//4009 1032//4010 1031//4011 1447//4012 1033//4013 313//4014 -f 185//4015 1036//4016 554//4017 557//4018 1035//4019 180//4020 -f 180//4021 1035//4022 1034//4023 1448//4024 1038//4025 181//4026 -f 299//4027 619//4028 618//4029 1041//4030 1040//4031 294//4032 -f 294//4033 1040//4034 1039//4035 1449//4036 1042//4037 295//4038 -f 18//4039 718//4040 622//4041 621//4042 1044//4043 13//4044 -f 13//4045 1044//4046 1043//4047 1450//4048 1048//4049 14//4050 -f 323//4051 1119//4052 1483//4053 1049//4054 1052//4055 318//4056 -f 318//4057 1052//4058 1051//4059 1451//4060 1053//4061 319//4062 -f 77//4063 1057//4064 559//4065 558//4066 1055//4067 72//4068 -f 72//4069 1055//4070 1054//4071 1452//4072 1058//4073 73//4074 -f 305//4075 687//4076 625//4077 624//4078 1060//4079 300//4080 -f 300//4081 1060//4082 1059//4083 1453//4084 1061//4085 301//4086 -f 23//4087 722//4088 630//4089 629//4090 1063//4091 19//4092 -f 19//4093 1063//4094 1062//4095 1454//4096 1067//4097 20//4098 -f 329//4099 1125//4100 1486//4101 1068//4102 1071//4103 324//4104 -f 324//4105 1071//4106 1070//4107 1455//4108 1072//4109 325//4110 -f 83//4111 1076//4112 563//4113 562//4114 1074//4115 78//4116 -f 78//4117 1074//4118 1073//4119 1456//4120 1077//4121 79//4122 -f 311//4123 691//4124 633//4125 632//4126 1079//4127 306//4128 -f 306//4129 1079//4130 1078//4131 1457//4132 1080//4133 307//4134 -f 29//4135 696//4136 638//4137 637//4138 1082//4139 24//4140 -f 24//4141 1082//4142 1081//4143 1458//4144 1086//4145 25//4146 -f 335//4147 1141//4148 1473//4149 1087//4150 1092//4151 330//4152 -f 330//4153 1092//4154 1091//4155 1459//4156 1094//4157 331//4158 -f 167//4159 1131//4160 1490//4161 1093//4162 1096//4163 162//4164 -f 162//4165 1096//4166 1095//4167 1460//4168 1097//4169 163//4170 -f 35//4171 654//4172 568//4173 567//4174 1099//4175 30//4176 -f 30//4177 1099//4178 1098//4179 1461//4180 1103//4181 31//4182 -f 293//4183 697//4184 1591//4185 1102//4186 1101//4187 288//4188 -f 288//4189 1101//4190 1100//4191 1462//4192 1107//4193 289//4194 -f 191//4195 1153//4196 1479//4197 1108//4198 1111//4199 186//4200 -f 186//4201 1111//4202 1110//4203 1463//4204 1112//4205 187//4206 -f 41//4207 1143//4208 1494//4209 1115//4210 1114//4211 36//4212 -f 36//4213 1114//4214 1113//4215 1464//4216 1116//4217 37//4218 -f 89//4219 1159//4220 1482//4221 1118//4222 1121//4223 84//4224 -f 84//4225 1121//4226 1120//4227 1466//4228 1122//4229 85//4230 -f 95//4231 1165//4232 1485//4233 1124//4234 1127//4235 90//4236 -f 90//4237 1127//4238 1126//4239 1468//4240 1128//4241 91//4242 -f 47//4243 1175//4244 1489//4245 1130//4246 1133//4247 42//4248 -f 42//4249 1133//4250 1132//4251 1470//4252 1134//4253 43//4254 -f 101//4255 1167//4256 1503//4257 1136//4258 1139//4259 96//4260 -f 96//4261 1139//4262 1138//4263 1472//4264 1140//4265 97//4266 -f 269//4267 1185//4268 1493//4269 1142//4270 1145//4271 264//4272 -f 264//4273 1145//4274 1144//4275 1476//4276 1146//4277 265//4278 -f 341//4279 1177//4280 1508//4281 1148//4282 1151//4283 336//4284 -f 336//4285 1151//4286 1150//4287 1478//4288 1152//4289 337//4290 -f 347//4291 1187//4292 1511//4293 1154//4294 1157//4295 342//4296 -f 342//4297 1157//4298 1156//4299 1481//4300 1158//4301 343//4302 -f 353//4303 1193//4304 1514//4305 1160//4306 1163//4307 348//4308 -f 348//4309 1163//4310 1162//4311 1484//4312 1164//4313 349//4314 -f 359//4315 1209//4316 1502//4317 1166//4318 1169//4319 354//4320 -f 354//4321 1169//4322 1168//4323 1487//4324 1171//4325 355//4326 -f 173//4327 1199//4328 1518//4329 1170//4330 1173//4331 168//4332 -f 168//4333 1173//4334 1172//4335 1488//4336 1174//4337 169//4338 -f 197//4339 1221//4340 1507//4341 1176//4342 1179//4343 192//4344 -f 192//4345 1179//4346 1178//4347 1491//4348 1180//4349 193//4350 -f 53//4351 1211//4352 1522//4353 1183//4354 1182//4355 48//4356 -f 48//4357 1182//4358 1181//4359 1492//4360 1184//4361 49//4362 -f 107//4363 1227//4364 1510//4365 1186//4366 1189//4367 102//4368 -f 102//4369 1189//4370 1188//4371 1495//4372 1190//4373 103//4374 -f 113//4375 1233//4376 1513//4377 1192//4378 1195//4379 108//4380 -f 108//4381 1195//4382 1194//4383 1497//4384 1196//4385 109//4386 -f 59//4387 1243//4388 1517//4389 1198//4390 1201//4391 54//4392 -f 54//4393 1201//4394 1200//4395 1499//4396 1202//4397 55//4398 -f 119//4399 1235//4400 1531//4401 1204//4402 1207//4403 114//4404 -f 114//4405 1207//4406 1206//4407 1501//4408 1208//4409 115//4410 -f 275//4411 1253//4412 1521//4413 1210//4414 1213//4415 270//4416 -f 270//4417 1213//4418 1212//4419 1504//4420 1214//4421 271//4422 -f 365//4423 1245//4424 1536//4425 1216//4426 1219//4427 360//4428 -f 360//4429 1219//4430 1218//4431 1506//4432 1220//4433 361//4434 -f 371//4435 1255//4436 1540//4437 1222//4438 1225//4439 366//4440 -f 366//4441 1225//4442 1224//4443 1509//4444 1226//4445 367//4446 -f 377//4447 1265//4448 1543//4449 1228//4450 1231//4451 372//4452 -f 372//4453 1231//4454 1230//4455 1512//4456 1232//4457 373//4458 -f 383//4459 1287//4460 1530//4461 1234//4462 1237//4463 378//4464 -f 378//4465 1237//4466 1236//4467 1515//4468 1239//4469 379//4470 -f 179//4471 1275//4472 1547//4473 1238//4474 1241//4475 174//4476 -f 174//4477 1241//4478 1240//4479 1516//4480 1242//4481 175//4482 -f 203//4483 1302//4484 1535//4485 1244//4486 1247//4487 198//4488 -f 198//4489 1247//4490 1246//4491 1519//4492 1248//4493 199//4494 -f 65//4495 604//4496 603//4497 1251//4498 1250//4499 60//4500 -f 60//4501 1250//4502 1249//4503 1520//4504 1252//4505 61//4506 -f 125//4507 1312//4508 1539//4509 1254//4510 1257//4511 120//4512 -f 120//4513 1257//4514 1256//4515 1523//4516 1258//4517 121//4518 -f 281//4519 1294//4520 1553//4521 1261//4522 1260//4523 276//4524 -f 276//4525 1260//4526 1259//4527 1524//4528 1262//4529 277//4530 -f 131//4531 1318//4532 1542//4533 1264//4534 1267//4535 126//4536 -f 126//4537 1267//4538 1266//4539 1525//4540 1268//4541 127//4542 -f 287//4543 1304//4544 1557//4545 1271//4546 1270//4547 282//4548 -f 282//4549 1270//4550 1269//4551 1526//4552 1272//4553 283//4554 -f 71//4555 1328//4556 1546//4557 1274//4558 1277//4559 66//4560 -f 66//4561 1277//4562 1276//4563 1527//4564 1280//4565 67//4566 -f 137//4567 1322//4568 1560//4569 1282//4570 1285//4571 132//4572 -f 132//4573 1285//4574 1284//4575 1529//4576 1286//4577 133//4578 -f 648//4579 647//4580 1288//4581 1532//4582 1290//4583 1289//4584 -f 239//4585 1355//4586 1552//4587 1293//4588 1296//4589 234//4590 -f 234//4591 1296//4592 1295//4593 1533//4594 1297//4595 235//4596 -f 209//4597 1332//4598 1567//4599 1300//4600 1299//4601 204//4602 -f 204//4603 1299//4604 1298//4605 1534//4606 1301//4607 205//4608 -f 143//4609 1369//4610 1556//4611 1303//4612 1306//4613 138//4614 -f 138//4615 1306//4616 1305//4617 1537//4618 1307//4619 139//4620 -f 215//4621 1346//4622 1579//4623 1310//4624 1309//4625 210//4626 -f 210//4627 1309//4628 1308//4629 1538//4630 1311//4631 211//4632 -f 389//4633 1358//4634 1589//4635 1313//4636 1316//4637 384//4638 -f 384//4639 1316//4640 1315//4641 1541//4642 1317//4643 385//4644 -f 221//4645 1383//4646 1559//4647 1321//4648 1320//4649 216//4650 -f 216//4651 1320//4652 1319//4653 1544//4654 1324//4655 217//4656 -f 251//4657 644//4658 643//4659 1323//4660 1326//4661 246//4662 -f 246//4663 1326//4664 1325//4665 1545//4666 1327//4667 247//4668 -f 1565//4669 683//4670 684//4671 1566//4672 1331//4673 1330//4674 -f 1565//4675 1330//4676 1329//4677 1548//4678 1334//4679 1333//4680 -f 1564//4681 712//4682 714//4683 1563//4684 1337//4685 1336//4686 -f 1564//4687 1336//4688 1335//4689 1549//4690 1340//4691 1339//4692 -f 1578//4693 685//4694 688//4695 1577//4696 1345//4697 1344//4698 -f 1578//4699 1344//4700 1343//4701 1550//4702 1348//4703 1347//4704 -f 1572//4705 1350//4706 1349//4707 1551//4708 1354//4709 1353//4710 -f 1588//4711 689//4712 692//4713 1587//4714 1357//4715 1360//4716 -f 1588//4717 1360//4718 1359//4719 1554//4720 1362//4721 1361//4722 -f 1583//4723 1364//4724 1363//4725 1555//4726 1368//4727 1367//4728 -f 651//4729 650//4730 1380//4731 1558//4732 1382//4733 1381//4734 -f 1570//4735 627//4736 626//4737 1574//4738 1573//4739 1571//4740 -f 1582//4741 635//4742 634//4743 1585//4744 1584//4745 1598//4746 -f 1012//4747 394//4748 393//4749 724//4750 1595//4751 1386//4752 -f 1597//4753 1386//4754 1595//4755 723//4756 1596//4757 1437//4758 -f 1013//4759 1012//4760 1386//4761 1597//4762 1441//4763 1443//4764 -f 16//4765 15//4766 1047//4767 1569//4768 1570//4769 1571//4770 -f 1573//4771 1576//4772 715//4773 17//4774 16//4775 1571//4776 -f 1572//4777 716//4778 715//4779 1576//4780 1351//4781 1350//4782 -f 19//4783 20//4784 21//4785 22//4786 1599//4787 23//4788 -f 719//4789 720//4790 721//4791 722//4792 23//4793 1599//4794 -f 1583//4795 720//4796 719//4797 1600//4798 1365//4799 1364//4800 diff --git a/topmodx/objs/genus3hexa1.obj b/topmodx/objs/genus3hexa1.obj deleted file mode 100644 index 6085c8e..0000000 --- a/topmodx/objs/genus3hexa1.obj +++ /dev/null @@ -1,744 +0,0 @@ -# This file uses centimeters as units for non-parametric coordinates. - -mtllib genus3hexa1.mtl -g default -v 0.097765 -0.303118 -0.595217 -v -0.151551 -0.238491 -0.572297 -v -0.275098 -0.350531 -0.647889 -v -0.171862 -0.550763 -0.627727 -v -0.116483 -0.613732 -0.522954 -v 0.022329 -0.533413 -0.577108 -v -0.457082 0.524198 -0.243390 -v -0.337258 0.547620 -0.252257 -v -0.371244 0.422314 -0.230910 -v -0.445806 0.201510 -0.275780 -v -0.425313 0.267593 -0.463917 -v -0.593272 0.338320 -0.342992 -v 0.489317 0.521345 -0.230739 -v 0.566786 0.459759 -0.135840 -v 0.696454 0.294620 -0.079040 -v 0.639618 0.281680 -0.390475 -v 0.470625 0.274437 -0.407486 -v 0.481528 0.416232 -0.290611 -v 0.154964 0.227082 -0.738194 -v 0.267820 0.208181 -0.589828 -v 0.628840 0.172600 -0.565363 -v 0.343347 0.166423 -0.780052 -v -0.623204 0.188621 -0.564460 -v -0.263426 0.207584 -0.590050 -v -0.150636 0.228237 -0.741433 -v -0.340195 0.172488 -0.777221 -v -0.734433 0.169664 0.429183 -v -0.555585 0.227937 0.507353 -v -0.555675 0.214536 0.317667 -v -0.595569 0.305576 0.063777 -v -0.728765 0.313698 -0.061658 -v -0.838773 0.179083 0.088358 -v -0.307162 0.219259 0.689824 -v -0.177922 0.160396 0.834361 -v 0.180084 0.161183 0.834128 -v 0.311937 0.218134 0.687699 -v 0.140455 0.190169 0.623412 -v -0.127456 0.188941 0.636715 -v 0.188037 0.032460 -0.882699 -v -0.193119 0.036958 -0.884698 -v -0.777074 0.053489 -0.453024 -v -0.897911 0.051566 -0.089759 -v -0.673139 0.035329 0.603332 -v -0.364652 0.035741 0.829811 -v 0.733833 0.169085 0.429215 -v 0.561870 0.218752 0.511690 -v 0.365347 0.042855 0.829381 -v 0.674761 0.045924 0.605042 -v 0.779435 0.048114 -0.455350 -v 0.835005 0.175620 0.090791 -v 0.895932 0.051883 -0.089992 -v 0.662630 -0.102789 -0.593362 -v 0.352942 -0.122325 -0.813603 -v -0.667734 -0.098787 -0.596088 -v -0.360827 -0.110695 -0.815243 -v -0.771273 -0.116101 0.448521 -v -0.887931 -0.100301 0.090161 -v -0.191170 -0.108074 0.871015 -v 0.188758 -0.099481 0.875354 -v 0.773212 -0.088997 0.451187 -v 0.889215 -0.087433 0.092454 -v 0.133606 -0.341033 -0.776055 -v -0.203083 -0.290184 -0.807561 -v -0.711873 -0.205083 -0.411939 -v -0.821110 -0.201353 -0.087904 -v -0.593136 -0.306686 0.540912 -v -0.329116 -0.272893 0.763639 -v 0.332399 -0.201419 0.751341 -v 0.613036 -0.191791 0.552531 -v 0.713649 -0.198994 -0.408725 -v 0.818878 -0.189305 -0.082479 -v 0.524942 -0.237191 -0.480190 -v 0.324325 -0.313046 -0.633109 -v -0.530666 -0.246734 -0.483580 -v -0.656323 -0.282526 0.319690 -v -0.712843 -0.236926 0.079760 -v -0.183062 -0.325625 0.674331 -v 0.140998 -0.244236 0.699307 -v 0.626792 -0.216122 0.360241 -v 0.715242 -0.206387 0.089121 -v -0.538039 -0.167453 -0.305663 -v -0.617280 -0.165192 -0.072444 -v 0.260271 -0.173037 0.562129 -v 0.463924 -0.161976 0.424163 -v 0.539218 -0.157106 -0.295744 -v 0.612347 -0.139892 -0.054393 -v 0.413732 -0.040235 -0.384285 -v 0.230119 -0.068804 -0.516275 -v -0.234342 -0.055751 -0.519445 -v -0.410599 -0.027879 -0.383245 -v 0.121521 -0.052149 0.542167 -v -0.228204 -0.222811 0.544606 -v -0.113008 -0.062985 0.555765 -v 0.110808 0.086735 -0.568899 -v -0.110830 0.091046 -0.570978 -v -0.510966 0.176619 -0.043167 -v -0.561813 -0.039706 0.066207 -v -0.455587 -0.268687 0.417118 -v -0.493696 -0.060935 0.279432 -v -0.422594 0.089901 0.394927 -v -0.240162 0.084094 0.525941 -v 0.260674 0.092443 0.486285 -v 0.501559 -0.036983 0.275802 -v 0.566251 0.194016 0.322959 -v 0.451844 0.131842 -0.293129 -v 0.528302 0.197783 -0.079225 -v 0.486279 0.489862 -0.083021 -v 0.479660 0.383964 -0.117308 -v 0.410752 0.443192 -0.208008 -v 0.054771 0.745851 -0.188967 -v 0.132727 0.746307 -0.109490 -v 0.306289 0.685994 -0.120452 -v 0.361652 0.633150 -0.210426 -v 0.262171 0.623627 -0.233017 -v 0.125327 0.676016 -0.222743 -v 0.354837 0.603194 -0.073738 -v 0.254904 0.594141 -0.098814 -v 0.312242 0.539971 -0.189446 -v 0.119162 0.644007 -0.089820 -v 0.048349 0.714194 -0.055884 -v 0.037252 0.643884 -0.169205 -v -0.217231 0.714514 -0.112546 -v -0.124577 0.729681 -0.191762 -v -0.186659 0.647231 -0.230279 -v -0.404999 0.599315 -0.129163 -v -0.129253 0.694170 -0.057902 -v -0.190144 0.615309 -0.092713 -v -0.096704 0.629516 -0.170852 -v -0.356764 0.483560 -0.097892 -v -0.467711 0.496197 -0.044313 -v -0.499936 -0.514743 0.499699 -v -0.488876 -0.550197 0.388635 -v -0.435075 -0.669275 0.254483 -v -0.379371 -0.775229 0.199365 -v -0.323889 -0.749117 0.330452 -v -0.377984 -0.604917 0.500964 -v -0.303093 -0.509325 0.561039 -v -0.321285 -0.543907 0.437527 -v -0.438771 -0.448870 0.431204 -v -0.229746 -0.765459 0.242069 -v -0.282411 -0.659501 0.298471 -v -0.337540 -0.687735 0.165065 -v -0.308090 -0.843562 -0.010698 -v -0.301748 -0.797172 -0.133084 -v -0.240162 -0.782451 -0.323752 -v -0.173086 -0.806689 -0.428837 -v -0.110022 -0.859264 -0.315502 -v -0.185007 -0.882845 -0.085212 -v -0.160011 -0.831796 0.032807 -v -0.153618 -0.785520 -0.089851 -v -0.277803 -0.746085 -0.011830 -v -0.021751 -0.793186 -0.383463 -v -0.091927 -0.769304 -0.278202 -v -0.153897 -0.714597 -0.394826 -v 0.016600 -0.599461 -0.664540 -v -0.121248 -0.674682 -0.604721 -v 0.041912 -0.660330 -0.555736 -v 0.611387 0.193989 0.062374 -v 0.532106 0.157754 0.036468 -v 0.572385 -0.009428 0.073143 -v 0.400875 0.099330 0.333939 -vn -0.176096 0.030190 0.983910 -vn -0.176096 0.030190 0.983910 -vn -0.176096 0.030190 0.983910 -vn -0.176096 0.030190 0.983910 -vn -0.176096 0.030190 0.983910 -vn -0.176096 0.030190 0.983910 -vn 0.549841 0.358752 -0.754302 -vn 0.549841 0.358752 -0.754302 -vn 0.549841 0.358752 -0.754302 -vn 0.549841 0.358752 -0.754302 -vn 0.549841 0.358752 -0.754302 -vn 0.549841 0.358752 -0.754302 -vn 0.598621 0.668071 -0.441966 -vn 0.598621 0.668071 -0.441966 -vn 0.598621 0.668071 -0.441966 -vn 0.598621 0.668071 -0.441966 -vn 0.598621 0.668071 -0.441966 -vn 0.598621 0.668071 -0.441966 -vn 0.127690 0.939912 -0.316640 -vn 0.127690 0.939912 -0.316640 -vn 0.127690 0.939912 -0.316640 -vn 0.127690 0.939912 -0.316640 -vn 0.127690 0.939912 -0.316640 -vn 0.127690 0.939912 -0.316640 -vn -0.101790 0.937306 -0.333313 -vn -0.101790 0.937306 -0.333313 -vn -0.101790 0.937306 -0.333313 -vn -0.101790 0.937306 -0.333313 -vn -0.101790 0.937306 -0.333313 -vn -0.101790 0.937306 -0.333313 -vn -0.316679 0.921019 0.226801 -vn -0.316679 0.921019 0.226801 -vn -0.316679 0.921019 0.226801 -vn -0.316679 0.921019 0.226801 -vn -0.316679 0.921019 0.226801 -vn -0.316679 0.921019 0.226801 -vn -0.001373 0.987702 0.156345 -vn -0.001373 0.987702 0.156345 -vn -0.001373 0.987702 0.156345 -vn -0.001373 0.987702 0.156345 -vn -0.001373 0.987702 0.156345 -vn -0.001373 0.987702 0.156345 -vn 0.005185 0.598591 -0.801038 -vn 0.005185 0.598591 -0.801038 -vn 0.005185 0.598591 -0.801038 -vn 0.005185 0.598591 -0.801038 -vn 0.005185 0.598591 -0.801038 -vn 0.005185 0.598591 -0.801038 -vn -0.776863 0.572381 -0.262420 -vn -0.776863 0.572381 -0.262420 -vn -0.776863 0.572381 -0.262420 -vn -0.776863 0.572381 -0.262420 -vn -0.776863 0.572381 -0.262420 -vn -0.776863 0.572381 -0.262420 -vn -0.458959 0.616330 0.639917 -vn -0.458959 0.616330 0.639917 -vn -0.458959 0.616330 0.639917 -vn -0.458959 0.616330 0.639917 -vn -0.458959 0.616330 0.639917 -vn -0.458959 0.616330 0.639917 -vn 0.447495 0.638587 0.626063 -vn 0.447495 0.638587 0.626063 -vn 0.447495 0.638587 0.626063 -vn 0.447495 0.638587 0.626063 -vn 0.447495 0.638587 0.626063 -vn 0.447495 0.638587 0.626063 -vn 0.771079 0.592311 -0.233677 -vn 0.771079 0.592311 -0.233677 -vn 0.771079 0.592311 -0.233677 -vn 0.771079 0.592311 -0.233677 -vn 0.771079 0.592311 -0.233677 -vn 0.771079 0.592311 -0.233677 -vn 0.577977 0.133874 -0.804997 -vn 0.577977 0.133874 -0.804997 -vn 0.577977 0.133874 -0.804997 -vn 0.577977 0.133874 -0.804997 -vn 0.577977 0.133874 -0.804997 -vn 0.577977 0.133874 -0.804997 -vn -0.581439 0.165277 -0.796626 -vn -0.581439 0.165277 -0.796626 -vn -0.581439 0.165277 -0.796626 -vn -0.581439 0.165277 -0.796626 -vn -0.581439 0.165277 -0.796626 -vn -0.581439 0.165277 -0.796626 -vn -0.938904 0.155803 0.306896 -vn -0.938904 0.155803 0.306896 -vn -0.938904 0.155803 0.306896 -vn -0.938904 0.155803 0.306896 -vn -0.938904 0.155803 0.306896 -vn -0.938904 0.155803 0.306896 -vn -0.003830 0.147292 0.989086 -vn -0.003830 0.147292 0.989086 -vn -0.003830 0.147292 0.989086 -vn -0.003830 0.147292 0.989086 -vn -0.003830 0.147292 0.989086 -vn -0.003830 0.147292 0.989086 -vn 0.936881 0.183635 0.297543 -vn 0.936881 0.183635 0.297543 -vn 0.936881 0.183635 0.297543 -vn 0.936881 0.183635 0.297543 -vn 0.936881 0.183635 0.297543 -vn 0.936881 0.183635 0.297543 -vn 0.011847 -0.258099 -0.966046 -vn 0.011847 -0.258099 -0.966046 -vn 0.011847 -0.258099 -0.966046 -vn 0.011847 -0.258099 -0.966046 -vn 0.011847 -0.258099 -0.966046 -vn 0.011847 -0.258099 -0.966046 -vn -0.912438 -0.280889 -0.297588 -vn -0.912438 -0.280889 -0.297588 -vn -0.912438 -0.280889 -0.297588 -vn -0.912438 -0.280889 -0.297588 -vn -0.912438 -0.280889 -0.297588 -vn -0.912438 -0.280889 -0.297588 -vn -0.575891 -0.258778 0.775489 -vn -0.575891 -0.258778 0.775489 -vn -0.575891 -0.258778 0.775489 -vn -0.575891 -0.258778 0.775489 -vn -0.575891 -0.258778 0.775489 -vn -0.575891 -0.258778 0.775489 -vn 0.558731 -0.319809 0.765207 -vn 0.558731 -0.319809 0.765207 -vn 0.558731 -0.319809 0.765207 -vn 0.558731 -0.319809 0.765207 -vn 0.558731 -0.319809 0.765207 -vn 0.558731 -0.319809 0.765207 -vn 0.908121 -0.300880 -0.291183 -vn 0.908121 -0.300880 -0.291183 -vn 0.908121 -0.300880 -0.291183 -vn 0.908121 -0.300880 -0.291183 -vn 0.908121 -0.300880 -0.291183 -vn 0.908121 -0.300880 -0.291183 -vn 0.483401 -0.702333 -0.522543 -vn 0.483401 -0.702333 -0.522543 -vn 0.483401 -0.702333 -0.522543 -vn 0.483401 -0.702333 -0.522543 -vn 0.483401 -0.702333 -0.522543 -vn 0.483401 -0.702333 -0.522543 -vn -0.510424 -0.675522 -0.532106 -vn -0.510424 -0.675522 -0.532106 -vn -0.510424 -0.675522 -0.532106 -vn -0.510424 -0.675522 -0.532106 -vn -0.510424 -0.675522 -0.532106 -vn -0.510424 -0.675522 -0.532106 -vn -0.689077 -0.709709 0.146581 -vn -0.689077 -0.709709 0.146581 -vn -0.689077 -0.709709 0.146581 -vn -0.689077 -0.709709 0.146581 -vn -0.689077 -0.709709 0.146581 -vn -0.689077 -0.709709 0.146581 -vn 0.077647 -0.718233 0.691457 -vn 0.077647 -0.718233 0.691457 -vn 0.077647 -0.718233 0.691457 -vn 0.077647 -0.718233 0.691457 -vn 0.077647 -0.718233 0.691457 -vn 0.077647 -0.718233 0.691457 -vn 0.569322 -0.802334 0.179256 -vn 0.569322 -0.802334 0.179256 -vn 0.569322 -0.802334 0.179256 -vn 0.569322 -0.802334 0.179256 -vn 0.569322 -0.802334 0.179256 -vn 0.569322 -0.802334 0.179256 -vn 0.137057 -0.988744 0.060002 -vn 0.137057 -0.988744 0.060002 -vn 0.137057 -0.988744 0.060002 -vn 0.137057 -0.988744 0.060002 -vn 0.137057 -0.988744 0.060002 -vn 0.137057 -0.988744 0.060002 -vn -0.032457 -0.992061 -0.121497 -vn -0.032457 -0.992061 -0.121497 -vn -0.032457 -0.992061 -0.121497 -vn -0.032457 -0.992061 -0.121497 -vn -0.032457 -0.992061 -0.121497 -vn -0.032457 -0.992061 -0.121497 -vn -0.166025 -0.980973 0.100636 -vn -0.166025 -0.980973 0.100636 -vn -0.166025 -0.980973 0.100636 -vn -0.166025 -0.980973 0.100636 -vn -0.166025 -0.980973 0.100636 -vn -0.166025 -0.980973 0.100636 -vn -0.342528 -0.544453 0.765666 -vn -0.342528 -0.544453 0.765666 -vn -0.342528 -0.544453 0.765666 -vn -0.342528 -0.544453 0.765666 -vn -0.342528 -0.544453 0.765666 -vn -0.342528 -0.544453 0.765666 -vn 0.396959 -0.505251 0.766254 -vn 0.396959 -0.505251 0.766254 -vn 0.396959 -0.505251 0.766254 -vn 0.396959 -0.505251 0.766254 -vn 0.396959 -0.505251 0.766254 -vn 0.396959 -0.505251 0.766254 -vn 0.108063 -0.555277 -0.824615 -vn 0.108063 -0.555277 -0.824615 -vn 0.108063 -0.555277 -0.824615 -vn 0.108063 -0.555277 -0.824615 -vn 0.108063 -0.555277 -0.824615 -vn 0.108063 -0.555277 -0.824615 -vn -0.003491 -0.046247 0.998924 -vn -0.003491 -0.046247 0.998924 -vn -0.003491 -0.046247 0.998924 -vn -0.003491 -0.046247 0.998924 -vn -0.003491 -0.046247 0.998924 -vn -0.003491 -0.046247 0.998924 -vn 0.914149 -0.280934 0.292247 -vn 0.914149 -0.280934 0.292247 -vn 0.914149 -0.280934 0.292247 -vn 0.914149 -0.280934 0.292247 -vn 0.914149 -0.280934 0.292247 -vn 0.914149 -0.280934 0.292247 -vn 0.578453 -0.077526 -0.812023 -vn 0.578453 -0.077526 -0.812023 -vn 0.578453 -0.077526 -0.812023 -vn 0.578453 -0.077526 -0.812023 -vn 0.578453 -0.077526 -0.812023 -vn 0.578453 -0.077526 -0.812023 -vn -0.900377 0.288838 -0.325413 -vn -0.900377 0.288838 -0.325413 -vn -0.900377 0.288838 -0.325413 -vn -0.900377 0.288838 -0.325413 -vn -0.900377 0.288838 -0.325413 -vn -0.900377 0.288838 -0.325413 -vn -0.642394 0.242682 0.726936 -vn -0.642394 0.242682 0.726936 -vn -0.642394 0.242682 0.726936 -vn -0.642394 0.242682 0.726936 -vn -0.642394 0.242682 0.726936 -vn -0.642394 0.242682 0.726936 -vn -0.001047 0.797862 0.602839 -vn -0.001047 0.797862 0.602839 -vn -0.001047 0.797862 0.602839 -vn -0.001047 0.797862 0.602839 -vn -0.001047 0.797862 0.602839 -vn -0.001047 0.797862 0.602839 -vn 0.679834 0.234219 0.694959 -vn 0.679834 0.234219 0.694959 -vn 0.679834 0.234219 0.694959 -vn 0.679834 0.234219 0.694959 -vn 0.679834 0.234219 0.694959 -vn 0.679834 0.234219 0.694959 -vn 0.973069 0.175778 -0.149129 -vn 0.973069 0.175778 -0.149129 -vn 0.973069 0.175778 -0.149129 -vn 0.973069 0.175778 -0.149129 -vn 0.973069 0.175778 -0.149129 -vn 0.973069 0.175778 -0.149129 -vn 0.380178 0.802279 -0.460233 -vn 0.380178 0.802279 -0.460233 -vn 0.380178 0.802279 -0.460233 -vn 0.380178 0.802279 -0.460233 -vn 0.380178 0.802279 -0.460233 -vn 0.380178 0.802279 -0.460233 -vn -0.068779 0.325637 -0.942990 -vn -0.068779 0.325637 -0.942990 -vn -0.068779 0.325637 -0.942990 -vn -0.068779 0.325637 -0.942990 -vn -0.068779 0.325637 -0.942990 -vn -0.068779 0.325637 -0.942990 -vn -0.921762 -0.243251 0.301966 -vn -0.921762 -0.243251 0.301966 -vn -0.921762 -0.243251 0.301966 -vn -0.921762 -0.243251 0.301966 -vn -0.921762 -0.243251 0.301966 -vn -0.921762 -0.243251 0.301966 -vn -0.921762 -0.243251 0.301966 -vn -0.990668 -0.082705 0.108336 -vn -0.990668 -0.082705 0.108336 -vn -0.990668 -0.082705 0.108336 -vn -0.990668 -0.082705 0.108336 -vn -0.990668 -0.082705 0.108336 -vn -0.990668 -0.082705 0.108336 -vn 0.258445 0.812500 -0.522541 -vn 0.258445 0.812500 -0.522541 -vn 0.258445 0.812500 -0.522541 -vn 0.258445 0.812500 -0.522541 -vn 0.258445 0.812500 -0.522541 -vn 0.258445 0.812500 -0.522541 -vn 0.651137 0.736714 0.182408 -vn 0.651137 0.736714 0.182408 -vn 0.651137 0.736714 0.182408 -vn 0.651137 0.736714 0.182408 -vn 0.651137 0.736714 0.182408 -vn 0.651137 0.736714 0.182408 -vn -0.534747 -0.618776 0.575467 -vn -0.534747 -0.618776 0.575467 -vn -0.534747 -0.618776 0.575467 -vn -0.534747 -0.618776 0.575467 -vn -0.534747 -0.618776 0.575467 -vn -0.534747 -0.618776 0.575467 -vn -0.249173 -0.015319 -0.968338 -vn -0.249173 -0.015319 -0.968338 -vn -0.249173 -0.015319 -0.968338 -vn -0.249173 -0.015319 -0.968338 -vn -0.249173 -0.015319 -0.968338 -vn -0.249173 -0.015319 -0.968338 -vn 0.126425 0.194928 0.972636 -vn 0.126425 0.194928 0.972636 -vn 0.126425 0.194928 0.972636 -vn 0.126425 0.194928 0.972636 -vn 0.126425 0.194928 0.972636 -vn 0.126425 0.194928 0.972636 -vn -0.358153 -0.905393 -0.228012 -vn -0.358153 -0.905393 -0.228012 -vn -0.358153 -0.905393 -0.228012 -vn -0.358153 -0.905393 -0.228012 -vn -0.358153 -0.905393 -0.228012 -vn -0.358153 -0.905393 -0.228012 -vn -0.393991 0.755823 -0.522975 -vn -0.393991 0.755823 -0.522975 -vn -0.393991 0.755823 -0.522975 -vn -0.393991 0.755823 -0.522975 -vn -0.393991 0.755823 -0.522975 -vn -0.393991 0.755823 -0.522975 -vn -0.092922 0.966508 0.239222 -vn -0.092922 0.966508 0.239222 -vn -0.092922 0.966508 0.239222 -vn -0.092922 0.966508 0.239222 -vn -0.092922 0.966508 0.239222 -vn -0.092922 0.966508 0.239222 -vn 0.076496 -0.835615 0.543963 -vn 0.076496 -0.835615 0.543963 -vn 0.076496 -0.835615 0.543963 -vn 0.076496 -0.835615 0.543963 -vn 0.076496 -0.835615 0.543963 -vn 0.076496 -0.835615 0.543963 -vn 0.037043 -0.149468 -0.988073 -vn 0.037043 -0.149468 -0.988073 -vn 0.037043 -0.149468 -0.988073 -vn 0.037043 -0.149468 -0.988073 -vn 0.037043 -0.149468 -0.988073 -vn 0.037043 -0.149468 -0.988073 -vn -0.101471 0.208784 0.972683 -vn -0.101471 0.208784 0.972683 -vn -0.101471 0.208784 0.972683 -vn -0.101471 0.208784 0.972683 -vn -0.101471 0.208784 0.972683 -vn -0.101471 0.208784 0.972683 -vn 0.623671 -0.760468 -0.180895 -vn 0.623671 -0.760468 -0.180895 -vn 0.623671 -0.760468 -0.180895 -vn 0.623671 -0.760468 -0.180895 -vn 0.623671 -0.760468 -0.180895 -vn 0.623671 -0.760468 -0.180895 -vn -0.671802 0.738776 0.053778 -vn -0.671802 0.738776 0.053778 -vn -0.671802 0.738776 0.053778 -vn -0.671802 0.738776 0.053778 -vn -0.671802 0.738776 0.053778 -vn -0.671802 0.738776 0.053778 -vn 0.832015 -0.271257 0.483912 -vn 0.832015 -0.271257 0.483912 -vn 0.832015 -0.271257 0.483912 -vn 0.832015 -0.271257 0.483912 -vn 0.832015 -0.271257 0.483912 -vn 0.832015 -0.271257 0.483912 -vn 0.719276 -0.598399 -0.352931 -vn 0.719276 -0.598399 -0.352931 -vn 0.719276 -0.598399 -0.352931 -vn 0.719276 -0.598399 -0.352931 -vn 0.719276 -0.598399 -0.352931 -vn 0.719276 -0.598399 -0.352931 -vn -0.732009 -0.629164 -0.261375 -vn -0.732009 -0.629164 -0.261375 -vn -0.732009 -0.629164 -0.261375 -vn -0.732009 -0.629164 -0.261375 -vn -0.732009 -0.629164 -0.261375 -vn -0.732009 -0.629164 -0.261375 -vn -0.668904 -0.669995 0.321984 -vn -0.668904 -0.669995 0.321984 -vn -0.668904 -0.669995 0.321984 -vn -0.668904 -0.669995 0.321984 -vn -0.668904 -0.669995 0.321984 -vn -0.668904 -0.669995 0.321984 -vn -0.271122 -0.545777 0.792856 -vn -0.271122 -0.545777 0.792856 -vn -0.271122 -0.545777 0.792856 -vn -0.271122 -0.545777 0.792856 -vn -0.271122 -0.545777 0.792856 -vn -0.271122 -0.545777 0.792856 -vn 0.691858 -0.058522 -0.719658 -vn 0.691858 -0.058522 -0.719658 -vn 0.691858 -0.058522 -0.719658 -vn 0.691858 -0.058522 -0.719658 -vn 0.691858 -0.058522 -0.719658 -vn 0.691858 -0.058522 -0.719658 -vn -0.544222 -0.506716 -0.668626 -vn -0.544222 -0.506716 -0.668626 -vn -0.544222 -0.506716 -0.668626 -vn -0.544222 -0.506716 -0.668626 -vn -0.544222 -0.506716 -0.668626 -vn -0.544222 -0.506716 -0.668626 -vn 0.834436 -0.303114 0.460258 -vn 0.834436 -0.303114 0.460258 -vn 0.834436 -0.303114 0.460258 -vn 0.834436 -0.303114 0.460258 -vn 0.834436 -0.303114 0.460258 -vn 0.834436 -0.303114 0.460258 -vn 0.143509 0.761003 -0.632676 -vn 0.143509 0.761003 -0.632676 -vn 0.143509 0.761003 -0.632676 -vn 0.143509 0.761003 -0.632676 -vn 0.143509 0.761003 -0.632676 -vn 0.143509 0.761003 -0.632676 -vn -0.491921 -0.838168 -0.235558 -vn -0.491921 -0.838168 -0.235558 -vn -0.491921 -0.838168 -0.235558 -vn -0.491921 -0.838168 -0.235558 -vn -0.491921 -0.838168 -0.235558 -vn -0.491921 -0.838168 -0.235558 -vn -0.018264 -0.953576 0.300599 -vn -0.018264 -0.953576 0.300599 -vn -0.018264 -0.953576 0.300599 -vn -0.018264 -0.953576 0.300599 -vn -0.018264 -0.953576 0.300599 -vn -0.018264 -0.953576 0.300599 -vn 0.618213 0.784451 -0.049484 -vn 0.618213 0.784451 -0.049484 -vn 0.618213 0.784451 -0.049484 -vn 0.618213 0.784451 -0.049484 -vn 0.618213 0.784451 -0.049484 -vn 0.618213 0.784451 -0.049484 -vn -0.891197 0.240129 -0.384846 -vn -0.891197 0.240129 -0.384846 -vn -0.891197 0.240129 -0.384846 -vn -0.891197 0.240129 -0.384846 -vn -0.891197 0.240129 -0.384846 -vn -0.891197 0.240129 -0.384846 -vn 0.909860 -0.316618 0.268157 -vn 0.909860 -0.316618 0.268157 -vn 0.909860 -0.316618 0.268157 -vn 0.909860 -0.316618 0.268157 -vn 0.909860 -0.316618 0.268157 -vn 0.909860 -0.316618 0.268157 -vn -0.099375 0.993787 0.050118 -vn -0.099375 0.993787 0.050118 -vn -0.099375 0.993787 0.050118 -vn -0.099375 0.993787 0.050118 -vn -0.099375 0.993787 0.050118 -vn -0.099375 0.993787 0.050118 -vn -0.243989 -0.468286 -0.849222 -vn -0.243989 -0.468286 -0.849222 -vn -0.243989 -0.468286 -0.849222 -vn -0.243989 -0.468286 -0.849222 -vn -0.243989 -0.468286 -0.849222 -vn -0.243989 -0.468286 -0.849222 -vn 0.231314 -0.815730 -0.530168 -vn 0.231314 -0.815730 -0.530168 -vn 0.231314 -0.815730 -0.530168 -vn 0.231314 -0.815730 -0.530168 -vn 0.231314 -0.815730 -0.530168 -vn 0.231314 -0.815730 -0.530168 -vn 0.373067 0.653183 0.658918 -vn 0.373067 0.653183 0.658918 -vn 0.373067 0.653183 0.658918 -vn 0.373067 0.653183 0.658918 -vn 0.373067 0.653183 0.658918 -vn 0.373067 0.653183 0.658918 -vn -0.980446 0.155765 -0.120257 -vn -0.980446 0.155765 -0.120257 -vn -0.980446 0.155765 -0.120257 -vn -0.980446 0.155765 -0.120257 -vn -0.980446 0.155765 -0.120257 -vn -0.980446 0.155765 -0.120257 -vn 0.786883 -0.576674 0.219687 -vn 0.786883 -0.576674 0.219687 -vn 0.786883 -0.576674 0.219687 -vn 0.786883 -0.576674 0.219687 -vn 0.786883 -0.576674 0.219687 -vn 0.786883 -0.576674 0.219687 -vn 0.100174 0.987080 0.125051 -vn 0.100174 0.987080 0.125051 -vn 0.100174 0.987080 0.125051 -vn 0.100174 0.987080 0.125051 -vn 0.100174 0.987080 0.125051 -vn 0.100174 0.987080 0.125051 -vn -0.206008 0.463231 0.861962 -vn -0.206008 0.463231 0.861962 -vn -0.206008 0.463231 0.861962 -vn -0.206008 0.463231 0.861962 -vn -0.206008 0.463231 0.861962 -vn -0.206008 0.463231 0.861962 -vn -0.206008 0.463231 0.861962 -vn -0.558450 -0.319971 -0.765344 -vn -0.558450 -0.319971 -0.765344 -vn -0.558450 -0.319971 -0.765344 -vn -0.558450 -0.319971 -0.765344 -vn -0.558450 -0.319971 -0.765344 -vn -0.558450 -0.319971 -0.765344 -vn -0.295263 0.881369 -0.368792 -vn -0.295263 0.881369 -0.368792 -vn -0.295263 0.881369 -0.368792 -vn -0.295263 0.881369 -0.368792 -vn -0.295263 0.881369 -0.368792 -vn -0.295263 0.881369 -0.368792 -s off -g Mesh1 -usemtl initialShadingGroup -f 1//1 2//2 3//3 4//4 5//5 6//6 -f 7//7 8//8 9//9 10//10 11//11 12//12 -f 13//13 14//14 15//15 16//16 17//17 18//18 -f 19//19 20//20 17//21 16//22 21//23 22//24 -f 23//25 12//26 11//27 24//28 25//29 26//30 -f 27//31 28//32 29//33 30//34 31//35 32//36 -f 33//37 34//38 35//39 36//40 37//41 38//42 -f 26//43 25//44 19//45 22//46 39//47 40//48 -f 32//49 31//50 12//51 23//52 41//53 42//54 -f 28//55 27//56 43//57 44//58 34//59 33//60 -f 45//61 46//62 36//63 35//64 47//65 48//66 -f 49//67 21//68 16//69 15//70 50//71 51//72 -f 39//73 22//74 21//75 49//76 52//77 53//78 -f 54//79 41//80 23//81 26//82 40//83 55//84 -f 56//85 43//86 27//87 32//88 42//89 57//90 -f 47//91 35//92 34//93 44//94 58//95 59//96 -f 51//97 50//98 45//99 48//100 60//101 61//102 -f 55//103 40//104 39//105 53//106 62//107 63//108 -f 57//109 42//110 41//111 54//112 64//113 65//114 -f 58//115 44//116 43//117 56//118 66//119 67//120 -f 60//121 48//122 47//123 59//124 68//125 69//126 -f 70//127 52//128 49//129 51//130 61//131 71//132 -f 62//133 53//134 52//135 70//136 72//137 73//138 -f 74//139 64//140 54//141 55//142 63//143 3//144 -f 75//145 66//146 56//147 57//148 65//149 76//150 -f 68//151 59//152 58//153 67//154 77//155 78//156 -f 71//157 61//158 60//159 69//160 79//161 80//162 -f 76//163 65//164 64//165 74//166 81//167 82//168 -f 79//169 69//170 68//171 78//172 83//173 84//174 -f 85//175 72//176 70//177 71//178 80//179 86//180 -f 1//181 73//182 72//183 85//184 87//185 88//186 -f 81//187 74//188 3//189 2//190 89//191 90//192 -f 91//193 83//194 78//195 77//196 92//197 93//198 -f 89//199 2//200 1//201 88//202 94//203 95//204 -f 82//205 81//206 90//207 10//208 96//209 97//210 -f 93//211 92//212 98//213 99//214 100//215 101//216 -f 161//217 104//218 158//219 159//220 160//221 103//222 -f 17//223 20//224 94//225 88//226 87//227 105//228 -f 95//229 94//230 20//231 19//232 25//233 24//234 -f 10//235 90//236 89//237 95//238 24//239 11//240 -f 100//241 99//242 97//243 96//244 30//245 29//246 -f 101//247 100//248 29//249 28//250 33//251 38//252 -f 102//253 91//254 93//255 101//256 38//257 37//258 -f 106//259 105//260 87//261 85//262 86//263 160//264 159//265 -f 18//266 17//267 105//268 106//269 108//270 109//271 -f 110//272 111//273 112//274 113//275 114//276 115//277 -f 107//278 14//279 13//280 113//281 112//282 116//283 -f 109//284 108//285 107//286 116//287 117//288 118//289 -f 114//290 113//291 13//292 18//293 109//294 118//295 -f 119//296 117//297 116//298 112//299 111//300 120//301 -f 121//302 115//303 114//304 118//305 117//306 119//307 -f 122//308 123//309 124//310 8//311 7//312 125//313 -f 126//314 120//315 111//316 110//317 123//318 122//319 -f 127//320 128//321 121//322 119//323 120//324 126//325 -f 124//326 123//327 110//328 115//329 121//330 128//331 -f 129//332 127//333 126//334 122//335 125//336 130//337 -f 8//338 124//339 128//340 127//341 129//342 9//343 -f 12//344 31//345 30//346 130//347 125//348 7//349 -f 129//350 130//351 30//352 96//353 10//354 9//355 -f 75//356 76//357 82//358 97//359 99//360 98//361 -f 86//362 80//363 79//364 84//365 103//366 160//367 -f 131//368 132//369 133//370 134//371 135//372 136//373 -f 77//374 67//375 66//376 131//377 136//378 137//379 -f 98//380 92//381 77//382 137//383 138//384 139//385 -f 132//386 131//387 66//388 75//389 98//390 139//391 -f 138//392 137//393 136//394 135//395 140//396 141//397 -f 142//398 133//399 132//400 139//401 138//402 141//403 -f 143//404 144//405 145//406 146//407 147//408 148//409 -f 149//410 140//411 135//412 134//413 143//414 148//415 -f 150//416 151//417 142//418 141//419 140//420 149//421 -f 144//422 143//423 134//424 133//425 142//426 151//427 -f 150//428 149//429 148//430 147//431 152//432 153//433 -f 154//434 145//435 144//436 151//437 150//438 153//439 -f 3//440 63//441 62//442 155//443 156//444 4//445 -f 156//446 155//447 157//448 152//449 147//450 146//451 -f 6//452 5//453 154//454 153//455 152//456 157//457 -f 4//458 156//459 146//460 145//461 154//462 5//463 -f 6//464 157//465 155//466 62//467 73//468 1//469 -f 158//470 104//471 46//472 45//473 50//474 15//475 -f 106//476 159//477 158//478 15//479 14//480 107//481 108//482 -f 102//483 161//484 103//485 84//486 83//487 91//488 -f 37//489 36//490 46//491 104//492 161//493 102//494 diff --git a/topmodx/objs/genus3hexa3.obj b/topmodx/objs/genus3hexa3.obj deleted file mode 100644 index 3e8b97b..0000000 --- a/topmodx/objs/genus3hexa3.obj +++ /dev/null @@ -1,3952 +0,0 @@ -v -0.663892 0.150258 -0.434155 -v -0.739291 0.151864 -0.282004 -v -0.626653 0.118976 0.510296 -v -0.506699 0.114514 0.628583 -v -0.685463 -0.114697 -0.44628 -v -0.760419 -0.111582 -0.292933 -v 0.499099 -0.11133 0.322416 -v 0.55346 -0.103117 0.216548 -v 0.450295 0.0230372 -0.295874 -v 0.432512 -0.059497 -0.349167 -v 0.203443 0.11206 -0.541092 -v 0.140782 0.0411642 -0.543496 -v -0.443153 0.0355089 -0.300198 -v -0.491514 0.0409455 -0.192036 -v -0.238488 0.123396 0.542953 -v -0.281903 0.0701601 0.494093 -v -0.127987 0.646502 -0.195237 -v -0.171948 0.651526 -0.203621 -v 0.560882 0.226652 -0.464718 -v 0.456622 0.210736 -0.57019 -v 0.650002 0.00564074 -0.526683 -v 0.523419 -0.00159009 -0.648617 -v 0.160384 -0.345588 -0.602266 -v 0.0604188 -0.37111 -0.587597 -v -0.432177 0.196521 0.538758 -v -0.350039 0.179948 0.544803 -v -0.395455 -0.309008 0.641606 -v -0.411773 -0.397131 0.585658 -v 0.334698 0.572126 -0.105615 -v 0.353737 0.534069 -0.127473 -v -0.388254 0.418718 -0.163856 -v -0.433294 0.389811 -0.112235 -v -0.301307 -0.710222 0.313929 -v -0.297835 -0.667085 0.351338 -v -0.29202 -0.772572 -0.0448251 -v -0.282787 -0.79685 -0.0943717 -v 0.0362566 -0.56911 -0.573169 -v 0.0170634 -0.624781 -0.563571 -v 0.500739 0.180924 0.401007 -v 0.504481 0.155453 0.321969 -v 0.561449 -0.0298477 -0.00736792 -v 0.549495 0.0294704 0.0590741 -v 0.019881 -0.276372 -0.576107 -v 0.0123593 -0.39627 -0.583533 -v -0.412106 0.508976 -0.238194 -v -0.471191 0.433298 -0.271622 -v 0.490266 0.490088 -0.201642 -v 0.494218 0.449949 -0.242113 -v 0.178464 0.203162 -0.669148 -v 0.26194 0.195473 -0.686805 -v -0.575396 0.27148 -0.384557 -v -0.649119 0.283032 -0.2391 -v -0.647683 0.169052 0.424853 -v -0.716929 0.179349 0.281043 -v -0.262 0.183079 0.688634 -v -0.177392 0.188252 0.668339 -v 0.648871 0.164211 0.425748 -v 0.62792 0.121368 0.51135 -v 0.622972 0.132814 -0.510107 -v 0.50475 0.126528 -0.627582 -v -0.70258 0.0140423 -0.456251 -v -0.780429 0.0158296 -0.299616 -v -0.651646 -0.00693607 0.530289 -v -0.527277 -0.00884574 0.653372 -v 0.633716 -0.119385 -0.512464 -v 0.509764 -0.134211 -0.629797 -v -0.63057 -0.199694 -0.409311 -v -0.700949 -0.192179 -0.270073 -v -0.599782 -0.296144 0.437232 -v -0.532563 -0.382835 0.480954 -v 0.515625 -0.203941 -0.41038 -v 0.419846 -0.232674 -0.504854 -v 0.214939 -0.131537 0.543358 -v 0.324921 -0.124341 0.488457 -v 0.437512 0.13214 0.376567 -v 0.37997 0.0828565 0.395845 -v 0.234252 0.0195662 0.487995 -v 0.289181 0.0797479 0.466285 -v 0.472598 0.15447 -0.241114 -v 0.4566 0.212823 -0.298961 -v 0.0683639 0.720279 -0.163159 -v 0.106981 0.701059 -0.185324 -v 0.528222 0.446468 -0.123675 -v 0.578218 0.372382 -0.106589 -v 0.224085 0.612396 -0.114312 -v 0.252918 0.588506 -0.143104 -v 0.100477 0.663005 -0.192971 -v 0.0654034 0.687365 -0.194683 -v -0.191155 0.686919 -0.138547 -v -0.277547 0.645379 -0.144 -v 0.00246552 0.695201 -0.084793 -v 0.0422756 0.675259 -0.0899458 -v -0.170074 0.611607 -0.122677 -v -0.136494 0.640651 -0.098996 -v -0.477568 -0.509689 0.451421 -v -0.435652 -0.559074 0.453578 -v -0.388658 -0.672869 0.231149 -v -0.380288 -0.713221 0.195576 -v -0.289179 -0.812098 -0.037789 -v -0.248399 -0.833571 -0.0808736 -v -0.238627 -0.765834 0.172986 -v -0.255706 -0.726998 0.211786 -v -0.195789 -0.77251 -0.070158 -v -0.190325 -0.78289 -0.0121897 -v -0.166891 -0.728195 -0.366157 -v -0.150469 -0.742077 -0.314591 -v 0.309303 0.0526199 0.444083 -v 0.353192 -0.00559335 0.412401 -v -0.0396636 0.162639 -0.773022 -v -0.197574 0.167167 -0.749906 -v -0.725983 0.216325 -0.186483 -v -0.759203 0.20595 -0.0308202 -v 0.446651 0.0635117 -0.693785 -v 0.293362 0.0589877 -0.775336 -v 0.0445276 0.0619499 0.828381 -v 0.216811 0.0633167 0.804181 -v 0.795505 0.0748025 0.215799 -v 0.823489 0.0771449 0.044197 -v -0.0540637 -0.0885204 -0.828673 -v -0.223735 -0.0812515 -0.805305 -v -0.803676 -0.0505513 -0.214655 -v -0.833474 -0.0541961 -0.0429552 -v -0.450946 -0.0814968 0.699956 -v -0.298091 -0.0771126 0.781618 -v 0.525156 -0.0506674 0.649066 -v 0.65031 -0.049322 0.527473 -v 0.42241 -0.201191 -0.649675 -v 0.267796 -0.238536 -0.720073 -v -0.433111 -0.194627 -0.659256 -v -0.517156 -0.128328 -0.634796 -v 0.0372794 -0.178421 0.78406 -v 0.201755 -0.166284 0.760834 -v 0.761118 -0.143017 0.206897 -v 0.788101 -0.144346 0.0446619 -v -0.682848 -0.20203 -0.183749 -v -0.708428 -0.206376 -0.0398315 -v 0.445747 -0.193712 0.550147 -v 0.551912 -0.18918 0.448152 -v -0.39064 -0.200628 -0.478193 -v -0.481292 -0.179094 -0.39051 -v -0.0431511 -0.122243 -0.556329 -v -0.154565 -0.107266 -0.539856 -v -0.51464 -0.0438131 -0.200007 -v -0.563127 -0.113806 -0.151589 -v -0.274444 -0.0715082 0.48278 -v -0.223794 0.00377309 0.508929 -v 0.510815 0.093414 0.229559 -v 0.480082 0.0327957 0.270075 -v 0.30569 0.126822 -0.483085 -v 0.371358 0.196406 -0.463446 -v -0.0302251 0.153289 -0.60989 -v -0.151511 0.160904 -0.592536 -v -0.352539 0.126271 -0.429571 -v -0.392138 0.209864 -0.412045 -v -0.509946 0.069474 0.204617 -v -0.464678 0.0528286 0.308316 -v -0.379517 0.15059 0.473929 -v -0.312609 0.100091 0.486809 -v 0.0681169 0.0724594 0.55347 -v 0.132004 0.125925 0.566218 -v 0.467914 0.295279 -0.265488 -v 0.472421 0.35018 -0.28852 -v 0.409638 0.480554 -0.132036 -v 0.421398 0.444044 -0.165354 -v 0.378368 0.55049 -0.221855 -v 0.31696 0.596468 -0.212744 -v -0.0527182 0.685122 -0.19425 -v -0.1323 0.666443 -0.1993 -v -0.308485 0.572307 -0.091029 -v -0.386568 0.512226 -0.084201 -v -0.273615 0.549392 -0.19681 -v -0.337771 0.485554 -0.212893 -v -0.573779 0.389107 -0.117037 -v -0.60019 0.348285 -0.200196 -v -0.475485 0.303177 -0.0954823 -v -0.521624 0.278612 -0.0125262 -v -0.607741 -0.190466 0.153361 -v -0.631153 -0.234969 0.222559 -v 0.604124 -0.144495 0.169029 -v 0.622643 -0.140905 0.0433417 -v -0.428272 -0.607705 0.395215 -v -0.411082 -0.582255 0.450246 -v -0.370333 -0.377448 0.613743 -v -0.267851 -0.334337 0.657 -v -0.306275 -0.343962 0.51938 -v -0.354424 -0.283377 0.473555 -v -0.316399 -0.60329 0.429023 -v -0.317723 -0.55392 0.447469 -v -0.234656 -0.827491 -0.162967 -v -0.223957 -0.840959 -0.102285 -v -0.141032 -0.819797 -0.135207 -v -0.158961 -0.799508 -0.0847455 -v -0.113557 -0.415924 -0.703101 -v -0.208005 -0.362441 -0.682191 -v -0.0479418 -0.693171 -0.530212 -v -0.0723015 -0.655414 -0.575444 -v -0.0662458 -0.657578 -0.467778 -v -0.039352 -0.587459 -0.527978 -v -0.152094 -0.657152 -0.516889 -v -0.136143 -0.610308 -0.533164 -v 0.629444 0.202438 0.249498 -v 0.604104 0.199206 0.174006 -v 0.555192 0.263005 -0.035752 -v 0.530881 0.217526 -0.063007 -v 0.356583 0.177481 0.532614 -v 0.238818 0.176626 0.594915 -v -0.137323 -0.835873 -0.221912 -v -0.103575 -0.812425 -0.323599 -v -0.701003 0.117526 -0.405808 -v -0.760492 0.0499062 -0.338956 -v -0.690935 0.0825824 -0.449364 -v -0.650514 0.0118165 -0.526515 -v -0.639716 0.0805485 -0.519049 -v -0.516999 0.0747152 -0.641109 -v -0.601767 0.11294 -0.545151 -v -0.518321 0.16918 -0.585364 -v -0.615876 0.147706 -0.503813 -v -0.625594 0.213237 -0.41225 -v -0.609118 0.089679 0.551234 -v -0.560096 0.0257983 0.623819 -v -0.644756 0.0604345 0.525316 -v -0.702164 -0.00529545 0.458666 -v -0.694195 0.0624727 0.454547 -v -0.769664 0.067977 0.298505 -v -0.708148 0.0949016 0.412538 -v -0.720368 0.15345 0.32578 -v -0.676243 0.12216 0.442369 -v -0.600459 0.164974 0.48932 -v -0.696466 -0.14027 -0.402913 -v -0.704739 -0.1795 -0.314849 -v -0.662358 -0.165802 -0.429893 -v -0.58368 -0.206566 -0.471249 -v -0.61375 -0.169987 -0.495943 -v -0.498023 -0.184402 -0.610699 -v -0.599167 -0.147807 -0.538345 -v -0.556404 -0.093983 -0.615462 -v -0.636772 -0.118049 -0.515662 -v -0.699368 -0.0533754 -0.455107 -v 0.5036 -0.0833846 0.288745 -v 0.512344 -0.0225433 0.228841 -v 0.478338 -0.0576636 0.304694 -v 0.433425 -0.00153641 0.336099 -v 0.443844 -0.0612393 0.349732 -v 0.360957 -0.0672887 0.429447 -v 0.433291 -0.0910446 0.381487 -v 0.409456 -0.142363 0.447818 -v 0.463285 -0.115415 0.370119 -v 0.526937 -0.153334 0.342468 -v 0.418634 0.0112088 -0.345896 -v 0.34018 -0.00903664 -0.430738 -v 0.398042 0.0426115 -0.370784 -v 0.364081 0.105964 -0.420402 -v 0.413793 0.0852276 -0.35144 -v 0.4445 0.170361 -0.316583 -v 0.442885 0.0968728 -0.304586 -v 0.484351 0.126347 -0.20746 -v 0.458796 0.066085 -0.273907 -v 0.498392 0.00651244 -0.208795 -v 0.147405 0.10739 -0.560763 -v 0.0297587 0.10347 -0.580089 -v 0.122162 0.132741 -0.581424 -v 0.0665454 0.171727 -0.625957 -v 0.156628 0.15862 -0.588888 -v 0.22986 0.197092 -0.602978 -v 0.215478 0.165048 -0.567884 -v 0.323421 0.182489 -0.504956 -v 0.237049 0.143838 -0.54075 -v 0.275994 0.0890459 -0.492148 -v -0.44868 0.0868961 -0.272319 -v -0.459746 0.190487 -0.202217 -v -0.429537 0.130642 -0.301453 -v -0.400221 0.192445 -0.375541 -v -0.401795 0.115457 -0.354019 -v -0.332503 0.0833765 -0.440156 -v -0.390457 0.063989 -0.373726 -v -0.364858 -0.0270685 -0.415291 -v -0.412672 0.0277869 -0.34904 -v -0.463087 -0.0480447 -0.306833 -v -0.204858 0.0980846 0.541282 -v -0.142183 0.0383846 0.540357 -v -0.146608 0.0978454 0.558614 -v -0.024315 0.0990521 0.572 -v -0.119539 0.123399 0.578834 -v -0.0615062 0.162881 0.621205 -v -0.15462 0.14562 0.588288 -v -0.229912 0.176685 0.60584 -v -0.215318 0.145377 0.569739 -v -0.328199 0.147549 0.511743 -v -0.166344 0.632428 -0.199726 -v -0.241803 0.591661 -0.210358 -v -0.183699 0.615207 -0.193791 -v -0.220265 0.582055 -0.172944 -v -0.163669 0.616404 -0.18078 -v -0.126879 0.623853 -0.151545 -v -0.125771 0.630575 -0.177493 -v -0.0501991 0.648248 -0.173932 -v -0.107444 0.643453 -0.186016 -v -0.0712836 0.67116 -0.19423 -v 0.554379 0.203927 -0.507899 -v 0.527192 0.154646 -0.590373 -v 0.595461 0.185175 -0.490991 -v 0.670687 0.134937 -0.441626 -v 0.63922 0.189452 -0.425955 -v 0.704519 0.195966 -0.281345 -v 0.639719 0.216031 -0.382831 -v 0.627392 0.268264 -0.304131 -v 0.602462 0.234478 -0.404685 -v 0.525207 0.256194 -0.434996 -v 0.620861 -0.0294907 -0.559602 -v 0.55113 -0.0993766 -0.612208 -v 0.646993 -0.0598361 -0.524673 -v 0.683454 -0.114117 -0.443492 -v 0.69794 -0.0555535 -0.453887 -v 0.775702 -0.0491498 -0.297462 -v 0.724332 -0.021901 -0.418811 -v 0.761222 0.0446297 -0.340809 -v 0.702525 0.00894792 -0.456679 -v 0.642024 0.0710695 -0.521476 -v 0.167391 -0.303277 -0.582482 -v 0.201405 -0.199576 -0.541137 -v 0.22483 -0.266378 -0.566094 -v 0.340333 -0.217677 -0.511806 -v 0.269417 -0.273703 -0.571157 -v 0.347916 -0.270036 -0.578356 -v 0.252757 -0.304015 -0.598922 -v 0.211141 -0.348533 -0.650087 -v 0.201163 -0.339001 -0.613643 -v 0.11602 -0.42763 -0.617796 -v -0.37383 0.193679 0.581767 -v -0.246204 0.190029 0.647678 -v -0.354596 0.191436 0.620625 -v -0.305414 0.172143 0.69291 -v -0.397757 0.186082 0.617954 -v -0.485165 0.159669 0.602219 -v -0.459836 0.188359 0.572407 -v -0.567153 0.19556 0.464693 -v -0.475022 0.196556 0.532069 -v -0.492259 0.199262 0.44976 -v -0.450397 -0.322898 0.599544 -v -0.52334 -0.360186 0.512358 -v -0.49808 -0.287397 0.580444 -v -0.59095 -0.19978 0.534414 -v -0.485735 -0.241737 0.613788 -v -0.438565 -0.158808 0.685282 -v -0.421002 -0.235198 0.664549 -v -0.28287 -0.21682 0.737656 -v -0.378404 -0.266967 0.673267 -v -0.29991 -0.316672 0.670035 -v 0.312465 0.574453 -0.111874 -v 0.271487 0.582156 -0.130756 -v 0.279099 0.593886 -0.108996 -v 0.20952 0.626495 -0.103782 -v 0.266694 0.611455 -0.10134 -v 0.239439 0.647461 -0.0969883 -v 0.289322 0.611765 -0.0987661 -v 0.333829 0.608868 -0.104126 -v 0.32396 0.59187 -0.100163 -v 0.388506 0.543468 -0.103752 -v -0.382979 0.441366 -0.138213 -v -0.369652 0.490621 -0.101758 -v -0.353443 0.477289 -0.135328 -v -0.284856 0.540047 -0.129903 -v -0.331 0.49208 -0.153581 -v -0.291531 0.528911 -0.184392 -v -0.341118 0.475362 -0.177174 -v -0.364964 0.447938 -0.223628 -v -0.368835 0.437922 -0.184563 -v -0.414358 0.353756 -0.197856 -v -0.283835 -0.717039 0.291062 -v -0.260365 -0.725425 0.240078 -v -0.268122 -0.741851 0.245832 -v -0.235858 -0.782513 0.149235 -v -0.270313 -0.759166 0.222069 -v -0.281948 -0.785623 0.16697 -v -0.291132 -0.75247 0.244074 -v -0.335683 -0.730079 0.282204 -v -0.306413 -0.728338 0.290704 -v -0.332738 -0.670276 0.376588 -v -0.277221 -0.77898 -0.0941414 -v -0.246093 -0.780493 -0.192086 -v -0.260316 -0.773973 -0.116366 -v -0.217796 -0.767797 -0.156666 -v -0.256083 -0.766692 -0.0887103 -v -0.24391 -0.757803 -0.0322396 -v -0.27182 -0.759961 -0.0404153 -v -0.303845 -0.737535 0.0551333 -v -0.290852 -0.760834 -0.018755 -v -0.320016 -0.766187 0.0292217 -v 0.017823 -0.612279 -0.547113 -v -0.015604 -0.685799 -0.479754 -v 0.00107076 -0.624934 -0.525429 -v -0.0419953 -0.647436 -0.48603 -v -0.00322664 -0.597734 -0.533885 -v -0.0259549 -0.545878 -0.550482 -v 0.013988 -0.554894 -0.557958 -v 0.053893 -0.460026 -0.588687 -v 0.036719 -0.538925 -0.575557 -v 0.073848 -0.505972 -0.614785 -v 0.537232 0.18321 0.347968 -v 0.58895 0.191583 0.233468 -v 0.571945 0.192063 0.33353 -v 0.640364 0.198503 0.292525 -v 0.574711 0.194979 0.377313 -v 0.570578 0.187168 0.465235 -v 0.536408 0.193522 0.43513 -v 0.437682 0.19097 0.534458 -v 0.497149 0.18832 0.444386 -v 0.420599 0.165831 0.452202 -v 0.563682 -0.0344991 0.0485245 -v 0.54797 -0.0445645 0.155478 -v 0.573896 -0.0669635 0.0735309 -v 0.594433 -0.121812 0.134107 -v 0.588979 -0.0940929 0.0433272 -v 0.621249 -0.140923 -0.0209117 -v 0.58742 -0.0927087 -0.0158436 -v 0.564628 -0.0927175 -0.136269 -v 0.570104 -0.0609279 -0.0415324 -v 0.53847 0.0142902 -0.0823893 -v -0.0266342 -0.317057 -0.582042 -v -0.105182 -0.381826 -0.590376 -v -0.0796545 -0.299244 -0.581023 -v -0.18131 -0.265633 -0.572935 -v -0.0934471 -0.248723 -0.573637 -v -0.133104 -0.153087 -0.551563 -v -0.0563653 -0.211028 -0.5675 -v 0.0152944 -0.126159 -0.556976 -v 0.00394255 -0.220863 -0.568952 -v 0.136826 -0.216251 -0.557864 -v -0.416709 0.482117 -0.25477 -v -0.417175 0.422917 -0.27706 -v -0.390052 0.490597 -0.252751 -v -0.344378 0.504873 -0.235646 -v -0.358537 0.525139 -0.239981 -v -0.288141 0.585255 -0.22102 -v -0.350088 0.550615 -0.229042 -v -0.327089 0.595581 -0.198 -v -0.377001 0.542933 -0.225236 -v -0.430525 0.520579 -0.204477 -v 0.515487 0.457754 -0.205778 -v 0.559879 0.391249 -0.219795 -v 0.535772 0.441479 -0.184819 -v 0.569545 0.39904 -0.134507 -v 0.528554 0.456864 -0.161971 -v 0.499769 0.480843 -0.128018 -v 0.500269 0.489528 -0.162647 -v 0.440154 0.550297 -0.160751 -v 0.482266 0.506477 -0.181359 -v 0.442961 0.531894 -0.209056 -v 0.245274 0.206781 -0.644903 -v 0.370175 0.219978 -0.575074 -v 0.26899 0.207263 -0.609007 -v 0.308152 0.196666 -0.53845 -v 0.16671 0.191127 -0.625927 -v 0.0351956 0.186035 -0.648703 -v 0.139029 0.197679 -0.656201 -v 0.0761473 0.198235 -0.711644 -v -0.621478 0.247979 -0.362199 -v -0.703968 0.185309 -0.312703 -v -0.580999 0.207011 -0.48042 -v -0.473032 0.190196 -0.598655 -v -0.535906 0.226206 -0.498772 -v -0.446137 0.242988 -0.528078 -v -0.53442 0.255934 -0.45296 -v -0.506337 0.311916 -0.382486 -v -0.649513 0.188959 0.380426 -v -0.638714 0.220482 0.292411 -v -0.610442 0.200097 0.40241 -v -0.531789 0.20594 0.437169 -v -0.559 0.180343 0.507176 -v -0.528682 0.139433 0.589402 -v -0.18868 0.181408 0.711885 -v -0.0361042 0.17978 0.733864 -v -0.15577 0.170348 0.742086 -v -0.0824943 0.137554 0.791814 -v -0.199559 0.156265 0.752667 -v -0.288647 0.113789 0.7572 -v -0.275883 0.156389 0.726742 -v -0.418893 0.158098 0.650666 -v 0.602492 0.161821 0.490237 -v 0.488113 0.15891 0.602579 -v 0.562006 0.175525 0.507859 -v 0.479869 0.190549 0.530428 -v 0.612953 0.188732 0.402995 -v 0.673938 0.195742 0.26577 -v 0.65076 0.179479 0.38113 -v 0.7196 0.14965 0.326301 -v 0.605963 0.101309 -0.548719 -v 0.555722 0.0340783 -0.618275 -v 0.693291 0.0733999 -0.452413 -v 0.769242 0.077137 -0.297633 -v 0.704945 0.105763 -0.411174 -v 0.710309 0.166758 -0.324951 -v -0.724975 -0.0190348 -0.419145 -v -0.753577 -0.0822233 -0.336923 -v -0.649234 -0.0560842 -0.526134 -v -0.526408 -0.0630591 -0.648061 -v -0.622775 -0.0239695 -0.560437 -v -0.556013 0.0421195 -0.617881 -v -0.621931 -0.044348 0.561777 -v -0.549381 -0.121634 0.612941 -v -0.64682 -0.081172 0.524595 -v -0.683638 -0.150709 0.442283 -v -0.699104 -0.0786694 0.454427 -v -0.777816 -0.0694921 0.298708 -v -0.724733 -0.0402047 0.419986 -v -0.759827 0.0329321 0.341439 -v 0.595471 -0.148688 -0.533936 -v 0.512691 -0.201777 -0.562526 -v 0.61082 -0.168325 -0.491158 -v 0.629462 -0.192647 -0.404018 -v 0.660386 -0.162199 -0.425751 -v 0.73473 -0.152947 -0.27922 -v 0.694776 -0.137294 -0.399556 -v 0.752624 -0.0803123 -0.335062 -v -0.631978 -0.205583 -0.365235 -v -0.624333 -0.201909 -0.279454 -v -0.592267 -0.213153 -0.385243 -v -0.513693 -0.213669 -0.416898 -v -0.548174 -0.222836 -0.444485 -v -0.442675 -0.249931 -0.545965 -v -0.540995 -0.222138 -0.486414 -v -0.51639 -0.202533 -0.56991 -v -0.57908 -0.323736 0.431446 -v -0.53901 -0.358034 0.418136 -v -0.588709 -0.310225 0.392904 -v -0.583296 -0.273752 0.330095 -v -0.617081 -0.28258 0.351565 -v -0.669977 -0.243266 0.237008 -v -0.645957 -0.265151 0.339484 -v -0.705769 -0.216339 0.301733 -v -0.638287 -0.265203 0.38661 -v -0.607257 -0.233167 0.488961 -v 0.477336 -0.196423 -0.422408 -v 0.403306 -0.167932 -0.441777 -v 0.482139 -0.17273 -0.383986 -v 0.490002 -0.113204 -0.311032 -v 0.519505 -0.162786 -0.330639 -v 0.577156 -0.14812 -0.211824 -v 0.553507 -0.175468 -0.313167 -v 0.62319 -0.188493 -0.271903 -v 0.55443 -0.192931 -0.354486 -v 0.549545 -0.213417 -0.438038 -v 0.239944 -0.10263 0.517931 -v 0.286067 -0.0402699 0.469453 -v 0.209645 -0.074934 0.51726 -v 0.152531 -0.0160589 0.522896 -v 0.153151 -0.0781183 0.535873 -v 0.0348853 -0.0860319 0.555462 -v 0.124645 -0.109605 0.554485 -v 0.0639869 -0.16938 0.592148 -v 0.156135 -0.135327 0.561299 -v 0.223668 -0.175072 0.576573 -v 0.445503 0.110945 0.343951 -v 0.466277 0.0607641 0.291971 -v 0.478978 0.113262 0.301229 -v 0.528609 0.121565 0.21013 -v 0.505665 0.137138 0.287094 -v 0.56104 0.176765 0.254612 -v 0.469804 0.152772 0.36872 -v 0.383768 0.149262 0.45277 -v 0.209223 0.0488836 0.502134 -v 0.15883 0.10219 0.541814 -v 0.154455 0.0462731 0.524022 -v 0.0368139 0.0416446 0.549361 -v 0.124642 0.0140396 0.53025 -v 0.0653994 -0.0522795 0.546241 -v 0.207375 -0.0131428 0.50253 -v 0.307948 -0.00775457 0.446287 -v 0.47634 0.198254 -0.227864 -v 0.476263 0.282241 -0.206668 -v 0.487668 0.215395 -0.18587 -v 0.504925 0.256285 -0.119216 -v 0.49841 0.190965 -0.153443 -v 0.522359 0.148163 -0.0870635 -v 0.498835 0.145701 -0.161784 -v 0.498872 0.0518138 -0.185476 -v 0.109347 0.714505 -0.162991 -v 0.188948 0.694424 -0.165025 -v 0.130352 0.71428 -0.149153 -v 0.171024 0.70465 -0.123559 -v 0.110162 0.719339 -0.134565 -v 0.0671633 0.717411 -0.108275 -v 0.0683576 0.723771 -0.134575 -v -0.0168572 0.723627 -0.135664 -v 0.0475646 0.724486 -0.14933 -v 0.00633502 0.717327 -0.174929 -v 0.535379 0.419403 -0.106322 -v 0.536912 0.357782 -0.0783684 -v 0.514873 0.42942 -0.0997707 -v 0.472665 0.451128 -0.10195 -v 0.489116 0.466457 -0.105392 -v 0.43176 0.530867 -0.108568 -v 0.481168 0.490815 -0.116286 -v 0.456032 0.532752 -0.145043 -v 0.204177 0.614389 -0.124799 -v 0.167609 0.624151 -0.150359 -v 0.169184 0.627226 -0.122529 -v 0.0970563 0.645651 -0.119756 -v 0.153113 0.638279 -0.109848 -v 0.119924 0.663955 -0.0928714 -v 0.173541 0.639541 -0.101589 -v 0.216804 0.644563 -0.0950941 -v 0.0633364 0.667514 -0.19072 -v -0.0125517 0.667592 -0.18906 -v 0.043636 0.66013 -0.182648 -v 0.00530758 0.649198 -0.161369 -v 0.0613101 0.65207 -0.173469 -v 0.0965461 0.641747 -0.148383 -v 0.0977747 0.647972 -0.174685 -v 0.169009 0.630745 -0.178863 -v 0.117241 0.651524 -0.186115 -v 0.157491 0.659264 -0.199939 -v -0.210559 0.677051 -0.154644 -v -0.245316 0.647046 -0.186385 -v -0.186223 0.682834 -0.168398 -v -0.138159 0.686036 -0.188808 -v -0.143427 0.698385 -0.166823 -v -0.0580293 0.717154 -0.164138 -v -0.124025 0.706954 -0.151861 -v -0.0827608 0.71351 -0.121679 -v -0.147416 0.701271 -0.137339 -v -0.192377 0.680105 -0.111849 -v -0.0180322 0.684235 -0.0848842 -v -0.0565074 0.661196 -0.0973564 -v -0.0593702 0.679759 -0.0851676 -v -0.142386 0.660055 -0.087146 -v -0.0814019 0.686225 -0.0853833 -v -0.126201 0.69338 -0.0984223 -v -0.0610833 0.698304 -0.0888707 -v -0.0180685 0.716538 -0.107145 -v -0.018554 0.702805 -0.0885638 -v 0.065028 0.702608 -0.0899451 -v -0.131034 0.627643 -0.122146 -v -0.0534948 0.646886 -0.121663 -v -0.109414 0.630873 -0.136321 -v -0.0692459 0.641115 -0.162684 -v -0.165075 0.608791 -0.153046 -v -0.240429 0.566049 -0.158942 -v -0.186651 0.599774 -0.138354 -v -0.232643 0.585068 -0.112256 -v -0.247382 0.567378 -0.127035 -v -0.276282 0.539121 -0.164046 -v -0.309403 0.530629 -0.115925 -v -0.36024 0.51708 -0.0926213 -v -0.29669 0.552337 -0.102897 -v -0.267205 0.5989 -0.0915091 -v -0.257404 0.579445 -0.102095 -v -0.1769 0.62389 -0.0998746 -v -0.461637 -0.547643 0.428163 -v -0.432302 -0.617093 0.366953 -v -0.460368 -0.558882 0.403168 -v -0.445413 -0.578902 0.359277 -v -0.46944 -0.534122 0.405349 -v -0.469103 -0.485272 0.410073 -v -0.483714 -0.497406 0.425305 -v -0.516794 -0.420193 0.442949 -v -0.490574 -0.484213 0.446383 -v -0.487975 -0.452488 0.494105 -v -0.372221 -0.695947 0.189669 -v -0.339101 -0.734262 0.0998675 -v -0.354445 -0.699844 0.167837 -v -0.314212 -0.711696 0.128188 -v -0.350318 -0.684537 0.190862 -v -0.33454 -0.660391 0.241183 -v -0.365148 -0.662206 0.232325 -v -0.392992 -0.609674 0.307188 -v -0.385711 -0.654435 0.25078 -v -0.417462 -0.640207 0.291899 -v -0.271855 -0.817176 -0.0891075 -v -0.238246 -0.816874 -0.191863 -v -0.270745 -0.80849 -0.11774 -v -0.258471 -0.789947 -0.169312 -v -0.298282 -0.79125 -0.0438082 -v -0.330437 -0.769568 0.0557758 -v -0.303564 -0.797812 -0.0158585 -v -0.305842 -0.805335 0.043371 -v -0.229016 -0.765575 0.145487 -v -0.223175 -0.761747 0.0869317 -v -0.212596 -0.781475 0.0957214 -v -0.179768 -0.803629 -0.00575332 -v -0.205463 -0.797882 0.0725811 -v -0.203363 -0.823627 0.0194339 -v -0.219115 -0.798661 0.0985962 -v -0.25803 -0.79257 0.145836 -v -0.213341 -0.766473 -0.0217762 -v -0.247423 -0.744276 0.0744475 -v -0.236968 -0.756716 -0.00300948 -v -0.282727 -0.742141 0.0349428 -v -0.226833 -0.764364 -0.0800882 -v -0.193572 -0.766561 -0.175826 -v -0.202339 -0.769315 -0.0992399 -v -0.158395 -0.781737 -0.139601 -v -0.180303 -0.744665 -0.323542 -v -0.209897 -0.764964 -0.232659 -v -0.199248 -0.756391 -0.306068 -v -0.227105 -0.781143 -0.266781 -v -0.200642 -0.75631 -0.33274 -v -0.189468 -0.756672 -0.383923 -v -0.186098 -0.73976 -0.375812 -v -0.161768 -0.693841 -0.455752 -v -0.171293 -0.723373 -0.391754 -v -0.13512 -0.693793 -0.421418 -v 0.354078 0.0543616 0.409386 -v 0.433326 0.0585017 0.332846 -v 0.364424 0.107496 0.42333 -v 0.33436 0.148292 0.490161 -v 0.31841 0.106129 0.459073 -v 0.215346 0.103509 0.518977 -v -0.0666753 -0.402917 -0.58546 -v -0.00129636 -0.451127 -0.578654 -v -0.0655914 -0.452388 -0.57987 -v -0.0748126 -0.543824 -0.552155 -v -0.095894 -0.479233 -0.579862 -v -0.136804 -0.531068 -0.580263 -v -0.125524 -0.458927 -0.591044 -v -0.183516 -0.417718 -0.615372 -v -0.133728 -0.410992 -0.595968 -v -0.163153 -0.312699 -0.58603 -v -0.439976 0.415257 -0.289172 -v -0.494911 0.392065 -0.297318 -v -0.4551 0.37676 -0.314924 -v -0.457812 0.304962 -0.383542 -v -0.445259 0.344547 -0.326463 -v -0.426415 0.270923 -0.332042 -v -0.428931 0.34992 -0.304608 -v -0.407429 0.365257 -0.250063 -v -0.415971 0.389792 -0.280957 -v -0.372585 0.468716 -0.247472 -v 0.535733 0.405502 -0.24034 -v 0.491051 0.426661 -0.260346 -v 0.527987 0.384556 -0.27042 -v 0.498829 0.335015 -0.32314 -v 0.541665 0.352996 -0.290311 -v 0.558907 0.295066 -0.346715 -v 0.569103 0.341247 -0.273319 -v 0.627453 0.305655 -0.213724 -v 0.57957 0.358554 -0.232882 -v 0.579244 0.387011 -0.160395 -v 0.352053 0.210544 -0.615894 -v 0.305901 0.183787 -0.691638 -v 0.395838 0.20418 -0.615264 -v 0.483897 0.175774 -0.60308 -v 0.470164 0.226706 -0.527736 -v 0.486157 0.256505 -0.442109 -v 0.427502 0.229583 -0.53199 -v 0.346273 0.214625 -0.536367 -v -0.438853 0.225893 -0.568098 -v -0.410136 0.182847 -0.648831 -v -0.382248 0.215102 -0.615144 -v -0.254558 0.20079 -0.687522 -v -0.338395 0.218881 -0.618288 -v -0.257629 0.211128 -0.614719 -v -0.352301 0.228477 -0.580518 -v -0.372753 0.235131 -0.509627 -v -0.403436 0.241793 -0.537354 -v -0.484375 0.28157 -0.435644 -v -0.674425 0.214372 0.266027 -v -0.740624 0.185367 0.203928 -v -0.695482 0.22416 0.193919 -v -0.714227 0.246887 0.0472285 -v -0.678299 0.243999 0.152026 -v -0.631033 0.28374 0.073551 -v -0.645478 0.246781 0.180833 -v -0.582525 0.229978 0.23174 -v -0.626949 0.233051 0.24911 -v -0.570558 0.212701 0.378409 -v -0.0724927 0.185167 0.708591 -v -0.136722 0.183845 0.653973 -v -0.0330282 0.186614 0.686843 -v 0.0397687 0.17586 0.640485 -v 0.0408836 0.186591 0.685876 -v 0.184759 0.187888 0.663861 -v 0.0790429 0.185131 0.707134 -v 0.160087 0.170496 0.74105 -v 0.0415195 0.179768 0.733376 -v -0.0393787 0.156091 0.776308 -v -0.0824602 0.141741 -0.787926 -v -0.170406 0.0914622 -0.803763 -v -0.0425301 0.116359 -0.806212 -v 0.0414002 0.0570217 -0.829281 -v 0.0419861 0.11555 -0.806229 -v 0.207987 0.117082 -0.781406 -v 0.0834614 0.140193 -0.787929 -v 0.157566 0.179515 -0.740311 -v 0.0417419 0.1619 -0.773007 -v -0.0362884 0.191808 -0.734958 -v -0.758986 0.182349 -0.154444 -v -0.809208 0.114197 -0.0815138 -v -0.766757 0.150678 -0.201347 -v -0.768121 0.0841678 -0.294313 -v -0.698432 0.218099 -0.264084 -v -0.678395 0.277466 -0.16789 -v -0.393687 0.136839 0.688044 -v -0.333409 0.0868042 0.752597 -v -0.437977 0.113492 0.678779 -v -0.522 0.0578121 0.646864 -v 0.53097 0.140294 0.590093 -v 0.610464 0.0952955 0.55226 -v 0.508682 0.117818 0.629203 -v 0.452807 0.065806 0.699238 -v 0.440105 0.116897 0.679137 -v 0.290757 0.116539 0.757174 -v 0.396322 0.138477 0.688103 -v 0.309512 0.171792 0.691791 -v 0.422042 0.158014 0.650655 -v 0.464141 0.184459 0.571609 -v 0.742542 0.138315 -0.29031 -v 0.795959 0.078054 -0.213957 -v 0.767573 0.138994 -0.208774 -v 0.795087 0.13808 -0.040769 -v 0.758426 0.168122 -0.164462 -v 0.724289 0.22023 -0.0817604 -v 0.727606 0.19665 -0.202392 -v 0.661154 0.248027 -0.27376 -v 0.412231 0.0285726 -0.722189 -v 0.334464 -0.0462741 -0.763841 -v 0.451107 -0.00466669 -0.700726 -v 0.521152 -0.0697835 -0.645573 -v 0.517831 0.0659408 -0.641979 -v 0.43644 0.123717 -0.677645 -v -0.525701 0.00583889 -0.64919 -v -0.456158 -0.0672956 -0.699855 -v -0.454559 0.00289619 -0.701612 -v -0.301676 -0.00332059 -0.783761 -v -0.414614 0.0361368 -0.722545 -v -0.330354 0.0979732 -0.749748 -v -0.446742 0.0716752 -0.693351 -v -0.49953 0.13807 -0.62463 -v -0.779541 -0.000113846 0.301045 -v -0.805502 -0.0648918 0.215019 -v -0.80687 0.00275787 0.216557 -v -0.836497 0.00925924 0.0439168 -v -0.813884 0.0385611 0.173286 -v -0.810915 0.108114 0.0878018 -v -0.796392 0.0707342 0.21484 -v -0.749612 0.129124 0.291828 -v 0.0887878 0.0317525 0.831657 -v 0.174898 -0.0293054 0.822546 -v 0.0443586 -0.000723744 0.837511 -v -0.044907 -0.0677006 0.834819 -v -0.0446733 -0.00222618 0.837381 -v -0.218243 -0.00510961 0.812503 -v -0.0884744 0.029349 0.831471 -v -0.170861 0.0884466 0.804855 -v -0.0437027 0.0610489 0.828324 -v 0.043722 0.115861 0.808616 -v 0.813254 0.0446543 0.174434 -v 0.833242 -0.0166585 0.0892664 -v 0.806907 0.012955 0.21825 -v 0.779314 -0.047706 0.301947 -v 0.780023 0.0121775 0.302904 -v 0.703693 0.0112587 0.460573 -v 0.760138 0.0426503 0.342986 -v 0.708436 0.0991338 0.413708 -v 0.769273 0.073576 0.299696 -v 0.772615 0.130932 0.211097 -v -0.100284 -0.127639 -0.817664 -v -0.185317 -0.200793 -0.78277 -v -0.0614353 -0.171784 -0.808129 -v 0.00802798 -0.265025 -0.774857 -v 0.0244698 -0.174976 -0.806446 -v 0.196936 -0.171179 -0.779961 -v 0.0732354 -0.132863 -0.815106 -v 0.167091 -0.0507602 -0.817835 -v 0.0335505 -0.0905523 -0.827797 -v -0.0492333 -0.0113058 -0.837059 -v -0.807731 -0.082245 -0.170673 -v -0.800396 -0.138984 -0.0845923 -v -0.787256 -0.111465 -0.210597 -v -0.735704 -0.160546 -0.283224 -v -0.776359 -0.0504131 -0.29857 -v -0.807969 0.0153796 -0.215354 -v -0.40919 -0.11855 0.717259 -v -0.324364 -0.187459 0.736721 -v -0.507857 -0.160806 0.633343 -v -0.631534 -0.156734 0.511179 -v -0.521846 -0.082582 0.647577 -v -0.455816 -0.00866587 0.705632 -v 0.554078 -0.0790127 0.614971 -v 0.598874 -0.128829 0.539707 -v 0.513677 -0.107293 0.634492 -v 0.428431 -0.155441 0.661766 -v 0.443181 -0.109107 0.685257 -v 0.291249 -0.113774 0.764756 -v 0.41198 -0.0822285 0.71754 -v 0.341428 -0.0246945 0.769094 -v 0.453555 -0.0520699 0.70087 -v 0.529235 0.00887171 0.654555 -v 0.759513 -0.107174 -0.290296 -v 0.760774 -0.150024 -0.200138 -v 0.786602 -0.104879 -0.207797 -v 0.81659 -0.101696 -0.0391631 -v 0.807205 -0.0762131 -0.168501 -v 0.832895 -0.0156716 -0.0857324 -v 0.803194 -0.0473456 -0.2134 -v 0.780446 0.0134684 -0.300277 -v 0.379384 -0.232684 -0.652525 -v 0.301186 -0.29087 -0.644768 -v 0.405812 -0.242502 -0.613993 -v 0.446328 -0.241371 -0.537599 -v 0.470167 -0.22537 -0.570415 -v 0.582669 -0.200874 -0.465345 -v 0.491363 -0.187415 -0.603253 -v 0.437628 -0.143404 -0.679248 -v -0.472043 -0.228076 -0.579401 -v -0.382171 -0.271717 -0.588624 -v -0.410008 -0.242469 -0.625883 -v -0.281876 -0.279821 -0.69868 -v -0.389443 -0.227151 -0.664949 -v -0.336252 -0.179969 -0.734062 -v -0.704113 -0.226912 0.255541 -v -0.68979 -0.229867 0.171279 -v -0.727246 -0.21468 0.183542 -v -0.751942 -0.198886 0.0341326 -v -0.754796 -0.194066 0.152555 -v -0.801283 -0.145283 0.0814423 -v -0.761628 -0.178763 0.197636 -v -0.762009 -0.134591 0.290307 -v -0.735735 -0.188803 0.274814 -v -0.659083 -0.218108 0.420051 -v 0.0760203 -0.196078 0.761492 -v 0.146169 -0.216029 0.708214 -v 0.0322351 -0.219468 0.74171 -v -0.051817 -0.258469 0.692775 -v -0.0483072 -0.231334 0.74149 -v -0.202664 -0.262115 0.721601 -v -0.0877205 -0.216333 0.761417 -v -0.16945 -0.171206 0.78757 -v -0.0459189 -0.18681 0.784205 -v 0.0411385 -0.125755 0.816685 -v 0.753119 -0.158925 0.163147 -v 0.725896 -0.17902 0.08168 -v 0.723672 -0.17183 0.197671 -v 0.661156 -0.184328 0.258755 -v 0.699248 -0.172604 0.272975 -v 0.630453 -0.175728 0.412872 -v 0.703177 -0.160221 0.317186 -v 0.698097 -0.125334 0.40526 -v 0.735599 -0.143539 0.285633 -v 0.79051 -0.100811 0.213946 -v -0.669796 -0.199691 -0.142673 -v -0.639079 -0.183348 -0.0681291 -v -0.638463 -0.192891 -0.171427 -v -0.577627 -0.164485 -0.222986 -v -0.616305 -0.193959 -0.237969 -v -0.554157 -0.203941 -0.361649 -v -0.659542 -0.203181 -0.253986 -v -0.725718 -0.191258 -0.194948 -v 0.460329 -0.190601 0.509616 -v 0.481251 -0.172236 0.431259 -v 0.418646 -0.186678 0.514308 -v 0.341056 -0.165875 0.519259 -v 0.360836 -0.190279 0.5544 -v 0.235152 -0.201913 0.615957 -v 0.341556 -0.197717 0.59226 -v 0.294873 -0.200815 0.665522 -v 0.384784 -0.197227 0.592699 -v 0.473028 -0.182789 0.584311 -v 0.61511 -0.178311 -0.228925 -v 0.597784 -0.143921 -0.148889 -v 0.637209 -0.174209 -0.161401 -v 0.662283 -0.171046 -0.0243704 -v 0.66861 -0.180488 -0.13335 -v 0.726247 -0.18054 -0.0701547 -v 0.68179 -0.185692 -0.175938 -v 0.699975 -0.181347 -0.264658 -v 0.658469 -0.189594 -0.246966 -v 0.592252 -0.203088 -0.379031 -v 0.30085 -0.200777 -0.514821 -v 0.225854 -0.15008 -0.520956 -v 0.31643 -0.162196 -0.48673 -v 0.349476 -0.0820129 -0.43578 -v 0.367277 -0.14712 -0.450523 -v 0.454377 -0.123041 -0.362574 -v 0.391942 -0.199909 -0.47497 -v 0.365413 -0.251961 -0.543347 -v -0.403319 -0.166805 -0.445355 -v -0.422456 -0.0939864 -0.383929 -v -0.369121 -0.141035 -0.452718 -v -0.305852 -0.0793553 -0.471542 -v -0.321446 -0.151467 -0.486578 -v -0.219744 -0.175771 -0.537065 -v -0.305357 -0.190839 -0.513638 -v -0.266551 -0.271486 -0.568937 -v -0.340352 -0.214229 -0.512616 -v -0.415065 -0.240457 -0.5105 -v 0.0334963 -0.146025 0.577848 -v -0.02473 -0.0901347 0.556498 -v -0.0278792 -0.152936 0.576775 -v -0.146217 -0.169134 0.55709 -v -0.0616594 -0.186428 0.58836 -v -0.137114 -0.255756 0.606545 -v -0.0340266 -0.20818 0.607957 -v 0.0268123 -0.232798 0.650747 -v 0.0302442 -0.198043 0.610671 -v 0.160514 -0.181269 0.595041 -v -0.067436 -0.0763538 -0.552286 -v -0.117082 0.00850896 -0.54663 -v -0.035399 -0.0366813 -0.553944 -v 0.0264351 0.0385011 -0.561514 -v 0.0218985 -0.0391819 -0.554043 -v 0.13658 -0.0378534 -0.537338 -v 0.048307 -0.0827699 -0.553032 -v 0.103175 -0.174133 -0.554745 -v -0.533336 -0.0448489 -0.143497 -v -0.555521 -0.0521127 -0.0272875 -v -0.528793 -0.00563696 -0.111025 -v -0.522631 0.0742311 -0.0479553 -v -0.509842 0.0390524 -0.135777 -v -0.4755 0.136336 -0.184052 -v -0.491768 -0.00270801 -0.223795 -v -0.490748 -0.0833434 -0.287058 -v -0.299276 -0.0334082 0.466119 -v -0.35042 0.0400422 0.437193 -v -0.346806 -0.0333566 0.432552 -v -0.430103 -0.0288642 0.351801 -v -0.370914 -0.0729437 0.415461 -v -0.424746 -0.155262 0.382868 -v -0.34958 -0.11383 0.437038 -v -0.305348 -0.192466 0.484711 -v -0.30064 -0.112343 0.470791 -v -0.196464 -0.104377 0.522952 -v 0.516023 0.0685994 0.204302 -v 0.534094 0.0157366 0.156007 -v 0.532118 0.0750205 0.159838 -v 0.546876 0.092809 0.0712902 -v 0.542447 0.106514 0.13946 -v 0.567398 0.166683 0.0967513 -v 0.544147 0.128245 0.164496 -v 0.554007 0.163685 0.220431 -v 0.349691 0.135876 -0.446583 -v 0.419932 0.158361 -0.361512 -v 0.339751 0.0651585 -0.434652 -v 0.29422 -0.0179694 -0.465642 -v 0.295665 0.0572951 -0.469895 -v 0.195264 0.0447657 -0.525093 -v -0.0629706 0.172443 -0.626839 -v -0.133289 0.199229 -0.658148 -v -0.0312718 0.186342 -0.649129 -v 0.0380249 0.199643 -0.6921 -v 0.0328235 0.152879 -0.609434 -v -0.0297672 0.104257 -0.58053 -v -0.336186 0.152164 -0.458605 -v -0.307526 0.18943 -0.518311 -v -0.295195 0.138296 -0.49279 -v -0.198906 0.118161 -0.545931 -v -0.269774 0.100519 -0.498467 -v -0.221712 0.0211741 -0.511871 -v -0.290729 0.0714922 -0.474867 -v -0.338118 0.00699061 -0.432978 -v -0.505986 0.101017 0.234621 -v -0.502091 0.153267 0.297922 -v -0.521337 0.141533 0.210327 -v -0.555211 0.21805 0.15692 -v -0.532256 0.154575 0.154532 -v -0.530794 0.183766 0.0418354 -v -0.529489 0.124463 0.124208 -v -0.53246 0.0555372 0.0646318 -v -0.52253 0.0798779 0.149999 -v -0.511746 -0.00766102 0.201806 -v -0.310922 0.16442 0.545331 -v -0.270492 0.186055 0.613532 -v -0.404061 0.183096 0.504885 -v -0.496274 0.194578 0.408856 -v -0.416262 0.170609 0.4676 -v -0.435714 0.135625 0.39816 -v 0.0378715 0.100015 0.568311 -v -0.026452 0.145792 0.602808 -v -0.0547202 0.0699615 0.560793 -v -0.112154 0.00568969 0.541952 -v -0.0238367 0.0401091 0.552994 -v 0.0358327 -0.0215854 0.545391 -v 0.514309 0.0743678 -0.13357 -v 0.532482 0.131193 -0.0513403 -v 0.528489 0.0572637 -0.0894955 -v 0.547725 0.0378435 0.0101162 -v 0.538614 -0.0222548 -0.122479 -v 0.544912 -0.0967846 -0.19613 -v 0.519622 -0.0261146 -0.181148 -v 0.466672 -0.0482068 -0.297351 -v 0.465056 0.333895 -0.251904 -v 0.44443 0.404214 -0.228608 -v 0.462818 0.346433 -0.221495 -v 0.458741 0.376864 -0.168669 -v 0.470369 0.322235 -0.198961 -v 0.49216 0.276981 -0.147078 -v 0.471569 0.267823 -0.242787 -v 0.456645 0.243199 -0.323093 -v 0.167377 0.694208 -0.176865 -v 0.124703 0.687675 -0.193413 -v 0.184016 0.680223 -0.189158 -v 0.214466 0.649267 -0.203713 -v 0.221574 0.666574 -0.191757 -v 0.29402 0.633778 -0.198139 -v 0.243631 0.666671 -0.182013 -v 0.286199 0.659045 -0.158896 -v 0.227643 0.680536 -0.167573 -v 0.191168 0.699898 -0.137727 -v 0.439247 0.54307 -0.128921 -v 0.400396 0.559237 -0.107564 -v 0.407207 0.571471 -0.127332 -v 0.340135 0.622514 -0.123058 -v 0.3921 0.589128 -0.140769 -v 0.356976 0.616505 -0.167758 -v 0.408262 0.578273 -0.158064 -v 0.434006 0.549724 -0.192783 -v 0.389896 0.489833 -0.145634 -v 0.356231 0.512632 -0.17259 -v 0.362584 0.516228 -0.142854 -v 0.303248 0.562587 -0.135007 -v 0.374888 0.52796 -0.116771 -v 0.418732 0.515505 -0.104859 -v 0.403477 0.500839 -0.118555 -v 0.453611 0.437688 -0.117988 -v 0.357071 0.553511 -0.218306 -v 0.317714 0.559921 -0.20263 -v 0.365024 0.531974 -0.217216 -v 0.383141 0.492699 -0.205299 -v 0.391666 0.506178 -0.223653 -v 0.43667 0.449733 -0.242492 -v 0.411468 0.501599 -0.231271 -v 0.45206 0.489899 -0.236589 -v 0.406123 0.524375 -0.228383 -v 0.392133 0.566942 -0.211883 -v 0.179304 0.65798 -0.0929145 -v 0.102432 0.678016 -0.0883375 -v 0.163282 0.674596 -0.0925833 -v 0.128047 0.702851 -0.100759 -v 0.185637 0.678775 -0.0972856 -v 0.229465 0.680227 -0.115371 -v 0.224294 0.665056 -0.099511 -v 0.298411 0.63006 -0.102912 -v 0.150505 0.6321 -0.164087 -v 0.114768 0.639232 -0.133967 -v 0.201951 0.611409 -0.152742 -v 0.267674 0.5787 -0.16006 -v 0.219211 0.606553 -0.168951 -v 0.255512 0.600346 -0.196173 -v 0.203372 0.617939 -0.181344 -v 0.172851 0.644546 -0.197363 -v -0.270904 0.640934 -0.174705 -v -0.320349 0.619374 -0.147402 -v -0.312565 0.615063 -0.180024 -v -0.392504 0.554843 -0.19488 -v -0.300728 0.602276 -0.207344 -v -0.250261 0.610641 -0.214112 -v -0.260616 0.627869 -0.201049 -v -0.179251 0.670179 -0.191776 -v -0.0614566 0.712089 -0.107539 -v -0.148563 0.694338 -0.110127 -v -0.0602717 0.719297 -0.136188 -v -0.015387 0.721333 -0.163453 -v 0.00404186 0.722289 -0.12076 -v 0.0452283 0.711805 -0.0971816 -v -0.0745135 0.650092 -0.108914 -v -0.119069 0.656759 -0.0909133 -v -0.0169717 0.665534 -0.09703 -v 0.0610327 0.66408 -0.0976863 -v 0.00322292 0.65864 -0.108159 -v 0.0415174 0.648491 -0.134242 -v -0.015294 0.651096 -0.121234 -v -0.0511433 0.642181 -0.14906 -v -0.0508906 0.663603 -0.189909 -v -0.0129033 0.652253 -0.1732 -v 0.0067554 0.679146 -0.192507 -v 0.0467306 0.699578 -0.190501 -v -0.0130181 0.68912 -0.193376 -v -0.055372 0.704676 -0.185307 -v -0.334108 0.569961 -0.0914457 -v -0.382461 0.560436 -0.102971 -v -0.317654 0.595364 -0.0964732 -v -0.279111 0.638466 -0.115306 -v -0.275266 0.621525 -0.096689 -v -0.189557 0.663714 -0.0934548 -v -0.25044 0.622716 -0.0921416 -v -0.201081 0.62339 -0.0937456 -v -0.238202 0.575609 -0.190467 -v -0.278039 0.566127 -0.217329 -v -0.553311 0.410013 -0.158933 -v -0.500196 0.444739 -0.224828 -v -0.515912 0.448485 -0.16179 -v -0.441277 0.523774 -0.158131 -v -0.499761 0.46555 -0.131421 -v -0.459656 0.490806 -0.0913212 -v -0.517614 0.441619 -0.0986744 -v -0.539246 0.383264 -0.0343229 -v -0.554233 0.403649 -0.087147 -v -0.624203 0.332294 -0.0479202 -v -0.480122 0.336348 -0.0716113 -v -0.484719 0.401115 -0.0518591 -v -0.458335 0.378884 -0.0832732 -v -0.40256 0.456214 -0.0981406 -v -0.432628 0.360458 -0.138174 -v -0.431394 0.304131 -0.205341 -v -0.453031 0.316362 -0.133083 -v -0.485535 0.2199 -0.11192 -v -0.590429 -0.202778 0.212068 -v -0.537918 -0.239631 0.320344 -v -0.560075 -0.184924 0.237117 -v -0.500418 -0.134892 0.285252 -v -0.552795 -0.150347 0.205971 -v -0.543053 -0.0743741 0.146384 -v -0.570671 -0.139723 0.148272 -v -0.587208 -0.124386 0.0294157 -v -0.595263 -0.161988 0.120711 -v -0.643502 -0.194172 0.0624151 -v 0.571714 -0.0994503 0.159562 -v 0.530645 -0.0494478 0.207074 -v 0.556937 -0.128281 0.251438 -v 0.560955 -0.167285 0.325908 -v 0.584882 -0.147297 0.229374 -v 0.642804 -0.173763 0.178846 -v -0.407677 -0.631033 0.388549 -v -0.363361 -0.671746 0.367534 -v -0.393707 -0.66375 0.350831 -v -0.366139 -0.721978 0.267187 -v -0.39981 -0.672412 0.321431 -v -0.401896 -0.684638 0.26468 -v -0.417811 -0.649083 0.330888 -v -0.441283 -0.602039 0.349358 -v -0.339372 -0.399547 0.608826 -v -0.303238 -0.436101 0.57921 -v -0.3501 -0.442032 0.579283 -v -0.359423 -0.525472 0.52024 -v -0.382903 -0.463749 0.557266 -v -0.433286 -0.502655 0.506621 -v -0.413615 -0.440947 0.558725 -v -0.48563 -0.387192 0.538651 -v -0.340821 -0.358774 0.491541 -v -0.403775 -0.393348 0.445396 -v -0.35079 -0.400909 0.480556 -v -0.355437 -0.480762 0.448571 -v -0.332182 -0.427648 0.493148 -v -0.312691 -0.48028 0.505985 -v -0.307677 -0.413563 0.521304 -v -0.261907 -0.382236 0.580178 -v -0.29174 -0.372013 0.53655 -v -0.241275 -0.287272 0.555955 -v -0.500531 -0.434215 0.430573 -v -0.460274 -0.460744 0.414693 -v -0.496384 -0.408583 0.422749 -v -0.467923 -0.353543 0.416978 -v -0.514155 -0.370829 0.415695 -v -0.558302 -0.300743 0.369675 -v -0.537501 -0.381766 0.437567 -v -0.510466 -0.42773 0.478675 -v -0.308739 -0.611715 0.403932 -v -0.305605 -0.626888 0.350818 -v -0.299754 -0.643215 0.365673 -v -0.275206 -0.700467 0.283911 -v -0.310097 -0.659658 0.375524 -v -0.343783 -0.637285 0.416421 -v -0.319676 -0.627362 0.414951 -v -0.327687 -0.556574 0.487256 -v -0.369893 -0.622138 0.293738 -v -0.324643 -0.650906 0.268473 -v -0.358546 -0.607898 0.317279 -v -0.337256 -0.583996 0.367653 -v -0.369966 -0.578129 0.35049 -v -0.389855 -0.511258 0.40427 -v -0.393849 -0.562532 0.359674 -v -0.438239 -0.534316 0.37992 -v -0.405527 -0.579837 0.339913 -v -0.417875 -0.618707 0.306399 -v -0.212066 -0.834244 -0.185323 -v -0.164837 -0.838205 -0.230116 -v -0.195156 -0.829143 -0.237441 -v -0.164642 -0.80698 -0.338777 -v -0.201314 -0.81757 -0.265999 -v -0.206661 -0.789195 -0.31697 -v -0.221814 -0.812055 -0.242779 -v -0.250811 -0.797871 -0.194583 -v -0.240989 -0.808936 0.0946002 -v -0.206987 -0.833272 -0.00992402 -v -0.247742 -0.818421 0.0645063 -v -0.261431 -0.828064 0.00247003 -v -0.272755 -0.811256 0.0853749 -v -0.31963 -0.788411 0.124983 -v -0.28992 -0.794824 0.136602 -v -0.321218 -0.754406 0.23537 -v -0.226109 -0.759226 0.0565446 -v -0.191612 -0.789257 0.0168508 -v -0.239188 -0.746183 0.135369 -v -0.269222 -0.706135 0.227678 -v -0.257891 -0.728333 0.152386 -v -0.299315 -0.696244 0.18377 -v -0.26319 -0.728946 0.121852 -v -0.276325 -0.735535 0.0631246 -v -0.322919 -0.749778 0.0525168 -v -0.31966 -0.722283 0.101745 -v -0.352749 -0.734855 0.124948 -v -0.370085 -0.73451 0.178731 -v -0.346989 -0.753752 0.104151 -v -0.323514 -0.789573 0.0635025 -v -0.13139 -0.808006 -0.160083 -v -0.124122 -0.784004 -0.210705 -v -0.1146 -0.802977 -0.210739 -v -0.080505 -0.782364 -0.308319 -v -0.107051 -0.809509 -0.237791 -v -0.101273 -0.814693 -0.294476 -v -0.119664 -0.822739 -0.214905 -v -0.154737 -0.841268 -0.169021 -v -0.136855 -0.827998 -0.162977 -v -0.169771 -0.82733 -0.0577465 -v -0.187079 -0.759307 -0.251394 -v -0.140455 -0.751313 -0.2884 -v -0.178175 -0.76229 -0.223155 -v -0.163008 -0.773614 -0.167343 -v -0.225216 -0.769183 -0.18526 -v -0.230583 -0.776184 -0.240274 -v -0.141874 -0.439009 -0.681326 -v -0.166029 -0.477789 -0.636767 -v -0.130356 -0.487673 -0.661602 -v -0.122664 -0.581292 -0.614803 -v -0.0994089 -0.515577 -0.659804 -v -0.0466853 -0.567725 -0.640565 -v -0.0678801 -0.492715 -0.678231 -v 0.0181396 -0.436049 -0.704305 -v -0.0705103 -0.441727 -0.701803 -v -0.0925891 -0.338844 -0.742778 -v -0.0739411 -0.711244 -0.514563 -v -0.123227 -0.739184 -0.477307 -v -0.0886882 -0.743392 -0.472039 -v -0.117308 -0.79549 -0.380796 -v -0.0785516 -0.757502 -0.445418 -v -0.0669488 -0.776991 -0.390056 -v -0.0547486 -0.740425 -0.461939 -v -0.0175444 -0.69966 -0.491829 -v -0.038886 -0.708242 -0.504209 -v -0.00553297 -0.632785 -0.580227 -v -0.0335764 -0.670449 -0.470903 -v -0.0314112 -0.71678 -0.440313 -v -0.0481441 -0.700293 -0.433529 -v -0.0777587 -0.746856 -0.350525 -v -0.0696155 -0.706236 -0.412691 -v -0.114942 -0.718406 -0.374994 -v -0.0792984 -0.686532 -0.431813 -v -0.102382 -0.652281 -0.471003 -v -0.152884 -0.665275 -0.492227 -v -0.143674 -0.683142 -0.444681 -v -0.170262 -0.715138 -0.442275 -v -0.177645 -0.756433 -0.408952 -v -0.164553 -0.710568 -0.467567 -v -0.140193 -0.696649 -0.515815 -v -0.155269 -0.681148 -0.505707 -v -0.146313 -0.610253 -0.571503 -v 0.0837461 -0.475142 -0.608768 -v 0.0805126 -0.406858 -0.593906 -v 0.140161 -0.410272 -0.63604 -v 0.176234 -0.364867 -0.674671 -v 0.120327 -0.438596 -0.648804 -v 0.0590169 -0.491052 -0.663309 -v 0.0862882 -0.486784 -0.636578 -v 0.0364003 -0.581308 -0.593276 -v 0.64602 0.209987 0.181371 -v 0.656354 0.239501 0.0470221 -v 0.675627 0.212539 0.151061 -v 0.731583 0.202088 0.0804124 -v 0.692625 0.202229 0.192433 -v 0.715389 0.170627 0.280915 -v 0.539615 0.285204 -0.0601586 -v 0.50487 0.32151 -0.103037 -v 0.531118 0.328727 -0.074796 -v 0.495313 0.413202 -0.096617 -v 0.559096 0.348316 -0.074907 -v 0.603519 0.334468 -0.0899047 -v 0.577907 0.310915 -0.053257 -v 0.607955 0.250044 0.0154454 -v 0.573436 0.275103 -0.0296651 -v 0.562647 0.200065 0.0169965 -v 0.313912 -0.0697705 0.463309 -v 0.375406 -0.121396 0.453334 -v 0.378355 -0.0356269 0.401706 -v 0.41374 0.0278597 0.353073 -v 0.318229 0.164091 0.528601 -v 0.247807 0.12722 0.520733 -v 0.409545 0.178251 0.493606 -v 0.379652 0.190252 0.576414 -v 0.0201435 -0.479135 -0.5775 -v -0.0451057 -0.522139 -0.559616 -v -0.0668452 -0.603974 -0.515034 -v -0.11443 -0.637601 -0.491661 -v -0.0831551 -0.584077 -0.530076 -v -0.119129 -0.548133 -0.562389 -v -0.120899 -0.587599 -0.539575 -v -0.134076 -0.655124 -0.479879 -v -0.144724 -0.597118 -0.55491 -v -0.148499 -0.569061 -0.598069 -v -0.147156 -0.557343 -0.579195 -v -0.163582 -0.467292 -0.610418 -v -0.163337 -0.496059 -0.616604 -v -0.139243 -0.55309 -0.619174 -v -0.188021 -0.428294 -0.647517 -v -0.261249 -0.332832 -0.65815 -v -0.205263 -0.39699 -0.632308 -v -0.191104 -0.340415 -0.597535 -v -0.241765 -0.316679 -0.593096 -v -0.357947 -0.261587 -0.54849 -v -0.234047 -0.248157 -0.560282 -v -0.166444 -0.187987 -0.553249 -v -0.484625 0.328608 -0.361694 -v -0.529257 0.376449 -0.283777 -v -0.445812 0.269987 -0.455664 -v -0.380807 0.230886 -0.476143 -v -0.440961 0.276687 -0.424354 -v -0.429135 0.275566 -0.366983 -v -0.413202 0.246585 -0.404079 -v -0.349995 0.204417 -0.482753 -v -0.418565 0.224524 -0.332634 -v -0.420587 0.317854 -0.268488 -v -0.430205 0.282079 -0.246503 -v -0.465394 0.232799 -0.162621 -v -0.400011 0.379107 -0.220593 -v -0.380269 0.438116 -0.243667 -v -0.32487 0.511889 -0.221107 -v -0.30078 0.562022 -0.225104 -v 0.453 0.466477 -0.247218 -v 0.453221 0.418666 -0.25589 -v 0.471061 0.435106 -0.260864 -v 0.495644 0.369204 -0.296074 -v 0.473288 0.481816 -0.232003 -v 0.421586 0.540193 -0.217548 -v 0.47869 0.37694 -0.286638 -v 0.454737 0.394528 -0.250403 -v 0.4715 0.312784 -0.312483 -v 0.439942 0.230319 -0.368379 -v 0.480955 0.305355 -0.337667 -v 0.525592 0.29998 -0.356288 -v 0.490757 0.275889 -0.399712 -v 0.399142 0.22944 -0.493128 -v 0.563122 0.270665 -0.383027 -v 0.613989 0.296337 -0.27325 -v 0.679237 0.25096 -0.20066 -v 0.701302 0.237875 -0.0410702 -v 0.658938 0.280515 -0.171505 -v 0.605756 0.350214 -0.157554 -v 0.621359 0.324328 -0.114981 -v 0.620281 0.274456 -0.0211007 -v 0.20088 0.163243 -0.749902 -v 0.288018 0.119093 -0.755783 -v 0.277138 0.165462 -0.725785 -v 0.418726 0.171827 -0.650979 -v 0.189863 0.19342 -0.711361 -v 0.0399756 0.191246 -0.734827 -v 0.393711 0.147888 -0.688335 -v 0.33046 0.0912876 -0.75007 -v 0.408958 0.225398 -0.453701 -v 0.41533 0.187942 -0.389176 -v -0.43263 0.133228 -0.675976 -v -0.28677 0.124973 -0.7554 -v -0.388525 0.156989 -0.686886 -v -0.298806 0.190531 -0.691743 -v -0.153672 0.18236 -0.740535 -v -0.0718727 0.19918 -0.71208 -v -0.184404 0.196772 -0.711987 -v -0.235984 0.210747 -0.648084 -v -0.272554 0.171319 -0.725579 -v -0.207577 0.121244 -0.781273 -v -0.0337311 0.200027 -0.692405 -v -0.17182 0.205652 -0.671086 -v -0.160154 0.192891 -0.629247 -v -0.207599 0.168338 -0.57434 -v -0.220331 0.199695 -0.60882 -v -0.327303 0.220276 -0.54801 -v -0.292889 0.201045 -0.550084 -v -0.229126 0.149197 -0.547915 -v -0.774909 0.133144 0.211164 -v -0.800253 0.142011 0.0466448 -v -0.76936 0.163487 0.168002 -v -0.73786 0.219593 0.0857101 -v -0.762944 0.199295 0.0475923 -v -0.798081 0.145358 -0.0367659 -v -0.730916 0.237382 -0.0659619 -v -0.664273 0.300851 -0.123396 -v -0.711023 0.258021 -0.026031 -v -0.660647 0.282675 0.0446116 -v -0.533806 0.403034 -0.239057 -v -0.607937 0.319587 -0.253063 -v -0.471927 0.459388 -0.243853 -v -0.455319 0.504865 -0.185411 -v -0.657271 0.301663 -0.0203772 -v -0.62725 0.335115 -0.141739 -v -0.598207 0.339172 -0.0204613 -v -0.540215 0.348751 -0.0117986 -v -0.601661 0.309606 0.0360212 -v -0.595351 0.250434 0.165949 -v -0.576583 0.250258 0.127649 -v -0.541583 0.215016 0.0685497 -v -0.545626 0.198509 0.21881 -v -0.500649 0.172612 0.332895 -v -0.554171 0.21026 0.255331 -v -0.567251 0.215483 0.33556 -v -0.532497 0.204039 0.353416 -v -0.466835 0.162702 0.384293 -v -0.164955 0.176252 0.62562 -v -0.0293034 0.1757 0.642488 -v 0.0390818 0.146234 0.599843 -v 0.16606 0.147518 0.574995 -v 0.0730997 0.163482 0.616236 -v 0.145546 0.183873 0.648562 -v 0.225346 0.147495 0.552346 -v 0.174725 0.176639 0.61681 -v 0.277965 0.185029 0.605045 -v 0.359998 0.189028 0.617189 -v 0.253085 0.189056 0.642239 -v 0.193897 0.181164 0.709917 -v 0.267054 0.182387 0.686549 -v 0.402299 0.183655 0.616414 -v 0.27924 0.15697 0.72612 -v 0.210653 0.116796 0.783813 -v 0.202972 0.156896 0.752011 -v 0.0428554 0.15625 0.776168 -v 0.0851825 0.13813 0.791617 -v 0.172333 0.0909693 0.804901 -v -0.0417207 0.115445 0.808672 -v -0.208607 0.114703 0.783933 -v -0.295547 0.0650454 -0.775485 -v -0.220043 -0.00616727 -0.811734 -v -0.214792 0.0622634 -0.803627 -v -0.0457376 0.0579938 -0.829338 -v -0.0909911 0.0253828 -0.832983 -v -0.180311 -0.0450379 -0.819754 -v 0.0388285 -0.0124803 -0.836827 -v 0.21158 -0.0117553 -0.810487 -v 0.0842086 0.0232362 -0.832693 -v 0.168815 0.0879684 -0.80375 -v 0.211749 0.0576802 -0.803393 -v 0.294813 -0.0102179 -0.782372 -v -0.825019 0.0767224 0.0445427 -v -0.837398 0.0120473 -0.043387 -v -0.825484 0.0794585 -0.0413622 -v -0.795585 0.0834825 -0.211005 -v -0.815495 0.0487709 -0.171386 -v -0.833301 -0.0201868 -0.0867315 -v -0.215757 0.0589563 0.803911 -v -0.301494 -0.00635651 0.786522 -v -0.298265 0.0582272 0.778385 -v -0.451227 0.0574624 0.698557 -v -0.417862 0.0256285 0.727772 -v -0.340384 -0.0423283 0.768487 -v 0.694934 0.070489 0.455855 -v 0.653511 0.0108648 0.532023 -v 0.645922 0.0690756 0.526527 -v 0.523598 0.0668047 0.64771 -v 0.676879 0.123792 0.44347 -v 0.748432 0.128201 0.292387 -v 0.457539 0.00777039 0.706635 -v 0.302255 0.00513207 0.787107 -v 0.419293 0.0368012 0.728544 -v 0.33511 0.0913904 0.752855 -v 0.56178 0.0389012 0.624936 -v 0.624626 -0.0196556 0.563792 -v 0.299485 0.0639949 0.778774 -v 0.218518 0.00317746 0.812932 -v 0.807792 0.0147484 -0.21579 -v 0.836801 0.0155175 -0.0428147 -v 0.815285 0.0468267 -0.172646 -v 0.807724 0.108818 -0.0847048 -v 0.808534 0.106738 0.0871025 -v 0.765627 0.156959 0.16672 -v 0.796652 0.136776 0.0442096 -v 0.754045 0.191722 -0.0399217 -v 0.824245 0.0779207 -0.0426317 -v 0.835933 0.0149122 0.0449344 -v 0.737233 0.175205 0.202624 -v 0.756914 0.186937 0.0418146 -v 0.705728 0.224518 0.0393663 -v 0.647768 0.264889 -0.0125817 -v 0.207077 -0.0897231 -0.801708 -v 0.280962 -0.163869 -0.755085 -v 0.291216 -0.0867744 -0.77583 -v 0.448474 -0.0755794 -0.696696 -v 0.406315 -0.114365 -0.712782 -v 0.315456 -0.193716 -0.723952 -v -0.448946 -0.134605 -0.685457 -v -0.302958 -0.149874 -0.763069 -v -0.417944 -0.104496 -0.717917 -v -0.343344 -0.0379643 -0.766291 -v -0.305135 -0.0770246 -0.779814 -v -0.224935 -0.158021 -0.78715 -v -0.789604 -0.127634 0.208539 -v -0.818178 -0.117222 0.0418391 -v -0.810764 -0.0945972 0.170434 -v -0.833398 -0.0261071 0.0874786 -v -0.755484 -0.106155 0.335892 -v -0.69488 -0.178695 0.396608 -v -0.834472 -0.0573283 0.0439511 -v -0.816924 -0.114062 -0.042738 -v 0.298642 -0.0564694 0.781875 -v 0.21023 -0.117062 0.791836 -v 0.215849 -0.0591257 0.809503 -v 0.0432919 -0.064611 0.834837 -v 0.0860475 -0.0939344 0.825419 -v 0.165111 -0.145041 0.786991 -v -0.0451571 -0.130752 0.816869 -v -0.212073 -0.142551 0.792334 -v -0.088447 -0.102021 0.825585 -v -0.175244 -0.0384276 0.822267 -v -0.216203 -0.0744588 0.809417 -v -0.291039 -0.148732 0.765296 -v 0.833163 -0.0463573 -0.0410568 -v 0.818068 -0.100969 0.0459621 -v 0.834378 -0.0467389 0.046193 -v 0.806279 -0.0472131 0.218017 -v 0.811378 -0.0749577 0.174253 -v 0.80107 -0.123639 0.0871726 -v 0.763979 -0.101219 0.296119 -v 0.688096 -0.102901 0.448172 -v 0.757882 -0.0758581 0.340356 -v 0.726677 -0.0190229 0.422492 -v 0.702179 -0.0490832 0.457624 -v 0.637007 -0.104064 0.516041 -v -0.294679 -0.219239 -0.734295 -v -0.218153 -0.3 -0.722879 -v -0.221767 -0.231915 -0.758922 -v -0.0723249 -0.255904 -0.778985 -v -0.116185 -0.290344 -0.760461 -v -0.186086 -0.343601 -0.711448 -v -0.0276608 -0.357389 -0.738976 -v 0.0719411 -0.40635 -0.705874 -v 0.0290959 -0.318009 -0.752532 -v 0.145434 -0.219148 -0.773363 -v 0.1818 -0.256657 -0.744608 -v 0.265317 -0.292161 -0.678247 -v -0.788602 -0.166246 0.0381512 -v -0.752263 -0.194666 -0.0422227 -v -0.788969 -0.163107 -0.0433063 -v -0.761492 -0.160015 -0.204445 -v -0.755295 -0.178047 -0.160945 -v -0.727459 -0.20093 -0.0785099 -v -0.206922 -0.206748 0.761466 -v -0.272819 -0.278542 0.702047 -v 0.662316 -0.146703 0.432482 -v 0.58538 -0.178065 0.475931 -v 0.614182 -0.149034 0.49906 -v 0.496211 -0.152979 0.613403 -v 0.408082 -0.185851 0.63018 -v 0.266993 -0.19495 0.700256 -v 0.384357 -0.174363 0.66864 -v 0.325503 -0.137791 0.735604 -v 0.517083 -0.168839 0.574408 -v 0.544044 -0.186553 0.490981 -v 0.281128 -0.162322 0.736529 -v 0.190906 -0.201284 0.72199 -v 0.724876 -0.177915 -0.189027 -v 0.75117 -0.173647 -0.0343912 -v 0.754594 -0.164981 -0.155594 -v 0.79995 -0.126197 -0.0803847 -v 0.703649 -0.171337 -0.310308 -v 0.631206 -0.196223 -0.359502 -v 0.788459 -0.146178 -0.0377702 -v 0.750301 -0.172166 0.0435538 -v 0.541707 -0.21478 -0.479836 -v 0.460662 -0.231571 -0.499484 -v 0.266822 -0.312937 -0.636023 -v 0.388016 -0.260548 -0.577978 -v 0.196045 -0.330563 -0.694085 -v 0.090793 -0.436261 -0.682558 -v -0.303052 -0.293812 -0.663208 -v -0.338545 -0.284251 -0.587013 -v -0.456168 -0.241335 -0.506364 -v -0.475262 -0.203873 -0.428472 -v -0.649121 -0.221631 0.160719 -v -0.666758 -0.203614 0.0303958 -v -0.677651 -0.222927 0.132772 -v -0.728713 -0.210841 0.0697802 -v -0.63987 -0.249665 0.260341 -v -0.576027 -0.248188 0.299064 -v -0.710004 -0.212067 0.0321032 -v -0.664184 -0.197673 -0.0364695 -v 0.250478 -0.208726 0.65773 -v 0.167762 -0.210745 0.635702 -v 0.177862 -0.217607 0.678688 -v 0.0268918 -0.240412 0.69602 -v 0.0631568 -0.23387 0.672341 -v 0.130189 -0.202351 0.621784 -v -0.0464316 -0.249974 0.645812 -v -0.179382 -0.294814 0.607908 -v -0.0887958 -0.269104 0.664162 -v -0.165698 -0.275621 0.704344 -v -0.203794 -0.309713 0.671756 -v -0.278695 -0.392576 0.608258 -v 0.70662 -0.182061 -0.0295899 -v 0.663855 -0.171588 0.0440453 -v 0.707138 -0.182023 0.0442999 -v 0.68373 -0.183004 0.188839 -v 0.67221 -0.180203 0.149453 -v 0.640726 -0.158684 0.0768288 -v 0.621832 -0.175634 0.244269 -v 0.560456 -0.180123 0.365694 -v 0.628664 -0.183398 0.284793 -v 0.632816 -0.182837 0.369008 -v 0.595612 -0.187801 0.389238 -v 0.519271 -0.18184 0.419817 -v -0.623953 -0.173636 0.0296231 -v -0.585678 -0.119566 -0.03093 -v -0.622104 -0.168754 -0.0340558 -v -0.598332 -0.163939 -0.161076 -v -0.588704 -0.141837 -0.125436 -v -0.566605 -0.0852517 -0.0591248 -v -0.543455 -0.113687 -0.210402 -v -0.488901 -0.119303 -0.320256 -v -0.548327 -0.142264 -0.246159 -v -0.553796 -0.187117 -0.321407 -v -0.519362 -0.172065 -0.338693 -v -0.453713 -0.124456 -0.369107 -v 0.488419 -0.156568 0.393696 -v 0.394664 -0.162516 0.482181 -v 0.260733 -0.187322 0.583571 -v 0.305362 -0.148668 0.520019 -v 0.589046 -0.119656 -0.111648 -v 0.63776 -0.15816 -0.0558403 -v 0.548703 -0.127922 -0.234445 -v 0.493283 -0.0766262 -0.275465 -v 0.134882 -0.123517 -0.542026 -v 0.191645 -0.0336 -0.519562 -v 0.192982 -0.11614 -0.524963 -v 0.30098 -0.0934598 -0.471202 -v 0.271732 -0.0613252 -0.483369 -v 0.2197 0.00933148 -0.509824 -v 0.366189 -0.0409455 -0.413042 -v 0.423498 -0.0977531 -0.378823 -v -0.429984 -0.0535343 -0.354853 -v -0.350815 -0.0702867 -0.437598 -v -0.294746 -0.00288236 -0.467523 -v -0.19866 -0.020423 -0.519887 -v -0.276524 -0.0460101 -0.48378 -v -0.239176 -0.13179 -0.518533 -v -0.207337 -0.0981849 -0.523011 -v -0.146364 -0.0270324 -0.537183 -v -0.0237527 -0.0243073 0.547908 -v -0.140097 -0.0294359 0.534225 -v -0.0538014 -0.0591042 0.549794 -v -0.11452 -0.13129 0.554565 -v -0.225541 -0.144337 0.518728 -v -0.282811 -0.227395 0.509582 -v -0.201896 -0.17726 0.538587 -v -0.156346 -0.233723 0.581484 -v -0.141123 -0.0994555 0.540287 -v -0.195561 -0.0311637 0.517682 -v -0.210761 -0.246692 0.559533 -v -0.306536 -0.27068 0.504444 -v -0.229129 -0.31336 0.579267 -v -0.248457 -0.365155 0.609759 -v -0.195649 0.0539096 -0.527695 -v -0.145068 0.111612 -0.563655 -v -0.143315 0.0478538 -0.545158 -v -0.0313311 0.0397535 -0.561857 -v -0.119201 0.135214 -0.583836 -v -0.059571 0.0747674 -0.56842 -v 0.0577211 0.072728 -0.567636 -v 0.110153 0.00147663 -0.546004 -v -0.570278 -0.0960851 0.0596562 -v -0.539587 -0.0328303 0.118192 -v -0.557664 -0.0581261 0.0311479 -v -0.534001 0.0273179 -0.0223585 -v -0.537912 0.0190022 0.0343701 -v -0.526714 0.00126985 0.146967 -v -0.528716 0.10255 0.0384619 -v -0.52 0.197035 -0.0117993 -v -0.522799 0.112929 -0.0173967 -v -0.494853 0.129583 -0.127103 -v -0.183992 0.643446 -0.0890997 -v -0.146547 0.679127 -0.0911093 -v -0.499239 0.170836 -0.0945672 -v -0.511166 0.244112 -0.0346493 -v -0.19836 0.0381958 0.523877 -v -0.302991 0.03845 0.471516 -v -0.36126 0.102524 0.451241 -v -0.444605 0.112146 0.366219 -v -0.377983 0.0741859 0.424201 -v -0.411454 0.00803351 0.374841 -v -0.477168 0.119877 0.317379 -v -0.432328 0.0472781 0.355272 -v -0.477173 0.0185639 0.281264 -v -0.507752 -0.0509955 0.229117 -v -0.463472 -0.0238842 0.305181 -v -0.437956 -0.10921 0.355273 -v -0.526186 -0.0836084 0.20247 -v -0.473942 -0.102626 0.30784 -v -0.497686 -0.179277 0.314837 -v -0.50857 -0.268997 0.364715 -v -0.457999 -0.193063 0.36502 -v -0.357371 -0.198926 0.450415 -v -0.382723 -0.246553 0.444397 -v -0.404232 -0.347693 0.446629 -v 0.466816 0.00113716 0.293975 -v 0.517261 0.00991157 0.203056 -v 0.546501 -0.011835 0.130197 -v 0.545555 0.0571403 0.0886505 -v 0.543161 0.0765478 -0.00243031 -v 0.541322 0.157432 -0.0218298 -v 0.546251 0.103843 0.0291673 -v 0.55758 0.149289 0.0765885 -v 0.577597 0.214281 0.0308039 -v 0.614034 0.227429 0.0619216 -v 0.581052 0.195697 0.0716379 -v 0.569096 0.170728 0.168423 -v 0.556284 0.164087 0.0376676 -v 0.541511 0.199347 -0.032515 -v 0.634947 0.226453 0.0849792 -v 0.591284 0.19143 0.143142 -v -0.541248 0.262786 0.0370381 -v -0.511158 0.358008 -0.0294347 -v 0.52057 0.192581 -0.088045 -v 0.513405 0.27939 -0.0969632 -v 0.421247 0.457033 -0.227552 -v 0.394398 0.475332 -0.194369 -v 0.427491 0.435652 -0.219156 -v 0.446089 0.395755 -0.188999 -v 0.437752 0.429596 -0.147872 -v 0.474484 0.401258 -0.114284 -v 0.456996 0.395223 -0.14752 -v 0.484143 0.318407 -0.147116 -v 0.42799 0.428561 -0.185332 -v 0.382502 0.486831 -0.176802 -v 0.488372 0.339832 -0.125328 -v 0.494678 0.386943 -0.100312 -v 0.103805 0.681797 -0.196751 -v 0.178417 0.662558 -0.201115 -v 0.0674101 0.707394 -0.184479 -v -0.0138829 0.708757 -0.184497 -v 0.207906 0.631515 -0.199927 -v 0.275085 0.598749 -0.205722 -v 0.228595 0.632942 -0.205101 -v 0.271651 0.634294 -0.203758 -v 0.339175 0.595025 -0.210971 -v 0.382658 0.585957 -0.199109 -v 0.328479 0.614222 -0.202277 -v 0.301822 0.646105 -0.175355 -v 0.283894 0.616182 -0.20967 -v 0.306556 0.578609 -0.208553 -v 0.403156 0.577037 -0.188502 -v 0.337187 0.625536 -0.180093 -v 0.341323 0.628508 -0.150383 -v 0.304713 0.644778 -0.120551 -v 0.305912 0.650479 -0.146259 -v 0.230682 0.685873 -0.140174 -v 0.451157 0.461298 -0.109349 -v 0.440672 0.508618 -0.104892 -v 0.250043 0.676651 -0.128342 -v 0.283837 0.648045 -0.109546 -v 0.189959 0.694202 -0.113036 -v 0.108983 0.713377 -0.10949 -v 0.379082 0.564951 -0.102781 -v 0.354676 0.60459 -0.113267 -v 0.357113 0.518324 -0.199795 -v 0.299691 0.564384 -0.190615 -v 0.342098 0.526759 -0.184652 -v 0.315535 0.548936 -0.151764 -v 0.268961 0.584669 -0.18699 -v 0.298529 0.558699 -0.164469 -v 0.106027 0.697688 -0.0923073 -v 0.0629562 0.68372 -0.0861865 -v 0.0992054 0.65848 -0.0984609 -v 0.06016 0.650589 -0.120024 -v 0.0601921 0.646068 -0.148389 -v -0.0138856 0.646259 -0.148476 -v -0.322082 0.612536 -0.116705 -v -0.404469 0.551874 -0.116279 -v -0.343176 0.60348 -0.132441 -v -0.378439 0.574162 -0.171867 -v -0.257403 0.655415 -0.12764 -v -0.213025 0.663734 -0.10249 -v -0.402418 0.558808 -0.154184 -v -0.44339 0.516746 -0.11278 -v -0.226664 0.612942 -0.211225 -v -0.195663 0.65214 -0.201337 -v -0.0777964 0.709067 -0.176424 -v -0.114922 0.682914 -0.194046 -v -0.506795 0.42423 -0.0572731 -v -0.436998 0.499826 -0.0814127 -v -0.481326 0.432824 -0.0571733 -v -0.429031 0.448648 -0.0808686 -v -0.42245 0.478202 -0.0760657 -v -0.398724 0.534329 -0.089563 -v -0.521685 -0.304545 0.383016 -v -0.439923 -0.325164 0.425251 -v -0.405351 -0.525849 0.505635 -v -0.358155 -0.565171 0.488289 -v -0.396915 -0.565988 0.476208 -v -0.375994 -0.638601 0.40676 -v -0.44942 -0.519614 0.480526 -v -0.472364 -0.434599 0.522677 -v -0.341251 -0.688066 0.352786 -v -0.358292 -0.713501 0.297351 -v -0.364928 -0.621931 0.431845 -v -0.340216 -0.580322 0.472114 -v -0.329562 -0.763078 0.204946 -v -0.339895 -0.772828 0.143705 -v -0.351874 -0.747229 0.221618 -v -0.388118 -0.707221 0.251178 -v -0.37286 -0.732629 0.207554 -v -0.340451 -0.773414 0.113221 -v -0.396842 -0.688757 0.237901 -v -0.426974 -0.633018 0.315133 -v -0.431518 -0.588382 0.339551 -v -0.457267 -0.521719 0.392587 -v -0.287982 -0.425724 0.557152 -v -0.311759 -0.506481 0.50524 -v -0.299075 -0.452169 0.557686 -v -0.338168 -0.50217 0.537179 -v -0.32437 -0.518121 0.52037 -v -0.315868 -0.543551 0.473968 -v -0.457124 -0.396815 0.423441 -v -0.437858 -0.475725 0.409431 -v -0.428668 -0.41409 0.430481 -v -0.37751 -0.457298 0.443738 -v -0.427658 -0.512849 0.392143 -v -0.3971 -0.474011 0.423406 -v -0.36646 -0.531286 0.402352 -v -0.328761 -0.573842 0.394389 -v -0.351632 -0.517503 0.426322 -v -0.324121 -0.492519 0.478408 -v -0.325044 -0.529089 0.451164 -v -0.314811 -0.596338 0.387122 -v -0.327129 -0.614047 0.33303 -v -0.303604 -0.667779 0.255758 -v -0.309428 -0.634443 0.323462 -v -0.283843 -0.67783 0.298951 -v -0.302513 -0.804759 0.0743685 -v -0.267197 -0.827766 -0.02876 -v -0.282518 -0.681925 0.271009 -v -0.29124 -0.690797 0.213066 -v -0.321575 -0.68271 0.199171 -v -0.291996 -0.720342 0.109759 -v -0.236265 -0.835532 -0.0184937 -v -0.1897 -0.840405 -0.0629276 -v -0.217589 -0.842622 -0.0711353 -v -0.18215 -0.84355 -0.177166 -v -0.141707 -0.834701 -0.252206 -v -0.155947 -0.819441 -0.310858 -v -0.176435 -0.845441 -0.146366 -v -0.17015 -0.836635 -0.0864162 -v -0.13205 -0.814908 -0.332131 -v -0.087061 -0.79283 -0.371732 -v -0.127254 -0.782307 -0.408113 -v -0.144712 -0.748452 -0.456063 -v -0.150692 -0.789264 -0.387368 -v -0.190568 -0.791959 -0.341336 -v -0.176387 -0.77559 -0.388378 -v -0.15106 -0.727301 -0.475532 -v -0.204304 -0.773065 -0.338983 -v -0.234955 -0.793375 -0.243865 -v -0.185697 -0.821456 -0.00489991 -v -0.163977 -0.808608 -0.0573585 -v -0.173465 -0.788162 -0.0621808 -v -0.140312 -0.78871 -0.161695 -v -0.147265 -0.769146 -0.215319 -v -0.117605 -0.749087 -0.30781 -v -0.126462 -0.772562 -0.236587 -v -0.0931952 -0.779368 -0.28292 -v -0.113474 -0.680456 -0.435958 -v -0.137924 -0.725653 -0.357517 -v -0.092792 -0.76336 -0.30552 -v -0.104636 -0.732605 -0.351478 -v -0.060988 -0.74615 -0.374134 -v -0.0381517 -0.739072 -0.424425 -v -0.0633311 -0.765649 -0.354528 -v -0.0844128 -0.799973 -0.314711 -v -0.0666023 -0.781866 -0.362158 -v -0.0337778 -0.73135 -0.450811 -v -0.139445 -0.636958 -0.563929 -v -0.121057 -0.686283 -0.538054 -v -0.125051 -0.623968 -0.586124 -v -0.0782041 -0.589179 -0.624676 -v -0.11044 -0.707667 -0.519015 -v -0.0880665 -0.63295 -0.593083 -v -0.0432477 -0.635646 -0.590913 -v 0.0137917 -0.589028 -0.613043 -v -0.0274938 -0.591729 -0.624441 -v 0.00138237 -0.492588 -0.679617 -v 0.0234078 -0.51768 -0.661937 -v 0.0375783 -0.562493 -0.617595 -v -0.00611111 -0.676401 -0.504884 -v -0.00108334 -0.649724 -0.555073 -v 0.505774 0.394628 -0.278197 -v 0.375512 0.188248 -0.656392 -v -0.729044 0.21156 0.161768 -v 0.413912 -0.042527 -0.72517 -v -0.338242 0.605349 -0.16627 -v -0.372347 -0.685131 0.340378 -v -0.171633 -0.831997 -0.260108 -v 0.0968289 -0.292665 -0.577478 -v -0.263127 -0.334108 -0.620358 -v -0.106822 -0.603877 -0.521225 -v -0.439958 0.498328 -0.229814 -v -0.378125 0.421465 -0.21061 -v -0.413232 0.252533 -0.436901 -v 0.470537 0.503063 -0.215639 -v 0.660602 0.278282 -0.0852668 -v 0.456563 0.260433 -0.391617 -v 0.148879 0.200626 -0.70099 -v 0.585844 0.15887 -0.533804 -v -0.575876 0.175822 -0.526589 -v -0.685902 0.149948 0.400154 -v -0.531329 0.197193 0.314655 -v -0.681649 0.288816 -0.0568551 -v -0.289185 0.190733 0.655612 -v 0.167316 0.139266 0.780779 -v 0.138575 0.164849 0.604437 -v 0.17054 0.0239235 -0.821336 -v -0.832037 0.0471013 -0.0859793 -v -0.341565 0.0266872 0.769561 -v 0.686273 0.147635 0.401114 -v 0.831405 0.0471244 -0.0865975 -v 0.615012 -0.0935929 -0.553644 -v -0.618344 -0.0901473 -0.556193 -v -0.717582 -0.112192 0.413865 -v 0.17193 -0.0907817 0.814427 -v 0.720964 -0.0770095 0.418252 -v 0.120993 -0.329268 -0.728676 -v -0.770014 -0.180524 -0.0825252 -v -0.312969 -0.255531 0.70892 -v 0.769371 -0.163802 -0.0764447 -v 0.510764 -0.218066 -0.451667 -v -0.616619 -0.269911 0.315063 -v 0.136722 -0.222651 0.665361 -v 0.597596 -0.18638 0.348071 -v -0.520514 -0.146321 -0.302387 -v 0.600751 -0.119278 -0.0498399 -v 0.406645 -0.0305577 -0.370052 -v -0.227996 -0.0548133 -0.50976 -v 0.123912 -0.0491232 0.535636 -v 0.11537 0.0748718 -0.558378 -v -0.514463 0.160964 -0.0410552 -v -0.482712 -0.0593998 0.281083 -v -0.22912 0.0700098 0.520683 -v 0.486761 -0.0270759 0.275541 -v 0.536262 0.173243 0.308501 -v 0.509154 0.2125 -0.117985 -v 0.468937 0.476471 -0.102237 -v 0.416495 0.446379 -0.200351 -v 0.04778 0.717481 -0.175287 -v 0.288192 0.659664 -0.130812 -v 0.262675 0.616626 -0.208844 -v 0.258162 0.596051 -0.116544 -v 0.0437246 0.695483 -0.0846078 -v 0.0422064 0.648855 -0.16166 -v -0.214231 0.67713 -0.125091 -v -0.188255 0.633592 -0.206604 -v -0.193204 0.607231 -0.110119 -v -0.460077 -0.545492 0.386163 -v -0.356774 -0.752928 0.191621 -v -0.373716 -0.586333 0.46837 -v -0.334293 -0.540484 0.425358 -v -0.253722 -0.746137 0.221395 -v -0.32952 -0.692618 0.172513 -v -0.27507 -0.789434 -0.120163 -v -0.158354 -0.773878 -0.412219 -v -0.193773 -0.845997 -0.0930911 -v -0.174253 -0.781337 -0.0903992 -v -0.0534624 -0.764627 -0.380831 -v -0.0241273 -0.3713 -0.584057 -v -0.443825 0.445379 -0.274159 -v 0.516687 0.438862 -0.229885 -v 0.287766 0.206298 -0.652189 -v -0.485494 0.216033 -0.558232 -v -0.684292 0.195755 0.31099 -v -0.147053 0.187286 0.699523 -v -0.163957 0.144941 -0.777544 -v -0.715662 0.244792 -0.14128 -v -0.658835 0.252132 -0.290091 -v -0.668487 0.1846 -0.38876 -v -0.589087 0.142685 0.532549 -v 0.590935 0.142821 0.533483 -v 0.677319 0.165271 -0.400287 -v 0.335386 0.0267684 -0.765164 -v -0.561889 -0.0271086 -0.623094 -v -0.765543 -0.0370646 0.34224 -v 0.0875345 0.091171 0.818865 -v -0.0861385 0.0898532 0.818865 -v -0.175807 0.0286631 0.821067 -v 0.829781 0.0457432 0.0879801 -v -0.18465 -0.122923 -0.808467 -v -0.820413 -0.0185243 -0.173291 -v -0.765557 -0.0179361 -0.341469 -v -0.717168 -0.0840869 -0.415784 -v -0.418409 -0.043579 0.729386 -v -0.560769 -0.0448441 0.624747 -v -0.613194 -0.12072 0.55293 -v 0.618006 -0.0784114 0.555971 -v 0.563401 -0.0203998 0.626384 -v 0.420103 -0.0229036 0.730268 -v 0.335742 -0.0848371 0.759719 -v 0.715698 -0.0840422 -0.413885 -v 0.765167 -0.0192272 -0.341209 -v 0.820006 -0.016143 -0.172659 -v 0.303628 -0.257012 -0.687547 -v -0.541491 -0.154251 -0.59821 -v -0.675602 -0.246084 0.27965 -v 0.0819011 -0.150581 0.800848 -v -0.0875929 -0.163967 0.801176 -v -0.166866 -0.229032 0.752284 -v 0.768144 -0.160489 0.0839325 -v -0.715632 -0.199999 -0.152816 -v -0.667557 -0.202071 -0.298179 -v -0.592637 -0.208369 -0.343654 -v -0.584249 -0.183595 -0.261928 -v -0.627111 -0.181982 -0.133475 -v 0.512711 -0.189476 0.461109 -v 0.490261 -0.189961 0.544468 -v 0.364352 -0.196538 0.632889 -v 0.276729 -0.204939 0.624658 -v 0.592275 -0.196726 -0.336765 -v 0.666508 -0.190963 -0.292301 -v 0.71473 -0.183628 -0.145641 -v 0.241546 -0.224481 -0.542346 -v -0.447255 -0.158504 -0.403055 -v 0.064892 -0.114362 0.563469 -v -0.122928 -0.0705035 -0.543902 -v -0.517489 -0.0817847 -0.233433 -v -0.222577 -0.0691598 0.508572 -v -0.277851 -0.149954 0.492358 -v -0.378814 -0.157901 0.42431 -v -0.413358 -0.070964 0.375137 -v -0.275643 0.00387695 0.483157 -v 0.530412 0.141848 0.239446 -v 0.561039 0.15557 0.141803 -v 0.549522 0.116446 0.0966043 -v 0.381131 0.175669 -0.432887 -v 0.062164 0.130964 -0.591493 -v -0.125466 0.177005 -0.61804 -v -0.385791 0.146031 -0.385938 -v -0.361355 0.189342 -0.451476 -v -0.500407 0.0263828 0.229856 -v -0.293456 0.125252 0.515069 -v 0.0664555 0.0116694 0.54214 -v 0.511368 0.122818 -0.125345 -v 0.466015 0.283899 -0.303221 -v 0.128334 0.705372 -0.175964 -v 0.452078 0.523078 -0.116808 -v 0.398008 0.47336 -0.162805 -v 0.327213 0.576773 -0.214749 -v 0.231193 0.627718 -0.0983589 -v 0.115025 0.640437 -0.162871 -v -0.25378 0.657225 -0.157548 -v 0.00290543 0.712284 -0.0956152 -v -0.113758 0.640028 -0.108709 -v -0.110249 0.662583 -0.197795 -v -0.242146 0.601108 -0.0938291 -v -0.374664 0.540208 -0.0861469 -v -0.292398 0.543338 -0.213118 -v -0.220749 0.595089 -0.199803 -v -0.323214 0.496521 -0.192486 -v -0.611558 0.353711 -0.102741 -v -0.566017 0.375131 -0.045392 -v -0.50702 0.324775 -0.0352638 -v -0.491924 0.257105 -0.0812578 -v -0.600634 -0.229651 0.246251 -v 0.603704 -0.120643 0.0735843 -v -0.444114 -0.57276 0.427321 -v -0.446876 -0.593389 0.374064 -v -0.39895 -0.619269 0.417323 -v -0.357111 -0.335701 0.645247 -v -0.453493 -0.369275 0.575101 -v -0.368343 -0.32918 0.469643 -v -0.486187 -0.472328 0.423605 -v -0.313021 -0.587811 0.414395 -v -0.357314 -0.647967 0.255988 -v -0.252887 -0.828302 -0.111273 -v -0.255367 -0.808998 -0.168803 -v -0.205856 -0.842443 -0.155042 -v -0.253144 -0.780131 0.173881 -v -0.208665 -0.770027 0.00797371 -v -0.305363 -0.777427 -0.020283 -v -0.141667 -0.799656 -0.135058 -v -0.173194 -0.749061 -0.296958 -v -0.181067 -0.409428 -0.672035 -v -0.0308444 -0.656148 -0.569559 -v -0.0784639 -0.638454 -0.485526 -v -0.149503 -0.622796 -0.549441 -v -0.141711 -0.644109 -0.503032 -v 0.0500116 -0.553315 -0.595715 -v 0.598884 0.196915 0.27292 -v 0.527946 0.26055 -0.0706944 -v 0.418875 -0.0333253 0.362704 -v 0.390924 -0.0947923 0.4222 -v 0.293394 -0.100219 0.491184 -v 0.23525 -0.0430228 0.496657 -v 0.261954 0.164813 0.559893 -v 0.339455 0.186606 0.574036 -v 0.450446 0.188093 0.493073 -v 0.465091 0.168277 0.408291 -v 0.395967 0.131076 0.416707 -v 0.300545 0.128739 0.48984 -v -0.600507 -0.145285 -0.0637628 -v -0.683549 -0.203105 -0.0730622 -v -0.555857 -0.0829394 -0.118111 -v -0.370602 0.00552072 0.415268 -v -0.0604104 0.132161 -0.59239 -v -0.322712 0.547407 -0.0941505 -v -0.0267202 -0.611798 -0.516723 -v 0.284008 0.0222016 0.458956 -v 0.374026 0.0261045 0.390374 -v 0.238856 0.0786471 0.495296 -v 0.419504 0.0852414 0.356605 -v 0.485931 0.0898204 0.273009 -v 0.504945 0.0370374 0.225856 -v 0.127572 0.0747178 0.540021 -v 0.0705007 0.126008 0.579267 -v 0.537872 0.0492835 0.134343 -v -0.147604 -0.23481 -0.567475 -v -0.154121 -0.541829 -0.600293 -v -0.0366991 -0.475629 -0.573589 -v 0.00389155 -0.527376 -0.5633 -v -0.334646 0.532217 -0.235432 -v -0.435109 0.207005 -0.271561 -v -0.482669 0.365647 -0.325606 -v -0.557939 0.321695 -0.327698 -v 0.544202 0.435749 -0.139645 -v 0.601008 0.259742 -0.365782 -v 0.468831 0.410809 -0.269279 -v 0.252353 0.188083 -0.571528 -v 0.321734 0.145984 -0.727896 -v -0.24173 0.191243 -0.579417 -v -0.0669017 0.197241 -0.66923 -v -0.143575 0.202817 -0.701843 -v -0.365993 0.197893 -0.655453 -v -0.31813 0.152823 -0.727344 -v -0.527451 0.201705 0.480401 -v -0.56739 0.294408 0.0483889 -v -0.0669189 0.184326 0.663409 -v -0.782864 0.169382 0.0877237 -v -0.164658 0.138219 0.781084 -v 0.29492 0.189409 0.652005 -v -0.0868566 0.0897777 -0.81832 -v -0.127354 0.163913 0.613773 -v -0.79585 0.116551 -0.16575 -v -0.176496 0.0279679 -0.821828 -v -0.375759 0.174443 0.657216 -v -0.723224 0.0492177 -0.417914 -v -0.623304 0.0272118 0.563706 -v 0.531892 0.192873 0.479787 -v 0.342684 0.0359538 0.77019 -v 0.551192 0.0942734 0.613503 -v 0.624831 0.04015 0.564997 -v 0.724137 0.042783 -0.419609 -v 0.795558 0.109249 -0.169982 -v 0.778207 0.16155 0.0849805 -v -0.820558 -0.0295925 0.174063 -v 0.328506 -0.121813 -0.753244 -v -0.420497 -0.0342879 -0.72731 -v -0.344073 -0.110549 -0.758895 -v 0.0882239 -0.031638 0.836889 -v -0.826894 -0.0905191 0.0859509 -v 0.820743 -0.0175267 0.176128 -v -0.173506 -0.106582 0.814657 -v -0.106184 -0.20984 -0.794552 -v 0.826978 -0.0753517 0.0892907 -v -0.787637 -0.13837 -0.167311 -v -0.186494 -0.275402 -0.75218 -v -0.397061 -0.194401 0.699268 -v -0.669939 -0.183503 -0.387031 -v -0.147557 -0.507587 -0.641561 -v -0.560368 -0.295466 0.507781 -v 0.312747 -0.179185 0.706083 -v 0.539472 -0.131457 0.599157 -v 0.575652 -0.167522 0.519515 -v 0.787042 -0.128863 -0.163603 -v 0.668438 -0.177376 -0.382466 -v 0.365925 -0.265537 -0.615537 -v -0.574441 -0.194562 -0.515019 -v 0.29146 -0.297093 -0.607169 -v 0.0687643 -0.227615 0.718565 -v -0.50808 -0.227779 -0.458145 -v -0.718548 -0.220453 0.141922 -v -0.6877 -0.214738 0.0657379 -v 0.714292 -0.180248 0.156583 -v -0.180182 -0.311138 0.64161 -v -0.54023 -0.0105885 -0.0538016 -v 0.684013 -0.18045 0.079817 -v -0.0572195 0.124604 0.585922 -v 0.248831 -0.153452 0.548174 -v 0.433008 -0.17595 0.477243 -v 0.454968 -0.140129 0.405317 -v 0.625999 -0.16078 -0.122009 -v 0.520818 -0.136201 -0.292561 -v 0.281575 -0.136405 -0.494074 -v 0.400123 0.116175 -0.379042 -v 0.219455 -0.0703296 -0.510247 -v -0.3818 -0.102263 -0.42524 -v -0.277895 0.160487 -0.521219 -v -0.403372 -0.0185924 -0.373857 -v -0.231669 -0.217806 0.537088 -v -0.0560988 -0.125375 0.563432 -v -0.111773 -0.0625104 0.542449 -v -0.0616085 0.0047103 -0.555007 -v -0.116081 0.079069 -0.560099 -v -0.25301 0.164104 0.575445 -v -0.546285 -0.0249176 0.0613624 -v -0.53217 -0.203241 0.292579 -v -0.448388 -0.259191 0.400885 -v -0.524227 0.166095 0.243161 -v -0.419039 0.078909 0.382708 -v 0.453783 0.139821 -0.287259 -v 0.451533 0.382134 -0.21347 -v 0.565901 -0.0711519 0.129243 -v 0.47422 0.37883 -0.127669 -v 0.130575 0.715175 -0.12153 -v 0.350553 0.610521 -0.195057 -v 0.162695 0.678004 -0.196346 -v 0.388673 0.579848 -0.114216 -v 0.120872 0.668832 -0.198509 -v 0.346324 0.536548 -0.207736 -v 0.346511 0.58984 -0.100291 -v 0.344424 0.525556 -0.155812 -v 0.15035 0.629973 -0.134727 -v 0.313286 0.549446 -0.180579 -v 0.1242 0.684859 -0.089121 -v 0.116567 0.647445 -0.107834 -v -0.119968 0.700529 -0.178439 -v -0.0693131 0.651976 -0.184252 -v -0.385049 0.5741 -0.133627 -v -0.126678 0.705715 -0.122161 -v -0.341947 0.591718 -0.104582 -v -0.123676 0.677002 -0.0855164 -v -0.0783273 0.66724 -0.0890681 -v -0.297847 0.52345 -0.148547 -v -0.106687 0.631966 -0.164481 -v -0.458793 0.410419 -0.0693501 -v -0.344837 0.49924 -0.116316 -v -0.493022 0.467964 -0.191723 -v -0.448819 0.471682 -0.0698613 -v -0.473813 -0.495347 0.477526 -v -0.40351 -0.667666 0.253762 -v -0.329362 -0.461476 0.568704 -v -0.327628 -0.718029 0.310484 -v -0.473212 -0.422169 0.420401 -v -0.311402 -0.493494 0.530372 -v -0.377856 -0.41697 0.457425 -v -0.336069 -0.624242 0.306818 -v -0.422339 -0.454426 0.422179 -v -0.29483 -0.649861 0.339833 -v -0.297329 -0.66151 0.284536 -v -0.289009 -0.817418 -0.00784122 -v -0.212872 -0.771322 -0.313929 -v -0.229736 -0.831774 0.012554 -v -0.124606 -0.823959 -0.303472 -v -0.307099 -0.74928 0.0290822 -v -0.188041 -0.809694 0.021657 -v -0.207017 -0.778915 0.0674013 -v -0.154276 -0.76128 -0.242528 -v -0.266948 -0.753013 -0.0127685 -v -0.108686 -0.789922 -0.234724 -v -0.160193 -0.700693 -0.431359 -v -0.110623 -0.762471 -0.283206 -v -0.147238 -0.716167 -0.382499 -v 0.119266 -0.39162 -0.606333 -v 0.00423421 -0.568474 -0.635902 -v -0.0140039 -0.66201 -0.493139 -v -0.11228 -0.650141 -0.575119 -v -0.113432 -0.757653 -0.454208 -v 0.0122411 -0.639956 -0.539954 -v 0.681628 0.227686 0.0770639 -v 0.596881 0.205286 0.0914086 -v 0.510913 0.346193 -0.0914058 -v 0.547601 0.142278 0.0155606 -v 0.53567 0.0887443 -0.0455475 -v 0.554218 -0.00595796 0.0789556 -v -0.115654 -0.332397 -0.587955 -v -0.172152 -0.389278 -0.605053 -v -0.144014 -0.486787 -0.595174 -v -0.0967087 -0.524159 -0.566119 -v -0.394368 0.461519 -0.260028 -v -0.400848 0.397794 -0.26012 -v -0.426967 0.310519 -0.302196 -v -0.446015 0.309789 -0.358992 -v 0.561119 0.408335 -0.188381 -v 0.607322 0.338842 -0.198627 -v 0.58339 0.312216 -0.298589 -v 0.522638 0.328879 -0.325154 -v 0.329603 0.216213 -0.575473 -v 0.4398 0.240634 -0.48915 -v 0.521512 0.237445 -0.477783 -v 0.501467 0.198751 -0.563419 -v -0.491291 0.262856 -0.472399 -v -0.410028 0.250078 -0.501695 -v -0.313443 0.221908 -0.583242 -v -0.277892 0.211931 -0.654376 -v -0.609509 0.213003 0.359358 -v -0.594437 0.228354 0.273208 -v -0.625793 0.26254 0.13914 -v -0.688228 0.258694 0.0813931 -v -0.0777542 0.170839 0.754998 -v 0.0821037 0.170985 0.754369 -v 0.153437 0.187017 0.696995 -v 0.0760651 0.184462 0.660438 -v -0.0772586 0.181033 -0.753269 -v 0.0804109 0.179732 -0.753123 -v 0.165444 0.141753 -0.777636 -v 0.0847974 0.0879972 -0.81828 -v -0.776951 0.179384 -0.0740995 -v -0.740921 0.118422 -0.329715 -v -0.504111 0.178292 0.563222 -v -0.549569 0.0884701 0.612669 -v -0.410074 0.0870981 0.714557 -v -0.321023 0.13743 0.728426 -v 0.507592 0.175141 0.563592 -v 0.379679 0.173441 0.656472 -v 0.323687 0.139082 0.728249 -v 0.411824 0.0923541 0.714965 -v 0.743811 0.107653 -0.335194 -v 0.672027 0.221057 -0.313557 -v 0.713196 0.224675 -0.161504 -v 0.773773 0.167639 -0.0817344 -v 0.406904 0.0940074 -0.711493 -v 0.546394 0.0992478 -0.609624 -v 0.620346 0.0371454 -0.558676 -v 0.558902 -0.0336545 -0.621937 -v -0.619939 0.0449579 -0.557864 -v -0.542976 0.109945 -0.607194 -v -0.405819 0.102063 -0.710782 -v -0.338884 0.0335965 -0.765713 -v -0.723261 0.0308906 0.421314 -v -0.74705 0.0983644 0.336372 -v -0.799075 0.105142 0.172043 -v -0.83067 0.0415771 0.0872295 -v 0.176273 0.033321 0.821422 -v -0.089007 -0.0362301 0.836742 -v 0.797077 0.105485 0.17225 -v 0.746662 0.101528 0.337438 -v 0.724025 0.0419573 0.422874 -v 0.766894 -0.0187971 0.344711 -v -0.0950053 -0.0475914 -0.833925 -v 0.0806707 -0.0507979 -0.832817 -v 0.160341 -0.132072 -0.803998 -v 0.0600742 -0.222154 -0.788741 -v -0.824641 -0.0842272 -0.0855325 -v -0.735013 -0.139018 -0.328426 -v -0.33436 -0.115417 0.759819 -v -0.531086 -0.202939 0.596567 -v 0.401196 -0.135732 0.698285 -v 0.733908 -0.134082 -0.325183 -v 0.824285 -0.0756963 -0.0830844 -v 0.394313 -0.180699 -0.688577 -v 0.535402 -0.15773 -0.592704 -v 0.572079 -0.191729 -0.509199 -v 0.488592 -0.229228 -0.53158 -v -0.364869 -0.271856 -0.628817 -v -0.487409 -0.235677 -0.539675 -v -0.408369 -0.170753 -0.697428 -v -0.323128 -0.242546 -0.703355 -v -0.669588 -0.235563 0.372967 -v -0.735351 -0.168615 0.322605 -v -0.788839 -0.151617 0.163659 -v -0.769325 -0.187883 0.0752876 -v 0.157286 -0.18948 0.752123 -v -0.0904869 -0.257538 0.715101 -v 0.789112 -0.123874 0.170194 -v 0.737062 -0.124804 0.331103 -v 0.668859 -0.162854 0.389878 -v 0.667294 -0.182346 0.301804 -v 0.32159 -0.18291 0.554412 -v 0.583272 -0.169081 -0.252468 -v 0.681924 -0.179946 -0.0624884 -v 0.325617 -0.248706 -0.544395 -v 0.431659 -0.211651 -0.469065 -v 0.447827 -0.155981 -0.39745 -v 0.380918 -0.109881 -0.422445 -v -0.428546 -0.217106 -0.473855 -v -0.321141 -0.251837 -0.546269 -v -0.253641 -0.205117 -0.538637 -v -0.289163 -0.121764 -0.493045 -v 0.126873 -0.163439 0.584583 -v 0.0628047 -0.213185 0.629849 -v -0.07471 -0.240498 0.6222 -v -0.121576 -0.196712 0.577542 -v -0.0771819 -0.162214 -0.559651 -v 0.0415715 -0.175965 -0.56175 -v 0.106291 -0.0819606 -0.545086 -v 0.0534552 0.000957351 -0.554763 -v -0.466957 -0.00538089 -0.276996 -v -0.472229 0.0896599 -0.217358 -v -0.509909 0.0810141 -0.10415 -v 0.289193 0.152696 -0.510899 -v 0.22589 0.0831427 -0.520304 -v 0.269998 0.0159577 -0.482783 -v 0.360044 0.0327539 -0.412635 -v 0.130352 0.175691 -0.61548 -v 0.0713218 0.196551 -0.668499 -v -0.354417 0.0516688 -0.416231 -v -0.269271 0.0299115 -0.485487 -v -0.222253 0.0916737 -0.524911 -v -0.483952 0.0921907 0.286912 -v -0.527959 0.0457175 0.120399 -v -0.531174 0.137316 0.0684381 -v -0.54473 0.198678 0.125476 -v -0.393426 0.130726 0.441687 -v -0.461292 0.177822 0.421492 -v -0.445076 0.194992 0.499681 -v -0.332707 0.189002 0.582607 -v -0.0537805 0.00741212 0.54829 -v -0.114693 0.0699594 0.554495 -v 0.481448 0.0809102 -0.222927 -v 0.472466 -0.00743908 -0.268214 -v 0.520308 -0.0684855 -0.218679 -v 0.559015 -0.0605586 -0.100149 -v 0.550216 0.00706659 -0.0258948 -v 0.464078 0.35991 -0.265674 -v 0.469626 0.226066 -0.256387 -v 0.485647 0.257626 -0.178274 -v 0.471737 0.339046 -0.170606 -v 0.170909 0.705363 -0.150285 -v 0.249118 0.677451 -0.155281 -v 0.280728 0.650646 -0.18618 -v 0.236303 0.651064 -0.201544 -v 0.487463 0.502787 -0.144663 -v 0.453582 0.537282 -0.179082 -v 0.39084 0.592571 -0.172115 -v 0.359025 0.615429 -0.137443 -v 0.434104 0.449634 -0.131725 -v 0.425489 0.493529 -0.109604 -v 0.366674 0.548613 -0.106714 -v 0.32329 0.557049 -0.123674 -v 0.370725 0.572309 -0.216524 -v 0.427934 0.519444 -0.228718 -v 0.434219 0.473247 -0.242234 -v 0.398994 0.485126 -0.219677 -v 0.157714 0.654181 -0.0939862 -v 0.276456 0.630926 -0.0976795 -v 0.246737 0.666508 -0.106837 -v 0.168574 0.694201 -0.102275 -v 0.152996 0.642633 -0.189077 -v 0.222413 0.616796 -0.194122 -v 0.2517 0.589732 -0.172545 -v 0.219685 0.604394 -0.13938 -v -0.203855 0.66912 -0.182983 -v -0.235567 0.631905 -0.207207 -v -0.313559 0.580925 -0.220409 -v -0.366832 0.566549 -0.207259 -v -0.083012 0.703335 -0.0963169 -v 0.0469508 0.723641 -0.120324 -v 0.00525875 0.725693 -0.149983 -v -0.0807981 0.717185 -0.151192 -v -0.0711199 0.640051 -0.135633 -v 0.00433855 0.64834 -0.134621 -v 0.041498 0.657983 -0.107328 -v 0.00254639 0.676055 -0.0884583 -v -0.0743066 0.693016 -0.192561 -v 0.00688267 0.701095 -0.190877 -v 0.045329 0.678908 -0.19419 -v 0.00632152 0.65997 -0.182671 -v -0.208292 0.644981 -0.0898156 -v -0.256587 0.64381 -0.103399 -v -0.182782 0.602732 -0.169269 -v -0.22452 0.577709 -0.140575 -v -0.564029 0.387787 -0.203095 -v -0.496947 0.454068 -0.0798696 -v -0.462829 0.503938 -0.134075 -v -0.411891 0.37691 -0.167165 -v -0.407283 0.428911 -0.115584 -v -0.44933 0.283188 -0.16956 -v -0.635914 -0.204 0.125704 -v -0.603887 -0.154987 0.0602618 -v -0.562365 -0.10442 0.118063 -v -0.527623 -0.124278 0.231848 -v 0.631478 -0.161105 0.141993 -v 0.591263 -0.165779 0.267762 -v 0.5293 -0.132811 0.306386 -v 0.530324 -0.0797015 0.237825 -v -0.418076 -0.656358 0.303774 -v -0.386297 -0.702269 0.280815 -v -0.29409 -0.375466 0.627296 -v -0.442067 -0.460499 0.532193 -v -0.383421 -0.506494 0.529749 -v -0.285909 -0.301671 0.528371 -v -0.259228 -0.35581 0.568855 -v -0.30124 -0.440849 0.530583 -v -0.337175 -0.467173 0.474851 -v -0.50931 -0.445113 0.457059 -v -0.552114 -0.361791 0.453955 -v -0.563253 -0.324547 0.395983 -v -0.501781 -0.341143 0.406883 -v -0.318827 -0.569017 0.465985 -v -0.334633 -0.616838 0.436771 -v -0.314009 -0.682123 0.357511 -v -0.284275 -0.696367 0.310458 -v -0.400976 -0.627731 0.287892 -v -0.427154 -0.567568 0.35377 -v -0.404894 -0.528796 0.385755 -v -0.357616 -0.564422 0.374652 -v -0.22308 -0.799684 -0.269 -v -0.186486 -0.807964 -0.316587 -v -0.219359 -0.812645 0.0720059 -v -0.297881 -0.766487 0.217019 -v -0.314197 -0.784361 0.156229 -v -0.279915 -0.817141 0.0543864 -v -0.253606 -0.745321 0.0446433 -v -0.285044 -0.714798 0.138681 -v -0.271669 -0.708738 0.198512 -v -0.239451 -0.747452 0.165604 -v -0.321067 -0.78737 0.0342208 -v -0.354555 -0.755395 0.132315 -v -0.370519 -0.715208 0.169957 -v -0.339095 -0.718512 0.123044 -v -0.156324 -0.820547 -0.0827947 -v -0.152526 -0.838054 -0.139235 -v -0.11792 -0.8274 -0.244054 -v -0.0884468 -0.799449 -0.287175 -v -0.214957 -0.766444 -0.260749 -v -0.245787 -0.774972 -0.165162 -v -0.234133 -0.766305 -0.108912 -v -0.185416 -0.770019 -0.147223 -v -0.130831 -0.367504 -0.723066 -v -0.0228557 -0.41185 -0.717967 -v -0.0369827 -0.519378 -0.669707 -v -0.10003 -0.563693 -0.635391 -v -0.0858975 -0.693989 -0.538441 -v -0.0173389 -0.688158 -0.518402 -v -0.0494349 -0.752031 -0.435114 -v -0.09335 -0.784946 -0.40027 -v -0.102609 -0.695583 -0.414516 -v -0.0826209 -0.729484 -0.371878 -v -0.0443788 -0.722836 -0.416325 -v -0.14581 -0.673497 -0.530685 -v -0.16596 -0.733569 -0.452262 -v -0.183493 -0.738379 -0.401941 -v 0.0603721 -0.492299 -0.592086 -v 0.0636298 -0.515311 -0.641826 -v 0.129445 -0.412332 -0.673302 -v 0.184186 -0.367674 -0.635955 -v 0.630614 0.212086 0.145331 -v 0.61257 0.195895 0.35973 -v 0.683951 0.18388 0.31111 -v 0.724482 0.194947 0.159482 -v 0.554152 0.220172 -0.0157957 -v 0.587347 0.246485 0.00409855 -v 0.604144 0.30671 -0.0560395 -v 0.560031 0.382025 -0.0943739 -v 0.517342 0.401508 -0.0912836 -# 2631 vertices - -f 705 76 703 107 78 707 -f 1473 112 1471 1470 760 1475 -f 1526 782 1440 1446 114 1527 -f 1550 802 1510 1514 116 1553 -f 1578 824 1518 1522 120 1579 -f 1584 832 1530 1534 122 1587 -f 1598 842 1536 1540 124 1599 -f 1610 852 1542 1552 126 1611 -f 1622 862 1570 1574 128 1623 -f 1640 884 1590 1594 132 1643 -f 1648 892 1602 1606 134 1651 -f 1666 914 1626 1630 136 1669 -f 1692 936 1634 1642 138 1693 -f 1704 946 518 1662 140 1705 -f 1728 982 1400 424 142 1729 -f 1701 144 1699 1698 944 1703 -f 704 554 148 1787 242 1374 -f 1406 724 1409 272 154 1407 -f 1775 156 1774 1772 1016 1777 -f 1425 162 1423 1420 732 1427 -f 1874 1192 360 644 170 1875 -f 728 432 1415 172 366 1414 -f 1482 174 1478 52 792 1474 -f 1766 176 1803 1488 1056 1760 -f 1688 180 414 1712 962 1684 -f 1680 926 1632 348 184 1681 -f 1784 1020 1736 1742 186 1785 -f 1914 1234 1900 1904 188 1915 -f 680 1946 192 1947 104 1282 -f 1969 196 1968 1966 1316 1971 -f 1381 198 394 1380 712 1383 -f 1387 200 1385 1384 714 1389 -f 1798 1030 558 400 202 1802 -f 1800 204 1805 574 1074 1792 -f 1503 206 1502 1500 772 1505 -f 215 213 211 209 1 217 -f 461 459 218 457 51 463 -f 225 223 221 219 3 227 -f 235 233 231 229 5 237 -f 495 238 493 61 212 497 -f 245 243 241 239 7 247 -f 544 568 108 1373 244 1371 -f 255 253 251 249 9 257 -f 1033 252 1031 149 268 1035 -f 265 263 261 259 11 267 -f 275 273 271 269 13 277 -f 285 283 281 279 15 287 -f 1069 282 1067 159 564 1071 -f 295 293 291 289 17 297 -f 305 303 301 299 19 307 -f 315 313 311 309 21 317 -f 489 318 487 59 302 491 -f 325 323 321 319 23 327 -f 1351 1349 328 1347 398 1353 -f 335 333 331 329 25 337 -f 345 343 341 339 27 347 -f 500 875 344 873 123 877 -f 1600 874 346 1631 928 1596 -f 355 353 351 349 29 357 -f 365 363 361 359 31 367 -f 645 643 362 641 640 647 -f 375 373 371 369 33 377 -f 385 383 381 379 35 387 -f 395 393 391 389 37 397 -f 1379 396 1348 24 44 710 -f 405 403 401 399 39 407 -f 415 413 411 409 41 417 -f 425 423 421 419 43 427 -f 435 433 431 429 45 437 -f 445 443 441 439 47 447 -f 453 264 451 449 49 455 -f 1430 746 452 266 150 1447 -f 1403 756 464 1401 722 1405 -f 465 53 228 469 336 467 -f 475 473 471 55 332 477 -f 793 478 334 470 4 795 -f 483 404 481 479 57 485 -f 1508 806 482 406 1378 1504 -f 503 501 499 63 222 505 -f 511 509 507 65 312 513 -f 519 517 515 67 232 521 -f 907 905 522 234 129 909 -f 529 527 525 523 69 531 -f 920 532 342 876 502 1586 -f 539 537 535 533 71 541 -f 968 542 1653 902 510 1650 -f 549 547 545 543 73 551 -f 1676 996 552 1709 954 1672 -f 555 553 75 559 40 557 -f 563 561 77 567 546 565 -f 573 571 569 79 256 575 -f 583 581 579 577 81 585 -f 591 589 587 83 444 593 -f 1818 1364 590 1839 1114 1812 -f 1137 1135 596 1133 610 1139 -f 599 597 595 85 352 601 -f 609 607 605 603 87 611 -f 619 617 615 613 89 621 -f 1148 616 1870 168 18 1868 -f 630 1153 584 1151 620 1149 -f 1159 1157 624 1155 634 1161 -f 629 627 625 623 91 631 -f 1176 648 94 1156 626 1763 -f 1128 1844 582 1154 632 1853 -f 637 294 635 633 93 639 -f 1162 636 296 1164 606 1858 -f 642 364 171 1177 292 638 -f 655 653 651 649 95 657 -f 1264 668 1896 1220 652 1897 -f 665 663 661 659 97 667 -f 673 36 671 669 99 675 -f 1272 672 380 1310 696 1944 -f 1894 1294 676 1921 1278 1890 -f 1285 1283 678 1281 686 1287 -f 681 679 677 101 372 683 -f 689 384 687 685 103 691 -f 1288 688 386 1290 662 1926 -f 699 697 695 693 105 701 -f 1343 1341 700 1339 199 1345 -f 1386 1340 702 1953 1338 1382 -f 1375 205 1377 408 560 706 -f 715 713 711 709 420 717 -f 725 723 721 719 430 727 -f 735 733 731 729 440 737 -f 743 20 741 739 450 745 -f 1428 734 1431 308 744 1429 -f 753 751 749 747 462 755 -f 763 761 759 757 466 765 -f 773 771 769 767 472 775 -f 783 781 779 777 109 785 -f 787 111 791 458 2 789 -f 803 801 799 797 480 805 -f 1509 804 1507 1506 774 1511 -f 811 809 807 492 304 813 -f 1433 814 306 1432 736 1435 -f 815 113 819 488 22 817 -f 1442 742 300 60 820 1445 -f 825 823 821 498 214 827 -f 833 831 829 506 224 835 -f 843 841 839 837 115 845 -f 1512 776 474 1515 846 1513 -f 853 851 849 847 117 855 -f 863 861 859 857 119 865 -f 1523 866 1521 1520 780 1525 -f 867 121 871 494 6 869 -f 1532 790 210 62 872 1533 -f 1538 796 220 64 878 1539 -f 885 883 881 879 125 887 -f 893 891 889 514 314 895 -f 1624 898 1655 326 1350 1657 -f 899 897 127 903 508 901 -f 900 1654 72 976 324 1656 -f 1572 818 310 66 904 1573 -f 1398 986 1661 520 906 1660 -f 917 915 913 911 530 919 -f 927 925 923 921 131 929 -f 1595 930 1593 1592 840 1597 -f 937 935 933 931 133 939 -f 1607 940 1605 1604 850 1609 -f 943 941 135 947 516 945 -f 1628 870 230 68 948 1629 -f 955 953 951 949 137 957 -f 952 1710 74 1372 246 1708 -f 965 963 961 959 540 967 -f 971 969 322 975 534 973 -f 983 981 979 977 139 985 -f 1396 718 422 1399 984 1397 -f 993 991 989 987 550 995 -f 1677 994 1675 1674 924 1679 -f 1001 999 997 141 426 1003 -f 1007 1005 143 1011 14 1009 -f 1019 1017 1015 1013 145 1021 -f 1027 1025 1023 147 556 1029 -f 1448 1032 254 80 1088 1426 -f 1718 972 1721 250 1034 1719 -f 1461 1038 1460 1456 752 1463 -f 1037 151 1041 262 454 1039 -f 1748 1000 1751 260 1042 1750 -f 1464 754 1404 1408 1044 1465 -f 1047 1045 1043 153 274 1049 -f 1725 1050 276 1724 980 1727 -f 1057 1055 1053 1051 155 1059 -f 1489 1054 1487 1486 764 1491 -f 1759 1058 1757 1756 1008 1761 -f 1063 26 1061 288 157 1065 -f 1492 766 468 338 1064 1493 -f 1497 1068 284 1496 770 1499 -f 1077 418 1075 1073 576 258 1079 -f 1083 1081 161 1087 570 1085 -f 1821 82 1090 1819 88 1166 -f 1095 1093 1091 1089 578 1097 -f 1103 1101 1099 594 446 1105 -f 1835 1104 1834 1830 1096 1837 -f 1111 30 1109 1107 163 1113 -f 1121 1119 1117 1115 165 1123 -f 1855 600 1126 1854 92 1158 -f 1129 1127 1125 602 354 1131 -f 1838 1098 580 1843 1130 1841 -f 1842 1132 356 1846 1102 1836 -f 1850 1110 350 86 1136 1852 -f 1145 436 1143 1141 614 1147 -f 1160 1857 608 1134 598 1856 -f 1165 604 1163 298 167 1167 -f 1168 1869 618 1152 586 1822 -f 1173 1171 1169 169 646 1175 -f 1174 1764 628 1150 622 1864 -f 1185 1183 1181 1179 173 1187 -f 1862 1144 438 1480 1182 1865 -f 1876 1170 1860 1866 1184 1872 -f 1483 1188 1481 1476 762 1485 -f 1193 32 1191 1189 175 1195 -f 1410 726 1413 368 1194 1411 -f 1762 1010 270 1412 1196 1765 -f 1203 1201 1199 1197 177 1205 -f 1781 1200 1780 1778 1018 1783 -f 1209 8 1207 412 179 1211 -f 1689 1212 1687 1686 934 1691 -f 1882 1214 1885 378 1252 1887 -f 1217 1215 1213 181 650 1219 -f 1225 1223 1221 183 28 1227 -f 1228 340 70 1246 658 1884 -f 1235 1233 1231 1229 185 1237 -f 1738 992 1678 1743 1238 1741 -f 1241 1239 656 1245 524 1243 -f 1251 34 1249 1247 187 1253 -f 1902 1224 1880 1888 1254 1903 -f 1261 1259 1257 1255 666 1263 -f 1911 1260 1910 1908 1232 1913 -f 1930 1266 1931 207 1302 1933 -f 1269 1267 1265 189 670 1271 -f 1277 1275 1273 684 374 1279 -f 1889 1280 376 1886 1216 1891 -f 1920 1250 370 102 1284 1923 -f 1924 1286 1925 664 1256 1918 -f 1291 660 1289 388 674 1293 -f 1892 1218 1895 98 1292 1893 -f 1301 1299 1297 1295 191 1303 -f 1934 1304 1945 682 1274 1928 -f 1305 694 1309 382 690 1307 -f 1393 1312 1391 1390 716 1395 -f 1317 1315 1313 1311 193 1319 -f 1619 1320 1617 1616 860 1621 -f 1327 1325 1323 1321 195 1329 -f 1937 1324 1935 1932 1268 1939 -f 1960 1300 208 1936 1326 1961 -f 1335 1333 1331 392 197 1337 -f 1957 1334 1955 1952 1298 1959 -f 1956 1336 1954 106 1306 1950 -f 1940 1270 1943 698 1342 1941 -f 1972 1318 1620 1658 1352 1973 -f 1357 1355 201 402 484 1359 -f 1562 812 1434 1567 1358 1566 -f 1814 1086 572 1806 1362 1817 -f 1367 1365 588 1363 1361 203 1369 -f 1436 738 442 84 1366 1437 -f 1618 194 1394 1659 908 1614 -f 1477 1180 1479 46 720 1402 -f 1417 1122 1421 48 730 1419 -f 1439 784 1443 50 740 1441 -f 1449 828 216 460 748 1451 -f 1459 1040 456 1444 786 1454 -f 1453 110 1457 1452 750 1455 -f 1467 836 226 54 758 1469 -f 1495 286 1062 330 56 768 -f 1501 1376 708 562 160 1498 -f 1517 826 1450 1458 778 1519 -f 1529 834 1468 1472 788 1531 -f 1535 844 1516 476 794 1537 -f 1541 854 1545 58 798 1543 -f 1547 888 1551 1544 800 1549 -f 1555 896 316 490 808 1557 -f 1565 1360 486 1546 856 1560 -f 1559 118 1563 1558 810 1561 -f 1569 864 1524 1528 816 1571 -f 1575 130 236 496 822 1577 -f 1581 918 1585 504 830 1583 -f 1589 886 1548 1554 838 1591 -f 1601 894 1556 1564 848 1603 -f 1613 910 1576 1580 858 1615 -f 1625 916 1582 1588 868 1627 -f 1633 938 1608 1612 880 1635 -f 1637 958 1641 1636 882 1639 -f 1645 966 1649 512 890 1647 -f 1663 178 1667 528 912 1665 -f 1671 956 1638 1644 922 1673 -f 1683 964 1646 1652 932 1685 -f 1695 1206 1664 1670 942 1697 -f 1694 950 1707 248 1210 1690 -f 1713 538 960 1711 416 1078 -f 1080 10 1722 974 536 1714 -f 1715 1004 428 320 970 1717 -f 1720 1036 12 1752 1002 1716 -f 1706 978 1723 278 1012 1702 -f 1731 1072 566 548 988 1733 -f 1735 1022 1739 1734 990 1737 -f 1749 152 1462 1466 1046 1746 -f 1745 1048 1726 1730 998 1747 -f 1753 1204 1696 1700 1006 1755 -f 1740 146 1767 280 1070 1732 -f 1773 1052 1490 1494 1066 1770 -f 1769 158 16 1768 1014 1771 -f 1779 1202 1754 1758 1060 1776 -f 1877 1244 526 1668 1198 1782 -f 1024 1789 410 1208 240 1788 -f 1791 1076 42 1790 1026 1793 -f 1801 1356 1568 1438 1368 1796 -f 1795 1370 1799 1794 1028 1797 -f 1807 1120 1418 1424 1082 1809 -f 1811 164 1815 1810 1084 1813 -f 1823 1140 612 1820 1092 1825 -f 1833 1106 448 1422 1124 1828 -f 1827 166 1831 1826 1094 1829 -f 1840 592 1100 1845 358 1112 -f 1851 1138 1824 1832 1116 1848 -f 1847 1118 1808 1816 1108 1849 -f 1859 1172 1863 90 1142 1861 -f 1416 434 1146 1867 290 1178 -f 1871 1186 1484 1804 1190 1873 -f 1879 1226 1883 96 182 1881 -f 1899 1236 1744 1682 1222 1901 -f 1909 1262 1898 654 1240 1906 -f 1905 1242 1878 1786 1230 1907 -f 1917 1258 1912 1916 1248 1919 -f 1927 1276 1922 100 190 1929 -f 1949 1308 692 1948 1296 1951 -f 1967 1322 1938 1942 1344 1964 -f 1963 1346 1388 1392 1314 1965 -f 1974 1354 38 1976 1330 1970 -f 1962 1328 1975 390 1332 1958 -f 2 458 2064 1 209 2394 -f 4 470 2065 3 219 2396 -f 6 494 2078 5 229 2430 -f 8 1209 2560 7 239 2561 -f 10 1080 2496 9 249 2022 -f 12 1036 2477 11 259 2025 -f 14 1011 2473 13 269 2474 -f 16 158 2127 15 279 2028 -f 18 168 2140 17 289 2041 -f 20 743 2375 19 299 2376 -f 22 488 2409 21 309 2410 -f 24 1348 2349 23 319 1984 -f 26 1063 2491 25 329 2492 -f 28 183 2155 27 339 2156 -f 30 1111 2514 29 349 2515 -f 32 1193 2551 31 359 2552 -f 34 1251 2577 33 369 2578 -f 36 673 2166 35 379 2049 -f 38 1354 2174 37 389 2354 -f 40 559 2184 39 399 2030 -f 42 1076 2499 41 409 2360 -f 44 24 1984 43 419 2054 -f 46 1479 1987 45 429 2055 -f 48 1421 1990 47 439 2056 -f 50 1443 1993 49 449 2057 -f 52 1478 2210 51 457 2063 -f 54 226 1996 53 465 2059 -f 56 330 1999 55 471 2060 -f 58 1545 2005 57 479 2066 -f 60 300 1994 59 487 2408 -f 62 210 2232 61 493 2077 -f 64 220 2233 63 499 2080 -f 66 310 2007 65 507 2437 -f 68 230 2254 67 515 2097 -f 70 340 2256 69 523 2572 -f 72 1654 2016 71 533 2458 -f 74 1710 2274 73 543 2179 -f 76 705 2185 75 553 2197 -f 78 107 2194 77 561 2196 -f 80 254 2296 79 569 2501 -f 82 1821 2034 81 577 2131 -f 84 442 2211 83 587 2630 -f 86 350 2037 85 595 2527 -f 88 1819 2304 87 603 2542 -f 90 1863 2040 89 613 2137 -f 92 1854 2038 91 623 2539 -f 94 648 2042 93 633 2139 -f 96 1883 2325 95 649 2152 -f 98 1895 2326 97 659 2595 -f 100 1922 2336 99 669 2161 -f 102 370 2047 101 677 2592 -f 104 1947 2052 103 685 2165 -f 106 1954 2348 105 693 2168 -f 108 568 2194 107 703 2195 -f 110 1453 2389 109 777 2061 -f 112 1473 2062 111 787 2393 -f 114 1446 2407 113 815 2068 -f 116 1514 2071 115 837 2419 -f 118 1559 2421 117 847 2074 -f 120 1522 2425 119 857 2075 -f 122 1534 2076 121 867 2429 -f 124 1540 2079 123 873 2431 -f 126 1552 2083 125 879 2082 -f 128 1574 2436 127 897 2089 -f 130 1575 2442 129 234 2090 -f 132 1594 2092 131 921 2448 -f 134 1606 2450 133 931 2095 -f 136 1630 2096 135 941 2188 -f 138 1642 2102 137 949 2101 -f 140 1662 2461 139 977 2109 -f 142 424 2469 141 997 2111 -f 144 1701 2112 143 1005 2189 -f 146 1740 2113 145 1013 2117 -f 148 554 2198 147 1023 2199 -f 150 266 2476 149 1031 2121 -f 152 1749 2191 151 1037 2123 -f 154 272 2124 153 1043 2125 -f 156 1775 2126 155 1051 2485 -f 158 1769 2489 157 288 2127 -f 160 562 2200 159 1067 2201 -f 162 1425 2130 161 1081 2500 -f 164 1811 2512 163 1107 2133 -f 166 1827 2516 165 1115 2134 -f 168 1870 2540 167 298 2140 -f 170 644 2192 169 1169 2142 -f 172 1415 2143 171 364 2145 -f 174 1482 2146 173 1179 2548 -f 176 1766 2149 175 1189 2148 -f 178 1663 2554 177 1197 2150 -f 180 1688 2558 179 412 2151 -f 182 96 2152 181 1213 2154 -f 184 348 2155 183 1221 2564 -f 186 1742 2567 185 1229 2157 -f 188 1904 2575 187 1247 2159 -f 190 100 2161 189 1265 2163 -f 192 1946 2597 191 1295 2167 -f 194 1618 2605 193 1311 2169 -f 196 1969 2170 195 1321 2609 -f 198 1381 2171 197 392 2193 -f 200 1387 2172 199 1339 2173 -f 202 400 2175 201 1355 2623 -f 204 1800 2627 203 1361 2176 -f 206 1503 2182 205 1375 2181 -f 208 1300 2599 207 1931 2339 -f 210 790 2394 209 211 2232 -f 212 61 2232 211 213 2411 -f 214 498 2411 213 215 2412 -f 216 828 2412 215 217 1995 -f 218 459 1995 217 1 2064 -f 220 796 2396 219 221 2233 -f 222 63 2233 221 223 2415 -f 224 506 2415 223 225 2416 -f 226 836 2416 225 227 1996 -f 228 53 1996 227 3 2065 -f 230 870 2430 229 231 2254 -f 232 67 2254 231 233 2263 -f 234 522 2263 233 235 2090 -f 236 130 2090 235 237 2008 -f 238 495 2008 237 5 2078 -f 240 1208 2561 239 241 2029 -f 242 1787 2029 241 243 2177 -f 244 1373 2177 243 245 2178 -f 246 1372 2178 245 247 2276 -f 248 1707 2276 247 7 2560 -f 250 1721 2022 249 251 2479 -f 252 1033 2479 251 253 2280 -f 254 1032 2280 253 255 2296 -f 256 79 2296 255 257 2495 -f 258 576 2495 257 9 2496 -f 260 1751 2025 259 261 2122 -f 262 1041 2122 261 263 2480 -f 264 453 2480 263 265 2214 -f 266 452 2214 265 267 2476 -f 268 149 2476 267 11 2477 -f 270 1010 2474 269 271 2208 -f 272 1409 2208 271 273 2124 -f 274 153 2124 273 275 2482 -f 276 1050 2482 275 277 2284 -f 278 1723 2284 277 13 2473 -f 280 1767 2028 279 281 2494 -f 282 1069 2494 281 283 2273 -f 284 1068 2273 283 285 2228 -f 286 1495 2228 285 287 2290 -f 288 1061 2290 287 15 2127 -f 290 1867 2041 289 291 2144 -f 292 1177 2144 291 293 2546 -f 294 637 2546 293 295 2320 -f 296 636 2320 295 297 2313 -f 298 1163 2313 297 17 2140 -f 300 742 2376 299 301 1994 -f 302 59 1994 301 303 2067 -f 304 492 2067 303 305 2404 -f 306 814 2404 305 307 2212 -f 308 1431 2212 307 19 2375 -f 310 818 2410 309 311 2007 -f 312 65 2007 311 313 2086 -f 314 514 2086 313 315 2087 -f 316 896 2087 315 317 2238 -f 318 489 2238 317 21 2409 -f 320 428 1984 319 321 2108 -f 322 969 2108 321 323 2457 -f 324 976 2457 323 325 2264 -f 326 1655 2264 325 327 2622 -f 328 1349 2622 327 23 2349 -f 330 1062 2492 329 331 1999 -f 332 55 1999 331 333 2231 -f 334 478 2231 333 335 2395 -f 336 469 2395 335 337 2221 -f 338 468 2221 337 25 2491 -f 340 1228 2156 339 341 2256 -f 342 532 2256 341 343 2432 -f 344 875 2432 343 345 2253 -f 346 874 2253 345 347 2014 -f 348 1632 2014 347 27 2155 -f 350 1110 2515 349 351 2037 -f 352 85 2037 351 353 2135 -f 354 602 2135 353 355 2521 -f 356 1132 2521 355 357 2306 -f 358 1845 2306 357 29 2514 -f 360 1192 2552 359 361 2322 -f 362 643 2322 361 363 2319 -f 364 642 2319 363 365 2145 -f 366 172 2145 365 367 1988 -f 368 1413 1988 367 31 2551 -f 370 1250 2578 369 371 2047 -f 372 101 2047 371 373 2164 -f 374 684 2164 373 375 2586 -f 376 1280 2586 375 377 2328 -f 378 1885 2328 377 33 2577 -f 380 672 2049 379 381 2602 -f 382 1309 2602 381 383 2603 -f 384 689 2603 383 385 2344 -f 386 688 2344 385 387 2340 -f 388 1289 2340 387 35 2166 -f 390 1975 2354 389 391 2351 -f 392 1331 2351 391 393 2193 -f 394 198 2193 393 395 2206 -f 396 1379 2206 395 397 2619 -f 398 1347 2619 397 37 2174 -f 400 558 2030 399 401 2175 -f 402 201 2175 401 403 2624 -f 404 483 2624 403 405 2234 -f 406 482 2234 405 407 2183 -f 408 1377 2183 407 39 2184 -f 410 1789 2360 409 411 2298 -f 412 1207 2298 411 413 2151 -f 414 180 2151 413 415 2021 -f 416 1711 2021 415 417 2498 -f 418 1077 2498 417 41 2499 -f 420 709 2054 419 421 2361 -f 422 718 2361 421 423 2203 -f 424 1400 2203 423 425 2469 -f 426 141 2469 425 427 2470 -f 428 1004 2470 427 43 1984 -f 430 719 2055 429 431 2365 -f 432 728 2365 431 433 2207 -f 434 1416 2207 433 435 2530 -f 436 1145 2530 435 437 2531 -f 438 1144 2531 437 45 1987 -f 440 729 2056 439 441 2369 -f 442 738 2369 441 443 2211 -f 444 83 2211 443 445 2508 -f 446 594 2508 445 447 2509 -f 448 1106 2509 447 47 1990 -f 450 739 2057 449 451 2373 -f 452 746 2373 451 264 2214 -f 454 262 2480 453 455 2481 -f 456 1040 2481 455 49 1993 -f 458 791 2063 457 218 2064 -f 460 216 1995 459 461 2058 -f 462 747 2058 461 463 2377 -f 464 756 2377 463 51 2210 -f 466 757 2059 465 467 2381 -f 468 766 2381 467 336 2221 -f 470 334 2395 469 228 2065 -f 472 767 2060 471 473 2385 -f 474 776 2385 473 475 2225 -f 476 1516 2225 475 477 2398 -f 478 793 2398 477 332 2231 -f 480 797 2066 479 481 2399 -f 482 806 2399 481 404 2234 -f 484 402 2624 483 485 2625 -f 486 1360 2625 485 57 2005 -f 488 819 2408 487 318 2409 -f 490 316 2238 489 491 2403 -f 492 807 2403 491 302 2067 -f 494 871 2077 493 238 2078 -f 496 236 2008 495 497 2069 -f 498 821 2069 497 212 2411 -f 500 877 2080 499 501 2081 -f 502 876 2081 501 503 2009 -f 504 1585 2009 503 505 2070 -f 506 829 2070 505 222 2415 -f 508 903 2437 507 509 2438 -f 510 902 2438 509 511 2261 -f 512 1649 2261 511 513 2434 -f 514 889 2434 513 312 2086 -f 516 947 2097 515 517 2098 -f 518 946 2098 517 519 2266 -f 520 1661 2266 519 521 2441 -f 522 905 2441 521 232 2263 -f 524 1245 2572 523 525 2573 -f 526 1244 2573 525 527 2017 -f 528 1667 2017 527 529 2091 -f 530 911 2091 529 531 2444 -f 532 920 2444 531 69 2256 -f 534 975 2458 533 535 2459 -f 536 974 2459 535 537 2278 -f 538 1713 2278 537 539 2455 -f 540 959 2455 539 541 2105 -f 542 968 2105 541 71 2016 -f 544 1371 2179 543 545 2180 -f 546 567 2180 545 547 2024 -f 548 566 2024 547 549 2110 -f 550 987 2110 549 551 2465 -f 552 996 2465 551 73 2274 -f 554 704 2197 553 555 2198 -f 556 147 2198 555 557 2118 -f 558 1030 2118 557 40 2030 -f 560 408 2184 559 75 2185 -f 562 708 2196 561 563 2200 -f 564 159 2200 563 565 2128 -f 566 1072 2128 565 546 2024 -f 568 544 2180 567 77 2194 -f 570 1087 2501 569 571 2502 -f 572 1086 2502 571 573 2031 -f 574 1805 2031 573 575 2129 -f 576 1073 2129 575 256 2495 -f 578 1089 2131 577 579 2504 -f 580 1098 2504 579 581 2300 -f 582 1844 2300 581 583 2533 -f 584 1153 2533 583 585 2534 -f 586 1152 2534 585 81 2034 -f 588 1365 2630 587 589 2631 -f 590 1364 2631 589 591 2032 -f 592 1840 2032 591 593 2132 -f 594 1099 2132 593 444 2508 -f 596 1135 2527 595 597 2308 -f 598 1134 2308 597 599 2311 -f 600 1855 2311 599 601 2520 -f 602 1125 2520 601 352 2135 -f 604 1165 2542 603 605 2543 -f 606 1164 2543 605 607 2039 -f 608 1857 2039 607 609 2136 -f 610 1133 2136 609 611 2524 -f 612 1140 2524 611 87 2304 -f 614 1141 2137 613 615 2528 -f 616 1148 2528 615 617 2312 -f 618 1869 2312 617 619 2535 -f 620 1151 2535 619 621 2315 -f 622 1150 2315 621 89 2040 -f 624 1157 2539 623 625 2318 -f 626 1156 2318 625 627 2317 -f 628 1764 2317 627 629 2532 -f 630 1149 2532 629 631 2138 -f 632 1154 2138 631 91 2038 -f 634 1155 2139 633 635 2536 -f 636 1162 2536 635 294 2320 -f 638 292 2546 637 639 2547 -f 640 641 2547 639 93 2042 -f 642 638 2547 641 362 2319 -f 644 360 2322 643 645 2192 -f 646 169 2192 645 647 2141 -f 648 1176 2141 647 640 2042 -f 650 181 2152 649 651 2153 -f 652 1220 2153 651 653 2043 -f 654 1898 2043 653 655 2158 -f 656 1239 2158 655 657 2571 -f 658 1246 2571 657 95 2325 -f 660 1291 2595 659 661 2596 -f 662 1290 2596 661 663 2048 -f 664 1925 2048 663 665 2160 -f 666 1255 2160 665 667 2579 -f 668 1264 2579 667 97 2326 -f 670 189 2161 669 671 2162 -f 672 1272 2162 671 36 2049 -f 674 388 2166 673 675 2593 -f 676 1294 2593 675 99 2336 -f 678 1283 2592 677 679 2342 -f 680 1282 2342 679 681 2341 -f 682 1945 2341 681 683 2585 -f 684 1273 2585 683 372 2164 -f 686 1281 2165 685 687 2589 -f 688 1288 2589 687 384 2344 -f 690 382 2603 689 691 2604 -f 692 1308 2604 691 103 2052 -f 694 1305 2168 693 695 2601 -f 696 1310 2601 695 697 2337 -f 698 1943 2337 697 699 2618 -f 700 1341 2618 699 701 2346 -f 702 1340 2346 701 105 2348 -f 704 1374 2195 703 76 2197 -f 706 560 2185 705 707 2186 -f 708 1376 2186 707 78 2196 -f 710 44 2054 709 711 2205 -f 712 1380 2205 711 713 2364 -f 714 1384 2364 713 715 2363 -f 716 1390 2363 715 717 2362 -f 718 1396 2362 717 420 2361 -f 720 46 2055 719 721 2209 -f 722 1401 2209 721 723 2368 -f 724 1406 2368 723 725 2367 -f 726 1410 2367 725 727 2366 -f 728 1414 2366 727 430 2365 -f 730 48 2056 729 731 1977 -f 732 1420 1977 731 733 2372 -f 734 1428 2372 733 735 2371 -f 736 1432 2371 735 737 2370 -f 738 1436 2370 737 440 2369 -f 740 50 2057 739 741 1978 -f 742 1442 1978 741 20 2376 -f 744 308 2375 743 745 2374 -f 746 1430 2374 745 450 2373 -f 748 460 2058 747 749 2219 -f 750 1452 2219 749 751 2380 -f 752 1456 2380 751 753 2379 -f 754 1464 2379 753 755 2378 -f 756 1403 2378 755 462 2377 -f 758 54 2059 757 759 1979 -f 760 1470 1979 759 761 2384 -f 762 1476 2384 761 763 2383 -f 764 1486 2383 763 765 2382 -f 766 1492 2382 765 466 2381 -f 768 56 2060 767 769 2223 -f 770 1496 2223 769 771 2388 -f 772 1500 2388 771 773 2387 -f 774 1506 2387 773 775 2386 -f 776 1512 2386 775 472 2385 -f 778 1458 2061 777 779 2227 -f 780 1520 2227 779 781 2392 -f 782 1526 2392 781 783 2391 -f 784 1439 2391 783 785 2390 -f 786 1444 2390 785 109 2389 -f 788 1472 2393 787 789 2229 -f 790 1532 2229 789 2 2394 -f 792 52 2063 791 111 2062 -f 794 476 2398 793 795 2397 -f 796 1538 2397 795 4 2396 -f 798 58 2066 797 799 2236 -f 800 1544 2236 799 801 2402 -f 802 1550 2402 801 803 2401 -f 804 1509 2401 803 805 2400 -f 806 1508 2400 805 480 2399 -f 808 490 2403 807 809 2239 -f 810 1558 2239 809 811 2406 -f 812 1562 2406 811 813 2405 -f 814 1433 2405 813 304 2404 -f 816 1528 2068 815 817 1980 -f 818 1572 1980 817 22 2410 -f 820 60 2408 819 113 2407 -f 822 496 2069 821 823 2243 -f 824 1578 2243 823 825 2414 -f 826 1517 2414 825 827 2413 -f 828 1449 2413 827 214 2412 -f 830 504 2070 829 831 2241 -f 832 1584 2241 831 833 2418 -f 834 1529 2418 833 835 2417 -f 836 1467 2417 835 224 2416 -f 838 1554 2419 837 839 2245 -f 840 1592 2245 839 841 2420 -f 842 1598 2420 841 843 2073 -f 844 1535 2073 843 845 2072 -f 846 1515 2072 845 115 2071 -f 848 1564 2074 847 849 2247 -f 850 1604 2247 849 851 2424 -f 852 1610 2424 851 853 2423 -f 854 1541 2423 853 855 2422 -f 856 1546 2422 855 117 2421 -f 858 1580 2075 857 859 2249 -f 860 1616 2249 859 861 2428 -f 862 1622 2428 861 863 2427 -f 864 1569 2427 863 865 2426 -f 866 1523 2426 865 119 2425 -f 868 1588 2429 867 869 2251 -f 870 1628 2251 869 6 2430 -f 872 62 2077 871 121 2076 -f 874 1600 2431 873 344 2253 -f 876 342 2432 875 500 2081 -f 878 64 2080 877 123 2079 -f 880 1612 2082 879 881 2258 -f 882 1636 2258 881 883 2433 -f 884 1640 2433 883 885 2085 -f 886 1589 2085 885 887 2084 -f 888 1547 2084 887 125 2083 -f 890 512 2434 889 891 2260 -f 892 1648 2260 891 893 2435 -f 894 1601 2435 893 895 2088 -f 896 1555 2088 895 314 2087 -f 898 1624 2089 897 899 2262 -f 900 1656 2262 899 901 2439 -f 902 1653 2439 901 508 2438 -f 904 66 2437 903 127 2436 -f 906 520 2441 905 907 2440 -f 908 1659 2440 907 909 2443 -f 910 1613 2443 909 129 2442 -f 912 528 2091 911 913 2267 -f 914 1666 2267 913 915 2447 -f 916 1625 2447 915 917 2446 -f 918 1581 2446 917 919 2445 -f 920 1586 2445 919 530 2444 -f 922 1644 2448 921 923 2265 -f 924 1674 2265 923 925 2449 -f 926 1680 2449 925 927 2094 -f 928 1631 2094 927 929 2093 -f 930 1595 2093 929 131 2092 -f 932 1652 2095 931 933 2269 -f 934 1686 2269 933 935 2453 -f 936 1692 2453 935 937 2452 -f 938 1633 2452 937 939 2451 -f 940 1607 2451 939 133 2450 -f 942 1670 2188 941 943 2100 -f 944 1698 2100 943 945 2099 -f 946 1704 2099 945 516 2098 -f 948 68 2097 947 135 2096 -f 950 1694 2101 949 951 2275 -f 952 1708 2275 951 953 2454 -f 954 1709 2454 953 955 2104 -f 956 1671 2104 955 957 2103 -f 958 1637 2103 957 137 2102 -f 960 538 2455 959 961 2277 -f 962 1712 2277 961 963 2456 -f 964 1683 2456 963 965 2107 -f 966 1645 2107 965 967 2106 -f 968 1650 2106 967 540 2105 -f 970 320 2108 969 971 2279 -f 972 1718 2279 971 973 2460 -f 974 1722 2460 973 534 2459 -f 976 72 2458 975 322 2457 -f 978 1706 2109 977 979 2282 -f 980 1724 2282 979 981 2464 -f 982 1728 2464 981 983 2463 -f 984 1399 2463 983 985 2462 -f 986 1398 2462 985 139 2461 -f 988 548 2110 987 989 2286 -f 990 1734 2286 989 991 2468 -f 992 1738 2468 991 993 2467 -f 994 1677 2467 993 995 2466 -f 996 1676 2466 995 550 2465 -f 998 1730 2111 997 999 2288 -f 1000 1748 2288 999 1001 2472 -f 1002 1752 2472 1001 1003 2471 -f 1004 1715 2471 1003 426 2470 -f 1006 1700 2189 1005 1007 2271 -f 1008 1756 2271 1007 1009 2475 -f 1010 1762 2475 1009 14 2474 -f 1012 278 2473 1011 143 2112 -f 1014 1768 2117 1013 1015 2190 -f 1016 1772 2190 1015 1017 2116 -f 1018 1778 2116 1017 1019 2115 -f 1020 1784 2115 1019 1021 2114 -f 1022 1735 2114 1021 145 2113 -f 1024 1788 2199 1023 1025 2202 -f 1026 1790 2202 1025 1027 2120 -f 1028 1794 2120 1027 1029 2119 -f 1030 1798 2119 1029 556 2118 -f 1032 1448 2121 1031 252 2280 -f 1034 250 2479 1033 1035 2478 -f 1036 1720 2478 1035 268 2477 -f 1038 1461 2123 1037 1039 2217 -f 1040 1459 2217 1039 454 2481 -f 1042 260 2122 1041 151 2191 -f 1044 1408 2125 1043 1045 2283 -f 1046 1466 2283 1045 1047 2484 -f 1048 1745 2484 1047 1049 2483 -f 1050 1725 2483 1049 274 2482 -f 1052 1773 2485 1051 1053 2294 -f 1054 1489 2294 1053 1055 2488 -f 1056 1488 2488 1055 1057 2487 -f 1058 1759 2487 1057 1059 2486 -f 1060 1758 2486 1059 155 2126 -f 1062 286 2290 1061 26 2492 -f 1064 338 2491 1063 1065 2490 -f 1066 1494 2490 1065 157 2489 -f 1068 1497 2201 1067 282 2273 -f 1070 280 2494 1069 1071 2493 -f 1072 1731 2493 1071 564 2128 -f 1074 574 2129 1073 1075 2359 -f 1076 1791 2359 1075 418 2499 -f 1078 416 2498 1077 1079 2497 -f 1080 1714 2497 1079 258 2496 -f 1082 1424 2500 1081 1083 2297 -f 1084 1810 2297 1083 1085 2503 -f 1086 1814 2503 1085 570 2502 -f 1088 80 2501 1087 161 2130 -f 1090 82 2131 1089 1091 2302 -f 1092 1820 2302 1091 1093 2507 -f 1094 1826 2507 1093 1095 2506 -f 1096 1830 2506 1095 1097 2505 -f 1098 1838 2505 1097 578 2504 -f 1100 592 2132 1099 1101 2303 -f 1102 1846 2303 1101 1103 2511 -f 1104 1835 2511 1103 1105 2510 -f 1106 1833 2510 1105 446 2509 -f 1108 1816 2133 1107 1109 2307 -f 1110 1850 2307 1109 30 2515 -f 1112 358 2514 1111 1113 2513 -f 1114 1839 2513 1113 163 2512 -f 1116 1832 2134 1115 1117 2305 -f 1118 1847 2305 1117 1119 2519 -f 1120 1807 2519 1119 1121 2518 -f 1122 1417 2518 1121 1123 2517 -f 1124 1422 2517 1123 165 2516 -f 1126 600 2520 1125 1127 2310 -f 1128 1853 2310 1127 1129 2523 -f 1130 1843 2523 1129 1131 2522 -f 1132 1842 2522 1131 354 2521 -f 1134 608 2136 1133 596 2308 -f 1136 86 2527 1135 1137 2526 -f 1138 1851 2526 1137 1139 2525 -f 1140 1823 2525 1139 610 2524 -f 1142 90 2137 1141 1143 1981 -f 1144 1862 1981 1143 436 2531 -f 1146 434 2530 1145 1147 2529 -f 1148 1868 2529 1147 614 2528 -f 1150 628 2532 1149 620 2315 -f 1152 618 2535 1151 584 2534 -f 1154 582 2533 1153 630 2138 -f 1156 94 2139 1155 624 2318 -f 1158 92 2539 1157 1159 2538 -f 1160 1856 2538 1159 1161 2537 -f 1162 1858 2537 1161 634 2536 -f 1164 296 2313 1163 604 2543 -f 1166 88 2542 1165 1167 2541 -f 1168 1822 2541 1167 167 2540 -f 1170 1876 2142 1169 1171 2316 -f 1172 1859 2316 1171 1173 2545 -f 1174 1864 2545 1173 1175 2544 -f 1176 1763 2544 1175 646 2141 -f 1178 290 2144 1177 171 2143 -f 1180 1477 2548 1179 1181 2323 -f 1182 1480 2323 1181 1183 2550 -f 1184 1866 2550 1183 1185 2549 -f 1186 1871 2549 1185 1187 2147 -f 1188 1483 2147 1187 173 2146 -f 1190 1804 2148 1189 1191 2321 -f 1192 1874 2321 1191 32 2552 -f 1194 368 2551 1193 1195 2553 -f 1196 1412 2553 1195 175 2149 -f 1198 1668 2150 1197 1199 2292 -f 1200 1781 2292 1199 1201 2557 -f 1202 1779 2557 1201 1203 2556 -f 1204 1753 2556 1203 1205 2555 -f 1206 1695 2555 1205 177 2554 -f 1208 410 2298 1207 8 2561 -f 1210 248 2560 1209 1211 2559 -f 1212 1689 2559 1211 179 2558 -f 1214 1882 2154 1213 1215 1982 -f 1216 1886 1982 1215 1217 2563 -f 1218 1892 2563 1217 1219 2562 -f 1220 1896 2562 1219 650 2153 -f 1222 1682 2564 1221 1223 2327 -f 1224 1902 2327 1223 1225 2566 -f 1226 1879 2566 1225 1227 2565 -f 1228 1884 2565 1227 28 2156 -f 1230 1786 2157 1229 1231 2331 -f 1232 1908 2331 1231 1233 2570 -f 1234 1914 2570 1233 1235 2569 -f 1236 1899 2569 1235 1237 2568 -f 1238 1743 2568 1237 185 2567 -f 1240 654 2158 1239 1241 2329 -f 1242 1905 2329 1241 1243 2574 -f 1244 1877 2574 1243 524 2573 -f 1246 70 2572 1245 656 2571 -f 1248 1916 2159 1247 1249 2334 -f 1250 1920 2334 1249 34 2578 -f 1252 378 2577 1251 1253 2576 -f 1254 1888 2576 1253 187 2575 -f 1256 664 2160 1255 1257 2332 -f 1258 1917 2332 1257 1259 2582 -f 1260 1911 2582 1259 1261 2581 -f 1262 1909 2581 1261 1263 2580 -f 1264 1897 2580 1263 666 2579 -f 1266 1930 2163 1265 1267 1983 -f 1268 1932 1983 1267 1269 2584 -f 1270 1940 2584 1269 1271 2583 -f 1272 1944 2583 1271 670 2162 -f 1274 682 2585 1273 1275 2338 -f 1276 1927 2338 1275 1277 2588 -f 1278 1921 2588 1277 1279 2587 -f 1280 1889 2587 1279 374 2586 -f 1282 104 2165 1281 678 2342 -f 1284 102 2592 1283 1285 2591 -f 1286 1924 2591 1285 1287 2590 -f 1288 1926 2590 1287 686 2589 -f 1290 386 2340 1289 660 2596 -f 1292 98 2595 1291 1293 2594 -f 1294 1894 2594 1293 674 2593 -f 1296 1948 2167 1295 1297 2345 -f 1298 1952 2345 1297 1299 2600 -f 1300 1960 2600 1299 1301 2599 -f 1302 207 2599 1301 1303 2598 -f 1304 1934 2598 1303 191 2597 -f 1306 106 2168 1305 1307 2343 -f 1308 1949 2343 1307 690 2604 -f 1310 380 2602 1309 694 2601 -f 1312 1393 2169 1311 1313 2255 -f 1314 1392 2255 1313 1315 2608 -f 1316 1966 2608 1315 1317 2607 -f 1318 1972 2607 1317 1319 2606 -f 1320 1619 2606 1319 193 2605 -f 1322 1967 2609 1321 1323 2353 -f 1324 1937 2353 1323 1325 2612 -f 1326 1936 2612 1325 1327 2611 -f 1328 1962 2611 1327 1329 2610 -f 1330 1976 2610 1329 195 2170 -f 1332 390 2351 1331 1333 2615 -f 1334 1957 2615 1333 1335 2614 -f 1336 1956 2614 1335 1337 2613 -f 1338 1953 2613 1337 197 2171 -f 1340 1386 2173 1339 700 2346 -f 1342 698 2618 1341 1343 2617 -f 1344 1942 2617 1343 1345 2616 -f 1346 1963 2616 1345 199 2172 -f 1348 396 2619 1347 328 2349 -f 1350 326 2622 1349 1351 2621 -f 1352 1658 2621 1351 1353 2620 -f 1354 1974 2620 1353 398 2174 -f 1356 1801 2623 1355 1357 2355 -f 1358 1567 2355 1357 1359 2626 -f 1360 1565 2626 1359 484 2625 -f 1362 1806 2176 1361 1363 2357 -f 1364 1818 2357 1363 588 2631 -f 1366 84 2630 1365 1367 2629 -f 1368 1438 2629 1367 1369 2628 -f 1370 1795 2628 1369 203 2627 -f 1372 74 2179 1371 244 2178 -f 1374 242 2177 1373 108 2195 -f 1376 1501 2181 1375 706 2186 -f 1378 406 2183 1377 205 2182 -f 1380 394 2206 1379 710 2205 -f 1382 1338 2171 1381 1383 1986 -f 1384 1385 1986 1383 712 2364 -f 1386 1382 1986 1385 200 2173 -f 1388 1346 2172 1387 1389 2204 -f 1390 1391 2204 1389 714 2363 -f 1392 1388 2204 1391 1312 2255 -f 1394 194 2169 1393 1395 1985 -f 1396 1397 1985 1395 716 2362 -f 1398 1660 1985 1397 984 2462 -f 1400 982 2463 1399 422 2203 -f 1402 720 2209 1401 464 2210 -f 1404 754 2378 1403 1405 1989 -f 1406 1407 1989 1405 722 2368 -f 1408 1404 1989 1407 154 2125 -f 1410 1411 2208 1409 724 2367 -f 1412 270 2208 1411 1194 2553 -f 1414 366 1988 1413 726 2366 -f 1416 1178 2143 1415 432 2207 -f 1418 1120 2518 1417 1419 2213 -f 1420 1423 2213 1419 730 1977 -f 1422 448 1990 1421 1122 2517 -f 1424 1418 2213 1423 162 2500 -f 1426 1088 2130 1425 1427 1992 -f 1428 1429 1992 1427 732 2372 -f 1430 1447 1992 1429 744 2374 -f 1432 306 2212 1431 734 2371 -f 1434 812 2405 1433 1435 1991 -f 1436 1437 1991 1435 736 2370 -f 1438 1568 1991 1437 1366 2629 -f 1440 782 2391 1439 1441 2215 -f 1442 1445 2215 1441 740 1978 -f 1444 456 1993 1443 784 2390 -f 1446 1440 2215 1445 820 2407 -f 1448 1426 1992 1447 150 2121 -f 1450 826 2413 1449 1451 2220 -f 1452 1457 2220 1451 748 2219 -f 1454 786 2389 1453 1455 2218 -f 1456 1460 2218 1455 750 2380 -f 1458 1450 2220 1457 110 2061 -f 1460 1038 2217 1459 1454 2218 -f 1462 152 2123 1461 1463 2216 -f 1464 1465 2216 1463 752 2379 -f 1466 1462 2216 1465 1044 2283 -f 1468 834 2417 1467 1469 2224 -f 1470 1471 2224 1469 758 1979 -f 1472 1468 2224 1471 112 2393 -f 1474 792 2062 1473 1475 1998 -f 1476 1481 1998 1475 760 2384 -f 1478 174 2548 1477 1402 2210 -f 1480 438 1987 1479 1180 2323 -f 1482 1474 1998 1481 1188 2146 -f 1484 1186 2147 1483 1485 2222 -f 1486 1487 2222 1485 762 2383 -f 1488 1803 2222 1487 1054 2488 -f 1490 1052 2294 1489 1491 1997 -f 1492 1493 1997 1491 764 2382 -f 1494 1490 1997 1493 1064 2490 -f 1496 284 2228 1495 768 2223 -f 1498 160 2201 1497 1499 2001 -f 1500 1502 2001 1499 770 2388 -f 1502 206 2181 1501 1498 2001 -f 1504 1378 2182 1503 1505 2226 -f 1506 1507 2226 1505 772 2387 -f 1508 1504 2226 1507 804 2400 -f 1510 802 2401 1509 1511 2000 -f 1512 1513 2000 1511 774 2386 -f 1514 1510 2000 1513 846 2071 -f 1516 844 2072 1515 474 2225 -f 1518 824 2414 1517 1519 2230 -f 1520 1521 2230 1519 778 2227 -f 1522 1518 2230 1521 866 2425 -f 1524 864 2426 1523 1525 2002 -f 1526 1527 2002 1525 780 2392 -f 1528 1524 2002 1527 114 2068 -f 1530 832 2418 1529 1531 2003 -f 1532 1533 2003 1531 788 2229 -f 1534 1530 2003 1533 872 2076 -f 1536 842 2073 1535 1537 2004 -f 1538 1539 2004 1537 794 2397 -f 1540 1536 2004 1539 878 2079 -f 1542 852 2423 1541 1543 2237 -f 1544 1551 2237 1543 798 2236 -f 1546 486 2005 1545 854 2422 -f 1548 886 2084 1547 1549 2235 -f 1550 1553 2235 1549 800 2402 -f 1552 1542 2237 1551 888 2083 -f 1554 1548 2235 1553 116 2419 -f 1556 894 2088 1555 1557 2006 -f 1558 1563 2006 1557 808 2239 -f 1560 856 2421 1559 1561 2240 -f 1562 1566 2240 1561 810 2406 -f 1564 1556 2006 1563 118 2074 -f 1566 1358 2626 1565 1560 2240 -f 1568 1356 2355 1567 1434 1991 -f 1570 862 2427 1569 1571 2242 -f 1572 1573 2242 1571 816 1980 -f 1574 1570 2242 1573 904 2436 -f 1576 910 2442 1575 1577 2244 -f 1578 1579 2244 1577 822 2243 -f 1580 1576 2244 1579 120 2075 -f 1582 916 2446 1581 1583 2246 -f 1584 1587 2246 1583 830 2241 -f 1586 502 2009 1585 918 2445 -f 1588 1582 2246 1587 122 2429 -f 1590 884 2085 1589 1591 2010 -f 1592 1593 2010 1591 838 2245 -f 1594 1590 2010 1593 930 2092 -f 1596 928 2093 1595 1597 2248 -f 1598 1599 2248 1597 840 2420 -f 1600 1596 2248 1599 124 2431 -f 1602 892 2435 1601 1603 2250 -f 1604 1605 2250 1603 848 2247 -f 1606 1602 2250 1605 940 2450 -f 1608 938 2451 1607 1609 2011 -f 1610 1611 2011 1609 850 2424 -f 1612 1608 2011 1611 126 2082 -f 1614 908 2443 1613 1615 2252 -f 1616 1617 2252 1615 858 2249 -f 1618 1614 2252 1617 1320 2605 -f 1620 1318 2606 1619 1621 2012 -f 1622 1623 2012 1621 860 2428 -f 1624 1657 2012 1623 128 2089 -f 1626 914 2447 1625 1627 2013 -f 1628 1629 2013 1627 868 2251 -f 1630 1626 2013 1629 948 2096 -f 1632 926 2094 1631 346 2014 -f 1634 936 2452 1633 1635 2259 -f 1636 1641 2259 1635 880 2258 -f 1638 956 2103 1637 1639 2257 -f 1640 1643 2257 1639 882 2433 -f 1642 1634 2259 1641 958 2102 -f 1644 1638 2257 1643 132 2448 -f 1646 964 2107 1645 1647 2015 -f 1648 1651 2015 1647 890 2260 -f 1650 510 2261 1649 966 2106 -f 1652 1646 2015 1651 134 2095 -f 1654 900 2439 1653 542 2016 -f 1656 324 2264 1655 898 2262 -f 1658 1620 2012 1657 1350 2621 -f 1660 906 2440 1659 1394 1985 -f 1662 518 2266 1661 986 2461 -f 1664 1206 2554 1663 1665 2268 -f 1666 1669 2268 1665 912 2267 -f 1668 526 2017 1667 178 2150 -f 1670 1664 2268 1669 136 2188 -f 1672 954 2104 1671 1673 2018 -f 1674 1675 2018 1673 922 2265 -f 1676 1672 2018 1675 994 2466 -f 1678 992 2467 1677 1679 2270 -f 1680 1681 2270 1679 924 2449 -f 1682 1744 2270 1681 184 2564 -f 1684 962 2456 1683 1685 2272 -f 1686 1687 2272 1685 932 2269 -f 1688 1684 2272 1687 1212 2558 -f 1690 1210 2559 1689 1691 2019 -f 1692 1693 2019 1691 934 2453 -f 1694 1690 2019 1693 138 2101 -f 1696 1204 2555 1695 1697 2187 -f 1698 1699 2187 1697 942 2100 -f 1700 1696 2187 1699 144 2189 -f 1702 1012 2112 1701 1703 2020 -f 1704 1705 2020 1703 944 2099 -f 1706 1702 2020 1705 140 2109 -f 1708 246 2276 1707 950 2275 -f 1710 952 2454 1709 552 2274 -f 1712 414 2021 1711 960 2277 -f 1714 536 2278 1713 1078 2497 -f 1716 1002 2471 1715 1717 2281 -f 1718 1719 2281 1717 970 2279 -f 1720 1716 2281 1719 1034 2478 -f 1722 10 2022 1721 972 2460 -f 1724 276 2284 1723 978 2282 -f 1726 1048 2483 1725 1727 2023 -f 1728 1729 2023 1727 980 2464 -f 1730 1726 2023 1729 142 2111 -f 1732 1070 2493 1731 1733 2287 -f 1734 1739 2287 1733 988 2286 -f 1736 1020 2114 1735 1737 2285 -f 1738 1741 2285 1737 990 2468 -f 1740 1732 2287 1739 1022 2113 -f 1742 1736 2285 1741 1238 2567 -f 1744 1236 2568 1743 1678 2270 -f 1746 1046 2484 1745 1747 2289 -f 1748 1750 2289 1747 998 2288 -f 1750 1042 2191 1749 1746 2289 -f 1752 12 2025 1751 1000 2472 -f 1754 1202 2556 1753 1755 2291 -f 1756 1757 2291 1755 1006 2271 -f 1758 1754 2291 1757 1058 2486 -f 1760 1056 2487 1759 1761 2026 -f 1762 1765 2026 1761 1008 2475 -f 1764 1174 2544 1763 626 2317 -f 1766 1760 2026 1765 1196 2149 -f 1768 16 2028 1767 146 2117 -f 1770 1066 2489 1769 1771 2295 -f 1772 1774 2295 1771 1014 2190 -f 1774 156 2485 1773 1770 2295 -f 1776 1060 2126 1775 1777 2027 -f 1778 1780 2027 1777 1016 2116 -f 1780 1200 2557 1779 1776 2027 -f 1782 1198 2292 1781 1783 2293 -f 1784 1785 2293 1783 1018 2115 -f 1786 1878 2293 1785 186 2157 -f 1788 240 2029 1787 148 2199 -f 1790 42 2360 1789 1024 2202 -f 1792 1074 2359 1791 1793 2358 -f 1794 1799 2358 1793 1026 2120 -f 1796 1368 2628 1795 1797 2356 -f 1798 1802 2356 1797 1028 2119 -f 1800 1792 2358 1799 1370 2627 -f 1802 202 2623 1801 1796 2356 -f 1804 1484 2222 1803 176 2148 -f 1806 572 2031 1805 204 2176 -f 1808 1118 2519 1807 1809 2033 -f 1810 1815 2033 1809 1082 2297 -f 1812 1114 2512 1811 1813 2299 -f 1814 1817 2299 1813 1084 2503 -f 1816 1808 2033 1815 164 2133 -f 1818 1812 2299 1817 1362 2357 -f 1820 612 2304 1819 1090 2302 -f 1822 586 2034 1821 1166 2541 -f 1824 1138 2525 1823 1825 2036 -f 1826 1831 2036 1825 1092 2507 -f 1828 1124 2516 1827 1829 2301 -f 1830 1834 2301 1829 1094 2506 -f 1832 1824 2036 1831 166 2134 -f 1834 1104 2510 1833 1828 2301 -f 1836 1102 2511 1835 1837 2035 -f 1838 1841 2035 1837 1096 2505 -f 1840 1112 2513 1839 590 2032 -f 1842 1836 2035 1841 1130 2522 -f 1844 1128 2523 1843 580 2300 -f 1846 356 2306 1845 1100 2303 -f 1848 1116 2305 1847 1849 2309 -f 1850 1852 2309 1849 1108 2307 -f 1852 1136 2526 1851 1848 2309 -f 1854 1126 2310 1853 632 2038 -f 1856 598 2311 1855 1158 2538 -f 1858 606 2039 1857 1160 2537 -f 1860 1170 2316 1859 1861 2314 -f 1862 1865 2314 1861 1142 1981 -f 1864 622 2040 1863 1172 2545 -f 1866 1860 2314 1865 1182 2550 -f 1868 18 2041 1867 1146 2529 -f 1870 616 2312 1869 1168 2540 -f 1872 1184 2549 1871 1873 2324 -f 1874 1875 2324 1873 1190 2321 -f 1876 1872 2324 1875 170 2142 -f 1878 1242 2574 1877 1782 2293 -f 1880 1224 2566 1879 1881 2045 -f 1882 1887 2045 1881 182 2154 -f 1884 658 2325 1883 1226 2565 -f 1886 376 2328 1885 1214 1982 -f 1888 1880 2045 1887 1252 2576 -f 1890 1278 2587 1889 1891 2044 -f 1892 1893 2044 1891 1216 2563 -f 1894 1890 2044 1893 1292 2594 -f 1896 668 2326 1895 1218 2562 -f 1898 1262 2580 1897 652 2043 -f 1900 1234 2569 1899 1901 2330 -f 1902 1903 2330 1901 1222 2327 -f 1904 1900 2330 1903 1254 2575 -f 1906 1240 2329 1905 1907 2333 -f 1908 1910 2333 1907 1230 2331 -f 1910 1260 2581 1909 1906 2333 -f 1912 1258 2582 1911 1913 2046 -f 1914 1915 2046 1913 1232 2570 -f 1916 1912 2046 1915 188 2159 -f 1918 1256 2332 1917 1919 2335 -f 1920 1923 2335 1919 1248 2334 -f 1922 1276 2588 1921 676 2336 -f 1924 1918 2335 1923 1284 2591 -f 1926 662 2048 1925 1286 2590 -f 1928 1274 2338 1927 1929 2051 -f 1930 1933 2051 1929 190 2163 -f 1932 1935 2339 1931 1266 1983 -f 1934 1928 2051 1933 1302 2598 -f 1936 208 2339 1935 1324 2612 -f 1938 1322 2353 1937 1939 2050 -f 1940 1941 2050 1939 1268 2584 -f 1942 1938 2050 1941 1342 2617 -f 1944 696 2337 1943 1270 2583 -f 1946 680 2341 1945 1304 2597 -f 1948 692 2052 1947 192 2167 -f 1950 1306 2343 1949 1951 2347 -f 1952 1955 2347 1951 1296 2345 -f 1954 1336 2613 1953 702 2348 -f 1956 1950 2347 1955 1334 2614 -f 1958 1332 2615 1957 1959 2053 -f 1960 1961 2053 1959 1298 2600 -f 1962 1958 2053 1961 1326 2611 -f 1964 1344 2616 1963 1965 2352 -f 1966 1968 2352 1965 1314 2608 -f 1968 196 2609 1967 1964 2352 -f 1970 1330 2170 1969 1971 2350 -f 1972 1973 2350 1971 1316 2607 -f 1974 1970 2350 1973 1352 2620 -f 1976 38 2354 1975 1328 2610 -# 1317 faces - diff --git a/topmodx/objs/geodesicdome.obj b/topmodx/objs/geodesicdome.obj deleted file mode 100644 index 202746d..0000000 --- a/topmodx/objs/geodesicdome.obj +++ /dev/null @@ -1,816 +0,0 @@ -v -0.391799 -0.106903 0.913819 -v 0.671674 -2.32416e-17 -0.740847 -v -0.458914 -0.863595 -0.208807 -v 0.949725 -0.207227 -0.234689 -v 0.715036 0.586962 -0.379735 -v 0.863595 -0.208807 -0.458914 -v 0.533731 0.742539 0.404681 -v 0.172973 0.806916 -0.564771 -v -0.207227 -0.234689 -0.949725 -v 0.458914 -0.863595 0.208807 -v 0.742539 0.404681 -0.533731 -v 1.48774e-17 -0.740847 0.671674 -v 0.323725 -0.855154 0.404862 -v 0.855154 0.404862 0.323725 -v -0.404862 0.323725 -0.855154 -v 0.200073 0.655082 0.728587 -v 0.978806 0.20479 4.22237e-18 -v 0.855154 -0.404862 0.323725 -v 0.949725 0.207227 -0.234689 -v 0.934172 -2.79629e-17 -0.356822 -v 0.57735 -0.57735 -0.57735 -v 0.356822 0.934172 1.3741e-19 -v 0.525731 -3.22405e-17 0.850651 -v 0.391799 -0.106903 0.913819 -v 0.20479 -2.91103e-17 0.978806 -v 1.72449e-17 0.356822 0.934172 -v 1.52999e-17 0.850651 0.525731 -v -0.525731 -2.94512e-17 0.850651 -v -0.207227 0.234689 0.949725 -v 1.59972e-17 -0.850651 0.525731 -v 0.404862 -0.323725 0.855154 -v 0.525731 -2.94512e-17 -0.850651 -v 1.4909e-17 -0.356822 -0.934172 -v 0.207227 -0.234689 -0.949725 -v 1.52999e-17 -0.850651 -0.525731 -v 1.25678e-17 -0.56999 -0.821651 -v -0.525731 -2.80566e-17 -0.850651 -v 1.1116e-17 0.850651 -0.525731 -v 0.379735 0.715036 0.586962 -v 0.850651 -0.525731 3.15842e-18 -v 0.850651 0.525731 8.03961e-18 -v -0.850651 0.525731 8.03961e-18 -v -0.728587 0.200073 0.655082 -v -0.850651 -0.525731 8.03961e-18 -v -0.806916 -0.564771 -0.172973 -v -0.855154 -0.404862 -0.323725 -v 0.57735 0.57735 0.57735 -v 1.84129e-17 -0.356822 0.934172 -v -0.57735 0.57735 0.57735 -v 0.57735 -0.57735 0.57735 -v -0.57735 -0.57735 0.57735 -v -0.172973 -0.806916 0.564771 -v -0.934172 -2.56269e-17 -0.356822 -v 0.57735 0.57735 -0.57735 -v 0.379735 0.715036 -0.586962 -v 0.934172 -2.3291e-17 0.356822 -v -0.356822 0.934172 5.97733e-18 -v -0.740847 0.671674 1.30263e-18 -v 1.95809e-17 0.356822 -0.934172 -v -0.57735 0.57735 -0.57735 -v 0.356822 -0.934172 -1.03057e-18 -v 0.533731 -0.742539 0.404681 -v -0.356822 -0.934172 1.3741e-19 -v -0.106903 -0.913819 -0.391799 -v -0.57735 -0.57735 -0.57735 -v -0.934172 -2.44589e-17 0.356822 -v 0.404862 0.323725 0.855154 -v 0.323725 0.855154 0.404862 -v -0.404862 0.323725 0.855154 -v -0.200073 0.655082 0.728587 -v 1.37313e-17 0.978806 0.20479 -v -0.20479 -2.6776e-17 0.978806 -v -0.200073 -0.655082 0.728587 -v 0.655082 -0.728587 -0.200073 -v 0.20479 -2.91103e-17 -0.978806 -v 0.978806 -0.20479 9.47458e-18 -v 0.728587 -0.200073 -0.655082 -v 0.404862 -0.323725 -0.855154 -v 0.200073 -0.655082 -0.728587 -v -0.200073 -0.655082 -0.728587 -v 0.323725 -0.855154 -0.404862 -v 1.37313e-17 -0.978806 -0.20479 -v -0.20479 -3.49461e-17 -0.978806 -v -0.404862 -0.323725 -0.855154 -v 9.06264e-18 0.978806 -0.20479 -v 0.200073 0.655082 -0.728587 -v -0.200073 0.655082 -0.728587 -v 0.323725 0.855154 -0.404862 -v 0.855154 -0.404862 -0.323725 -v 0.655082 -0.728587 0.200073 -v 0.728587 -0.200073 0.655082 -v 0.728587 0.200073 -0.655082 -v 0.655082 0.728587 0.200073 -v 0.728587 0.200073 0.655082 -v 0.655082 0.728587 -0.200073 -v 0.404862 0.323725 -0.855154 -v 0.855154 0.404862 -0.323725 -v -0.323725 0.855154 0.404862 -v -0.655082 0.728587 0.200073 -v -0.323725 0.855154 -0.404862 -v -0.655082 0.728587 -0.200073 -v -0.728587 -0.200073 -0.655082 -v -0.978806 0.20479 6.55668e-18 -v 1.60656e-17 -0.978806 0.20479 -v -0.728587 0.200073 -0.655082 -v -0.323725 -0.855154 -0.404862 -v -0.855154 0.404862 0.323725 -v -0.323725 -0.855154 0.404862 -v -0.655082 -0.728587 -0.200073 -v -0.404862 -0.323725 0.855154 -v -0.728587 -0.200073 0.655082 -v -0.655082 -0.728587 0.200073 -v -0.855154 -0.404862 0.323725 -v -0.855154 0.404862 -0.323725 -v -0.978806 -0.20479 4.22237e-18 -v 0.200073 -0.655082 0.728587 -v 0.992646 -2.56233e-17 0.121056 -v 0.992646 -1.97842e-17 -0.121056 -v 0.742539 -0.404681 -0.533731 -v 9.06778e-18 0.121056 0.992646 -v 0.391799 0.106903 0.913819 -v 0.207227 0.234689 0.949725 -v 0.208807 0.458914 0.863595 -v 1.95728e-17 0.56999 0.821651 -v 1.25464e-17 0.740847 0.671674 -v 0.172973 0.806916 0.564771 -v 0.106903 0.913819 0.391799 -v 0.564771 -0.172973 0.806916 -v 0.586962 -0.379735 0.715036 -v 0.207227 -0.234689 0.949725 -v 0.863595 0.208807 -0.458914 -v 0.821651 -2.67839e-17 -0.56999 -v 0.564771 -0.172973 -0.806916 -v 0.208807 -0.458914 -0.863595 -v 0.172973 -0.806916 -0.564771 -v -0.564771 0.172973 -0.806916 -v -0.391799 0.106903 -0.913819 -v -0.391799 -0.106903 -0.913819 -v 0.913819 -0.391799 0.106903 -v 0.106903 0.913819 -0.391799 -v 0.806916 -0.564771 0.172973 -v -0.671674 -2.79036e-17 0.740847 -v 0.806916 -0.564771 -0.172973 -v 0.913819 -0.391799 -0.106903 -v 0.56999 0.821651 5.97487e-18 -v 0.913819 0.391799 0.106903 -v 0.913819 0.391799 -0.106903 -v -0.564771 0.172973 0.806916 -v 0.208807 -0.458914 0.863595 -v -0.913819 -0.391799 -0.106903 -v 0.949725 0.207227 0.234689 -v 0.458914 0.863595 0.208807 -v 0.404681 0.533731 0.742539 -v 0.586962 0.379735 0.715036 -v 0.949725 -0.207227 0.234689 -v 0.671674 -2.55726e-17 0.740847 -v 0.715036 0.586962 0.379735 -v 2.30816e-17 -0.121056 0.992646 -v -0.207227 -0.234689 0.949725 -v -0.742539 0.404681 0.533731 -v 1.25678e-17 -0.56999 0.821651 -v -0.586962 0.379735 0.715036 -v -0.208807 0.458914 0.863595 -v -0.404681 0.533731 0.742539 -v -0.379735 0.715036 0.586962 -v 0.404681 -0.533731 0.742539 -v 0.379735 -0.715036 0.586962 -v 0.172973 -0.806916 0.564771 -v -0.715036 0.586962 0.379735 -v 0.715036 -0.586962 0.379735 -v 0.742539 -0.404681 0.533731 -v -0.208807 -0.458914 0.863595 -v -0.404681 -0.533731 0.742539 -v -0.564771 -0.172973 0.806916 -v -0.586962 -0.379735 0.715036 -v -0.863595 -0.208807 -0.458914 -v -0.806916 -0.564771 0.172973 -v -0.671674 -2.55726e-17 -0.740847 -v -0.949725 -0.207227 -0.234689 -v -0.821651 -2.67839e-17 0.56999 -v -0.949725 0.207227 -0.234689 -v 0.533731 0.742539 -0.404681 -v 0.740847 0.671674 -1.02839e-18 -v 0.806916 0.564771 -0.172973 -v -0.172973 0.806916 0.564771 -v 0.586962 0.379735 -0.715036 -v -0.207227 0.234689 -0.949725 -v 0.564771 0.172973 0.806916 -v 0.863595 -0.208807 0.458914 -v 0.742539 0.404681 0.533731 -v 0.863595 0.208807 0.458914 -v 0.821651 -2.32814e-17 0.56999 -v -0.533731 0.742539 0.404681 -v -0.106903 0.913819 0.391799 -v 0.458914 0.863595 -0.208807 -v 0.234689 0.949725 -0.207227 -v -0.121056 0.992646 1.30521e-18 -v -0.234689 0.949725 -0.207227 -v -0.404681 0.533731 -0.742539 -v 0.391799 0.106903 -0.913819 -v 0.564771 0.172973 -0.806916 -v 0.404681 -0.533731 -0.742539 -v 1.48774e-17 0.740847 -0.671674 -v -0.208807 0.458914 -0.863595 -v 1.25678e-17 0.56999 -0.821651 -v 0.404681 0.533731 -0.742539 -v 0.208807 0.458914 -0.863595 -v 0.391799 -0.106903 -0.913819 -v 1.72425e-17 -0.121056 -0.992646 -v 0.207227 0.234689 -0.949725 -v -0.458914 0.863595 0.208807 -v 0.379735 -0.715036 -0.586962 -v 1.49069e-17 0.121056 -0.992646 -v -0.586962 0.379735 -0.715036 -v -0.821651 -2.32814e-17 -0.56999 -v -0.863595 0.208807 -0.458914 -v -0.742539 0.404681 -0.533731 -v -0.56999 0.821651 -1.03015e-18 -v -0.533731 0.742539 -0.404681 -v -0.806916 0.564771 -0.172973 -v -0.106903 0.913819 -0.391799 -v -0.458914 0.863595 -0.208807 -v -0.715036 0.586962 -0.379735 -v -0.172973 0.806916 -0.564771 -v 0.715036 -0.586962 -0.379735 -v 0.533731 -0.742539 -0.404681 -v 0.740847 -0.671674 1.30263e-18 -v 0.56999 -0.821651 -1.03015e-18 -v 0.106903 -0.913819 -0.391799 -v 0.234689 -0.949725 0.207227 -v 0.234689 -0.949725 -0.207227 -v 0.121056 -0.992646 9.47995e-18 -v -0.121056 -0.992646 3.64085e-18 -v 0.106903 -0.913819 0.391799 -v -0.106903 -0.913819 0.391799 -v -0.234689 -0.949725 0.207227 -v -0.913819 0.391799 0.106903 -v -0.715036 -0.586962 0.379735 -v -0.533731 -0.742539 0.404681 -v -0.458914 -0.863595 0.208807 -v -0.740847 -0.671674 3.63364e-18 -v -0.715036 -0.586962 -0.379735 -v -0.742539 -0.404681 -0.533731 -v -0.564771 -0.172973 -0.806916 -v -0.56999 -0.821651 2.47236e-18 -v -0.208807 -0.458914 -0.863595 -v -0.586962 -0.379735 -0.715036 -v 1.25464e-17 -0.740847 -0.671674 -v -0.172973 -0.806916 -0.564771 -v -0.404681 -0.533731 -0.742539 -v -0.379735 -0.715036 -0.586962 -v -0.533731 -0.742539 -0.404681 -v -0.806916 0.564771 0.172973 -v -0.992646 -2.56233e-17 -0.121056 -v -0.863595 -0.208807 0.458914 -v -0.992646 -1.97842e-17 0.121056 -v -0.913819 -0.391799 0.106903 -v -0.949725 -0.207227 0.234689 -v -0.742539 -0.404681 0.533731 -v -0.863595 0.208807 0.458914 -v -0.913819 0.391799 -0.106903 -v -0.949725 0.207227 0.234689 -v 0.234689 0.949725 0.207227 -v -0.391799 0.106903 0.913819 -v -0.234689 0.949725 0.207227 -v 0.121056 0.992646 3.64085e-18 -v -0.379735 -0.715036 0.586962 -v 0.458914 -0.863595 -0.208807 -v 0.586962 -0.379735 -0.715036 -v -0.234689 -0.949725 -0.207227 -v -0.379735 0.715036 -0.586962 -v 0.806916 0.564771 0.172973 -# 272 vertices - -f 174 110 1 -f 159 1 110 -f 159 72 1 -f 264 1 72 -f 264 28 1 -f 174 1 28 -f 201 92 2 -f 132 2 92 -f 132 77 2 -f 133 2 77 -f 133 32 2 -f 201 2 32 -f 252 106 3 -f 270 3 106 -f 270 63 3 -f 245 3 63 -f 245 109 3 -f 252 3 109 -f 144 89 4 -f 89 6 4 -f 20 4 6 -f 118 4 20 -f 118 76 4 -f 144 4 76 -f 182 95 5 -f 184 5 95 -f 184 97 5 -f 97 11 5 -f 54 5 11 -f 182 5 54 -f 119 6 89 -f 119 77 6 -f 132 6 77 -f 132 20 6 -f 152 7 93 -f 152 68 7 -f 68 39 7 -f 47 7 39 -f 157 7 47 -f 157 93 7 -f 88 55 8 -f 86 8 55 -f 203 8 86 -f 203 38 8 -f 140 8 38 -f 140 88 8 -f 138 9 84 -f 138 83 9 -f 209 9 83 -f 209 33 9 -f 246 9 33 -f 246 84 9 -f 90 62 10 -f 62 13 10 -f 230 10 13 -f 230 61 10 -f 228 10 61 -f 228 90 10 -f 186 11 92 -f 186 54 11 -f 131 11 97 -f 131 92 11 -f 161 12 116 -f 161 73 12 -f 73 52 12 -f 52 30 12 -f 168 12 30 -f 168 116 12 -f 167 13 62 -f 168 13 167 -f 234 13 168 -f 234 230 13 -f 190 14 157 -f 191 14 190 -f 191 151 14 -f 151 146 14 -f 272 14 146 -f 272 157 14 -f 214 199 15 -f 204 15 199 -f 204 187 15 -f 187 137 15 -f 137 136 15 -f 214 15 136 -f 126 16 39 -f 126 125 16 -f 125 124 16 -f 124 123 16 -f 153 16 123 -f 153 39 16 -f 118 17 117 -f 118 19 17 -f 147 17 19 -f 147 146 17 -f 151 17 146 -f 151 117 17 -f 189 171 18 -f 171 170 18 -f 170 141 18 -f 141 139 18 -f 155 18 139 -f 189 18 155 -f 147 19 97 -f 118 20 19 -f 131 19 20 -f 131 97 19 -f 132 131 20 -f 226 212 21 -f 212 202 21 -f 269 21 202 -f 269 119 21 -f 225 21 119 -f 226 21 225 -f 266 22 196 -f 266 263 22 -f 263 152 22 -f 152 145 22 -f 195 22 145 -f 196 22 195 -f 121 24 23 -f 128 23 24 -f 156 23 128 -f 188 23 156 -f 188 121 23 -f 128 24 31 -f 121 25 24 -f 130 24 25 -f 130 31 24 -f 122 25 121 -f 122 120 25 -f 158 25 120 -f 158 130 25 -f 163 29 26 -f 120 26 29 -f 122 26 120 -f 123 26 122 -f 124 26 123 -f 163 26 124 -f 126 27 125 -f 127 27 126 -f 194 27 127 -f 194 185 27 -f 185 125 27 -f 264 148 28 -f 148 142 28 -f 174 28 142 -f 120 29 72 -f 163 69 29 -f 264 29 69 -f 264 72 29 -f 235 30 52 -f 235 234 30 -f 234 168 30 -f 149 31 130 -f 166 31 149 -f 166 129 31 -f 129 128 31 -f 201 32 200 -f 208 32 133 -f 208 200 32 -f 134 33 34 -f 134 36 33 -f 246 33 36 -f 209 34 33 -f 208 34 75 -f 208 78 34 -f 134 34 78 -f 209 75 34 -f 248 135 35 -f 229 35 135 -f 229 64 35 -f 249 35 64 -f 249 248 35 -f 248 36 79 -f 248 80 36 -f 246 36 80 -f 134 79 36 -f 137 37 136 -f 138 37 137 -f 244 37 138 -f 244 178 37 -f 178 136 37 -f 224 38 203 -f 224 221 38 -f 221 140 38 -f 126 39 68 -f 153 47 39 -f 227 143 40 -f 144 40 143 -f 144 139 40 -f 141 40 139 -f 227 40 141 -f 184 183 41 -f 272 41 183 -f 272 146 41 -f 147 41 146 -f 184 41 147 -f 253 58 42 -f 220 42 58 -f 261 42 220 -f 261 237 42 -f 253 42 237 -f 148 43 142 -f 162 43 148 -f 162 160 43 -f 260 43 160 -f 260 180 43 -f 180 142 43 -f 241 44 45 -f 241 177 44 -f 257 44 177 -f 257 150 44 -f 150 45 44 -f 242 45 46 -f 242 109 45 -f 241 45 109 -f 150 46 45 -f 179 176 46 -f 243 46 176 -f 243 242 46 -f 179 46 150 -f 190 157 47 -f 154 47 153 -f 190 47 154 -f 158 48 130 -f 159 48 158 -f 172 48 159 -f 172 161 48 -f 161 149 48 -f 149 130 48 -f 162 49 160 -f 164 49 162 -f 165 49 164 -f 193 49 165 -f 193 169 49 -f 169 160 49 -f 166 50 129 -f 167 50 166 -f 167 62 50 -f 170 50 62 -f 171 50 170 -f 171 129 50 -f 267 173 51 -f 175 51 173 -f 259 51 175 -f 259 238 51 -f 239 51 238 -f 267 51 239 -f 267 52 73 -f 267 108 52 -f 235 52 108 -f 179 53 176 -f 254 53 179 -f 254 181 53 -f 216 53 181 -f 216 215 53 -f 215 176 53 -f 206 55 54 -f 182 54 55 -f 206 54 186 -f 182 55 88 -f 206 86 55 -f 151 56 117 -f 191 56 151 -f 192 56 191 -f 192 189 56 -f 189 155 56 -f 155 117 56 -f 218 211 57 -f 265 57 211 -f 265 197 57 -f 198 57 197 -f 222 57 198 -f 222 218 57 -f 218 58 99 -f 218 101 58 -f 220 58 101 -f 253 99 58 -f 207 59 205 -f 210 59 207 -f 213 59 210 -f 213 187 59 -f 204 59 187 -f 205 59 204 -f 214 60 199 -f 217 60 214 -f 223 60 217 -f 223 219 60 -f 271 60 219 -f 271 199 60 -f 232 231 61 -f 268 61 231 -f 268 228 61 -f 232 61 230 -f 170 62 90 -f 270 233 63 -f 236 63 233 -f 240 63 236 -f 245 63 240 -f 270 64 82 -f 270 106 64 -f 249 64 106 -f 229 82 64 -f 243 65 242 -f 247 65 243 -f 250 65 247 -f 251 65 250 -f 252 65 251 -f 252 242 65 -f 262 256 66 -f 258 66 256 -f 258 255 66 -f 255 180 66 -f 260 66 180 -f 262 66 260 -f 154 153 67 -f 153 123 67 -f 123 122 67 -f 122 121 67 -f 188 67 121 -f 188 154 67 -f 127 126 68 -f 263 68 152 -f 263 127 68 -f 164 69 163 -f 164 162 69 -f 162 148 69 -f 264 69 148 -f 165 164 70 -f 164 163 70 -f 163 124 70 -f 125 70 124 -f 185 70 125 -f 185 165 70 -f 265 71 197 -f 265 194 71 -f 194 127 71 -f 263 71 127 -f 266 71 263 -f 266 197 71 -f 159 158 72 -f 158 120 72 -f 172 73 161 -f 173 73 172 -f 267 73 173 -f 227 74 143 -f 228 74 227 -f 268 74 228 -f 268 226 74 -f 226 225 74 -f 225 143 74 -f 213 210 75 -f 210 200 75 -f 208 75 200 -f 213 75 209 -f 118 117 76 -f 155 76 117 -f 155 139 76 -f 144 76 139 -f 269 77 119 -f 269 133 77 -f 208 133 78 -f 269 78 133 -f 269 202 78 -f 202 134 78 -f 248 79 135 -f 202 79 134 -f 212 79 202 -f 212 135 79 -f 251 250 80 -f 250 246 80 -f 249 80 248 -f 251 80 249 -f 229 135 81 -f 212 81 135 -f 226 81 212 -f 268 81 226 -f 268 231 81 -f 231 229 81 -f 270 82 233 -f 231 82 229 -f 232 82 231 -f 233 82 232 -f 138 137 83 -f 187 83 137 -f 213 83 187 -f 213 209 83 -f 244 138 84 -f 250 84 246 -f 250 247 84 -f 247 244 84 -f 221 85 140 -f 221 198 85 -f 198 197 85 -f 266 85 197 -f 266 196 85 -f 196 140 85 -f 207 205 86 -f 205 203 86 -f 207 86 206 -f 224 203 87 -f 205 87 203 -f 205 204 87 -f 204 199 87 -f 271 87 199 -f 271 224 87 -f 196 88 140 -f 196 195 88 -f 195 182 88 -f 144 143 89 -f 225 89 143 -f 225 119 89 -f 228 227 90 -f 227 141 90 -f 170 90 141 -f 156 128 91 -f 129 91 128 -f 171 91 129 -f 189 91 171 -f 192 91 189 -f 192 156 91 -f 132 92 131 -f 201 186 92 -f 152 93 145 -f 272 93 157 -f 272 183 93 -f 183 145 93 -f 191 190 94 -f 190 154 94 -f 188 94 154 -f 188 156 94 -f 192 94 156 -f 192 191 94 -f 184 95 183 -f 195 95 182 -f 195 145 95 -f 183 95 145 -f 201 96 186 -f 201 200 96 -f 210 96 200 -f 210 207 96 -f 207 206 96 -f 206 186 96 -f 184 147 97 -f 193 165 98 -f 185 98 165 -f 194 98 185 -f 265 98 194 -f 265 211 98 -f 211 193 98 -f 193 99 169 -f 211 99 193 -f 218 99 211 -f 253 169 99 -f 222 198 100 -f 221 100 198 -f 224 100 221 -f 271 100 224 -f 271 219 100 -f 222 100 219 -f 222 101 218 -f 222 219 101 -f 223 101 219 -f 223 220 101 -f 244 102 178 -f 247 102 244 -f 247 243 102 -f 243 176 102 -f 215 102 176 -f 215 178 102 -f 262 103 256 -f 262 237 103 -f 261 103 237 -f 261 181 103 -f 254 103 181 -f 256 103 254 -f 236 233 104 -f 233 232 104 -f 232 230 104 -f 234 104 230 -f 235 104 234 -f 236 104 235 -f 217 214 105 -f 214 136 105 -f 178 105 136 -f 215 105 178 -f 216 105 215 -f 217 105 216 -f 252 251 106 -f 251 249 106 -f 262 107 237 -f 262 260 107 -f 260 160 107 -f 169 107 160 -f 253 107 169 -f 253 237 107 -f 240 236 108 -f 236 235 108 -f 267 239 108 -f 240 108 239 -f 252 109 242 -f 245 241 109 -f 175 173 110 -f 173 172 110 -f 172 159 110 -f 175 110 174 -f 175 174 111 -f 174 142 111 -f 180 111 142 -f 255 111 180 -f 259 111 255 -f 259 175 111 -f 241 112 177 -f 245 112 241 -f 245 240 112 -f 240 239 112 -f 239 238 112 -f 238 177 112 -f 238 113 177 -f 259 113 238 -f 259 255 113 -f 258 113 255 -f 258 257 113 -f 257 177 113 -f 261 114 181 -f 261 220 114 -f 223 114 220 -f 223 217 114 -f 217 216 114 -f 216 181 114 -f 256 254 115 -f 254 179 115 -f 179 150 115 -f 257 115 150 -f 258 115 257 -f 258 256 115 -f 168 167 116 -f 167 166 116 -f 166 149 116 -f 161 116 149 -# 540 faces - diff --git a/topmodx/objs/icosahedron.obj b/topmodx/objs/icosahedron.obj deleted file mode 100644 index f0bc383..0000000 --- a/topmodx/objs/icosahedron.obj +++ /dev/null @@ -1,36 +0,0 @@ -v 0.723606 0 1.17082 -v 0 1.17082 0.723606 -v -0.723606 0 1.17082 -v 0 -1.17082 0.723606 -v 0.723606 0 -1.17082 -v 0 -1.17082 -0.723606 -v -0.723606 0 -1.17082 -v 0 1.17082 -0.723606 -v 1.17082 -0.723606 0 -v 1.17082 0.723606 0 -v -1.17082 0.723606 0 -v -1.17082 -0.723606 0 -# 12 vertices - -f 6 12 7 -f 2 3 1 -f 1 3 4 -f 6 7 5 -f 5 7 8 -f 10 2 1 -f 11 3 2 -f 3 11 12 -f 12 4 3 -f 9 10 1 -f 1 4 9 -f 12 11 7 -f 5 8 10 -f 10 9 5 -f 8 7 11 -f 2 10 8 -f 11 2 8 -f 6 5 9 -f 4 12 6 -f 9 4 6 -# 20 faces - diff --git a/topmodx/objs/octahedron.obj b/topmodx/objs/octahedron.obj deleted file mode 100644 index be2a6ee..0000000 --- a/topmodx/objs/octahedron.obj +++ /dev/null @@ -1,18 +0,0 @@ -v 0 1 0 -v 1 0 0 -v 0 0 -1 -v -1 0 0 -v 0 0 1 -v 0 -1 0 -# 6 vertices - -f 6 5 4 -f 5 2 1 -f 1 2 3 -f 1 3 4 -f 5 1 4 -f 2 5 6 -f 3 2 6 -f 4 3 6 -# 8 faces - diff --git a/topmodx/objs/soccerball.obj b/topmodx/objs/soccerball.obj deleted file mode 100644 index 0d3133a..0000000 --- a/topmodx/objs/soccerball.obj +++ /dev/null @@ -1,92 +0,0 @@ -v 0.333333 1.078690 1.206010 -v 0.666667 0.539343 1.412020 -v 1.206010 0.333333 1.078690 -v 1.412020 0.666667 0.539343 -v 1.078690 1.206010 0.333333 -v 0.539343 1.412020 0.666667 -v -0.333333 1.078690 1.206010 -v -0.666667 0.539343 1.412020 -v -0.333333 0.000000 1.618030 -v 0.333333 0.000000 1.618030 -v -0.539343 1.412020 0.666667 -v -1.078690 1.206010 0.333333 -v -1.412020 0.666667 0.539343 -v -1.206010 0.333333 1.078690 -v 0.000000 1.618030 0.333333 -v 0.000000 1.618030 -0.333333 -v -0.539343 1.412020 -0.666667 -v -1.078690 1.206010 -0.333333 -v 1.078690 1.206010 -0.333333 -v 0.539343 1.412020 -0.666667 -v 0.539343 -1.412020 0.666667 -v 1.078690 -1.206010 0.333333 -v 1.412020 -0.666667 0.539343 -v 1.206010 -0.333333 1.078690 -v 0.666667 -0.539343 1.412020 -v 0.333333 -1.078690 1.206010 -v -0.666667 -0.539343 1.412020 -v -0.333333 -1.078690 1.206010 -v -1.206010 -0.333333 1.078690 -v -1.412020 -0.666667 0.539343 -v -1.078690 -1.206010 0.333333 -v -0.539343 -1.412020 0.666667 -v -1.078690 -1.206010 -0.333333 -v -0.539343 -1.412020 -0.666667 -v 0.000000 -1.618030 -0.333333 -v 0.000000 -1.618030 0.333333 -v 0.539343 -1.412020 -0.666667 -v 1.078690 -1.206010 -0.333333 -v 1.412020 0.666667 -0.539343 -v 1.206010 0.333333 -1.078690 -v 0.666667 0.539343 -1.412020 -v 0.333333 1.078690 -1.206010 -v 0.333333 0.000000 -1.618030 -v -0.333333 0.000000 -1.618030 -v -0.666667 0.539343 -1.412020 -v -0.333333 1.078690 -1.206010 -v -1.206010 0.333333 -1.078690 -v -1.412020 0.666667 -0.539343 -v 1.618030 -0.333333 0.000000 -v 1.618030 0.333333 0.000000 -v -1.618030 0.333333 0.000000 -v -1.618030 -0.333333 0.000000 -v 1.412020 -0.666667 -0.539343 -v 1.206010 -0.333333 -1.078690 -v 0.333333 -1.078690 -1.206010 -v 0.666667 -0.539343 -1.412020 -v -0.333333 -1.078690 -1.206010 -v -0.666667 -0.539343 -1.412020 -v -1.412020 -0.666667 -0.539343 -v -1.206010 -0.333333 -1.078690 -f 1 2 3 4 5 6 -f 11 12 13 14 8 7 -f 15 16 17 18 12 11 -f 6 5 19 20 16 15 -f 21 22 23 24 25 26 -f 26 25 10 9 27 28 -f 28 27 29 30 31 32 -f 32 31 33 34 35 36 -f 36 35 37 38 22 21 -f 20 19 39 40 41 42 -f 42 41 43 44 45 46 -f 46 45 47 48 18 17 -f 24 23 49 50 4 3 -f 14 13 51 52 30 29 -f 40 39 50 49 53 54 -f 55 56 54 53 38 37 -f 34 33 59 60 58 57 -f 60 59 52 51 48 47 -f 7 8 9 10 2 1 -f 44 43 56 55 57 58 -f 50 39 19 5 4 -f 58 60 47 45 44 -f 57 55 37 35 34 -f 12 18 48 51 13 -f 22 38 53 49 23 -f 52 59 33 31 30 -f 8 14 29 27 9 -f 15 11 7 1 6 -f 2 10 25 24 3 -f 54 56 43 41 40 -f 26 28 32 36 21 -f 16 20 42 46 17 diff --git a/topmodx/objs/soccerballdual.obj b/topmodx/objs/soccerballdual.obj deleted file mode 100644 index d8e8872..0000000 --- a/topmodx/objs/soccerballdual.obj +++ /dev/null @@ -1,1506 +0,0 @@ -v 0.706492 0.614904 1.29663 -v 1.13813 0.450032 1.02987 -v 1.29663 0.706492 0.614904 -v 1.02987 1.13813 0.450032 -v 0.450032 1.02987 1.13813 -v 0.614904 1.29663 0.706492 -v -1.02987 1.13813 0.450032 -v -1.29663 0.706492 0.614904 -v -1.13813 0.450032 1.02987 -v -0.706492 0.614904 1.29663 -v -0.614904 1.29663 0.706492 -v -0.450032 1.02987 1.13813 -v -0.113262 1.57477 -0.25646 -v -0.544905 1.4099 -0.523231 -v -0.959867 1.2514 0.266768 -v -1.05706 1.17101 0.319963 -v -1.14556 1.09781 0.240919 -v -0.959867 1.2514 -0.266768 -v -0.517713 1.37702 0.653298 -v -0.389817 1.38648 0.707995 -v -0.113262 1.57477 0.25646 -v -0.544905 1.4099 0.523231 -v 1.14556 1.09781 0.240919 -v 0.959867 1.2514 0.266768 -v 1.05706 1.17101 0.319963 -v 0.959867 1.2514 -0.266768 -v 0.113262 1.57477 -0.25646 -v -3.20173e-010 1.57477 -0.333333 -v 3.21827e-009 1.53537 -0.467075 -v 0.544905 1.4099 -0.523231 -v 0.389817 1.38648 0.707995 -v 0.517713 1.37702 0.653298 -v 6.6686e-009 1.53537 0.467075 -v -1.80525e-009 1.57477 0.333333 -v 0.544905 1.4099 0.523231 -v 0.113262 1.57477 0.25646 -v 1.02987 -1.13813 0.450032 -v 1.29663 -0.706492 0.614904 -v 1.13813 -0.450032 1.02987 -v 0.706492 -0.614904 1.29663 -v 0.614904 -1.29663 0.706492 -v 0.450032 -1.02987 1.13813 -v 0.707995 -0.389817 1.38648 -v 0.523231 -0.544905 1.4099 -v 0.653298 -0.517713 1.37702 -v 0.25646 -0.113262 1.57477 -v -0.25646 -0.113262 1.57477 -v -0.523231 -0.544905 1.4099 -v 0.240919 -1.14556 1.09781 -v 0.319963 -1.05706 1.17101 -v 0.266768 -0.959867 1.2514 -v -0.266768 -0.959867 1.2514 -v -0.707995 -0.389817 1.38648 -v -0.706492 -0.614904 1.29663 -v -0.653298 -0.517713 1.37702 -v -1.13813 -0.450032 1.02987 -v -1.29663 -0.706492 0.614904 -v -1.02987 -1.13813 0.450032 -v -0.240919 -1.14556 1.09781 -v -0.319963 -1.05706 1.17101 -v -0.450032 -1.02987 1.13813 -v -0.614904 -1.29663 0.706492 -v -1.14556 -1.09781 0.240919 -v -0.959867 -1.2514 0.266768 -v -1.05706 -1.17101 0.319963 -v -0.959867 -1.2514 -0.266768 -v -0.544905 -1.4099 -0.523231 -v -0.113262 -1.57477 -0.25646 -v -0.389817 -1.38648 0.707995 -v -0.517713 -1.37702 0.653298 -v -0.544905 -1.4099 0.523231 -v -0.113262 -1.57477 0.25646 -v 5.2756e-009 -1.53537 -0.467075 -v 0.113262 -1.57477 -0.25646 -v 8.47133e-010 -1.57477 -0.333333 -v 0.544905 -1.4099 -0.523231 -v 0.959867 -1.2514 0.266768 -v 1.05706 -1.17101 0.319963 -v 1.14556 -1.09781 0.240919 -v 0.959867 -1.2514 -0.266768 -v 0.517713 -1.37702 0.653298 -v 0.389817 -1.38648 0.707995 -v -2.80531e-009 -1.53537 0.467075 -v -3.1756e-010 -1.57477 0.333333 -v 0.113262 -1.57477 0.25646 -v 0.544905 -1.4099 0.523231 -v 1.14556 1.09781 -0.240919 -v 1.02987 1.13813 -0.450032 -v 1.05706 1.17101 -0.319963 -v 1.29663 0.706492 -0.614904 -v 1.13813 0.450032 -1.02987 -v 0.706492 0.614904 -1.29663 -v 0.389817 1.38648 -0.707995 -v 0.517713 1.37702 -0.653298 -v 0.614904 1.29663 -0.706492 -v 0.450032 1.02987 -1.13813 -v 0.707995 0.389817 -1.38648 -v 0.523231 0.544905 -1.4099 -v 0.653298 0.517713 -1.37702 -v 0.25646 0.113262 -1.57477 -v -0.25646 0.113262 -1.57477 -v -0.523231 0.544905 -1.4099 -v 0.240919 1.14556 -1.09781 -v 0.319963 1.05706 -1.17101 -v 0.266768 0.959867 -1.2514 -v -0.266768 0.959867 -1.2514 -v -0.707995 0.389817 -1.38648 -v -0.706492 0.614904 -1.29663 -v -0.653298 0.517713 -1.37702 -v -1.13813 0.450032 -1.02987 -v -1.02987 1.13813 -0.450032 -v -1.14556 1.09781 -0.240919 -v -1.05706 1.17101 -0.319963 -v -1.29663 0.706492 -0.614904 -v -0.517713 1.37702 -0.653298 -v -0.389817 1.38648 -0.707995 -v -0.240919 1.14556 -1.09781 -v -0.319963 1.05706 -1.17101 -v -0.450032 1.02987 -1.13813 -v -0.614904 1.29663 -0.706492 -v 1.4099 -0.523231 0.544905 -v 1.37702 -0.653298 0.517713 -v 1.38648 -0.707995 0.389817 -v 1.57477 -0.25646 0.113262 -v 1.4099 0.523231 0.544905 -v 1.37702 0.653298 0.517713 -v 1.38648 0.707995 0.389817 -v 1.57477 0.25646 0.113262 -v 1.09781 0.240919 1.14556 -v 1.17101 0.319963 1.05706 -v 1.17101 -0.319963 1.05706 -v 1.09781 -0.240919 1.14556 -v 1.2514 -0.266768 0.959867 -v 1.2514 0.266768 0.959867 -v -1.4099 0.523231 0.544905 -v -1.37702 0.653298 0.517713 -v -1.38648 0.707995 0.389817 -v -1.57477 0.25646 0.113262 -v -1.4099 -0.523231 0.544905 -v -1.37702 -0.653298 0.517713 -v -1.38648 -0.707995 0.389817 -v -1.57477 -0.25646 0.113262 -v -1.17101 0.319963 1.05706 -v -1.09781 0.240919 1.14556 -v -1.09781 -0.240919 1.14556 -v -1.17101 -0.319963 1.05706 -v -1.2514 0.266768 0.959867 -v -1.2514 -0.266768 0.959867 -v 1.38648 0.707995 -0.389817 -v 1.4099 0.523231 -0.544905 -v 1.37702 0.653298 -0.517713 -v 1.57477 0.25646 -0.113262 -v 1.53537 0.467075 2.3366e-009 -v 1.57477 0.333333 -3.05521e-009 -v 1.53537 -0.467075 -4.91456e-009 -v 1.57477 -0.333333 -1.69619e-009 -v 1.57477 -0.25646 -0.113262 -v 1.4099 -0.523231 -0.544905 -v 1.17101 0.319963 -1.05706 -v 1.09781 0.240919 -1.14556 -v 1.2514 0.266768 -0.959867 -v 1.2514 -0.266768 -0.959867 -v 1.13813 -0.450032 -1.02987 -v 1.09781 -0.240919 -1.14556 -v 1.17101 -0.319963 -1.05706 -v 0.706492 -0.614904 -1.29663 -v 1.02987 -1.13813 -0.450032 -v 1.14556 -1.09781 -0.240919 -v 1.05706 -1.17101 -0.319963 -v 1.38648 -0.707995 -0.389817 -v 1.37702 -0.653298 -0.517713 -v 1.29663 -0.706492 -0.614904 -v 0.389817 -1.38648 -0.707995 -v 0.517713 -1.37702 -0.653298 -v 0.450032 -1.02987 -1.13813 -v 0.614904 -1.29663 -0.706492 -v -1.14556 -1.09781 -0.240919 -v -1.02987 -1.13813 -0.450032 -v -1.05706 -1.17101 -0.319963 -v -1.29663 -0.706492 -0.614904 -v -1.13813 -0.450032 -1.02987 -v -0.706492 -0.614904 -1.29663 -v -0.517713 -1.37702 -0.653298 -v -0.389817 -1.38648 -0.707995 -v -0.614904 -1.29663 -0.706492 -v -0.450032 -1.02987 -1.13813 -v -1.57477 -0.25646 -0.113262 -v -1.53537 -0.467075 5.8902e-009 -v -1.57477 -0.333333 -1.794e-009 -v -1.38648 -0.707995 -0.389817 -v -1.4099 -0.523231 -0.544905 -v -1.37702 -0.653298 -0.517713 -v -1.4099 0.523231 -0.544905 -v -1.38648 0.707995 -0.389817 -v -1.37702 0.653298 -0.517713 -v -1.53537 0.467075 -6.44136e-009 -v -1.57477 0.333333 -2.82575e-009 -v -1.57477 0.25646 -0.113262 -v -1.09781 0.240919 -1.14556 -v -1.17101 0.319963 -1.05706 -v -1.17101 -0.319963 -1.05706 -v -1.09781 -0.240919 -1.14556 -v -1.2514 -0.266768 -0.959867 -v -1.2514 0.266768 -0.959867 -v -0.523231 0.544905 1.4099 -v -0.653298 0.517713 1.37702 -v -0.25646 0.113262 1.57477 -v -0.333333 1.24356e-009 1.57477 -v -0.467075 2.8215e-009 1.53537 -v -0.707995 0.389817 1.38648 -v 0.523231 0.544905 1.4099 -v 0.653298 0.517713 1.37702 -v 0.467075 6.76327e-009 1.53537 -v 0.333333 2.66861e-009 1.57477 -v 0.707995 0.389817 1.38648 -v 0.25646 0.113262 1.57477 -v 0.319963 1.05706 1.17101 -v -0.319963 1.05706 1.17101 -v -0.240919 1.14556 1.09781 -v 0.240919 1.14556 1.09781 -v -0.266768 0.959867 1.2514 -v 0.266768 0.959867 1.2514 -v 0.467075 -4.81948e-009 -1.53537 -v 0.25646 -0.113262 -1.57477 -v 0.333333 -1.3201e-009 -1.57477 -v 0.523231 -0.544905 -1.4099 -v 0.707995 -0.389817 -1.38648 -v 0.653298 -0.517713 -1.37702 -v 0.240919 -1.14556 -1.09781 -v 0.319963 -1.05706 -1.17101 -v -0.266768 -0.959867 -1.2514 -v -0.240919 -1.14556 -1.09781 -v -0.319963 -1.05706 -1.17101 -v 0.266768 -0.959867 -1.2514 -v -0.333333 -2.20314e-009 -1.57477 -v -0.467075 -3.78322e-009 -1.53537 -v -0.653298 -0.517713 -1.37702 -v -0.707995 -0.389817 -1.38648 -v -0.25646 -0.113262 -1.57477 -v -0.523231 -0.544905 -1.4099 -v 1.68273 1.32684 0.337689 -v 1.44181 1.71666 0.486587 -v 1.44181 1.71666 0.968425 -v 1.68273 1.32684 1.11732 -v 1.83162 1.08592 0.727506 -v 0.948325 1.87384 -0.265445 -v 1.36329 1.71534 -0.521908 -v 1.36329 1.71534 -1.05544 -v 0.948325 1.87384 -1.31191 -v 0.516682 2.03871 -1.04514 -v 0.516682 2.03871 -0.532216 -v 1.44472 0.959776 1.21353 -v 1.70118 0.54481 1.37203 -v 2.13282 0.379938 1.10527 -v 2.29132 0.636398 0.690307 -v 2.02456 1.06804 0.525435 -v 1.60959 1.22654 0.781895 -v 1.47898 1.01522 -1.12383 -v 1.89395 0.856716 -0.867369 -v 2.16071 0.425078 -1.03224 -v 2.00221 0.168618 -1.44721 -v 1.57057 0.33349 -1.71397 -v 1.31411 0.748456 -1.55547 -v 0.416629 1.81045 -1.12018 -v 0.806446 1.95934 -0.879259 -v 1.19626 1.81045 -1.12018 -v 1.04736 1.56953 -1.50999 -v 0.565527 1.56953 -1.50999 -v 0.0554468 0.429116 -2.07216 -v 0.31191 0.0141538 -2.23066 -v 0.0451388 -0.417489 -2.39553 -v -0.467781 -0.417489 -2.39553 -v -0.734552 0.0141538 -2.23066 -v -0.478089 0.429116 -2.07216 -v -1.44472 0.959776 -1.21353 -v -1.70118 0.54481 -1.37203 -v -2.13282 0.379938 -1.10527 -v -2.29132 0.636398 -0.690307 -v -2.02456 1.06804 -0.525435 -v -1.60959 1.22654 -0.781895 -v -0.858617 1.90811 -0.32089 -v -0.858617 1.90811 -0.83381 -v -1.29026 1.74324 -1.10058 -v -1.70522 1.58474 -0.844118 -v -1.70522 1.58474 -0.310582 -v -1.29026 1.74324 -0.0541193 -v -0.0554468 0.429116 2.07216 -v -0.31191 0.0141538 2.23066 -v -0.0451388 -0.417489 2.39553 -v 0.467781 -0.417489 2.39553 -v 0.734552 0.0141538 2.23066 -v 0.478089 0.429116 2.07216 -v 0.337689 1.68273 1.32684 -v 0.486587 1.44181 1.71666 -v 0.968425 1.44181 1.71666 -v 1.11732 1.68273 1.32684 -v 0.727506 1.83162 1.08592 -v -1.47898 1.01522 1.12383 -v -1.89395 0.856716 0.867369 -v -2.16071 0.425078 1.03224 -v -2.00221 0.168618 1.44721 -v -1.57057 0.33349 1.71397 -v -1.31411 0.748456 1.55547 -v -2.07216 0.0554468 0.429116 -v -2.23066 0.31191 0.0141538 -v -2.39553 0.0451388 -0.417489 -v -2.39553 -0.467781 -0.417489 -v -2.23066 -0.734552 0.0141538 -v -2.07216 -0.478089 0.429116 -# 309 vertices - -vn -0.525729 1.30932e-005 0.850652 -vn -0.525714 0 0.850661 -vn -0.525729 -1.30932e-005 0.850652 -vn -0.525733 0 0.85065 -vn -0.525733 0 0.85065 -vn 0.582233 0.304747 0.753747 -vn 0.582235 0.304774 0.753734 -vn 0.58225 0.30476 0.753728 -vn 0.582244 0.304758 0.753734 -vn 0.582241 0.304726 0.753749 -vn 0.582224 0.304747 0.753754 -vn 0.809001 0.309049 0.500006 -vn 0.809013 0.309031 0.499999 -vn 0.809007 0.309031 0.500007 -vn 0.809007 0.309034 0.500006 -vn 0.809002 0.309042 0.500009 -vn 0.809001 0.309042 0.500009 -vn 0.753747 0.582233 0.304747 -vn 0.753734 0.582235 0.304774 -vn 0.753728 0.58225 0.30476 -vn 0.753734 0.582244 0.304758 -vn 0.753749 0.582241 0.304726 -vn 0.753754 0.582224 0.304747 -vn 0.309042 0.500009 0.809002 -vn 0.309042 0.500009 0.809001 -vn 0.309049 0.500006 0.809001 -vn 0.309031 0.499999 0.809013 -vn 0.309031 0.500007 0.809007 -vn 0.309034 0.500006 0.809007 -vn -0.0481815 0.330277 0.942653 -vn -0.0481815 0.330277 0.942653 -vn -0.0481815 0.330277 0.942653 -vn -0.0481815 0.330277 0.942653 -vn -0.500006 0.809007 0.309034 -vn -0.500007 0.809007 0.309031 -vn -0.499999 0.809013 0.309031 -vn -0.500006 0.809001 0.309049 -vn -0.500009 0.809001 0.309042 -vn -0.500009 0.809002 0.309042 -vn -0.330276 0.942654 -0.048184 -vn -0.330278 0.942653 -0.0481892 -vn -0.330277 0.942653 -0.0481918 -vn -0.330275 0.942654 -0.0481866 -vn -0.499999 0.809013 -0.309031 -vn -0.500007 0.809007 -0.309031 -vn -0.500006 0.809007 -0.309034 -vn -0.500009 0.809002 -0.309042 -vn -0.500009 0.809001 -0.309042 -vn -0.500006 0.809001 -0.309049 -vn -0.188318 0.942082 0.277522 -vn -0.188372 0.942069 0.277529 -vn -0.188347 0.942092 0.277467 -vn -0.188301 0.942081 0.277534 -vn -0.188365 0.94207 0.277531 -vn -0.188339 0.942086 0.277492 -vn -0.30476 0.753728 0.58225 -vn -0.304774 0.753734 0.582235 -vn -0.304747 0.753747 0.582233 -vn -0.304747 0.753754 0.582224 -vn -0.304726 0.753749 0.582241 -vn -0.304758 0.753734 0.582244 -vn -0.672499 0.486621 0.557625 -vn -0.672498 0.486626 0.557621 -vn -0.672496 0.486629 0.557621 -vn -0.672497 0.486623 0.557625 -vn 0 1 0 -vn 0 1 0 -vn 0 1 0 -vn 0 1 0 -vn 0 1 0 -vn 0 1 0 -vn 0.408256 0.912868 0 -vn 0.408256 0.912868 0 -vn 0.408256 0.912868 0 -vn 0.408256 0.912868 0 -vn 0.637353 0.770572 0 -vn 0.637353 0.770572 0 -vn 0.637353 0.770572 -7.83614e-007 -vn 0.637354 0.770571 0 -vn 0.637354 0.770571 0 -vn 0.637353 0.770572 7.83614e-007 -vn 0.500009 0.809001 0.309042 -vn 0.500006 0.809001 0.309049 -vn 0.499999 0.809013 0.309031 -vn 0.500007 0.809007 0.309031 -vn 0.500006 0.809007 0.309034 -vn 0.500009 0.809002 0.309042 -vn 0.582592 0.534404 0.612371 -vn 0.582589 0.534407 0.612372 -vn 0.582589 0.534409 0.61237 -vn 0.582592 0.534406 0.61237 -vn 0.188339 0.942086 0.277492 -vn 0.188365 0.94207 0.277531 -vn 0.188301 0.942081 0.277534 -vn 0.188347 0.942092 0.277467 -vn 0.188372 0.942069 0.277529 -vn 0.188318 0.942082 0.277522 -vn 0.582235 -0.304774 0.753734 -vn 0.582233 -0.304747 0.753747 -vn 0.582224 -0.304747 0.753754 -vn 0.582241 -0.304726 0.753749 -vn 0.582244 -0.304758 0.753734 -vn 0.58225 -0.30476 0.753728 -vn 0.500006 -0.809007 0.309034 -vn 0.500007 -0.809007 0.309031 -vn 0.499999 -0.809013 0.309031 -vn 0.500006 -0.809001 0.309049 -vn 0.500009 -0.809001 0.309042 -vn 0.500009 -0.809002 0.309042 -vn 0.577344 -0.577361 0.577346 -vn 0.577346 -0.577344 0.577361 -vn 0.577361 -0.577346 0.577344 -vn 0.577344 -0.577361 0.577346 -vn 0.577346 -0.577344 0.577361 -vn 0.577361 -0.577346 0.577344 -vn 0.277492 -0.188339 0.942086 -vn 0.277522 -0.188318 0.942082 -vn 0.277529 -0.188372 0.942069 -vn 0.277467 -0.188347 0.942092 -vn 0.277534 -0.188301 0.942081 -vn 0.277531 -0.188365 0.94207 -vn 0 0 1 -vn 0 0 1 -vn 0 0 1 -vn 0 0 1 -vn 0 0 1 -vn 0 0 1 -vn -0.277522 -0.188318 0.942082 -vn -0.277492 -0.188339 0.942086 -vn -0.277531 -0.188365 0.94207 -vn -0.277534 -0.188301 0.942081 -vn -0.277467 -0.188347 0.942092 -vn -0.277529 -0.188372 0.942069 -vn 0.309031 -0.500007 0.809007 -vn 0.309031 -0.499999 0.809013 -vn 0.309049 -0.500006 0.809001 -vn 0.309042 -0.500009 0.809001 -vn 0.309042 -0.500009 0.809002 -vn 0.309034 -0.500006 0.809007 -vn 0 -0.356819 0.934173 -vn -2.66058e-006 -0.356818 0.934174 -vn 0 -0.356817 0.934174 -vn 0 -0.356817 0.934174 -vn 2.66058e-006 -0.356818 0.934174 -vn 0 -0.356819 0.934173 -vn -0.582233 -0.304747 0.753747 -vn -0.582235 -0.304774 0.753734 -vn -0.58225 -0.30476 0.753728 -vn -0.582244 -0.304758 0.753734 -vn -0.582241 -0.304726 0.753749 -vn -0.582224 -0.304747 0.753754 -vn -0.809001 -0.309049 0.500006 -vn -0.809013 -0.309031 0.499999 -vn -0.809007 -0.309031 0.500007 -vn -0.809007 -0.309034 0.500006 -vn -0.809002 -0.309042 0.500009 -vn -0.809001 -0.309042 0.500009 -vn -0.753747 -0.582233 0.304747 -vn -0.753734 -0.582235 0.304774 -vn -0.753728 -0.58225 0.30476 -vn -0.753734 -0.582244 0.304758 -vn -0.753749 -0.582241 0.304726 -vn -0.753754 -0.582224 0.304747 -vn 0 -0.637354 0.770571 -vn 0 -0.637354 0.770571 -vn -7.83614e-007 -0.637353 0.770572 -vn 0 -0.637353 0.770572 -vn 0 -0.637353 0.770572 -vn 7.83614e-007 -0.637353 0.770572 -vn -0.309031 -0.500007 0.809007 -vn -0.309034 -0.500006 0.809007 -vn -0.309042 -0.500009 0.809002 -vn -0.309042 -0.500009 0.809001 -vn -0.309049 -0.500006 0.809001 -vn -0.309031 -0.499999 0.809013 -vn -0.577361 -0.577346 0.577344 -vn -0.577346 -0.577344 0.577361 -vn -0.577344 -0.577361 0.577346 -vn -0.577361 -0.577346 0.577344 -vn -0.577346 -0.577344 0.577361 -vn -0.577344 -0.577361 0.577346 -vn -0.637353 -0.770572 0 -vn -0.637353 -0.770572 0 -vn -0.637353 -0.770572 -7.83614e-007 -vn -0.637354 -0.770571 0 -vn -0.637354 -0.770571 0 -vn -0.637353 -0.770572 7.83614e-007 -vn -0.188339 -0.942086 -0.277492 -vn -0.188318 -0.942082 -0.277522 -vn -0.188372 -0.942069 -0.277529 -vn -0.188347 -0.942092 -0.277467 -vn -0.188301 -0.942081 -0.277534 -vn -0.188365 -0.94207 -0.277531 -vn -0.304758 -0.753734 0.582244 -vn -0.304726 -0.753749 0.582241 -vn -0.304747 -0.753754 0.582224 -vn -0.304747 -0.753747 0.582233 -vn -0.304774 -0.753734 0.582235 -vn -0.30476 -0.753728 0.58225 -vn -0.500009 -0.809001 0.309042 -vn -0.500006 -0.809001 0.309049 -vn -0.499999 -0.809013 0.309031 -vn -0.500007 -0.809007 0.309031 -vn -0.500006 -0.809007 0.309034 -vn -0.500009 -0.809002 0.309042 -vn -0.356818 -0.934174 -2.66058e-006 -vn -0.356819 -0.934173 0 -vn -0.356819 -0.934173 0 -vn -0.356818 -0.934174 2.66058e-006 -vn -0.356817 -0.934174 0 -vn -0.356817 -0.934174 0 -vn 0.850661 -0.525714 0 -vn 0.850652 -0.525729 -1.30932e-005 -vn 0.85065 -0.525733 0 -vn 0.85065 -0.525733 0 -vn 0.850652 -0.525729 1.30932e-005 -vn 0.188318 -0.942082 -0.277522 -vn 0.188339 -0.942086 -0.277492 -vn 0.188365 -0.94207 -0.277531 -vn 0.188301 -0.942081 -0.277534 -vn 0.188347 -0.942092 -0.277467 -vn 0.188372 -0.942069 -0.277529 -vn 0.499999 -0.809013 -0.309031 -vn 0.500007 -0.809007 -0.309031 -vn 0.500006 -0.809007 -0.309034 -vn 0.500009 -0.809002 -0.309042 -vn 0.500009 -0.809001 -0.309042 -vn 0.500006 -0.809001 -0.309049 -vn 0.30476 -0.753728 0.58225 -vn 0.304774 -0.753734 0.582235 -vn 0.304747 -0.753747 0.582233 -vn 0.304747 -0.753754 0.582224 -vn 0.304726 -0.753749 0.582241 -vn 0.304758 -0.753734 0.582244 -vn -1.30932e-005 -0.850652 0.525729 -vn 0 -0.85065 0.525733 -vn 0 -0.85065 0.525733 -vn 1.30932e-005 -0.850652 0.525729 -vn -2.91841e-017 -0.850661 0.525714 -vn -0.188301 -0.942081 0.277534 -vn -0.188347 -0.942092 0.277467 -vn -0.188372 -0.942069 0.277529 -vn -0.188318 -0.942082 0.277522 -vn -0.188339 -0.942086 0.277492 -vn -0.188365 -0.94207 0.277531 -vn 0 -1 0 -vn 0 -1 0 -vn 0 -1 0 -vn 0 -1 0 -vn 0 -1 0 -vn 0 -1 0 -vn 0.356817 -0.934174 0 -vn 0.356817 -0.934174 0 -vn 0.356818 -0.934174 2.66058e-006 -vn 0.356819 -0.934173 0 -vn 0.356819 -0.934173 0 -vn 0.356818 -0.934174 -2.66058e-006 -vn 0.188318 -0.942082 0.277522 -vn 0.188372 -0.942069 0.277529 -vn 0.188347 -0.942092 0.277467 -vn 0.188301 -0.942081 0.277534 -vn 0.188365 -0.94207 0.277531 -vn 0.188339 -0.942086 0.277492 -vn 0.753734 0.582235 -0.304774 -vn 0.753747 0.582233 -0.304747 -vn 0.753754 0.582224 -0.304747 -vn 0.753749 0.582241 -0.304726 -vn 0.753734 0.582244 -0.304758 -vn 0.753728 0.58225 -0.30476 -vn 0.582235 0.304774 -0.753734 -vn 0.582233 0.304747 -0.753747 -vn 0.582224 0.304747 -0.753754 -vn 0.582241 0.304726 -0.753749 -vn 0.582244 0.304758 -0.753734 -vn 0.58225 0.30476 -0.753728 -vn 0.188347 0.942092 -0.277467 -vn 0.188301 0.942081 -0.277534 -vn 0.188365 0.94207 -0.277531 -vn 0.188339 0.942086 -0.277492 -vn 0.188318 0.942082 -0.277522 -vn 0.188372 0.942069 -0.277529 -vn 0.500009 0.809001 -0.309042 -vn 0.500009 0.809002 -0.309042 -vn 0.500006 0.809007 -0.309034 -vn 0.500007 0.809007 -0.309031 -vn 0.499999 0.809013 -0.309031 -vn 0.500006 0.809001 -0.309049 -vn 0.330276 0.942654 0.048184 -vn 0.330278 0.942653 0.0481892 -vn 0.330277 0.942653 0.0481918 -vn 0.330275 0.942654 0.0481866 -vn 0.277492 0.188339 -0.942086 -vn 0.277522 0.188318 -0.942082 -vn 0.277529 0.188372 -0.942069 -vn 0.277467 0.188347 -0.942092 -vn 0.277534 0.188301 -0.942081 -vn 0.277531 0.188365 -0.94207 -vn -0.277522 0.188318 -0.942082 -vn -0.277492 0.188339 -0.942086 -vn -0.277531 0.188365 -0.94207 -vn -0.277534 0.188301 -0.942081 -vn -0.277467 0.188347 -0.942092 -vn -0.277529 0.188372 -0.942069 -vn 0.304726 0.753749 -0.582241 -vn 0.304758 0.753734 -0.582244 -vn 0.30476 0.753728 -0.58225 -vn 0.304774 0.753734 -0.582235 -vn 0.304747 0.753747 -0.582233 -vn 0.304747 0.753754 -0.582224 -vn 0 0 0 -vn 0 0 0 -vn 0.612371 0.582592 -0.534405 -vn 0.612371 0.582592 -0.534405 -vn 0.612371 0.582592 -0.534405 -vn 0.612371 0.582592 -0.534405 -vn -0.582233 0.304747 -0.753747 -vn -0.582235 0.304774 -0.753734 -vn -0.58225 0.30476 -0.753728 -vn -0.582244 0.304758 -0.753734 -vn -0.582241 0.304726 -0.753749 -vn -0.582224 0.304747 -0.753754 -vn -0.809002 0.309042 -0.500009 -vn -0.809001 0.309042 -0.500009 -vn -0.809001 0.309049 -0.500006 -vn -0.809013 0.309031 -0.499999 -vn -0.809007 0.309031 -0.500007 -vn -0.809007 0.309034 -0.500006 -vn -0.637354 0.770571 0 -vn -0.637354 0.770571 0 -vn -0.637353 0.770572 -7.83614e-007 -vn -0.637353 0.770572 0 -vn -0.637353 0.770572 0 -vn -0.637353 0.770572 7.83614e-007 -vn -0.188372 0.942069 -0.277529 -vn -0.188318 0.942082 -0.277522 -vn -0.188339 0.942086 -0.277492 -vn -0.188365 0.94207 -0.277531 -vn -0.188301 0.942081 -0.277534 -vn -0.188347 0.942092 -0.277467 -vn -0.415619 0.902254 0.114887 -vn -0.415619 0.902254 0.114887 -vn -0.415619 0.902254 0.114887 -vn -0.415619 0.902254 0.114887 -vn 0 0 0 -vn 0 0 0 -vn -0.309031 0.500007 -0.809007 -vn -0.309034 0.500006 -0.809007 -vn -0.309042 0.500009 -0.809002 -vn -0.309042 0.500009 -0.809001 -vn -0.309049 0.500006 -0.809001 -vn -0.309031 0.499999 -0.809013 -vn 0.0481815 0.330277 -0.942653 -vn 0.0481815 0.330277 -0.942653 -vn 0.0481815 0.330277 -0.942653 -vn 0.0481815 0.330277 -0.942653 -vn -0.304774 0.753734 -0.582235 -vn -0.30476 0.753728 -0.58225 -vn -0.304758 0.753734 -0.582244 -vn -0.304726 0.753749 -0.582241 -vn -0.304747 0.753754 -0.582224 -vn -0.304747 0.753747 -0.582233 -vn 0.753728 -0.58225 0.30476 -vn 0.753734 -0.582235 0.304774 -vn 0.753747 -0.582233 0.304747 -vn 0.753754 -0.582224 0.304747 -vn 0.753749 -0.582241 0.304726 -vn 0.753734 -0.582244 0.304758 -vn 0.942086 -0.277492 0.188339 -vn 0.942082 -0.277522 0.188318 -vn 0.942069 -0.277529 0.188372 -vn 0.942092 -0.277467 0.188347 -vn 0.942081 -0.277534 0.188301 -vn 0.94207 -0.277531 0.188365 -vn 1 0 0 -vn 1 0 0 -vn 1 0 0 -vn 1 0 0 -vn 1 0 0 -vn 1 0 0 -vn 0.809007 -0.309031 0.500007 -vn 0.809013 -0.309031 0.499999 -vn 0.809001 -0.309049 0.500006 -vn 0.809001 -0.309042 0.500009 -vn 0.809002 -0.309042 0.500009 -vn 0.809007 -0.309034 0.500006 -vn 0.934173 0 0.356819 -vn 0.934174 2.66058e-006 0.356818 -vn 0.934174 0 0.356817 -vn 0.934174 0 0.356817 -vn 0.934174 -2.66058e-006 0.356818 -vn 0.934173 0 0.356819 -vn 0.770572 0 0.637353 -vn 0.770572 -7.83614e-007 0.637353 -vn 0.770571 0 0.637354 -vn 0.770571 0 0.637354 -vn 0.770572 7.83614e-007 0.637353 -vn 0.770572 0 0.637353 -vn -0.753728 0.58225 0.30476 -vn -0.753734 0.582235 0.304774 -vn -0.753747 0.582233 0.304747 -vn -0.753754 0.582224 0.304747 -vn -0.753749 0.582241 0.304726 -vn -0.753734 0.582244 0.304758 -vn -0.850652 0.525729 -1.30932e-005 -vn -0.85065 0.525733 0 -vn -0.85065 0.525733 0 -vn -0.850652 0.525729 1.30932e-005 -vn -0.850661 0.525714 -2.91841e-017 -vn -0.942086 0.277492 0.188339 -vn -0.942082 0.277522 0.188318 -vn -0.942069 0.277529 0.188372 -vn -0.942092 0.277467 0.188347 -vn -0.942081 0.277534 0.188301 -vn -0.94207 0.277531 0.188365 -vn -1 0 0 -vn -1 0 0 -vn -1 0 0 -vn -1 0 0 -vn -1 0 0 -vn -1 0 0 -vn -0.809007 0.309031 0.500007 -vn -0.809013 0.309031 0.499999 -vn -0.809001 0.309049 0.500006 -vn -0.809001 0.309042 0.500009 -vn -0.809002 0.309042 0.500009 -vn -0.809007 0.309034 0.500006 -vn -0.534405 0.612371 0.582592 -vn -0.534405 0.612371 0.582592 -vn -0.534405 0.612371 0.582592 -vn -0.534405 0.612371 0.582592 -vn -0.770572 0 0.637353 -vn -0.770572 7.83614e-007 0.637353 -vn -0.770571 0 0.637354 -vn -0.770571 0 0.637354 -vn -0.770572 -7.83614e-007 0.637353 -vn -0.770572 0 0.637353 -vn 0.486621 0.557625 -0.672499 -vn 0.486626 0.557621 -0.672498 -vn 0.486629 0.557621 -0.672496 -vn 0.486623 0.557625 -0.672497 -vn 0.942081 0.277534 0.188301 -vn 0.942092 0.277467 0.188347 -vn 0.942069 0.277529 0.188372 -vn 0.942082 0.277522 0.188318 -vn 0.942086 0.277492 0.188339 -vn 0.94207 0.277531 0.188365 -vn 0.94207 0.277531 -0.188365 -vn 0.942086 0.277492 -0.188339 -vn 0.942082 0.277522 -0.188318 -vn 0.942069 0.277529 -0.188372 -vn 0.942092 0.277467 -0.188347 -vn 0.942081 0.277534 -0.188301 -vn 0.942082 -0.277522 -0.188318 -vn 0.942086 -0.277492 -0.188339 -vn 0.94207 -0.277531 -0.188365 -vn 0.942081 -0.277534 -0.188301 -vn 0.942092 -0.277467 -0.188347 -vn 0.942069 -0.277529 -0.188372 -vn 0.809013 -0.309031 -0.499999 -vn 0.809007 -0.309031 -0.500007 -vn 0.809007 -0.309034 -0.500006 -vn 0.809002 -0.309042 -0.500009 -vn 0.809001 -0.309042 -0.500009 -vn 0.809001 -0.309049 -0.500006 -vn 0.809007 0.309031 -0.500007 -vn 0.809013 0.309031 -0.499999 -vn 0.809001 0.309049 -0.500006 -vn 0.809001 0.309042 -0.500009 -vn 0.809002 0.309042 -0.500009 -vn 0.809007 0.309034 -0.500006 -vn 0.934173 0 -0.356819 -vn 0.934174 -2.66058e-006 -0.356818 -vn 0.934174 0 -0.356817 -vn 0.934174 0 -0.356817 -vn 0.934174 2.66058e-006 -0.356818 -vn 0.934173 0 -0.356819 -vn 0.770571 0 -0.637354 -vn 0.770571 0 -0.637354 -vn 0.770572 -7.83614e-007 -0.637353 -vn 0.770572 0 -0.637353 -vn 0.770572 0 -0.637353 -vn 0.770572 7.83614e-007 -0.637353 -vn 0.637354 -0.770571 0 -vn 0.637354 -0.770571 0 -vn 0.637353 -0.770572 -7.83614e-007 -vn 0.637353 -0.770572 0 -vn 0.637353 -0.770572 0 -vn 0.637353 -0.770572 7.83614e-007 -vn 0.753734 -0.582235 -0.304774 -vn 0.753728 -0.58225 -0.30476 -vn 0.753734 -0.582244 -0.304758 -vn 0.753749 -0.582241 -0.304726 -vn 0.753754 -0.582224 -0.304747 -vn 0.753747 -0.582233 -0.304747 -vn 0.309042 -0.500009 -0.809002 -vn 0.309042 -0.500009 -0.809001 -vn 0.309049 -0.500006 -0.809001 -vn 0.309031 -0.499999 -0.809013 -vn 0.309031 -0.500007 -0.809007 -vn 0.309034 -0.500006 -0.809007 -vn 0.577361 -0.577346 -0.577344 -vn 0.577346 -0.577344 -0.577361 -vn 0.577344 -0.577361 -0.577346 -vn 0.577361 -0.577346 -0.577344 -vn 0.577346 -0.577344 -0.577361 -vn 0.577344 -0.577361 -0.577346 -vn 0.304774 -0.753734 -0.582235 -vn 0.30476 -0.753728 -0.58225 -vn 0.304758 -0.753734 -0.582244 -vn 0.304726 -0.753749 -0.582241 -vn 0.304747 -0.753754 -0.582224 -vn 0.304747 -0.753747 -0.582233 -vn -0.85065 -0.525733 0 -vn -0.85065 -0.525733 0 -vn -0.850652 -0.525729 -1.30932e-005 -vn -0.850661 -0.525714 0 -vn -0.850652 -0.525729 1.30932e-005 -vn -0.753734 -0.582235 -0.304774 -vn -0.753747 -0.582233 -0.304747 -vn -0.753754 -0.582224 -0.304747 -vn -0.753749 -0.582241 -0.304726 -vn -0.753734 -0.582244 -0.304758 -vn -0.753728 -0.58225 -0.30476 -vn -0.500009 -0.809001 -0.309042 -vn -0.500009 -0.809002 -0.309042 -vn -0.500006 -0.809007 -0.309034 -vn -0.500007 -0.809007 -0.309031 -vn -0.499999 -0.809013 -0.309031 -vn -0.500006 -0.809001 -0.309049 -vn -0.577344 -0.577361 -0.577346 -vn -0.577346 -0.577344 -0.577361 -vn -0.577361 -0.577346 -0.577344 -vn -0.577344 -0.577361 -0.577346 -vn -0.577346 -0.577344 -0.577361 -vn -0.577361 -0.577346 -0.577344 -vn -0.309031 -0.499999 -0.809013 -vn -0.309049 -0.500006 -0.809001 -vn -0.309042 -0.500009 -0.809001 -vn -0.309042 -0.500009 -0.809002 -vn -0.309034 -0.500006 -0.809007 -vn -0.309031 -0.500007 -0.809007 -vn -0.942081 -0.277534 0.188301 -vn -0.942092 -0.277467 0.188347 -vn -0.942069 -0.277529 0.188372 -vn -0.942082 -0.277522 0.188318 -vn -0.942086 -0.277492 0.188339 -vn -0.94207 -0.277531 0.188365 -vn -0.942069 -0.277529 -0.188372 -vn -0.942092 -0.277467 -0.188347 -vn -0.942081 -0.277534 -0.188301 -vn -0.94207 -0.277531 -0.188365 -vn -0.942086 -0.277492 -0.188339 -vn -0.942082 -0.277522 -0.188318 -vn -0.753734 0.582244 -0.304758 -vn -0.753749 0.582241 -0.304726 -vn -0.753754 0.582224 -0.304747 -vn -0.753747 0.582233 -0.304747 -vn -0.753734 0.582235 -0.304774 -vn -0.753728 0.58225 -0.30476 -vn -0.942086 0.277492 -0.188339 -vn -0.94207 0.277531 -0.188365 -vn -0.942081 0.277534 -0.188301 -vn -0.942092 0.277467 -0.188347 -vn -0.942069 0.277529 -0.188372 -vn -0.942082 0.277522 -0.188318 -vn -0.525733 0 -0.85065 -vn -0.525729 -1.30932e-005 -0.850652 -vn -0.525714 0 -0.850661 -vn -0.525729 1.30932e-005 -0.850652 -vn -0.525733 0 -0.85065 -vn -0.809007 -0.309031 -0.500007 -vn -0.809013 -0.309031 -0.499999 -vn -0.809001 -0.309049 -0.500006 -vn -0.809001 -0.309042 -0.500009 -vn -0.809002 -0.309042 -0.500009 -vn -0.809007 -0.309034 -0.500006 -vn -0.934173 0 -0.356819 -vn -0.934174 2.66058e-006 -0.356818 -vn -0.934174 0 -0.356817 -vn -0.934174 0 -0.356817 -vn -0.934174 -2.66058e-006 -0.356818 -vn -0.934173 0 -0.356819 -vn -0.770572 0 -0.637353 -vn -0.770572 -7.83614e-007 -0.637353 -vn -0.770571 0 -0.637354 -vn -0.770571 0 -0.637354 -vn -0.770572 7.83614e-007 -0.637353 -vn -0.770572 0 -0.637353 -vn -0.58225 0.30476 0.753728 -vn -0.582235 0.304774 0.753734 -vn -0.582233 0.304747 0.753747 -vn -0.582224 0.304747 0.753754 -vn -0.582241 0.304726 0.753749 -vn -0.582244 0.304758 0.753734 -vn -0.277467 0.188347 0.942092 -vn -0.277534 0.188301 0.942081 -vn -0.277531 0.188365 0.94207 -vn -0.277492 0.188339 0.942086 -vn -0.277522 0.188318 0.942082 -vn -0.277529 0.188372 0.942069 -vn 0.277492 0.188339 0.942086 -vn 0.277531 0.188365 0.94207 -vn 0.277534 0.188301 0.942081 -vn 0.277467 0.188347 0.942092 -vn 0.277529 0.188372 0.942069 -vn 0.277522 0.188318 0.942082 -vn 0.525714 -2.91841e-017 0.850661 -vn 0.525729 1.30932e-005 0.850652 -vn 0.525733 0 0.85065 -vn 0.525733 0 0.85065 -vn 0.525729 -1.30932e-005 0.850652 -vn 0.304747 0.753754 0.582224 -vn 0.304747 0.753747 0.582233 -vn 0.304774 0.753734 0.582235 -vn 0.30476 0.753728 0.58225 -vn 0.304758 0.753734 0.582244 -vn 0.304726 0.753749 0.582241 -vn -0.309031 0.500007 0.809007 -vn -0.309031 0.499999 0.809013 -vn -0.309049 0.500006 0.809001 -vn -0.309042 0.500009 0.809001 -vn -0.309042 0.500009 0.809002 -vn -0.309034 0.500006 0.809007 -vn -0.612371 0.582592 0.534405 -vn -0.612371 0.582592 0.534405 -vn -0.612371 0.582592 0.534405 -vn -0.612371 0.582592 0.534405 -vn 0 0.637353 0.770572 -vn -7.83614e-007 0.637353 0.770572 -vn 0 0.637354 0.770571 -vn 0 0.637354 0.770571 -vn 7.83614e-007 0.637353 0.770572 -vn 0 0.637353 0.770572 -vn 0.525714 0 -0.850661 -vn 0.525729 -1.30932e-005 -0.850652 -vn 0.525733 0 -0.85065 -vn 0.525733 0 -0.85065 -vn 0.525729 1.30932e-005 -0.850652 -vn 0.582244 -0.304758 -0.753734 -vn 0.582241 -0.304726 -0.753749 -vn 0.582224 -0.304747 -0.753754 -vn 0.582233 -0.304747 -0.753747 -vn 0.582235 -0.304774 -0.753734 -vn 0.58225 -0.30476 -0.753728 -vn 0.277529 -0.188372 -0.942069 -vn 0.277522 -0.188318 -0.942082 -vn 0.277492 -0.188339 -0.942086 -vn 0.277531 -0.188365 -0.94207 -vn 0.277534 -0.188301 -0.942081 -vn 0.277467 -0.188347 -0.942092 -vn 0 -0.85065 -0.525733 -vn -1.30932e-005 -0.850652 -0.525729 -vn 2.91841e-017 -0.850661 -0.525714 -vn 1.30932e-005 -0.850652 -0.525729 -vn 0 -0.85065 -0.525733 -vn -0.304726 -0.753749 -0.582241 -vn -0.304758 -0.753734 -0.582244 -vn -0.30476 -0.753728 -0.58225 -vn -0.304774 -0.753734 -0.582235 -vn -0.304747 -0.753747 -0.582233 -vn -0.304747 -0.753754 -0.582224 -vn 0 -0.637353 -0.770572 -vn -7.83614e-007 -0.637353 -0.770572 -vn 0 -0.637354 -0.770571 -vn 0 -0.637354 -0.770571 -vn 7.83614e-007 -0.637353 -0.770572 -vn 0 -0.637353 -0.770572 -vn 0 0 -1 -vn 0 0 -1 -vn 0 0 -1 -vn 0 0 -1 -vn 0 0 -1 -vn 0 0 -1 -vn -0.58225 -0.30476 -0.753728 -vn -0.582235 -0.304774 -0.753734 -vn -0.582233 -0.304747 -0.753747 -vn -0.582224 -0.304747 -0.753754 -vn -0.582241 -0.304726 -0.753749 -vn -0.582244 -0.304758 -0.753734 -vn 0 -0.356817 -0.934174 -vn 0 -0.356817 -0.934174 -vn -2.66058e-006 -0.356818 -0.934174 -vn 0 -0.356819 -0.934173 -vn 0 -0.356819 -0.934173 -vn 2.66058e-006 -0.356818 -0.934174 -vn -0.277522 -0.188318 -0.942082 -vn -0.277529 -0.188372 -0.942069 -vn -0.277467 -0.188347 -0.942092 -vn -0.277534 -0.188301 -0.942081 -vn -0.277531 -0.188365 -0.94207 -vn -0.277492 -0.188339 -0.942086 -vn 0.309034 0.500006 -0.809007 -vn 0.309031 0.500007 -0.809007 -vn 0.309031 0.499999 -0.809013 -vn 0.309049 0.500006 -0.809001 -vn 0.309042 0.500009 -0.809001 -vn 0.309042 0.500009 -0.809002 -vn 0 0.637354 -0.770571 -vn 0 0.637354 -0.770571 -vn -7.83614e-007 0.637353 -0.770572 -vn 0 0.637353 -0.770572 -vn 0 0.637353 -0.770572 -vn 7.83614e-007 0.637353 -0.770572 -vn 0.850654 0.525725 9.72159e-006 -vn 0.850653 0.525728 0 -vn 0.850653 0.525728 0 -vn 0.850654 0.525725 -9.72168e-006 -vn 0.850661 0.525714 0 -vn 0.93072 -0.0160106 -0.365382 -vn 0.93072 -0.0160106 -0.365382 -vn 0.93072 -0.0160106 -0.365382 -vn 0.93072 -0.0160106 -0.365382 -vn 0.231532 -0.78551 0.573905 -vn 0.231529 -0.785511 0.573905 -vn 0.231524 -0.785511 0.573907 -vn 0.231527 -0.78551 0.573907 -vn -0.786238 -0.274454 0.553629 -vn -0.786238 -0.274453 0.553629 -vn -0.786237 -0.274454 0.55363 -vn -0.786237 -0.274454 0.553629 -vn -0.901976 0.431786 0 -vn -0.901976 0.431786 0 -vn -0.901976 0.431786 0 -vn -0.901976 0.431786 0 -vn 0.356817 0.934174 -5.73624e-007 -vn 0.356817 0.934174 0 -vn 0.356817 0.934174 0 -vn 0.356817 0.934174 5.73617e-007 -vn 0.356817 0.934174 0 -vn 0.356817 0.934174 0 -vn 0.0120104 0.859169 0.511551 -vn 0.0120104 0.859169 0.511551 -vn 0.0120104 0.859169 0.511551 -vn 0.0120104 0.859169 0.511551 -vn -0.75461 0.656173 0 -vn -0.75461 0.656173 0 -vn -0.75461 0.656173 0 -vn -0.75461 0.656173 0 -vn -0.582589 -0.53441 -0.612369 -vn -0.582589 -0.534411 -0.612368 -vn -0.582588 -0.534412 -0.612368 -vn -0.582588 -0.534411 -0.612369 -vn -0.01201 -0.859168 -0.511553 -vn -0.0120122 -0.859169 -0.51155 -vn -0.0120056 -0.859171 -0.511548 -vn -0.0120034 -0.859169 -0.51155 -vn 0.754608 -0.656176 0 -vn 0.754608 -0.656176 0 -vn 0.754608 -0.656176 0 -vn 0.754608 -0.656176 0 -vn 0.577357 0.577345 0.577348 -vn 0.577345 0.577343 0.577363 -vn 0.577342 0.57736 0.577349 -vn 0.577362 0.577343 0.577346 -vn 0.577343 0.577339 0.577368 -vn 0.57734 0.57736 0.577351 -vn 0.0194427 0.847158 0.530985 -vn 0.0194475 0.847157 0.530987 -vn 0.0194466 0.847152 0.530995 -vn 0.0194418 0.847153 0.530993 -vn 0.0949002 0.908163 -0.407718 -vn 0.0949006 0.908163 -0.407718 -vn 0.0949005 0.908164 -0.407717 -vn 0.0949002 0.908163 -0.407717 -vn 0.0481836 -0.330284 -0.942651 -vn 0.048185 -0.330284 -0.942651 -vn 0.0481853 -0.330281 -0.942652 -vn 0.0481839 -0.330281 -0.942652 -vn -0.0194469 -0.847154 -0.530992 -vn -0.0194454 -0.847154 -0.530991 -vn -0.019445 -0.847153 -0.530994 -vn -0.0194466 -0.847152 -0.530994 -vn -0.0949033 -0.908158 0.407729 -vn -0.0949031 -0.908157 0.40773 -vn -0.0949031 -0.908158 0.407729 -vn -0.0949033 -0.908158 0.407729 -vn 0.577345 0.57736 -0.577346 -vn 0.577347 0.577343 -0.577361 -vn 0.577365 0.577346 -0.577339 -vn 0.577341 0.577367 -0.577343 -vn 0.577345 0.577343 -0.577363 -vn 0.577361 0.577346 -0.577344 -vn 0.0194434 0.847158 -0.530985 -vn 0.0194412 0.847158 -0.530985 -vn 0.019439 0.847156 -0.530988 -vn 0.0194412 0.847156 -0.530989 -vn -0.407726 0.0948946 -0.90816 -vn -0.407726 0.0948946 -0.90816 -vn -0.407726 0.0948946 -0.90816 -vn -0.407726 0.0948946 -0.90816 -vn -0.33028 -0.942652 -0.0481921 -vn -0.33028 -0.942652 -0.0481914 -vn -0.330279 -0.942652 -0.04819 -vn -0.330279 -0.942652 -0.0481907 -vn -0.0194424 -0.847155 0.53099 -vn -0.0194404 -0.847155 0.53099 -vn -0.0194425 -0.847157 0.530987 -vn -0.0194446 -0.847157 0.530987 -vn 0.407717 -0.0949129 0.908162 -vn 0.407716 -0.0949137 0.908163 -vn 0.407716 -0.0949111 0.908163 -vn 0.407718 -0.0949102 0.908162 -vn 1.75559e-005 0.85065 -0.525733 -vn 0 0.850662 -0.525712 -vn -1.7556e-005 0.85065 -0.525733 -vn 0 0.850647 -0.525738 -vn 0 0.850647 -0.525738 -vn -0.591207 0.56533 -0.575219 -vn -0.591209 0.565328 -0.575218 -vn -0.591209 0.565323 -0.575223 -vn -0.591207 0.565325 -0.575223 -vn 0 -0.697067 -0.717006 -vn 0 -0.697067 -0.717006 -vn 0 -0.697067 -0.717006 -vn 0 -0.697067 -0.717006 -vn 0.553626 -0.786239 0.274455 -vn 0.553626 -0.786239 0.274456 -vn 0.553626 -0.786239 0.274456 -vn 0.553627 -0.786239 0.274456 -vn 0.494617 -0.101676 0.863143 -vn 0.494618 -0.101673 0.863143 -vn 0.49462 -0.101679 0.863141 -vn 0.494619 -0.101683 0.863141 -vn 0 0.356819 -0.934173 -vn -2.38769e-006 0.356818 -0.934174 -vn 0 0.356817 -0.934174 -vn 0 0.356817 -0.934174 -vn 2.38769e-006 0.356818 -0.934174 -vn 0 0.356819 -0.934173 -vn 0 0.839724 -0.543014 -vn 0 0.839724 -0.543014 -vn 0 0.839724 -0.543014 -vn 0 0.839724 -0.543014 -vn -0.813253 0.56128 -0.153568 -vn -0.813254 0.56128 -0.153568 -vn -0.813254 0.56128 -0.153568 -vn -0.813254 0.56128 -0.153568 -vn -0.612374 -0.58259 0.534404 -vn -0.612374 -0.58259 0.534404 -vn -0.612373 -0.58259 0.534404 -vn -0.612374 -0.58259 0.534404 -vn 0 -0.839724 0.543014 -vn 0 -0.839724 0.543014 -vn 0 -0.839724 0.543014 -vn 0 -0.839724 0.543014 -vn 0.813256 -0.561277 0.153566 -vn 0.813256 -0.561277 0.153565 -vn 0.813256 -0.561278 0.153566 -vn 0.813255 -0.561278 0.153566 -vn -0.577357 0.577345 -0.577348 -vn -0.577345 0.577343 -0.577363 -vn -0.577342 0.57736 -0.577349 -vn -0.577362 0.577343 -0.577346 -vn -0.577343 0.577339 -0.577368 -vn -0.57734 0.57736 -0.577351 -vn -0.0194427 0.847158 -0.530985 -vn -0.0194475 0.847157 -0.530987 -vn -0.0194466 0.847152 -0.530995 -vn -0.0194418 0.847153 -0.530993 -vn -0.0949002 0.908163 0.407718 -vn -0.0949006 0.908163 0.407718 -vn -0.0949005 0.908164 0.407717 -vn -0.0949002 0.908163 0.407717 -vn -0.0481836 -0.330284 0.942651 -vn -0.048185 -0.330284 0.942651 -vn -0.0481853 -0.330281 0.942652 -vn -0.0481839 -0.330281 0.942652 -vn 0.0194469 -0.847154 0.530992 -vn 0.0194454 -0.847154 0.530991 -vn 0.019445 -0.847153 0.530994 -vn 0.0194466 -0.847152 0.530994 -vn 0.0949033 -0.908158 -0.407729 -vn 0.0949031 -0.908157 -0.40773 -vn 0.0949031 -0.908158 -0.407729 -vn 0.0949033 -0.908158 -0.407729 -vn -0.356817 0.934174 0 -vn -0.356817 0.934174 0 -vn -0.356819 0.934174 4.0519e-006 -vn -0.356821 0.934173 0 -vn -0.356821 0.934173 0 -vn -0.356819 0.934174 -4.05189e-006 -vn -0.0120084 0.859168 0.511553 -vn -0.0120084 0.859168 0.511553 -vn -0.0120086 0.859167 0.511554 -vn -0.0120086 0.859167 0.511554 -vn -0.561277 0.153552 0.813259 -vn -0.561277 0.153551 0.813259 -vn -0.561278 0.153548 0.813259 -vn -0.561278 0.15355 0.813258 -vn -0.408256 -0.912867 0 -vn -0.408256 -0.912867 0 -vn -0.408256 -0.912867 0 -vn -0.408256 -0.912867 0 -vn 0.0120087 -0.859167 -0.511554 -vn 0.012009 -0.859167 -0.511554 -vn 0.0120098 -0.859167 -0.511555 -vn 0.0120094 -0.859167 -0.511555 -vn 0.561275 -0.153555 -0.813259 -vn 0.561275 -0.153553 -0.81326 -vn 0.561274 -0.153556 -0.81326 -vn 0.561274 -0.153557 -0.81326 -vn 0 0.356819 0.934173 -vn 2.38769e-006 0.356818 0.934174 -vn 0 0.356817 0.934174 -vn 0 0.356817 0.934174 -vn -2.38769e-006 0.356818 0.934174 -vn 0 0.356819 0.934173 -vn 0 0.839724 0.543014 -vn 0 0.839724 0.543014 -vn 0 0.839724 0.543014 -vn 0 0.839724 0.543014 -vn 0.813253 0.56128 0.153568 -vn 0.813254 0.56128 0.153568 -vn 0.813254 0.56128 0.153568 -vn 0.813254 0.56128 0.153568 -vn 0.612374 -0.58259 -0.534404 -vn 0.612374 -0.58259 -0.534404 -vn 0.612373 -0.58259 -0.534404 -vn 0.612374 -0.58259 -0.534404 -vn 0 -0.839724 -0.543014 -vn 0 -0.839724 -0.543014 -vn 0 -0.839724 -0.543014 -vn 0 -0.839724 -0.543014 -vn -0.813256 -0.561277 -0.153566 -vn -0.813256 -0.561277 -0.153565 -vn -0.813256 -0.561278 -0.153566 -vn -0.813255 -0.561278 -0.153566 -vn 9.72159e-006 0.850654 0.525725 -vn 0 0.850653 0.525728 -vn 0 0.850653 0.525728 -vn -9.72168e-006 0.850654 0.525725 -vn 0 0.850661 0.525714 -vn -0.365382 0.93072 -0.0160106 -vn -0.365382 0.93072 -0.0160106 -vn -0.365382 0.93072 -0.0160106 -vn -0.365382 0.93072 -0.0160106 -vn 0.573905 0.231532 -0.78551 -vn 0.573905 0.231529 -0.785511 -vn 0.573907 0.231524 -0.785511 -vn 0.573907 0.231527 -0.78551 -vn 0.553629 -0.786238 -0.274454 -vn 0.553629 -0.786238 -0.274453 -vn 0.55363 -0.786237 -0.274454 -vn 0.553629 -0.786237 -0.274454 -vn 0 -0.901976 0.431786 -vn 0 -0.901976 0.431786 -vn 0 -0.901976 0.431786 -vn 0 -0.901976 0.431786 -vn -0.577345 0.57736 0.577346 -vn -0.577347 0.577343 0.577361 -vn -0.577365 0.577346 0.577339 -vn -0.577341 0.577367 0.577343 -vn -0.577345 0.577343 0.577363 -vn -0.577361 0.577346 0.577344 -vn -0.0194434 0.847158 0.530985 -vn -0.0194412 0.847158 0.530985 -vn -0.019439 0.847156 0.530988 -vn -0.0194412 0.847156 0.530989 -vn 0.407726 0.0948946 0.90816 -vn 0.407726 0.0948946 0.90816 -vn 0.407726 0.0948946 0.90816 -vn 0.407726 0.0948946 0.90816 -vn 0.33028 -0.942652 0.0481921 -vn 0.33028 -0.942652 0.0481914 -vn 0.330279 -0.942652 0.04819 -vn 0.330279 -0.942652 0.0481907 -vn 0.0194424 -0.847155 -0.53099 -vn 0.0194404 -0.847155 -0.53099 -vn 0.0194425 -0.847157 -0.530987 -vn 0.0194446 -0.847157 -0.530987 -vn -0.407717 -0.0949129 -0.908162 -vn -0.407716 -0.0949137 -0.908163 -vn -0.407716 -0.0949111 -0.908163 -vn -0.407718 -0.0949102 -0.908162 -vn -0.934173 0 0.356819 -vn -0.934174 -2.38769e-006 0.356818 -vn -0.934174 0 0.356817 -vn -0.934174 0 0.356817 -vn -0.934174 2.38769e-006 0.356818 -vn -0.934173 0 0.356819 -vn -0.543014 0 0.839724 -vn -0.543014 0 0.839724 -vn -0.543014 0 0.839724 -vn -0.543014 0 0.839724 -vn -0.153568 -0.813253 0.56128 -vn -0.153568 -0.813254 0.56128 -vn -0.153568 -0.813254 0.56128 -vn -0.153568 -0.813254 0.56128 -vn 0.534404 -0.612374 -0.58259 -vn 0.534404 -0.612374 -0.58259 -vn 0.534404 -0.612373 -0.58259 -vn 0.534404 -0.612374 -0.58259 -vn 0.543014 0 -0.839724 -vn 0.543014 0 -0.839724 -vn 0.543014 0 -0.839724 -vn 0.543014 0 -0.839724 -vn 0.153566 0.813256 -0.561277 -vn 0.153565 0.813256 -0.561277 -vn 0.153566 0.813256 -0.561278 -vn 0.153566 0.813255 -0.561278 -f 53//1 209//2 210//3 144//4 145//5 -f 2//6 1//7 212//8 215//9 129//10 130//11 -f 3//12 2//13 130//14 134//15 125//16 126//17 -f 4//18 3//19 126//20 127//21 23//22 25//23 -f 211//24 212//25 1//26 5//27 217//28 222//29 -f 1//30 253//31 252//32 5//33 -f 15//34 16//35 7//36 11//37 19//38 22//39 -f 7//40 299//41 298//42 11//43 -f 111//44 113//45 18//46 14//47 115//48 120//49 -f 22//50 19//51 20//52 33//53 34//54 21//55 -f 19//56 11//57 12//58 218//59 219//60 20//61 -f 219//62 294//63 293//64 20//65 -f 27//66 28//67 13//68 21//69 34//70 36//71 -f 13//72 282//73 281//74 21//75 -f 26//76 24//77 25//78 23//79 87//80 89//81 -f 32//82 6//83 4//84 25//85 24//86 35//87 -f 24//88 247//89 246//90 35//91 -f 36//92 34//93 33//94 31//95 32//96 35//97 -f 40//98 39//99 131//100 132//101 43//102 45//103 -f 77//104 78//105 37//106 41//107 81//108 86//109 -f 41//110 37//111 38//112 39//113 40//114 42//115 -f 46//116 44//117 45//118 43//119 213//120 214//121 -f 47//122 46//123 214//124 216//125 207//126 208//127 -f 48//128 47//129 208//130 209//131 53//132 55//133 -f 50//134 42//135 40//136 45//137 44//138 51//139 -f 51//140 44//141 46//142 47//143 48//144 52//145 -f 56//146 54//147 55//148 53//149 145//150 146//151 -f 57//152 56//153 146//154 148//155 139//156 140//157 -f 58//158 57//159 140//160 141//161 63//162 65//163 -f 59//164 49//165 50//166 51//167 52//168 60//169 -f 60//170 52//171 48//172 55//173 54//174 61//175 -f 61//176 54//177 56//178 57//179 58//180 62//181 -f 66//182 64//183 65//184 63//185 177//186 179//187 -f 68//188 67//189 183//190 184//191 73//192 75//193 -f 69//194 59//195 60//196 61//197 62//198 70//199 -f 70//200 62//201 58//202 65//203 64//204 71//205 -f 71//206 64//207 66//208 67//209 68//210 72//211 -f 155//212 123//213 79//214 168//215 170//216 -f 76//217 74//218 75//219 73//220 173//221 174//222 -f 167//223 169//224 80//225 76//226 174//227 176//228 -f 81//229 41//230 42//231 50//232 49//233 82//234 -f 82//235 49//236 59//237 69//238 83//239 -f 83//240 69//241 70//242 71//243 72//244 84//245 -f 84//246 72//247 68//248 75//249 74//250 85//251 -f 85//252 74//253 76//254 80//255 77//256 86//257 -f 86//258 81//259 82//260 83//261 84//262 85//263 -f 90//264 88//265 89//266 87//267 149//268 151//269 -f 92//270 91//271 159//272 160//273 97//274 99//275 -f 93//276 29//277 28//278 27//279 30//280 94//281 -f 94//282 30//283 26//284 89//285 88//286 95//287 -f 88//288 259//289 258//290 95//291 -f 100//292 98//293 99//294 97//295 223//296 225//297 -f 102//298 101//299 235//300 236//301 107//302 109//303 -f 103//304 93//305 94//306 95//307 96//308 104//309 -f 105//310 98//311 -f 98//312 270//313 269//314 105//315 -f 110//316 108//317 109//318 107//319 199//320 200//321 -f 193//322 195//323 114//324 110//325 200//326 204//327 -f 112//328 17//329 16//330 15//331 18//332 113//333 -f 115//334 14//335 13//336 28//337 29//338 116//339 -f 29//340 265//341 264//342 116//343 -f 117//344 118//345 -f 118//346 106//347 102//348 109//349 108//350 119//351 -f 108//352 276//353 275//354 119//355 -f 120//356 115//357 116//358 117//359 118//360 119//361 -f 122//362 38//363 37//364 78//365 79//366 123//367 -f 124//368 121//369 122//370 123//371 155//372 156//373 -f 128//374 124//375 156//376 157//377 152//378 154//379 -f 131//380 39//381 38//382 122//383 121//384 133//385 -f 133//386 121//387 124//388 128//389 125//390 134//391 -f 134//392 130//393 129//394 132//395 131//396 133//397 -f 136//398 8//399 7//400 16//401 17//402 137//403 -f 137//404 17//405 112//406 194//407 196//408 -f 138//409 135//410 136//411 137//412 196//413 197//414 -f 187//415 189//416 142//417 138//418 197//419 198//420 -f 143//421 9//422 8//423 136//424 135//425 147//426 -f 135//427 305//428 304//429 147//430 -f 148//431 146//432 145//433 144//434 143//435 147//436 -f 87//437 242//438 241//439 149//440 -f 153//441 127//442 126//443 125//444 128//445 154//446 -f 154//447 152//448 150//449 151//450 149//451 153//452 -f 158//453 157//454 156//455 155//456 170//457 171//458 -f 163//459 165//460 162//461 158//462 171//463 172//464 -f 159//465 91//466 90//467 151//468 150//469 161//470 -f 161//471 150//472 152//473 157//474 158//475 162//476 -f 164//477 160//478 159//479 161//480 162//481 165//482 -f 168//483 79//484 78//485 77//486 80//487 169//488 -f 172//489 171//490 170//491 168//492 169//493 167//494 -f 226//495 228//496 166//497 175//498 230//499 234//500 -f 175//501 166//502 163//503 172//504 167//505 176//506 -f 176//507 174//508 173//509 229//510 230//511 175//512 -f 177//513 63//514 141//515 188//516 190//517 -f 180//518 178//519 179//520 177//521 190//522 192//523 -f 183//524 67//525 66//526 179//527 178//528 185//529 -f 185//530 178//531 180//532 181//533 182//534 186//535 -f 186//536 182//537 237//538 240//539 231//540 233//541 -f 188//542 141//543 140//544 139//545 142//546 189//547 -f 192//548 190//549 188//550 189//551 187//552 191//553 -f 194//554 112//555 113//556 111//557 114//558 195//559 -f 198//560 197//561 196//562 194//563 195//564 193//565 -f 199//566 107//567 236//568 238//569 202//570 -f 201//571 181//572 180//573 192//574 191//575 203//576 -f 203//577 191//578 187//579 198//580 193//581 204//582 -f 204//583 200//584 199//585 202//586 201//587 203//588 -f 206//589 10//590 9//591 143//592 144//593 210//594 -f 210//595 209//596 208//597 207//598 205//599 206//600 -f 216//601 214//602 213//603 215//604 212//605 211//606 -f 213//607 43//608 132//609 129//610 215//611 -f 217//612 5//613 6//614 32//615 31//616 220//617 -f 218//618 12//619 10//620 206//621 205//622 221//623 -f 205//624 288//625 287//626 221//627 -f 222//628 217//629 220//630 219//631 218//632 221//633 -f 223//634 97//635 160//636 164//637 227//638 -f 227//639 164//640 165//641 163//642 166//643 228//644 -f 228//645 226//646 224//647 225//648 223//649 227//650 -f 229//651 173//652 73//653 184//654 232//655 -f 232//656 184//657 183//658 185//659 186//660 233//661 -f 234//662 230//663 229//664 232//665 233//666 231//667 -f 235//668 101//669 100//670 225//671 224//672 239//673 -f 237//674 182//675 181//676 201//677 202//678 238//679 -f 239//680 224//681 226//682 234//683 231//684 240//685 -f 240//686 237//687 238//688 236//689 235//690 239//691 -f 105//692 104//693 96//694 92//695 99//696 98//697 -f 117//698 103//699 104//700 105//701 106//702 118//703 -f 241//704 242//705 243//706 244//707 245//708 -f 153//709 149//710 241//711 245//712 -f 127//713 153//714 245//715 244//716 -f 23//717 127//718 244//719 243//720 -f 87//721 23//722 243//723 242//724 -f 246//725 247//726 248//727 249//728 250//729 251//730 -f 36//731 35//732 246//733 251//734 -f 27//735 36//736 251//737 250//738 -f 30//739 27//740 250//741 249//742 -f 26//743 30//744 249//745 248//746 -f 24//747 26//748 248//749 247//750 -f 252//751 253//752 254//753 255//754 256//755 257//756 -f 6//757 5//758 252//759 257//760 -f 4//761 6//762 257//763 256//764 -f 3//765 4//766 256//767 255//768 -f 2//769 3//770 255//771 254//772 -f 1//773 2//774 254//775 253//776 -f 258//777 259//778 260//779 261//780 262//781 263//782 -f 96//783 95//784 258//785 263//786 -f 92//787 96//788 263//789 262//790 -f 91//791 92//792 262//793 261//794 -f 90//795 91//796 261//797 260//798 -f 88//799 90//800 260//801 259//802 -f 264//803 265//804 266//805 267//806 268//807 -f 117//808 116//809 264//810 268//811 -f 103//812 117//813 268//814 267//815 -f 93//816 103//817 267//818 266//819 -f 29//820 93//821 266//822 265//823 -f 269//824 270//825 271//826 272//827 273//828 274//829 -f 106//830 105//831 269//832 274//833 -f 102//834 106//835 274//836 273//837 -f 101//838 102//839 273//840 272//841 -f 100//842 101//843 272//844 271//845 -f 98//846 100//847 271//848 270//849 -f 275//850 276//851 277//852 278//853 279//854 280//855 -f 120//856 119//857 275//858 280//859 -f 111//860 120//861 280//862 279//863 -f 114//864 111//865 279//866 278//867 -f 110//868 114//869 278//870 277//871 -f 108//872 110//873 277//874 276//875 -f 281//876 282//877 283//878 284//879 285//880 286//881 -f 22//882 21//883 281//884 286//885 -f 15//886 22//887 286//888 285//889 -f 18//890 15//891 285//892 284//893 -f 14//894 18//895 284//896 283//897 -f 13//898 14//899 283//900 282//901 -f 287//902 288//903 289//904 290//905 291//906 292//907 -f 222//908 221//909 287//910 292//911 -f 211//912 222//913 292//914 291//915 -f 216//916 211//917 291//918 290//919 -f 207//920 216//921 290//922 289//923 -f 205//924 207//925 289//926 288//927 -f 293//928 294//929 295//930 296//931 297//932 -f 33//933 20//934 293//935 297//936 -f 31//937 33//938 297//939 296//940 -f 220//941 31//942 296//943 295//944 -f 219//945 220//946 295//947 294//948 -f 298//949 299//950 300//951 301//952 302//953 303//954 -f 12//955 11//956 298//957 303//958 -f 10//959 12//960 303//961 302//962 -f 9//963 10//964 302//965 301//966 -f 8//967 9//968 301//969 300//970 -f 7//971 8//972 300//973 299//974 -f 304//975 305//976 306//977 307//978 308//979 309//980 -f 148//981 147//982 304//983 309//984 -f 139//985 148//986 309//987 308//988 -f 142//989 139//990 308//991 307//992 -f 138//993 142//994 307//995 306//996 -f 135//997 138//998 306//999 305//1000 -# 193 faces - diff --git a/topmodx/objs/sphericalcube.obj b/topmodx/objs/sphericalcube.obj deleted file mode 100644 index e5e1a2e..0000000 --- a/topmodx/objs/sphericalcube.obj +++ /dev/null @@ -1,198 +0,0 @@ -v 0.57735 0.57735 0.57735 -v 0.57735 0.57735 -0.57735 -v -0.57735 0.57735 -0.57735 -v -0.57735 0.57735 0.57735 -v 0.57735 -0.57735 0.57735 -v 0.57735 -0.57735 -0.57735 -v -0.57735 -0.57735 -0.57735 -v -0.57735 -0.57735 0.57735 -v -5.24634e-18 1 0 -v 1 -5.24634e-18 0 -v -5.24634e-18 -5.24634e-18 -1 -v -1 -5.24634e-18 0 -v -5.24634e-18 -5.24634e-18 1 -v -5.24634e-18 -1 0 -v 0.707107 0.707107 0 -v -5.15282e-18 0.707107 -0.707107 -v -0.707107 0.707107 0 -v -5.15282e-18 0.707107 0.707107 -v 0.707107 -0.707107 0 -v 0.707107 -5.15282e-18 -0.707107 -v 0.707107 -5.15282e-18 0.707107 -v -5.15282e-18 -0.707107 -0.707107 -v -0.707107 -5.15282e-18 -0.707107 -v -0.707107 -0.707107 0 -v -0.707107 -5.15282e-18 0.707107 -v -5.15282e-18 -0.707107 0.707107 -v 0.367001 0.854763 -0.367001 -v 0.854763 0.367001 0.367001 -v 0.367001 0.367001 -0.854763 -v -0.854763 0.367001 -0.367001 -v -0.367001 0.367001 0.854763 -v 0.367001 -0.854763 0.367001 -v -0.367001 0.854763 -0.367001 -v -0.367001 0.854763 0.367001 -v 0.367001 0.854763 0.367001 -v 0.854763 -0.367001 -0.367001 -v 0.854763 0.367001 -0.367001 -v 0.367001 -0.367001 -0.854763 -v 0.854763 -0.367001 0.367001 -v 0.367001 0.367001 0.854763 -v -0.367001 -0.367001 -0.854763 -v 0.367001 -0.854763 -0.367001 -v -0.367001 0.367001 -0.854763 -v -0.854763 -0.367001 -0.367001 -v -0.854763 -0.367001 0.367001 -v -0.367001 -0.854763 -0.367001 -v -0.854763 0.367001 0.367001 -v -0.367001 -0.367001 0.854763 -v 0.367001 -0.367001 0.854763 -v -0.367001 -0.854763 0.367001 -v 0.663937 0.663937 0.344056 -v 0.663937 0.663937 -0.344056 -v 0.344056 0.663937 -0.663937 -v -0.344056 0.663937 -0.663937 -v -0.663937 0.663937 -0.344056 -v -0.663937 0.663937 0.344056 -v -0.344056 0.663937 0.663937 -v 0.344056 0.663937 0.663937 -v 0.663937 -0.663937 0.344056 -v 0.663937 -0.663937 -0.344056 -v 0.663937 -0.344056 -0.663937 -v 0.663937 0.344056 -0.663937 -v 0.663937 0.344056 0.663937 -v 0.663937 -0.344056 0.663937 -v 0.344056 -0.663937 -0.663937 -v -0.344056 -0.663937 -0.663937 -v -0.663937 -0.344056 -0.663937 -v -0.663937 0.344056 -0.663937 -v -0.663937 -0.663937 -0.344056 -v -0.663937 -0.663937 0.344056 -v -0.663937 -0.344056 0.663937 -v -0.663937 0.344056 0.663937 -v -0.344056 -0.663937 0.663937 -v 0.344056 -0.663937 0.663937 -v 0.38824 0.921558 0 -v 0.921558 0.38824 0 -v -5.21537e-18 0.921558 -0.38824 -v -5.21537e-18 0.38824 -0.921558 -v -0.38824 0.921558 0 -v -0.921558 0.38824 0 -v -5.21537e-18 0.921558 0.38824 -v -5.21537e-18 0.38824 0.921558 -v 0.921558 -0.38824 0 -v 0.38824 -0.921558 0 -v 0.921558 -5.21537e-18 -0.38824 -v 0.38824 -5.21537e-18 -0.921558 -v 0.921558 -5.21537e-18 0.38824 -v 0.38824 -5.21537e-18 0.921558 -v -5.21537e-18 -0.38824 -0.921558 -v -5.21537e-18 -0.921558 -0.38824 -v -0.38824 -5.21537e-18 -0.921558 -v -0.921558 -5.21537e-18 -0.38824 -v -0.921558 -0.38824 0 -v -0.38824 -0.921558 0 -v -0.921558 -5.21537e-18 0.38824 -v -0.38824 -5.21537e-18 0.921558 -v -5.21537e-18 -0.38824 0.921558 -v -5.21537e-18 -0.921558 0.38824 -# 98 vertices - -f 2 53 27 52 -f 1 63 28 51 -f 2 62 29 53 -f 3 68 30 55 -f 4 72 31 57 -f 5 74 32 59 -f 3 55 33 54 -f 4 57 34 56 -f 15 75 35 51 -f 6 61 36 60 -f 15 76 37 52 -f 6 65 38 61 -f 19 83 39 59 -f 18 82 40 58 -f 7 67 41 66 -f 19 84 42 60 -f 16 78 43 54 -f 7 69 44 67 -f 8 71 45 70 -f 22 90 46 66 -f 17 80 47 56 -f 8 73 48 71 -f 21 88 49 64 -f 24 94 50 70 -f 53 16 77 27 -f 55 17 79 33 -f 57 18 81 34 -f 58 1 51 35 -f 61 20 85 36 -f 62 2 52 37 -f 62 20 86 29 -f 63 21 87 28 -f 63 1 58 40 -f 64 5 59 39 -f 65 22 89 38 -f 65 6 60 42 -f 67 23 91 41 -f 68 3 54 43 -f 68 23 92 30 -f 69 24 93 44 -f 69 7 66 46 -f 71 25 95 45 -f 72 4 56 47 -f 72 25 96 31 -f 73 26 97 48 -f 73 8 70 50 -f 74 5 64 49 -f 74 26 98 32 -f 75 9 81 35 -f 75 15 52 27 -f 76 10 85 37 -f 76 15 51 28 -f 77 9 75 27 -f 77 16 54 33 -f 78 11 91 43 -f 78 16 53 29 -f 79 9 77 33 -f 79 17 56 34 -f 80 12 95 47 -f 80 17 55 30 -f 81 9 79 34 -f 81 18 58 35 -f 82 13 88 40 -f 82 18 57 31 -f 83 10 87 39 -f 83 19 60 36 -f 84 14 90 42 -f 84 19 59 32 -f 85 10 83 36 -f 85 20 62 37 -f 86 11 78 29 -f 86 20 61 38 -f 87 10 76 28 -f 87 21 64 39 -f 88 13 97 49 -f 88 21 63 40 -f 89 11 86 38 -f 89 22 66 41 -f 90 14 94 46 -f 90 22 65 42 -f 91 11 89 41 -f 91 23 68 43 -f 92 12 80 30 -f 92 23 67 44 -f 93 12 92 44 -f 93 24 70 45 -f 94 14 98 50 -f 94 24 69 46 -f 95 12 93 45 -f 95 25 72 47 -f 96 13 82 31 -f 96 25 71 48 -f 97 13 96 48 -f 97 26 74 49 -f 98 14 84 32 -f 98 26 73 50 -# 96 faces - diff --git a/topmodx/objs/tetrahedron.obj b/topmodx/objs/tetrahedron.obj deleted file mode 100644 index 6575b6c..0000000 --- a/topmodx/objs/tetrahedron.obj +++ /dev/null @@ -1,33 +0,0 @@ -# The units used in this file are inches. -g default -v -0.500000 -0.707100 -0.866025 -v -0.500000 -0.707100 0.866025 -v 1.000000 -0.707100 0.000000 -v 0.000000 0.707100 0.000000 -vt 0.250000 -0.933013 -vt 0.250000 -0.066987 -vt 1.000000 -0.500000 -vt 0.000000 0.000000 -vt 0.333333 0.000000 -vt 0.666667 0.000000 -vt 1.000000 0.000000 -vt 0.500000 1.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.942808 0.333336 0.000000 -vn -0.942808 0.333336 0.000000 -vn -0.942808 0.333336 0.000000 -vn 0.471404 0.333336 0.816496 -vn 0.471404 0.333336 0.816496 -vn 0.471404 0.333336 0.816496 -vn 0.471404 0.333336 -0.816496 -vn 0.471404 0.333336 -0.816496 -vn 0.471404 0.333336 -0.816496 -s off -g pCone1 -usemtl initialShadingGroup -f 1/1/1 3/3/2 2/2/3 -f 1/4/4 2/5/5 4/8/6 -f 2/5/7 3/6/8 4/8/9 -f 3/6/10 1/7/11 4/8/12 diff --git a/topmodx/qss/default.qss b/topmodx/qss/default.qss deleted file mode 100644 index e69de29..0000000 diff --git a/topmodx/qss/modo.qss b/topmodx/qss/modo.qss deleted file mode 100644 index c4b3530..0000000 --- a/topmodx/qss/modo.qss +++ /dev/null @@ -1,34 +0,0 @@ -QWidget { - color: white; - background-color: rgb(56,54,55); -} - -QPushButton { - background-color: rgb(82,94,104); - border-radius: 10px; - border-style: outset; - border-width: 2px; - border-color: rgb(31,31,31); - padding: 6px; - min-width: 4em; -} - -QPushButton:pressed { - background-color: rgb(241,146,3); - border-style: inset; -} - -QPushButton:disabled { - color: rgb(127,135,144); -} - -QComboBox { - color: white; - background: rgb(127,135,144); -} - -QDoubleSpinBox { - background: black; -} - -QGroupBox::title { color: rgb(56,54,55); } /* have to to this so the name of the groupbox doesn't show up */ \ No newline at end of file diff --git a/topmodx/shaders/fragShader.cg b/topmodx/shaders/fragShader.cg deleted file mode 100644 index 269c4c6..0000000 --- a/topmodx/shaders/fragShader.cg +++ /dev/null @@ -1,66 +0,0 @@ -// float4 main(float4 c : COLOR) : COLOR { return c; } - -struct fragin { - float4 color : COLOR0; - float2 uv : TEXCOORD0; - float4 position : POSITION; - // float3 normal : NORMAL; -}; - -struct fragout { - float4 color : COLOR; -}; - -// fragout main(float4 color : COLOR) -// { -// fragout OUT; -// OUT.color = color; -// return OUT; -// } - -float attenuation( float3 P, float3 L, float radius, float falloff ) { - // Spotlight Effect - float3 V = normalize( P - L ); - float3 D = normalize( -L ); // origin is lookat - return 1.0f-smoothstep( cos(radians(radius-falloff)), cos(radians(radius)), dot( V, D ) ); -} - -fragout main( - fragin IN, - in float3 camPos : TEXCOORD1, - in float3 oPos : TEXCOORD2, - in float4 oNorm : TEXCOORD3, - in float4 lPos : TEXCOORD4, - uniform float attenDegrees) { - - fragout OUT; - - // oPosition = mul(modelViewProj, IN.position); - // objectPos = position.xyz; - // oNormal = normal; - // float4 surfColor, ambient, diffuse, specular; - - // surfColor = IN.color; - // diffuse = attenuation( oPos.xyz, lPos.xyz, 15, 90.0f ); - // ambient = float4(0.5,0.5,0.5,1.0);// glstate.light[0].ambient; - // diffuse.a = ambient.a = surfColor.a = 1; - // OUT.color = surfColor * (diffuse + ambient); - OUT.color = IN.color; - - return OUT; -} - -// // Compute the diffuse term -// float3 L = normalize(lightPosition - P); -// float diffuseLight = max(dot(N, L), 0); -// float3 diffuse = Kd * lightColor * diffuseLight; -// -// // Compute the specular term -// float3 V = normalize(eyePosition - P); -// float3 H = normalize(L + V); -// float specularLight = pow(max(dot(N, H), 0), shininess); -// if (diffuseLight <= 0) specularLight = 0; -// float3 specular = Ks * lightColor * specularLight; -// -// color.xyz = emissive + ambient + diffuse + specular; -// color.w = 1; diff --git a/topmodx/shaders/vertShader.cg b/topmodx/shaders/vertShader.cg deleted file mode 100644 index f84dee5..0000000 --- a/topmodx/shaders/vertShader.cg +++ /dev/null @@ -1,140 +0,0 @@ -struct vertin { - float4 position : POSITION; - float4 color : COLOR0; - float2 uv : TEXCOORD0; - // float4 depthVal : TEXCOORD0; // value for depth comparison for shadow - float4 normal : NORMAL; -}; - -struct vertout { - float4 position : POSITION; - float4 color : COLOR0; - float2 uv : TEXCOORD0; - // float3 outPos : TEXCOORD0; - // float4 depthVal : TEXCOORD0; // value for depth comparison for shadow -}; -// vertout main( -// float2 position : POSITION, -// float3 color : COLOR, -// float2 texCoord : TEXCOORD0) -// { -// vertout OUT; -// -// OUT.position = float4(position,0,1); -// OUT.color = color; -// OUT.texCoord = texCoord; -// -// return OUT; -// } - -// float cosfactor(float3 p, float3 n) { -// -// float3 vec(position-p); normalize(vec); -// Vector3d normal(n); normalize(normal); -// double cf = sqr((1.0 + vec*normal)/2.0); -// -// return cf; -// } - -// float3 illuminate(float3 p, float3 n) { -// -// float3 vec(position-p); -// normalize(vec); -// float3 normal(n); -// normalize(normal); -// float cf = sqr((1.0 + vec*normal)/2.0); -// float3 color; -// -// color = (lightWarmColor*cf + lightCoolColor*(1.0-cf))*intensity; -// return color; -// } - -vertout main( - vertin IN, - out float4 camPos : TEXCOORD1, - out float4 oPos : TEXCOORD2, - out float4 oNorm : TEXCOORD3, - out float4 lPos : TEXCOORD4, - uniform float4x4 camToWorld, - uniform float4x4 camToWorldIT, - uniform float4x4 worldToLight, - //from book - uniform float3 globalAmbient, - uniform float3 lightWarmColor, - uniform float3 lightCoolColor, - uniform float lightIntensity, - uniform float4 lightPosition, - uniform float4 eyePosition, - uniform float3 basecolor, - uniform float3 Ka, - uniform float3 Kd, - uniform float3 Ks, - uniform float shininess - ) { - - vertout OUT; - - // Transform the vertex position to Eye Space - float4x4 modelView = glstate.matrix.modelview[0]; - float4x4 proj = glstate.matrix.projection; - oPos = mul( modelView, IN.position ); - lPos = mul( modelView, lightPosition ); - float4 mvPos = oPos; - - float4x4 modelViewIT = glstate.matrix.invtrans.modelview[0]; - oNorm = mul( modelViewIT, float4(IN.normal.xyz,0.0) ); - oNorm = mul( camToWorldIT, oNorm ); - - // Transform the vertex position to light space - oPos = mul( camToWorld, oPos ); - lPos = mul( camToWorld, lPos ); - // lPos = mul( worldToLight, oPos ); - // Transform Eye Position to World Space - camPos = eyePosition; - - // OUT.depthVal = IN.depthVal; - - // Compute ambient term - float3 ambient = Ka * globalAmbient; - // // Compute the diffuse term - float3 L = normalize(lPos.xyz - oPos.xyz); - // float diffuseLight = max(dot(oNorm.xyz, L), 0); - // float3 diffuse = Kd * lightWarmColor * diffuseLight; - // // Compute the specular term - // float3 V = normalize(eyePosition - oPos.xyz); - // float3 H = normalize(L + V); - // float specularLight = pow(max(dot(oNorm.xyz, H), 0), shininess); - // if (diffuseLight <= 0) specularLight = 0; - // float3 specular = Ks * lightWarmColor * specularLight; - - float4 normal = oNorm; - normalize(normal); - // double cf = sqr((1.0 + vec*normal)/2.0); - - float cf = ((1.0 + dot(L,normal)/2.0)); - cf *= cf; - - OUT.color.xyz = basecolor*(1.0-Kd) + (lightWarmColor*cf + lightCoolColor*(1.0-cf))*lightIntensity*Kd; - // OUT.color.x *= IN.color.x; - // OUT.color.y *= IN.color.y; - // OUT.color.z *= IN.color.z; - - // Vector3d vec(position-p); normalize(vec); - // Vector3d normal(n); normalize(normal); - // double cf = sqr((1.0 + vec*normal)/2.0); - - // fvcolor = lightptr->illuminate(pos,normal)*Kd; - // fvcolor += (1.0-Kd)*basecolor; - - - // OUT.color.xyz = IN.color.xyz + ambient + diffuse + specular; - OUT.color.w = IN.color.w; - - // OUT.color = IN.color; - - // Now transform position to clip space - OUT.position = mul( proj, mvPos ); - OUT.uv = IN.uv; - - return OUT; -} diff --git a/topmodx/shortcutdialog.ui b/topmodx/shortcutdialog.ui deleted file mode 100644 index fac4419..0000000 --- a/topmodx/shortcutdialog.ui +++ /dev/null @@ -1,39 +0,0 @@ - - ShortcutDialog - - - - 0 - 0 - 549 - 349 - - - - Set shortcuts - - - - 0 - - - - - - Action - - - - - Shortcut - - - - - - - - - - - diff --git a/topmodx/src/BasicsMode.cc b/topmodx/src/BasicsMode.cc deleted file mode 100644 index 2f30209..0000000 --- a/topmodx/src/BasicsMode.cc +++ /dev/null @@ -1,520 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ -#include - -#include "BasicsMode.h" - -/*! - \ingroup gui - @{ - - \class BasicsMode - \brief Basics Operations including insert-edge and delete-edge. - - \note - - \see BasicsMode -*/ - -/*! -* \brief Constructor -* -* @param parent the MainWindow widget -* @param sm the shortcut manager class for adding a custom shortcut to each menu action or icon -* @param actionList the master list of actions for use with the CommandCompleter class -* -*/ -BasicsMode::BasicsMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - //here we set the default mode for when the application is executed. - // ((MainWindow*)mParent)->setMode(MainWindow::InsertEdge); - - mInsertEdgeWidget = new QWidget; - mDeleteEdgeWidget = new QWidget; - mCollapseEdgeWidget = new QWidget; - mSubdivideEdgeWidget = new QWidget; - mConnectEdgesWidget = new QWidget; - mSpliceCornersWidget = new QWidget; - mTransformsWidget = new QWidget; - mSelectionOptionsWidget = new QWidget; - - //each mode widget will each be added to the - //ToolOptionsDockWidget of the MainWindow class - setupInsertEdge(); - setupDeleteEdge(); - setupCollapseEdge(); - setupSubdivideEdge(); - setupConnectEdges(); - setupSpliceCorners(); - setupTransforms(); - setupSelectionOptions(); - - mInsertEdgeAction = new QAction(tr("Insert Edge"), this); - mInsertEdgeAction->setIcon(QIcon(":/images/insert_edge.png")); - mInsertEdgeAction->setCheckable(true); - // mInsertEdgeAction->setChecked(true); - // sm->registerAction(mInsertEdgeAction, "Basics Modes", "9"); - mInsertEdgeAction->setStatusTip(tr("Enter Insert Edge Mode")); - mInsertEdgeAction->setToolTip(tr("Insert Edge Mode")); - connect(mInsertEdgeAction, SIGNAL(triggered()), this, SLOT(triggerInsertEdge())); - connect(mInsertEdgeAction, SIGNAL(hovered()), ((MainWindow*)mParent), SLOT(setAnimatedHelpImage())); - actionList->addAction(mInsertEdgeAction); - - mDeleteEdgeAction = new QAction(tr("Delete Edge"), this); - mDeleteEdgeAction->setIcon(QIcon(":/images/delete_edge.png")); - mDeleteEdgeAction->setCheckable(true); - // sm->registerAction(mDeleteEdgeAction, "Basics Modes", "9"); - mDeleteEdgeAction->setStatusTip(tr("Enter Delete Edge Mode")); - mDeleteEdgeAction->setToolTip(tr("Delete Edge Mode")); - connect(mDeleteEdgeAction, SIGNAL(triggered()), this, SLOT(triggerDeleteEdge())); - actionList->addAction(mDeleteEdgeAction); - - mCollapseEdgeAction = new QAction(tr("Collapse Edge"), this); - mCollapseEdgeAction->setIcon(QIcon(":/images/collapse_edge.png")); - mCollapseEdgeAction->setCheckable(true); - // sm->registerAction(mCollapseEdgeAction, "Basics Modes", "9"); - mCollapseEdgeAction->setStatusTip(tr("Enter Collapse Edge Mode")); - mCollapseEdgeAction->setToolTip(tr("Collapse Edge Mode")); - connect(mCollapseEdgeAction, SIGNAL(triggered()), this, SLOT(triggerCollapseEdge())); - actionList->addAction(mCollapseEdgeAction); - - mSubdivideEdgeAction = new QAction(tr("Subdivide Edge"), this); - mSubdivideEdgeAction->setIcon(QIcon(":/images/subdivide_edge.png")); - mSubdivideEdgeAction->setCheckable(true); - // sm->registerAction(mDeleteEdgeAction, "Basics Modes", "9"); - mSubdivideEdgeAction->setStatusTip(tr("Enter Subdivide Edge Mode")); - mSubdivideEdgeAction->setToolTip(tr("Subdivide Edge Mode")); - connect(mSubdivideEdgeAction, SIGNAL(triggered()), this, SLOT(triggerSubdivideEdge())); - actionList->addAction(mSubdivideEdgeAction); - - mConnectEdgesAction = new QAction(tr("Connect Edges"), this); - mConnectEdgesAction->setIcon(QIcon(":/images/connect_edges.png")); - mConnectEdgesAction->setCheckable(true); - // sm->registerAction(mDeleteEdgeAction, "Basics Modes", "9"); - mConnectEdgesAction->setStatusTip(tr("Enter Connect Edges Mode")); - mConnectEdgesAction->setToolTip(tr("Connect Edges Mode")); - connect(mConnectEdgesAction, SIGNAL(triggered()), this, SLOT(triggerConnectEdges())); - actionList->addAction(mConnectEdgesAction); - - mSpliceCornersAction = new QAction(tr("Splice Corners"), this); - mSpliceCornersAction->setIcon(QIcon(":/images/splice_corners.png")); - mSpliceCornersAction->setCheckable(true); - // sm->registerAction(mDeleteEdgeAction, "Basics Modes", "9"); - mSpliceCornersAction->setStatusTip(tr("Enter Splice Corners Mode")); - mSpliceCornersAction->setToolTip(tr("Splice Corners Mode")); - connect(mSpliceCornersAction, SIGNAL(triggered()), this, SLOT(triggerSpliceCorners())); - actionList->addAction(mSpliceCornersAction); - - mTransformsAction = new QAction(tr("Transforms"), this); - mTransformsAction->setIcon(QIcon(":/images/transforms.png")); - mTransformsAction->setCheckable(true); - // sm->registerAction(mDeleteEdgeAction, "Basics Modes", "9"); - mTransformsAction->setStatusTip(tr("Enter Transforms Mode")); - mTransformsAction->setToolTip(tr("Transforms Mode")); - connect(mTransformsAction, SIGNAL(triggered()), this, SLOT(triggerTransforms())); - actionList->addAction(mTransformsAction); - - mSelectionOptionsAction = new QAction(tr("Selection Options"), this); - mSelectionOptionsAction->setIcon(QIcon(":/images/selection-options.png")); - mSelectionOptionsAction->setCheckable(true); - mSelectionOptionsAction->setStatusTip(tr("Enter Selection Options Mode")); - mSelectionOptionsAction->setToolTip(tr("Selection Options Mode")); - connect(mSelectionOptionsAction, SIGNAL(triggered()), this, SLOT(triggerSelectionOptions())); - actionList->addAction(mSelectionOptionsAction); - -} - -QMenu* BasicsMode::getMenu() -{ - mBasicsMenu = new QMenu(tr("Basics")); - - mBasicsMenu->addAction(mInsertEdgeAction); - mBasicsMenu->addAction(mDeleteEdgeAction); - mBasicsMenu->addAction(mCollapseEdgeAction); - mBasicsMenu->addAction(mSubdivideEdgeAction); - mBasicsMenu->addAction(mConnectEdgesAction); - mBasicsMenu->addAction(mSpliceCornersAction); - mBasicsMenu->addAction(mTransformsAction); - mBasicsMenu->addAction(mSelectionOptionsAction); - - return mBasicsMenu; -} - -void BasicsMode::triggerInsertEdge() -{ - ((MainWindow*)mParent)->setToolOptions(mInsertEdgeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::InsertEdge); -} - -void BasicsMode::triggerDeleteEdge() -{ - ((MainWindow*)mParent)->setToolOptions(mDeleteEdgeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::DeleteEdge); -} - -void BasicsMode::triggerCollapseEdge() -{ - ((MainWindow*)mParent)->setToolOptions(mCollapseEdgeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::CollapseEdge); -} - -void BasicsMode::triggerSubdivideEdge() -{ - ((MainWindow*)mParent)->setToolOptions(mSubdivideEdgeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::SubdivideEdge); -} - -void BasicsMode::triggerConnectEdges() -{ - ((MainWindow*)mParent)->setToolOptions(mConnectEdgesWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ConnectEdges); -} - -void BasicsMode::triggerSpliceCorners() -{ - ((MainWindow*)mParent)->setToolOptions(mSpliceCornersWidget); - ((MainWindow*)mParent)->setMode(MainWindow::SpliceCorners); -} - -void BasicsMode::triggerTransforms() -{ - ((MainWindow*)mParent)->setToolOptions(mTransformsWidget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void BasicsMode::triggerSelectionOptions() -{ - ((MainWindow*)mParent)->setToolOptions(mSelectionOptionsWidget); - // ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void BasicsMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mInsertEdgeAction); - actionGroup->addAction(mDeleteEdgeAction); - actionGroup->addAction(mCollapseEdgeAction); - actionGroup->addAction(mSubdivideEdgeAction); - actionGroup->addAction(mConnectEdgesAction); - actionGroup->addAction(mSpliceCornersAction); - actionGroup->addAction(mTransformsAction); - actionGroup->addAction(mSelectionOptionsAction); - - toolBar->addAction(mInsertEdgeAction); - toolBar->addAction(mDeleteEdgeAction); - toolBar->addAction(mCollapseEdgeAction); - toolBar->addAction(mSubdivideEdgeAction); - toolBar->addAction(mConnectEdgesAction); - toolBar->addAction(mSpliceCornersAction); - toolBar->addAction(mTransformsAction); - toolBar->addAction(mSelectionOptionsAction); - - stackedWidget->addWidget(mInsertEdgeWidget); - stackedWidget->addWidget(mDeleteEdgeWidget); - stackedWidget->addWidget(mCollapseEdgeWidget); - stackedWidget->addWidget(mSubdivideEdgeWidget); - stackedWidget->addWidget(mConnectEdgesWidget); - stackedWidget->addWidget(mSpliceCornersWidget); - stackedWidget->addWidget(mTransformsWidget); - stackedWidget->addWidget(mSelectionOptionsWidget); - -} - -QDoubleSpinBox *BasicsMode::createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col) -{ - // label = new QLabel(this);(s); - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox; - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -void BasicsMode::setupInsertEdge() -{ - mInsertEdgeLayout = new QGridLayout; - // mInsertEdgeLayout->setMargin(0); - noOptionsInsertEdgeLabel = new QLabel(this); (tr("No Options for this tool.")); - mInsertEdgeLayout->addWidget(noOptionsInsertEdgeLabel, 0, 0); - - mInsertEdgeLayout->setRowStretch(4, 1); - mInsertEdgeLayout->setColumnStretch(2, 1); - mInsertEdgeWidget->setWindowTitle(tr("Insert Edge")); - mInsertEdgeWidget->setLayout(mInsertEdgeLayout); -} - -void BasicsMode::setupDeleteEdge() -{ - mDeleteEdgeLayout = new QGridLayout; - // mDeleteEdgeLayout->setMargin(0); - - //cleanup checkbox - cleanupDeleteEdgeCheckBox = new QCheckBox(tr("Cleanup"), this); - connect(cleanupDeleteEdgeCheckBox, SIGNAL(stateChanged(int)), - ((MainWindow*)mParent), SLOT(toggleDeleteEdgeCleanupFlag(int))); - mDeleteEdgeLayout->addWidget(cleanupDeleteEdgeCheckBox, 0, 0); - - mDeleteEdgeLayout->setRowStretch(1, 1); - mDeleteEdgeLayout->setColumnStretch(2, 1); - mDeleteEdgeWidget->setWindowTitle(tr("Delete Edge Mode")); - mDeleteEdgeWidget->setLayout(mDeleteEdgeLayout); -} - -void BasicsMode::setupCollapseEdge() -{ - mCollapseEdgeLayout = new QGridLayout; - // mCollapseEdgeLayout->setMargin(0); - noOptionsCollapseEdgeLabel = new QLabel(tr("No Options for this tool."), this); - mCollapseEdgeLayout->addWidget(noOptionsCollapseEdgeLabel, 0, 0); - - mCollapseEdgeLayout->setRowStretch(4, 1); - mCollapseEdgeLayout->setColumnStretch(2, 1); - mCollapseEdgeWidget->setWindowTitle(tr("Collapse Edge")); - mCollapseEdgeWidget->setLayout(mCollapseEdgeLayout); -} - -void BasicsMode::setupSubdivideEdge() -{ - mSubdivideEdgeLayout = new QGridLayout; - // mSubdivideEdgeLayout->setMargin(0); - - //number of subdivisions spinbox - numSubdivsLabel = new QLabel(this); - numSubdivsSpinBox = createDoubleSpinBox(mSubdivideEdgeLayout, numSubdivsLabel, tr("# Subdivisions"), 1, 10, 1, 1, 0, 0, 0); - connect(numSubdivsSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeNumSubDivs(double))); - - // mSubdivideEdgeLayout->addStretch(1); - mSubdivideEdgeLayout->setRowStretch(1, 1); - mSubdivideEdgeLayout->setColumnStretch(2, 1); - mSubdivideEdgeWidget->setWindowTitle(tr("Subdivide Edge Mode")); - mSubdivideEdgeWidget->setLayout(mSubdivideEdgeLayout); - -} - -void BasicsMode::setupConnectEdges() -{ - mConnectEdgesLayout = new QGridLayout; - noOptionsConnectEdgesLabel = new QLabel(tr("No Options for this tool."), this); - mConnectEdgesLayout->addWidget(noOptionsConnectEdgesLabel, 0, 0); - - mConnectEdgesLayout->setRowStretch(0, 1); - mConnectEdgesLayout->setColumnStretch(2, 1); - mConnectEdgesWidget->setWindowTitle(tr("Connect Edges")); - mConnectEdgesWidget->setLayout(mConnectEdgesLayout); - -} - -void BasicsMode::setupSpliceCorners() -{ - mSpliceCornersLayout = new QGridLayout; - // mSpliceCornersLayout->setMargin(0); - mSpliceCornersLayout->setRowStretch(4, 1); - mSpliceCornersLayout->setColumnStretch(2, 1); - - noOptionsSpliceCornersLabel = new QLabel(tr("No Options for this tool."), this); - mSpliceCornersLayout->addWidget(noOptionsSpliceCornersLabel, 0, 0); - - mSpliceCornersWidget->setWindowTitle(tr("Splice Corners")); - mSpliceCornersWidget->setLayout(mSpliceCornersLayout); - -} - -void BasicsMode::setupTransforms() -{ - mTransformsLayout = new QGridLayout; - mTransformsLayout->setVerticalSpacing(1); - mTransformsLayout->setHorizontalSpacing(1); - // mTransformsLayout->setMargin(0); - - // transformLabel = new QLabel(tr("Translate:")); - // mTransformsLayout->addWidget(transformLabel,0,0,1,2); - - xPosLabel = new QLabel(this); - xPosSpinBox = createDoubleSpinBox(mTransformsLayout, xPosLabel, tr("X-translate"), -100.0, 100.0, 0.5, 0.0, 3, 1, 0); - connect(xPosSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(translatex(double))); - - yPosLabel = new QLabel(this); - yPosSpinBox = createDoubleSpinBox(mTransformsLayout, yPosLabel, tr("Y-translate"), -100.0, 100.0, 0.5, 0.0, 3, 2, 0); - connect(yPosSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(translatey(double))); - - zPosLabel = new QLabel(this); - zPosSpinBox = createDoubleSpinBox(mTransformsLayout, zPosLabel, tr("Z-translate"), -100.0, 100.0, 0.5, 0.0, 3, 3, 0); - connect(zPosSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(translatez(double))); - - // scaleLabel = new QLabel(this);(tr("Scale:")); - // mTransformsLayout->addWidget(scaleLabel,4,0,1,2); - - //x scale - xScaleLabel = new QLabel(this); - xScaleSpinBox = createDoubleSpinBox(mTransformsLayout, xScaleLabel, tr("X-scale"), 0.1, 10.0, 0.1, 1.0, 3, 5, 0); - connect(xScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(scalex(double))); - - yScaleLabel = new QLabel(this); - yScaleSpinBox = createDoubleSpinBox(mTransformsLayout, yScaleLabel, tr("Y-scale"), 0.1, 10.0, 0.1, 1.0, 3, 6, 0); - connect(yScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(scaley(double))); - - zScaleLabel = new QLabel(this); - zScaleSpinBox = createDoubleSpinBox(mTransformsLayout, zScaleLabel, tr("Z-scale"), 0.1, 10.0, 0.1, 1.0, 3, 7, 0); - connect(zScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(scalez(double))); - - freezeTransformsButton = new QPushButton(tr("&Freeze Transforms")); - connect(freezeTransformsButton, SIGNAL(clicked()), this, SLOT(freezeTransforms())); - mTransformsLayout->addWidget(freezeTransformsButton, 8, 0, 1, 2); - - mTransformsLayout->setRowStretch(9, 1); - mTransformsLayout->setColumnStretch(2, 1); - mTransformsWidget->setWindowTitle(tr("Transforms Mode")); - mTransformsWidget->setLayout(mTransformsLayout); -} - -void BasicsMode::freezeTransforms() -{ - ((MainWindow*)mParent)->freezeTransforms(); - xPosSpinBox->setValue(0.0); - yPosSpinBox->setValue(0.0); - zPosSpinBox->setValue(0.0); - xScaleSpinBox->setValue(1.0); - yScaleSpinBox->setValue(1.0); - zScaleSpinBox->setValue(1.0); -} - -void BasicsMode::setupSelectionOptions() -{ - mSelectionOptionsLayout = new QGridLayout; - mSelectionOptionsLayout->setVerticalSpacing(1); - mSelectionOptionsLayout->setHorizontalSpacing(1); - - mFaceAreaToleranceLabel = new QLabel(this); - mFaceAreaToleranceSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, mFaceAreaToleranceLabel, tr("Face Area Sel.\nTolerance"), 0.0, 5.0, 0.001, 0.05, 3, 0, 0); - connect(mFaceAreaToleranceSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeFaceAreaTolerance(double))); - - mSplit2ValenceVertexOffsetLabel = new QLabel(this); - mSplit2ValenceVertexOffsetSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, mSplit2ValenceVertexOffsetLabel, tr("Valence-2 Split\nOffset"), -0.1, 5.0, 0.001, -0.1, 3, 1, 0); - connect(mSplit2ValenceVertexOffsetSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeValence2SplitOffset(double))); - - // yPosSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, yPosLabel, tr("Y-translate"), -100.0, 100.0, 0.5, 0.0, 1, 2,0); - // connect(yPosSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(translatey(double))); - // - // zPosSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, zPosLabel, tr("Z-translate"), -100.0, 100.0, 0.5, 0.0, 1, 3,0); - // connect(zPosSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(translatez(double))); - // - // // scaleLabel = new QLabel(this);(tr("Scale:")); - // // mSelectionOptionsLayout->addWidget(scaleLabel,4,0,1,2); - // - // //x scale - // xScaleSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, xScaleLabel, tr("X-scale"), 0.1, 10.0, 0.1, 1.0, 1, 5,0); - // connect(xScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(scalex(double))); - // - // yScaleSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, yScaleLabel, tr("Y-scale"), 0.1, 10.0, 0.1, 1.0, 1, 6,0); - // connect(yScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(scaley(double))); - // - // zScaleSpinBox = createDoubleSpinBox(mSelectionOptionsLayout, zScaleLabel, tr("Z-scale"), 0.1, 10.0, 0.1, 1.0, 1, 7,0); - // connect(zScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(scalez(double))); - // - // QPushButton *freezeTransformsButton = new QPushButton(tr("&Freeze Transforms")); - // connect(freezeTransformsButton, SIGNAL(clicked()), this, SLOT(freezeTransforms())); - // mSelectionOptionsLayout->addWidget(freezeTransformsButton,8,0,1,2); - - mSelectionOptionsLayout->setRowStretch(2, 1); - mSelectionOptionsLayout->setColumnStretch(2, 1); - mSelectionOptionsWidget->setWindowTitle(tr("Selection Options Mode")); - mSelectionOptionsWidget->setLayout(mSelectionOptionsLayout); -} - -void BasicsMode::retranslateUi() -{ - mInsertEdgeAction->setText(tr("Insert Edge")); - mInsertEdgeAction->setStatusTip(tr("Enter Insert Edge Mode")); - mInsertEdgeAction->setToolTip(tr("Insert Edge Mode")); - mDeleteEdgeAction->setText(tr("Delete Edge")); - mDeleteEdgeAction->setStatusTip(tr("Enter Delete Edge Mode")); - mDeleteEdgeAction->setToolTip(tr("Delete Edge Mode")); - mCollapseEdgeAction->setText(tr("Collapse Edge")); - mCollapseEdgeAction->setStatusTip(tr("Enter Collapse Edge Mode")); - mCollapseEdgeAction->setToolTip(tr("Collapse Edge Mode")); - mSubdivideEdgeAction->setText(tr("Subdivide Edge")); - mSubdivideEdgeAction->setStatusTip(tr("Enter Subdivide Edge Mode")); - mSubdivideEdgeAction->setToolTip(tr("Subdivide Edge Mode")); - mConnectEdgesAction->setText(tr("Connect Edges")); - mConnectEdgesAction->setStatusTip(tr("Enter Connect Edges Mode")); - mConnectEdgesAction->setToolTip(tr("Connect Edges Mode")); - mSpliceCornersAction->setText(tr("Splice Corners")); - mSpliceCornersAction->setStatusTip(tr("Enter Splice Corners Mode")); - mSpliceCornersAction->setToolTip(tr("Splice Corners Mode")); - mTransformsAction->setText(tr("Transforms")); - mTransformsAction->setStatusTip(tr("Enter Transforms Mode")); - mTransformsAction->setToolTip(tr("Transforms Mode")); - mSelectionOptionsAction->setText(tr("Selection Options")); - mSelectionOptionsAction->setStatusTip(tr("Enter Selection Options Mode")); - mSelectionOptionsAction->setToolTip(tr("Selection Options Mode")); - mBasicsMenu->setTitle(tr("Basics")); - - //mode spinbox labels etc... - noOptionsInsertEdgeLabel->setText(tr("No Options for this tool.")); - mInsertEdgeWidget->setWindowTitle(tr("Insert Edge")); - cleanupDeleteEdgeCheckBox->setText(tr("Cleanup")); - mDeleteEdgeWidget->setWindowTitle(tr("Delete Edge Mode")); - noOptionsCollapseEdgeLabel->setText(tr("No Options for this tool.")); - mCollapseEdgeWidget->setWindowTitle(tr("Collapse Edge")); - numSubdivsLabel->setText(tr("# Subdivisions")); - mSubdivideEdgeWidget->setWindowTitle(tr("Subdivide Edge Mode")); - noOptionsConnectEdgesLabel->setText(tr("No Options for this tool.")); - mConnectEdgesWidget->setWindowTitle(tr("Connect Edges")); - noOptionsSpliceCornersLabel->setText(tr("No Options for this tool.")); - mSpliceCornersWidget->setWindowTitle(tr("Splice Corners")); - xPosLabel->setText(tr("X-translate")); - yPosLabel->setText(tr("Y-translate")); - zPosLabel->setText(tr("Z-translate")); - xScaleLabel->setText(tr("X-scale")); - yScaleLabel->setText(tr("Y-scale")); - zScaleLabel->setText(tr("Z-scale")); - freezeTransformsButton->setText(tr("&Freeze Transforms")); - mTransformsWidget->setWindowTitle(tr("Transforms Mode")); - mFaceAreaToleranceLabel->setText(tr("Face Area Sel.\nTolerance")); - mSplit2ValenceVertexOffsetLabel->setText(tr("Valence-2 Split\nOffset")); -} diff --git a/topmodx/src/BasicsMode.h b/topmodx/src/BasicsMode.h deleted file mode 100644 index 4225466..0000000 --- a/topmodx/src/BasicsMode.h +++ /dev/null @@ -1,157 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef BASICSMODE_H -#define BASICSMODE_H - -#include -#include -#include - -/*! - \file BasicsMode.hh - \brief Definition of the BasicsMode class - - \see BasicsMode -*/ - -#include "MainWindow.h" - -class MainWindow; - -class QComboBox; -class QPushButton; -class QGroupBox; -class QCheckBox; -class QLabel; - -class BasicsMode : public QWidget { - Q_OBJECT - -public: - BasicsMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu* getMenu(); - void retranslateUi(); - - QAction *mInsertEdgeAction; - QAction *mDeleteEdgeAction; - QAction *mCollapseEdgeAction; - QAction *mSubdivideEdgeAction; - QAction *mConnectEdgesAction; - QAction *mSpliceCornersAction; - QAction *mTransformsAction; - QAction *mSelectionOptionsAction; - - QWidget *mInsertEdgeWidget; - QWidget *mDeleteEdgeWidget; - QWidget *mCollapseEdgeWidget; - QWidget *mSubdivideEdgeWidget; - QWidget *mConnectEdgesWidget; - QWidget *mSpliceCornersWidget; - QWidget *mTransformsWidget; - QWidget *mSelectionOptionsWidget; - - QGridLayout *mInsertEdgeLayout; - QGridLayout *mDeleteEdgeLayout; - QGridLayout *mCollapseEdgeLayout; - QGridLayout *mSubdivideEdgeLayout; - QGridLayout *mConnectEdgesLayout; - QGridLayout *mSpliceCornersLayout; - QGridLayout *mTransformsLayout; - QGridLayout *mSelectionOptionsLayout; - -protected: - void setupInsertEdge(); - void setupDeleteEdge(); - void setupCollapseEdge(); - void setupSubdivideEdge(); - void setupConnectEdges(); - void setupSpliceCorners(); - void setupTransforms(); - void setupSelectionOptions(); - QDoubleSpinBox *createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col); - - -private: - - QWidget *mParent; - QMenu *mBasicsMenu; - - QLabel *numSubdivsLabel; - QDoubleSpinBox *numSubdivsSpinBox; - QLabel *transformLabel; - QLabel *xPosLabel; - QLabel *yPosLabel; - QLabel *zPosLabel; - QLabel *scaleLabel; - QLabel *xScaleLabel; - QLabel *yScaleLabel; - QLabel *zScaleLabel; - - QLabel *noOptionsInsertEdgeLabel; - QCheckBox *cleanupDeleteEdgeCheckBox; - QLabel *noOptionsCollapseEdgeLabel; - QLabel *noOptionsConnectEdgesLabel; - QLabel *noOptionsSpliceCornersLabel; - - QPushButton *freezeTransformsButton; - - //transform spinboxes - QDoubleSpinBox *xScaleSpinBox; - QDoubleSpinBox *yScaleSpinBox; - QDoubleSpinBox *zScaleSpinBox; - QDoubleSpinBox *xPosSpinBox; - QDoubleSpinBox *yPosSpinBox; - QDoubleSpinBox *zPosSpinBox; - - QLabel *mFaceAreaToleranceLabel; - QDoubleSpinBox *mFaceAreaToleranceSpinBox; - - QLabel *mSplit2ValenceVertexOffsetLabel; - QDoubleSpinBox *mSplit2ValenceVertexOffsetSpinBox; - -public slots: - void freezeTransforms(); - - void triggerInsertEdge(); - void triggerDeleteEdge(); - void triggerCollapseEdge(); - void triggerSubdivideEdge(); - void triggerConnectEdges(); - void triggerSpliceCorners(); - void triggerTransforms(); - void triggerSelectionOptions(); -}; - -#endif diff --git a/topmodx/src/CgData.cc b/topmodx/src/CgData.cc deleted file mode 100644 index e9f1bf3..0000000 --- a/topmodx/src/CgData.cc +++ /dev/null @@ -1,121 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* -* - *----------------------------------------------------- - * File: $RCSfile: CgData.cc,v $ - * Date modified: $Date: 2007/02/13 19:37:54 $ - * Version: $Revision: 1.1 $ - *----------------------------------------------------- - * - * Copyright (C) 2007 Original Author(s) - * - * Original Author(s): - * Stuart T. Tett - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * -*/ - -#include "CgData.h" - -#ifdef GPU_OK - -namespace Cg -{ - -/*! -* \brief private Constructor -*/ -CgData::CgData() -{ -} - -CgData* CgData::mInstance = 0; //!< initialize the singleton pointer to 0 - -/*! -* \brief ensures only 1 instance (singleton) -*/ -CgData* CgData::instance() -{ - if (!mInstance) - mInstance = new CgData; - return mInstance; -} - -void checkCgError(CGcontext &context, int id) -{ - CGerror err = cgGetError(); - if (err != CG_NO_ERROR) - { - printf("CG error %d: %s\n", id, cgGetErrorString(err)); - if (context) - { - printf("%s\n", cgGetLastListing(context)); - } - } -}; - -void checkForCgError(const char *situation) -{ - CGerror error; - const char *string = cgGetLastErrorString(&error); - - if (error != CG_NO_ERROR) - { - printf("%s: %s\n", situation, string); - if (error == CG_COMPILER_ERROR) - { - printf("%s\n", cgGetLastListing(CgData::instance()->context)); - } - // exit(1); - } -} - - -} // end namespace Cg - -#endif // GPU_OK diff --git a/topmodx/src/CgData.h b/topmodx/src/CgData.h deleted file mode 100644 index 2981e50..0000000 --- a/topmodx/src/CgData.h +++ /dev/null @@ -1,143 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/** - * - *----------------------------------------------------- - * File: $RCSfile: CgData.hh,v $ - * Date modified: $Date: 2007/02/13 19:37:54 $ - * Version: $Revision: 1.1 $ - *----------------------------------------------------- - * - * Copyright (C) 2007 Original Author(s) - * - * Original Author(s): - * Stuart T. Tett - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef _CG_DATA_H -#define _CG_DATA_H - -#ifdef GPU_OK - -#include -#include -#include - -/*! -* \file CgData.hh -* \brief singleton class for Cg GPU Shading -* -*/ - -namespace Cg { - -class CgData { -public : - /** Singleton Methods **/ - static CgData* instance(); - ~CgData() {}; - - CGcontext context; - CGprogram vertProgram, fragProgram; - CGprofile vertProfile, fragProfile; - - CGparameter camToWorld, worldToLight, camToWorldIT; - - // CGparameter texture, shadowMap; - // CGparameter renderToTexSize; - // CGparameter objectID; - CGparameter attenDegrees; - - //from book - CGparameter globalAmbient; - - //lighting - CGparameter lightWarmColor; - CGparameter lightCoolColor; - CGparameter lightIntensity; - CGparameter lightPosition; - - CGparameter eyePosition; - CGparameter Ka, Kd, Ks, shininess, basecolor; - -private: - static CgData *mInstance; - CgData(); - -}; - -void checkCgError(CGcontext &context, int id); -void checkForCgError(const char *situation); - -} // end namespace Cg - - -//old implementation as a struct -// namespace Cg { -// -// struct CgData { -// CGcontext context; -// CGprogram vertProgram, fragProgram; -// CGprofile vertProfile, fragProfile; -// -// CGparameter camToWorld, worldToLight, camToWorldIT; -// -// CGparameter texture, shadowMap; -// CGparameter renderToTexSize; -// CGparameter objectID; -// CGparameter attenDegrees; -// //from book -// CGparameter globalAmbient; -// CGparameter lightColor; -// CGparameter lightPosition; -// CGparameter eyePosition; -// CGparameter Ke, Ka, Kd, Ks, shininess; -// }; -// -// void checkCgError( CGcontext &context, int id ); -// -// } // end namespace Cg - -#endif // GPU_OK -#endif // _CG_DATA_H diff --git a/topmodx/src/CommandCompleter.cc b/topmodx/src/CommandCompleter.cc deleted file mode 100644 index fffd7ae..0000000 --- a/topmodx/src/CommandCompleter.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#ifdef QCOMPLETER - -#include "CommandCompleter.h" -#include -#include - -/*! -* \brief Constructor -* -* @param m the actionList passed from the MainWindow class after each Mode class is instantiated -* @param parent the MainWindow parent widget -* @param f window flags for the QDialog constructor -* -*/ -CommandCompleter::CommandCompleter(QWidget *m, QWidget * parent, Qt::WindowFlags f) - : QDialog(parent, f) -{ - setSizeGripEnabled(false); - -#ifdef LINUX - setWindowFlags(Qt::Dialog); -#else - setWindowFlags(Qt::SplashScreen); -#endif - setModal(true); - //setWindowOpacity(1.0); - this->resize(341, 134); - - //this->setWindowFlags(Qt::FramelessWindowHint); - //this->setAttribute(Qt::WA_NoSystemBackground); - - // QStyle* plastiqueStyle = new QPlastiqueStyle; - mQuickCommandLabel = new QLabel(tr("Type a command:")); - - //this->setAutoFillBackground(true); - // this->setStyle(plastiqueStyle); - QPalette p = this->palette(); - //QBrush b(QImage(QString(":/images/commandcompleter.png"))); - //p.setColor(QPalette::Window, QColor(0,0,0,0)); - p.setBrush(QPalette::Window, QPixmap(QString(":images/commandcompleter.png"))); - //this->setBackgroundMode( Qt::NoBackground ); - this->setPalette(p); - - QPixmap pixmap(":/images/commandcompleter.png"); - //this->setPixmap(pixmap); - this->setMask(pixmap.mask()); - - mLineEdit = new QLineEdit(this); - mCompleter = new QCompleter(this); - - mCompleter->setCaseSensitivity(Qt::CaseInsensitive); - mCompleter->setCompletionMode(QCompleter::PopupCompletion); - //loop through the actions added to the widget *m, add the text to a word list for now - for (int i = 0; i < m->actions().count(); ++i) - mWordList << ((QAction*)(m->actions().at(i)))->toolTip(); - - mModel = new QStringListModel(mWordList, mCompleter); - mCompleter->setModel(mModel); - mLineEdit->setCompleter(mCompleter); - - mLineEdit->setFocusPolicy(Qt::StrongFocus); - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setContentsMargins(60, 40, 60, 50); - vbox->addWidget(mQuickCommandLabel); - vbox->addWidget(mLineEdit); - - // QShortcut *shortcut = new QShortcut(QKeySequence(tr("Enter")),this); - connect(mLineEdit, SIGNAL(editingFinished()), this, SLOT(accept())); -} - -#endif \ No newline at end of file diff --git a/topmodx/src/CommandCompleter.h b/topmodx/src/CommandCompleter.h deleted file mode 100644 index e8fced0..0000000 --- a/topmodx/src/CommandCompleter.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifdef QCOMPLETER - -#ifndef _COMMANDCOMPLETER_HH_ -#define _COMMANDCOMPLETER_HH_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*! -* \file CommandCompleter.hh -* \class CommandCompleter -* -* \brief Quicksilver-like popup commandline interface -* -* CommandCompleter provides a popup Quicksilver-like command line interface for accessing -* all the functionality of TopMod with keyboard input instead of mouse clicks. -* -*/ - -class CommandCompleter : public QDialog -{ - Q_OBJECT - -public: - CommandCompleter(QWidget *m, QWidget * parent = 0, Qt::WindowFlags f = 0); - -public slots: - /*! - * \brief causes the CommandCompleter dialog to popup and sets the focus to the text input box - * - * this dialog for now is modal, meaning no other windows will accept focus while this window is displayed. - * the user can hit escape to hide the window if they do not want to input anything, or simply hit enter. - * - */ - int exec() - { - mLineEdit->clear(); - if (QDialog::exec() == QDialog::Accepted) - return mWordList.indexOf(mLineEdit->text()); - // else hide(); - return -2; - } - -private: - QLineEdit *mLineEdit; //!< single line input widget - QStringList mWordList; //!< array of strings to feed to the AutoCompleter class - QCompleter *mCompleter; //!< the autoCompletion widget - QLabel *mQuickCommandLabel; //!< short instructions displayed in the popup window - QStringListModel *mModel; //!< the completion model for the AutoCompleter widget - -}; - -#endif -#endif //QCOMPLETER \ No newline at end of file diff --git a/topmodx/src/ConicalMode.cc b/topmodx/src/ConicalMode.cc deleted file mode 100644 index ee91239..0000000 --- a/topmodx/src/ConicalMode.cc +++ /dev/null @@ -1,704 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ -#include - -#include "ConicalMode.h" - -/*! - \ingroup gui - @{ - - \class ConicalMode - \brief Conical Operations GUI elements. - - \note - - \see ConicalMode -*/ - -ConicalMode::ConicalMode(QWidget *parent, QShortcutManager *sm) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - //create the stacked widget and all child widget pages - mCutbyEdgeWidget = new QWidget; - mCutbyVertexWidget = new QWidget; - // mCutbyEdgeVertexWidget = new QWidget; - mCutbyFaceWidget = new QWidget; - // mTruncateEdgeWidget = new QWidget; - // mTruncateVertexWidget = new QWidget; - mDualConvexHullWidget = new QWidget; - - setupCutbyEdge(); - setupCutbyVertex(); - // setupCutbyEdgeVertex(); - setupCutbyFace(); - // setupTruncateEdge(); - // setupTruncateVertex(); - setupDualConvexHull(); - - mCutbyEdgeAction = new QAction(QIcon(":images/sculpting-cutedges.png"), tr("Cut by Edge"), this); - mCutbyEdgeAction->setCheckable(true); - sm->registerAction(mCutbyEdgeAction, "Conical Operations", ""); - mCutbyEdgeAction->setStatusTip(tr("Enter Cut by Edge Mode")); - mCutbyEdgeAction->setToolTip(tr("Cut by Edge Mode")); - connect(mCutbyEdgeAction, SIGNAL(triggered()), this, SLOT(triggerCutbyEdge())); - - mCutbyVertexAction = new QAction(QIcon(":images/sculpting-cutvertices.png"), tr("Cut by Vertex"), this); - mCutbyVertexAction->setCheckable(true); - sm->registerAction(mCutbyVertexAction, "Conical Operations", ""); - mCutbyVertexAction->setStatusTip(tr("Enter Cut by Vertex Mode")); - mCutbyVertexAction->setToolTip(tr("Cut by Vertex Mode")); - connect(mCutbyVertexAction, SIGNAL(triggered()), this, SLOT(triggerCutbyVertex())); - - // mCutbyEdgeVertexAction = new QAction(QIcon(":images/prim_cube.png"),tr("Cut by Edge-Vertex"),this); - // mCutbyEdgeVertexAction->setCheckable(true); - // sm->registerAction(mCutbyEdgeVertexAction, "Conical Operations", ""); - // mCutbyEdgeVertexAction->setStatusTip(tr("Enter Cut by Edge-Vertex Mode")); - // mCutbyEdgeVertexAction->setToolTip(tr("Cut by EdgeVertex Mode")); - // connect(mCutbyEdgeVertexAction, SIGNAL(triggered()), this, SLOT(triggerCutbyEdgeVertex())); - - mCutbyFaceAction = new QAction(QIcon(":images/sculpting-cutfaces.png"), tr("Cut by Face"), this); - mCutbyFaceAction->setCheckable(true); - sm->registerAction(mCutbyFaceAction, "Conical Operations", ""); - mCutbyFaceAction->setStatusTip(tr("Enter Cut by Face Mode")); - mCutbyFaceAction->setToolTip(tr("Cut by Face Mode")); - connect(mCutbyFaceAction, SIGNAL(triggered()), this, SLOT(triggerCutbyFace())); - - // mTruncateEdgeAction = new QAction(QIcon(":images/prim_cube.png"),tr("Truncate Edge"),this); - // mTruncateEdgeAction->setCheckable(true); - // sm->registerAction(mTruncateEdgeAction, "Conical Operations", ""); - // mTruncateEdgeAction->setStatusTip(tr("Enter Truncate Edge Mode")); - // mTruncateEdgeAction->setToolTip(tr("Truncate Edge Mode")); - // connect(mTruncateEdgeAction, SIGNAL(triggered()), this, SLOT(triggerTruncateEdge())); - // - // mTruncateVertexAction = new QAction(QIcon(":images/prim_cube.png"),tr("Truncate Vertex"),this); - // mTruncateVertexAction->setCheckable(true); - // sm->registerAction(mTruncateVertexAction, "Conical Operations", ""); - // mTruncateVertexAction->setStatusTip(tr("Enter Truncate Vertex Mode")); - // mTruncateVertexAction->setToolTip(tr("Truncate Vertex Mode")); - // connect(mTruncateVertexAction, SIGNAL(triggered()), this, SLOT(triggerTruncateVertex())); - // - mDualConvexHullAction = new QAction(QIcon(":images/prim_cube.png"), tr("Dual Convex Hull"), this); - mDualConvexHullAction->setCheckable(true); - sm->registerAction(mDualConvexHullAction, "Conical Operations", ""); - mDualConvexHullAction->setStatusTip(tr("Enter Dual Convex Hull Mode")); - mDualConvexHullAction->setToolTip(tr("Dual Convex Hull Mode")); - connect(mDualConvexHullAction, SIGNAL(triggered()), this, SLOT(triggerDualConvexHull())); - -} - -QMenu *ConicalMode::getMenu() -{ - mConicalMenu = new QMenu(tr("Conical")); - - mConicalMenu->addAction(mCutbyEdgeAction); - mConicalMenu->addAction(mCutbyVertexAction); - // mConicalMenu->addAction(mCutbyEdgeVertexAction); - mConicalMenu->addAction(mCutbyFaceAction); - // mConicalMenu->addAction(mTruncateEdgeAction); - // mConicalMenu->addAction(mTruncateVertexAction); - mConicalMenu->addAction(mDualConvexHullAction); - - return mConicalMenu; -} - -QDoubleSpinBox *ConicalMode::createDoubleSpinBox( - QGridLayout *layout, QLabel *label, QString s, - double low, double high, double step, double value, double decimals, - int row, int col) -{ - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox(this); - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -void ConicalMode::triggerCutbyEdge() -{ - ((MainWindow*)mParent)->setToolOptions(mCutbyEdgeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::CutEdge); -} - -void ConicalMode::triggerCutbyVertex() -{ - ((MainWindow*)mParent)->setToolOptions(mCutbyVertexWidget); - ((MainWindow*)mParent)->setMode(MainWindow::CutVertex); -} - -void ConicalMode::triggerCutbyEdgeVertex() -{ - ((MainWindow*)mParent)->setToolOptions(mCutbyEdgeVertexWidget); - ((MainWindow*)mParent)->setMode(MainWindow::CutEdgeandVertex); -} - -void ConicalMode::triggerCutbyFace() -{ - ((MainWindow*)mParent)->setToolOptions(mCutbyFaceWidget); - ((MainWindow*)mParent)->setMode(MainWindow::CutFace); -} - -void ConicalMode::triggerTruncateEdge() -{ - ((MainWindow*)mParent)->setToolOptions(mTruncateEdgeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::TruncateEdge); -} - -void ConicalMode::triggerTruncateVertex() -{ - ((MainWindow*)mParent)->setToolOptions(mTruncateVertexWidget); - ((MainWindow*)mParent)->setMode(MainWindow::MarkVertex); -} - -void ConicalMode::triggerDualConvexHull() -{ - ((MainWindow*)mParent)->setToolOptions(mDualConvexHullWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ConvexHullMode); -} - -void ConicalMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mCutbyEdgeAction); - actionGroup->addAction(mCutbyVertexAction); - // actionGroup->addAction(mCutbyEdgeVertexAction); - actionGroup->addAction(mCutbyFaceAction); - // actionGroup->addAction(mTruncateEdgeAction); - // actionGroup->addAction(mTruncateVertexAction); - actionGroup->addAction(mDualConvexHullAction); - - toolBar->addAction(mCutbyEdgeAction); - toolBar->addAction(mCutbyVertexAction); - // toolBar->addAction(mCutbyEdgeVertexAction); - toolBar->addAction(mCutbyFaceAction); - // toolBar->addAction(mTruncateEdgeAction); - // toolBar->addAction(mTruncateVertexAction); - toolBar->addAction(mDualConvexHullAction); - - stackedWidget->addWidget(mCutbyEdgeWidget); - stackedWidget->addWidget(mCutbyVertexWidget); - // stackedWidget->addWidget(mCutbyEdgeVertexWidget); - stackedWidget->addWidget(mCutbyFaceWidget); - // stackedWidget->addWidget(mTruncateEdgeWidget); - // stackedWidget->addWidget(mTruncateVertexWidget); - stackedWidget->addWidget(mDualConvexHullWidget); -} - -void ConicalMode::changeCutOffsetE(double value) -{ - cutbyEdgeOffsetSpinBox->setValue(value); - cutbyFaceOffsetSpinBox->setValue(value); - // truncateEdgeOffsetSpinBox->setValue(value); - // truncateVertexOffsetSpinBox->setValue(value); - // cutbyEdgeVertexOffsetESpinBox->setValue(value); - // cutbyFaceOffsetSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeCutOffsetE(value); -} - -void ConicalMode::changeCutOffsetV(double value) -{ - cutbyVertexOffsetSpinBox->setValue(value); - // cutbyEdgeVertexOffsetVSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeCutOffsetV(value); -} - -void ConicalMode::toggleGlobalCut(int state) -{ - cutbyEdgeGlobalCheckBox->setChecked(state); - cutbyVertexGlobalCheckBox->setChecked(state); - // truncateVertexGlobalCheckBox->setChecked(state); - // cutbyEdgeVertexGlobalCheckBox->setChecked(state); - cutbyFaceGlobalCheckBox->setChecked(state); - // truncateEdgeGlobalCheckBox->setChecked(state); - // - ((MainWindow*)mParent)->toggleGlobalCut(state); -} - -void ConicalMode::toggleSelectedCut(int state) -{ - // cutbyEdgeCutSelectedCheckBox->setChecked(state); - // cutbyVertexCutSelectedCheckBox->setChecked(state); - // truncateVertexCutSelectedCheckBox->setChecked(state); - // cutbyEdgeVertexCutSelectedCheckBox->setChecked(state); - // cutbyFaceCutSelectedCheckBox->setChecked(state); - // truncateEdgeCutSelectedCheckBox->setChecked(state); - // - // ((MainWindow*)mParent)->toggleSelectedCut(state); -} - -void ConicalMode::changeTiltPlane1(double value) -{ - // cutbyEdgeTiltPlane1SpinBox->setValue(value); - // cutbyEdgeVertexTiltPlane1SpinBox->setValue(value); - // - // ((MainWindow*)mParent)->changeTiltPlane1(value); -} - -void ConicalMode::changeTiltPlane2(double value) -{ - // cutbyEdgeTiltPlane2SpinBox->setValue(value); - // cutbyEdgeVertexTiltPlane2SpinBox->setValue(value); - // - // ((MainWindow*)mParent)->changeCutOffsetE(value); -} - -void ConicalMode::setupCutbyEdge() -{ - mCutbyEdgeLayout = new QGridLayout; - mCutbyEdgeLayout->setVerticalSpacing(1); - mCutbyEdgeLayout->setHorizontalSpacing(1); - - //offset - cutbyEdgeOffsetLabel = new QLabel(this); - cutbyEdgeOffsetSpinBox = createDoubleSpinBox(mCutbyEdgeLayout, cutbyEdgeOffsetLabel, tr("Offset:"), 0.0, 2.0, 0.01, 0.25, 3, 0, 0); - connect(cutbyEdgeOffsetSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeCutOffsetE(double))); - - cutbyEdgeGlobalCheckBox = new QCheckBox(tr("Global Cut"), this); - cutbyEdgeGlobalCheckBox->setChecked(Qt::Unchecked); - connect(cutbyEdgeGlobalCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleGlobalCut(int))); - mCutbyEdgeLayout->addWidget(cutbyEdgeGlobalCheckBox, 1, 0, 1, 2); - - performCuttingEdgeButton = new QPushButton(tr("Perform Cutting"), this); - connect(performCuttingEdgeButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performCutting())); - mCutbyEdgeLayout->addWidget(performCuttingEdgeButton, 2, 0, 1, 2); - - - mCutbyEdgeLayout->setRowStretch(3, 1); - mCutbyEdgeLayout->setColumnStretch(2, 1); - mCutbyEdgeWidget->setWindowTitle(tr("Cut By Edge")); - mCutbyEdgeWidget->setLayout(mCutbyEdgeLayout); - - // QLabel *cutbyEdgeTiltPlane1Label = new QLabel(tr("Tilt plane:")); - // cutbyEdgeTiltPlane1SpinBox = new QDoubleSpinBox; - // cutbyEdgeTiltPlane1SpinBox->setRange(-1, 1); - // cutbyEdgeTiltPlane1SpinBox->setSingleStep(.01); - // cutbyEdgeTiltPlane1SpinBox->setValue(0); - // cutbyEdgeTiltPlane1SpinBox->setMaximumSize(75,25); - // connect(cutbyEdgeTiltPlane1SpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeTiltPlane1(double))); - // - // mCutbyEdgeLayout->addWidget(cutbyEdgeTiltPlane1Label); - // mCutbyEdgeLayout->addWidget(cutbyEdgeTiltPlane1SpinBox); - // - // QLabel *cutbyEdgeTiltPlane2Label = new QLabel(tr("Tilt plane:")); - // cutbyEdgeTiltPlane2SpinBox = new QDoubleSpinBox; - // cutbyEdgeTiltPlane2SpinBox->setRange(-1, 1); - // cutbyEdgeTiltPlane2SpinBox->setSingleStep(.01); - // cutbyEdgeTiltPlane2SpinBox->setValue(0); - // cutbyEdgeTiltPlane2SpinBox->setMaximumSize(75,25); - // connect(cutbyEdgeTiltPlane2SpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeTiltPlane2(double))); - // - // mCutbyEdgeLayout->addWidget(cutbyEdgeTiltPlane2Label); - // mCutbyEdgeLayout->addWidget(cutbyEdgeTiltPlane2SpinBox); - // - // - // cutbyEdgeCutSelectedCheckBox = new QCheckBox(tr("cut selected edges"),this); - // cutbyEdgeCutSelectedCheckBox->setChecked(Qt::Checked); - // connect(cutbyEdgeCutSelectedCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleSelectedCut(int))); - // - // mCutbyEdgeLayout->addWidget(cutbyEdgeCutSelectedCheckBox); - // - // QPushButton *performCuttingButton = new QPushButton(tr("Perform Cutting"), this); - // connect(performCuttingButton, SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(performCutting())); - // - // mCutbyEdgeLayout->addWidget(performCuttingButton); - // mCutbyEdgeLayout->addStretch(1); - // mCutbyEdgeWidget->setWindowTitle("Cut by Edge"); - // mCutbyEdgeWidget->setLayout(mCutbyEdgeLayout); -} - -void ConicalMode::setupCutbyVertex() -{ - mCutbyVertexLayout = new QGridLayout; - mCutbyVertexLayout->setVerticalSpacing(1); - mCutbyVertexLayout->setHorizontalSpacing(1); - - //offset - cutbyVertexOffsetLabel = new QLabel(this); - cutbyVertexOffsetSpinBox = createDoubleSpinBox(mCutbyVertexLayout, cutbyVertexOffsetLabel, tr("Offset:"), 0.0, 2.0, 0.01, 0.25, 3, 0, 0); - connect(cutbyVertexOffsetSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeCutOffsetV(double))); - - cutbyVertexGlobalCheckBox = new QCheckBox(tr("Global Cut"), this); - cutbyVertexGlobalCheckBox->setChecked(Qt::Unchecked); - connect(cutbyVertexGlobalCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleGlobalCut(int))); - mCutbyVertexLayout->addWidget(cutbyVertexGlobalCheckBox, 1, 0, 1, 2); - - performCuttingVertexButton = new QPushButton(tr("Perform Cutting"), this); - connect(performCuttingVertexButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performCutting())); - mCutbyVertexLayout->addWidget(performCuttingVertexButton, 2, 0, 1, 2); - - mCutbyVertexLayout->setRowStretch(3, 1); - mCutbyVertexLayout->setColumnStretch(2, 1); - mCutbyVertexWidget->setWindowTitle(tr("Cut By Vertex")); - mCutbyVertexWidget->setLayout(mCutbyVertexLayout); - - // mCutbyVertexLayout = new QBoxLayout(QBoxLayout::LeftToRight); - // mCutbyVertexLayout->setMargin(0); - - // QLabel *cutbyVertexOffsetLabel = new QLabel(tr("Offset:")); - // cutbyVertexOffsetSpinBox = new QDoubleSpinBox; - // cutbyVertexOffsetSpinBox->setRange(0, 1); - // cutbyVertexOffsetSpinBox->setSingleStep(0.01); - // cutbyVertexOffsetSpinBox->setValue(0.25); - // cutbyVertexOffsetSpinBox->setMaximumSize(75,25); - // connect(cutbyVertexOffsetSpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeCutOffsetV(double))); - // - // mCutbyVertexLayout->addWidget(cutbyVertexOffsetLabel); - // mCutbyVertexLayout->addWidget(cutbyVertexOffsetSpinBox); - // - // cutbyVertexGlobalCheckBox = new QCheckBox(tr("global cut"),this); - // cutbyVertexGlobalCheckBox->setChecked(Qt::Unchecked); - // connect(cutbyVertexGlobalCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleGlobalCut(int))); - // - // mCutbyVertexLayout->addWidget(cutbyVertexGlobalCheckBox); - // - // cutbyVertexCutSelectedCheckBox = new QCheckBox(tr("cut selected edges"),this); - // cutbyVertexCutSelectedCheckBox->setChecked(Qt::Checked); - // connect(cutbyVertexCutSelectedCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleSelectedCut(int))); - // - // mCutbyVertexLayout->addWidget(cutbyVertexCutSelectedCheckBox); - // - // QPushButton *performCuttingButton = new QPushButton(tr("Perform Cutting"), this); - // connect(performCuttingButton, SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(performCutting())); - // - // mCutbyVertexLayout->addWidget(performCuttingButton); - // mCutbyVertexLayout->addStretch(1); - // mCutbyVertexWidget->setWindowTitle("Cut by Vertex"); - // mCutbyVertexWidget->setLayout(mCutbyVertexLayout); -} - -void ConicalMode::setupCutbyEdgeVertex() -{ - // mCutbyEdgeVertexLayout = new QBoxLayout(QBoxLayout::LeftToRight); - // mCutbyEdgeVertexLayout->setMargin(0); - // - // QLabel *cutbyEdgeVertexOffsetELabel = new QLabel(tr("Offset (Edge):")); - // cutbyEdgeVertexOffsetESpinBox = new QDoubleSpinBox; - // cutbyEdgeVertexOffsetESpinBox->setRange(0, 1); - // cutbyEdgeVertexOffsetESpinBox->setSingleStep(0.01); - // cutbyEdgeVertexOffsetESpinBox->setValue(0.25); - // cutbyEdgeVertexOffsetESpinBox->setMaximumSize(65,25); - // connect(cutbyEdgeVertexOffsetESpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeCutOffsetE(double))); - // - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexOffsetELabel); - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexOffsetESpinBox); - // - // QLabel *cutbyEdgeVertexOffsetVLabel = new QLabel(tr("Offset (Vertex):")); - // cutbyEdgeVertexOffsetVSpinBox = new QDoubleSpinBox; - // cutbyEdgeVertexOffsetVSpinBox->setRange(0, 1); - // cutbyEdgeVertexOffsetVSpinBox->setSingleStep(0.01); - // cutbyEdgeVertexOffsetVSpinBox->setValue(0.25); - // cutbyEdgeVertexOffsetVSpinBox->setMaximumSize(65,25); - // connect(cutbyEdgeVertexOffsetVSpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeCutOffsetV(double))); - // - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexOffsetVLabel); - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexOffsetVSpinBox); - // - // QLabel *cutbyEdgeVertexTiltPlane1Label = new QLabel(tr("Tilt plane:")); - // cutbyEdgeVertexTiltPlane1SpinBox = new QDoubleSpinBox; - // cutbyEdgeVertexTiltPlane1SpinBox->setRange(-1, 1); - // cutbyEdgeVertexTiltPlane1SpinBox->setSingleStep(.01); - // cutbyEdgeVertexTiltPlane1SpinBox->setValue(0); - // cutbyEdgeVertexTiltPlane1SpinBox->setMaximumSize(65,25); - // connect(cutbyEdgeVertexTiltPlane1SpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeTiltPlane1(double))); - // - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexTiltPlane1Label); - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexTiltPlane1SpinBox); - // - // QLabel *cutbyEdgeVertexTiltPlane2Label = new QLabel(tr("Tilt plane:")); - // cutbyEdgeVertexTiltPlane2SpinBox = new QDoubleSpinBox; - // cutbyEdgeVertexTiltPlane2SpinBox->setRange(-1, 1); - // cutbyEdgeVertexTiltPlane2SpinBox->setSingleStep(0.01); - // cutbyEdgeVertexTiltPlane2SpinBox->setValue(0); - // cutbyEdgeVertexTiltPlane2SpinBox->setMaximumSize(65,25); - // connect(cutbyEdgeVertexTiltPlane2SpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeTiltPlane2(double))); - // - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexTiltPlane2Label); - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexTiltPlane2SpinBox); - // - // cutbyEdgeVertexGlobalCheckBox = new QCheckBox(tr("global cut"),this); - // cutbyEdgeVertexGlobalCheckBox->setChecked(Qt::Unchecked); - // connect(cutbyEdgeVertexGlobalCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleGlobalCut(int))); - // - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexGlobalCheckBox); - // - // cutbyEdgeVertexCutSelectedCheckBox = new QCheckBox(tr("cut selected edges"),this); - // cutbyEdgeVertexCutSelectedCheckBox->setChecked(Qt::Checked); - // connect(cutbyEdgeVertexCutSelectedCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleSelectedCut(int))); - // - // mCutbyEdgeVertexLayout->addWidget(cutbyEdgeVertexCutSelectedCheckBox); - // - // QPushButton *performCuttingButton = new QPushButton(tr("Perform Cutting"), this); - // connect(performCuttingButton, SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(performCutting())); - // - // mCutbyEdgeVertexLayout->addWidget(performCuttingButton); - // mCutbyEdgeVertexLayout->addStretch(1); - // mCutbyEdgeVertexWidget->setWindowTitle("Cut by Edge/Vertex"); - // mCutbyEdgeVertexWidget->setLayout(mCutbyEdgeVertexLayout); -} - -void ConicalMode::setupCutbyFace() -{ - mCutbyFaceLayout = new QGridLayout; - mCutbyFaceLayout->setVerticalSpacing(1); - mCutbyFaceLayout->setHorizontalSpacing(1); - - //offset - cutbyFaceOffsetLabel = new QLabel(this); - cutbyFaceOffsetSpinBox = createDoubleSpinBox(mCutbyFaceLayout, cutbyFaceOffsetLabel, tr("Offset:"), 0.0, 2.0, 0.01, 0.25, 3, 0, 0); - connect(cutbyFaceOffsetSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeCutOffsetE(double))); - - cutbyFaceGlobalCheckBox = new QCheckBox(tr("Global Cut"), this); - cutbyFaceGlobalCheckBox->setChecked(Qt::Unchecked); - connect(cutbyFaceGlobalCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleGlobalCut(int))); - mCutbyFaceLayout->addWidget(cutbyFaceGlobalCheckBox, 1, 0, 1, 2); - - performCuttingFaceButton = new QPushButton(tr("Perform Cutting"), this); - connect(performCuttingFaceButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performCutting())); - mCutbyFaceLayout->addWidget(performCuttingFaceButton, 2, 0, 1, 2); - - mCutbyFaceLayout->setRowStretch(3, 1); - mCutbyFaceLayout->setColumnStretch(2, 1); - mCutbyFaceWidget->setWindowTitle(tr("Cut By Face")); - mCutbyFaceWidget->setLayout(mCutbyFaceLayout); - - // mCutbyFaceLayout = new QBoxLayout(QBoxLayout::LeftToRight); - // mCutbyFaceLayout->setMargin(0); - // - // QLabel *cutbyFaceOffsetLabel = new QLabel(tr("Offset:")); - // cutbyFaceOffsetSpinBox = new QDoubleSpinBox; - // cutbyFaceOffsetSpinBox->setRange(0, 1); - // cutbyFaceOffsetSpinBox->setSingleStep(0.01); - // cutbyFaceOffsetSpinBox->setValue(0.25); - // cutbyFaceOffsetSpinBox->setMaximumSize(75,25); - // connect(cutbyFaceOffsetSpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeCutOffsetE(double))); - // - // mCutbyFaceLayout->addWidget(cutbyFaceOffsetLabel); - // mCutbyFaceLayout->addWidget(cutbyFaceOffsetSpinBox); - // - // cutbyFaceGlobalCheckBox = new QCheckBox(tr("global cut"),this); - // cutbyFaceGlobalCheckBox->setChecked(Qt::Unchecked); - // connect(cutbyFaceGlobalCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleGlobalCut(int))); - // - // mCutbyFaceLayout->addWidget(cutbyFaceGlobalCheckBox); - // - // cutbyFaceCutSelectedCheckBox = new QCheckBox(tr("cut selected faces"),this); - // cutbyFaceCutSelectedCheckBox->setChecked(Qt::Checked); - // connect(cutbyFaceCutSelectedCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleSelectedCut(int))); - // - // mCutbyFaceLayout->addWidget(cutbyFaceCutSelectedCheckBox); - // - // QPushButton *performCuttingButton = new QPushButton(tr("Perform Cutting"), this); - // connect(performCuttingButton, SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(performCutting())); - // - // mCutbyFaceLayout->addWidget(performCuttingButton); - // mCutbyFaceLayout->addStretch(1); - // mCutbyFaceWidget->setWindowTitle("Cut by Face"); - // mCutbyFaceWidget->setLayout(mCutbyFaceLayout); - -} - -void ConicalMode::setupTruncateEdge() -{ - // mTruncateEdgeLayout = new QBoxLayout(QBoxLayout::LeftToRight); - // mTruncateEdgeLayout->setMargin(0); - // - // QLabel *truncateEdgeOffsetLabel = new QLabel(tr("Offset:")); - // truncateEdgeOffsetSpinBox = new QDoubleSpinBox; - // truncateEdgeOffsetSpinBox->setRange(0, 1); - // truncateEdgeOffsetSpinBox->setSingleStep(0.01); - // truncateEdgeOffsetSpinBox->setValue(0.25); - // truncateEdgeOffsetSpinBox->setMaximumSize(75,25); - // connect(truncateEdgeOffsetSpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeCutOffsetE(double))); - // - // mTruncateEdgeLayout->addWidget(truncateEdgeOffsetLabel); - // mTruncateEdgeLayout->addWidget(truncateEdgeOffsetSpinBox); - // - // truncateEdgeGlobalCheckBox = new QCheckBox(tr("global cut"),this); - // truncateEdgeGlobalCheckBox->setChecked(Qt::Unchecked); - // connect(truncateEdgeGlobalCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleGlobalCut(int))); - // - // mTruncateEdgeLayout->addWidget(truncateEdgeGlobalCheckBox); - // - // truncateEdgeCutSelectedCheckBox = new QCheckBox(tr("cut selected vertices"),this); - // truncateEdgeCutSelectedCheckBox->setChecked(Qt::Checked); - // connect(truncateEdgeCutSelectedCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleSelectedCut(int))); - // - // mTruncateEdgeLayout->addWidget(truncateEdgeCutSelectedCheckBox); - // - // QPushButton *performCuttingButton = new QPushButton(tr("Perform Cutting"), this); - // connect(performCuttingButton, SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(performCutting())); - // - // mTruncateEdgeLayout->addWidget(performCuttingButton); - // mTruncateEdgeLayout->addStretch(1); - // mTruncateEdgeWidget->setWindowTitle("Truncate Edge"); - // mTruncateEdgeWidget->setLayout(mTruncateEdgeLayout); - // -} - -void ConicalMode::setupTruncateVertex() -{ - // mTruncateVertexLayout = new QBoxLayout(QBoxLayout::LeftToRight); - // mTruncateVertexLayout->setMargin(0); - // - // QLabel *truncateVertexOffsetLabel = new QLabel(tr("Offset:")); - // truncateVertexOffsetSpinBox = new QDoubleSpinBox; - // truncateVertexOffsetSpinBox->setRange(0, 1); - // truncateVertexOffsetSpinBox->setSingleStep(0.01); - // truncateVertexOffsetSpinBox->setValue(0.25); - // truncateVertexOffsetSpinBox->setMaximumSize(75,25); - // connect(truncateVertexOffsetSpinBox, SIGNAL(valueChanged(double)), - // this, SLOT(changeCutOffsetE(double))); - // - // mTruncateVertexLayout->addWidget(truncateVertexOffsetLabel); - // mTruncateVertexLayout->addWidget(truncateVertexOffsetSpinBox); - // - // truncateVertexGlobalCheckBox = new QCheckBox(tr("global cut"),this); - // truncateVertexGlobalCheckBox->setChecked(Qt::Unchecked); - // connect(truncateVertexGlobalCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleGlobalCut(int))); - // - // mTruncateVertexLayout->addWidget(truncateVertexGlobalCheckBox); - // - // truncateVertexCutSelectedCheckBox = new QCheckBox(tr("cut selected vertices"),this); - // truncateVertexCutSelectedCheckBox->setChecked(Qt::Checked); - // connect(truncateVertexCutSelectedCheckBox, SIGNAL(stateChanged(int)), - // this, SLOT(toggleSelectedCut(int))); - // - // mTruncateVertexLayout->addWidget(truncateVertexCutSelectedCheckBox); - // - // QPushButton *performCuttingButton = new QPushButton(tr("Perform Cutting"), this); - // connect(performCuttingButton, SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(performCutting())); - // - // mTruncateVertexLayout->addWidget(performCuttingButton); - // mTruncateVertexLayout->addStretch(1); - // mTruncateVertexWidget->setWindowTitle("Truncate Vertex"); - // mTruncateVertexWidget->setLayout(mTruncateVertexLayout); - -} - -void ConicalMode::setupDualConvexHull() -{ - mDualConvexHullLayout = new QGridLayout; - mDualConvexHullLayout->setVerticalSpacing(1); - mDualConvexHullLayout->setHorizontalSpacing(1); - - convexHullButton = new QPushButton(tr("Create Convex Hull"), this); - connect(convexHullButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(createConvexHull())); - mDualConvexHullLayout->addWidget(convexHullButton, 0, 0, 1, 2); - - dualConvexHullButton = new QPushButton(tr("Create Dual Convex Hull"), this); - connect(dualConvexHullButton, SIGNAL(clicked()), - ((MainWindow*)mParent), SLOT(createDualConvexHull())); - mDualConvexHullLayout->addWidget(dualConvexHullButton, 1, 0, 1, 2); - - mDualConvexHullLayout->setRowStretch(2, 1); - mDualConvexHullLayout->setColumnStretch(2, 1); - mDualConvexHullWidget->setWindowTitle(tr("Convex Hull")); - mDualConvexHullWidget->setLayout(mDualConvexHullLayout); -} - -void ConicalMode::retranslateUi() -{ - cutbyFaceOffsetLabel->setText(tr("Offset:")); - performCuttingFaceButton->setText(tr("Perform Cutting")); - mCutbyFaceWidget->setWindowTitle(tr("Cut By Face")); - - cutbyVertexOffsetLabel->setText(tr("Offset:")); - performCuttingVertexButton->setText(tr("Perform Cutting")); - mCutbyVertexWidget->setWindowTitle(tr("Cut By Vertex")); - - cutbyEdgeOffsetLabel->setText(tr("Offset:")); - performCuttingEdgeButton->setText(tr("Perform Cutting")); - mCutbyEdgeWidget->setWindowTitle(tr("Cut By Edge")); - - mConicalMenu->setTitle(tr("Conical")); - - mCutbyEdgeAction->setText(tr("Cut by Edge")); - mCutbyEdgeAction->setStatusTip(tr("Enter Cut by Edge Mode")); - mCutbyEdgeAction->setToolTip(tr("Cut by Edge Mode")); - - mCutbyVertexAction->setText(tr("Cut by Vertex")); - mCutbyVertexAction->setStatusTip(tr("Enter Cut by Vertex Mode")); - mCutbyVertexAction->setToolTip(tr("Cut by Vertex Mode")); - - mCutbyFaceAction->setText(tr("Cut by Face")); - mCutbyFaceAction->setStatusTip(tr("Enter Cut by Face Mode")); - mCutbyFaceAction->setToolTip(tr("Cut by Face Mode")); - - mDualConvexHullWidget->setWindowTitle(tr("Convex Hull")); - convexHullButton->setText(tr("Create Convex Hull")); - dualConvexHullButton->setText(tr("Create Dual Convex Hull")); - mDualConvexHullAction->setText(tr("Dual Convex Hull")); - mDualConvexHullAction->setStatusTip(tr("Enter Dual Convex Hull Mode")); - mDualConvexHullAction->setToolTip(tr("Dual Convex Hull Mode")); -} \ No newline at end of file diff --git a/topmodx/src/ConicalMode.h b/topmodx/src/ConicalMode.h deleted file mode 100644 index c95ba5b..0000000 --- a/topmodx/src/ConicalMode.h +++ /dev/null @@ -1,149 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef CONICALMODE_H -#define CONICALMODE_H - -#include - -#include -#include -#include - -#include "MainWindow.h" - -class MainWindow; - -class ConicalMode : public QWidget -{ - Q_OBJECT - -public: - ConicalMode(QWidget *parent, QShortcutManager *sm); - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu *getMenu(); - void retranslateUi(); - - QDoubleSpinBox *createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col); - - QWidget *mCutbyEdgeWidget; - QWidget *mCutbyVertexWidget; - QWidget *mCutbyEdgeVertexWidget; - QWidget *mCutbyFaceWidget; - QWidget *mTruncateEdgeWidget; - QWidget *mTruncateVertexWidget; - QWidget *mDualConvexHullWidget; - - QAction *mCutbyEdgeAction; - QAction *mCutbyVertexAction; - QAction *mCutbyEdgeVertexAction; - QAction *mCutbyFaceAction; - QAction *mTruncateEdgeAction; - QAction *mTruncateVertexAction; - QAction *mDualConvexHullAction; - - QGridLayout *mCutbyEdgeLayout; - QGridLayout *mCutbyVertexLayout; - QGridLayout *mCutbyEdgeVertexLayout; - QGridLayout *mCutbyFaceLayout; - QGridLayout *mTruncateEdgeLayout; - QGridLayout *mTruncateVertexLayout; - QGridLayout *mDualConvexHullLayout; - -protected: - void setupCutbyEdge(); - void setupCutbyVertex(); - void setupCutbyEdgeVertex(); - void setupCutbyFace(); - void setupTruncateEdge(); - void setupTruncateVertex(); - void setupDualConvexHull(); - - public slots: - void changeCutOffsetE(double value); - void changeCutOffsetV(double value); - void toggleGlobalCut(int state); - void toggleSelectedCut(int state); - void changeTiltPlane1(double value); - void changeTiltPlane2(double value); - - void triggerCutbyEdge(); - void triggerCutbyVertex(); - void triggerCutbyEdgeVertex(); - void triggerCutbyFace(); - void triggerTruncateEdge(); - void triggerTruncateVertex(); - void triggerDualConvexHull(); - -private: - - QWidget *mParent; - QMenu *mConicalMenu; - - QDoubleSpinBox *cutbyEdgeOffsetSpinBox; - QDoubleSpinBox *cutbyEdgeTiltPlane1SpinBox; - QDoubleSpinBox *cutbyEdgeTiltPlane2SpinBox; - QDoubleSpinBox *cutbyVertexOffsetSpinBox; - QDoubleSpinBox *cutbyEdgeVertexOffsetESpinBox; - QDoubleSpinBox *cutbyEdgeVertexOffsetVSpinBox; - QDoubleSpinBox *cutbyEdgeVertexTiltPlane1SpinBox; - QDoubleSpinBox *cutbyEdgeVertexTiltPlane2SpinBox; - QDoubleSpinBox *cutbyFaceOffsetSpinBox; - QDoubleSpinBox *truncateEdgeOffsetSpinBox; - QDoubleSpinBox *truncateVertexOffsetSpinBox; - - QCheckBox *cutbyEdgeGlobalCheckBox; - QCheckBox *cutbyEdgeCutSelectedCheckBox; - QCheckBox *cutbyVertexGlobalCheckBox; - QCheckBox *cutbyVertexCutSelectedCheckBox; - QCheckBox *cutbyEdgeVertexGlobalCheckBox; - QCheckBox *cutbyEdgeVertexCutSelectedCheckBox; - QCheckBox *cutbyFaceGlobalCheckBox; - QCheckBox *cutbyFaceCutSelectedCheckBox; - QCheckBox *truncateEdgeGlobalCheckBox; - QCheckBox *truncateEdgeCutSelectedCheckBox; - QCheckBox *truncateVertexGlobalCheckBox; - QCheckBox *truncateVertexCutSelectedCheckBox; - - QLabel *cutbyEdgeOffsetLabel; - QLabel *cutbyVertexOffsetLabel; - QLabel *cutbyFaceOffsetLabel; - - QPushButton *performCuttingEdgeButton; - QPushButton *performCuttingFaceButton; - QPushButton *performCuttingVertexButton; - QPushButton *dualConvexHullButton; - QPushButton *convexHullButton; -}; - -#endif diff --git a/topmodx/src/DLFLLighting.cc b/topmodx/src/DLFLLighting.cc deleted file mode 100644 index 104748d..0000000 --- a/topmodx/src/DLFLLighting.cc +++ /dev/null @@ -1,139 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "DLFLLighting.h" - -void computeLighting(DLFLFacePtr fp, LightPtr lightptr, bool usegpu) -{ - if (fp->front()) - { - double Ka = fp->material()->Ka; - double Kd = fp->material()->Kd; - double Ks = fp->material()->Ks; - - RGBColor basecolor = fp->material()->color; - RGBColor fvcolor; - Vector3d normal, pos; - - DLFLFaceVertexPtr current = fp->front(); - normal = current->getNormal(); - pos = current->getVertexCoords(); - -#ifdef GPU_OK - if (usegpu) - { - fvcolor = RGBColor(0, 0, 0); - } - else - { - fvcolor = lightptr->illuminate(pos, normal)*Kd; - fvcolor += (1.0 - Kd)*basecolor; - } -#else - fvcolor = lightptr->illuminate(pos, normal)*Kd; - fvcolor += (1.0 - Kd)*basecolor; -#endif - current->color = fvcolor; - - current = current->next(); - while (current != fp->front()) - { - normal = current->getNormal(); - pos = current->getVertexCoords(); - -#ifdef GPU_OK - if (usegpu) - { - // cgSetParameter3f(CgData::instance()->Kd, basecolor.r, basecolor.g, basecolor.b); - fvcolor = RGBColor(0, 0, 0); -} - else - { - fvcolor = lightptr->illuminate(pos, normal)*Kd; - fvcolor += (1.0 - Kd)*basecolor; - } -#else - fvcolor = lightptr->illuminate(pos, normal)*Kd; - fvcolor += (1.0 - Kd)*basecolor; -#endif - current->color = fvcolor; - - // current->color = RGBColor(((double)rand() / ((double)(RAND_MAX)+(double)(1)) ), - // ((double)rand() / ((double)(RAND_MAX)+(double)(1)) ), - // ((double)rand() / ((double)(RAND_MAX)+(double)(1)) ) - // ); - current = current->next(); - } - } -} - -void computeLighting(DLFLObjectPtr obj, TMPatchObjectPtr po, LightPtr lightptr, bool usegpu) -{ - // std::cout<< "usegpu = " << usegpu << "\n"; - // int patchsize = (po)?po->list().size():0; - // - // QProgressDialog *progress = new QProgressDialog("Computing Lighting...", "Cancel", 0, obj->num_faces() + patchsize); - // progress->setMinimumDuration(4000); - // progress->setWindowModality(Qt::WindowModal); - // int progressvalue = 0; - - DLFLFacePtrList::iterator first, last; - DLFLFacePtr faceptr; - first = obj->beginFace(); last = obj->endFace(); - while (first != last) - { - // progress->setValue(progressvalue++); - // QApplication::processEvents(); - - faceptr = (*first); - computeLighting(faceptr, lightptr, usegpu); - ++first; - } - if (po) - { - TMPatchFacePtrList patch_list = po->list(); - TMPatchFacePtrList::iterator pfirst = patch_list.begin(), plast = patch_list.end(); - TMPatchFacePtr pfp = nullptr; - while (pfirst != plast) - { - // progress->setValue(progressvalue++); - // QApplication::processEvents(); - - pfp = (*pfirst); ++pfirst; - pfp->computeLighting(lightptr); - } - } - // progress->setValue(obj->num_faces() + patchsize); -} - - diff --git a/topmodx/src/DLFLLighting.h b/topmodx/src/DLFLLighting.h deleted file mode 100644 index 013614c..0000000 --- a/topmodx/src/DLFLLighting.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFL_LIGHTING_HH_ -#define _DLFL_LIGHTING_HH_ - -// Subroutines for lighting computations in DLFL - -#include "TMPatchObject.h" -#include - -#include -#include - -#include "CgData.h" - -#ifdef GPU_OK -using namespace Cg; -#endif // GPU_OK - -void computeLighting(DLFLFacePtr fp, LightPtr lightptr, bool usegpu = false); -void computeLighting(DLFLObjectPtr obj, TMPatchObjectPtr po, LightPtr lightptr, bool usegpu = false); - -#endif /* #ifndef _DLFL_LIGHTING_HH_ */ - diff --git a/topmodx/src/DLFLLocator.cc b/topmodx/src/DLFLLocator.cc deleted file mode 100644 index 4435fbe..0000000 --- a/topmodx/src/DLFLLocator.cc +++ /dev/null @@ -1,121 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -// brianb - -#include "DLFLLocator.h" - -uint DLFLLocator::suLastID = 0; - -void DLFLLocator::render(void) -{ - if (!vtx) - return; - - if (vtx) - coords = vtx->getCoords(); - - glDisable(GL_DEPTH_TEST); - glLineWidth(2.0); - - // Render X - if (renderSelection) - glLoadName(0); - if (getSelectedAxis() == 0) - glColor3f(1.0, 1.0, 0.0); - else - glColor3f(1.0, 0.0, 0.0); // X Axis - Red - glBegin(GL_LINES); - glVertex3f(coords[0], coords[1], coords[2]); glVertex3f(coords[0] + 2, coords[1], coords[2]); - glEnd(); - // glPushMatrix(); - // glTranslatef(coords[0]+2,coords[1],coords[2]); - // glRotatef(90,0.0,1.0,0.0); - // glutSolidCone(0.0625,0.125,100,1); - // glPopMatrix(); - - // Render Y - if (renderSelection) - glLoadName(1); - if (getSelectedAxis() == 1) - glColor3f(1.0, 1.0, 0.0); - else - glColor3f(0.0, 1.0, 0.0); // Y Axis - Green - glBegin(GL_LINES); - glVertex3f(coords[0], coords[1], coords[2]); glVertex3f(coords[0], coords[1] + 2, coords[2]); - glEnd(); - // glPushMatrix(); - // glTranslatef(coords[0],coords[1]+2,coords[2]); - // glRotatef(-90,1.0,0.0,0.0); - // glutSolidCone(0.0625,0.125,100,1); - // glPopMatrix(); - - // Render Z - if (renderSelection) - glLoadName(2); - if (getSelectedAxis() == 2) - glColor3f(1.0, 1.0, 0.0); - else - glColor3f(0.0, 0.0, 1.0); // Z Axis - Blue - glBegin(GL_LINES); - glVertex3f(coords[0], coords[1], coords[2]); glVertex3f(coords[0], coords[1], coords[2] + 2); - glEnd(); - // glPushMatrix(); - // glTranslatef(coords[0],coords[1],coords[2]+2); - // glutSolidCone(0.0625,0.125,100,1); - // glPopMatrix(); - - glLineWidth(1.0); - - // // Render cube - // if (renderSelection) - // glLoadName(3); - // if (getSelectedAxis() == 3) - // glColor3f(1.0,1.0,0.0); - // else - // glColor3f(0.5,0.5,0.5); // Cube - Grey - // glPushMatrix(); - // glTranslatef(coords[0],coords[1],coords[2]); - // glutWireCube(0.4); - // glPopMatrix(); - - // Render the vertex - glColor3f(1.0, 0.0, 1.0); - glPointSize(4.0); - glBegin(GL_POINTS); - // vtx->render(); - glEnd(); - - glEnable(GL_DEPTH_TEST); -} -// brianb \ No newline at end of file diff --git a/topmodx/src/DLFLLocator.h b/topmodx/src/DLFLLocator.h deleted file mode 100644 index 7d90b5f..0000000 --- a/topmodx/src/DLFLLocator.h +++ /dev/null @@ -1,234 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -// brianb - -#ifndef _DLFL_LOCATOR_HH_ - -#define _DLFL_LOCATOR_HH_ - -// Class to act as a handle/transformation handle for DLFL verticies - -#include -class DLFLLocator; // brianb -typedef DLFLLocator * DLFLLocatorPtr; // brianb -typedef vector DLFLLocatorArray; // brianb -typedef vector DLFLLocatorPtrArray; // brianb -void erase_dlp(DLFLLocatorPtr lp); // brianb -// static DLFLLocatorPtrArray lparray; // For selection (brianb) - -// void makeLocatorUnique(DLFLLocatorPtr dlp); - -#include -// #include "GLWidget.h" - -using namespace DLFL; - -class DLFLLocator -{ - - - - -public: - - // Default constructor - DLFLLocator() - : coords(), flags(0) - { - vtx = nullptr; - assignID(); - selectedAxis = -1; - renderSelection = false; - } - - // 1 argument constructor - DLFLLocator(const Vector3d& vec) - : coords(vec), flags(0) - { - vtx = nullptr; - assignID(); - selectedAxis = -1; - renderSelection = false; - } - - // 3 argument constructor - DLFLLocator(double x, double y, double z) - : coords(x, y, z), flags(0) - { - vtx = nullptr; - assignID(); - selectedAxis = -1; - renderSelection = false; - } - - // Copy constructor - DLFLLocator(const DLFLLocator& dl) - : vtx(dl.vtx), coords(dl.coords), flags(dl.flags), uID(dl.uID), selectedAxis(dl.selectedAxis), - renderSelection(dl.renderSelection) - { - } - - // Destructor - ~DLFLLocator() - { - } - - // Assignment operator - DLFLLocator& operator = (const DLFLLocator& dl) - { - vtx = dl.vtx; - coords = dl.coords; flags = dl.flags; - uID = dl.uID; - return (*this); - } - - DLFLLocatorPtr copy(void) const - { - DLFLLocatorPtr newdl = new DLFLLocator(*this); - return newdl; - } - - // Dump contents of this object - void dump(ostream& o) const; - - void reset(void) - { - coords.reset(); flags = 0; - } - - void makeUnique(void) - { - assignID(); - } - - // friend void makeLocatorUnique(DLFLLocatorPtr dlp); - - //--- Query functions ---// - - Vector3d getCoords(void) const - { - return coords; - } - - uint getID(void) const - { - return uID; - } - int getSelectedAxis() const - { - return selectedAxis; - } - - //--- Mutative functions ---// - void setRenderSelection(bool s) - { - renderSelection = s; - } - - void setSelectedAxis(int axis) - { - if (axis >= 0 && axis <= 3) - selectedAxis = axis; - else - selectedAxis = -1; - } - - void setCoords(const Vector3d& p) - { - coords = p; - } - - void setActiveVertex(DLFLVertexPtr vptr) - { - vtx = vptr; - } - - DLFLVertexPtr getActiveVertex() - { - return vtx; - } - - // Apply a transformation specified by the matrix to the coordinates - void transform(const Matrix4x4& tmat) - { - Vector4d tp(coords); tp[3] = 1.0; - tp = tmat * tp; - tp /= tp[3]; - coords = tp; - } - - // Print out this locator - void print(void) const - { - cout << "DLFLLocator " << uID << "," << vtx << " : " << coords << endl; - } - - void render(void); - -protected: - // Generate a new unique ID - static uint newID(void) - { - uint temp = suLastID; - suLastID++; - return temp; - } - - // Assign a unique ID for this instance - void assignID(void) - { - uID = DLFLLocator::newID(); - } - -public: - Vector3d coords; // Coordinates of locator - unsigned long flags; // Variable for general use to store flags, etc. - DLFLVertexPtr vtx; // Associated vertex - int selectedAxis; // Index of selected axis -1=none,0=x,1=y,2=z,3=free - bool renderSelection; - -protected: - // ID for this DLFLLocator - uint uID; - - // Distinct ID for each instance - // The last assigned ID is stored in this variable - static uint suLastID; - -}; - -/* -friend void makeLocatorUnique(DLFLLocatorPtr dlp) -{ - dlp->assignID(); -}*/ - -#endif /* #ifndef _DLFL_LOCATOR_HH_ */ - -// brianb diff --git a/topmodx/src/DLFLScriptEditor.cc b/topmodx/src/DLFLScriptEditor.cc deleted file mode 100644 index a69996e..0000000 --- a/topmodx/src/DLFLScriptEditor.cc +++ /dev/null @@ -1,606 +0,0 @@ -#ifdef WITH_PYTHON - -#include "DLFLScriptEditor.h" - -#include -#include -#include -#include - -#ifdef Q_WS_MAC -#include -#endif // Q_WS_MAC - -DLFLScriptEditor::DLFLScriptEditor(DLFLObjectPtr obj, QWidget *parent, Qt::WindowFlags f) - : QWidget(parent) - , dlfl_module(nullptr), dlfl_dict(nullptr) - , mEchoing(true) - , pathPython(""), mTabWidth(3), mAddToPath(".") -{ - setMinimumSize(350, 200); - - // Text Edit - mHistoryBox = new QTextEdit; - mHistoryBox->setTabChangesFocus(false); - mCommandEdit = new Editor; - mCommandEdit->setTabChangesFocus(false); - mCommandEdit->setTabStopWidth(fontMetrics().width(" ") * mTabWidth); // req. width in pixels - - QObject::connect(mCommandEdit, SIGNAL(ctrlReturnPressed()), this, SLOT(executeCommand())); - QObject::connect(this, SIGNAL(addToHistory(const QString&)), mCommandEdit, SLOT(appendHistory(const QString&))); - - QPalette whiteOnBlack, whiteOnGrey; - mInputBgColor = QColor(0, 0, 5, 255); - whiteOnBlack.setColor(QPalette::Active, QPalette::Text, Qt::white); - whiteOnBlack.setColor(QPalette::Active, QPalette::Base, mInputBgColor); - whiteOnBlack.setColor(QPalette::Inactive, QPalette::Text, Qt::white); - whiteOnBlack.setColor(QPalette::Inactive, QPalette::Base, mInputBgColor); - whiteOnBlack.setColor(QPalette::Disabled, QPalette::Text, Qt::white); - whiteOnBlack.setColor(QPalette::Disabled, QPalette::Base, mInputBgColor); - - mOutputBgColor = QColor(20, 20, 25, 255); - whiteOnGrey.setColor(QPalette::Active, QPalette::Text, Qt::white); - whiteOnGrey.setColor(QPalette::Active, QPalette::Base, mOutputBgColor); - whiteOnGrey.setColor(QPalette::Inactive, QPalette::Text, Qt::white); - whiteOnGrey.setColor(QPalette::Inactive, QPalette::Base, mOutputBgColor); - whiteOnGrey.setColor(QPalette::Disabled, QPalette::Text, Qt::white); - whiteOnGrey.setColor(QPalette::Disabled, QPalette::Base, mOutputBgColor); - - mHistoryBox->setPalette(whiteOnGrey); - mCommandEdit->setPalette(whiteOnBlack); - - mHistoryBox->setReadOnly(true); - - mHistoryBox->setTabStopWidth(fontMetrics().width(" ") * mTabWidth); - mCommandEdit->setTabStopWidth(fontMetrics().width(" ") * mTabWidth); - - pyhigh = new PythonHighlighter(mHistoryBox); - - // Menu Actions - mMenuBar = new QMenuBar(this); - - mScriptMenu = mMenuBar->addMenu(tr("&Script")); - - mExecFile = new QAction(QIcon(":images/applications-system.png"), tr("&Execute File"), this); - mExecFile->setStatusTip(tr("Execute an existing Python script")); - connect(mExecFile, SIGNAL(triggered()), this, SLOT(execFile())); - mScriptMenu->addAction(mExecFile); - - mOpenFile = new QAction(QIcon(":images/folder-open.png"), tr("&Open File"), this); - mOpenFile->setStatusTip(tr("Open the input window to a Python script")); - connect(mOpenFile, SIGNAL(triggered()), this, SLOT(openFile())); - mScriptMenu->addAction(mOpenFile); - - mSaveFile = new QAction(QIcon(":images/document-save-as.png"), tr("&Save File"), this); - mSaveFile->setStatusTip(tr("Save the input window to a Python script")); - connect(mSaveFile, SIGNAL(triggered()), this, SLOT(saveFile())); - mScriptMenu->addAction(mSaveFile); - - mSaveOutput = new QAction(QIcon(":images/document-save-as.png"), tr("Save Out&put"), this); - mSaveOutput->setStatusTip(tr("Save the output window to a Python script")); - connect(mSaveOutput, SIGNAL(triggered()), this, SLOT(saveFile())); - mScriptMenu->addAction(mSaveOutput); - - mClearHistory = new QAction(QIcon(":images/clear_scriptoutput.png"), tr("Clear &History"), this); - mClearHistory->setStatusTip(tr("Clears both output window and history")); - connect(mClearHistory, SIGNAL(triggered()), this, SLOT(clearHistory())); - mScriptMenu->addAction(mClearHistory); - - mClearInput = new QAction(QIcon(":images/clear_scriptinput.png"), tr("&Clear Input"), this); - mClearInput->setStatusTip(tr("Clears everythin in the input window")); - connect(mClearInput, SIGNAL(triggered()), this, SLOT(clearInput())); - mScriptMenu->addAction(mClearInput); - - mToggleEchoing = new QAction(QIcon(":images/accessories-text-editor.png"), tr("&Toggle Echoing"), this); - mToggleEchoing->setStatusTip(tr("Turn on/off command echoing")); - connect(mToggleEchoing, SIGNAL(triggered()), this, SLOT(toggleEchoing())); - mScriptMenu->addAction(mToggleEchoing); - - mFormatMenu = mMenuBar->addMenu(tr("&Format")); - - mConvertSpaces = new QAction(QIcon(":images/applications-system.png"), tr("&Convert Spaces To Tabs"), this); - mConvertSpaces->setStatusTip((tr("Convert each set of spaces into a TAB character"))); - connect(mConvertSpaces, SIGNAL(triggered()), this, SLOT(spacesToTABs())); - mFormatMenu->addAction(mConvertSpaces); - - mSetTabWidth = new QAction(QIcon(":images/applications-system.png"), tr("&Set Tab Width"), this); - mSetTabWidth->setStatusTip((tr("Will affect conversion of spaces to Tabs"))); - connect(mSetTabWidth, SIGNAL(triggered()), this, SLOT(toggleTabWidthWidget())); - mSetTabWidth->setCheckable(true); - mSetTabWidth->setChecked(false); - mFormatMenu->addAction(mSetTabWidth); - - mSetTabWidthWidget = new QSpinBox(this); - mSetTabWidthWidget->setMinimum(1); - mSetTabWidthWidget->setSingleStep(1); - mSetTabWidthWidget->setValue(mTabWidth); - mSetTabWidthWidget->setPrefix("Tab Width: "); - mSetTabWidthWidget->setSuffix(" space(s)"); - mSetTabWidthWidget->hide(); - connect(mSetTabWidthWidget, SIGNAL(valueChanged(int)), this, SLOT(setTabWidth(int))); - - // Layout - QVBoxLayout *mainLayout = new QVBoxLayout(this); - mainLayout->setMenuBar(mMenuBar); - mainLayout->addWidget(mHistoryBox); - mainLayout->addWidget(mCommandEdit); - mainLayout->addWidget(mSetTabWidthWidget); - setLayout(mainLayout); - -#ifdef Q_WS_MAC - // Get path of bundle - CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle); - const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding()); - mAddToPath = QString(pathPtr); - CFRelease(appUrlRef); - CFRelease(macPath); -#endif - - PyInit(); - if (dlfl_module) - PyDLFL_PassObject(obj); -} - -DLFLScriptEditor::~DLFLScriptEditor() -{ - if (Py_IsInitialized()) - Py_Finalize(); -} - -void DLFLScriptEditor::executeCommand() -{ - // grab the command typed - QString command = mCommandEdit->toPlainText(); - - if (mCommandEdit->textCursor().hasSelection()) - { - // if some text was selected, then only execute that as the command - command = mCommandEdit->textCursor().selection().toPlainText(); - } - - // split up entered code by line - QStringList cmdList = command.split('\n', QString::SkipEmptyParts); - QStringList resultList; - - QString result; - - mHistoryBox->moveCursor(QTextCursor::End); - - if (!command.isEmpty()) - { - emit makingChange(); // for undo push - - if (Py_IsInitialized()) - { - // Have to regrab these things every time - // to get updated dictionary from last exec - - // Grab dlfl dictionary - dlfl_module = PyImport_AddModule("dlfl"); - dlfl_dict = PyModule_GetDict(dlfl_module); - // Grab __main__ dictionary - main_module = PyImport_AddModule("__main__"); - main_dict = PyModule_GetDict(main_module); - - // Into main_dict: from dlfl import * - PyDict_Update(main_dict, dlfl_dict); - - // Run this to redirect python stdout - PyRun_SimpleString("import sys, __main__"); - PyRun_SimpleString("__main__.mio = MyIO()"); - PyRun_SimpleString("sys.stdout = __main__.mio"); - // Loop through each line of code looking for block statements - for (int i = 0; i < cmdList.size(); i++) - { - QString si = cmdList.at(i); - if (si.endsWith(":")) - { - // then it is a block statement - int j = i + 1; - while (j < cmdList.size() && (cmdList.at(j).startsWith("\t") || cmdList.at(j).startsWith(" "))) - { - /*// If it begins with a space figure out if we're in the same indentation level - if( cmdList.at(j).startsWith(" ") ) { - QRegExp rx = QRegExp("(^[ ])([ ])*"); - int pos = rx.indexIn( cmdList.at(j) ); - QStringList list = rx.capturedTexts(); - - }*/ - - // keep going until the tab indent level goes back out - QString sj = cmdList.at(j); - si += QString("\n") + sj; - cmdList.removeAt(j); - } - // update with new multiline command - cmdList.replace(i, si); - } - // Check if it is a load command (let TopMod handle this instead of Python) - if (cmdList.at(i).contains(QRegExp("\\bload\\("))) - { - QStringList list = cmdList.at(i).split("\"", QString::SkipEmptyParts); - cmdList.removeAt(i); - emit requestObject(list.at(1)); // 3 parts: load(, filename.obj, and ) - emit cmdExecuted(); // print out in history window - continue; - } - - // Clear out stdout - PyRun_SimpleString("__main__.mio.clear()"); - - // ** Run The Command - const char *cmd = cmdList.at(i).toLocal8Bit().constData(); - PyObject *rstring = PyRun_String(cmd, Py_file_input, main_dict, main_dict); - // Grab the result from redirected stdout class into a global variable - PyRun_SimpleString("__main__.__result = __main__.mio.s"); - - if (rstring != nullptr) - { - // resultObject1 has any possible result from running the command - PyObject *resultObject1 = PyObject_Str(rstring); - // resultObject2 has any possible thing printed to stdout from running the command - PyObject *resultObject2 = PyDict_GetItemString(main_dict, "__result"); - if (resultObject1 != nullptr && resultObject2 != nullptr) - { - char *string1 = PyString_AsString(resultObject1); - char *string2 = PyString_AsString(PyObject_Str(resultObject2)); - result = QString(string1); - // Go for string1 first, if nothing then try string2 - if (result.isEmpty() || result == "" || result == "None") - result = QString(string2); - Py_DECREF(resultObject1); - Py_DECREF(resultObject2); - } - Py_DECREF(rstring); - emit cmdExecuted(); - } - else - { - // There was an error with the command - // Print the error message - PyObject *object, *data, *traceback; - PyErr_Fetch(&object, &data, &traceback); - PyObject * traceStr = PyObject_Str(data); - char *string = PyString_AsString(traceStr); - result = QString(string) + QString(" "); // the spaces b/c I chop(2) later - } - resultList << result; // append result to resultList - } // for loop - } // end Py_IsInitialized - emit addToHistory(command); - } - else - { // enter when command.isEmpty() == true - command = QString(""); - result = QString(""); - } - - // Now create the output for the history window - for (int i = 0; i < cmdList.size(); i++) - { - // print each command - mHistoryBox->insertPlainText("\n" + cmdList.at(i)); - if (i < resultList.size()) - { - // followed by all the items in it's result list - QString res = resultList.at(i); - if (!res.isEmpty() && res != QString("None")) - { // don't print if None - res.replace(QRegExp("\\n"), "\n# "); // print as a comment at each line for copy/paste ease - res.chop(2); - mHistoryBox->insertPlainText("\n# " + res); // # is a comment in python - } - } - } - mHistoryBox->insertPlainText("\n"); - - // If the user highlighted to execute only a portion of the command - // then don't erase, otherwise do: - if (!mCommandEdit->textCursor().hasSelection()) - { - clearInput(); - } - - // Make sure history window is scrolled all the way down to latest command - QScrollBar *vBar = mHistoryBox->verticalScrollBar(); - vBar->triggerAction(QAbstractSlider::SliderToMaximum); -} - -void DLFLScriptEditor::echoCommand(QString cmd) -{ - if (mEchoing) - { - mHistoryBox->insertPlainText("\n" + cmd + "\n"); - emit addToHistory(cmd); - QScrollBar *vBar = mHistoryBox->verticalScrollBar(); - vBar->triggerAction(QAbstractSlider::SliderToMaximum); - } -} - -void DLFLScriptEditor::PyInit() -{ - Py_Initialize(); - - if (Py_IsInitialized()) - { - PyRun_SimpleString("import sys, __main__"); - loadDLFLModule(mAddToPath); - - // Create a class to redirect sys.stdout to - PyRun_SimpleString( - "class MyIO:\n\tdef __init__(self): self.s=\"\"\n"\ - "\tdef write(self,x): self.s+=x\n\tdef clear(self): self.s=\"\""); - - if (dlfl_module != nullptr) - dlfl_dict = PyModule_GetDict(dlfl_module); - - if (dlfl_module != nullptr && dlfl_dict != nullptr) - { - // Setup the Python DLFL Module C API - PyObject *c_api_object = PyDict_GetItemString(dlfl_dict, "_C_API"); - if (PyCObject_Check(c_api_object)) - { - PyDLFL_API = (void **)PyCObject_AsVoidPtr(c_api_object); - } - // Tell the module we're working inside the GUI - PyDLFL_UsingGUI(true); - } - - // Print out the standard version info and such - const char *version = Py_GetVersion(); - QString qversion(version); - mHistoryBox->append("Python " + qversion + "\n"); - if (dlfl_module != nullptr) - mHistoryBox->append("from dlfl import *\n"); - else - { - mHistoryBox->append("# no dlfl python module found"); - mHistoryBox->insertPlainText("\n"); - PyErr_Print(); - } - } -} - -// A slot to pass the GUI object pointer to the DLFLModule -void DLFLScriptEditor::loadObject(DLFLObject *obj, QString fileName) -{ - if (dlfl_module == nullptr && dlfl_dict == nullptr) - return; - if (dlfl_module) - PyDLFL_PassObject(obj); // pass the object pointer to currObj in DLFLModule.cc - // Print out the equivalent command to loading an object - QString command = tr("load(\"") + fileName + tr("\")"); - mHistoryBox->insertPlainText("\n" + command + "\n"); -} - -static bool syspath_append(const char *dirname) -{ - // Append a directory to the PYTHONHOME path for where to look for modules - PyObject *mod_sys, *dict, *path, *dir; - PyErr_Clear(); - dir = Py_BuildValue("s", dirname); - mod_sys = PyImport_ImportModule("sys"); /* new ref */ - dict = PyModule_GetDict(mod_sys); /* borrowed ref */ - path = PyDict_GetItemString(dict, "path"); /* borrowed ref */ - if (!PyList_Check(path)) - return false; - PyList_Append(path, dir); - if (PyErr_Occurred()) - { - Py_FatalError("could not build sys.path"); - return false; - } - Py_DECREF(mod_sys); - return true; -} - -void DLFLScriptEditor::loadDLFLModule(QString newPath) -{ - if (!syspath_append(newPath.toLocal8Bit().constData())) - return; - if (dlfl_module == nullptr && Py_IsInitialized()) - { - dlfl_module = PyImport_ImportModule("dlfl"); - } -} - -void DLFLScriptEditor::execFile() -{ - // Grab dlfl dictionary - dlfl_module = PyImport_AddModule("dlfl"); - dlfl_dict = PyModule_GetDict(dlfl_module); - // Grab __main__ dictionary - main_module = PyImport_AddModule("__main__"); - main_dict = PyModule_GetDict(main_module); - - QString filename = QFileDialog::getOpenFileName( - this, tr("Exec File"), - "$HOME", tr("Python Files (*.py);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - QString error(""); - - if (!filename.isEmpty()) - { - QString execfileString = QString("execfile(\"") + filename + QString("\")"); - if (Py_IsInitialized() && main_dict != nullptr) - { - const char *cmd = execfileString.toLocal8Bit().constData(); - PyRun_SimpleString("import sys"); - PyObject *rstring = PyRun_String(cmd, Py_file_input, main_dict, main_dict); - if (rstring == nullptr) - { - // There was an error with the command - // Print the error message - PyObject *object, *data, *traceback; - PyErr_Fetch(&object, &data, &traceback); - PyObject * traceStr = PyObject_Str(data); - char *string = PyString_AsString(traceStr); - error = QString("# ") + QString(string); - } - Py_DECREF(rstring); - emit addToHistory(execfileString); - echoCommand(execfileString); - if (!error.isEmpty()) { echoCommand(error); } - } - } -} - -void DLFLScriptEditor::openFile() -{ - QString filename = QFileDialog::getOpenFileName( - this, tr("Open Python File"), - "$HOME", tr("Python Files (*.py);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!filename.isEmpty()) - { - QFile file(filename); - file.open(QIODevice::ReadOnly); - QByteArray ba = file.readAll(); - QString content; - content.append(ba); - mCommandEdit->setPlainText(content); - file.close(); - } -} - -void DLFLScriptEditor::saveFile() -{ - QString filename = QFileDialog::getSaveFileName( - this, tr("Save Python File"), - "myscript", tr("Python Files (*.py);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!filename.isEmpty()) - { - QFile file(filename); - file.open(QIODevice::WriteOnly); - file.write(mCommandEdit->toPlainText().toLocal8Bit()); - file.close(); - } -} - -void DLFLScriptEditor::saveOutput() -{ - QString filename = QFileDialog::getSaveFileName( - this, tr("Save Python File"), - "myscript", tr("Python Files (*.py);;All Files (*)")); - - if (!filename.isEmpty()) - { - QFile file(filename); - file.open(QIODevice::WriteOnly); - file.write(mHistoryBox->toPlainText().toLocal8Bit()); - file.close(); - } -} - -void DLFLScriptEditor::clearHistory() -{ - mHistoryBox->clear(); - mCommandEdit->clearHistory(); - mCommandEdit->goToHistoryStart(); -} - -void DLFLScriptEditor::clearInput() -{ - mCommandEdit->clear(); - mCommandEdit->goToHistoryStart(); -} - -void DLFLScriptEditor::toggleEchoing() -{ - mEchoing = !mEchoing; -} - -void DLFLScriptEditor::retranslateUi() -{ - -} - -void DLFLScriptEditor::spacesToTABs() -{ - // Grab the input - QString command = mCommandEdit->toPlainText(); - // regex for set of spaces - QString rxs = QString("\n[ ]");//{") + QString().setNum(mTabWidth) + QString("})+"); - QRegExp rx = QRegExp(rxs); - - int pos = 0; - while ((pos = rx.indexIn(command, pos)) != -1) - { - int spaces = 1; - QString tabs = QString(""); - while (command.at(pos + 1 + spaces) == QChar(' ')) - { - spaces++; - if (spaces % 3 == 0) - tabs += QString("\t"); - } - command.replace(pos + 1, spaces, tabs); - pos += rx.matchedLength(); - } - mCommandEdit->setPlainText(command); -} - -void DLFLScriptEditor::toggleTabWidthWidget() -{ - if (mSetTabWidthWidget->isVisible()) - { - mSetTabWidthWidget->hide(); - mSetTabWidth->setChecked(false); - } - else - { - mSetTabWidthWidget->show(); - mSetTabWidth->setChecked(true); - } -} - -void DLFLScriptEditor::setTabWidth(int width) -{ - mTabWidth = width; // width in spaces - mCommandEdit->setTabStopWidth(fontMetrics().width(" ") * mTabWidth); // req. width in pixels¯ - mHistoryBox->setTabStopWidth(fontMetrics().width(" ") * mTabWidth); - QString hist = mHistoryBox->toPlainText(); - mHistoryBox->setPlainText(hist); - QString text = mCommandEdit->toPlainText(); - mCommandEdit->setPlainText(text); -} - -#endif // WITH_PYTHON -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): Stuart Tett. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - diff --git a/topmodx/src/DLFLScriptEditor.h b/topmodx/src/DLFLScriptEditor.h deleted file mode 100644 index 3a694aa..0000000 --- a/topmodx/src/DLFLScriptEditor.h +++ /dev/null @@ -1,161 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): Stuart Tett. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLSCRIPT_EDITOR_HH_ -#define _DLFLSCRIPT_EDITOR_HH_ - -#ifdef WITH_PYTHON - -#undef slots -#ifdef _DEBUG -#undef _DEBUG -#include -#define _DEBUG -#else -#include -#endif -#define slots - -/* -* The macros below is defined as real functions in , -* while defines them as macros with a slightly different signature. -* Though Python 2.7.13 fixed this issue, -* in case user use lower version of Python, we undefined the macros manually. -*/ -#ifdef _PY_PORT_CTYPE_UTF8_ISSUE -#undef isalnum -#undef isalpha -#undef islower -#undef isspace -#undef isupper -#undef tolower -#undef toupper -#endif - -#include -#include -#include -#include -#include -#include - -//class QLineEdit; -class QTextEdit; -class QProcess; - -#include -#include "editor.h" - -#include "PythonHighlighter.h" - -using namespace DLFL; - -// Stuff for the DLFL Extension Module's C API -static void **PyDLFL_API; -#define PyDLFL_UsingGUI (*(void (*)(bool ugui)) PyDLFL_API[0]) -#define PyDLFL_PassObject (*(void (*)(DLFLObject* obj)) PyDLFL_API[1]) - -class DLFLScriptEditor : public QWidget -{ - Q_OBJECT - -public: - DLFLScriptEditor(DLFLObjectPtr obj = nullptr, QWidget *parent = 0, Qt::WindowFlags f = Qt::Tool); - ~DLFLScriptEditor(); - - QColor& outputBgColor() { return mOutputBgColor; }; - QColor& inputBgColor() { return mInputBgColor; }; - void retranslateUi(); - -signals: - void makingChange(); // for undo push - void cmdExecuted(); - void addToHistory(const QString& item); - void requestObject(QString fileName); - private slots : - void executeCommand(); - void echoCommand(QString cmd); - void toggleTabWidthWidget(); - public slots : - void loadObject(DLFLObject* obj, QString fileName); - void loadDLFLModule(QString newPath); - void execFile(); - void openFile(); - void saveFile(); - void saveOutput(); - void clearHistory(); - void clearInput(); - void toggleEchoing(); - // Run this function to convert spaces to TABs - void setTabWidth(int width); - void spacesToTABs(); - -public: - QString mAddToPath; - -private: - // The place where the user types the commands (multiline) - Editor *mCommandEdit; - // The place where executed commands are executed - QTextEdit *mHistoryBox; - // The menubar with some options - QMenuBar *mMenuBar; - QMenu *mScriptMenu; - QAction *mExecFile, *mOpenFile, *mSaveFile, *mSaveOutput; - QAction *mClearHistory; - QAction *mClearInput; - QAction *mToggleEchoing; - - // For Spaces to TABs conversion - QMenu *mFormatMenu; - QAction *mSetTabWidth; - QAction *mConvertSpaces; - - PythonHighlighter *pyhigh; - - QColor mOutputBgColor; - QColor mInputBgColor; - - void PyInit(); - PyObject *dlfl_module, *dlfl_dict; - PyObject *main_module, *main_dict; - - bool mEchoing; - - QString pathPython; - - // The number of spaces equal to a TAB - // will get converted at the beginning of a line - int mTabWidth; - QSpinBox *mSetTabWidthWidget; - -}; - -#endif - -#endif // _DLFLSCRIPT_EDITOR_HH_ diff --git a/topmodx/src/DLFLSelection.cc b/topmodx/src/DLFLSelection.cc deleted file mode 100644 index 16cf042..0000000 --- a/topmodx/src/DLFLSelection.cc +++ /dev/null @@ -1,157 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "DLFLSelection.h" -#include "Renderer/GeometryRenderer.h" - -/**! -* -* \brief functions for rendering edges, faces, vertices of DLFL Objects -* -* \note -* -* \see DLFLSelection -*/ - -// Code for selection of vertices, edges and faces - -// Render the vertices for selection -void renderVerticesForSelect(DLFLObjectPtr obj) -{ - DLFLVertexPtrList vertex_list = obj->getVertexList(); - // Adjust the size of the array used for selection to be at least equal to - // number of vertices - DLFLObject::vparray.resize(vertex_list.size()); // STL checks for current capacity - - // Copy the pointers from the vertex_list to the vertex array - // Render the vertices for selection at the same time (saves one loop) - size_t index = 0; - for (auto vertexPtr : vertex_list) - { - glLoadName(index); - GeometryRenderer::instance()->renderVertex(vertexPtr); - - DLFLObject::vparray[index++] = vertexPtr; - } -} - -// Render the edges for selection -void renderEdgesForSelect(DLFLObjectPtr obj) -{ - DLFLEdgePtrList edge_list = obj->getEdgeList(); - // Adjust the size of the array used for selection to be at least equal to - // number of edges - DLFLObject::eparray.resize(edge_list.size()); // STL checks for current capacity - - // Copy the pointers from the edge_list to the edge array - // Render the edges for selection at the same time (saves one loop) - size_t index = 0; - for (auto edgePtr : edge_list) - { - glLoadName(index); - glBegin(GL_LINES); - { - GeometryRenderer::instance()->renderEdge(edgePtr); - } - glEnd(); - - DLFLObject::eparray[index++] = edgePtr; - } -} - -// Render the faces for selection -void renderFacesForSelect(DLFLObjectPtr obj) -{ - DLFLFacePtrList face_list = obj->getFaceList(); - // Adjust the size of the array used for selection to be at least equal to - // number of faces - DLFLObject::fparray.resize(face_list.size()); // STL checks for current capacity - - // Copy the pointers from the face_list to the face array - // Render the faces for selection at the same time (saves one loop) - size_t index = 0; - for (auto facePtr : face_list) - { - glLoadName(index); - if (facePtr->size() == 1) - { - GLdouble depthrange[2]; - GLfloat pointsize; - glGetDoublev(GL_DEPTH_RANGE, depthrange); - glGetFloatv(GL_POINT_SIZE, &pointsize); - glDepthRange(0.0, 1.0 - 0.005); - glPointSize(3.0); - GeometryRenderer::instance()->renderFace(facePtr); - - glPointSize(pointsize); - glDepthRange(depthrange[0], depthrange[1]); - } - else - { - GeometryRenderer::instance()->renderFace(facePtr); - } - - DLFLObject::fparray[index++] = facePtr; - } -} - -// Render the face vertices of a face for selection -void renderFaceVerticesForSelect(DLFLFacePtr fp) -{ - // Copy the pointers from the face_list to the face array - // Render the faces for selection at the same time (saves one loop) - DLFLFaceVertexPtr head; - head = fp->front(); - if (head == nullptr) - { - return; - } - - // Adjust the size of the array used for selection to be at least equal to - // number of faces - DLFLObject::fvparray.resize(fp->size()); - - DLFLFaceVertexPtr current = head; - size_t index = 0; - do - { - glLoadName(index); - glBegin(GL_POINTS); - { - GeometryRenderer::instance()->renderFaceVertex(current); - } - glEnd(); - DLFLObject::fvparray[index++] = current; - current = current->next(); - } while (current != head); -} diff --git a/topmodx/src/DLFLSelection.h b/topmodx/src/DLFLSelection.h deleted file mode 100644 index b2bae4b..0000000 --- a/topmodx/src/DLFLSelection.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFLSELECTION_H_ -#define _DLFLSELECTION_H_ - -#include - -using namespace DLFL; - -/*! -\file DLFLSelection.hh -\brief Code for selection of vertices, edges and faces - -\see MainWindow -*/ - -//!< Render the vertices for selection -void renderVerticesForSelect(DLFLObjectPtr obj); -//!< Render the edges for selection -void renderEdgesForSelect(DLFLObjectPtr obj); -//!< Render the faces for selection -void renderFacesForSelect(DLFLObjectPtr obj); -//!< Render the face vertices of a face for selection -void renderFaceVerticesForSelect(DLFLFacePtr fp); - -#endif // _DLFLSELECTION_H_ diff --git a/topmodx/src/DLFLStandardObjects.cc b/topmodx/src/DLFLStandardObjects.cc deleted file mode 100644 index 2b2f944..0000000 --- a/topmodx/src/DLFLStandardObjects.cc +++ /dev/null @@ -1,321 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: DLFLStandardObjects.cc,v 4.0 2003/12/26 01:58:53 vinod Exp $ */ - -// Source code to create standard objects as DLFL objects -// These are static methods in the DLFLObject class -// All methods return a pointer to a newly created DLFLObject -// Call has to delete the pointer - -#include - -using namespace DLFL; - -struct mstriplet { - int i, j, k; -}; - -static mstriplet msfilled[20] = { - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 2 }, - { 0, 1, 0 }, { 0, 1, 2 }, - { 0, 2, 0 }, { 0, 2, 1 }, { 0, 2, 2 }, - { 1, 0, 0 }, { 1, 0, 2 }, - - { 1, 2, 0 }, { 1, 2, 2 }, - { 2, 0, 0 }, { 2, 0, 1 }, { 2, 0, 2 }, - { 2, 1, 0 }, { 2, 1, 2 }, - { 2, 2, 0 }, { 2, 2, 1 }, { 2, 2, 2 } -}; - - - // Create a unit cube centered at origin -DLFLObjectPtr DLFLObject::makeUnitCube(void) -{ - DLFLObjectPtr unitcube = new DLFLObject(); - Vector3dArray verts; - Vector3d p; - double x = 0.5; - - verts.resize(4); - - // Create top face - p.set(x,x,x); verts[0] = p; - p.set(x,x,-x); verts[1] = p; - p.set(-x,x,-x); verts[2] = p; - p.set(-x,x,x); verts[3] = p; - unitcube->createFace(verts); - DLFLFacePtr fp1 = unitcube->lastFace(); - - // Create bottom face - p.set(x,-x,x); verts[0] = p; - p.set(-x,-x,x); verts[1] = p; - p.set(-x,-x,-x); verts[2] = p; - p.set(x,-x,-x); verts[3] = p; - unitcube->createFace(verts); - DLFLFacePtr fp2 = unitcube->lastFace(); - - // fp1 and fp2 will be inward facing - // Connect them using the first corners in each - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fp1->firstVertex(); fvp2 = fp2->firstVertex(); - unitcube->connectFaces(fvp1,fvp2); - - return unitcube; -} - - // Create a cube of specified edge length centered at origin -DLFLObjectPtr DLFLObject::makeUnitCube(double edgelength) -{ - DLFLObjectPtr unitcube = new DLFLObject(); - Vector3dArray verts; - Vector3d p; - double x = edgelength/2.0; - - verts.resize(4); - - // Create top face - p.set(x,x,x); verts[0] = p; - p.set(x,x,-x); verts[1] = p; - p.set(-x,x,-x); verts[2] = p; - p.set(-x,x,x); verts[3] = p; - unitcube->createFace(verts); - DLFLFacePtr fp1 = unitcube->lastFace(); - - // Create bottom face - p.set(x,-x,x); verts[0] = p; - p.set(-x,-x,x); verts[1] = p; - p.set(-x,-x,-x); verts[2] = p; - p.set(x,-x,-x); verts[3] = p; - unitcube->createFace(verts); - DLFLFacePtr fp2 = unitcube->lastFace(); - - // fp1 and fp2 will be inward facing - // Connect them using the first corners in each - DLFLFaceVertexPtr fvp1, fvp2; - fvp1 = fp1->firstVertex(); fvp2 = fp2->firstVertex(); - unitcube->connectFaces(fvp1,fvp2); - - return unitcube; -} - - // Create a tetrahedron with edge length = 1 and centered at origin -DLFLObjectPtr DLFLObject::makeUnitTetrahedron(void) -{ - DLFLObjectPtr unittetra = new DLFLObject(); - Vector3dArray verts; - double rt3 = sqrt(3.0), rt6 = sqrt(6.0); - verts.resize(3); - - // Build the bottom face on the ZX plane. This faces downward - verts[0].set(-rt3/6.0,0,0.5); - verts[1].set(-rt3/6.0,0,-0.5); - verts[2].set(rt3/3.0,0,0.0); - - unittetra->createFace(verts); - - // Get the upward facing face - the last in the face list - DLFLFacePtr fp = unittetra->lastFace(); - - // Triangulate this face - a new point will be created at centroid - unittetra->subDivideFace(fp,false); - - // Adjust the coordinates of the new point to get the top point - DLFLVertexPtr vp = unittetra->lastVertex(); - vp->coords.set(0,rt6/3.0,0); - - // Translate the whole object so centroid is at origin - unittetra->position.set(0,-rt6/12.0,0); - unittetra->freezeTransformations(); // Optimized version should be used - - return unittetra; -} - - // Create a level 1 Menger sponge using unit cubes -DLFLObjectPtr DLFLObject::makeMengerSponge(void) -{ - DLFLObjectPtr mengersponge = new DLFLObject(); - - // Make 20 unit cubes and splice them together - // after suitably transforming them - Vector3d opos; - DLFLObjectPtr unitcube; - - // We'll first build the sponge with one corner at the origin - // and in the +++ octant. Then we'll translate it to the correct position - - int i,j,k; - for (int m=0; m < 20; ++m) - { - i = msfilled[m].i; j = msfilled[m].j; k = msfilled[m].k; - opos.set(0.5+i*1.0,0.5+j*1.0,0.5+k*1.0); - unitcube = DLFLObject::makeUnitCube(); - unitcube->position = opos; - unitcube->freezeTransformations(); // An optimized version should be used - mengersponge->splice(*unitcube); - delete unitcube; - } - - // Now translate this object to the correct position - mengersponge->position.set(-1.5,-1.5,-1.5); - mengersponge->freezeTransformations(); - return mengersponge; -} - - // Create a level 1 Menger sponge using cubes of specified length -DLFLObjectPtr DLFLObject::makeMengerSponge(double edgelength) -{ - DLFLObjectPtr mengersponge = new DLFLObject(); - - // Make 20 unit cubes and splice them together - // after suitably transforming them - Vector3d opos; - DLFLObjectPtr unitcube; - - // We'll first build the sponge with one corner at the origin - // and in the +++ octant. Then we'll translate it to the correct position - - int i,j,k; - for (int m=0; m < 20; ++m) - { - i = msfilled[m].i; j = msfilled[m].j; k = msfilled[m].k; - opos.set(edgelength/2.0+i*edgelength, - edgelength/2.0+j*edgelength, - edgelength/2.0+k*edgelength); - unitcube = DLFLObject::makeUnitCube(); - unitcube->position = opos; - unitcube->freezeTransformations(); // An optimized version should be used - mengersponge->splice(*unitcube); - delete unitcube; - } - - // Now translate this object to the correct position - mengersponge->position.set(-1.5*edgelength,-1.5*edgelength,-1.5*edgelength); - mengersponge->freezeTransformations(); - return mengersponge; -} - - // Create a specified level Menger sponge using cubes of unit length - // This is a recursive function -DLFLObjectPtr DLFLObject::makeMengerSponge(int level) -{ - if ( level < 1 ) return NULL; - if ( level == 1 ) return makeMengerSponge(); - - DLFLObjectPtr mengersponge = new DLFLObject(); - - // Make 20 Menger sponges of 1 lower level and splice them together - // after suitably transforming them - Vector3d opos; - DLFLObjectPtr submengersponge; // Next lower level Menger sponge - - // We'll first build the sponge with one corner at the origin - // and in the +++ octant. Then we'll translate it to the correct position - - double baselength = pow(3.0,level-1); // Edge length of each sub-Menger sponge at this level - double baselength_2 = baselength/2.0; - int i,j,k; - for (int m=0; m < 20; ++m) - { - i = msfilled[m].i; j = msfilled[m].j; k = msfilled[m].k; - opos.set(baselength_2 + i*baselength, - baselength_2 + j*baselength, - baselength_2 + k*baselength); - submengersponge = DLFLObject::makeMengerSponge(level-1); - submengersponge->position = opos; - submengersponge->freezeTransformations(); // An optimized version should be used - mengersponge->splice(*submengersponge); - delete submengersponge; - } - - // Now translate this object to the correct position - mengersponge->position.set(-1.5*baselength,-1.5*baselength,-1.5*baselength); - mengersponge->freezeTransformations(); - return mengersponge; -} - - // Create a Sierpinski tetrahedron with smallest edge length = 1 and centered at origin -DLFLObjectPtr DLFLObject::makeSierpinskiTetrahedron(int level) -{ - if ( level < 0 ) return NULL; - if ( level == 0 ) return makeUnitTetrahedron(); - - DLFLObjectPtr stetra = new DLFLObject(); - - // Make 4 copies of level-1 Sierpinski tetrahedron - // and splice them together after suitable transformations - double rt3_6 = sqrt(3.0)/6.0, rt6_12 = sqrt(6.0)/12.0; - double baselength = pow(2.0,level-1); // Edge length of sub-Sierpinski tetra at this level - DLFLObjectPtr substetra; // Next lower level Sierpinski tetra - - substetra = DLFLObject::makeSierpinskiTetrahedron(level-1); - substetra->position.set(baselength*rt3_6,baselength*rt6_12,baselength*0.5); - substetra->freezeTransformations(); - stetra->splice(*substetra); - delete substetra; - - substetra = DLFLObject::makeSierpinskiTetrahedron(level-1); - substetra->position.set(baselength*rt3_6,baselength*rt6_12,baselength*1.5); - substetra->freezeTransformations(); - stetra->splice(*substetra); - delete substetra; - - substetra = DLFLObject::makeSierpinskiTetrahedron(level-1); - substetra->position.set(baselength*rt3_6*4.0,baselength*rt6_12,baselength); - substetra->freezeTransformations(); - stetra->splice(*substetra); - delete substetra; - - substetra = DLFLObject::makeSierpinskiTetrahedron(level-1); - substetra->position.set(baselength*rt3_6*2.0,baselength*rt6_12*5.0,baselength); - substetra->freezeTransformations(); - stetra->splice(*substetra); - delete substetra; - - stetra->position.set(-baselength*rt3_6*2.0,-baselength*rt6_12,-baselength); - stetra->freezeTransformations(); - return stetra; -} - -/* - $Log: DLFLStandardObjects.cc,v $ - Revision 4.0 2003/12/26 01:58:53 vinod - Major version sync. - - Revision 3.2 2003/12/08 20:19:03 vinod - Added methods for unit tetrahedron and Sierpinski tetrahedron. - - Revision 3.1 2003/12/08 07:48:56 vinod - Subroutines for generating standard objects like cube procedurally - -*/ diff --git a/topmodx/src/DLFLUndo.cc b/topmodx/src/DLFLUndo.cc deleted file mode 100644 index 54e0cf8..0000000 --- a/topmodx/src/DLFLUndo.cc +++ /dev/null @@ -1,176 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: DLFLUndo.cc,v 4.1 2004/02/24 20:41:44 vinod Exp $ */ - -#include "MainWindow.h" - -//-- Subroutines dealing with undo and redo for DLFLWindow --// - -void MainWindow::clearUndoList(void) -{ - StringStreamPtrList::iterator first, firstmtl, last; - firstmtl = mUndoMtlList.begin(); - first = mUndoList.begin(); last = mUndoList.end(); - while (first != last) - { - StringStreamPtr temp = (*first); ++first; - StringStreamPtr tempmtl = (*firstmtl); ++firstmtl; - delete temp; - delete tempmtl; - temp = nullptr; - tempmtl = nullptr; - } - mUndoList.clear(); - mUndoMtlList.clear(); -} - -void MainWindow::clearRedoList(void) -{ - StringStreamPtrList::iterator first, firstmtl, last; - firstmtl = mRedoMtlList.begin(); - first = mRedoList.begin(); last = mRedoList.end(); - while (first != last) - { - StringStreamPtr temp = (*first); ++first; - StringStreamPtr tempmtl = (*firstmtl); ++firstmtl; - delete temp; - delete tempmtl; - temp = nullptr; - tempmtl = nullptr; - } - mRedoList.clear(); - mRedoMtlList.clear(); -} - -void MainWindow::undoPush(void) -{ - // Don't do anything unless undo is required - if (mUseUndo == false) return; - - // Put current object on top of undo list - // Check if we have reached undo limit, in which case remove oldest state - // and add current state to end of list. - if (mUndoList.size() > mUndoLimit) - { - StringStreamPtr temp = mUndoList.front(); - StringStreamPtr tempmtl = mUndoMtlList.front(); - delete temp; delete tempmtl; - mUndoList.pop_front(); - } - - StringStreamPtr curobj = new StringStream; - StringStreamPtr curobjmtl = new StringStream; - - mObject.writeDLFL(*curobj, *curobjmtl); - // object.writeMTL(*curobjmtl); - - mUndoList.push_back(curobj); - mUndoMtlList.push_back(curobjmtl); - // Evertime a new operation is done, previous state is put into UndoList - // At the same time the redo list should be cleared, because we have - // nothing to redo immediately after an operation. - clearRedoList(); -} - -void MainWindow::undo(void) -{ - if (!mUndoList.empty()) - { - // Restore previous object - // Put current object to end of redo list - // Take last element of undo list and re-create current object - StringStreamPtr curobj = new StringStream; - StringStreamPtr curobjmtl = new StringStream; - - mObject.writeDLFL(*curobj, *curobjmtl); - // object.writeMTL(*curobjmtl); - - mRedoList.push_back(curobj); - mRedoMtlList.push_back(curobjmtl); - - StringStreamPtr oldobj = mUndoList.back(); - StringStreamPtr oldobjmtl = mUndoMtlList.back(); - - mObject.readDLFL(*oldobj, *oldobjmtl, true); - // object.readMTL(*oldobj,true); - - mUndoList.pop_back(); delete oldobj; - mUndoMtlList.pop_back(); delete oldobjmtl; - - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - // Clear selection lists to avoid dangling pointers - MainWindow::clearSelected(); - redraw(); - /* is document modified? - dave */ - setModified(true); - mIsPrimitive = false; - } - if (mUndoList.empty()) - { - setModified(false); - if (mWasPrimitive) - mIsPrimitive = true; - } -} - -void MainWindow::redo(void) -{ - if (!mRedoList.empty()) - { - // Redo previously undone operation - // Put current object to end of undo list - // Take last element of redo list and re-create current object - StringStreamPtr curobj = new StringStream; - StringStreamPtr curobjmtl = new StringStream; - mObject.writeDLFL(*curobj, *curobjmtl); - mUndoList.push_back(curobj); - mUndoMtlList.push_back(curobjmtl); - - StringStreamPtr newobj = mRedoList.back(); - StringStreamPtr newobjmtl = mRedoMtlList.back(); - mObject.readDLFL(*newobj, *newobjmtl); - mRedoList.pop_back(); delete newobj; - mRedoMtlList.pop_back(); delete newobjmtl; - - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - // Clear selection lists to avoid dangling pointers - MainWindow::clearSelected(); - redraw(); - /* is document modified? - dave */ - setModified(true); - mIsPrimitive = false; - } -} diff --git a/topmodx/src/ExperimentalModes.cc b/topmodx/src/ExperimentalModes.cc deleted file mode 100644 index f8d7ff7..0000000 --- a/topmodx/src/ExperimentalModes.cc +++ /dev/null @@ -1,208 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "ExperimentalModes.h" - -#include - -/*! - \ingroup gui - @{ - - \class ExperimentalMode - \brief experimental stuff like paint bucket - - \note - - \see PaintBucket -*/ - -/*! -* \brief Constructor -* -* @param parent the MainWindow widget -* @param sm the shortcut manager class for adding a custom shortcut to each menu action or icon -* @param actionList the master list of actions for use with the CommandCompleter class -* -*/ - -ExperimentalMode::ExperimentalMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - mPaintBucketWidget = new QWidget; - - setupPaintBucket(); - - mPaintBucketAct = new QAction(QIcon(":images/color-fill.png"), tr("Paint Bucket"), this); - mPaintBucketAct->setCheckable(true); - sm->registerAction(mPaintBucketAct, "Experimental", ""); - mPaintBucketAct->setStatusTip(tr("Enter Paint Bucket Mode")); - mPaintBucketAct->setToolTip(tr("Paint Bucket Mode")); - connect(mPaintBucketAct, SIGNAL(triggered()), this, SLOT(triggerPaintBucket())); - actionList->addAction(mPaintBucketAct); -} - -QMenu* ExperimentalMode::getMenu() -{ - mExperimentalMenu = new QMenu(tr("Experimental")); - - mExperimentalMenu->addAction(mPaintBucketAct); - - return mExperimentalMenu; -} - -void ExperimentalMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mPaintBucketAct); - - toolBar->addAction(mPaintBucketAct); - - stackedWidget->addWidget(mPaintBucketWidget); -} - -void ExperimentalMode::triggerPaintBucket() -{ - ((MainWindow*)mParent)->setToolOptions(mPaintBucketWidget); - ((MainWindow*)mParent)->setMode(MainWindow::PaintFace); -} - -QDoubleSpinBox *ExperimentalMode::createDoubleSpinBox( - QGridLayout *layout, QLabel *label, QString s, - double low, double high, double step, double value, double decimals, - int row, int col) -{ - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox(this); - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -QPushButton* ExperimentalMode::addColorPreference( - QLabel *label, QString text, QColor color, - QGridLayout *layout, QStyle *style, - int row, int col) -{ - label->setText(text); - QPushButton *button = new QPushButton(this); - button->setMaximumSize(QSize(100, 25)); - button->setAutoFillBackground(true); - button->setStyle(style); - QPalette p = button->palette(); - p.setColor(button->backgroundRole(), color); - button->setPalette(p); - layout->addWidget(label, row, col); - layout->addWidget(button, row, col + 1); - return button; -} - -void ExperimentalMode::setupPaintBucket() -{ - colorPickerStyle = QStyleFactory::create("Fusion"); - - mPaintBucketLayout = new QGridLayout; - mPaintBucketLayout->setVerticalSpacing(1); - mPaintBucketLayout->setHorizontalSpacing(1); - - //viewport background color - mPaintBucketColorLabel = new QLabel; - mPaintBucketColorButton = addColorPreference( - mPaintBucketColorLabel, tr("Paint Bucket\nColor:"), - mPaintBucketColor, mPaintBucketLayout, colorPickerStyle, 0, 0); - connect(mPaintBucketColorButton, SIGNAL(clicked()), this, SLOT(setPaintBucketColor())); - - //paint selcted faces - mPaintSelectedFacesButton = new QPushButton(tr("Paint Selected Faces"), this); - connect(mPaintSelectedFacesButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(paintSelectedFaces())); - mPaintBucketLayout->addWidget(mPaintSelectedFacesButton, 1, 0); - - //paint selcted faces - mResetMaterialsButton = new QPushButton(tr("Reset Materials"), this); - connect(mResetMaterialsButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(clearMaterials())); - mPaintBucketLayout->addWidget(mResetMaterialsButton, 2, 0); - - mPaintBucketLayout->setRowStretch(3, 1); - mPaintBucketLayout->setColumnStretch(2, 1); - mPaintBucketWidget->setWindowTitle(tr("Paint Bucket")); - mPaintBucketWidget->setLayout(mPaintBucketLayout); -} - -void ExperimentalMode::setPaintBucketColor() -{ - mPaintBucketColor.setRgba(QColorDialog::getRgba(mPaintBucketColor.rgba())); - if (mPaintBucketColor.isValid()) - { - ((MainWindow*)mParent)->setPaintBucketColor(mPaintBucketColor); - setButtonColor(mPaintBucketColor, mPaintBucketColorButton); - } -} - -void ExperimentalMode::setPaintBucketColor(QColor c) -{ - mPaintBucketColor = c; - setButtonColor(mPaintBucketColor, mPaintBucketColorButton); -} - -void ExperimentalMode::setButtonColor(QColor color, QPushButton *button) -{ - p = button->palette(); - p.setColor(QPalette::Button, color); - button->setPalette(p); -} - -void ExperimentalMode::retranslateUi() -{ - //actions - mPaintBucketAct->setText(tr("Paint Bucket")); - mPaintBucketAct->setStatusTip(tr("Enter Paint Bucket Mode")); - mPaintBucketAct->setToolTip(tr("Paint Bucket Mode")); - - //menus - mExperimentalMenu->setTitle(tr("Experimental")); - - //!< \todo add buttons and spinbox labels to retranslate function for highgenusmode.cc - // mPaintBucketColorButton - mPaintSelectedFacesButton->setText(tr("Paint Selected Faces")); - mPaintBucketColorLabel->setText(tr("Paint Bucket\nColor")); - mPaintBucketWidget->setWindowTitle(tr("Paint Bucket")); -} diff --git a/topmodx/src/ExperimentalModes.h b/topmodx/src/ExperimentalModes.h deleted file mode 100644 index 8568358..0000000 --- a/topmodx/src/ExperimentalModes.h +++ /dev/null @@ -1,101 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef EXPERIMENTALMODE_H -#define EXPERIMENTALMODE_H - -#include - -#include -#include -#include - -#include "MainWindow.h" - -class MainWindow; - -class ExperimentalMode : public QWidget -{ - Q_OBJECT - -public: - ExperimentalMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); - - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu *getMenu(); - void retranslateUi(); - - QDoubleSpinBox *createDoubleSpinBox( - QGridLayout *layout, QLabel *label, QString s, - double low, double high, double step, double value, double decimals, - int row, int col); - - QPushButton* addColorPreference( - QLabel *label, QString text, QColor color, - QGridLayout *layout, QStyle *style, - int row, int col); - - void setButtonColor(QColor color, QPushButton *button); - void setPaintBucketColor(QColor c); - - QWidget *mPaintBucketWidget; - QAction *mPaintBucketAct; - QGridLayout *mPaintBucketLayout; - -protected: - void setupPaintBucket(); - - public slots: - // void changeCutOffsetE(double value); - void triggerPaintBucket(); - void setPaintBucketColor(); - -private: - - QWidget *mParent; - QMenu *mExperimentalMenu; - - //Face Painting Color - QColor mPaintBucketColor, mPaintBucketColorDefault; - QPushButton *mPaintBucketColorButton; - QPushButton *mPaintSelectedFacesButton; - QPushButton *mResetMaterialsButton; - QLabel *mPaintBucketColorLabel; - - - QStyle* colorPickerStyle; - QPalette p; - -}; - -#endif diff --git a/topmodx/src/ExtrusionsMode.cc b/topmodx/src/ExtrusionsMode.cc deleted file mode 100644 index a18a49e..0000000 --- a/topmodx/src/ExtrusionsMode.cc +++ /dev/null @@ -1,788 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include - -#include "ExtrusionsMode.h" - -/*! - \ingroup gui - @{ - - \class ExtrusionsMode - \brief Extrusion Operations GUI elements. - - \note - - \see ExtrusionsMode -*/ - -/*! -* \brief Constructor -* -* @param parent the MainWindow widget -* @param sm the shortcut manager class for adding a custom shortcut to each menu action or icon -* @param actionList the master list of actions for use with the CommandCompleter class -* -*/ -ExtrusionsMode::ExtrusionsMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - //create the stacked widget and all child widget pages - mDooSabinExtrudeWidget = new QWidget; - mCubicalExtrudeWidget = new QWidget; - mDodecahedralExtrudeWidget = new QWidget; - mIcosahedralExtrudeWidget = new QWidget; - mOctahedralExtrudeWidget = new QWidget; - mStellateExtrudeWidget = new QWidget; - mDoubleStellateExtrudeWidget = new QWidget; - mDomeExtrudeWidget = new QWidget; - - //setup stacked widget pages here, - //each in a separate function to make the code more readable - setupCubicalExtrude(); - setupDooSabinExtrude(); - setupDodecahedralExtrude(); - setupIcosahedralExtrude(); - setupOctahedralExtrude(); - setupStellateExtrude(); - setupDoubleStellateExtrude(); - setupDomeExtrude(); - - mDooSabinExtrudeAction = new QAction(QIcon(":images/extrude_doosabin.png"), tr("Doo Sabin"), this); - mDooSabinExtrudeAction->setCheckable(true); - sm->registerAction(mDooSabinExtrudeAction, "Extrusion Operations", ""); - mDooSabinExtrudeAction->setStatusTip(tr("Enter Doo Sabin Extrude Mode")); - mDooSabinExtrudeAction->setToolTip(tr("Doo Sabin Extrude Mode")); - connect(mDooSabinExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerDooSabinExtrude())); - actionList->addAction(mDooSabinExtrudeAction); - - mCubicalExtrudeAction = new QAction(QIcon(":images/extrude_cubical.png"), tr("Cubical"), this); - mCubicalExtrudeAction->setCheckable(true); - sm->registerAction(mCubicalExtrudeAction, "Extrusion Operations", ""); - mCubicalExtrudeAction->setStatusTip(tr("Enter Cubical Extrude Mode")); - mCubicalExtrudeAction->setToolTip(tr("Cubical Extrude Mode")); - connect(mCubicalExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerCubicalExtrude())); - actionList->addAction(mCubicalExtrudeAction); - - mDodecahedralExtrudeAction = new QAction(QIcon(":images/extrude_dodecahedral.png"), tr("Dodecahedral"), this); - mDodecahedralExtrudeAction->setCheckable(true); - mDodecahedralExtrudeAction->setEnabled(true); - sm->registerAction(mDodecahedralExtrudeAction, "Extrusion Operations", ""); - mDodecahedralExtrudeAction->setStatusTip(tr("Enter Dodecahedral Extrude Mode")); - mDodecahedralExtrudeAction->setToolTip(tr("Dodecahedral Extrude Mode")); - connect(mDodecahedralExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerDodecahedralExtrude())); - actionList->addAction(mDodecahedralExtrudeAction); - - mIcosahedralExtrudeAction = new QAction(QIcon(":images/extrude_icosahedral.png"), tr("Icosahedral"), this); - mIcosahedralExtrudeAction->setCheckable(true); - mIcosahedralExtrudeAction->setEnabled(true); - sm->registerAction(mIcosahedralExtrudeAction, "Extrusion Operations", ""); - mIcosahedralExtrudeAction->setStatusTip(tr("Enter Icosahedral Extrude Mode")); - mIcosahedralExtrudeAction->setToolTip(tr("Icosahedral Extrude Mode")); - connect(mIcosahedralExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerIcosahedralExtrude())); - actionList->addAction(mIcosahedralExtrudeAction); - - mOctahedralExtrudeAction = new QAction(QIcon(":images/extrude_octahedral.png"), tr("Octahedral"), this); - mOctahedralExtrudeAction->setCheckable(true); - mOctahedralExtrudeAction->setEnabled(true); - sm->registerAction(mOctahedralExtrudeAction, "Extrusion Operations", ""); - mOctahedralExtrudeAction->setStatusTip(tr("Enter Octahedral Extrude Mode")); - mOctahedralExtrudeAction->setToolTip(tr("Octahedral Extrude Mode")); - connect(mOctahedralExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerOctahedralExtrude())); - actionList->addAction(mOctahedralExtrudeAction); - - mStellateExtrudeAction = new QAction(QIcon(":images/extrude_stellate.png"), tr("Stellate"), this); - mStellateExtrudeAction->setCheckable(true); - sm->registerAction(mStellateExtrudeAction, "Extrusion Operations", ""); - mStellateExtrudeAction->setStatusTip(tr("Enter Stellate Extrude Mode")); - mStellateExtrudeAction->setToolTip(tr("Stellate Extrude Mode")); - connect(mStellateExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerStellateExtrude())); - actionList->addAction(mStellateExtrudeAction); - - mDoubleStellateExtrudeAction = new QAction(QIcon(":images/extrude_doublestellate.png"), tr("Double Stellate"), this); - mDoubleStellateExtrudeAction->setCheckable(true); - sm->registerAction(mDoubleStellateExtrudeAction, "Extrusion Operations", ""); - mDoubleStellateExtrudeAction->setStatusTip(tr("Enter Double Stellate Mode")); - mDoubleStellateExtrudeAction->setToolTip(tr("Double Stellate Mode")); - connect(mDoubleStellateExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerDoubleStellateExtrude())); - actionList->addAction(mDoubleStellateExtrudeAction); - - mDomeExtrudeAction = new QAction(QIcon(":images/extrude_dome.png"), tr("Dome"), this); - mDomeExtrudeAction->setCheckable(true); - sm->registerAction(mDomeExtrudeAction, "Extrusion Operations", ""); - mDomeExtrudeAction->setStatusTip(tr("Enter Dome Extrude Mode")); - mDomeExtrudeAction->setToolTip(tr("Dome Extrude Mode")); - connect(mDomeExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerDomeExtrude())); - actionList->addAction(mDomeExtrudeAction); -} - -QMenu* ExtrusionsMode::getMenu() -{ - mExtrusionMenu = new QMenu(tr("Extrusion")); - - mExtrusionMenu->addAction(mDooSabinExtrudeAction); - mExtrusionMenu->addAction(mCubicalExtrudeAction); - mExtrusionMenu->addAction(mDodecahedralExtrudeAction); - mExtrusionMenu->addAction(mIcosahedralExtrudeAction); - mExtrusionMenu->addAction(mOctahedralExtrudeAction); - mExtrusionMenu->addAction(mStellateExtrudeAction); - mExtrusionMenu->addAction(mDoubleStellateExtrudeAction); - mExtrusionMenu->addAction(mDomeExtrudeAction); - - return mExtrusionMenu; -} - -void ExtrusionsMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mDooSabinExtrudeAction); - actionGroup->addAction(mCubicalExtrudeAction); - actionGroup->addAction(mDodecahedralExtrudeAction); - actionGroup->addAction(mIcosahedralExtrudeAction); - actionGroup->addAction(mOctahedralExtrudeAction); - actionGroup->addAction(mStellateExtrudeAction); - actionGroup->addAction(mDoubleStellateExtrudeAction); - actionGroup->addAction(mDomeExtrudeAction); - - toolBar->addAction(mDooSabinExtrudeAction); - toolBar->addAction(mCubicalExtrudeAction); - toolBar->addAction(mDodecahedralExtrudeAction); - toolBar->addAction(mIcosahedralExtrudeAction); - toolBar->addAction(mOctahedralExtrudeAction); - toolBar->addAction(mStellateExtrudeAction); - toolBar->addAction(mDoubleStellateExtrudeAction); - toolBar->addAction(mDomeExtrudeAction); - - stackedWidget->addWidget(mDooSabinExtrudeWidget); - stackedWidget->addWidget(mCubicalExtrudeWidget); - stackedWidget->addWidget(mDodecahedralExtrudeWidget); - stackedWidget->addWidget(mIcosahedralExtrudeWidget); - stackedWidget->addWidget(mOctahedralExtrudeWidget); - stackedWidget->addWidget(mStellateExtrudeWidget); - stackedWidget->addWidget(mDoubleStellateExtrudeWidget); - stackedWidget->addWidget(mDomeExtrudeWidget); -} - -void ExtrusionsMode::triggerDooSabinExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mDooSabinExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ExtrudeFaceDS); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::DooSabinExtrude); - ((MainWindow*)mParent)->setSpinBoxes(dooSabinLengthSpinBox, dooSabinTwistSpinBox, dooSabinScaleSpinBox, dooSabinSegmentsSpinBox); -} - -void ExtrusionsMode::triggerCubicalExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mCubicalExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ExtrudeFace); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::CubicalExtrude); - ((MainWindow*)mParent)->setSpinBoxes(cubicalLengthSpinBox, cubicalRotationSpinBox, cubicalScaleSpinBox, cubicalSegmentsSpinBox); -} - -void ExtrusionsMode::triggerDodecahedralExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mDodecahedralExtrudeWidget); - // if (((MainWindow*)mParent)->getExtrudeMultiple()) - // ((MainWindow*)mParent)->setMode(MainWindow::SelectMultiple); - // else - ((MainWindow*)mParent)->setMode(MainWindow::ExtrudeFaceDodeca); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::DodecahedralExtrude); - ((MainWindow*)mParent)->setSpinBoxes(dodecahedralLengthSpinBox, dodecahedralScaleSpinBox, dodecahedralSegmentsSpinBox); -} - -void ExtrusionsMode::triggerIcosahedralExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mIcosahedralExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ExtrudeFaceIcosa); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::IcosahedralExtrude); - ((MainWindow*)mParent)->setSpinBoxes(icosahedralLengthSpinBox, icosahedralScaleSpinBox, icosahedralSegmentsSpinBox); -} - -void ExtrusionsMode::triggerOctahedralExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mOctahedralExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ExtrudeDualFace); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::OctahedralExtrude); - ((MainWindow*)mParent)->setSpinBoxes(octahedralLengthSpinBox, octahedralRotationSpinBox, octahedralScaleSpinBox, octahedralSegmentsSpinBox); -} - -void ExtrusionsMode::triggerStellateExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mStellateExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::StellateFace); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::StellateExtrude); - ((MainWindow*)mParent)->setSpinBoxes(stellateLengthSpinBox); -} - -void ExtrusionsMode::triggerDoubleStellateExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mDoubleStellateExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::DoubleStellateFace); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::DoubleStellateExtrude); - ((MainWindow*)mParent)->setSpinBoxes(doubleStellateLengthSpinBox); -} - -void ExtrusionsMode::triggerDomeExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mDomeExtrudeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ExtrudeFaceDome); - ((MainWindow*)mParent)->setExtrusionMode(MainWindow::DomeExtrude); - ((MainWindow*)mParent)->setSpinBoxes(domeHeightSpinBox, domeRotationSpinBox, domeScaleSpinBox); -} - -void ExtrusionsMode::setLength(double value) -{ - dooSabinLengthSpinBox->setValue(value); - cubicalLengthSpinBox->setValue(value); - // dodecahedralLengthSpinBox->setValue(value); - // icosahedralLengthSpinBox->setValue(value); - octahedralLengthSpinBox->setValue(value); - stellateLengthSpinBox->setValue(value); - doubleStellateLengthSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength(value); -} -void ExtrusionsMode::setRotation(double value) -{ - dooSabinTwistSpinBox->setValue(value); - cubicalRotationSpinBox->setValue(value); - octahedralRotationSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeRotation((int)value); -} - -void ExtrusionsMode::setSegments(double value) -{ - dooSabinSegmentsSpinBox->setValue(value); - cubicalSegmentsSpinBox->setValue(value); - dodecahedralSegmentsSpinBox->setValue(value); - icosahedralSegmentsSpinBox->setValue(value); - octahedralSegmentsSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeNumExtrusions((int)value); -} - -void ExtrusionsMode::setScale(double value) -{ - dooSabinScaleSpinBox->setValue(value); - cubicalScaleSpinBox->setValue(value); - // dodecahedralScaleSpinBox->setValue(value); - // icosahedralScaleSpinBox->setValue(value); - octahedralScaleSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeScale(value); -} - -void ExtrusionsMode::setLength1(double value) -{ - // dodecahedralLength1SpinBox->setValue(value); - // icosahedralLength1SpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength1(value); -} - -void ExtrusionsMode::setLength2(double value) -{ - // dodecahedralLength2SpinBox->setValue(value); - // icosahedralLength2SpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength2(value); -} - -void ExtrusionsMode::setLength3(double value) -{ - // dodecahedralLength3SpinBox->setValue(value); - // icosahedralLength3SpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength3(value); -} - -void ExtrusionsMode::setAngle(double value) -{ - // dodecahedralAngleSpinBox->setValue(value); - // icosahedralAngleSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeAngle(value); -} - -void ExtrusionsMode::setLength1Icosa(double value) -{ - // dodecahedralLength1SpinBox->setValue(value); - // icosahedralLength1SpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength1Icosa(value); -} - -void ExtrusionsMode::setLength2Icosa(double value) -{ - // dodecahedralLength2SpinBox->setValue(value); - // icosahedralLength2SpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength2Icosa(value); -} - -void ExtrusionsMode::setLength3Icosa(double value) -{ - // dodecahedralLength3SpinBox->setValue(value); - // icosahedralLength3SpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeLength3Icosa(value); -} - -void ExtrusionsMode::setAngleIcosa(double value) -{ - // dodecahedralAngleSpinBox->setValue(value); - // icosahedralAngleSpinBox->setValue(value); - - ((MainWindow*)mParent)->changeExtrudeAngleIcosa(value); -} - -QDoubleSpinBox *ExtrusionsMode::createDoubleSpinBox( - QGridLayout *layout, QLabel *label, QString s, - double low, double high, double step, double value, double decimals, - int row, int col) -{ - // label = new QLabel(s,this); - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox(this); - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -void ExtrusionsMode::setupDooSabinExtrude() -{ - mDooSabinExtrudeLayout = new QGridLayout; - mDooSabinExtrudeLayout->setVerticalSpacing(1); - mDooSabinExtrudeLayout->setHorizontalSpacing(1); - // mDooSabinExtrudeLayout->setMargin(0); - //length - dooSabinLengthLabel = new QLabel(this); - dooSabinLengthSpinBox = createDoubleSpinBox( - mDooSabinExtrudeLayout, dooSabinLengthLabel, tr("Length"), - -100.0, 100.0, 0.1, 2.0, 3, 0, 0); - connect(dooSabinLengthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength(double))); - //rotation - dooSabinTwistLabel = new QLabel(this); - dooSabinTwistSpinBox = createDoubleSpinBox( - mDooSabinExtrudeLayout, dooSabinTwistLabel, tr("Twist"), - -5, 5, .01, 0.0, 3, 1, 0); - connect(dooSabinTwistSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDooSabinExtrudeTwist(double))); - //scale - dooSabinScaleLabel = new QLabel(this); - dooSabinScaleSpinBox = createDoubleSpinBox( - mDooSabinExtrudeLayout, dooSabinScaleLabel, tr("Scale"), - 0.0, 10.0, 0.01, 1.0, 3, 2, 0); - connect(dooSabinScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setScale(double))); - //segments - dooSabinSegmentsLabel = new QLabel(this); - dooSabinSegmentsSpinBox = createDoubleSpinBox( - mDooSabinExtrudeLayout, dooSabinSegmentsLabel, tr("Segments"), - 1, 50, 1, 1, 0, 3, 0); - connect(dooSabinSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setSegments(double))); - - performDooSabinExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performDooSabinExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mDooSabinExtrudeLayout->addWidget(performDooSabinExtrusionButton, 4, 0, 1, 2); - - mDooSabinExtrudeLayout->setRowStretch(5, 1); - mDooSabinExtrudeLayout->setColumnStretch(2, 1); - mDooSabinExtrudeWidget->setWindowTitle(tr("Doo Sabin Extrusion")); - mDooSabinExtrudeWidget->setLayout(mDooSabinExtrudeLayout); -} - -void ExtrusionsMode::setupCubicalExtrude() -{ - mCubicalExtrudeLayout = new QGridLayout; - mCubicalExtrudeLayout->setVerticalSpacing(1); - mCubicalExtrudeLayout->setHorizontalSpacing(1); - // mCubicalExtrudeLayout->setMargin(0); - //length - cubicalLengthLabel = new QLabel(this); - cubicalLengthSpinBox = createDoubleSpinBox( - mCubicalExtrudeLayout, cubicalLengthLabel, tr("Length"), - -100.0, 100.0, 0.1, 2.0, 3, 0, 0); - connect(cubicalLengthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength(double))); - //rotation - cubicalRotationLabel = new QLabel(this); - cubicalRotationSpinBox = createDoubleSpinBox( - mCubicalExtrudeLayout, cubicalRotationLabel, tr("Rotation"), - 0, 360, 1, 0.0, 3, 1, 0); - connect(cubicalRotationSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setRotation(double))); - //scale - cubicalScaleLabel = new QLabel(this); - cubicalScaleSpinBox = createDoubleSpinBox( - mCubicalExtrudeLayout, cubicalScaleLabel, tr("Scale"), - 0.0, 10.0, 0.01, 1.0, 3, 2, 0); - connect(cubicalScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setScale(double))); - //segments - cubicalSegmentsLabel = new QLabel(this); - cubicalSegmentsSpinBox = createDoubleSpinBox( - mCubicalExtrudeLayout, cubicalSegmentsLabel, tr("Segments"), - 1, 50, 1, 1, 0, 3, 0); - connect(cubicalSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setSegments(double))); - - performCubicalExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performCubicalExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mCubicalExtrudeLayout->addWidget(performCubicalExtrusionButton, 4, 0, 1, 2); - - mCubicalExtrudeLayout->setRowStretch(5, 1); - mCubicalExtrudeLayout->setColumnStretch(2, 1); - mCubicalExtrudeWidget->setWindowTitle(tr("Cubical Extrusion")); - mCubicalExtrudeWidget->setLayout(mCubicalExtrudeLayout); -} - -void ExtrusionsMode::setupDodecahedralExtrude() -{ - mDodecahedralExtrudeLayout = new QGridLayout; - mDodecahedralExtrudeLayout->setVerticalSpacing(1); - mDodecahedralExtrudeLayout->setHorizontalSpacing(1); - // mDodecahedralExtrudeLayout->setMargin(0); - // //length - // dodecahedralLengthSpinBox = createDoubleSpinBox(mDodecahedralExtrudeLayout, dodecahedralLengthLabel, tr("Length"), -100.0, 100.0, 0.1, 2.0, 1, 0,0); - // connect(dodecahedralLengthSpinBox, SIGNAL(valueChanged(double)),this, SLOT(setLength(double))); - //length1 - dodecahedralLength1Label = new QLabel(this); - dodecahedralLength1SpinBox = createDoubleSpinBox( - mDodecahedralExtrudeLayout, dodecahedralLength1Label, tr("Length 1"), - 0.0, 100.0, 0.1, 0.5, 3, 0, 0); - connect(dodecahedralLength1SpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength1(double))); - //length2 - dodecahedralLength2Label = new QLabel(this); - dodecahedralLength2SpinBox = createDoubleSpinBox( - mDodecahedralExtrudeLayout, dodecahedralLength2Label, tr("Length 2"), - 0.0, 100.0, 0.1, 1.0, 3, 1, 0); - connect(dodecahedralLength2SpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength2(double))); - //length3 - dodecahedralLength3Label = new QLabel(this); - dodecahedralLength3SpinBox = createDoubleSpinBox( - mDodecahedralExtrudeLayout, dodecahedralLength3Label, tr("Length 3"), - 0.0, 100.0, 0.1, 1.0, 3, 2, 0); - connect(dodecahedralLength3SpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength3(double))); - //angle - dodecahedralAngleLabel = new QLabel(this); - dodecahedralAngleSpinBox = createDoubleSpinBox( - mDodecahedralExtrudeLayout, dodecahedralAngleLabel, tr("Angle"), - 0.0, 180.0, 0.1, 40.0, 3, 3, 0); - connect(dodecahedralAngleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setAngle(double))); - // //scale - // dodecahedralScaleSpinBox = createDoubleSpinBox(mDodecahedralExtrudeLayout, dodecahedralScaleLabel, tr("Scale"), 0.0, 10.0, 0.01, 1.0, 2, 1,0); - // connect(dodecahedralScaleSpinBox, SIGNAL(valueChanged(double)),this, SLOT(setScale(double))); - //segments - dodecahedralSegmentsLabel = new QLabel(this); - dodecahedralSegmentsSpinBox = createDoubleSpinBox(mDodecahedralExtrudeLayout, dodecahedralSegmentsLabel, tr("Segments"), 1, 50, 1, 1, 0, 4, 0); - connect(dodecahedralSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setSegments(double))); - //mesh flat edges checkbox - hexagonalizeCheckBox = new QCheckBox(tr("Hexagonalize"), this); - connect(hexagonalizeCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(toggleHexagonalizeDodecaExtrudeFlag(int))); - - mDodecahedralExtrudeLayout->addWidget(hexagonalizeCheckBox, 5, 1); - - performDodecahedralExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performDodecahedralExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mDodecahedralExtrudeLayout->addWidget(performDodecahedralExtrusionButton, 6, 0, 1, 2); - - mDodecahedralExtrudeLayout->setRowStretch(7, 1); - mDodecahedralExtrudeLayout->setColumnStretch(2, 1); - mDodecahedralExtrudeWidget->setWindowTitle(tr("Dodecahedral Extrusion")); - mDodecahedralExtrudeWidget->setLayout(mDodecahedralExtrudeLayout); -} - -void ExtrusionsMode::setupIcosahedralExtrude() -{ - mIcosahedralExtrudeLayout = new QGridLayout; - mIcosahedralExtrudeLayout->setVerticalSpacing(1); - mIcosahedralExtrudeLayout->setHorizontalSpacing(1); - // mIcosahedralExtrudeLayout->setMargin(0); - //length - // icosahedralLengthSpinBox = createDoubleSpinBox(mIcosahedralExtrudeLayout, icosahedralLengthLabel, tr("Length"), -100.0, 100.0, 0.1, 2.0, 1, 0,0); - // connect(icosahedralLengthSpinBox, SIGNAL(valueChanged(double)),this, SLOT(setLength(double))); - //scale - // icosahedralScaleSpinBox = createDoubleSpinBox(mIcosahedralExtrudeLayout, icosahedralScaleLabel, tr("Scale"), 0.0, 10.0, 0.01, 1.0, 2, 1,0); - // connect(icosahedralScaleSpinBox, SIGNAL(valueChanged(double)),this, SLOT(setScale(double))); - - //length1 - icosahedralLength1Label = new QLabel(this); - icosahedralLength1SpinBox = createDoubleSpinBox( - mIcosahedralExtrudeLayout, icosahedralLength1Label, tr("Length 1"), - 0.0, 100.0, 0.1, 0.5, 3, 0, 0); - connect(icosahedralLength1SpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength1Icosa(double))); - //length2 - icosahedralLength2Label = new QLabel(this); - icosahedralLength2SpinBox = createDoubleSpinBox( - mIcosahedralExtrudeLayout, icosahedralLength2Label, tr("Length 2"), - 0.0, 100.0, 0.1, 0.7, 3, 1, 0); - connect(icosahedralLength2SpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength2Icosa(double))); - //length3 - icosahedralLength3Label = new QLabel(this); - icosahedralLength3SpinBox = createDoubleSpinBox( - mIcosahedralExtrudeLayout, icosahedralLength3Label, tr("Length 3"), - 0.0, 100.0, 0.1, 0.8, 3, 2, 0); - connect(icosahedralLength3SpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength3Icosa(double))); - //angle - icosahedralAngleLabel = new QLabel(this); - icosahedralAngleSpinBox = createDoubleSpinBox( - mIcosahedralExtrudeLayout, icosahedralAngleLabel, tr("Angle"), - 0.0, 180.0, 0.1, 50.0, 3, 3, 0); - connect(icosahedralAngleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setAngleIcosa(double))); - //segments - icosahedralSegmentsLabel = new QLabel(this); - icosahedralSegmentsSpinBox = createDoubleSpinBox( - mIcosahedralExtrudeLayout, icosahedralSegmentsLabel, tr("Segments"), - 1, 50, 1, 1, 0, 4, 0); - connect(icosahedralSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setSegments(double))); - - performIcosahedralExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performIcosahedralExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mIcosahedralExtrudeLayout->addWidget(performIcosahedralExtrusionButton, 5, 0, 1, 2); - - mIcosahedralExtrudeLayout->setRowStretch(6, 1); - mIcosahedralExtrudeLayout->setColumnStretch(2, 1); - mIcosahedralExtrudeWidget->setWindowTitle(tr("Icosahedral Extrusion")); - mIcosahedralExtrudeWidget->setLayout(mIcosahedralExtrudeLayout); -} - -void ExtrusionsMode::setupOctahedralExtrude() -{ - mOctahedralExtrudeLayout = new QGridLayout; - mOctahedralExtrudeLayout->setVerticalSpacing(1); - mOctahedralExtrudeLayout->setHorizontalSpacing(1); - // mOctahedralExtrudeLayout->setMargin(0); - //length - octahedralLengthLabel = new QLabel(this); - octahedralLengthSpinBox = createDoubleSpinBox( - mOctahedralExtrudeLayout, octahedralLengthLabel, tr("Length"), - -100.0, 100.0, 0.1, 2.0, 3, 0, 0); - connect(octahedralLengthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength(double))); - //rotation - octahedralRotationLabel = new QLabel(this); - octahedralRotationSpinBox = createDoubleSpinBox( - mOctahedralExtrudeLayout, octahedralRotationLabel, tr("Rotation"), - 0, 360, 1, 0.0, 3, 1, 0); - connect(octahedralRotationSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setRotation(double))); - //scale - octahedralScaleLabel = new QLabel(this); - octahedralScaleSpinBox = createDoubleSpinBox( - mOctahedralExtrudeLayout, octahedralScaleLabel, tr("Scale"), - 0.0, 10.0, 0.01, 1.0, 3, 2, 0); - connect(octahedralScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setScale(double))); - //segments - octahedralSegmentsLabel = new QLabel(this); - octahedralSegmentsSpinBox = createDoubleSpinBox( - mOctahedralExtrudeLayout, octahedralSegmentsLabel, tr("Segments"), - 1, 50, 1, 1, 0, 3, 0); - connect(octahedralSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setSegments(double))); - //mesh flat edges checkbox - meshFlatEdgesCheckBox = new QCheckBox(tr("Mesh Flat Edges"), this); - connect(meshFlatEdgesCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(toggleDualMeshEdgesFlag(int))); - - mOctahedralExtrudeLayout->addWidget(meshFlatEdgesCheckBox, 4, 1); - - performOctahedralExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performOctahedralExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mOctahedralExtrudeLayout->addWidget(performOctahedralExtrusionButton, 5, 0, 1, 2); - - mOctahedralExtrudeLayout->setRowStretch(6, 1); - mOctahedralExtrudeLayout->setColumnStretch(2, 1); - mOctahedralExtrudeWidget->setWindowTitle(tr("Octahedral Extrusion")); - mOctahedralExtrudeWidget->setLayout(mOctahedralExtrudeLayout); -} - -void ExtrusionsMode::setupStellateExtrude() -{ - mStellateExtrudeLayout = new QGridLayout; - mStellateExtrudeLayout->setVerticalSpacing(1); - mStellateExtrudeLayout->setHorizontalSpacing(1); - // mStellateExtrudeLayout->setMargin(0); - //length - stellateLengthLabel = new QLabel(this); - stellateLengthSpinBox = createDoubleSpinBox( - mStellateExtrudeLayout, stellateLengthLabel, tr("Length"), - -100.0, 100.0, 0.1, 2.0, 3, 0, 0); - connect(stellateLengthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength(double))); - - performStellateExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performStellateExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mStellateExtrudeLayout->addWidget(performStellateExtrusionButton, 1, 0, 1, 2); - - mStellateExtrudeLayout->setRowStretch(2, 1); - mStellateExtrudeLayout->setColumnStretch(2, 1); - mStellateExtrudeWidget->setWindowTitle(tr("Stellate Extrusion")); - mStellateExtrudeWidget->setLayout(mStellateExtrudeLayout); -} - -void ExtrusionsMode::setupDoubleStellateExtrude() -{ - mDoubleStellateExtrudeLayout = new QGridLayout; - mDoubleStellateExtrudeLayout->setVerticalSpacing(1); - mDoubleStellateExtrudeLayout->setHorizontalSpacing(1); - // mDoubleStellateExtrudeLayout->setMargin(0); - //length - doubleStellateLengthLabel = new QLabel(this); - doubleStellateLengthSpinBox = createDoubleSpinBox( - mDoubleStellateExtrudeLayout, doubleStellateLengthLabel, - tr("Length"), -100.0, 100.0, 0.1, 2.0, 3, 0, 0); - connect(doubleStellateLengthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setLength(double))); - - performDoubleStellateExtrusionButton = new QPushButton(tr("Extrude Selected Faces"), this); - connect(performDoubleStellateExtrusionButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mDoubleStellateExtrudeLayout->addWidget(performDoubleStellateExtrusionButton, 1, 0, 1, 2); - - mDoubleStellateExtrudeLayout->setRowStretch(2, 1); - mDoubleStellateExtrudeLayout->setColumnStretch(2, 1); - mDoubleStellateExtrudeWidget->setWindowTitle(tr("Double Stellate Extrusion")); - mDoubleStellateExtrudeWidget->setLayout(mDoubleStellateExtrudeLayout); -} - -void ExtrusionsMode::setupDomeExtrude() -{ - mDomeExtrudeLayout = new QGridLayout; - mDomeExtrudeLayout->setVerticalSpacing(1); - mDomeExtrudeLayout->setHorizontalSpacing(1); - // mDomeLayout->setMargin(0); - domeHeightLabel = new QLabel(this); - domeHeightSpinBox = createDoubleSpinBox( - mDomeExtrudeLayout, domeHeightLabel, tr("Height:"), - -10.0, 100.0, 0.01, 1.0, 3, 0, 0); - connect(domeHeightSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDomeExtrudeLength(double))); - domeRotationLabel = new QLabel(this); - domeRotationSpinBox = createDoubleSpinBox( - mDomeExtrudeLayout, domeRotationLabel, tr("Twist:"), -1.0, 1.0, 0.01, 0.0, 3, 1, 0); - connect(domeRotationSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDomeExtrudeRotation(double))); - domeScaleLabel = new QLabel(this); - domeScaleSpinBox = createDoubleSpinBox( - mDomeExtrudeLayout, domeScaleLabel, tr("Scale:"), 0.0, 10.0, 0.01, 1.0, 3, 2, 0); - connect(domeScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDomeExtrudeScale(double))); - domeButton = new QPushButton(tr("Perform Extrusion"), this); - connect(domeButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performExtrusion())); - mDomeExtrudeLayout->addWidget(domeButton, 3, 0, 1, 2); - mDomeExtrudeLayout->setRowStretch(4, 1); - mDomeExtrudeLayout->setColumnStretch(2, 1); - mDomeExtrudeWidget->setWindowTitle("Dome Extrusion"); - mDomeExtrudeWidget->setLayout(mDomeExtrudeLayout); -} - -void ExtrusionsMode::retranslateUi() -{ - //actions - mDooSabinExtrudeAction->setText(tr("Doo Sabin")); - mDooSabinExtrudeAction->setStatusTip(tr("Enter Doo Sabin Extrude Mode")); - mDooSabinExtrudeAction->setToolTip(tr("Doo Sabin Extrude Mode")); - - mCubicalExtrudeAction->setText(tr("Cubical")); - mCubicalExtrudeAction->setStatusTip(tr("Enter Cubical Extrude Mode")); - mCubicalExtrudeAction->setToolTip(tr("Cubical Extrude Mode")); - - mDodecahedralExtrudeAction->setText(tr("Dodecahedral")); - mDodecahedralExtrudeAction->setStatusTip(tr("Enter Dodecahedral Extrude Mode")); - mDodecahedralExtrudeAction->setToolTip(tr("Dodecahedral Extrude Mode")); - - mIcosahedralExtrudeAction->setText(tr("Icosahedral")); - mIcosahedralExtrudeAction->setStatusTip(tr("Enter Icosahedral Extrude Mode")); - mIcosahedralExtrudeAction->setToolTip(tr("Icosahedral Extrude Mode")); - - mOctahedralExtrudeAction->setText(tr("Octahedral")); - mOctahedralExtrudeAction->setStatusTip(tr("Enter Octahedral Extrude Mode")); - mOctahedralExtrudeAction->setToolTip(tr("Octahedral Extrude Mode")); - - mStellateExtrudeAction->setText(tr("Stellate")); - mStellateExtrudeAction->setStatusTip(tr("Enter Stellate Extrude Mode")); - mStellateExtrudeAction->setToolTip(tr("Stellate Extrude Mode")); - - mDoubleStellateExtrudeAction->setText(tr("Double Stellate")); - mDoubleStellateExtrudeAction->setStatusTip(tr("Enter Double Stellate Mode")); - mDoubleStellateExtrudeAction->setToolTip(tr("Double Stellate Mode")); - - mDomeExtrudeAction->setText(tr("Dome")); - mDomeExtrudeAction->setStatusTip(tr("Enter Dome Extrude Mode")); - mDomeExtrudeAction->setToolTip(tr("Dome Extrude Mode")); - - mExtrusionMenu->setTitle(tr("Extrusion")); - - //labels and buttons and stuff - dooSabinLengthLabel->setText(tr("Length")); - dooSabinScaleLabel->setText(tr("Scale")); - dooSabinTwistLabel->setText(tr("Twist")); - dooSabinSegmentsLabel->setText(tr("Segments")); - performDooSabinExtrusionButton->setText(tr("Extrude Selected Faces")); - mDooSabinExtrudeWidget->setWindowTitle(tr("Doo Sabin Extrusion")); - cubicalLengthLabel->setText(tr("Length")); - cubicalRotationLabel->setText(tr("Rotation")); - cubicalScaleLabel->setText(tr("Scale")); - cubicalSegmentsLabel->setText(tr("Segments")); - performCubicalExtrusionButton->setText(tr("Extrude Selected Faces")); - mCubicalExtrudeWidget->setWindowTitle(tr("Cubical Extrusion")); - dodecahedralLength1Label->setText(tr("Length 1")); - dodecahedralLength2Label->setText(tr("Length 2")); - dodecahedralLength3Label->setText(tr("Length 3")); - dodecahedralAngleLabel->setText(tr("Angle")); - dodecahedralSegmentsLabel->setText(tr("Segments")); - hexagonalizeCheckBox->setText(tr("Hexagonalize")); - performDodecahedralExtrusionButton->setText(tr("Extrude Selected Faces")); - mDodecahedralExtrudeWidget->setWindowTitle(tr("Dodecahedral Extrusion")); - icosahedralLength1Label->setText(tr("Length 1")); - icosahedralLength2Label->setText(tr("Length 2")); - icosahedralLength3Label->setText(tr("Length 3")); - icosahedralAngleLabel->setText(tr("Angle")); - icosahedralSegmentsLabel->setText(tr("Segments")); - performIcosahedralExtrusionButton->setText(tr("Extrude Selected Faces")); - mIcosahedralExtrudeWidget->setWindowTitle(tr("Icosahedral Extrusion")); - octahedralLengthLabel->setText(tr("Length")); - octahedralRotationLabel->setText(tr("Rotation")); - octahedralScaleLabel->setText(tr("Scale")); - octahedralSegmentsLabel->setText(tr("Segments")); - meshFlatEdgesCheckBox->setText(tr("Mesh Flat Edges")); - performOctahedralExtrusionButton->setText(tr("Extrude Selected Faces")); - mOctahedralExtrudeWidget->setWindowTitle(tr("Octahedral Extrusion")); - stellateLengthLabel->setText(tr("Length")); - performStellateExtrusionButton->setText(tr("Extrude Selected Faces")); - mStellateExtrudeWidget->setWindowTitle(tr("Stellate Extrusion")); - doubleStellateLengthLabel->setText(tr("Length")); - performDoubleStellateExtrusionButton->setText(tr("Extrude Selected Faces")); - mDoubleStellateExtrudeWidget->setWindowTitle(tr("Double Stellate Extrusion")); - domeHeightLabel->setText(tr("Height:")); - domeRotationLabel->setText(tr("Twist:")); - domeScaleLabel->setText(tr("Scale:")); - domeButton->setText(tr("Perform Extrusion")); - mDomeExtrudeWidget->setWindowTitle("Dome Extrusion"); -} diff --git a/topmodx/src/ExtrusionsMode.h b/topmodx/src/ExtrusionsMode.h deleted file mode 100644 index ab2b4bb..0000000 --- a/topmodx/src/ExtrusionsMode.h +++ /dev/null @@ -1,222 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef EXTRUSIONMODE_H -#define EXTRUSIONMODE_H - -#include - -/*! -\file ExtrusionsMode.hh -\brief Definition of the ExtrusionsMode class - -\see ExtrusionsMode -*/ - -#include "MainWindow.h" - -class MainWindow; - -class ExtrusionsMode : public QWidget -{ - Q_OBJECT - -public: - ExtrusionsMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu* getMenu(); - void retranslateUi(); - -protected: - void setupDooSabinExtrude(); - void setupCubicalExtrude(); - void setupDodecahedralExtrude(); - void setupIcosahedralExtrude(); - void setupOctahedralExtrude(); - void setupStellateExtrude(); - void setupDoubleStellateExtrude(); - void setupDomeExtrude(); - QDoubleSpinBox *createDoubleSpinBox( - QGridLayout *layout, QLabel *label, QString s, - double low, double high, double step, double value, double decimals, - int row, int col); - -public slots: - void setLength(double value); - void setLength1(double value); - void setLength2(double value); - void setLength3(double value); - void setAngle(double value); - void setLength1Icosa(double value); - void setLength2Icosa(double value); - void setLength3Icosa(double value); - void setAngleIcosa(double value); - void setRotation(double value); - void setSegments(double value); - void setScale(double value); - - void triggerDooSabinExtrude(); - void triggerCubicalExtrude(); - void triggerDodecahedralExtrude(); - void triggerIcosahedralExtrude(); - void triggerOctahedralExtrude(); - void triggerStellateExtrude(); - void triggerDoubleStellateExtrude(); - void triggerDomeExtrude(); - -public: - QAction *mDooSabinExtrudeAction; - QAction *mCubicalExtrudeAction; - QAction *mDodecahedralExtrudeAction; - QAction *mIcosahedralExtrudeAction; - QAction *mOctahedralExtrudeAction; - QAction *mStellateExtrudeAction; - QAction *mDoubleStellateExtrudeAction; - QAction *mDomeExtrudeAction; - - QWidget *mDooSabinExtrudeWidget; - QWidget *mCubicalExtrudeWidget; - QWidget *mDodecahedralExtrudeWidget; - QWidget *mIcosahedralExtrudeWidget; - QWidget *mOctahedralExtrudeWidget; - QWidget *mStellateExtrudeWidget; - QWidget *mDoubleStellateExtrudeWidget; - QWidget *mDomeExtrudeWidget; - - QGridLayout *mDooSabinExtrudeLayout; - QGridLayout *mCubicalExtrudeLayout; - QGridLayout *mDodecahedralExtrudeLayout; - QGridLayout *mIcosahedralExtrudeLayout; - QGridLayout *mOctahedralExtrudeLayout; - QGridLayout *mStellateExtrudeLayout; - QGridLayout *mDoubleStellateExtrudeLayout; - QGridLayout *mDomeExtrudeLayout; - - QWidget *mParent; - QMenu *mExtrusionMenu; - - //doo sabin extrude - QLabel *dooSabinLengthLabel; - QDoubleSpinBox *dooSabinLengthSpinBox; - QLabel *dooSabinTwistLabel; - QDoubleSpinBox *dooSabinTwistSpinBox; - QLabel *dooSabinScaleLabel; - QDoubleSpinBox *dooSabinScaleSpinBox; - QLabel *dooSabinSegmentsLabel; - QDoubleSpinBox *dooSabinSegmentsSpinBox; - - //cubic extrude - QLabel *cubicalLengthLabel; - QDoubleSpinBox *cubicalLengthSpinBox; - QLabel *cubicalRotationLabel; - QDoubleSpinBox *cubicalRotationSpinBox; - QLabel *cubicalScaleLabel; - QDoubleSpinBox *cubicalScaleSpinBox; - QLabel *cubicalSegmentsLabel; - QDoubleSpinBox *cubicalSegmentsSpinBox; - - //dodecahedral extrude - QLabel *dodecahedralLengthLabel; - QDoubleSpinBox *dodecahedralLengthSpinBox; - QLabel *dodecahedralScaleLabel; - QDoubleSpinBox *dodecahedralScaleSpinBox; - QLabel *dodecahedralLength1Label; - QDoubleSpinBox *dodecahedralLength1SpinBox; - QLabel *dodecahedralLength2Label; - QDoubleSpinBox *dodecahedralLength2SpinBox; - QLabel *dodecahedralLength3Label; - QDoubleSpinBox *dodecahedralLength3SpinBox; - QLabel *dodecahedralAngleLabel; - QDoubleSpinBox *dodecahedralAngleSpinBox; - QLabel *dodecahedralSegmentsLabel; - QDoubleSpinBox *dodecahedralSegmentsSpinBox; - QCheckBox *hexagonalizeCheckBox; - - //icosahedral extrude - QLabel *icosahedralLengthLabel; - QDoubleSpinBox *icosahedralLengthSpinBox; - QLabel *icosahedralScaleLabel; - QDoubleSpinBox *icosahedralScaleSpinBox; - QLabel *icosahedralSegmentsLabel; - QDoubleSpinBox *icosahedralSegmentsSpinBox; - QLabel *icosahedralLength1Label; - QDoubleSpinBox *icosahedralLength1SpinBox; - QLabel *icosahedralLength2Label; - QDoubleSpinBox *icosahedralLength2SpinBox; - QLabel *icosahedralLength3Label; - QDoubleSpinBox *icosahedralLength3SpinBox; - QLabel *icosahedralAngleLabel; - QDoubleSpinBox *icosahedralAngleSpinBox; - - - //octahedral extrude - QLabel *octahedralLengthLabel; - QDoubleSpinBox *octahedralLengthSpinBox; - QLabel *octahedralRotationLabel; - QDoubleSpinBox *octahedralRotationSpinBox; - QLabel *octahedralScaleLabel; - QDoubleSpinBox *octahedralScaleSpinBox; - QLabel *octahedralSegmentsLabel; - QDoubleSpinBox *octahedralSegmentsSpinBox; - QCheckBox *meshFlatEdgesCheckBox; - - //stellate extrude - QHBoxLayout *stellateLengthLayout; - QLabel *stellateLengthLabel; - QDoubleSpinBox *stellateLengthSpinBox; - - //double stellate - QHBoxLayout *doubleStellateLengthLayout; - QLabel *doubleStellateLengthLabel; - QDoubleSpinBox *doubleStellateLengthSpinBox; - - //dome extrude - QLabel *domeHeightLabel; - QLabel *domeRotationLabel; - QLabel *domeScaleLabel; - QDoubleSpinBox *domeHeightSpinBox; - QDoubleSpinBox *domeRotationSpinBox; - QDoubleSpinBox *domeScaleSpinBox; - - QPushButton *performDooSabinExtrusionButton; - QPushButton *performCubicalExtrusionButton; - QPushButton *performDodecahedralExtrusionButton; - QPushButton *performIcosahedralExtrusionButton; - QPushButton *performOctahedralExtrusionButton; - QPushButton *performStellateExtrusionButton; - QPushButton *performDoubleStellateExtrusionButton; - QPushButton *domeButton; - -}; - -#endif diff --git a/topmodx/src/GLWidget.cc b/topmodx/src/GLWidget.cc deleted file mode 100644 index f4cf152..0000000 --- a/topmodx/src/GLWidget.cc +++ /dev/null @@ -1,1903 +0,0 @@ -/* - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * 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 2 - * 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, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * - * Short description of this file - * - * name of .hh file containing function prototypes - * - */ - -#include "GLWidget.h" -#include "DLFLSelection.h" - -/*! - \ingroup gui - @{ - - \class GLWidget - \brief The OpenGL viewport. - - \note also handles selection - - \see GLWidget -*/ - -DLFLLocatorPtrArray GLWidget::sel_lptr_array; -/*DLFLVertexPtrArray GLWidget::sel_vptr_array; - DLFLEdgePtrArray GLWidget::sel_eptr_array; - DLFLFacePtrArray GLWidget::sel_fptr_array; - DLFLFaceVertexPtrArray GLWidget::sel_fvptr_array; - extern DLFLVertexPtrArray DLFLObject::sel_vptr_array; // List of selected DLFLVertex pointers - extern DLFLEdgePtrArray DLFLObject::sel_eptr_array; // List of selected DLFLEdge pointers - extern DLFLFacePtrArray DLFLObject::sel_fptr_array; // List of selected DLFLFace pointers - extern DLFLFaceVertexPtrArray DLFLObject::sel_fvptr_array; // List of selected DLFLFaceVertex pointers -*/ -// QGLContext *cx; -// QGLFormat f; -// f.setStereo( TRUE ); -// QGLFormat::setDefaultFormat( f ); -// cx->setFormat( f ); -// if ( !cx->create() ) -// // printf("FALSE \n"); -// QMessageBox::about(this, tr("false"),tr("false")); -// if ( !cx->format().stereo() ) -// -// // QMessageBox::about(this, tr("false"),tr("false")); -// QGLFormat f; -// f.setStereo(true); -// QGLContext *cx = new QGLContext(f); -// // cx->setFormat(f); -// if (!cx->create()) -// exit(0); // no OpenGL support, or cannot render on the specified paintdevice -// if (!cx->format().stereo()) -// exit(0); // could not create stereo context - -GLWidget::GLWidget( - int w, int h, - DLFLRendererPtr rp, - QColor color, QColor vcolor, - DLFLObjectPtr op, - const QGLFormat & format, - QWidget * parent) - : QGLWidget(format, parent, nullptr) - , /*viewport(w,h,v),*/ object(op), patchObject(nullptr) - , renderer(rp), renderObject(true) - , mRenderColor(color), mViewportColor(vcolor)/*,grid(ZX,20.0,10)*/ - , showgrid(false), showaxes(false), mUseGPU(false), mAntialiasing(true) -{ - mParent = parent; - // Vector3d neweye = eye - center; - // double eyedist = norm(neweye); - // Matrix4x4 lmat = Transformation::lookat(neweye,Vector3d(0,0,0),up); - // transform = lmat; - // transform.translate(-center); - // camera.setEye(Vector3d(0,0,eyedist)); - - - //take cross product of lookat and up vector - and you're given one that looks right... - //then cross that with the lookat and you get the real up - Vector3d Aim(0, 0, 0); - Vector3d Pos(10, 10, 10); - Vector3d Up(-0.40824829046, 0.81649658093, -0.40824829046); - - // pos X up - // A X B - // double ax = -10, ay = -10, az = -10; - // double bx = 0, by = 1, bz = 0; - // - // double cx = ay*bz - az*by; - // double cy = az*bx - ax*bz; - // double cz = ax*by - ay*bx; - // - // double dx = cy*az - cz*ay; - // double dy = cz*ax - cx*az; - // double dz = cx*ay - cy*ax; - // - // double sqr = sqrt(dx*dx + dy*dy + dz*dz); - - - // std::cout << dx/sqr << " " << dy/sqr << " " << dz/sqr << "\n\n\n"; - // Vector3d vv(dx,dy,dz); - // normalize(vv); - // std::cout << vv << "\n"; - // - // Vector3d right = (-(normalized(Pos))) % Up; - // // Up = Vector3d(-0.408248,0.816497,-0.408248);//right % (-Pos); - // Up = normalized(right) % (-(normalized(Pos))); - // normalize(Up); - // std::cout << Up << std::endl; - // mCamera = new Camera2( eye, lookat, Vector3d(-0.408248,0.816497,-0.408248)); - - // mCamera = new Camera2( Pos, Aim, Up); - - // mCamera = new PerspCamera( Pos, Aim, Up); - mCamera = new PerspCamera(Vector3d(10, 10, 10), Vector3d(0, 0, 0), Vector3d(0, 1, 0)); - - // ArbitraryRotate(Vector3d(1,0,0),Vector3d(0,1,0),Vector3d(0,0,1),45.0f,45.0f,mCamera->Pos,mCamera->Aim); - - // Vector3d WindowX,WindowY,WindowZ; - // WindowX.set(1, 0, 0); - // WindowY.set(0, 1, 0); - // - // RotateX(&WindowX, 45); - // RotateY(&WindowX, 45); - // WindowX[2] = -WindowX[2]; - // - // RotateX(&WindowY, 45); - // RotateY(&WindowY, 45); - // WindowY[2] = -WindowY[2]; - // - // WindowZ = WindowX % WindowY; - // normalize(WindowZ); - // - // ArbitraryRotate(WindowX, WindowY, WindowZ, 0, 0, Pos, Aim); - // ArbitraryRotate(Vector3d(1, 0, 0), Vector3d(0, 1, 0), Vector3d(0, 0, 1), 0, 0, Pos, Aim); - - // Up = WindowY; - // normalize(Up); - -} - -GLWidget::~GLWidget() -{ -#ifdef GPU_OK - cgDestroyProgram(cg->vertProgram); - cgDestroyProgram(cg->fragProgram); - cgDestroyContext(cg->context); -#endif -} - -void GLWidget::redraw() -{ - repaint(); -} - -void GLWidget::initializeGL() -{ - setAutoBufferSwap(true); - glClearColor(mViewportColor.redF(), mViewportColor.greenF(), mViewportColor.blueF(), mViewportColor.alphaF()); - mCamera->SetProjection(width(), height()); - // viewport.resize(this->size().width(),this->size().height()); - if (mAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - - glShadeModel(GL_SMOOTH); - glEnable(GL_BLEND); // Enable Blending - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Type Of Blending To Use - - //initialize light position and color - plight.position.set(50, 25, 0); - plight.warmcolor.set(1, 1, 0.6); - plight.coolcolor.set(0.2, 0.2, 0.4); - plight.intensity = 2.0; - - mGlobalAmbient = QColor(0, 0, 0); - - //enable gl lighting for use with cg functions -#ifdef GPU_OK - enableGLLights(); -#endif - - mShowVertexIDs = false; - mShowEdgeIDs = false; - mShowFaceIDs = false; - mShowFaceVertexIDs = false; - mShowSelectedIDs = false; - mShowHUD = false; - mBrushSize = 2.5; - mShowBrush = false; - mShowSelectionWindow = false; - setMouseTracking(true); - - locatorPtr = new DLFLLocator(); // brianb - -#ifdef GPU_OK - if (mUseGPU) - initCg(); -#endif -} - -#ifdef GPU_OK -void GLWidget::enableGLLights() -{ - // plight.warmcolor.r, plight.warmcolor.g, plight.warmcolor.b - - // ENABLE THE LIGHTING - // glPushMatrix(); { - // glMatrixMode( GL_MODELVIEW); - // glLoadIdentity(); - // GLfloat lmodel_ambient[] = {0.8,0.8,0.8,1.0}; - // GLfloat lmodel_diffuse[] = {0.8,0.7,0.5,1.0}; - // GLfloat lmodel_specular[] = {0.0,0.0,0.0,1.0}; - // GLfloat spotDir[]= {0.0,-1.0,0.0}; - // GLfloat light_position[] = { plight.position[0], plight.position[1], plight.position[1], 1.0 }; //{ -1.0, 30.0, 5.0, 1.0 }; - // - // glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, spotDir); - // glLightfv(GL_LIGHT0, GL_AMBIENT, lmodel_ambient); - // glLightfv(GL_LIGHT0, GL_DIFFUSE, lmodel_diffuse); - // glLightfv(GL_LIGHT0, GL_SPECULAR, lmodel_specular); - // glLightfv(GL_LIGHT0, GL_POSITION, light_position); - // //GLfloat lmodel_diffuse2[] = {0.4,0.4,0.4,1.0}; - // //glLightfv(GL_LIGHT1, GL_DIFFUSE, lmodel_diffuse); - // //glLightfv(GL_LIGHT1, GL_POSITION, light_position2); - // } glPopMatrix(); - // glEnable(GL_LIGHT0); - //glEnable(GL_LIGHT1); - -} -#endif - -#ifdef GPU_OK - -void GLWidget::initCg() -{ - if (mUseGPU) - { - cg = CgData::instance(); - // Create Context - cg->context = cgCreateContext(); - checkForCgError("creating context"); - // Vertex Profile - cg->vertProfile = cgGLGetLatestProfile(CG_GL_VERTEX); - cgGLSetOptimalOptions(cg->vertProfile); - checkForCgError("selecting vertex profile"); - // Frag Profile - cg->fragProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT); - cgGLSetOptimalOptions(cg->fragProfile); - checkForCgError("selecting fragment profile"); - // Vertex Program - char *programName = new char[256]; - sprintf(programName, "%s", "shaders/vertShader.cg"); - cg->vertProgram = cgCreateProgramFromFile(cg->context, CG_SOURCE, programName, cg->vertProfile, nullptr, nullptr); - checkForCgError("creating vertex program from file"); - // Fragment Program - sprintf(programName, "%s", "shaders/fragShader.cg"); - cg->fragProgram = cgCreateProgramFromFile(cg->context, CG_SOURCE, programName, cg->fragProfile, nullptr, nullptr); - checkForCgError("creating fragment program from file"); - delete[] programName; - programName = 0; - - // Bind Variables to Cg Parameters - cg->camToWorld = cgGetNamedParameter(cg->vertProgram, "camToWorld"); - cg->camToWorldIT = cgGetNamedParameter(cg->vertProgram, "camToWorldIT"); - cg->worldToLight = cgGetNamedParameter(cg->vertProgram, "worldToLight"); - // cg->texture = cgGetNamedParameter( cg->fProgram, "texture"); - // cg->shadowMap = cgGetNamedParameter( cg->fProgram, "shadowMap" ); - // cg->renderToTexSize = cgGetNamedParameter( cg->fProgram, "renderToTexSize" ); - // cg->objectID = cgGetNamedParameter( cg->fProgram, "objectID" ); - // checkCgError( cg->context, 5 ); - - cg->attenDegrees = cgGetNamedParameter(cg->fragProgram, "attenDegrees"); - cg->eyePosition = cgGetNamedParameter(cg->vertProgram, "eyePosition"); - - // cg->velocity = cgGetNamedParameter( cg->vertProgram, "velocity" ); - // cg->objCenter = cgGetNamedParameter( cg->vertProgram, "objCenter" ); - - //from book - cg->globalAmbient = cgGetNamedParameter(cg->vertProgram, "globalAmbient"); - - //lighting - cg->lightWarmColor = cgGetNamedParameter(cg->vertProgram, "lightWarmColor"); - cg->lightCoolColor = cgGetNamedParameter(cg->vertProgram, "lightCoolColor"); - cg->lightIntensity = cgGetNamedParameter(cg->vertProgram, "lightIntensity"); - cg->lightPosition = cgGetNamedParameter(cg->vertProgram, "lightPosition"); - //object material - cg->Kd = cgGetNamedParameter(cg->vertProgram, "Kd"); - cg->Ka = cgGetNamedParameter(cg->vertProgram, "Ka"); - cg->Ks = cgGetNamedParameter(cg->vertProgram, "Ks"); - cg->basecolor = cgGetNamedParameter(cg->vertProgram, "basecolor"); - cg->shininess = cgGetNamedParameter(cg->vertProgram, "shininess"); - - cgGLLoadProgram(cg->vertProgram); - checkForCgError("loading vertex program"); - cgGLLoadProgram(cg->fragProgram); - checkForCgError("loading fragment program"); - } -} - -#endif // GPU_OK - -void GLWidget::paintEvent(QPaintEvent *event) -{ - //clear to a white background - // glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); - // glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - // glLoadIdentity(); - // glMatrixMode(GL_MODELVIEW); - // glViewport(0,0, width(), height() ); - // glLoadIdentity(); - // //transform the camera - // mCamera->SetProjection(width(),height()); - - QPainter painter; - painter.begin(this); - painter.setRenderHint(QPainter::Antialiasing); - - glPushAttrib(GL_ALL_ATTRIB_BITS); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.resize(width(),height()); - // mCamera->SetProjection(width(),height()); - - if (renderer) - { - renderer->initialize(); - } - - glClearColor(mViewportColor.redF(), mViewportColor.greenF(), mViewportColor.blueF(), mViewportColor.alphaF()); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - // setupViewport(width(), height()); - glEnable(GL_DEPTH_TEST); - // Multiply by the transformation matrix. dave and stuart* - // glMatrixMode(GL_PROJECTION); - // glLoadIdentity(); - // if ( pickmode ){ - // gluPickMatrix(mousex, mousey, pickw, pickh, viewport); - // } - // gluPerspective(FOV, WinX/(float)WinY, nearplane, farplane); - // glMatrixMode(GL_MODELVIEW); - // glLoadIdentity( ); - // SetCamera(); - mCamera->SetProjection(width(), height()); - - // Draw the axes if required. Use thick lines - if (showaxes) - { - glLineWidth(3.0); - glEnable(GL_LINE_STIPPLE); - glLineStipple(2, 0xAAAA); - glBegin(GL_LINES); - glColor3f(0.5, 0.25, 0.25); // X Axis - Red - glVertex3f(0, 0, 0); glVertex3f(-10, 0, 0); - glColor3f(0.25, 0.5, 0.25); // Z Axis - Green - glVertex3f(0, 0, 0); glVertex3f(0, 0, -10); - glColor3f(0.25, 0.25, 0.5); // Y Axis - Blue - glVertex3f(0, 0, 0); glVertex3f(0, -10, 0); - glEnd(); - glDisable(GL_LINE_STIPPLE); - glBegin(GL_LINES); - glColor3f(0.6, 0.25, 0.25); // X Axis - Red - glVertex3f(0, 0, 0); glVertex3f(10, 0, 0); - glColor3f(0.25, 0.6, 0.25); // Z Axis - Green - glVertex3f(0, 0, 0); glVertex3f(0, 0, 10); - glColor3f(0.25, 0.25, 0.6); // Y Axis - Blue - glVertex3f(0, 0, 0); glVertex3f(0, 10, 0); - glEnd(); - glLineWidth(3.0); - } - glDepthRange(0, 1); - - if (renderer) - { -#ifdef GPU_OK - if (mUseGPU) - { - cgGLBindProgram(cg->vertProgram); - checkForCgError("binding vertex program"); - cgGLBindProgram(cg->fragProgram); - checkForCgError("binding fragment program"); - - cgGLEnableProfile(cg->vertProfile); - checkForCgError("enabling vertex profile"); - cgGLEnableProfile(cg->fragProfile); - checkForCgError("enabling fragment profile"); - - //set cg parameters here - - //global ambient light - cgGLSetParameter3f(cg->globalAmbient, mGlobalAmbient.redF(), mGlobalAmbient.greenF(), mGlobalAmbient.blueF()); - //send lighing info - cgGLSetParameter3f(cg->lightWarmColor, plight.warmcolor.r, plight.warmcolor.g, plight.warmcolor.b); - cgGLSetParameter3f(cg->lightCoolColor, plight.coolcolor.r, plight.coolcolor.g, plight.coolcolor.b); - cgGLSetParameter1f(cg->lightIntensity, plight.intensity); - cgGLSetParameter3f(cg->lightPosition, plight.position[0], plight.position[1], plight.position[2]); - //object material - cgSetParameter3f(cg->basecolor, 0.0, 0.0, 0.0); - cgSetParameter3f(cg->Ka, mRenderColor.redF(), mRenderColor.greenF(), mRenderColor.blueF()); - cgSetParameter3f(cg->Kd, 0.0, 0.0, 0.0); - cgSetParameter3f(cg->Ks, 1.0, 1.0, 1.0); - cgSetParameter1f(cg->shininess, 50); - - // lookThruLight( ); - // glViewport(0,0,texRenderSize,texRenderSize); - // glMatrixMode(GL_PROJECTION); - // glLoadIdentity(); - // // gluPerspective( spotAtten*2, 1, NEAR, FAR ); - // //glOrtho( -50, 50, -50, 50, NEAR, FAR ); - // glMatrixMode( GL_MODELVIEW); - // glLoadIdentity(); - // gluLookAt(light_position[0],light_position[1],light_position[2],0.0f,0.0f,0.0f,0,0,1); - //glTranslatef(-light_position[0],-light_position[2],-light_position[1]); - //glRotatef(90,1,0,0); - } -#endif // GPU_OK - if (renderObject) - { - if (patchObject) - renderer->render(patchObject); - renderer->render(object); - } -#ifdef GPU_OK - if (mUseGPU) - { - cgGLDisableProfile(cg->vertProfile); - cgGLDisableProfile(cg->fragProfile); - } -#endif // GPU_OK - } - // Adjust the depthrange so selected items are shown clearly - glDepthRange(0, 1 - 0.0005 - 0.0005); - drawSelected(); - glDepthRange(0, 1); - - GLdouble model[4][4], proj[4][4]; - GLint view[4]; - -#ifndef Q_WS_QWS - glGetDoublev(GL_MODELVIEW_MATRIX, &model[0][0]); - glGetDoublev(GL_PROJECTION_MATRIX, &proj[0][0]); - glGetIntegerv(GL_VIEWPORT, &view[0]); -#endif - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0f, (GLfloat)width() / (GLfloat)height(), 0.1f, 100.0f); - - glPopAttrib(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - // glTranslated(0.0, 0.0, -50.0); - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - -#ifdef WITH_VERSE - if (VerseConnected & T_VERSE_CONNECTED) - { - // painter.drawText(rectangle, Qt::AlignCenter,tr("verse connected")); - // t_verse_update(); - } -#endif - - drawSelectionWindow(&painter); - //drawBrush(&painter); - drawHUD(&painter); - drawSelectedIDs(&painter, &model[0][0], &proj[0][0], &view[0]); - drawIDs(&painter, &model[0][0], &proj[0][0], &view[0]); // draw vertex, edge and face ids - - glPushAttrib(GL_ALL_ATTRIB_BITS); - - //try out some code to put an axis in the bottom left corner of the screen - glViewport(10.0, 10.0, 50.0, 50.0); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(10.0, 1.0, 1.0, 100); - // gluOrtho(-10.0, 10.0, -10, 10); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - Vector3d t = normalized(mCamera->getEye() - mCamera->getCenter())*10.0; - gluLookAt( - t[0], t[1], t[2], - //mCamera->getEye()[0],mCamera->getEye()[1],mCamera->getEye()[2], - // mCamera->getCenter()[0],mCamera->getCenter()[1],mCamera->getCenter()[2], - 0.0, 0.0, 0.0, - mCamera->getUp()[0], mCamera->getUp()[1], mCamera->getUp()[2]); - // 0.0,1.0,0.0); - glDisable(GL_BLEND); - glLineWidth(1.5); - glBegin(GL_LINES); - glColor3f(1.0, 0.25, 0.25); // X Axis - Red - glVertex3f(0, 0, 0); glVertex3f(1, 0, 0); - glColor3f(0.25, 1.0, 0.25); // Z Axis - Green - glVertex3f(0, 0, 0); glVertex3f(0, 0, 1); - glColor3f(0.25, 0.25, 1.0); // Y Axis - Blue - glVertex3f(0, 0, 0); glVertex3f(0, 1, 0); - glEnd(); - glLineWidth(3.0); - glEnable(GL_BLEND); // Enable Blending - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60.0f, (GLfloat)width() / (GLfloat)height(), 0.1f, 100.0f); - - glPopAttrib(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - // glTranslated(0.0, 0.0, -50.0); - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - painter.end(); -} - -void GLWidget::resizeGL(int width, int height) -{ - // setupViewport(width,height); - // drawText(this->size().width(),this->size().height()); - if (height == 0) height = 1; //Making Height Equal One - glViewport(0, 0, (GLint)width, (GLint)height); - - // viewport.resize(this->size().width(),this->size().height()); -} - -void GLWidget::setupViewport(int width, int height) -{ - // mScene->resize(width,height); - // setup viewport, projection etc.: - - // glViewport(0, 0, width, height); - // // glMatrixMode(GL_PROJECTION); // Select The Projection Matrix - // // glLoadIdentity(); // Reset The Projection Matrix - // // // Calculate The Aspect Ratio Of The Window - // // gluPerspective(60.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f); - // glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix -} - -void GLWidget::drawText(int width, int height) -{ -} - -/** -* \brief draw a selection window when in the proper mode -* by dave - experimental -*/ -void GLWidget::drawSelectionWindow(QPainter *painter) -{ - if (mShowSelectionWindow) - { - QBrush brush = QBrush(QColor(0, 0, 0, 255)); - QPen pen = QPen(brush, 1.0); - painter->setPen(pen); - painter->setBrush(QBrush(QColor(0, 0, 0, 50)));//Qt::NoBrush); - //get the mouse position from global coordinate system - int x = mapFromGlobal(QCursor::pos()).x(); - int y = mapFromGlobal(QCursor::pos()).y(); - // std::cout << "y = " << y << "\t\tYY = " << mSelectionWindowStartY <<" \n"; - painter->drawRect(mSelectionWindowStartX, height() - mSelectionWindowStartY, x - mSelectionWindowStartX, y - (height() - mSelectionWindowStartY)); - // painter->drawRect(1,0, x, y); - } -} - -void GLWidget::drawBrush(QPainter *painter) -{ - if (mShowBrush) - { - QBrush brush = QBrush(QColor(255, 0, 0, 127)); - QPen pen = QPen(brush, 4.0); - painter->setPen(pen); - painter->setBrush(Qt::NoBrush); - //get the mouse position from global coordinate system - int x = mapFromGlobal(QCursor::pos()).x(); - int y = mapFromGlobal(QCursor::pos()).y(); - painter->drawEllipse(x - mBrushSize / 2, y - mBrushSize / 2, mBrushSize, mBrushSize); - painter->drawLine(x - 10, y, x + 10, y); - painter->drawLine(x, y - 10, x, y + 10); - } -} - -//the Heads up display should show the current object's -//number of vertices, faces, edges, the genus -//number of selected vertices, edges, faces, face vertices, and eventually objects -//other data that could be shown will be added later -void GLWidget::drawHUD(QPainter *painter) -{ - if (mShowHUD) - { - if (mSelectionMaskString == "Faces") - { - //show info about a selected face - if (numSelectedFaces() == 1) - { - DLFLFacePtr fp = object->sel_fptr_array[0]; - } - } - if (mSelectionMaskString == "Edges") - { - //show info about a selected edge - if (numSelectedEdges() == 1) - { - DLFLEdgePtr ep = object->sel_eptr_array[0]; - } - } - if (mSelectionMaskString == "Vertices") - { - //show info about a selected vertex - if (numSelectedVertices() == 1) - { - DLFLVertexPtr vp = object->sel_vptr_array[0]; - } - } - if (mSelectionMaskString == "Corners") - { - //show info about a selected corner - if (numSelectedCorners() == 1) - { - DLFLFaceVertexPtr fvp = object->sel_fvptr_array[0]; - // std::cout << fvp << "\n"; - } - } - - QString s1 = "Vertices: " + QString("%1").arg((uint)object->num_vertices()) + - "\nEdges: " + QString("%1").arg((uint)object->num_edges()) + - "\nFaces: " + QString("%1").arg((uint)object->num_faces()) + - "\nMaterials: " + QString("%1").arg((uint)object->num_materials()) + - "\nGenus: " + QString("%1").arg(object->genus()); - - QString s2 = "Sel. Vertices:" + QString("%1").arg(numSelectedVertices()) + - "\nSel. Edges: " + QString("%1").arg(numSelectedEdges()) + - "\nSel. Faces: " + QString("%1").arg(numSelectedFaces()) + - "\nSel. Corners: " + QString("%1").arg(numSelectedCorners()); - - QString s3 = "Mode: " + mModeString + - "\nRemeshing Mode: " + mRemeshingSchemeString + - "\nExtrusion Mode: " + mExtrusionModeString + - "\nSelection Mode: " + mSelectionMaskString; - - // QString s4 = "" - QFont font("Arial", 11); - QFontMetrics fm(font); - // painter->setFont(font); - - QRect r1(fm.boundingRect(s1)); - // std::cout<setPen(Qt::NoPen); - QBrush brush = QBrush(QColor(0, 0, 0, 127)); - painter->setBrush(brush); - QRectF rectangle(0.0, height() - r1.height() * 7, width(), height()); - // painter->drawRoundRect(QRect(3.0,3.0,rectangle.width(),rectangle.height()),25,25); - painter->drawRect(rectangle); - painter->setPen(Qt::white); - painter->drawText(rectangle.left() + 65, rectangle.top() + 5, r3.width(), rectangle.height(), Qt::AlignLeft, s3); - painter->drawText(/*fm.width(s3)*/280, rectangle.top() + 5, r1.width(), rectangle.height(), Qt::AlignLeft, s1); - painter->drawText(/*fm.width(s3)+fm.width(s1)*/460, rectangle.top() + 5, r2.width(), rectangle.height(), Qt::AlignLeft, s2); - } -} - -void GLWidget::drawIDs(QPainter *painter, const GLdouble *model, const GLdouble *proj, const GLint *view) -{ - glDisable(GL_DEPTH_TEST); - GLdouble win_x = 0, win_y = 0, win_z = 0; - double min_dist = 100000000.0, max_dist = -100000000.0, x, y, z, d; - int count, min_alpha = 25, max_alpha = 255; - // Vector3d coord = viewport.camera.getPos(); //use this to find the dist from the camera - Vector3d coord = mCamera->getEye(); //use this to find the dist from the camera - QBrush brush; - - Vector3d offset = object->position; - - /* Draw Vertex IDs */ - if (mShowVertexIDs) - { - DLFLVertexPtrArray vparray; - object->getVertices(vparray); - vector vlsqr_array(vparray.size()); - count = 0; - DLFLVertexPtrArray::iterator it; - for (it = vparray.begin(); it != vparray.end(); it++) - { - Vector3d dist = (*it)->coords - coord; - vlsqr_array[count] = dist.lengthsqr(); - max_dist = (vlsqr_array[count] > max_dist) ? vlsqr_array[count] : max_dist; - min_dist = (vlsqr_array[count] < min_dist) ? vlsqr_array[count] : min_dist; - count++; - } - count = 0; - for (it = vparray.begin(); it != vparray.end(); it++) - { - Vector3d point = (*it)->coords; - point = object->tr.applyTo(point); - //point += object->position; - point.get(x, y, z); - QString id = QString::number((*it)->getID()); - if (max_dist == min_dist) - d = min_alpha; - else - d = (vlsqr_array[count] - min_dist)*(max_alpha - min_alpha) / (max_dist - min_dist) + min_alpha; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - brush = QBrush(QColor(mVertexIDBgColor.red(), mVertexIDBgColor.green(), mVertexIDBgColor.blue(), min_alpha + max_alpha - d)); - painter->setBrush(brush); - QRectF rectangle(win_x, win_y, 35, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(QColor(255, 255, 255, min_alpha + max_alpha - d)); - painter->drawText(rectangle, Qt::AlignCenter, id); - count++; - } - } - - /* Draw Edge IDs */ - if (mShowEdgeIDs) - { - DLFLEdgePtrArray eparray; - object->getEdges(eparray); - vector elsqr_array(eparray.size()); - count = 0; - DLFLEdgePtrArray::iterator it; - for (it = eparray.begin(); it != eparray.end(); it++) - { - Vector3d dist = (*it)->getMidPoint() - coord; - elsqr_array[count] = dist.lengthsqr(); - max_dist = (elsqr_array[count] > max_dist) ? elsqr_array[count] : max_dist; - min_dist = (elsqr_array[count] < min_dist) ? elsqr_array[count] : min_dist; - count++; - } - count = 0; - for (it = eparray.begin(); it != eparray.end(); it++) - { - QString id = QString::number((*it)->getID()); - Vector3d point = (*it)->getMidPoint(); - point = object->tr.applyTo(point); - point.get(x, y, z); - if (max_dist == min_dist) - d = min_alpha; - else - d = (elsqr_array[count] - min_dist)*(max_alpha - min_alpha) / (max_dist - min_dist) + min_alpha; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - // std::cout<< min_alpha << " " << max_alpha << " "<< d << std::endl; - brush = QBrush(QColor(mEdgeIDBgColor.red(), mEdgeIDBgColor.green(), mEdgeIDBgColor.blue(), min_alpha + max_alpha - d)); - painter->setBrush(brush); - QRectF rectangle(win_x, win_y, 35, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(QColor(255, 255, 255, min_alpha + max_alpha - d)); - painter->drawText(rectangle, Qt::AlignCenter, id); - count++; - } - } - - /* Draw Face IDs */ - if (mShowFaceIDs) - { - DLFLFacePtrArray fparray; - object->getFaces(fparray); - vector flsqr_array(fparray.size()); - count = 0; - DLFLFacePtrArray::iterator it; - for (it = fparray.begin(); it != fparray.end(); it++) - { - Vector3d dist = (*it)->geomCentroid() - coord; - flsqr_array[count] = dist.lengthsqr(); - max_dist = (flsqr_array[count] > max_dist) ? flsqr_array[count] : max_dist; - min_dist = (flsqr_array[count] < min_dist) ? flsqr_array[count] : min_dist; - count++; - } - count = 0; - for (it = fparray.begin(); it != fparray.end(); it++) - { - QString id = QString::number((*it)->getID()); - Vector3d point = (*it)->geomCentroid();// + (*it)->getNormal(); - point = object->tr.applyTo(point); - point.get(x, y, z); - if (max_dist == min_dist) - d = min_alpha; - else - d = (flsqr_array[count] - min_dist)*(max_alpha - min_alpha) / (max_dist - min_dist) + min_alpha; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - brush = QBrush(QColor(mFaceIDBgColor.red(), mFaceIDBgColor.green(), mFaceIDBgColor.blue(), min_alpha + max_alpha - d)); - painter->setBrush(brush); - QRectF rectangle(win_x, win_y, 35, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(QColor(255, 255, 255, min_alpha + max_alpha - d)); - painter->drawText(rectangle, Qt::AlignCenter, id); - count++; - } - } - - glPopMatrix(); - glEnable(GL_DEPTH_TEST); -} - -void GLWidget::drawSelectedIDs(QPainter *painter, const GLdouble *model, const GLdouble *proj, const GLint *view) -{ - if (mShowSelectedIDs) - { - glDisable(GL_DEPTH_TEST); - - glPushMatrix(); - double mat[16]; - object->tr.fillArrayColumnMajor(mat); - glMultMatrixd(mat); - - double x, y, z; - QBrush brush; - QRectF rectangle; - QString id; - GLdouble win_x = 0, win_y = 0, win_z = 0; - - if (!mShowVertexIDs) - { - if (!object->sel_vptr_array.empty()) - { - DLFLVertexPtrArray::iterator first, last; - first = object->sel_vptr_array.begin(); last = object->sel_vptr_array.end(); - while (first != last) - { - QString id = QString::number((*first)->getID()); - double x, y, z; - Vector3d point = (*first)->coords;// + (*it)->getNormal(); - point = object->tr.applyTo(point); - point.get(x, y, z); - win_x = 0, win_y = 0, win_z = 0; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - brush = QBrush(QColor(mVertexIDBgColor)); - painter->setBrush(brush); - rectangle = QRectF(win_x, win_y, 40, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(Qt::white); - painter->drawText(rectangle, Qt::AlignCenter, id); - ++first; - } - } - } - - if (!mShowEdgeIDs) - { - if (!object->sel_eptr_array.empty()) - { - DLFLEdgePtrArray::iterator first, last; - first = object->sel_eptr_array.begin(); last = object->sel_eptr_array.end(); - while (first != last) - { - QString id = QString::number((*first)->getID()); - Vector3d point = (*first)->getMidPoint(true); - point = object->tr.applyTo(point); - point.get(x, y, z); - win_x = 0, win_y = 0, win_z = 0; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - QBrush brush = QBrush(QColor(mEdgeIDBgColor)); - painter->setBrush(brush); - rectangle = QRectF(win_x, win_y, 40, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(Qt::white); - painter->drawText(rectangle, Qt::AlignCenter, id); - ++first; - } - } - } - - if (!mShowFaceIDs) - { - if (!object->sel_fptr_array.empty()) - { - DLFLFacePtrArray::iterator first, last; - first = object->sel_fptr_array.begin(); last = object->sel_fptr_array.end(); - while (first != last) - { - QString id = QString::number((*first)->getID()); - double x, y, z; - Vector3d point = (*first)->geomCentroid();// + (*it)->getNormal(); - point = object->tr.applyTo(point); - point.get(x, y, z); - win_x = 0, win_y = 0, win_z = 0; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - brush = QBrush(QColor(mFaceIDBgColor)); - painter->setBrush(brush); - rectangle = QRectF(win_x, win_y, 40, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(Qt::white); - painter->drawText(rectangle, Qt::AlignCenter, id); - ++first; - } - } - } - - if (!mShowFaceVertexIDs) - { - if (!object->sel_fvptr_array.empty()) - { - DLFLFaceVertexPtrArray::iterator first, last; - first = object->sel_fvptr_array.begin(); last = object->sel_fvptr_array.end(); - while (first != last) - { - QString id = QString::number((*first)->vertex->getID()); - double x, y, z; - Vector3d point = (*first)->vertex->coords; - point = object->tr.applyTo(point); - point.get(x, y, z); - win_x = 0, win_y = 0, win_z = 0; - gluProject(x, y, z, model, proj, view, &win_x, &win_y, &win_z); - win_y = height() - win_y; // y is inverted - painter->setPen(Qt::NoPen); - brush = QBrush(QColor(mVertexIDBgColor)); - painter->setBrush(brush); - rectangle = QRectF(win_x, win_y, 40, 20); - painter->drawRoundRect(rectangle, 6, 6); - painter->setPen(Qt::white); - painter->drawText(rectangle, Qt::AlignCenter, id); - ++first; - } - } - } - glPopMatrix(); - glEnable(GL_DEPTH_TEST); - } -} - -// void GLWidget::toggleFullScreen( ) { -// std::cout<<"toggle fullscreen mode\n"; -// // if( !mIsFullScreen ) { -// setWindowState(windowState() ^ Qt::WindowFullScreen); -// // setWindowState(Qt::WindowFullScreen); -// // move(0,20); -// // resize( QApplication::desktop()->size() ); -// // resizeGL( QApplication::desktop()->size().width(), QApplication::desktop()->size().height() ); -// // setFocusPolicy( Qt::StrongFocus ); -// // setWindowFlags( Qt::FramelessWindowHint ); -// // show(); -// // } else { -// // // setWindowFlags( Qt::Widget ); -// // resize( 700, 800 ); -// // show(); -// // } -// // mIsFullScreen != mIsFullScreen; -// } - -// Subroutine for selecting a Vertex -DLFLVertexPtr GLWidget::selectVertex(int mx, int my, int w, int h) -{ - GLuint selectBuf[8192]; - uint closest; - GLuint dist; - long hits, index; - DLFLVertexPtr sel(nullptr); - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - // viewport.camera.enterSelectionMode(mx,my,30,30,vp); // Reduced sensitivity for picking points - mCamera->enterSelectionMode(mx, my, w, h, vp); // Reduced sensitivity for picking points - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - // glViewport(0,0,width(),height()); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderVerticesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - closest = 0; dist = 0xffffffff; - while (hits) - { - index = (hits - 1) * 4; - if (selectBuf[index + 1] < dist) - { - dist = selectBuf[index + 1]; - closest = selectBuf[index + 3]; - } - hits--; - } - // closest now has the id of the selected vertex - sel = DLFLObject::vparray[closest]; - } - return sel; -} - -// Subroutine for selecting a Vertex -DLFLVertexPtrArray GLWidget::selectVertices(int mx, int my, int w, int h) -{ - GLuint selectBuf[8192]; - long hits, index; - DLFLVertexPtrArray vparray; - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, w, h, vp); // Reduced sensitivity for picking points - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - // glViewport(0,0,width(),height()); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderVerticesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - // std::cout << "hits = " << hits << "\n"; - if (hits > 0) - { - while (hits) - { - index = (hits - 1) * 4; - // if(DLFLObject::vparray[selectBuf[index+3]]) - vparray.push_back(DLFLObject::vparray[selectBuf[index + 3]]); - hits--; - } - return vparray; - } - vparray.clear(); - return vparray; -} - -// Subroutine for selecting a locator -DLFLLocatorPtr GLWidget::selectLocator(int mx, int my, int w, int h) // brianb -{ - GLuint selectBuf[8192]; - uint closest; - GLuint dist; - long hits, index; - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - // viewport.camera.enterSelectionMode(mx,my,10,10,vp); // Reduced sensitivity for picking points - mCamera->enterSelectionMode(mx, my, w, h, vp); // Reduced sensitivity for picking points - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderLocatorsForSelect(); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - closest = 0; dist = 0xffffffff; - while (hits) - { - index = (hits - 1) * 4; - if (selectBuf[index + 1] < dist) - { - dist = selectBuf[index + 1]; - closest = selectBuf[index + 3]; - } - hits--; - } - - // closest now has the hit axis - GLWidget::locatorPtr->setSelectedAxis(closest); - - // Only one locator for now, return pointer to DLFLViewport::locator - return GLWidget::locatorPtr; - } - - return nullptr; -} // brianb - -// Subroutine for selecting an Edge -DLFLEdgePtr GLWidget::selectEdge(int mx, int my, int w, int h) -{ - GLuint selectBuf[8192]; - uint closest; - GLuint dist; - long hits, index; - DLFLEdgePtr sel(nullptr); - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, w, h, vp); - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderEdgesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - closest = 0; dist = 0xffffffff; - while (hits) - { - index = (hits - 1) * 4; - if (selectBuf[index + 1] < dist) - { - dist = selectBuf[index + 1]; - closest = selectBuf[index + 3]; - } - hits--; - } - // closest now has the id of the selected edge - sel = DLFLObject::eparray[closest]; - } - return sel; -} - -// Subroutine for selecting an Edge -DLFLEdgePtrArray GLWidget::selectEdges(int mx, int my, int w, int h) -{ - GLuint selectBuf[8192]; - long hits, index; - DLFLEdgePtr sel(nullptr); - DLFLEdgePtrArray eparray; - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, w, h, vp); - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - mCamera->SetProjection(width(), height()); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderEdgesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - while (hits) - { - index = (hits - 1) * 4; - // if(DLFLObject::eparray[selectBuf[index+3]]) - eparray.push_back(DLFLObject::eparray[selectBuf[index + 3]]); - hits--; - } - return eparray; - } - eparray.clear(); - return eparray; -} - -// Subroutine for selecting a Face -DLFLFacePtr GLWidget::selectFace(int mx, int my, int w, int h) -{ - GLuint selectBuf[8192]; - uint closest; - GLuint dist; - long hits, index; - DLFLFacePtr sel(nullptr); - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, w, h, vp); - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - // glLoadIdentity(); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderFacesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - closest = 0; dist = 0xffffffff; - while (hits) - { - index = (hits - 1) * 4; - if (selectBuf[index + 1] < dist) - { - dist = selectBuf[index + 1]; - closest = selectBuf[index + 3]; - } - hits--; - } - // closest now has the id of the selected face - sel = DLFLObject::fparray[closest]; - } - return sel; -} - -// Subroutine for selecting multiple faces at once -DLFLFacePtrArray GLWidget::selectFaces(int mx, int my, int w, int h) -{ - // glEnable(GL_CULL_FACE); - GLuint selectBuf[8192]; - long hits, index; - DLFLFacePtr sel(nullptr); - DLFLFacePtrArray fparray; - fparray.clear(); - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, w, h, vp); - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - mCamera->SetProjection(width(), height()); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderFacesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - // std::cout << hits << " = hits\n"; - if (hits > 0) - { - while (hits) - { - index = (hits - 1) * 4; - // if(DLFLObject::fparray[selectBuf[index+3]]) - fparray.push_back(DLFLObject::fparray[selectBuf[index + 3]]); - hits--; - } - // glDisable(GL_CULL_FACE); - return fparray; - } - // glDisable(GL_CULL_FACE); - fparray.clear(); - return fparray; -} - -// Subroutine for selecting multiple faces at once -// DLFLFacePtrArray GLWidget::deselectFaces(int mx, int my) { -DLFLFacePtr GLWidget::deselectFaces(int mx, int my, int w, int h) -{ - glEnable(GL_CULL_FACE); - GLuint selectBuf[8192]; - uint closest; - GLuint dist; - long hits, index; - DLFLFacePtr sel(nullptr); - DLFLFacePtrArray fparray; - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, mBrushSize, mBrushSize, vp); - - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - // glLoadIdentity(); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderFacesForSelect(object); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - closest = 0; dist = 0xffffffff; - while (hits) - { - index = (hits - 1) * 4; - if (selectBuf[index + 1] < dist) - { - dist = selectBuf[index + 1]; - closest = selectBuf[index + 3]; - } - - //if (DLFLObject::fparray[selectBuf[index+3]].normalCentroid()*camera.getPos()){ - // if(isSelected(DLFLObject::fparray[selectBuf[index+3]])) - // fparray.push_back(DLFLObject::fparray[selectBuf[index+3]]); - //} - hits--; - } - // closest now has the id of the selected face - sel = DLFLObject::fparray[closest]; - } - glDisable(GL_CULL_FACE); - // return fparray; - return sel; -} - -// Subroutine for selecting a FaceVertex (Corner) within a Face -DLFLFaceVertexPtr GLWidget::selectFaceVertex(DLFLFacePtr fp, int mx, int my, int w, int h) -{ - GLuint selectBuf[8192]; - uint closest; - GLuint dist; - long hits, index; - DLFLFaceVertexPtr sel(nullptr); - - glSelectBuffer(8192, selectBuf); - glRenderMode(GL_SELECT); - - glInitNames(); glPushName(0); - - GLint vp[4]; - glGetIntegerv(GL_VIEWPORT, vp); - mCamera->enterSelectionMode(mx, my, w, h, vp); - // Make sure earlier matrices are preserved, since multiple windows - // seem to be sharing the same matrix stacks - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // viewport.reshape(); - // viewport.apply_transform(); - mCamera->SetProjection(width(), height()); - // viewport.apply_transform(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - renderFaceVerticesForSelect(fp); - glFlush(); - - glPopMatrix(); - - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - mCamera->leaveSelectionMode(); - - hits = glRenderMode(GL_RENDER); - if (hits > 0) - { - closest = 0; dist = 0xffffffff; - while (hits) - { - index = (hits - 1) * 4; - if (selectBuf[index + 1] < dist) - { - dist = selectBuf[index + 1]; - closest = selectBuf[index + 3]; - } - hits--; - } - // closest now has the id of the selected face vertex - sel = DLFLObject::fvparray[closest]; - } - return sel; -} - -// Draw the selected items -void GLWidget::drawSelected(void) -{ - if (!sel_lptr_array.empty()) - { - sel_lptr_array[0]->render(); - } - - if (!object->sel_vptr_array.empty()) - { - glPointSize(mSelectedVertexThickness); - //glBegin(GL_POINTS); - glColor4f(mSelectedVertexColor.redF(), mSelectedVertexColor.greenF(), mSelectedVertexColor.blueF(), mSelectedVertexColor.alphaF()); - DLFLVertexPtrArray::iterator first, last; - first = object->sel_vptr_array.begin(); last = object->sel_vptr_array.end(); - while (first != last) - { - GeometryRenderer::instance()->renderVertex(*first); - ///(*first)->render(); - ++first; - } - //glEnd(); - glPointSize(1.0); - } - - if (!object->sel_eptr_array.empty()) - { - glLineWidth(mSelectedEdgeThickness); - glColor4f(mSelectedEdgeColor.redF(), mSelectedEdgeColor.greenF(), mSelectedEdgeColor.blueF(), mSelectedEdgeColor.alphaF()); - DLFLEdgePtrArray::iterator first, last; - first = object->sel_eptr_array.begin(); last = object->sel_eptr_array.end(); - while (first != last) - { - glBegin(GL_LINES); - { - GeometryRenderer::instance()->renderEdge(*first); - } glEnd(); - ///(*first)->render(); - ++first; - } - glLineWidth(3.0); - } - - if (!object->sel_fptr_array.empty()) - { - glLineWidth(mSelectedEdgeThickness); - glColor4f(mSelectedFaceColor.redF(), mSelectedFaceColor.greenF(), mSelectedFaceColor.blueF(), mSelectedFaceColor.alphaF()); - DLFLFacePtrArray::iterator first, last; - first = object->sel_fptr_array.begin(); last = object->sel_fptr_array.end(); - while (first != last) - { - GeometryRenderer::instance()->renderFace(*first, false); - ///(*first)->render_FVN(); - ++first; - } - glLineWidth(3.0); - } - - if (!object->sel_fvptr_array.empty()) - { - glPointSize(mSelectedVertexThickness); - glColor4f(mSelectedVertexColor.redF(), mSelectedVertexColor.greenF(), mSelectedVertexColor.blueF(), mSelectedVertexColor.alphaF()); - glBegin(GL_POINTS); - DLFLFaceVertexPtrArray::iterator first, last; - first = object->sel_fvptr_array.begin(); last = object->sel_fvptr_array.end(); - while (first != last) - { - GeometryRenderer::instance()->renderFaceVertex(*first, false); - ///(*first)->render(); - ++first; - } - glEnd(); - glPointSize(1.5); - } -} - -void GLWidget::wheelEvent(QWheelEvent *event) -{ - // int x = event->x(), y = event->y(); - // int numDegrees = event->delta() / 8; - // int numSteps = numDegrees / 15; - // double z; - mCamera->HandleMouseWheel(event->delta(), width(), height()); - repaint(); - - // if ( viewport.current() == VPRotate) { - // viewport.handle_rotate(VPRelease,x,y); // Stop rotating - // //viewport.handle_zoom(VPPush,x,y); // Start zooming - // //QCursor::setShape(Qt::SizeAllCursor); - // } - // else if ( !(QApplication::keyboardModifiers() == Qt::AltModifier) && - // !(QApplication::keyboardModifiers() == Qt::ShiftModifier) && - // !(QApplication::keyboardModifiers() == (Qt::ShiftModifier | Qt::AltModifier) ) ){ - // // QMessageBox::about(this, tr("false"),tr("numDegrees = %1").arg(numDegrees)); - // viewport.handle_zoom(VPPush,x,y); // Start zooming - // viewport.send_to_current(VPPush,x,y); - // // updateGL(); - // repaint(); - // - // viewport.handle_zoom(VPPush,x+numDegrees*3,y); // Start zooming - // //QMessageBox::about(this, tr("false"),tr("z = %1").arg(z)); - // viewport.send_to_current(VPPush,x,y); - // viewport.handle_zoom(VPRelease,x+numDegrees,y); // Start zooming - // viewport.send_to_current(VPRelease,x,y); - // //updateGL(); - // repaint(); - // - // // //QCursor::setShape(Qt::SizeAllCursor); - // } - // else if ( QApplication::keyboardModifiers() == Qt::ShiftModifier ){ - // - // viewport.handle_pan(VPPush,x,y); - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_pan(VPPush,x+numDegrees*2,y); - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_pan(VPRelease,x+numDegrees*2,y); - // viewport.send_to_current(VPRelease,x,y); - // - // //updateGL(); - // repaint(); - // } - // else if ( QApplication::keyboardModifiers() == Qt::AltModifier ){ - // - // viewport.handle_pan(VPPush,x,y); // Start panning up and down - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_pan(VPPush,x,y+numDegrees*2); // Start panning up and down - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_pan(VPRelease,x,y+numDegrees*2); // Start panning up and down - // viewport.send_to_current(VPRelease,x,y); - // - // //updateGL(); - // repaint(); - // } - // else if ( QApplication::keyboardModifiers() == (Qt::AltModifier | Qt::ShiftModifier) ){ - // - // viewport.handle_rotate(VPPush,x,y); - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_rotate(VPPush,x+numDegrees*2,y); - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_rotate(VPRelease,x+numDegrees*2,y); - // viewport.send_to_current(VPRelease,x,y); - // - // //updateGL(); - // repaint(); - // } - // else if ( QApplication::keyboardModifiers() == (Qt::ShiftModifier | Qt::MetaModifier) ){ - // - // viewport.handle_rotate(VPPush,x,y); - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_rotate(VPPush,x,y+numDegrees*2); - // viewport.send_to_current(VPPush,x,y); - // - // viewport.handle_rotate(VPRelease,x,y+numDegrees*2); - // viewport.send_to_current(VPRelease,x,y); - // - // //updateGL(); - // repaint(); - // } -} -void GLWidget::mousePressEvent(QMouseEvent *event) -{ - if (QApplication::keyboardModifiers() == Qt::AltModifier || - (event->buttons() == Qt::LeftButton && QApplication::keyboardModifiers() == (Qt::ShiftModifier | Qt::AltModifier))) - { - mCamera->HandleMouseEvent(event->button(), event->type(), event->x(), event->y()); - repaint(); - } - else event->ignore(); - - // if ( QApplication::keyboardModifiers() == Qt::AltModifier ) { - // int x = event->x(), y = event->y(); - // - // if ( event->buttons() == Qt::LeftButton ) { - // if ( viewport.current() == VPPan) { - // viewport.handle_pan(VPRelease,x,y); // Stop panning - // //viewport.handle_rotate(VPPush,x,y); // Start rotating - // setCursor(Qt::ArrowCursor); - // } - // else { - // viewport.handle_rotate(VPPush,x,y); // Start rotating - // // set the qt cursor - make a custom cursor later - // setCursor(Qt::CrossCursor); - // } - // // viewport.send_to_current(GLWidget::translateEvent(event),x,y); - // // this->updateGL(); - // - // } - // else if ( event->buttons() == Qt::RightButton ) { - // if ( viewport.current() == VPRotate) { - // viewport.handle_rotate(VPRelease,x,y); // Stop rotating - // //viewport.handle_zoom(VPPush,x,y); // Start zooming - // setCursor(Qt::ArrowCursor); - // } - // else { - // viewport.handle_zoom(VPPush,x,y); // Start zooming - // setCursor(Qt::SizeAllCursor); - // } - // } - // else if ( event->buttons() == Qt::MidButton ) { - // if ( viewport.current() == VPRotate ) { - // viewport.handle_rotate(VPRelease,x,y); // Stop rotating - // //viewport.handle_pan(VPPush,x,y); - // setCursor(Qt::ArrowCursor); - // } - // else { - // viewport.handle_pan(VPPush,x,y); // Start panning - // setCursor(Qt::CrossCursor); - // } - // } - // } - // else if ( (event->buttons() == Qt::LeftButton && QApplication::keyboardModifiers() == (Qt::ShiftModifier | Qt::AltModifier)) ){ - // int x = event->x(), y = event->y(); - // - // if ( viewport.current() == VPRotate ) { - // viewport.handle_rotate(VPRelease,x,y); // Stop rotating - // //viewport.handle_pan(VPPush,x,y); - // setCursor(Qt::ArrowCursor); - // } - // else { - // viewport.handle_pan(VPPush,x,y); // Start panning - // setCursor(Qt::CrossCursor); - // } - // } - // else if ( event->buttons() == Qt::RightButton && QApplication::keyboardModifiers() == Qt::ShiftModifier){ - // // event->ignore(); - // if (!isBrushVisible()) showBrush(); - // mBrushStartX = event->x(); - // // mBrushStartY = event->y(); - // } - // else event->ignore(); - -} - -// this has been modified for the QT interface, so it handles focus automatically -void GLWidget::mouseMoveEvent(QMouseEvent *event) -{ - if (QApplication::keyboardModifiers() == Qt::AltModifier || - (event->buttons() == Qt::LeftButton && QApplication::keyboardModifiers() == (Qt::ShiftModifier | Qt::AltModifier))) - { - mCamera->HandleMouseMotion(event->x(), event->y(), width(), height()); - repaint(); - } - else event->ignore(); - - // int x = event->x(), y = event->y(); - // if (isBrushVisible()) repaint(); - // - // - // if ( QApplication::keyboardModifiers() == Qt::AltModifier ) { - // if ( viewport.send_to_current(GLWidget::translateEvent(event),x,y) ) { - // repaint(); - // } - // } - // else if ( QApplication::keyboardModifiers() == (Qt::AltModifier | Qt::ShiftModifier) ) { - // if ( viewport.send_to_current(GLWidget::translateEvent(event),x,y) ) { - // repaint(); - // } - // } - // else if ( event->buttons() == Qt::RightButton && QApplication::keyboardModifiers() == Qt::ShiftModifier){ - // // event->ignore(); - // setBrushSize(mBrushSize+event->x()-mBrushStartX); - // } - // else event->ignore(); -} - -void GLWidget::mouseReleaseEvent(QMouseEvent *event) -{ - if (QApplication::keyboardModifiers() == Qt::AltModifier || - (event->buttons() == Qt::LeftButton && QApplication::keyboardModifiers() == (Qt::ShiftModifier | Qt::AltModifier))) - { - mCamera->HandleMouseEvent(event->button(), event->type(), event->x(), event->y()); - repaint(); - } - else event->ignore(); - - // int x = event->x(), y = event->y(); - // if ( QApplication::keyboardModifiers() == Qt::AltModifier ) { - // if ( viewport.send_to_current(GLWidget::translateEvent(event),x,y) ) { - // //updateGL(); - // repaint(); - // } - // } - // else if ( QApplication::keyboardModifiers() == (Qt::AltModifier | Qt::ShiftModifier) ) { - // if ( viewport.send_to_current(GLWidget::translateEvent(event),x,y) ) { - // //updateGL(); - // repaint(); - // } - // } - // else if ( event->buttons() == Qt::RightButton && QApplication::keyboardModifiers() == Qt::ShiftModifier){ - // mBrushStartX = 0; - // // mBrushStartY = 0; - // } - // else event->ignore(); -} - -// void GLWidget::switchTo(VPView view){ -// viewport.switchTo(view); -// -// if ( view == VPPersp ) // Change camera settings to zoom in closer in perspective view -// viewport.setPerspView(10,10,10,0,0,0,0,1,0); -// } -//for vertex locator moving... -void erase_dlp(DLFLLocatorPtr lp) -{ - delete lp; -} // brianb - -// Global operations (don't require selection) -void GLWidget::recomputeNormals(void) // Recompute normals and lighting -{ - object->computeNormals(); - computeLighting(object, patchObject, &plight, mUseGPU); -} - -// Recompute lighting -void GLWidget::recomputeLighting(void) -{ - computeLighting(object, patchObject, &plight, mUseGPU); -} - -// Recompute the patches for patch rendering -void GLWidget::recomputePatches(void) -{ - if (patchObject) - patchObject->updatePatches(object); -} - -void GLWidget::setWarmLightColor(QColor c) -{ - plight.warmcolor.set(c.redF(), c.greenF(), c.blueF()); - recomputeLighting(); - redraw(); -} - -void GLWidget::setCoolLightColor(QColor c) -{ - plight.coolcolor.set(c.redF(), c.greenF(), c.blueF()); - recomputeLighting(); - redraw(); -} - -void GLWidget::setLightIntensity(double i) -{ - plight.intensity = i; - recomputeLighting(); - redraw(); -} - -void GLWidget::setRenderColor(QColor c) -{ - mRenderColor = c; - GeometryRenderer *gr = GeometryRenderer::instance(); - gr->renderColor[0] = c.redF(); - gr->renderColor[1] = c.greenF(); - gr->renderColor[2] = c.blueF(); - gr->renderColor[3] = c.alphaF(); - redraw(); -} diff --git a/topmodx/src/GLWidget.h b/topmodx/src/GLWidget.h deleted file mode 100644 index 79f4f5c..0000000 --- a/topmodx/src/GLWidget.h +++ /dev/null @@ -1,1004 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _GL_WIDGET_H -#define _GL_WIDGET_H - -// #include "Viewport.h" -//#include "include/Graphics/Grid.h" -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include "Renderer/DLFLRenderer.h" -#include "TMPatchObject.h" - -#include "DLFLLighting.h" -#include -#include -#include -#include - -#include "Camera3.h" -#include "CgData.h" - -#ifdef GPU_OK -using namespace Cg; -#endif // GPU_OK - -using namespace DLFL; - -#ifdef WITH_VERSE -#include "TKE_verse.h" -#include "TIF_verse.h" -#endif - -class QCursor; -class QImage; - -#include "DLFLLocator.h" // brianb - -class GLWidget : public QGLWidget -{ - Q_OBJECT - -public: - GLWidget( - int w, int h, - DLFLRendererPtr rp, - QColor color, QColor vcolor, - DLFLObjectPtr op, - const QGLFormat& format, QWidget* parent = 0); - - ~GLWidget(); - -public slots : - - // void toggleFullScreen( ); //not needed anymore... moved to main window - void update() { repaint(); }; - // void switchTo(VPView view); - - //set lighting colors... warm and cool - void setWarmLightColor(QColor c); - void setCoolLightColor(QColor c); - void setLightIntensity(double i); - - //setters for properties inside DLFLRenderer - void setRenderColor(QColor c); - - void setViewportColor(QColor c) { mViewportColor = c; redraw(); }; - void setWireframeColor(QColor c) { if (renderer) renderer->setWireframeColor(c); redraw(); }; - void setSilhouetteColor(QColor c) { if (renderer) renderer->setSilhouetteColor(c); redraw(); }; - void setWireframeThickness(double t) { if (renderer) renderer->setWireframeThickness(t); redraw(); }; - void setVertexThickness(double t) { if (renderer) renderer->setVertexThickness(t); redraw(); }; - void setSilhouetteThickness(double t) { if (renderer) renderer->setSilhouetteThickness(t); redraw(); }; - void setNormalColor(QColor c) { if (renderer) renderer->setNormalColor(c); redraw(); }; - void setFaceCentroidColor(QColor c) { if (renderer) renderer->setFaceCentroidColor(c); redraw(); }; - void setFaceCentroidThickness(double t) { if (renderer) renderer->setFaceCentroidThickness(t); redraw(); }; - void setNormalThickness(double t) { if (renderer) renderer->setNormalThickness(t); redraw(); }; - void setNormalLength(double l) { if (renderer) renderer->setNormalLength(l); redraw(); }; - - //setters for properties in glwidget... always call redraw() - void setSelectedVertexThickness(double t) { mSelectedVertexThickness = t; redraw(); }; - void setSelectedEdgeThickness(double t) { mSelectedEdgeThickness = t; redraw(); }; - void setSelectedEdgeColor(QColor c) { mSelectedEdgeColor = c; redraw(); }; - void setSelectedFaceColor(QColor c) { mSelectedFaceColor = c; redraw(); }; - void setSelectedVertexColor(QColor c) { mSelectedVertexColor = c; redraw(); }; - void setVertexIDBgColor(QColor c) { mVertexIDBgColor = c; redraw(); }; - void setFaceIDBgColor(QColor c) { mFaceIDBgColor = c; redraw(); }; - void setEdgeIDBgColor(QColor c) { mEdgeIDBgColor = c; redraw(); }; - - inline void setLightPosition(Vector3d p) { plight.position = p; }; - - void setNearPlane(double n) { mCamera->setNearPlane(n); redraw(); }; - void setFarPlane(double f) { mCamera->setFarPlane(f); redraw(); }; - void setFOV(double fov) { mCamera->setFOV(fov); redraw(); }; - - void zoomIn() { mCamera->HandleMouseWheel(100, width(), height()); repaint(); }; - void zoomOut() { mCamera->HandleMouseWheel(-100, width(), height()); repaint(); }; - - //compute lighting and normals functions now moved here from MainWindow - void recomputeNormals(); - void recomputeLighting(); - void recomputePatches(); - - void toggleHUD() - { - mShowHUD = !mShowHUD; - this->repaint(); - } - -#ifdef GPU_OK - void toggleGPU() - { - if (renderer) - renderer->toggleGPU(); - mUseGPU = !mUseGPU; - recomputeLighting(); - repaint(); - } -#endif - - void toggleAntialiasing() - { - // std::cout<< mAntialiasing << "\n"; - mAntialiasing = !mAntialiasing; - // std::cout << mAntialiasing << "\n"; - renderer->toggleAntialiasing(); - repaint(); - } - - // Toggle wireframe - void toggleWireframe(void) - { - if (renderer) renderer->toggleWireframe(); - this->repaint(); - } - - // Toggle silhouette - void toggleSilhouette(void) - { - if (renderer) renderer->toggleSilhouette(); - this->repaint(); - - } - - // Toggle vertices - void toggleVertices(void) - { - if (renderer) renderer->toggleVertices(); - this->repaint(); - } - - void toggleFaceIDs() - { - mShowFaceIDs = !mShowFaceIDs; - this->repaint(); - } - - void toggleEdgeIDs() - { - mShowEdgeIDs = !mShowEdgeIDs; - this->repaint(); - } - - void toggleVertexIDs() - { - mShowVertexIDs = !mShowVertexIDs; - this->repaint(); - } - - void toggleSelectedIDs() - { - mShowSelectedIDs = !mShowSelectedIDs; - this->repaint(); - } - - void toggleBrush() - { - mShowBrush = !mShowBrush; - this->repaint(); - } - - void toggleSelectionWindow() - { - mShowSelectionWindow = !mShowSelectionWindow; - this->repaint(); - } - - void showSelectionWindow() - { - mShowSelectionWindow = true; - this->repaint(); - } - - void hideSelectionWindow() - { - mShowSelectionWindow = false; - this->repaint(); - } - - void setSelectionWindowStartX(double x) - { - mSelectionWindowStartX = x; - } - - void setSelectionWindowStartY(double y) - { - mSelectionWindowStartY = y; - } - - void showBrush() - { - mShowBrush = true; - setCursor(Qt::BlankCursor); - this->repaint(); - } - - void hideBrush() - { - mShowBrush = false; - setCursor(Qt::ArrowCursor); - this->repaint(); - } - - bool isBrushVisible() { return mShowBrush; } - - // Toggle object orientation - void toggleObjectOrientation(void) - { - if (renderer) renderer->toggleObjectOrientation(); - this->repaint(); - - } - - void toggleNormals(void) - { - if (renderer) renderer->toggleFaceNormals(); - this->repaint(); - } - - void toggleFaceCentroids(void) - { - if (renderer) renderer->toggleFaceCentroids(); - this->repaint(); - } - - void selectAllFaces() - { - clearSelectedFaces(); - object->getFaces(object->sel_fptr_array); - repaint(); - } - - void selectAllEdges() - { - clearSelectedEdges(); - object->getEdges(object->sel_eptr_array); - repaint(); - } - - void selectAllVertices() - { - clearSelectedVertices(); - object->getVertices(object->sel_vptr_array); - repaint(); - } - - void selectAllFaceVertices() - { - clearSelectedFaceVertices(); - // object->getVertices(object->sel_vptr_array); - repaint(); - } - - void selectInverseFaces() - { - DLFLFacePtrArray fparray; - vector::iterator it; - object->getFaces(fparray); - for (it = fparray.begin(); it != fparray.end(); it++) - { - if (!isSelected(*it)) - { - addToSelection(*it); - } - else clearSelectedFace(*it); - } - repaint(); - } - - void selectInverseEdges() - { - DLFLEdgePtrArray eparray; - vector::iterator it; - object->getEdges(eparray); - for (it = eparray.begin(); it != eparray.end(); it++) - { - if (!isSelected(*it)) - { - addToSelection(*it); - } - else clearSelectedEdge(*it); - } - repaint(); - } - - void selectInverseVertices() - { - DLFLVertexPtrArray vparray; - object->getVertices(vparray); - for (DLFLVertexPtr itPtr : vparray) - { - if (!isSelected(itPtr)) - { - addToSelection(itPtr); - } - else clearSelectedVertex(itPtr); - } - repaint(); - } - - //maybe this isn't necessary? ?? - void selectInverseFaceVertices() - { - /*DLFLFaceVertexPtrArray fvparray; - vector::iterator it; - object->getFaceVertices(fvparray); - for (it = fvparray.begin(); it != fvparray.end(); it++) - { - if (!isSelected(*it)) - { - addToSelection(*it); - } - else clearSelectedFaceVertex(*it); - } - repaint();*/ - } - - // Toggle grid display on/off - void toggleGrid(void) - { - /*if (showgrid == true) showgrid = false; - else showgrid = true; - this->repaint();*/ - } - - // Toggle axis display on/off - void toggleAxes(void) - { - if (showaxes == true) showaxes = false; - else showaxes = true; - this->repaint(); - } - -protected: - void initializeGL(); - void paintEvent(QPaintEvent *event); - - void drawText(int width, int height); - void drawIDs(QPainter *painter, const GLdouble *model, const GLdouble *proj, const GLint *view); - void drawSelectedIDs(QPainter *painter, const GLdouble *model, const GLdouble *proj, const GLint *view); - void drawHUD(QPainter *painter); - void drawBrush(QPainter *painter); - void drawSelectionWindow(QPainter *painter); - void resizeGL(int width, int height); - - void setupViewport(int width, int height); - -#ifdef GPU_OK - void enableGLLights(); //gl lighting for use in cg shaders - CgData *cg; - void initCg(); -#endif // GPU_OK - - //void showEvent(QShowEvent *event); - - //void paintOverlayGL(); - //void initializeOverlayGL(); - //void resizeOverlayGL(int width, int height); - - bool mIsFullScreen; - bool mShowFaceIDs; - bool mShowVertexIDs; - bool mShowEdgeIDs; - bool mShowSelectedIDs; - bool mShowFaceVertexIDs; - bool mShowHUD; - bool mShowBrush; - bool mShowSelectionWindow; - bool mUseGPU; - bool mAntialiasing; - int mBrushStartX; - - //temporarily disable object rendering - bool renderObject; - - // Selection lists - these are shared by all viewports - static DLFLLocatorPtrArray sel_lptr_array; // List of selected DLFLLocator pointers // brianb - //static DLFLVertexPtrArray sel_vptr_array; // List of selected DLFLVertex pointers - //static DLFLEdgePtrArray sel_eptr_array; // List of selected DLFLEdge pointers - //static DLFLFacePtrArray sel_fptr_array; // List of selected DLFLFace pointers - //static DLFLFaceVertexPtrArray sel_fvptr_array; // List of selected DLFLFaceVertex pointers - - // Viewport viewport; // Viewport for the window - PerspCamera *mCamera; //new camera originally from Don House and Chris Root, modified by Stuart and then Dave - - // Each viewport will have its own object to display. But since only - // the pointer is stored, different viewports can share the same object. - DLFLObjectPtr object; // Pointer to DLFLObjec - TMPatchObjectPtr patchObject; // The Patch Object associated with object - - // Each viewport will have its own renderer. But since only the pointer - // is stored different viewports can share the same renderer object. - DLFLRendererPtr renderer; - - //light is now a member of Glwidget instead of MainWindow - PointLight plight; - - // Each viewport will have its own grid - // Grid grid; // Display grid - - // Default Locator object // brianb - DLFLLocatorPtr locatorPtr; - - // Boolean flags - these are viewport specific - bool showgrid; // Should grid be shown? - bool showaxes; // Should axes be shown? - - QImage image; - -public: - inline TMPatchObjectPtr patchobject() { return patchObject; }; - - QCursor *cursor; - void redraw(); - - double getBrushSize() { return mBrushSize; } - void setBrushSize(double s) { mBrushSize = max(2.0, min(200.0, s)); repaint(); } - - inline void resetCamera() { mCamera->Reset(); }; - // Viewport* getViewport() // brianb - // { - // return &viewport; - // } - - void setRenderingEnabled(bool b) { renderObject = b; }; - - void setModeString(QString s) - { - mModeString = s; - } - - void setExtrusionModeString(QString s) - { - mExtrusionModeString = s; - } - - void setRemeshingSchemeString(QString s) - { - mRemeshingSchemeString = s; - } - - void setSelectionMaskString(QString s) - { - mSelectionMaskString = s; - } - QString getSelectionMaskString() { return mSelectionMaskString; } - - void renderLocatorsForSelect() // brianb - { - locatorPtr->setRenderSelection(true); - locatorPtr->render(); - locatorPtr->setRenderSelection(false); - } - - void resetLocator() // brianb - { - locatorPtr->setActiveVertex(nullptr); - } - - //--- Initialize the selection lists ---// - void initializeSelectionLists(int num) - { - // Reserves memory for the arrays to avoid reallocation - // It is not mandatory to call this function, but recommended - object->sel_vptr_array.reserve(num); - object->sel_eptr_array.reserve(num); - object->sel_fptr_array.reserve(num); - object->sel_fvptr_array.reserve(num); - sel_lptr_array.reserve(num); // brianb - } - - //--- Add items to the selection lists - check for nullptr pointers ---// - void addToSelection(DLFLLocatorPtr lp) // brianb - { - if (lp) sel_lptr_array.push_back(lp); - } - - void addToSelection(DLFLVertexPtr vp) - { - if (vp) object->sel_vptr_array.push_back(vp); - } - - void addToSelection(DLFLEdgePtr ep) - { - if (ep) object->sel_eptr_array.push_back(ep); - } - - void addToSelection(DLFLFacePtr fp) - { - if (fp) object->sel_fptr_array.push_back(fp); - } - - void addToSelection(DLFLFaceVertexPtr fvp) - { - if (fvp) object->sel_fvptr_array.push_back(fvp); - } - - //--- Check if given item is there in the selection list ---// - //--- Check if given item is there in the selection list ---// - static bool isSelected(DLFLLocatorPtr vp) - { - bool found = false; - if (vp) - { - for (int i = 0; i < sel_lptr_array.size(); ++i) - if (sel_lptr_array[i] == vp) - { - found = true; break; - } - } - return found; - } - - bool isSelected(DLFLVertexPtr vp) - { - bool found = false; - if (vp) - { - for (uint i = 0; i < object->sel_vptr_array.size(); ++i) - if (object->sel_vptr_array[i] == vp) - { - found = true; break; - } - } - return found; - } - - bool isSelected(DLFLEdgePtr ep) - { - bool found = false; - if (ep) - { - for (uint i = 0; i < object->sel_eptr_array.size(); ++i) - if (object->sel_eptr_array[i] == ep) - { - found = true; break; - } - } - return found; - } - - bool isSelected(DLFLFacePtr fp) - { - bool found = false; - if (fp) - { - for (uint i = 0; i < object->sel_fptr_array.size(); ++i) - if (object->sel_fptr_array[i] == fp) - { - found = true; break; - } - } - return found; - } - - bool isSelected(DLFLFaceVertexPtr fvp) - { - bool found = false; - if (fvp) - { - for (uint i = 0; i < object->sel_fvptr_array.size(); ++i) - if (object->sel_fvptr_array[i] == fvp) - { - found = true; break; - } - } - return found; - } - - //--- Set the selected item at given index ---// - //--- If size of array is smaller than index item will be added to end of array ---// - void setSelectedLocator(int index, DLFLLocatorPtr vp) // brianb - { - if (vp && index >= 0) - { - if (index < sel_lptr_array.size()) sel_lptr_array[index] = vp; - else sel_lptr_array.push_back(vp); - } - } - - void setSelectedVertex(int index, DLFLVertexPtr vp) - { - if (vp && index >= 0) - { - if ((uint)index < object->sel_vptr_array.size()) object->sel_vptr_array[index] = vp; - else object->sel_vptr_array.push_back(vp); - } - } - - void setSelectedEdge(int index, DLFLEdgePtr ep) - { - if (ep && index >= 0) - { - if ((uint)index < object->sel_eptr_array.size()) object->sel_eptr_array[index] = ep; - else object->sel_eptr_array.push_back(ep); - } - } - - void setSelectedFace(int index, DLFLFacePtr fp) - { - if (fp && index >= 0) - { - if ((uint)index < object->sel_fptr_array.size()) object->sel_fptr_array[index] = fp; - else object->sel_fptr_array.push_back(fp); - } - } - - void setSelectedFaceVertex(int index, DLFLFaceVertexPtr fvp) - { - if (fvp && index >= 0) - { - if ((uint)index < object->sel_fvptr_array.size()) object->sel_fvptr_array[index] = fvp; - else object->sel_fvptr_array.push_back(fvp); - } - } - - void setSelectedVertex(DLFLVertexPtr vp) - { - if (vp) - { - if (!isSelected(vp)) - { - //if ((uint)index < object->sel_vptr_array.size()) object->sel_vptr_array[index] = vp; - object->sel_vptr_array.push_back(vp); - } - } - } - - void setSelectedEdge(DLFLEdgePtr ep) - { - if (ep) - { - if (!isSelected(ep)) - { - //if ((uint)index < object->sel_eptr_array.size()) object->sel_eptr_array[index] = ep; - object->sel_eptr_array.push_back(ep); - } - } - } - - void setSelectedFace(DLFLFacePtr fp) - { - if (fp) - { - if (!isSelected(fp)) - { - //if ((uint)index < object->sel_fptr_array.size()) object->sel_fptr_array[index] = fp; - object->sel_fptr_array.push_back(fp); - } - } - } - - void setSelectedFaceVertex(DLFLFaceVertexPtr fvp) - { - if (fvp) - { - if (!isSelected(fvp)) - { - //if ((uint)index < object->sel_fvptr_array.size()) object->sel_fvptr_array[index] = fvp; - object->sel_fvptr_array.push_back(fvp); - } - } - } - - //--- Return the selected items at given index ---// - DLFLLocatorPtr getLocatorPtr() const // brianb - { - return locatorPtr; - } - - static DLFLLocatorPtr getSelectedLocator(int index) // brianb - { - if (index < sel_lptr_array.size()) return sel_lptr_array[index]; - return nullptr; - } - - DLFLVertexPtr getSelectedVertex(int index) - { - if ((uint)index < object->sel_vptr_array.size()) return object->sel_vptr_array[index]; - return nullptr; - } - - DLFLEdgePtr getSelectedEdge(int index) - { - if ((uint)index < object->sel_eptr_array.size()) return object->sel_eptr_array[index]; - return nullptr; - } - - DLFLFacePtr getSelectedFace(int index) - { - if ((uint)index < object->sel_fptr_array.size()) return object->sel_fptr_array[index]; - return nullptr; - } - - DLFLFacePtrArray& getSelectedFaces() { return object->sel_fptr_array; } - const DLFLFacePtrArray& getSelectedFaces() const { return object->sel_fptr_array; } - - DLFLVertexPtrArray& getSelectedVertices() { return object->sel_vptr_array; } - const DLFLVertexPtrArray& getSelectedVertices() const { return object->sel_vptr_array; } - - DLFLEdgePtrArray& getSelectedEdges() { return object->sel_eptr_array; } - const DLFLEdgePtrArray& getSelectedEdges() const { return object->sel_eptr_array; } - - DLFLFaceVertexPtrArray& getSelectedCorners() { return object->sel_fvptr_array; } - const DLFLFaceVertexPtrArray& getSelectedCorners() const { return object->sel_fvptr_array; } - - DLFLFaceVertexPtr getSelectedFaceVertex(int index) - { - if ((uint)index < object->sel_fvptr_array.size()) return object->sel_fvptr_array[index]; - return nullptr; - } - - //--- Find the number of items in the selection lists ---// - static int numSelectedLocators(void) - { // brianb - return sel_lptr_array.size(); - } - - int numSelectedVertices(void) - { - return object->sel_vptr_array.size(); - } - - int numSelectedEdges(void) - { - return object->sel_eptr_array.size(); - } - - int numSelectedFaces(void) - { - return object->sel_fptr_array.size(); - } - - int numSelectedCorners(void) - { - return object->sel_fvptr_array.size(); - } - - //--- Clear individual selection lists ---// - static void clearSelectedLocators(void) - { - sel_lptr_array.clear(); - } - - void clearSelectedVertices(void) - { - object->sel_vptr_array.clear(); - } - - void clearSelectedEdges(void) - { - object->sel_eptr_array.clear(); - } - - void clearSelectedFaces(void) - { - object->sel_fptr_array.clear(); - } - - void clearSelectedCorners(void) - { - object->sel_fvptr_array.clear(); - } - - void clearSelectedFace(DLFLFacePtr fp) - { - for (auto fiterator = object->sel_fptr_array.begin(); fiterator != object->sel_fptr_array.end(); fiterator++) - { - if (fp == *fiterator) - { - // delete fp; - object->sel_fptr_array.erase(fiterator); - return; - } - } - } - - void clearSelectedEdge(DLFLEdgePtr ep) - { - for (auto it = object->sel_eptr_array.begin(); it != object->sel_eptr_array.end(); it++) - { - if (ep == *it) - { - object->sel_eptr_array.erase(it); - return; - } - } - } - - void clearSelectedVertex(DLFLVertexPtr vp) - { - for (auto it = object->sel_vptr_array.begin(); it != object->sel_vptr_array.end(); it++) - { - if (vp == *it) - { - object->sel_vptr_array.erase(it); - return; - } - } - } - - void clearSelectedFaceVertex(DLFLFaceVertexPtr fvp) - { - for (auto it = object->sel_fvptr_array.begin(); it != object->sel_fvptr_array.end(); it++) - { - if (fvp == *it) - { - object->sel_fvptr_array.erase(it); - return; - } - } - } - - void clearSelectedFaceVertices(void) - { - object->sel_fvptr_array.clear(); - } - - // Reset all selection lists - void clearSelected(void) - { - sel_lptr_array.clear(); // brianb - object->sel_vptr_array.clear(); - object->sel_eptr_array.clear(); - object->sel_fptr_array.clear(); - object->sel_fvptr_array.clear(); - } - - // Draw the selected items - void drawSelected(void); - - // Subroutine to translate FLTK events to Viewport events - // static VPMouseEvent translateEvent(QMouseEvent *event) { - // // QMessageBox::about(nullptr, tr("About TopMod"),tr("%1").arg(event->type())); - // return ( (event->type() == 2/*QEvent::mouseButtonPress*/) ? VPPush : - // ( (event->type() == 3/*QEvent::mouseButtonRelease*/) ? VPRelease : - // ( (event->type() == 5/*QEvent::mouseMove*/) ? VPDrag : VPUnknown ) ) ); - // } - - // Set the object which should be shown in this viewport - void createPatchObject() - { - if (patchObject != nullptr) - { - delete patchObject; patchObject = nullptr; - } - patchObject = new TMPatchObject(object->getID()); - if (patchObject) - patchObject->updatePatches(object); - }; - - // Set the renderer for this viewport - void setRenderer(DLFLRendererPtr rp) - { - renderer = rp; - renderer->setState(); - this->repaint(); - } - - DLFLRendererPtr getRenderer() - { - return renderer; - } - - // Set the render flags - void setRenderFlags(int rflags) - { - if (renderer) renderer->setRenderFlags(rflags); - this->repaint(); - } - - // Get the render flags - int getRenderFlags(void) const - { - if (renderer) - return renderer->getRenderFlags(); - return -1; - } - - // Subroutines for selecting Vertices, Edges, Faces and FaceVertices (Corners) - DLFLLocatorPtr selectLocator(int mx, int my, int w = 10, int h = 10); // brianb - DLFLVertexPtr selectVertex(int mx, int my, int w = 30, int h = 30); - DLFLVertexPtrArray selectVertices(int mx, int my, int w = 30, int h = 30); - DLFLEdgePtr selectEdge(int mx, int my, int w = 10, int h = 10); - DLFLEdgePtrArray selectEdges(int mx, int my, int w = 10, int h = 10); - DLFLFacePtr selectFace(int mx, int my, int w = 2.5, int h = 2.5); - DLFLFacePtrArray selectFaces(int mx, int my, int w = 2.5, int h = 2.5); - DLFLFacePtr deselectFaces(int mx, int my, int w = 2.5, int h = 2.5); - // DLFLFacePtrArray selectFaces(int mx, int my); - // DLFLFacePtrArray deselectFaces(int mx, int my); - DLFLFaceVertexPtr selectFaceVertex(DLFLFacePtr fp, int mx, int my, int w = 40, int h = 40); - DLFLFaceVertexPtrArray selectFaceVertices(DLFLFacePtr fp, int mx, int my, int w = 40, int h = 40); - - // Event handler for the viewport. handles only mouse events when glwidget has focus - // which relate to navigational controls (ALT + push/drag/release) - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void wheelEvent(QWheelEvent *event); - - // void keyPressEvent(QKeyEvent *event); - // void keyReleaseEvent(QKeyEvent *event); - -private: - friend class QGLFormat; - QColor mGlobalAmbient; - QColor mRenderColor; - QColor mViewportColor; - - QColor mWireframeColor; - QColor mSilhouetteColor; - double mWireframeThickness; - double mSilhouetteThickness; - double mVertexThickness; - - QColor mVertexIDColor; - QColor mEdgeIDColor; - QColor mFaceIDColor; - QColor mVertexIDBgColor; - QColor mEdgeIDBgColor; - QColor mFaceIDBgColor; - - QColor mSelectedVertexColor; - double mSelectedVertexThickness; - QColor mSelectedFaceColor; - QColor mSelectedEdgeColor; - double mSelectedEdgeThickness; - - double mBrushSize; - double mStartDragX; - double mStartDragY; - double mSelectionWindowStartX; - double mSelectionWindowStartY; - - QColor mXAxisColor; - QColor mYAxisColor; - QColor mZAxisColor; - - QString mModeString; - QString mRemeshingSchemeString; - QString mSelectionMaskString; - QString mExtrusionModeString; - - QWidget *mParent; - -}; - -#endif diff --git a/topmodx/src/HighgenusMode.cc b/topmodx/src/HighgenusMode.cc deleted file mode 100644 index ae74fa4..0000000 --- a/topmodx/src/HighgenusMode.cc +++ /dev/null @@ -1,978 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include - -#include "HighgenusMode.h" - -/*! - \ingroup gui - @{ - - \class HighgenusMode - \brief High Genus Operations GUI elements. - - \note - - \see HighgenusMode -*/ - -/*! -* \brief Constructor -* -* @param parent the MainWindow widget -* @param sm the shortcut manager class for adding a custom shortcut to each menu action or icon -* @param actionList the master list of actions for use with the CommandCompleter class -* -*/ -HighgenusMode::HighgenusMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - mAddHoleHandleWidget = new QWidget; - mAddHoleHandleCVWidget = new QWidget; - mAddHandleSIWidget = new QWidget; - mRindModelingScalingWidget = new QWidget; - mRindModelingThicknessWidget = new QWidget; - mWireframeModelingWidget = new QWidget; - mWireframeModeling2Widget = new QWidget; - mColumnModelingWidget = new QWidget; - mSierpinskyWidget = new QWidget; - mMultiFaceHandleWidget = new QWidget; - mMengerSpongeWidget = new QWidget; - - setupAddHoleHandle(); - setupAddHoleHandleCV(); - setupAddHandleSI(); - setupRindModelingScaling(); - setupRindModelingThickness(); - setupWireframeModeling(); - setupWireframeModeling2(); - setupColumnModeling(); - setupSierpinsky(); - setupMultiFaceHandle(); - setupMengerSponge(); - - //setup the 10 modes for high genus modeling - mAddHoleHandleAction = new QAction(QIcon(":images/highgenus_addholehandle.png"), tr("Add Hole/Handle"), this); - mAddHoleHandleAction->setCheckable(true); - sm->registerAction(mAddHoleHandleAction, "High Genus Operations", ""); - mAddHoleHandleAction->setStatusTip(tr("Enter Add Hole/Handle Mode")); - mAddHoleHandleAction->setToolTip(tr("Add Hole/Handle Mode")); - connect(mAddHoleHandleAction, SIGNAL(triggered()), this, SLOT(triggerAddHoleHandle())); - actionList->addAction(mAddHoleHandleAction); - - mAddHoleHandleCVAction = new QAction(QIcon(":images/highgenus_addholehandlecv.png"), tr("Add Hole/Handle CV"), this); - mAddHoleHandleCVAction->setCheckable(true); - sm->registerAction(mAddHoleHandleCVAction, "High Genus Operations", ""); - mAddHoleHandleCVAction->setStatusTip(tr("Enter Add Hole/Handle CV Mode")); - mAddHoleHandleCVAction->setToolTip(tr("Add Hole/Handle CV Mode")); - connect(mAddHoleHandleCVAction, SIGNAL(triggered()), this, SLOT(triggerAddHoleHandleCV())); - actionList->addAction(mAddHoleHandleCVAction); - - mAddHandleSIAction = new QAction(QIcon(":images/highgenus_addhandlesi.png"), tr("Add Handle SI"), this); - mAddHandleSIAction->setCheckable(true); - sm->registerAction(mAddHandleSIAction, "High Genus Operations", ""); - mAddHandleSIAction->setStatusTip(tr("Enter Add Handle (Shape Interpolation) Mode")); - mAddHandleSIAction->setToolTip(tr("Add Handle (Shape Interpolation) Mode")); - connect(mAddHandleSIAction, SIGNAL(triggered()), this, SLOT(triggerAddHandleSI())); - actionList->addAction(mAddHandleSIAction); - - mRindModelingScalingAction = new QAction(QIcon(":images/highgenus_rindscaling.png"), tr("Rind Modeling Scaling"), this); - mRindModelingScalingAction->setCheckable(true); - sm->registerAction(mRindModelingScalingAction, "High Genus Operations", ""); - mRindModelingScalingAction->setStatusTip(tr("Enter Rind Modeling Scaling Mode")); - mRindModelingScalingAction->setToolTip(tr("Rind Modeling Scaling Mode")); - connect(mRindModelingScalingAction, SIGNAL(triggered()), this, SLOT(triggerRindModelingScaling())); - actionList->addAction(mRindModelingScalingAction); - - mRindModelingThicknessAction = new QAction(QIcon(":images/highgenus_rindthickness.png"), tr("Rind Modeling Thickness"), this); - mRindModelingThicknessAction->setCheckable(true); - sm->registerAction(mRindModelingThicknessAction, "High Genus Operations", ""); - mRindModelingThicknessAction->setStatusTip(tr("Enter Rind Modeling Thickness Mode")); - mRindModelingThicknessAction->setToolTip(tr("Rind Modeling Thickness Mode")); - connect(mRindModelingThicknessAction, SIGNAL(triggered()), this, SLOT(triggerRindModelingThickness())); - actionList->addAction(mRindModelingThicknessAction); - - mWireframeModelingAction = new QAction(QIcon(":images/highgenus_wireframe.png"), tr("Wireframe Modeling"), this); - mWireframeModelingAction->setCheckable(true); - sm->registerAction(mWireframeModelingAction, "High Genus Operations", ""); - mWireframeModelingAction->setStatusTip(tr("Enter Wireframe Modeling Mode")); - mWireframeModelingAction->setToolTip(tr("Wireframe Modeling Mode")); - connect(mWireframeModelingAction, SIGNAL(triggered()), this, SLOT(triggerWireframeModeling())); - actionList->addAction(mWireframeModelingAction); - - mWireframeModeling2Action = new QAction(QIcon(":images/highgenus_wireframe.png"), tr("Wireframe Modeling 2"), this); - mWireframeModeling2Action->setCheckable(true); - sm->registerAction(mWireframeModeling2Action, "High Genus Operations", ""); - mWireframeModeling2Action->setStatusTip(tr("Enter Wireframe Modeling 2 Mode")); - mWireframeModeling2Action->setToolTip(tr("Wireframe Modeling 2 Mode")); - connect(mWireframeModeling2Action, SIGNAL(triggered()), this, SLOT(triggerWireframeModeling2())); - actionList->addAction(mWireframeModeling2Action); - - mColumnModelingAction = new QAction(QIcon(":images/highgenus_column.png"), tr("Column Modeling"), this); - mColumnModelingAction->setCheckable(true); - sm->registerAction(mColumnModelingAction, "High Genus Operations", ""); - mColumnModelingAction->setStatusTip(tr("Enter Column Modeling Mode")); - mColumnModelingAction->setToolTip(tr("Column Modeling Mode")); - connect(mColumnModelingAction, SIGNAL(triggered()), this, SLOT(triggerColumnModeling())); - actionList->addAction(mColumnModelingAction); - - mSierpinskyAction = new QAction(QIcon(":images/highgenus_sierpinsky.png"), tr("Sierpinsky"), this); - mSierpinskyAction->setCheckable(true); - sm->registerAction(mSierpinskyAction, "High Genus Operations", ""); - mSierpinskyAction->setStatusTip(tr("Enter Sierpinsky Mode")); - mSierpinskyAction->setToolTip(tr("Sierpinsky Mode")); - connect(mSierpinskyAction, SIGNAL(triggered()), this, SLOT(triggerSierpinsky())); - actionList->addAction(mSierpinskyAction); - - mMultiFaceHandleAction = new QAction(QIcon(":images/highgenus_multifacehandle.png"), tr("Multi-face Handle"), this); - mMultiFaceHandleAction->setCheckable(true); - sm->registerAction(mMultiFaceHandleAction, "High Genus Operations", ""); - mMultiFaceHandleAction->setStatusTip(tr("Enter Multi-face Handle Mode")); - mMultiFaceHandleAction->setToolTip(tr("Multi-face Handle Mode")); - connect(mMultiFaceHandleAction, SIGNAL(triggered()), this, SLOT(triggerMultiFaceHandle())); - actionList->addAction(mMultiFaceHandleAction); - - mMengerSpongeAction = new QAction(QIcon(":images/highgenus_mengersponge.png"), tr("Menger Sponge"), this); - mMengerSpongeAction->setCheckable(true); - sm->registerAction(mMengerSpongeAction, "High Genus Operations", ""); - mMengerSpongeAction->setStatusTip(tr("Enter Menger Sponge Mode")); - mMengerSpongeAction->setToolTip(tr("Menger Sponge Mode")); - connect(mMengerSpongeAction, SIGNAL(triggered()), this, SLOT(triggerMengerSponge())); - actionList->addAction(mMengerSpongeAction); -} - -QMenu* HighgenusMode::getMenu() -{ - mHighgenusMenu = new QMenu(tr("High Genus")); - - mHighgenusMenu->addAction(mAddHoleHandleAction); - mHighgenusMenu->addAction(mAddHoleHandleCVAction); - mHighgenusMenu->addAction(mAddHandleSIAction); - mHighgenusMenu->addAction(mRindModelingScalingAction); - mHighgenusMenu->addAction(mRindModelingThicknessAction); - mHighgenusMenu->addAction(mWireframeModelingAction); - mHighgenusMenu->addAction(mWireframeModeling2Action); - mHighgenusMenu->addAction(mColumnModelingAction); - mHighgenusMenu->addAction(mSierpinskyAction); - mHighgenusMenu->addAction(mMultiFaceHandleAction); - mHighgenusMenu->addAction(mMengerSpongeAction); - - return mHighgenusMenu; -} - -void HighgenusMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mAddHoleHandleAction); - actionGroup->addAction(mAddHoleHandleCVAction); - actionGroup->addAction(mAddHandleSIAction); - actionGroup->addAction(mRindModelingScalingAction); - actionGroup->addAction(mRindModelingThicknessAction); - actionGroup->addAction(mWireframeModelingAction); - actionGroup->addAction(mWireframeModeling2Action); - actionGroup->addAction(mColumnModelingAction); - actionGroup->addAction(mSierpinskyAction); - actionGroup->addAction(mMultiFaceHandleAction); - actionGroup->addAction(mMengerSpongeAction); - - toolBar->addAction(mAddHoleHandleAction); - toolBar->addAction(mAddHoleHandleCVAction); - toolBar->addAction(mAddHandleSIAction); - toolBar->addAction(mRindModelingScalingAction); - toolBar->addAction(mRindModelingThicknessAction); - toolBar->addAction(mWireframeModelingAction); - toolBar->addAction(mWireframeModeling2Action); - toolBar->addAction(mColumnModelingAction); - toolBar->addAction(mSierpinskyAction); - toolBar->addAction(mMultiFaceHandleAction); - toolBar->addAction(mMengerSpongeAction); - - stackedWidget->addWidget(mAddHoleHandleWidget); - stackedWidget->addWidget(mAddHoleHandleCVWidget); - stackedWidget->addWidget(mAddHandleSIWidget); - stackedWidget->addWidget(mRindModelingScalingWidget); - stackedWidget->addWidget(mRindModelingThicknessWidget); - stackedWidget->addWidget(mWireframeModelingWidget); - stackedWidget->addWidget(mWireframeModeling2Widget); - stackedWidget->addWidget(mColumnModelingWidget); - stackedWidget->addWidget(mSierpinskyWidget); - stackedWidget->addWidget(mMultiFaceHandleWidget); - stackedWidget->addWidget(mMengerSpongeWidget); -} - -void HighgenusMode::triggerAddHoleHandle() -{ - ((MainWindow*)mParent)->setToolOptions(mAddHoleHandleWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ConnectFaceVertices); -} - -void HighgenusMode::triggerAddHoleHandleCV() -{ - ((MainWindow*)mParent)->setToolOptions(mAddHoleHandleCVWidget); - ((MainWindow*)mParent)->setMode(MainWindow::ConnectFaces); -} - -void HighgenusMode::triggerAddHandleSI() -{ - ((MainWindow*)mParent)->setToolOptions(mAddHandleSIWidget); - ((MainWindow*)mParent)->setMode(MainWindow::HermiteConnectFaces); -} - -void HighgenusMode::triggerRindModelingScaling() -{ - ((MainWindow*)mParent)->setToolOptions(mRindModelingScalingWidget); - ((MainWindow*)mParent)->setMode(MainWindow::SelectFaceLoop); - // ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void HighgenusMode::triggerRindModelingThickness() -{ - ((MainWindow*)mParent)->setToolOptions(mRindModelingThicknessWidget); - ((MainWindow*)mParent)->setMode(MainWindow::SelectFaceLoop); -} - -void HighgenusMode::triggerWireframeModeling() -{ - ((MainWindow*)mParent)->setToolOptions(mWireframeModelingWidget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void HighgenusMode::triggerWireframeModeling2() -{ - ((MainWindow*)mParent)->setToolOptions(mWireframeModeling2Widget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void HighgenusMode::triggerColumnModeling() -{ - ((MainWindow*)mParent)->setToolOptions(mColumnModelingWidget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void HighgenusMode::triggerSierpinsky() -{ - ((MainWindow*)mParent)->setToolOptions(mSierpinskyWidget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void HighgenusMode::triggerMultiFaceHandle() -{ - ((MainWindow*)mParent)->setToolOptions(mMultiFaceHandleWidget); - ((MainWindow*)mParent)->setMode(MainWindow::MultiSelectFace); -} - -void HighgenusMode::triggerMengerSponge() -{ - ((MainWindow*)mParent)->setToolOptions(mMengerSpongeWidget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); -} - -void HighgenusMode::toggleCrustCleanupFlag(int state) -{ - rindModelingThicknessCleanupCheckBox->setChecked(state); - rindModelingScalingCleanupCheckBox->setChecked(state); - - ((MainWindow*)mParent)->toggleCrustCleanupFlag(state); -} - -void HighgenusMode::toggleWireframeSplit(int state) -{ - wireframeSplitCheckBox->setChecked(state); - wireframe2SplitCheckBox->setChecked(state); - - ((MainWindow*)mParent)->toggleWireframeSplit(state); -} - -QDoubleSpinBox *HighgenusMode::createDoubleSpinBox( - QGridLayout *layout, QLabel *label, QString s, - double low, double high, double step, double value, double decimals, - int row, int col) -{ - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox(this); - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -void HighgenusMode::setupAddHoleHandle() -{ - mAddHoleHandleLayout = new QGridLayout; - mAddHoleHandleLayout->setVerticalSpacing(1); - mAddHoleHandleLayout->setHorizontalSpacing(1); - // mAddHoleHandleLayout->setMargin(0); - addHoleHandleNumSegmentsLabel = new QLabel(this); - addHoleHandleNumSegmentsSpinBox = createDoubleSpinBox( - mAddHoleHandleLayout, addHoleHandleNumSegmentsLabel, tr("# Segments"), - 1, 100, 1, 10, 0, 0, 0); - connect(addHoleHandleNumSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(numSegmentsValueChanged(double))); - - addHoleHandleNumSegmentsConnectLabel = new QLabel(this); - addHoleHandleNumSegmentsConnectSpinBox = createDoubleSpinBox( - mAddHoleHandleLayout, addHoleHandleNumSegmentsConnectLabel, tr("# Segments to\nConnect (-1=all)"), - -1, 10, 1, -1, 0, 1, 0); - connect(addHoleHandleNumSegmentsConnectSpinBox, SIGNAL(valueChanged(double)), this, SLOT(numSegmentsConnectValueChanged(double))); - - addHoleHandlePinching = new QLabel(this); - addHoleHandlePinchingConnectSpinBox = createDoubleSpinBox( - mAddHoleHandleLayout, addHoleHandlePinching, tr("Pinching"), - -10, 10, 0.1, 1.0, 3, 2, 0); - connect(addHoleHandlePinchingConnectSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeHoleHandlePinch(double))); - - addHoleHandlePinchingCenter = new QLabel(this); - addHoleHandlePinchingCenterConnectSpinBox = createDoubleSpinBox( - mAddHoleHandleLayout, addHoleHandlePinchingCenter, tr("Pinch Center"), - 0, 1, 0.1, 0.5, 3, 3, 0); - connect(addHoleHandlePinchingCenterConnectSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeHoleHandlePinchCenter(double))); - - addHoleHandlePinchingWidth = new QLabel(this); - addHoleHandlePinchingWidthConnectSpinBox = createDoubleSpinBox( - mAddHoleHandleLayout, addHoleHandlePinchingWidth, tr("Pinch Width"), - 0.001, 10, 0.1, 1.0, 3, 4, 0); - connect(addHoleHandlePinchingWidthConnectSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeHoleHandlePinchWidth(double))); - - mAddHoleHandleLayout->setRowStretch(6, 1); - mAddHoleHandleLayout->setColumnStretch(2, 1); - mAddHoleHandleWidget->setWindowTitle(tr("Add Hole/Handle")); - mAddHoleHandleWidget->setLayout(mAddHoleHandleLayout); -} - -//slot for num segments to reset the max segments range -void HighgenusMode::numSegmentsValueChanged(double value) -{ - ((MainWindow*)mParent)->changeNumSegments(value); - - addHoleHandleNumSegmentsSpinBox->setValue(value); - addHoleHandleCVNumSegmentsSpinBox->setValue(value); - addHandleSINumSegmentsSpinBox->setValue(value); - - //set the # segments to connect range on all three hole/handle panels - addHoleHandleNumSegmentsConnectSpinBox->setRange(0, value); - addHoleHandleCVNumSegmentsConnectSpinBox->setRange(0, value); - addHandleSINumSegmentsConnectSpinBox->setRange(0, value); - - if (addHoleHandleNumSegmentsConnectSpinBox->value() > value || - addHoleHandleCVNumSegmentsConnectSpinBox->value() > value || - addHandleSINumSegmentsConnectSpinBox->value() > value) - { - addHoleHandleNumSegmentsConnectSpinBox->setValue(value); - addHoleHandleCVNumSegmentsConnectSpinBox->setValue(value); - addHandleSINumSegmentsConnectSpinBox->setValue(value); - } -} - -//slot for num segments to set the max segments -void HighgenusMode::numSegmentsConnectValueChanged(double value) -{ - ((MainWindow*)mParent)->changeMaxSegments(value); - - addHoleHandleNumSegmentsConnectSpinBox->setValue(value); - addHoleHandleCVNumSegmentsConnectSpinBox->setValue(value); - addHandleSINumSegmentsConnectSpinBox->setValue(value); -} - -//slot for change hold/handle pinch amount -void HighgenusMode::changeHoleHandlePinch(double value) -{ - ((MainWindow*)mParent)->changeHoleHandlePinchValue(value); -} -//slot for change hold/handle pinch amount -void HighgenusMode::changeHoleHandlePinchCenter(double value) -{ - ((MainWindow*)mParent)->changeHoleHandlePinchCenterValue(value); -} -//slot for change hold/handle pinch amount -void HighgenusMode::changeHoleHandlePinchWidth(double value) -{ - ((MainWindow*)mParent)->changeHoleHandlePinchWidthValue(value); -} - -void HighgenusMode::setupAddHoleHandleCV() -{ - mAddHoleHandleCVLayout = new QGridLayout; - // mAddHoleHandleCVLayout->setMargin(0); - mAddHoleHandleCVLayout->setVerticalSpacing(1); - mAddHoleHandleCVLayout->setHorizontalSpacing(1); - - addHoleHandleCVNumSegmentsLabel = new QLabel(this); - addHoleHandleCVNumSegmentsSpinBox = createDoubleSpinBox( - mAddHoleHandleCVLayout, addHoleHandleCVNumSegmentsLabel, tr("# Segments"), - 1, 100, 1, 10, 0, 0, 0); - connect(addHoleHandleCVNumSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(numSegmentsValueChanged(double))); - - addHoleHandleCVNumSegmentsConnectLabel = new QLabel(this); - addHoleHandleCVNumSegmentsConnectSpinBox = createDoubleSpinBox( - mAddHoleHandleCVLayout, addHoleHandleCVNumSegmentsConnectLabel, tr("# Segments to\nConnect (-1=all)"), - 0, 10, 1, -1, 0, 1, 0); - connect(addHoleHandleNumSegmentsConnectSpinBox, SIGNAL(valueChanged(double)), this, SLOT(numSegmentsConnectValueChanged(double))); - - mAddHoleHandleCVLayout->setRowStretch(4, 1); - mAddHoleHandleCVLayout->setColumnStretch(2, 1); - mAddHoleHandleCVWidget->setWindowTitle(tr("Add Hole/Handle (Closest Vertex)")); - mAddHoleHandleCVWidget->setLayout(mAddHoleHandleCVLayout); -} - -void HighgenusMode::setupAddHandleSI() -{ - mAddHandleSILayout = new QGridLayout; - // mAddHandleSILayout->setMargin(0); - mAddHandleSILayout->setVerticalSpacing(1); - mAddHandleSILayout->setHorizontalSpacing(1); - - //number of segments - addHandleSINumSegmentsLabel = new QLabel(this); - addHandleSINumSegmentsSpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSINumSegmentsLabel, tr("# Segments"), - 1, 100, 1, 10, 0, 0, 0); - connect(addHandleSINumSegmentsSpinBox, SIGNAL(valueChanged(double)), this, SLOT(numSegmentsValueChanged(double))); - //number of segments to connect - addHandleSINumSegmentsConnectLabel = new QLabel(this); - addHandleSINumSegmentsConnectSpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSINumSegmentsConnectLabel, tr("# Segments to\nConnect (-1=all)"), - 0, 10, 1, -1, 0, 1, 0); - connect( - addHoleHandleNumSegmentsConnectSpinBox, SIGNAL(valueChanged(double)), - this, SLOT(numSegmentsConnectValueChanged(double))); - //weight 1 - addHandleSIWeight1Label = new QLabel(this); - addHandleSIWeight1SpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSIWeight1Label, tr("Weight 1"), - -100, 100, 0.1, 25.0, 3, 2, 0); - connect(addHandleSIWeight1SpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeWeight1(double))); - //symmetric weights checkbox - addHandleSISymmetricWeightsCheckBox = new QCheckBox(tr("Symmetric Weights"), this); - addHandleSISymmetricWeightsCheckBox->setChecked(Qt::Checked); - connect(addHandleSISymmetricWeightsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleSymmetricWeightsFlag(int))); - mAddHandleSILayout->addWidget(addHandleSISymmetricWeightsCheckBox, 3, 0, 1, 2); - //weight 2 - must be disabled when the checkbox is unchecked... - addHandleSIWeight2Label = new QLabel(this); - addHandleSIWeight2SpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSIWeight2Label, tr("Weight 2"), - -100, 100, 0.1, 25.0, 3, 4, 0); - addHandleSIWeight2SpinBox->setEnabled(false); - connect(addHandleSIWeight2SpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeWeight2(double))); - - //add twists? - addHandleSITwistsConnectLabel = new QLabel(this); - addHandleSITwistsConnectSpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSITwistsConnectLabel, tr("Extra Twists"), - 0, 100, 1, 0, 0, 5, 0); - connect(addHandleSITwistsConnectSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeExtraTwists(double))); - - //pinching controls - addHandleSIPinchConnectLabel = new QLabel(this); - addHandleSIPinchConnectSpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSIPinchConnectLabel, tr("Pinching"), - -10, 10, 0.1, 1.0, 3, 6, 0); - connect(addHandleSIPinchConnectSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changePinch(double))); - - //pinching center - addHandleSIPinchCenterConnectLabel = new QLabel(this); - addHandleSIPinchCenterConnectSpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSIPinchCenterConnectLabel, tr("Pinch Center"), - 0.001, 0.999, 0.05, 0.5, 3, 7, 0); - connect(addHandleSIPinchCenterConnectSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changePinchCenter(double))); - - //bubble controls - addHandleSIBubbleConnectLabel = new QLabel(this); - addHandleSIBubbleConnectSpinBox = createDoubleSpinBox( - mAddHandleSILayout, addHandleSIBubbleConnectLabel, tr("Pinch Width"), - 0.001, 10.0, 0.1, 1.0, 3, 8, 0); - connect(addHandleSIBubbleConnectSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeBubble(double))); - - - mAddHandleSILayout->setRowStretch(8, 1); - mAddHandleSILayout->setColumnStretch(2, 1); - mAddHandleSIWidget->setWindowTitle(tr("Add Handle (Shape Interpolation)")); - mAddHandleSIWidget->setLayout(mAddHandleSILayout); -} - -void HighgenusMode::toggleSymmetricWeightsFlag(int state) -{ - ((MainWindow*)mParent)->toggleSymmetricWeightsFlag(state); - - if (state) - addHandleSIWeight2SpinBox->setEnabled(false); - else - addHandleSIWeight2SpinBox->setEnabled(true); -} - -void HighgenusMode::setupRindModelingScaling() -{ - mRindModelingScalingLayout = new QGridLayout; - // mRindModelingScalingLayout->setMargin(0); - mRindModelingScalingLayout->setVerticalSpacing(1); - mRindModelingScalingLayout->setHorizontalSpacing(1); - - //scale factor - 0.00-10.00 - rindModelingScalingLabel = new QLabel(this); - rindModelingScalingSpinBox = createDoubleSpinBox( - mRindModelingScalingLayout, rindModelingScalingLabel, tr("Scale"), - 0, 10.0, 0.01, 0.9, 3, 0, 0); - connect(rindModelingScalingSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeCrustScaleFactor(double))); - //symmetric weights checkbox - rindModelingScalingCleanupCheckBox = new QCheckBox(tr("Cleanup when peeling"), this); - rindModelingScalingCleanupCheckBox->setChecked(Qt::Unchecked); - connect(rindModelingScalingCleanupCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleCrustCleanupFlag(int))); - mRindModelingScalingLayout->addWidget(rindModelingScalingCleanupCheckBox, 1, 0, 1, 2); - //create crust button - rindModelingScalingCreateCrustButton = new QPushButton(tr("Create Crust"), this); - connect(rindModelingScalingCreateCrustButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(crustModeling4())); // ((MainWindow*)mParent), SLOT(crust_modeling1())); //crust_modeling3 - mRindModelingScalingLayout->addWidget(rindModelingScalingCreateCrustButton, 2, 0, 1, 2); - //set layout and add stretch - mRindModelingScalingLayout->setRowStretch(3, 1); - mRindModelingScalingLayout->setColumnStretch(2, 1); - mRindModelingScalingWidget->setWindowTitle(tr("Rind Modeling (Scaling)")); - mRindModelingScalingWidget->setLayout(mRindModelingScalingLayout); -} - -void HighgenusMode::setupRindModelingThickness() -{ - mRindModelingThicknessLayout = new QGridLayout; - // mRindModelingThicknessLayout->setMargin(0); - mRindModelingThicknessLayout->setVerticalSpacing(1); - mRindModelingThicknessLayout->setHorizontalSpacing(1); - - //thickness - rindModelingThicknessLabel = new QLabel(this); - rindModelingThicknessSpinBox = createDoubleSpinBox( - mRindModelingThicknessLayout, rindModelingThicknessLabel, tr("Thickness:"), - -1.0, 1.0, 0.01, 0.5, 3, 0, 0); - connect(rindModelingThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeCrustThickness(double))); - //symmetric weights checkbox - rindModelingThicknessCleanupCheckBox = new QCheckBox(tr("Cleanup when peeling"), this); - rindModelingThicknessCleanupCheckBox->setChecked(Qt::Unchecked); - connect(rindModelingThicknessCleanupCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleCrustCleanupFlag(int))); - mRindModelingThicknessLayout->addWidget(rindModelingThicknessCleanupCheckBox, 1, 0, 1, 2); - //create crust button - rindModelingThicknessCreateButton = new QPushButton(tr("Create Crust"), this); - connect(rindModelingThicknessCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(crustModeling3())); - mRindModelingThicknessLayout->addWidget(rindModelingThicknessCreateButton, 2, 0, 1, 2); - //set layout and add stretch - mRindModelingThicknessLayout->setRowStretch(3, 1); - mRindModelingThicknessLayout->setColumnStretch(2, 1); - mRindModelingThicknessWidget->setWindowTitle(tr("Rind Modeling (Thickness)")); - mRindModelingThicknessWidget->setLayout(mRindModelingThicknessLayout); -} - - -void HighgenusMode::setupWireframeModeling() -{ - mWireframeModelingLayout = new QGridLayout; - // mWireframeModelingLayout->setMargin(0); - mWireframeModelingLayout->setVerticalSpacing(1); - mWireframeModelingLayout->setHorizontalSpacing(1); - //thickness - wireframeModelingThicknessLabel = new QLabel(this); - wireframeModelingThicknessSpinBox = createDoubleSpinBox( - mWireframeModelingLayout, wireframeModelingThicknessLabel, tr("Thickness:"), - 0.0, 1.0, 0.01, 0.25, 3, 0, 0); - connect( - wireframeModelingThicknessSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeWireframeThickness(double))); - - //split 2 valence checkbox - wireframeSplitCheckBox = new QCheckBox(tr("Split Valence-2 Vertices"), this); - wireframeSplitCheckBox->setChecked(Qt::Checked); - connect( - wireframeSplitCheckBox, SIGNAL(stateChanged(int)), - this, SLOT(toggleWireframeSplit(int))); - mWireframeModelingLayout->addWidget(wireframeSplitCheckBox, 1, 0, 1, 2); - - //create wireframe button - wireframeModelingCreateButton = new QPushButton(tr("Create Wireframe"), this); - connect(wireframeModelingCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(makeWireframe())); - mWireframeModelingLayout->addWidget(wireframeModelingCreateButton, 2, 0, 1, 2); - //set layout and add stretch - mWireframeModelingLayout->setRowStretch(3, 1); - mWireframeModelingLayout->setColumnStretch(2, 1); - mWireframeModelingWidget->setWindowTitle(tr("Wireframe Modeling")); - mWireframeModelingWidget->setLayout(mWireframeModelingLayout); -} - -void HighgenusMode::setupWireframeModeling2() -{ - mWireframeModeling2Layout = new QGridLayout; - // mWireframeModeling2Layout->setMargin(0); - mWireframeModeling2Layout->setVerticalSpacing(1); - mWireframeModeling2Layout->setHorizontalSpacing(1); - //thickness - wireframeModeling2ThicknessLabel = new QLabel(this); - wireframeModeling2ThicknessSpinBox = createDoubleSpinBox( - mWireframeModeling2Layout, wireframeModeling2ThicknessLabel, tr("Thickness:"), - 0.0, 1.0, 0.01, 0.25, 3, 0, 0); - connect( - wireframeModeling2ThicknessSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeWireframe2Thickness(double))); - wireframeModeling2WidthLabel = new QLabel(this); - wireframeModeling2WidthSpinBox = createDoubleSpinBox( - mWireframeModeling2Layout, wireframeModeling2WidthLabel, tr("Width:"), - 0.0, 1.0, 0.01, 0.25, 3, 1, 0); - connect( - wireframeModeling2WidthSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeWireframe2Width(double))); - - //split 2 valence checkbox - wireframe2SplitCheckBox = new QCheckBox(tr("Split Valence-2 Vertices"), this); - wireframe2SplitCheckBox->setChecked(Qt::Checked); - connect(wireframe2SplitCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleWireframeSplit(int))); - mWireframeModeling2Layout->addWidget(wireframe2SplitCheckBox, 2, 0, 1, 2); - - //create wireframe button - wireframeModeling2CreateButton = new QPushButton(tr("Create Wireframe 2"), this); - connect(wireframeModeling2CreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(makeWireframe2())); - mWireframeModeling2Layout->addWidget(wireframeModeling2CreateButton, 3, 0, 1, 2); - //set layout and add stretch - mWireframeModeling2Layout->setRowStretch(4, 1); - mWireframeModeling2Layout->setColumnStretch(2, 1); - mWireframeModeling2Widget->setWindowTitle(tr("Wireframe Modeling 2")); - mWireframeModeling2Widget->setLayout(mWireframeModeling2Layout); -} - -void HighgenusMode::setupColumnModeling() -{ - - mColumnModelingLayout = new QGridLayout; - // mColumnModelingLayout->setMargin(0); - mColumnModelingLayout->setVerticalSpacing(1); - mColumnModelingLayout->setHorizontalSpacing(1); - - //thickness - columnModelingThicknessLabel = new QLabel(this); - columnModelingThicknessSpinBox = createDoubleSpinBox( - mColumnModelingLayout, columnModelingThicknessLabel, tr("Thickness:"), - 0.0, 1.0, 0.01, 0.25, 3, 0, 0); - connect(columnModelingThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeColumnThickness(double))); - //number of segments - columnModelingNumSegmentsLabel = new QLabel(this); - columnModelingNumSegmentsSpinBox = createDoubleSpinBox( - mColumnModelingLayout, columnModelingNumSegmentsLabel, tr("# Segments:"), - 4.0, 100, 1, 4, 0, 1, 0); - connect( - columnModelingNumSegmentsSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeColumnSegments(double))); - //create column button - columnModelingCreateButton = new QPushButton(tr("Create Columns"), this); - connect( - columnModelingCreateButton, SIGNAL(clicked()), - ((MainWindow*)mParent), SLOT(makeWireframeWithColumns())); - mColumnModelingLayout->addWidget(columnModelingCreateButton, 2, 0, 1, 2); - //set layout and add stretch - mColumnModelingLayout->setRowStretch(3, 1); - mColumnModelingLayout->setColumnStretch(2, 1); - mColumnModelingWidget->setWindowTitle(tr("Column Modeling")); - mColumnModelingWidget->setLayout(mColumnModelingLayout); -} - -void HighgenusMode::setupSierpinsky() -{ - - mSierpinskyLayout = new QGridLayout; - // mSierpinskyLayout->setMargin(0); - mSierpinskyLayout->setVerticalSpacing(1); - mSierpinskyLayout->setHorizontalSpacing(1); - //create column button - sierpinskyButton = new QPushButton(tr("Create Sierpinsky\nTetrahedra"), this); - connect(sierpinskyButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(multiConnectMidpoints())); - mSierpinskyLayout->addWidget(sierpinskyButton, 0, 0); - - mSierpinskyLayout->setRowStretch(1, 1); - mSierpinskyLayout->setColumnStretch(1, 1); - mSierpinskyWidget->setWindowTitle(tr("Sierpinsky Tetrahedra")); - mSierpinskyWidget->setLayout(mSierpinskyLayout); -} - -void HighgenusMode::setupMultiFaceHandle() -{ - - mMultiFaceHandleLayout = new QGridLayout; - // mMultiFaceHandleLayout->setMargin(0); - mMultiFaceHandleLayout->setVerticalSpacing(1); - mMultiFaceHandleLayout->setHorizontalSpacing(1); - - multiFaceAlgorithmGroupBox = new QGroupBox(tr("Use Convex Hull\nAlgorithm")); - multiFaceAlgorithmGroupBox->setCheckable(true); - multiFaceAlgorithmGroupBox->setChecked(false); - - mMultiFaceAlgorithmLayout = new QGridLayout; - mMultiFaceAlgorithmLayout->setVerticalSpacing(2); - mMultiFaceAlgorithmLayout->setHorizontalSpacing(2); - - multiFaceAlgorithmGroupBox->setAlignment(Qt::AlignLeft); - - connect(multiFaceAlgorithmGroupBox, SIGNAL(toggled(bool)), - this, SLOT(changeMultiFaceAlgorithm(bool))); - - //scaling - multiFaceHandleScaleLabel = new QLabel(this); - multiFaceHandleScaleSpinBox = new QDoubleSpinBox; - multiFaceHandleScaleSpinBox->setRange(0.0, 5.0); - multiFaceHandleScaleSpinBox->setSingleStep(0.01); - multiFaceHandleScaleSpinBox->setValue(1.0); - multiFaceHandleScaleSpinBox->setDecimals(2); - multiFaceHandleScaleSpinBox->setMaximumSize(75, 25); - mMultiFaceAlgorithmLayout->addWidget(multiFaceHandleScaleLabel, 0, 0); - mMultiFaceAlgorithmLayout->addWidget(multiFaceHandleScaleSpinBox, 0, 1); - multiFaceHandleScaleLabel = new QLabel(this); - multiFaceHandleScaleSpinBox = createDoubleSpinBox( - mMultiFaceAlgorithmLayout, multiFaceHandleScaleLabel, tr("Scale Factor:"), - 0.0, 5.0, 0.01, 1.0, 3, 0, 0); - connect( - multiFaceHandleScaleSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeMultiFaceHandleScaleFactor(double))); - - //extrude distance - multiFaceHandleExtrudeDistanceLabel = new QLabel(this); - multiFaceHandleExtrudeDistanceSpinBox = new QDoubleSpinBox; - multiFaceHandleExtrudeDistanceSpinBox->setRange(-2.0, 2.0); - multiFaceHandleExtrudeDistanceSpinBox->setSingleStep(0.01); - multiFaceHandleExtrudeDistanceSpinBox->setValue(0.5); - multiFaceHandleExtrudeDistanceSpinBox->setDecimals(1); - multiFaceHandleExtrudeDistanceSpinBox->setMaximumSize(75, 25); - mMultiFaceAlgorithmLayout->addWidget(multiFaceHandleExtrudeDistanceLabel, 1, 0); - mMultiFaceAlgorithmLayout->addWidget(multiFaceHandleExtrudeDistanceSpinBox, 1, 1); - multiFaceHandleExtrudeDistanceLabel = new QLabel(this); - multiFaceHandleExtrudeDistanceSpinBox = createDoubleSpinBox( - mMultiFaceAlgorithmLayout, multiFaceHandleExtrudeDistanceLabel, tr("Extrude Dist.\nFactor:"), - -2.0, 2.0, 0.1, 0.5, 3, 1, 0); - connect( - multiFaceHandleExtrudeDistanceSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeMultiFaceHandleExtrudeDist(double))); - - //use max. offsets - multiFaceHandleMaxOffsetsCheckBox = new QCheckBox(tr("Use max offsets"), this); - connect( - multiFaceHandleMaxOffsetsCheckBox, SIGNAL(stateChanged(int)), - this, SLOT(toggleMultiFaceHandleUseMaxOffsetFlag(int))); - mMultiFaceAlgorithmLayout->addWidget(multiFaceHandleMaxOffsetsCheckBox, 2, 0, 1, 2); - multiFaceAlgorithmGroupBox->setLayout(mMultiFaceAlgorithmLayout); - - //add the groupbox to the multiface layout - mMultiFaceHandleLayout->addWidget(multiFaceAlgorithmGroupBox, 0, 0); - multiFaceHandleButton = new QPushButton(tr("Connect Selected Faces"), this); - connect( - multiFaceHandleButton, SIGNAL(clicked()), - ((MainWindow*)mParent), SLOT(createMultiFaceHandle())); - mMultiFaceHandleLayout->addWidget(multiFaceHandleButton, 1, 0, 1, 2); - - mMultiFaceHandleLayout->setRowStretch(4, 1); - mMultiFaceHandleLayout->setColumnStretch(2, 1); - mMultiFaceHandleWidget->setWindowTitle(tr("Multi-Face Handle")); - mMultiFaceHandleWidget->setLayout(mMultiFaceHandleLayout); -} - -void HighgenusMode::toggleMultiFaceHandleUseMaxOffsetFlag(int state) -{ - ((MainWindow*)mParent)->toggleMultiFaceHandleUseMaxOffsetFlag(state); - - if (state) - { - multiFaceHandleExtrudeDistanceSpinBox->setEnabled(false); - multiFaceHandleExtrudeDistanceLabel->setEnabled(false); - } - else - { - multiFaceHandleExtrudeDistanceLabel->setEnabled(true); - multiFaceHandleExtrudeDistanceSpinBox->setEnabled(true); - } -} - -void HighgenusMode::changeMultiFaceAlgorithm(bool on) -{ - if (!on) - { - ((MainWindow*)mParent)->mfh_use_closest_edge_algo(); - // //set all three widgets to be disabled - multiFaceHandleScaleLabel->setEnabled(false); - multiFaceHandleExtrudeDistanceLabel->setEnabled(false); - multiFaceHandleExtrudeDistanceSpinBox->setEnabled(false); - multiFaceHandleMaxOffsetsCheckBox->setEnabled(false); - multiFaceHandleScaleSpinBox->setEnabled(false); - - } - else - { - ((MainWindow*)mParent)->mfh_use_convex_hull_algo(); - - multiFaceHandleScaleLabel->setEnabled(true); - multiFaceHandleScaleSpinBox->setEnabled(true); - multiFaceHandleMaxOffsetsCheckBox->setEnabled(true); - - //check if the checkbox is checked first or not, then enable widgets accordingly - if (multiFaceHandleMaxOffsetsCheckBox->checkState() == Qt::Checked) - { - multiFaceHandleExtrudeDistanceLabel->setEnabled(true); - multiFaceHandleExtrudeDistanceSpinBox->setEnabled(true); - } - } -} - -void HighgenusMode::setupMengerSponge() -{ - mMengerSpongeLayout = new QGridLayout; - // mMengerSpongeLayout->setMargin(0); - mMengerSpongeLayout->setVerticalSpacing(1); - mMengerSpongeLayout->setHorizontalSpacing(1); - //thickness - mengerSpongeThicknessLabel = new QLabel(this); - mengerSpongeThicknessSpinBox = createDoubleSpinBox( - mMengerSpongeLayout, mengerSpongeThicknessLabel, tr("Thickness:"), - 0.01, 1.0, 0.01, 0.67, 3, 0, 0); - connect( - mengerSpongeThicknessSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeMengerSpongeThickness(double))); - //threshold - mengerSpongeThresholdLabel = new QLabel(this); - mengerSpongeThresholdSpinBox = createDoubleSpinBox( - mMengerSpongeLayout, mengerSpongeThresholdLabel, tr("Edge Collapse\nThreshold Factor:"), - 0.0, 10.0, 0.1, 0.0, 3, 1, 0); - connect( - mengerSpongeThresholdSpinBox, SIGNAL(valueChanged(double)), - ((MainWindow*)mParent), SLOT(changeMengerSpongeCollapseThreshold(double))); - //fractional thickness checkbox - mengerSpongFractionalThicknessCheckBox = new QCheckBox(tr("Fractional Thickness"), this); - connect( - mengerSpongFractionalThicknessCheckBox, SIGNAL(stateChanged(int)), - ((MainWindow*)mParent), SLOT(toggleMengerSpongeFractionalThicknessFlag(int))); - mMengerSpongeLayout->addWidget(mengerSpongFractionalThicknessCheckBox, 2, 0, 1, 2); - //create menger sponge button - mengerSpongeButton = new QPushButton(tr("Create Menger Sponge"), this); - connect( - mengerSpongeButton, SIGNAL(clicked()), - ((MainWindow*)mParent), SLOT(createSponge())); - mMengerSpongeLayout->addWidget(mengerSpongeButton, 3, 0, 1, 2); - - mMengerSpongeLayout->setRowStretch(4, 1); - mMengerSpongeLayout->setColumnStretch(2, 1); - mMengerSpongeWidget->setWindowTitle(tr("Menger Sponge")); - mMengerSpongeWidget->setLayout(mMengerSpongeLayout); -} - -void HighgenusMode::retranslateUi() -{ - //actions - mAddHoleHandleAction->setText(tr("Add Hole/Handle")); - mAddHoleHandleAction->setStatusTip(tr("Enter Add Hole/Handle Mode")); - mAddHoleHandleAction->setToolTip(tr("Add Hole/Handle Mode")); - mAddHoleHandleCVAction->setText(tr("Add Hole/Handle CV")); - mAddHoleHandleCVAction->setStatusTip(tr("Enter Add Hole/Handle CV Mode")); - mAddHoleHandleCVAction->setToolTip(tr("Add Hole/Handle CV Mode")); - mAddHandleSIAction->setText(tr("Add Handle SI")); - mAddHandleSIAction->setStatusTip(tr("Enter Add Handle (Shape Interpolation) Mode")); - mAddHandleSIAction->setToolTip(tr("Add Handle (Shape Interpolation) Mode")); - mRindModelingScalingAction->setText(tr("Rind Modeling Scaling")); - mRindModelingScalingAction->setStatusTip(tr("Enter Rind Modeling Scaling Mode")); - mRindModelingScalingAction->setToolTip(tr("Rind Modeling Scaling Mode")); - mRindModelingThicknessAction->setText(tr("Rind Modeling Thickness")); - mRindModelingThicknessAction->setStatusTip(tr("Enter Rind Modeling Thickness Mode")); - mRindModelingThicknessAction->setToolTip(tr("Rind Modeling Thickness Mode")); - mWireframeModelingAction->setText(tr("Wireframe Modeling")); - mWireframeModelingAction->setStatusTip(tr("Enter Wireframe Modeling Mode")); - mWireframeModelingAction->setToolTip(tr("Wireframe Modeling Mode")); - mWireframeModeling2Action->setText(tr("Wireframe Modeling 2")); - mWireframeModeling2Action->setStatusTip(tr("Enter Wireframe Modeling 2 Mode")); - mWireframeModeling2Action->setToolTip(tr("Wireframe Modeling 2 Mode")); - mColumnModelingAction->setText(tr("Column Modeling")); - mColumnModelingAction->setStatusTip(tr("Enter Column Modeling Mode")); - mColumnModelingAction->setToolTip(tr("Column Modeling Mode")); - mSierpinskyAction->setText(tr("Sierpinsky")); - mSierpinskyAction->setStatusTip(tr("Enter Sierpinsky Mode")); - mSierpinskyAction->setToolTip(tr("Sierpinsky Mode")); - mMultiFaceHandleAction->setText(tr("Multi-face Handle")); - mMultiFaceHandleAction->setStatusTip(tr("Enter Multi-face Handle Mode")); - mMultiFaceHandleAction->setToolTip(tr("Multi-face Handle Mode")); - mMengerSpongeAction->setText(tr("Menger Sponge")); - mMengerSpongeAction->setStatusTip(tr("Enter Menger Sponge Mode")); - mMengerSpongeAction->setToolTip(tr("Menger Sponge Mode")); - //menus - mHighgenusMenu->setTitle(tr("High Genus")); - - //!< \todo add buttons and spinbox labels to retranslate function for highgenusmode.cc - addHoleHandleNumSegmentsLabel->setText(tr("# Segments")); - addHoleHandleNumSegmentsConnectLabel->setText(tr("# Segments to\nConnect (-1=all)")); - mAddHoleHandleWidget->setWindowTitle(tr("Add Hole/Handle")); - addHoleHandleCVNumSegmentsLabel->setText(tr("# Segments")); - addHoleHandleCVNumSegmentsConnectLabel->setText(tr("# Segments to\nConnect (-1=all)")); - mAddHoleHandleCVWidget->setWindowTitle(tr("Add Hole/Handle (Closest Vertex)")); - addHandleSINumSegmentsLabel->setText(tr("# Segments")); - addHandleSINumSegmentsConnectLabel->setText(tr("# Segments to\nConnect (-1=all)")); - addHandleSIWeight1Label->setText(tr("Weight 1")); - addHandleSISymmetricWeightsCheckBox->setText(tr("Symmetric Weights")); - addHandleSIWeight2Label->setText(tr("Weight 2")); - addHandleSITwistsConnectLabel->setText(tr("Extra Twists")); - mAddHandleSIWidget->setWindowTitle(tr("Add Handle (Shape Interpolation)")); - rindModelingScalingLabel->setText(tr("Scale")); - rindModelingScalingCleanupCheckBox->setText(tr("Cleanup when peeling")); - rindModelingScalingCreateCrustButton->setText(tr("Create Crust")); - mRindModelingScalingWidget->setWindowTitle(tr("Rind Modeling (Scaling)")); - rindModelingThicknessLabel->setText(tr("Thickness:")); - rindModelingThicknessCleanupCheckBox->setText(tr("Cleanup when peeling")); - rindModelingThicknessCreateButton->setText(tr("Create Crust")); - mRindModelingThicknessWidget->setWindowTitle(tr("Rind Modeling (Thickness)")); - wireframeModelingThicknessLabel->setText(tr("Thickness:")); - wireframeModelingCreateButton->setText(tr("Create Wireframe")); - mWireframeModelingWidget->setWindowTitle(tr("Wireframe Modeling")); - wireframeModeling2ThicknessLabel->setText(tr("Thickness:")); - wireframeModeling2WidthLabel->setText(tr("Width:")); - wireframeModeling2CreateButton->setText(tr("Create Wireframe 2")); - mWireframeModeling2Widget->setWindowTitle(tr("Wireframe Modeling 2")); - columnModelingThicknessLabel->setText(tr("Thickness:")); - columnModelingNumSegmentsLabel->setText(tr("# Segments:")); - columnModelingCreateButton->setText(tr("Create Columns")); - mColumnModelingWidget->setWindowTitle(tr("Column Modeling")); - sierpinskyButton->setText(tr("Create Sierpinsky\nTetrahedra")); - mSierpinskyWidget->setWindowTitle(tr("Sierpinsky Tetrahedra")); - multiFaceAlgorithmGroupBox->setTitle(tr("Use Convex Hull\nAlgorithm")); - multiFaceHandleScaleLabel->setText(tr("Scale Factor:")); - multiFaceHandleExtrudeDistanceLabel->setText(tr("Extrude Dist.\nFactor:")); - multiFaceHandleMaxOffsetsCheckBox->setText(tr("Use max offsets")); - multiFaceHandleButton->setText(tr("Connect Selected Faces")); - mMultiFaceHandleWidget->setWindowTitle(tr("Multi-Face Handle")); - - mengerSpongeThicknessLabel->setText(tr("Thickness:")); - mengerSpongeThresholdLabel->setText(tr("Edge Collapse\nThreshold Factor:")); - - mengerSpongFractionalThicknessCheckBox->setText(tr("Fractional Thickness")); - mengerSpongeButton->setText(tr("Create Menger Sponge")); - mMengerSpongeWidget->setWindowTitle(tr("Menger Sponge")); -} diff --git a/topmodx/src/HighgenusMode.h b/topmodx/src/HighgenusMode.h deleted file mode 100644 index 85d034b..0000000 --- a/topmodx/src/HighgenusMode.h +++ /dev/null @@ -1,228 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef HIGHGENUSMODE_H -#define HIGHGENUSMODE_H - -/*! -\file HighgenusMode.hh -\brief Definition of the HighgenusMode class - -\see HighgenusMode -*/ - -#include "MainWindow.h" -class MainWindow; - -class HighgenusMode : public QWidget -{ - Q_OBJECT - -public: - HighgenusMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); - - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu* getMenu(); - void retranslateUi(); - -protected: - void setupAddHoleHandle(); - void setupAddHoleHandleCV(); - void setupAddHandleSI(); - void setupRindModelingScaling(); - void setupRindModelingThickness(); - void setupWireframeModeling(); - void setupWireframeModeling2(); - void setupColumnModeling(); - void setupSierpinsky(); - void setupMultiFaceHandle(); - void setupMengerSponge(); - - QDoubleSpinBox *createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col); - - public slots: - void numSegmentsValueChanged(double value); - void changeMultiFaceAlgorithm(bool on); - void toggleMultiFaceHandleUseMaxOffsetFlag(int state); - void toggleSymmetricWeightsFlag(int state); - void toggleWireframeSplit(int state); - - void toggleCrustCleanupFlag(int state); - void numSegmentsConnectValueChanged(double value); - - void triggerAddHoleHandle(); - void triggerAddHoleHandleCV(); - void triggerAddHandleSI(); - void triggerRindModelingScaling(); - void triggerRindModelingThickness(); - void triggerWireframeModeling(); - void triggerWireframeModeling2(); - void triggerColumnModeling(); - void triggerSierpinsky(); - void triggerMultiFaceHandle(); - void triggerMengerSponge(); - - void changeHoleHandlePinch(double value); - void changeHoleHandlePinchCenter(double value); - void changeHoleHandlePinchWidth(double value); - -public: - QAction *mAddHoleHandleAction; - QAction *mAddHoleHandleCVAction; - QAction *mAddHandleSIAction; - QAction *mRindModelingScalingAction; - QAction *mRindModelingThicknessAction; - QAction *mWireframeModelingAction; - QAction *mWireframeModeling2Action; - QAction *mColumnModelingAction; - QAction *mSierpinskyAction; - QAction *mMultiFaceHandleAction; - QAction *mMengerSpongeAction; - - QWidget *mAddHoleHandleWidget; - QWidget *mAddHoleHandleCVWidget; - QWidget *mAddHandleSIWidget; - QWidget *mRindModelingScalingWidget; - QWidget *mRindModelingThicknessWidget; - QWidget *mWireframeModelingWidget; - QWidget *mWireframeModeling2Widget; - QWidget *mColumnModelingWidget; - QWidget *mSierpinskyWidget; - QWidget *mMultiFaceHandleWidget; - QWidget *mMengerSpongeWidget; - - QGridLayout *mAddHoleHandleLayout; - QGridLayout *mAddHoleHandleCVLayout; - QGridLayout *mAddHandleSILayout; - QGridLayout *mRindModelingScalingLayout; - QGridLayout *mRindModelingThicknessLayout; - QGridLayout *mWireframeModelingLayout; - QGridLayout *mWireframeModeling2Layout; - QGridLayout *mColumnModelingLayout; - QGridLayout *mSierpinskyLayout; - QGridLayout *mMultiFaceHandleLayout; - QGridLayout *mMengerSpongeLayout; - -private: - QWidget *mParent; - QMenu *mHighgenusMenu; - - QLabel *addHoleHandleNumSegmentsConnectLabel; - QLabel *addHoleHandleNumSegmentsLabel; - QLabel *addHoleHandlePinching; //Ryan - QLabel *addHoleHandlePinchingCenter; //Ryan - QLabel *addHoleHandlePinchingWidth; //Ryan - - QLabel *addHoleHandleCVNumSegmentsLabel; - QLabel *addHoleHandleCVNumSegmentsConnectLabel; - QLabel *addHandleSINumSegmentsLabel; - QLabel *addHandleSINumSegmentsConnectLabel; - QLabel *addHandleSIWeight1Label; - QLabel *addHandleSIWeight2Label; - QLabel *addHandleSITwistsConnectLabel; - QLabel *addHandleSIPinchConnectLabel; //Ryan - QLabel *rindModelingScalingLabel; - QLabel *rindModelingThicknessLabel; - QLabel *wireframeModelingThicknessLabel; - QLabel *wireframeModeling2ThicknessLabel; - QLabel *wireframeModeling2WidthLabel; - QLabel *columnModelingThicknessLabel; - QLabel *mengerSpongeThicknessLabel; - QLabel *mengerSpongeThresholdLabel; - QLabel *columnModelingNumSegmentsLabel; - - QGridLayout *mMultiFaceAlgorithmLayout; - - QButtonGroup *multiFaceAlgorithmButtonGroup; - - QCheckBox *rindModelingThicknessCleanupCheckBox; - QCheckBox *rindModelingScalingCleanupCheckBox; - - QDoubleSpinBox *addHoleHandleNumSegmentsConnectSpinBox; - QDoubleSpinBox *addHoleHandleNumSegmentsSpinBox; - QDoubleSpinBox *addHoleHandlePinchingConnectSpinBox; //Ryan - QDoubleSpinBox *addHoleHandlePinchingCenterConnectSpinBox; //Ryan - QDoubleSpinBox *addHoleHandlePinchingWidthConnectSpinBox; //Ryan - QDoubleSpinBox *addHandleSIBubbleConnectSpinBox; //Ryan - QDoubleSpinBox *addHandleSIPinchCenterConnectSpinBox; //Ryan - - QDoubleSpinBox *addHoleHandleCVNumSegmentsSpinBox; - QDoubleSpinBox *addHoleHandleCVNumSegmentsConnectSpinBox; - - QDoubleSpinBox *addHandleSINumSegmentsSpinBox; - QDoubleSpinBox *addHandleSINumSegmentsConnectSpinBox; - - QDoubleSpinBox *addHandleSITwistsConnectSpinBox; - QDoubleSpinBox *addHandleSIWeight1SpinBox; - QDoubleSpinBox *addHandleSIWeight2SpinBox; - - QDoubleSpinBox *addHandleSIPinchConnectSpinBox;//ryan - QLabel *addHandleSIPinchCenterConnectLabel;//ryan - QLabel *addHandleSIBubbleConnectLabel;//ryan - - - QDoubleSpinBox *rindModelingScalingSpinBox; - QDoubleSpinBox *rindModelingThicknessSpinBox; - QDoubleSpinBox *wireframeModelingThicknessSpinBox; - QDoubleSpinBox *wireframeModeling2ThicknessSpinBox; - QDoubleSpinBox *wireframeModeling2WidthSpinBox; - QDoubleSpinBox *columnModelingThicknessSpinBox; - QDoubleSpinBox *columnModelingNumSegmentsSpinBox; - QDoubleSpinBox *mengerSpongeThicknessSpinBox; - QDoubleSpinBox *mengerSpongeThresholdSpinBox; - - QCheckBox *wireframeSplitCheckBox; - QCheckBox *wireframe2SplitCheckBox; - - - QLabel *multiFaceHandleExtrudeDistanceLabel; - QLabel *multiFaceHandleScaleLabel; - QDoubleSpinBox *multiFaceHandleExtrudeDistanceSpinBox; - QCheckBox *multiFaceHandleMaxOffsetsCheckBox; - QDoubleSpinBox *multiFaceHandleScaleSpinBox; - - QCheckBox *addHandleSISymmetricWeightsCheckBox; - QPushButton *rindModelingScalingCreateCrustButton; - QPushButton *rindModelingThicknessCreateButton; - QPushButton *wireframeModelingCreateButton; - QPushButton *wireframeModeling2CreateButton; - QPushButton *columnModelingCreateButton; - QPushButton *sierpinskyButton; - QGroupBox *multiFaceAlgorithmGroupBox; - QPushButton *multiFaceHandleButton; - QCheckBox *mengerSpongFractionalThicknessCheckBox; - QPushButton *mengerSpongeButton; - -}; - -#endif diff --git a/topmodx/src/MainWindow.cc b/topmodx/src/MainWindow.cc deleted file mode 100644 index ca745be..0000000 --- a/topmodx/src/MainWindow.cc +++ /dev/null @@ -1,5859 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#include -#include -#include "MainWindow.h" - -/*! - \ingroup gui - @{ - - \class MainWindow - \brief The Main Window of the application. - - \note - - \see MainWindow -*/ - -WireframeRendererPtr MainWindow::sWiredRenderer; //!< WireframeRenderer Pointer -NormalRendererPtr MainWindow::sNormalRenderer; //!< NormalRenderer Pointer -LitRendererPtr MainWindow::sLitRenderer; //!< LitRenderer Pointer -TexturedRendererPtr MainWindow::sTexturedRenderer; //!< TexturedRenderer Pointer -TexturedLitRendererPtr MainWindow::sTexturedLitRenderer; //!< TexturedLitRenderer Pointer -PatchRendererPtr MainWindow::sPatchRenderer; //!< PatchRenderer Pointer -ColorableRendererPtr MainWindow::sColorableRendererr; //!< ColorableRenderer Pointer - -//-- Parameters used in various operations on the DLFL object --// -//-- See header file for explanations --// - -int MainWindow::sDragStartX = 0; -int MainWindow::sDragStartY = 0; -bool MainWindow::sIsEditing = false; - -//face area - dave -float MainWindow::sFaceAreaTolerance = 0.05; -//face color tolerance -float MainWindow::sFaceColorTolerance = 0.00; - -// Edge deletion -bool MainWindow::sDeleteEdgeCleanup = true; - -// Handles -int MainWindow::sNumSegments = 10; -int MainWindow::sMaxSegments = -1; -bool MainWindow::sSymmetricWeights = true; -double MainWindow::sFaceNormalWeight1 = 25.0; -double MainWindow::sFaceNormalWeight2 = 25.0; -int MainWindow::sNumExtraTwists = 0; - -// Extrusions -double MainWindow::sExtrudeDist = 2.0; -double MainWindow::sExtrudeRot = 0.0; -double MainWindow::sExtrudeScale = 1.0; -double MainWindow::sExtrudeAngle = 40.0; -double MainWindow::sExtrudeLength1 = 0.5; -double MainWindow::sExtrudeLength2 = 1.0; -double MainWindow::sExtrudeLength3 = 1.0; -double MainWindow::sExtrudeAngle_iCosA = 50.0; -double MainWindow::sExtrudeLength1_iCosA = 0.5; -double MainWindow::sExtrudeLength2_iCosA = 0.7; -double MainWindow::sExtrudeLength3_iCosA = 0.8; -int MainWindow::sNumExtrusions = 1; -double MainWindow::sDooSabinExtrusionTwist = 0.0; -bool MainWindow::sDualMeshEdgesCheck = false; -bool MainWindow::sHexagonalizeDodecaExtrude = false; -double MainWindow::sExtrudeBendT = 0; -double MainWindow::sExtrudeBendB = 0; - -// Edge subdivision -int MainWindow::sNumEdgeSubdiv = 2; - -// Split valence 2 vertices -double MainWindow::sVertexSplitOffset=-0.1; - -// Crust modeling -double MainWindow::sCrustThickness = 0.5; -double MainWindow::sCrustScaleFactor = 0.9; -bool MainWindow::sCrustCleanup = true; - -// Wireframe modeling -double MainWindow::sWireframeThickness = 0.25; -double MainWindow::sWireframe2Thickness = 0.25; -double MainWindow::sWireframe2Width = 0.25; -bool MainWindow::sWireframeSplit = true; -double MainWindow::sCornerCuttingAlpha = 9.0/16.0; - - -// Column modeling -double MainWindow::sColumnThickness = 0.25; -int MainWindow::sColumnSegments = 4; - -// Subdivision -double MainWindow::sTwistFactor = 0.0; -double MainWindow::sWeightFactor = 0.0; -bool MainWindow::sDooSabinCheck = true; -double MainWindow::sVertexCuttingOffset = 0.25; -double MainWindow::sPentagonalOffset = 0.0; -double MainWindow::sPentagonalScale = 0.75; -bool MainWindow::sAccurateDual = true; -double MainWindow::sCheckerboardThickness = 0.33; -double MainWindow::sModifiedCornerCuttingThickness = 0.25; - -// Added by Doug -double MainWindow::sStarOffset = 0.0; -double MainWindow::sFractalOffset = 1.0; - -//Added by Ryan -double MainWindow::sPinchingFactor = 1; -double MainWindow::sPinchCenter = 0.5; -double MainWindow::sBubbleFactor = 1; -double MainWindow::sHoleHandlePinchingFactor = 1; -double MainWindow::sHoleHandlePinchCenter = 0.5; -double MainWindow::sHoleHandlePinchWidth = 1; - -// Added by Eric -double MainWindow::sSubstellateHeight = 0.0; -double MainWindow::sSubstellateCurve = 0.0; - -// Added by bei&cansin dec 09 -double MainWindow::sDomeLengthFactor = 1.0 ; -double MainWindow::sDomeScaleFactor = 1.0 ; -double MainWindow::sDual1264ScaleFactor = 0.7 ; - -//dave -// double MainWindow::dooSabinExtrudeTwist_factor = 0.0 ; -double MainWindow::sDomeExtrudeLengthFactor = 1.0 ; -double MainWindow::sDomeExtrudeScaleFactor = 1.0 ; -double MainWindow::sDomeExtrudeRotationFactor = 0.0 ; - -// Added by bei dec 11 -double MainWindow::sDooSabinBCnewScaleFactor = 1.0; -double MainWindow::sDooSabinBCnewLengthFactor = 1.0; - -// Added by bei 12-11-03 -double MainWindow::sLoopLengthFactor = 1.0; - -// Face subdivision -bool MainWindow::sUseQuads = true; - -// Tile texturing -int MainWindow::sTileTexSize = 2; - -// Multi-face handles -MainWindow::MFHAlgo MainWindow::sMfhAlgorithm = MainWindow::ConvexHull; -double MainWindow::sMfhScaleFactor = 1.0; -double MainWindow::sMfhExtrudeDist = 0.5; -bool MainWindow::sMfhUseMaxOffsets = false; -double MainWindow::sMfhMinAdjFactor = 0.01; -bool MainWindow::sMfhMakeConnections = true; - -// Menger Sponge creation -double MainWindow::sSpongeThickness = 0.67; // Thickness for Menger Sponge -double MainWindow::sSpongeCollapseThreshold = 0.0; // Threshold factor for edge collapse -bool MainWindow::sSpongeFractionalThickness = false; // Thickness is fractional - -//conical sculpting initialization from ozgur -double MainWindow::sCutOffsetEdgeFactor = 0.25; -double MainWindow::sCutOffsetVertFactor = 0.25; -double MainWindow::sPNormalBendS_Factor = 0; -double MainWindow::sPNormalBendT_Factor = 0; -bool MainWindow::sGlobalCut = false; -int MainWindow::sNumOfPeels = 90; -bool MainWindow::sSelectedCut=true; - -//-- Selection count, used as index into selection lists --// -int MainWindow::sNumSelVerts = 0; -int MainWindow::sNumSelEdges = 0; -int MainWindow::sNumSelFaces = 0; -int MainWindow::sNumSelFaceVerts = 0; - -bool MainWindow::sDeselectVerts = false; -bool MainWindow::sDeselectEdges = false; -bool MainWindow::sDeselectFaces = false; -bool MainWindow::sDeselectFaceVerts = false; - -// for face loop selection -DLFLEdgePtr MainWindow::sFaceLoopStartEdge = nullptr; -DLFLEdgePtr MainWindow::sEdgeRingStartEdge = nullptr; - -//incremental save... -int MainWindow::sIncrementalSaveCount = 0; - -//paint bucket static color: -QColor MainWindow::sPaintBucketColor = QColor(0.5,0.5,0.5); - -/** - * asdflkjasdf - * asdfl;jkas;df - **/ -MainWindow::MainWindow(char *filename) - : mObject(), mOperationMode(NormalMode) - , mUndoList(), mUndoMtlList(), mRedoList(), mRedoMtlList() - , mUndoLimit(20), mUseUndo(true) - , mIsModified(false), mIsPrimitive(false), mWasPrimitive(false) - , mSpinBoxMode(eInvalidSpinBox) -{ - // i18n stuff - mTranslator_es = new QTranslator(this); - mTranslator_fr = new QTranslator(this); - mTranslator_de = new QTranslator(this); - mTranslator_tr = new QTranslator(this); - mTranslator_it = new QTranslator(this); - mTranslator_hi = new QTranslator(this); - mTranslator_ca = new QTranslator(this); - - //for auto save - //auto save timer // and connect it to the saveFile slot - mAutoSaveTimer = new QTimer(this); - connect(mAutoSaveTimer, SIGNAL(timeout()), this, SLOT(saveFile(/*normals and texture options should go here... eventually*/))); - - //QSettings Path for windows -#ifdef WIN32 - QSettings::setPath(QSettings::IniFormat,QSettings::UserScope,QString("%APPDATA%")); -#endif - -//#ifdef __APPLE__ - //mac icon - this->setWindowIcon(QIcon(":/images/topmod.png")); -//#endif - //initialize the OpenGL Window GLWidget - QGLFormat fmt; - //initialize renderer - createRenderers(); - setMouseTracking(true); - - mActiveViewport = new GLWidget(500,600, sLitRenderer, QColor(255,255,255,255),QColor(255,255,255,255) , &mObject, fmt, this); - // active->switchTo(VPPersp); - setRenderer(sLitRenderer); - mActiveViewport->redraw(); - mActiveViewport->setMinimumSize(400,400); - mActiveViewport->setFocusPolicy(Qt::StrongFocus); - setFocusPolicy(Qt::StrongFocus); - // active->setResizeEnabled(true); - //status bar - mStatusBar = new QStatusBar(this); - //statusbar is not working!!! it throws off glwidget's pick coordinates.... :( - setStatusBar(mStatusBar); - setAttribute(Qt::WA_AcceptDrops, true); - setWindowFlags(Qt::Window); - setWindowTitle(tr("newfile[*] - TopMod")); - setCurrentFile("untitled"); - // cWidget = new QWidget(); - // QWidget *shwidget = new QWidget; - // QVBoxLayout *vblayout = new QVBoxLayout; - // vblayout->addWidget(active); - // shwidget->setLayout(vblayout); - //accept file drop events - setAcceptDrops(true); - /** Setup Main Layout and add the glwidget to it **/ - // layout = new QBoxLayout( QBoxLayout::LeftToRight, this ); - // layout->addWidget(active); - // layout->setMargin(0); - // vblayout->setMargin(0); - // cWidget->setLayout( layout ); - setCentralWidget(mActiveViewport); - //store user's desktop size - QWidget *d = QApplication::desktop(); - int w=d->width(); // returns screen width - int h=d->height(); // returns screen height - -#ifdef WITH_PYTHON - //the script editor widget will be placed into a QDockWidget - //and will be dockable in the top and bottom sections of the main window - mScriptEditorDockWidget = new QDockWidget(tr("Script Editor"), this); - mScriptEditor = new DLFLScriptEditor( &mObject, mScriptEditorDockWidget ); - mScriptEditorDockWidget->setAllowedAreas(Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea); - mScriptEditorDockWidget->setWidget(mScriptEditor); - addDockWidget(Qt::BottomDockWidgetArea, mScriptEditorDockWidget); - mScriptEditorDockWidget->hide(); - mScriptEditorDockWidget->setFloating(true); - // mScriptEditorDockWidget->setGeometry(20,h-320,500,300); - //mScriptEditorDockWidget->setMaximumHeight(200); - connect( this, SIGNAL(loadedObject(DLFLObject*,QString)),mScriptEditor, SLOT(loadObject(DLFLObject*,QString)) ); - connect( this, SIGNAL(echoCommand(QString)),mScriptEditor, SLOT(echoCommand(QString)) ); - connect( mScriptEditor, SIGNAL(makingChange()), this, SLOT(undoPush()) ); - connect( mScriptEditor, SIGNAL(cmdExecuted()), this, SLOT(recomputeAll()) ); - connect( mScriptEditor, SIGNAL(cmdExecuted()), this->getActive(), SLOT(update()) ); - connect( mScriptEditor, SIGNAL(requestObject(QString)), this, SLOT(openFile(QString)) ); - - if( !Py_IsInitialized() ) - Py_Initialize( ); -#endif - -#ifdef WITH_VERSE - mVerseDialog = VerseTopMod::Instance(this); - mVerseDialogDockWidget = new QDockWidget(tr("Verse-TopMod"), this); - mVerseDialogDockWidget->setAllowedAreas(Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea); - mVerseDialogDockWidget->setWidget(mVerseDialog); - addDockWidget(Qt::BottomDockWidgetArea, mVerseDialogDockWidget); - mVerseDialogDockWidget->hide(); - mVerseDialogDockWidget->setMaximumHeight(200); -#endif - - //Tool options dockwidget must be initialized before setting up the actions - //the main tool options DockWidget - mToolOptionsDockWidget = new QDockWidget(tr("Tool Options - Insert Edge"), this); - mToolOptionsDockWidget->setAllowedAreas(Qt::RightDockWidgetArea); - mToolOptionsStackedWidget = new QStackedWidget(); - mToolOptionsDockWidget->setWidget(mToolOptionsStackedWidget); - // mToolOptionsDockWidget->move(width() , 150); - // mToolOptionsTitleBarLayout = new QBoxLayout(QBoxLayout::LeftToRight); - // mToolOptionsTitleBarWidget = new QWidget; - // mToolOptionsTitleBarWidget->setLayout(mToolOptionsTitleBarLayout); - // mToolOptionsDockWidget->setTitleBarWidget(mToolOptionsTitleBarWidget); - // mToolOptionsDockWidget->titleBarWidget()->setContentsMargins(0,0,0,0); - // mToolOptionsDockWidget->move(0,22); - addDockWidget(Qt::RightDockWidgetArea, mToolOptionsDockWidget); - - //animated help dockwidget - initializeAnimatedHelp(); - - //make a new instance of QShortcutManager - mShortcutManager = new QShortcutManager(); - mActionModel = new QStandardItemModel(); - mActionListWidget = new QWidget; - - //startup dialog - mStartupDialogDockWidget = new QDockWidget(tr("Learning Movies"),this); - - createActions(); - - //instantiate toolbars - mBasicsMode = new BasicsMode(this, mShortcutManager, mActionListWidget); - mExtrusionsMode = new ExtrusionsMode(this, mShortcutManager, mActionListWidget ); - mConicalMode = new ConicalMode(this, mShortcutManager); - mRemeshingMode = new RemeshingMode(this, mShortcutManager, mActionListWidget); - mHighgenusMode = new HighgenusMode(this, mShortcutManager, mActionListWidget); - mTexturingMode = new TexturingMode(this, mShortcutManager, mActionListWidget); - mExperimentalMode = new ExperimentalMode(this, mShortcutManager, mActionListWidget); - - - #ifdef QCOMPLETER - mCommandCompleter = new CommandCompleter(mActionListWidget, this); - #endif - createToolBars(); - createMenus(); - //initialize the help file... - initializeHelp(); - //style sheet editor - mStyleSheetEditor = new StyleSheetEditor; - //preference dialog - mSettings = new QSettings("TopMod"); - mPreferencesDialog = new TopModPreferences(mSettings, mStyleSheetEditor, mShortcutManager, this); - - // //testing shortcut context - // for (int i = 0; i < mActionListWidget->actions().count(); i++){ - // mActionListWidget->actions().at(i)->setShortcutContext(Qt::WidgetShortcut); - // } - - //reposition floating windows: - // mToolOptionsDockWidget->setGeometry(10 + this->x()/*this->active->width()-mToolOptionsDockWidget->width()*/,this->y()+150,mToolOptionsDockWidget->width(),mToolOptionsDockWidget->height()); - // mToolOptionsDockWidget->setFixedSize(mToolOptionsDockWidget->width(),mToolOptionsDockWidget->height()); - - //must happen after preference file is loaded - createStartupDialog(); - - retranslateUi(); - setExtrusionMode(CubicalExtrude); - setMode(MainWindow::NormalMode); - - // std::cout << QT_VER << "\n"; -} - -// void MainWindow::setToolOptionsPo - -void MainWindow::createActions() { - - //File Menu Actions - mNewFileAct = new QAction(/*QIcon(":images/folder.png"),*/tr("&New File..."), this); - mShortcutManager->registerAction(mNewFileAct, "File Menu", "CTRL+N"); - mNewFileAct->setStatusTip(tr("Open a blank file and clear the undo list")); - connect(mNewFileAct, SIGNAL(triggered()), this, SLOT(newFile())); - mActionListWidget->addAction(mNewFileAct); - - mOpenAct = new QAction(QIcon(":images/folder.png"), tr("&Open..."), this); - mShortcutManager->registerAction(mOpenAct, "File Menu", "CTRL+O"); - mOpenAct->setStatusTip(tr("Open an existing file")); - connect(mOpenAct, SIGNAL(triggered()), this, SLOT(openFile())); - mActionListWidget->addAction(mOpenAct); - - mSaveAct = new QAction(QIcon(":images/document-save.png"), tr("&Save"), this); - mShortcutManager->registerAction(mSaveAct, "File Menu", "CTRL+S"); - mSaveAct->setStatusTip(tr("Save the document to disk")); - connect(mSaveAct, SIGNAL(triggered()), this, SLOT(saveFile())); - mActionListWidget->addAction(mSaveAct); - - mSaveAsAct = new QAction(QIcon(":images/document-save-as.png"), tr("Save &As..."), this); - mShortcutManager->registerAction(mSaveAsAct, "File Menu", "CTRL+SHIFT+S"); - mSaveAsAct->setStatusTip(tr("Save the document under a new name")); - connect(mSaveAsAct, SIGNAL(triggered()), this, SLOT(saveFileAs())); - mActionListWidget->addAction(mSaveAsAct); - - mSavePatchesAct = new QAction(QIcon(":images/saveas.png"), tr("Save &Patch OBJ..."), this); - mShortcutManager->registerAction(mSavePatchesAct, "File Menu", ""); - mSavePatchesAct->setStatusTip(tr("Save a bezier patch .obj file")); - connect(mSavePatchesAct, SIGNAL(triggered()), this, SLOT(saveFileBezierOBJ())); - mActionListWidget->addAction(mSavePatchesAct); - - mSaveLG3dAct = new QAction(QIcon(":images/saveas.png"), tr("Export LiveGrahpics3D..."), this); - mShortcutManager->registerAction(mSaveLG3dAct, "File Menu", "CTRL+ALT+S"); - mSaveLG3dAct->setStatusTip(tr( - "Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, "\ - "Warning: you cannot import this file back into TopMod")); - connect(mSaveLG3dAct, SIGNAL(triggered()), this, SLOT(saveFileLG3d())); - mActionListWidget->addAction(mSaveLG3dAct); - - mSaveLG3dSelectedAct = new QAction( - QIcon(":images/saveas.png"), tr("Export LG3d (Sel. Faces)..."), this); - mShortcutManager->registerAction(mSaveLG3dSelectedAct, "File Menu", ""); - mSaveLG3dSelectedAct->setStatusTip(tr( - "Export a LiveGraphics3D (*.m) of the current selected faces file for embedding into the TopMod Wiki, "\ - "Warning: you cannot import this file back into TopMod")); - connect(mSaveLG3dSelectedAct, SIGNAL(triggered()), this, SLOT(saveFileLG3dSelected())); - mActionListWidget->addAction(mSaveLG3dSelectedAct); - - mExportSTLAct = new QAction(QIcon(":images/saveas.png"), tr("Export STL..."), this); - mShortcutManager->registerAction(mExportSTLAct, "File Menu", "CTRL+ALT+SHIFT+S"); - mExportSTLAct->setStatusTip(tr( - "Export a stereolithography (*.stl) file for use "\ - "with various rapid prototyping software and hardware")); - connect(mExportSTLAct, SIGNAL(triggered()), this, SLOT(saveFileSTL())); - mActionListWidget->addAction(mExportSTLAct); - - mScreenshotViewportAct = new QAction( - QIcon(":images/camera-photo.png"), tr("Save Viewport Screenshot..."), this); - mShortcutManager->registerAction(mScreenshotViewportAct, "File Menu", "0"); - mScreenshotViewportAct->setStatusTip(tr("Save a screenshot of the contents of the OpenGL viewport (*.png)")); - connect(mScreenshotViewportAct, SIGNAL(triggered()), this, SLOT(viewportScreenshot())); - mActionListWidget->addAction(mScreenshotViewportAct); - - mScreenshotAppAct = new QAction(QIcon(":images/image-x-generic.png"), tr("Save App Screenshot..."), this); - mShortcutManager->registerAction(mScreenshotAppAct, "File Menu", "9"); - mScreenshotAppAct->setStatusTip(tr("Save a screenshot of the entire main application window (*.png)")); - connect(mScreenshotAppAct, SIGNAL(triggered()), this, SLOT(appScreenshot())); - mActionListWidget->addAction(mScreenshotAppAct); - - mLoadTextureAct = new QAction(tr("Load &Texture..."), this); - mShortcutManager->registerAction(mLoadTextureAct, "File Menu", "CTRL+L"); - mLoadTextureAct->setStatusTip(tr("Load Texture from file")); - connect(mLoadTextureAct, SIGNAL(triggered()), this, SLOT(load_texture())); - mActionListWidget->addAction(mLoadTextureAct); - - mPrintInfoAct = new QAction(tr("Print &Information"), this); - mShortcutManager->registerAction(mPrintInfoAct, "File Menu", "P"); - mPrintInfoAct->setStatusTip(tr("Print Information to the console")); - connect(mPrintInfoAct, SIGNAL(triggered()), this, SLOT(printSummary())); - mActionListWidget->addAction(mPrintInfoAct); - - mPrintFaceListAct = new QAction(tr("Print &Face List"), this); - mShortcutManager->registerAction(mPrintFaceListAct, "File Menu", "CTRL+ALT+P"); - mPrintFaceListAct->setStatusTip(tr("Print Face List to the console")); - // connect(printFaceListAct, SIGNAL(triggered()), this, SLOT(saveAs())); - mActionListWidget->addAction(mPrintFaceListAct); - - mPrintVertexListAct = new QAction(tr("Print &Vertex List"), this); - mShortcutManager->registerAction(mPrintVertexListAct, "File Menu", "CTRL+SHIFT+P"); - mPrintVertexListAct->setStatusTip(tr("Save the document under a new name")); - // connect(printVertexListAct, SIGNAL(triggered()), this, SLOT(saveAs())); - mActionListWidget->addAction(mPrintVertexListAct); - - mPrintEdgeListAct = new QAction(tr("Print &Edge List"), this); - mShortcutManager->registerAction(mPrintEdgeListAct, "File Menu", "CTRL+ALT+SHIFT+P"); - mPrintEdgeListAct->setStatusTip(tr("Print Edge list to the console")); - // connect(printEdgeListAct, SIGNAL(triggered()), this, SLOT(saveAs())); - mActionListWidget->addAction(mPrintEdgeListAct); - - mPrintCVListAct = new QAction(tr("Print &CV List"), this); - mShortcutManager->registerAction(mPrintCVListAct, "File Menu", ""); - mPrintCVListAct->setStatusTip(tr("Print CV list to the console")); - // connect(mPrintCVListAct, SIGNAL(triggered()), this, SLOT(saveAs())); - mActionListWidget->addAction(mPrintCVListAct); - - mExitAct = new QAction(tr("E&xit"), this); - mShortcutManager->registerAction(mExitAct, "File Menu", "CTRL+Q"); - mExitAct->setStatusTip(tr("Exit the application")); - connect(mExitAct, SIGNAL(triggered()), this, SLOT(close())); - // mActionListWidget->addAction(mExitAct); - - //quick command quicksilver like interface -#ifdef QCOMPLETER - mQuickCommandAct = new QAction(tr("Quick Command"), this); - QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_Space), this); - connect(shortcut, SIGNAL(activated()), this, SLOT(getCommand())); - mQuickCommandAct->setStatusTip(tr("Quick Command Access with Autocompletion")); - connect(mQuickCommandAct, SIGNAL(triggered()), this, SLOT(getCommand())); - // mActionListWidget->addAction(mQuickCommandAct); -#endif - //Edit Menu Actions - mDeleteSelectedAct = new QAction(/*QIcon(":images/edit-undo.png"),*/ tr("&Delete Selected"), this); - mShortcutManager->registerAction(mDeleteSelectedAct, "Edit Menu", "Del"); - mDeleteSelectedAct->setStatusTip(tr("Delete Selected")); - connect(mDeleteSelectedAct, SIGNAL(triggered()), this, SLOT(deleteSelected())); - mActionListWidget->addAction(mDeleteSelectedAct); - - mUndoAct = new QAction(QIcon(":images/edit-undo.png"), tr("&Undo"), this); - mShortcutManager->registerAction(mUndoAct, "Edit Menu", "CTRL+Z"); - mUndoAct->setStatusTip(tr("Undo the last operation")); - connect(mUndoAct, SIGNAL(triggered()), this, SLOT(undo())); - mActionListWidget->addAction(mUndoAct); - - mRedoAct = new QAction(QIcon(":images/edit-redo.png"), tr("&Redo"), this); - mShortcutManager->registerAction(mRedoAct, "Edit Menu", "CTRL+SHIFT+Z"); - mRedoAct->setStatusTip(tr("Redo the last operation")); - connect(mRedoAct, SIGNAL(triggered()), this, SLOT(redo())); - mActionListWidget->addAction(mRedoAct); - - mClearUndoListAct = new QAction(tr("&Clear Undo List"), this); - mShortcutManager->registerAction(mClearUndoListAct, "Edit Menu", "CTRL+SHIFT+Z"); - mClearUndoListAct->setStatusTip(tr("Clear the Undo List to free up some memory")); - connect(mClearUndoListAct, SIGNAL(triggered()), this, SLOT(clearUndoList())); - mActionListWidget->addAction(mClearUndoListAct); - - //View Menu Actions - mPerspViewAct = new QAction(tr("&Reset Camera"), this); - mShortcutManager->registerAction(mPerspViewAct, "View Menu", "F"); - mPerspViewAct->setStatusTip(tr("Reset Camera Position to default")); - connect(mPerspViewAct, SIGNAL(triggered()), this, SLOT(switchPerspView())); - mActionListWidget->addAction(mPerspViewAct); - - mZoomInAct = new QAction(tr("Zoom In"), this); - mShortcutManager->registerAction(mZoomInAct, "Display", "ALT+="); - mZoomInAct->setStatusTip(tr("Zoom in on the Model")); - connect(mZoomInAct, SIGNAL(triggered()), mActiveViewport, SLOT(zoomIn())); - // mActionListWidget->addAction(mZoomInAct); - - mZoomOutAct = new QAction(tr("Zoom Out"), this); - mShortcutManager->registerAction(mZoomOutAct, "Display", "ALT+-"); - mZoomOutAct->setStatusTip(tr("Zoom in on the Model")); - connect(mZoomOutAct, SIGNAL(triggered()), mActiveViewport, SLOT(zoomOut())); - - // mTopViewAct = new QAction( tr("&Top View"), this); - // sm->registerAction(mTopViewAct, "View Menu", ""); - // mTopViewAct->setStatusTip(tr("Switch to Top View")); - // connect(mTopViewAct, SIGNAL(triggered()), this, SLOT(switchTopView())); - // // mActionListWidget->addAction(mTopViewAct); - // - // mBottomViewAct = new QAction( tr("&Bottom View"), this); - // sm->registerAction(mBottomViewAct, "View Menu", ""); - // mBottomViewAct->setStatusTip(tr("Switch to Bottom View")); - // connect(mBottomViewAct, SIGNAL(triggered()), this, SLOT(switchBottomView())); - // // mActionListWidget->addAction(mBottomViewAct); - // - // mFrontViewAct = new QAction( tr("&Front View"), this); - // sm->registerAction(mFrontViewAct, "View Menu", ""); - // mFrontViewAct->setStatusTip(tr("Switch to Front View")); - // connect(mFrontViewAct, SIGNAL(triggered()), this, SLOT(switchFrontView())); - // // mActionListWidget->addAction(mFrontViewAct); - // - // mBackViewAct = new QAction( tr("B&ack View"), this); - // sm->registerAction(mBackViewAct, "View Menu", ""); - // mBackViewAct->setStatusTip(tr("Switch to Back View")); - // connect(mBackViewAct, SIGNAL(triggered()), this, SLOT(switchBackView())); - // // mActionListWidget->addAction(mBackViewAct); - // - // mLeftViewAct = new QAction( tr("&Left View"), this); - // sm->registerAction(mLeftViewAct, "View Menu", ""); - // mLeftViewAct->setStatusTip(tr("Switch to Left View")); - // connect(mLeftViewAct, SIGNAL(triggered()), this, SLOT(switchLeftView())); - // // mActionListWidget->addAction(mLeftViewAct); - // - // mRightViewAct = new QAction( tr("&Right View"), this); - // sm->registerAction(mRightViewAct, "View Menu", ""); - // mRightViewAct->setStatusTip(tr("Switch to Right View")); - // connect(mRightViewAct, SIGNAL(triggered()), this, SLOT(switchRightView())); - // // mActionListWidget->addAction(mRightViewAct); - - //Display Menu Actions - mFullscreenAct = new QAction(QIcon(":images/view-fullscreen.png"), tr("&Full Screen"), this); - mFullscreenAct->setCheckable(true); - mShortcutManager->registerAction(mFullscreenAct, "Display Menu", "ALT+F"); - mFullscreenAct->setStatusTip(tr("Toggle Full Screen")); - connect(mFullscreenAct, SIGNAL(triggered()), this, SLOT(toggleFullScreen())); - mActionListWidget->addAction(mFullscreenAct); - - mShowVerticesAct = new QAction(tr("Show &Vertices"), this); - mShowVerticesAct->setCheckable(true); - mShortcutManager->registerAction(mShowVerticesAct, "Display Menu", "V"); - connect(mShowVerticesAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleVertices())); - mActionListWidget->addAction(mShowVerticesAct); - - mShowFaceIDsAct = new QAction(tr("Show &Face IDs"), this); - mShowFaceIDsAct->setCheckable(true); - mShortcutManager->registerAction(mShowFaceIDsAct, "Display Menu", "CTRL+F"); - connect(mShowFaceIDsAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleFaceIDs())); - mActionListWidget->addAction(mShowFaceIDsAct); - - mShowEdgeIDsAct = new QAction(tr("Show &Edge IDs"), this); - mShowEdgeIDsAct->setCheckable(true); - mShortcutManager->registerAction(mShowEdgeIDsAct, "Display Menu", "CTRL+E"); - connect(mShowEdgeIDsAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleEdgeIDs())); - mActionListWidget->addAction(mShowEdgeIDsAct); - - mShowVertexIDsAct = new QAction(tr("Show &Vertex IDs"), this); - mShowVertexIDsAct->setCheckable(true); - mShortcutManager->registerAction(mShowVertexIDsAct, "Display Menu", "CTRL+V"); - connect(mShowVertexIDsAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleVertexIDs())); - mActionListWidget->addAction(mShowVertexIDsAct); - - mShowSelectedIDsAct = new QAction(tr("Show &Selected IDs"), this); - mShowSelectedIDsAct->setCheckable(true); - mShortcutManager->registerAction(mShowSelectedIDsAct, "Display Menu", "SHIFT+D"); - connect(mShowSelectedIDsAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleSelectedIDs())); - mActionListWidget->addAction(mShowSelectedIDsAct); - - mShowSilhouetteAct = new QAction(tr("Show &Silhouette"), this); - mShowSilhouetteAct->setCheckable(true); - mShortcutManager->registerAction(mShowSilhouetteAct, "Display Menu", "S"); - connect(mShowSilhouetteAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleSilhouette())); - mActionListWidget->addAction(mShowSilhouetteAct); - - mShowWireframeAct = new QAction(tr("Show &Wireframe"), this); - mShowWireframeAct->setCheckable(true); - mShowWireframeAct->setChecked(true); - mShortcutManager->registerAction(mShowWireframeAct, "Display Menu", "W"); - connect(mShowWireframeAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleWireframe())); - mActionListWidget->addAction(mShowWireframeAct); - - mShowCoordinateAxesAct = new QAction(tr("Show &Coordinate Axes"), this); - mShowCoordinateAxesAct->setCheckable(true); - mShortcutManager->registerAction(mShowCoordinateAxesAct, "Display Menu", "X"); - connect(mShowCoordinateAxesAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleAxes())); - mActionListWidget->addAction(mShowCoordinateAxesAct); - - mObjectOrientationAct = new QAction(tr("Reverse Object"), this); - mObjectOrientationAct->setCheckable(true); - mShortcutManager->registerAction(mObjectOrientationAct, "Display Menu", "R"); - connect(mObjectOrientationAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleObjectOrientation())); - mActionListWidget->addAction(mObjectOrientationAct); - - mShowNormalsAct = new QAction(tr("Show &Normals"), this); - mShowNormalsAct->setCheckable(true); - mShortcutManager->registerAction(mShowNormalsAct, "Display Menu", "N"); - connect(mShowNormalsAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleNormals())); - mActionListWidget->addAction(mShowNormalsAct); - - mShowFaceCentroidsAct = new QAction(tr("Show &Face Centroids"), this); - mShowFaceCentroidsAct->setCheckable(true); - mShortcutManager->registerAction(mShowFaceCentroidsAct, "Display Menu", "C"); - // objectOrienationAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mShowFaceCentroidsAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleFaceCentroids())); - mActionListWidget->addAction(mShowFaceCentroidsAct); - - mShowGridAct = new QAction(tr("Show &Grid"), this); - mShowGridAct->setCheckable(true); - mShowGridAct->setEnabled(false); - mShortcutManager->registerAction(mShowGridAct, "Display Menu", "G"); - // showGridAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mShowGridAct, SIGNAL(triggered()), getActive(), SLOT(toggleGrid())); - mActionListWidget->addAction(mShowGridAct); - - mShowHUDAct = new QAction(tr("Show &Heads Up Display"), this); - mShowHUDAct->setCheckable(true); - mShortcutManager->registerAction(mShowHUDAct, "Display Menu", "H"); - mShowHUDAct->setStatusTip(tr("Show the Heads Up Display")); - connect(mShowHUDAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleHUD())); - mActionListWidget->addAction(mShowHUDAct); - -#ifdef GPU_OK - mUseGPUAct = new QAction(tr("&Use GPU Shading"), this); - mUseGPUAct->setCheckable(true); - mUseGPUAct->setChecked(true); - mShortcutManager->registerAction(mUseGPUAct, "Display Menu", "L"); - mUseGPUAct->setStatusTip(tr("Use GPU Shading")); - connect(mUseGPUAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleGPU())); - mActionListWidget->addAction(mUseGPUAct); -#endif - - mAntialiasingAct = new QAction(tr("Toggle &Antialiasing"), this); - mAntialiasingAct->setCheckable(true); - mAntialiasingAct->setChecked(false); - mShortcutManager->registerAction(mAntialiasingAct, "Display Menu", "K"); - mAntialiasingAct->setStatusTip(tr("Toggle Antialiasing")); - connect(mAntialiasingAct, SIGNAL(triggered()), this->getActive(), SLOT(toggleAntialiasing())); - mActionListWidget->addAction(mAntialiasingAct); - -#ifdef WITH_PYTHON - mShowScriptEditorAct = mScriptEditorDockWidget->toggleViewAction();//new QAction(tr("Show Script &Editor"), this); - mShowScriptEditorAct->setStatusTip( tr("Show the script editor to execute DLFL commands") ); - mShortcutManager->registerAction(mShowScriptEditorAct, "Window Menu", "SHIFT+CTRL+E"); - mActionListWidget->addAction(mShowScriptEditorAct); -#endif - -#ifdef WITH_VERSE - mShowVerseDialogAct = mVerseDialogDockWidget->toggleViewAction();//new QAction(tr("Show Verse &Dialog"), this); - // mShowVerseDialogAct->setText(// true); - mShowVerseDialogAct->setStatusTip( tr("Show the verse dialog to view verse server connection status") ); - // connect(mShowVerseDialogAct, SIGNAL(triggered()), this, SLOT(showHideVerseDialog())); - mShortcutManager->registerAction(mShowVerseDialogAct, "Window Menu", "SHIFT+CTRL+V"); - mActionListWidget->addAction(mShowVerseDialogAct); -#endif - - mShowToolOptionsAct = mToolOptionsDockWidget->toggleViewAction(); - mShowToolOptionsAct->setStatusTip(tr("Show the tool options window")); - mShortcutManager->registerAction(mShowToolOptionsAct, "Window Menu", "O"); - mActionListWidget->addAction(mShowToolOptionsAct); - - mShowStartupDialogAct = mStartupDialogDockWidget->toggleViewAction(); - mShowStartupDialogAct->setStatusTip(tr("Show the startup screen with links to video tutorials")); - mShortcutManager->registerAction(mShowStartupDialogAct, "Window Menu", ""); - mActionListWidget->addAction(mShowStartupDialogAct); - - mShowAnimatedHelpAct = mAnimatedHelpDockWidget->toggleViewAction();// new QAction(tr("Show Animated Hel&p"), this); - // mShowAnimatedHelpAct->setCheckable(true); - mShowAnimatedHelpAct->setStatusTip(tr("Show/Hide the animated help window")); - // connect(mShowAnimatedHelpAct, SIGNAL(triggered()), this, SLOT(showHideAnimatedHelp())); - mShortcutManager->registerAction(mShowAnimatedHelpAct, "Window Menu", "SHIFT+H"); - mActionListWidget->addAction(mShowAnimatedHelpAct); - - //Renderer Menu Actions - mWireframeRendererAct = new QAction(tr("&Wireframe Renderer"), this); - mWireframeRendererAct->setCheckable(true); - mShortcutManager->registerAction(mWireframeRendererAct, "Renderer Menu", "1"); - mWireframeRendererAct->setStatusTip(tr("Switch the current renderer to Wireframe")); - connect(mWireframeRendererAct, SIGNAL(triggered()), this, SLOT(useWireframeRenderer())); - mActionListWidget->addAction(mWireframeRendererAct); - - mNormalRendererAct = new QAction(tr("&Normal Renderer"), this); - mNormalRendererAct->setCheckable(true); - mShortcutManager->registerAction(mNormalRendererAct, "Renderer Menu", "2"); - mNormalRendererAct->setStatusTip(tr("Switch the current renderer to Normal")); - connect(mNormalRendererAct, SIGNAL(triggered()), this, SLOT(useNormalRenderer())); - mActionListWidget->addAction(mNormalRendererAct); - - mLightedRendererAct = new QAction(tr("&Lighted Renderer"), this); - mLightedRendererAct->setCheckable(true); - mShortcutManager->registerAction(mLightedRendererAct, "Renderer Menu", "3"); - mLightedRendererAct->setStatusTip(tr("Switch the current renderer to Lighted")); - connect(mLightedRendererAct, SIGNAL(triggered()), this, SLOT(useLightedRenderer())); - mActionListWidget->addAction(mLightedRendererAct); - - mTexturedRendererAct = new QAction(tr("&Textured Renderer"), this); - mTexturedRendererAct->setCheckable(true); - mShortcutManager->registerAction(mTexturedRendererAct, "Renderer Menu", "4"); - mTexturedRendererAct->setStatusTip(tr("Switch the current renderer to Textured")); - connect(mTexturedRendererAct, SIGNAL(triggered()), this, SLOT(useTexturedRenderer())); - mActionListWidget->addAction(mTexturedRendererAct); - - mTexturedLightedAct = new QAction(tr("Te&xtured Lighted Renderer"), this); - mTexturedLightedAct->setCheckable(true); - mShortcutManager->registerAction(mTexturedLightedAct, "Renderer Menu", "5"); - mTexturedLightedAct->setStatusTip(tr("Switch the current renderer to Textured Lit")); - connect(mTexturedLightedAct, SIGNAL(triggered()), this, SLOT(useTexturedLitRenderer())); - mActionListWidget->addAction(mTexturedLightedAct); - - mPatchRendererAct = new QAction(tr("&Patch Renderer"), this); - mPatchRendererAct->setCheckable(true); - mShortcutManager->registerAction(mPatchRendererAct, "Renderer Menu", "6"); - mPatchRendererAct->setStatusTip(tr("Switch the current renderer to Patch")); - connect(mPatchRendererAct, SIGNAL(triggered()), this, SLOT(usePatchRenderer())); - mActionListWidget->addAction(mPatchRendererAct); - - mColorableRendererAct = new QAction(tr("&Colorable Renderer"), this); - mColorableRendererAct->setCheckable(true); - mShortcutManager->registerAction(mColorableRendererAct, "Renderer Menu", "7"); - mColorableRendererAct->setStatusTip(tr("Switch the current renderer to Colorable")); - connect(mColorableRendererAct, SIGNAL(triggered()), this, SLOT(useColorableRenderer())); - mActionListWidget->addAction(mColorableRendererAct); - - mRendererActionGroup = new QActionGroup(this); - mRendererActionGroup->setExclusive(true); - mRendererActionGroup->addAction(mWireframeRendererAct); - mRendererActionGroup->addAction(mNormalRendererAct); - mRendererActionGroup->addAction(mLightedRendererAct); - mRendererActionGroup->addAction(mTexturedRendererAct); - mRendererActionGroup->addAction(mTexturedLightedAct); - mRendererActionGroup->addAction(mPatchRendererAct); - mRendererActionGroup->addAction(mColorableRendererAct); - mLightedRendererAct->setChecked(true); - - //PRIMITIVES MENU ACTIONS - mPrimCubeAct = new QAction(QIcon(":/images/prim_cube.png"), tr("&Cube"), this); - mShortcutManager->registerAction(mPrimCubeAct, "Primitives Menu", "CTRL+1"); - mPrimCubeAct->setStatusTip(tr("Load a Cube")); - connect(mPrimCubeAct, SIGNAL(triggered()), this, SLOT(loadCube())); - mActionListWidget->addAction(mPrimCubeAct); - - mPrimOctahedronAct = new QAction(QIcon(":/images/prim_octahedron.png"), tr("&Octahedron"), this); - mShortcutManager->registerAction(mPrimOctahedronAct, "Primitives Menu", "CTRL+2"); - mPrimOctahedronAct->setStatusTip(tr("Load an octahedron")); - connect(mPrimOctahedronAct, SIGNAL(triggered()), this, SLOT(loadOctahedron())); - mActionListWidget->addAction(mPrimOctahedronAct); - - mPrimTetrahedronAct = new QAction(QIcon(":/images/prim_tetrahedron.png"), tr("&Tetrahedron"), this); - mShortcutManager->registerAction(mPrimTetrahedronAct, "Primitives Menu", "CTRL+3"); - mPrimTetrahedronAct->setStatusTip(tr("Load a tetrahedron")); - connect(mPrimTetrahedronAct, SIGNAL(triggered()), this, SLOT(loadTetrahedron())); - mActionListWidget->addAction(mPrimTetrahedronAct); - - mPrimDodecahedronAct = new QAction(QIcon(":/images/prim_dodecahedron.png"), tr("&Dodecahedron"), this); - mShortcutManager->registerAction(mPrimDodecahedronAct, "Primitives Menu", "CTRL+4"); - mPrimDodecahedronAct->setStatusTip(tr("Load a dodecahedron")); - connect(mPrimDodecahedronAct, SIGNAL(triggered()), this, SLOT(loadDodecahedron())); - mActionListWidget->addAction(mPrimDodecahedronAct); - - mPrimIcosahedronAct = new QAction(QIcon(":/images/prim_icosahedron.png"), tr("&Icosahedron"), this); - mShortcutManager->registerAction(mPrimIcosahedronAct, "Primitives Menu", "CTRL+5"); - mPrimIcosahedronAct->setStatusTip(tr("Load an icosahedron")); - connect(mPrimIcosahedronAct, SIGNAL(triggered()), this, SLOT(loadIcosahedron())); - mActionListWidget->addAction(mPrimIcosahedronAct); - - mPrimSoccerBallAct = new QAction(QIcon(":/images/prim_soccerball.png"), tr("&Soccer ball"), this); - mShortcutManager->registerAction(mPrimSoccerBallAct, "Primitives Menu", "CTRL+6"); - mPrimSoccerBallAct->setStatusTip(tr("Load a soccer ball")); - connect(mPrimSoccerBallAct, SIGNAL(triggered()), this, SLOT(loadSoccerball())); - mActionListWidget->addAction(mPrimSoccerBallAct); - - mPrimGeodesicAct = new QAction(QIcon(":/images/prim_geodesic.png"), tr("&Geodesic Dome"), this); - mShortcutManager->registerAction(mPrimGeodesicAct, "Primitives Menu", "CTRL+7"); - mPrimGeodesicAct->setStatusTip(tr("Load a geodesic dome")); - connect(mPrimGeodesicAct, SIGNAL(triggered()), this, SLOT(loadGeodesic())); - mActionListWidget->addAction(mPrimGeodesicAct); - - //Object Menu Actions - mSubdivideAllEdgesAct = new QAction(tr("Subdivide All &Edges"), this); - mShortcutManager->registerAction(mSubdivideAllEdgesAct, "Tools", "CTRL+D"); - // subdivideAllEdgesAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mSubdivideAllEdgesAct, SIGNAL(triggered()), this, SLOT(subdivideAllEdges())); - mActionListWidget->addAction(mSubdivideAllEdgesAct); - - mPlanarizeAllFacesAct = new QAction(tr("Planarize All &Faces"), this); - mShortcutManager->registerAction(mPlanarizeAllFacesAct, "Tools", "CTRL+P"); - // planarizeAllFacesAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mPlanarizeAllFacesAct, SIGNAL(triggered()), this, SLOT(planarizeFaces())); - mActionListWidget->addAction(mPlanarizeAllFacesAct); - - makeObjectSphericalAct = new QAction(tr("Make &Object Spherical"), this); - mShortcutManager->registerAction(makeObjectSphericalAct, "Tools", "CTRL+H"); - // makeObjectSphericalAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(makeObjectSphericalAct, SIGNAL(triggered()), this, SLOT(spheralizeObject())); - mActionListWidget->addAction(makeObjectSphericalAct); - - mCleanup2gonsAct = new QAction(tr("Cleanup 2-gons"), this); - mShortcutManager->registerAction(mCleanup2gonsAct, "Tools", ""); - // mCleanup2gonsAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mCleanup2gonsAct, SIGNAL(triggered()), this, SLOT(cleanup2gons())); - mActionListWidget->addAction(mCleanup2gonsAct); - - mCleanupWingedVerticesAct = new QAction(tr("Remove valence-2 vertices"), this); - mShortcutManager->registerAction(mCleanupWingedVerticesAct, "Tools", "SHIFT+CTRL+V"); - connect(mCleanupWingedVerticesAct, SIGNAL(triggered()), this, SLOT(cleanupWingedVertices())); - mActionListWidget->addAction(mCleanupWingedVerticesAct); - - mSplitValence2VerticesAct = new QAction(tr("Split valence-2 vertices"), this); - mShortcutManager->registerAction(mSplitValence2VerticesAct, "Tools", ""); - connect(mSplitValence2VerticesAct, SIGNAL(triggered()), this, SLOT(splitValence2Vertices())); - mActionListWidget->addAction(mSplitValence2VerticesAct); - - mMakeObjectSmoothAct = new QAction(tr("Make Object &Smooth"), this); - mShortcutManager->registerAction(mMakeObjectSmoothAct, "Tools", "CTRL+M"); - // makeObjectSmoothAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mMakeObjectSmoothAct, SIGNAL(triggered()), this, SLOT(smoothMesh())); - mActionListWidget->addAction(mMakeObjectSmoothAct); - - mPerformCuttingAct = new QAction(tr("Perform Cutting"), this); - mShortcutManager->registerAction(mPerformCuttingAct, "Tools", "CTRL+T"); - mPerformCuttingAct->setStatusTip(tr("Cut selected faces, edges, or vertices based on the current selection mask")); - connect(mPerformCuttingAct, SIGNAL(triggered()), this, SLOT(performCutting())); - mActionListWidget->addAction(mPerformCuttingAct); - - mCreateCrustScalingAct = new QAction(tr("&Create Crust (Scaling)"), this); - mShortcutManager->registerAction(mCreateCrustScalingAct, "Tools", "CTRL+ALT+C"); - mCreateCrustScalingAct->setStatusTip(tr("Create a crust using the currently selected faces with scaling mode")); - connect(mCreateCrustScalingAct, SIGNAL(triggered()), this, SLOT(crustModeling4())); - mActionListWidget->addAction(mCreateCrustScalingAct); - - mCreateCrustThicknessAct = new QAction(tr("Create Crust (&Thickness)"), this); - mShortcutManager->registerAction(mCreateCrustThicknessAct, "Tools", "CTRL+C"); - mCreateCrustThicknessAct->setStatusTip(tr("Create a crust using the currently selected faces with thickness mode")); - connect(mCreateCrustThicknessAct, SIGNAL(triggered()), this, SLOT(crustModeling3())); - mActionListWidget->addAction(mCreateCrustThicknessAct); - - mMakeWireframeAct = new QAction(tr("Create Wireframe"), this); - mShortcutManager->registerAction(mMakeWireframeAct, "Tools", "CTRL+W"); - mMakeWireframeAct->setStatusTip(tr("Create a wireframe model using the current options")); - connect(mMakeWireframeAct, SIGNAL(triggered()), this, SLOT(makeWireframe())); - mActionListWidget->addAction(mMakeWireframeAct); - - mMakeColumnsAct = new QAction(tr("Create Columns"), this); - mShortcutManager->registerAction(mMakeColumnsAct, "Tools", "CTRL+ALT+W"); - mMakeColumnsAct->setStatusTip(tr("Create a column model using the current options")); - connect(mMakeColumnsAct, SIGNAL(triggered()), this, SLOT(makeWireframeWithColumns())); - mActionListWidget->addAction(mMakeColumnsAct); - - mMakeSierpinskiAct = new QAction(tr("Create Sierpinski"), this); - mShortcutManager->registerAction(mMakeSierpinskiAct, "Tools", "CTRL+K"); - mMakeSierpinskiAct->setStatusTip(tr("Create a sierpinski tetrahedra")); - connect(mMakeSierpinskiAct, SIGNAL(triggered()), this, SLOT(multiConnectMidpoints())); - mActionListWidget->addAction(mMakeSierpinskiAct); - - mComputeLightingAct = new QAction(tr("Compute &Lighting"), this); - mShortcutManager->registerAction(mComputeLightingAct, "Tools", ""); - // computeLightingAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mComputeLightingAct, SIGNAL(triggered()), getActive(), SLOT(recomputeLighting())); - mActionListWidget->addAction(mComputeLightingAct); - - mComputeNormalsAndLightingAct = new QAction(tr("Compute &Normals and Lighting"), this); - mShortcutManager->registerAction(mComputeNormalsAndLightingAct, "Tools", ""); - // computeNormalsAndLightingAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mComputeNormalsAndLightingAct, SIGNAL(triggered()), getActive(), SLOT(recomputeNormals())); - mActionListWidget->addAction(mComputeNormalsAndLightingAct); - - mAssignTextureCoordinatesAct = new QAction(tr("Assign &Texture Coordinates"), this); - mShortcutManager->registerAction(mAssignTextureCoordinatesAct, "Tools", ""); - // assignTextureCoordinatesAct->setStatusTip(tr("Copy the current selection's contents to the " - connect(mAssignTextureCoordinatesAct, SIGNAL(triggered()), this, SLOT(assignTileTexCoords())); - mActionListWidget->addAction(mAssignTextureCoordinatesAct); - - // //SELECTION MENU ACTIONS - mSelectionWindowAct = new QAction(tr("Selection Window"), this); - mShortcutManager->registerAction(mSelectionWindowAct, "Selection", "SHIFT+W"); - connect(mSelectionWindowAct, SIGNAL(triggered()), this, SLOT(selection_window())); - mActionListWidget->addAction(mSelectionWindowAct); - - mSelectVertexAct = new QAction(tr("Select &Vertex"), this); - mShortcutManager->registerAction(mSelectVertexAct, "Selection", ""); - mSelectVertexAct->setStatusTip(tr("Select a Vertex")); - connect(mSelectVertexAct, SIGNAL(triggered()), this, SLOT(select_vertex())); - mActionListWidget->addAction(mSelectVertexAct); - - mSelectMultipleVerticesAct = new QAction(tr("Select Multiple Vertices"), this); - mShortcutManager->registerAction(mSelectMultipleVerticesAct, "Selection", ""); - mSelectMultipleVerticesAct->setStatusTip(tr("Select multiple vertices")); - connect(mSelectMultipleVerticesAct, SIGNAL(triggered()), this, SLOT(select_multiple_vertices())); - mActionListWidget->addAction(mSelectMultipleVerticesAct); - - mSelectMultipleAct = new QAction(tr("Select Multiple"), this); - mShortcutManager->registerAction(mSelectMultipleAct, "Selection", "SHIFT+M"); - mSelectMultipleAct->setStatusTip(tr("Select multiple")); - connect(mSelectMultipleAct, SIGNAL(triggered()), this, SLOT(select_multiple())); - mActionListWidget->addAction(mSelectMultipleAct); - - mEditVertexAct = new QAction(tr("Edit Verte&x"), this); - mShortcutManager->registerAction(mEditVertexAct, "Selection", ""); - mEditVertexAct->setStatusTip(tr("Select and Move Vertices one at a time.")); - connect(mEditVertexAct, SIGNAL(triggered()), this, SLOT(edit_vertex())); - mActionListWidget->addAction(mEditVertexAct); - - mSelectFaceAct = new QAction(tr("Select &Face"), this); - mShortcutManager->registerAction(mSelectFaceAct, "Selection", ""); - mSelectFaceAct->setStatusTip(tr("Select One Face. Just for practice. :)")); - connect(mSelectFaceAct, SIGNAL(triggered()), this, SLOT(select_face())); - mActionListWidget->addAction(mSelectFaceAct); - - mSelectFaceLoopAct = new QAction(tr("Select Face Loo&p"), this); - mShortcutManager->registerAction(mSelectFaceLoopAct, "Selection", "SHIFT+P"); - mSelectFaceLoopAct->setStatusTip(tr("Select a Face Loop.")); - connect(mSelectFaceLoopAct, SIGNAL(triggered()), this, SLOT(select_face_loop())); - mActionListWidget->addAction(mSelectFaceLoopAct); - - mSelectMultipleFacesAct = new QAction(tr("Select &Multiple Faces"), this); - mShortcutManager->registerAction(mSelectMultipleFacesAct, "Selection", ""); - connect(mSelectMultipleFacesAct, SIGNAL(triggered()), this, SLOT(select_multiple_faces())); - mActionListWidget->addAction(mSelectMultipleFacesAct); - - mSelectSimilarFacesAct = new QAction(tr("Select &Similar Faces"), this); - mShortcutManager->registerAction(mSelectSimilarFacesAct, "Selection", "SHIFT+G"); - connect(mSelectSimilarFacesAct, SIGNAL(triggered()), this, SLOT(select_similar_faces())); - mActionListWidget->addAction(mSelectSimilarFacesAct); - - mSelectSimilarAct = new QAction(tr("Select Similar"), this); - mShortcutManager->registerAction(mSelectSimilarAct, "Selection", "SHIFT+S"); - connect(mSelectSimilarAct, SIGNAL(triggered()), this, SLOT(select_similar())); - mActionListWidget->addAction(mSelectSimilarAct); - - mSelectFacesByAreaAct = new QAction(tr("Select Faces By Surf. Area"), this); - mShortcutManager->registerAction(mSelectFacesByAreaAct, "Selection", "CTRL+SHIFT+A"); - connect(mSelectFacesByAreaAct, SIGNAL(triggered()), this, SLOT(select_faces_by_area())); - mActionListWidget->addAction(mSelectFacesByAreaAct); - - mSelectFacesByColorAct = new QAction(tr("Select Faces By Color"), this); - mShortcutManager->registerAction(mSelectFacesByColorAct, "Selection", "CTRL+SHIFT+C"); - connect(mSelectFacesByColorAct, SIGNAL(triggered()), this, SLOT(select_faces_by_color())); - mActionListWidget->addAction(mSelectFacesByColorAct); - - mSelectCheckerboardFacesAct = new QAction(tr("C&heckerboard Select Faces"), this); - mShortcutManager->registerAction(mSelectCheckerboardFacesAct, "Selection", "SHIFT+K"); - connect(mSelectCheckerboardFacesAct, SIGNAL(triggered()), this, SLOT(select_checkerboard_faces())); - mActionListWidget->addAction(mSelectCheckerboardFacesAct); - - mSelectAllAct = new QAction(tr("Select &All"), this); - mShortcutManager->registerAction(mSelectAllAct, "Selection", "CTRL+A"); - connect(mSelectAllAct, SIGNAL(triggered()), this, SLOT(selectAll())); - mActionListWidget->addAction(mSelectAllAct); - - mGrowSelectionAct = new QAction(tr("Grow Selection"), this); - mShortcutManager->registerAction(mGrowSelectionAct, "Selection", "="); - connect(mGrowSelectionAct, SIGNAL(triggered()), this, SLOT(growSelection())); - mActionListWidget->addAction(mGrowSelectionAct); - - mShrinkSelectionAct = new QAction(tr("Shrink Selection"), this); - mShortcutManager->registerAction(mShrinkSelectionAct, "Selection", "-"); - connect(mShrinkSelectionAct, SIGNAL(triggered()), this, SLOT(shrinkSelection())); - mActionListWidget->addAction(mShrinkSelectionAct); - - mSelectInverseAct = new QAction(tr("Select &Inverse"), this); - mShortcutManager->registerAction(mSelectInverseAct, "Selection", "CTRL+I"); - connect(mSelectInverseAct, SIGNAL(triggered()), this, SLOT(selectInverse())); - mActionListWidget->addAction(mSelectInverseAct); - - mSelectEdgeAct = new QAction(tr("Select &Edge"), this); - mShortcutManager->registerAction(mSelectEdgeAct, "Selection", ""); - mSelectEdgeAct->setStatusTip(tr("Select one Edge")); - connect(mSelectEdgeAct, SIGNAL(triggered()), this, SLOT(select_edge())); - mActionListWidget->addAction(mSelectEdgeAct); - - mSelectMultipleEdgesAct = new QAction(tr("Select Multiple Edges"), this); - mShortcutManager->registerAction(mSelectMultipleEdgesAct, "Selection", ""); - mSelectMultipleEdgesAct->setStatusTip(tr("Select multiple edges")); - connect(mSelectMultipleEdgesAct, SIGNAL(triggered()), this, SLOT(select_multiple_edges())); - mActionListWidget->addAction(mSelectMultipleEdgesAct); - - mCollapseSelectedEdgesAct = new QAction(tr("Collapse Selected Edges"), this); - mShortcutManager->registerAction(mCollapseSelectedEdgesAct, "Edit Menu", "ALT+C"); - mCollapseSelectedEdgesAct->setStatusTip(tr("Collapse Selected Edges")); - connect(mCollapseSelectedEdgesAct, SIGNAL(triggered()), this, SLOT(collapseSelectedEdges())); - mActionListWidget->addAction(mCollapseSelectedEdgesAct); - - mSelectEdgeLoopAct = new QAction(tr("Select Edge &Loop"), this); - mShortcutManager->registerAction(mSelectEdgeLoopAct, "Selection", "SHIFT+L"); - mSelectEdgeLoopAct->setStatusTip(tr("Select an Edge Loop")); - connect(mSelectEdgeLoopAct, SIGNAL(triggered()), this, SLOT(select_edge_loop())); - mActionListWidget->addAction(mSelectEdgeLoopAct); - - mSelectEdgeRingAct = new QAction(tr("Select Edge &Ring"), this); - mShortcutManager->registerAction(mSelectEdgeRingAct, "Selection", "SHIFT+R"); - mSelectEdgeRingAct->setStatusTip(tr("Select an edge ring.")); - connect(mSelectEdgeRingAct, SIGNAL(triggered()), this, SLOT(select_edge_ring())); - mActionListWidget->addAction(mSelectEdgeRingAct); - - mSelectCornerAct = new QAction(tr("Select &Corner"), this); - mShortcutManager->registerAction(mSelectCornerAct, "Selection", "SHIFT+C"); - mSelectCornerAct->setStatusTip(tr("Select a Corner")); - connect(mSelectCornerAct, SIGNAL(triggered()), this, SLOT(select_corner())); - mActionListWidget->addAction(mSelectCornerAct); - - mExitSelectionModeAct = new QAction(tr("E&xit Selection Mode"), this); - mShortcutManager->registerAction(mExitSelectionModeAct, "Selection", "SHIFT+X"); - connect(mExitSelectionModeAct, SIGNAL(triggered()), this, SLOT(exit_selection_mode())); - mActionListWidget->addAction(mExitSelectionModeAct); - - mClearSelectedModeAct = new QAction(tr("&Clear Selected"), this); - mShortcutManager->registerAction(mClearSelectedModeAct, "Selection", "Escape"); - connect(mClearSelectedModeAct, SIGNAL(triggered()), this, SLOT(clear_selected())); - mActionListWidget->addAction(mClearSelectedModeAct); - - mSelectEdgesFromFacesAct = new QAction(tr("Select Edges from Faces"), this); - mShortcutManager->registerAction(mSelectEdgesFromFacesAct, "Selection", ""); - connect(mSelectEdgesFromFacesAct, SIGNAL(triggered()), this, SLOT(selectEdgesFromFaces())); - mActionListWidget->addAction(mSelectEdgesFromFacesAct); - - mSelectEdgesFromVerticesAct = new QAction(tr("Select Edges from Vertices"), this); - mShortcutManager->registerAction(mSelectEdgesFromVerticesAct, "Selection", ""); - connect(mSelectEdgesFromVerticesAct, SIGNAL(triggered()), this, SLOT(selectEdgesFromVertices())); - mActionListWidget->addAction(mSelectEdgesFromVerticesAct); - - mSelectFacesFromEdgesAct = new QAction(tr("Select Faces from Edges"), this); - mShortcutManager->registerAction(mSelectFacesFromEdgesAct, "Selection", ""); - connect(mSelectFacesFromEdgesAct, SIGNAL(triggered()), this, SLOT(selectFacesFromEdges())); - mActionListWidget->addAction(mSelectFacesFromEdgesAct); - - mSelectFacesFromVerticesAct = new QAction(tr("Select Faces from Vertices"), this); - mShortcutManager->registerAction(mSelectFacesFromVerticesAct, "Selection", ""); - connect(mSelectFacesFromVerticesAct, SIGNAL(triggered()), this, SLOT(selectFacesFromVertices())); - mActionListWidget->addAction(mSelectFacesFromVerticesAct); - - mSelectVerticesFromEdgesAct = new QAction(tr("Select Vertices from Edges"), this); - mShortcutManager->registerAction(mSelectVerticesFromEdgesAct, "Selection", ""); - connect(mSelectVerticesFromEdgesAct, SIGNAL(triggered()), this, SLOT(selectVerticesFromEdges())); - mActionListWidget->addAction(mSelectVerticesFromEdgesAct); - - mSelectVerticesFromFacesAct = new QAction(tr("Select Vertices from Faces"), this); - mShortcutManager->registerAction(mSelectVerticesFromFacesAct, "Selection", ""); - connect(mSelectVerticesFromFacesAct, SIGNAL(triggered()), this, SLOT(selectVerticesFromFaces())); - mActionListWidget->addAction(mSelectVerticesFromFacesAct); - - //selection masks - mSelectVerticesMaskAct = new QAction(QIcon(":images/selection-mask-vertices.png"), tr("Select &Vertices"), this); - mSelectVerticesMaskAct->setCheckable(true); - mShortcutManager->registerAction(mSelectVerticesMaskAct, "Selection", "SHIFT+V"); - mSelectVerticesMaskAct->setStatusTip(tr("Select by Component type: Vertices")); - connect(mSelectVerticesMaskAct, SIGNAL(triggered()), this, SLOT(selectionMaskVertices())); - mActionListWidget->addAction(mSelectVerticesMaskAct); - - mSelectEdgesMaskAct = new QAction(QIcon(":images/selection-mask-edges.png"), tr("Select &Edges"), this); - mSelectEdgesMaskAct->setCheckable(true); - mShortcutManager->registerAction(mSelectEdgesMaskAct, "Selection", "SHIFT+E"); - mSelectEdgesMaskAct->setStatusTip(tr("Select by Component type: Edges")); - connect(mSelectEdgesMaskAct, SIGNAL(triggered()), this, SLOT(selectionMaskEdges())); - mActionListWidget->addAction(mSelectEdgesMaskAct); - - mSelectFacesMaskAct = new QAction(QIcon(":images/selection-mask-faces.png"), tr("Select &Faces"), this); - mSelectFacesMaskAct->setCheckable(true); - mShortcutManager->registerAction(mSelectFacesMaskAct, "Selection", "SHIFT+F"); - mSelectFacesMaskAct->setStatusTip(tr("Select by Component type: Faces")); - connect(mSelectFacesMaskAct, SIGNAL(triggered()), this, SLOT(selectionMaskFaces())); - mActionListWidget->addAction(mSelectFacesMaskAct); - - mSelectCornersMaskAct = new QAction(QIcon(":images/selection-mask-corners.png"), tr("Select &Corner"), this); - mSelectCornersMaskAct->setCheckable(true); - mShortcutManager->registerAction(mSelectCornersMaskAct, "Selection", ""); - mSelectCornersMaskAct->setStatusTip(tr("Select by Component type: Corners")); - connect(mSelectCornersMaskAct, SIGNAL(triggered()), this, SLOT(selectionMaskCorners())); - mActionListWidget->addAction(mSelectCornersMaskAct); - - mSelectionMaskActionGroup = new QActionGroup(this); - mSelectionMaskActionGroup->setExclusive(true); - mSelectionMaskActionGroup->addAction(mSelectVerticesMaskAct); - mSelectionMaskActionGroup->addAction(mSelectFacesMaskAct); - mSelectionMaskActionGroup->addAction(mSelectEdgesMaskAct); - mSelectionMaskActionGroup->addAction(mSelectCornersMaskAct); - // mSelectCornersMaskAct->setChecked(true); - - //SETTINGS ACTIONS - mPreferencesAct = new QAction(QIcon(":images/preferences-system.png"), tr("&Preferences"), this); - mShortcutManager->registerAction(mPreferencesAct, "Settings", "CTRL+,"); - mPreferencesAct->setStatusTip(tr("Open the Preferences Dialog")); - connect(mPreferencesAct, SIGNAL(triggered()), this, SLOT(openPreferences())); - mActionListWidget->addAction(mPreferencesAct); - - //LANGUAGE MENU BAR ACTIONS - mEnglishAct = new QAction(tr("English"), this); - mEnglishAct->setCheckable(true); - connect(mEnglishAct, SIGNAL(triggered()), this, SLOT(setLanguageEnglish())); - mShortcutManager->registerAction(mEnglishAct, "Languages", "CTRL+ALT+1"); - mActionListWidget->addAction(mEnglishAct); - - mSpanishAct = new QAction(tr("Spanish"), this); - mSpanishAct->setCheckable(true); - connect(mSpanishAct, SIGNAL(triggered()), this, SLOT(setLanguageSpanish())); - mShortcutManager->registerAction(mSpanishAct, "Languages", "CTRL+ALT+2"); - mActionListWidget->addAction(mSpanishAct); - - mGermanAct = new QAction(tr("German"), this); - mGermanAct->setCheckable(true); - connect(mGermanAct, SIGNAL(triggered()), this, SLOT(setLanguageGerman())); - mShortcutManager->registerAction(mGermanAct, "Languages", "CTRL+ALT+3"); - mActionListWidget->addAction(mGermanAct); - - mFrenchAct = new QAction(tr("French"), this); - mFrenchAct->setCheckable(true); - connect(mFrenchAct, SIGNAL(triggered()), this, SLOT(setLanguageFrench())); - mShortcutManager->registerAction(mFrenchAct, "Languages", "CTRL+ALT+4"); - mActionListWidget->addAction(mFrenchAct); - - mItalianAct = new QAction(tr("Italian"), this); - mItalianAct->setCheckable(true); - connect(mItalianAct, SIGNAL(triggered()), this, SLOT(setLanguageItalian())); - mShortcutManager->registerAction(mItalianAct, "Languages", "CTRL+ALT+5"); - mActionListWidget->addAction(mItalianAct); - - mTurkishAct = new QAction(tr("Turkish"), this); - mTurkishAct->setCheckable(true); - connect(mTurkishAct, SIGNAL(triggered()), this, SLOT(setLanguageTurkish())); - mShortcutManager->registerAction(mTurkishAct, "Languages", "CTRL+ALT+6"); - mActionListWidget->addAction(mTurkishAct); - - mCatalanAct = new QAction(tr("Catalan"), this); - mCatalanAct->setCheckable(true); - connect(mCatalanAct, SIGNAL(triggered()), this, SLOT(setLanguageCatalan())); - mShortcutManager->registerAction(mCatalanAct, "Languages", "CTRL+ALT+7"); - mActionListWidget->addAction(mCatalanAct); - - mHindiAct = new QAction(tr("Hindi"), this); - mHindiAct->setCheckable(true); - connect(mHindiAct, SIGNAL(triggered()), this, SLOT(setLanguageHindi())); - mShortcutManager->registerAction(mHindiAct, "Languages", "CTRL+ALT+8"); - mActionListWidget->addAction(mHindiAct); - - mLanguageActionGroup = new QActionGroup(this); - mLanguageActionGroup->setExclusive(true); - mLanguageActionGroup->addAction(mEnglishAct); - mLanguageActionGroup->addAction(mSpanishAct); - mLanguageActionGroup->addAction(mGermanAct); - mLanguageActionGroup->addAction(mFrenchAct); - mLanguageActionGroup->addAction(mItalianAct); - mLanguageActionGroup->addAction(mTurkishAct); - mLanguageActionGroup->addAction(mCatalanAct); - mLanguageActionGroup->addAction(mHindiAct); - mEnglishAct->setChecked(true); - -#ifdef WITH_VERSE - //verse menu actions - mVerseConnectLocalhostAct = new QAction(tr("Connect to localhost..."), this); - mVerseConnectLocalhostAct->setStatusTip( tr("Connect to localhost") ); - connect(mVerseConnectLocalhostAct, SIGNAL(triggered()), mVerseDialog, SLOT(connectLocalhost())); - mShortcutManager->registerAction(mVerseConnectLocalhostAct, "Verse Menu", ""); - mActionListWidget->addAction(mVerseConnectLocalhostAct); - - mVerseConnectAct = new QAction(tr("Connect to host..."), this); - mVerseConnectAct->setStatusTip( tr("Connect to host...") ); - connect(mVerseConnectAct, SIGNAL(triggered()), mVerseDialog, SLOT(connectHost())); - mShortcutManager->registerAction(mVerseConnectAct, "Verse Menu", ""); - mActionListWidget->addAction(mVerseConnectAct); - - mVerseDisconnectAct = new QAction(tr("Disconnect session"), this); - mVerseDisconnectAct->setStatusTip( tr("Disconnect Verse Session") ); - connect(mVerseDisconnectAct, SIGNAL(triggered()), mVerseDialog, SLOT(disconnectHost())); - mShortcutManager->registerAction(mVerseDisconnectAct, "Verse Menu", ""); - mActionListWidget->addAction(mVerseDisconnectAct); - - mVerseDisconnectAllAct = new QAction(tr("Disconnect All Sessions"), this); - mVerseDisconnectAllAct->setStatusTip( tr("Disconnect All Sessions") ); - connect(mVerseDisconnectAllAct, SIGNAL(triggered()), mVerseDialog, SLOT(disconnectAll())); - mShortcutManager->registerAction(mVerseDisconnectAllAct, "Verse Menu", ""); - mActionListWidget->addAction(mVerseDisconnectAllAct); - - mVerseStartServerAct = new QAction(tr("Start Verse Server"), this); - mVerseStartServerAct->setStatusTip( tr("Disconnect All Nodes") ); - connect(mVerseStartServerAct, SIGNAL(triggered()), mVerseDialog, SLOT(startServer())); - mShortcutManager->registerAction(mVerseStartServerAct, "Verse Menu", ""); - mActionListWidget->addAction(mVerseStartServerAct); - - mVerseKillServerAct = new QAction(tr("Kill Verse Server"), this); - mVerseKillServerAct->setStatusTip( tr("Kill the Local Verse server process") ); - connect(mVerseKillServerAct, SIGNAL(triggered()), mVerseDialog, SLOT(killServer())); - mShortcutManager->registerAction(mVerseKillServerAct, "Verse Menu", ""); - mActionListWidget->addAction(mVerseKillServerAct); -#endif - - mPaintSelectedFacesAct = new QAction(tr("Paint Selected Faces"), this); - mPaintSelectedFacesAct->setStatusTip(tr("Paint all Selected Faces")); - connect(mPaintSelectedFacesAct, SIGNAL(triggered()), this, SLOT(paintSelectedFaces())); - mShortcutManager->registerAction(mPaintSelectedFacesAct, "Tools Menu", "CTRL+SHIFT+B"); - mActionListWidget->addAction(mPaintSelectedFacesAct); - - mClearMaterialsAct = new QAction(tr("Clear Materials"), this); - mClearMaterialsAct->setStatusTip(tr("Clear Materials")); - connect(mClearMaterialsAct, SIGNAL(triggered()), this, SLOT(clearMaterials())); - mShortcutManager->registerAction(mClearMaterialsAct, "Tools Menu", "CTRL+SHIFT+X"); - mActionListWidget->addAction(mClearMaterialsAct); - - mSubdivideSelectedFacesAct = new QAction(tr("Subdivide Selected Faces"), this); - mSubdivideSelectedFacesAct->setStatusTip(tr("Subdivide all Selected Faces")); - connect(mSubdivideSelectedFacesAct, SIGNAL(triggered()), this, SLOT(subdivideSelectedFaces())); - mShortcutManager->registerAction(mSubdivideSelectedFacesAct, "Tools Menu", "CTRL+B"); - mActionListWidget->addAction(mSubdivideSelectedFacesAct); - - mSubdivideSelectedEdgesAct = new QAction(tr("Subdivide Selected Edges"), this); - mSubdivideSelectedEdgesAct->setStatusTip(tr("Subdivide all Selected Edges")); - connect(mSubdivideSelectedEdgesAct, SIGNAL(triggered()), this, SLOT(subdivideSelectedEdges())); - mShortcutManager->registerAction(mSubdivideSelectedEdgesAct, "Tools Menu", "CTRL+SHIFT+E"); - mActionListWidget->addAction(mSubdivideSelectedEdgesAct); - - mPerformRemeshingAct = new QAction(tr("Perform Remeshing"), this); - mPerformRemeshingAct->setStatusTip(tr("Perform the current remeshing scheme")); - connect(mPerformRemeshingAct, SIGNAL(triggered()), this, SLOT(performRemeshing())); - mShortcutManager->registerAction(mPerformRemeshingAct, "Remeshing Menu", "CTRL+R"); - mActionListWidget->addAction(mPerformRemeshingAct); - - mPerformExtrusionAct = new QAction(tr("Perform Extrusion"), this); - mPerformExtrusionAct->setStatusTip(tr("Perform the current extrusion operator on the selected faces")); - connect(mPerformExtrusionAct, SIGNAL(triggered()), this, SLOT(performExtrusion())); - mShortcutManager->registerAction(mPerformExtrusionAct, "Tools Menu", "CTRL+X"); - mActionListWidget->addAction(mPerformExtrusionAct); - - mExtrudeMultipleAct = new QAction(tr("Extrude Multiple Faces"), this); - mExtrudeMultipleAct->setCheckable(true); - mExtrudeMultipleAct->setChecked(false); - mExtrudeMultipleAct->setStatusTip(tr("Check this if you want to be able to select multiple faces and then hit CTRL+X to extrude the selected faces")); - // connect(mExtrudeMultipleAct, SIGNAL(triggered()), this, SLOT(performExtrusion())); - mShortcutManager->registerAction(mExtrudeMultipleAct, "Tools Menu", "M"); - mActionListWidget->addAction(mExtrudeMultipleAct); - - //help menu actions - mHelpAct = new QAction(QIcon(":images/applications-internet.png"), tr("&Online User Manual"), this); - mHelpAct->setStatusTip(tr("View the User Manual on the TopMod Wiki")); - connect(mHelpAct, SIGNAL(triggered()), this, SLOT(help())); - mShortcutManager->registerAction(mHelpAct, "Help Menu", "F1"); - mActionListWidget->addAction(mHelpAct); - - mVideoTutorialsAct = new QAction(QIcon(":images/applications-internet.png"), tr("&TopMod Video Tutorials on blip.tv"), this); - mVideoTutorialsAct->setStatusTip(tr("Go to http://topmod.blip.tv")); - connect(mVideoTutorialsAct, SIGNAL(triggered()), this, SLOT(topModBlip())); - mShortcutManager->registerAction(mVideoTutorialsAct, "Help Menu", ""); - mActionListWidget->addAction(mVideoTutorialsAct); - - mTopModWebAct = new QAction(QIcon(":images/applications-internet.png"), tr("&TopMod on the Web"), this); - mTopModWebAct->setStatusTip(tr("Go to the TopMod web page")); - connect(mTopModWebAct, SIGNAL(triggered()), this, SLOT(topModWeb())); - mShortcutManager->registerAction(mTopModWebAct, "Help Menu", ""); - mActionListWidget->addAction(mTopModWebAct); - - mTopModResearchAct = new QAction(QIcon(":images/applications-internet.png"), tr("&TopMod Research Papers"), this); - mTopModResearchAct->setStatusTip(tr("Go to the TopMod Research web page")); - connect(mTopModResearchAct, SIGNAL(triggered()), this, SLOT(topModResearch())); - mShortcutManager->registerAction(mTopModResearchAct, "Help Menu", ""); - mActionListWidget->addAction(mTopModResearchAct); - - mCheckForUpdatesAct = new QAction(QIcon(":images/applications-internet.png"), tr("&Check for Updates"), this); - mCheckForUpdatesAct->setStatusTip(tr("Check for updates to TopMod Online")); - connect(mCheckForUpdatesAct, SIGNAL(triggered()), this, SLOT(checkForUpdates())); - mShortcutManager->registerAction(mCheckForUpdatesAct, "Help Menu", ""); - mActionListWidget->addAction(mCheckForUpdatesAct); - - mAboutAct = new QAction(tr("&About TopMod"), this); - mAboutAct->setStatusTip(tr("About TopMod")); - connect(mAboutAct, SIGNAL(triggered()), this, SLOT(about())); - mShortcutManager->registerAction(mAboutAct, "Help Menu", ""); - mActionListWidget->addAction(mAboutAct); - - mAboutQtAct = new QAction(tr("About &Qt"), this); - mAboutQtAct->setStatusTip(tr("About Qt")); - connect(mAboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); - mShortcutManager->registerAction(mAboutQtAct, "Help Menu", ""); - mActionListWidget->addAction(mAboutQtAct); - - mHideToolBarsAct = new QAction(tr("Hide All ToolBars"), this); - mHideToolBarsAct->setStatusTip(tr("Hide All ToolBars")); - connect(mHideToolBarsAct, SIGNAL(triggered()), this, SLOT(hideAllToolBars())); - mShortcutManager->registerAction(mHideToolBarsAct, "Window Menu", "T"); - mActionListWidget->addAction(mHideToolBarsAct); - - mShowToolBarsAct = new QAction(tr("Show All ToolBars"), this); - mShowToolBarsAct->setStatusTip(tr("Show All ToolBars")); - connect(mShowToolBarsAct, SIGNAL(triggered()), this, SLOT(showAllToolBars())); - mShortcutManager->registerAction(mShowToolBarsAct, "Window Menu", "SHIFT+T"); - mActionListWidget->addAction(mShowToolBarsAct); -} - -void MainWindow::createMenus(){ -#ifdef __APPLE__ - mMenuBar = new QMenuBar(0); - setMenuBar(mMenuBar); - // setUnifiedTitleAndToolBarOnMac(true); -#else - mMenuBar = new QMenuBar(this); - setMenuBar(mMenuBar); -#endif - - mFileMenu = new QMenu(tr("&File")); - mMenuBar->addMenu(mFileMenu); - mFileMenu->setTearOffEnabled(true); - - mNewMenu = new QMenu(tr("&New")); - mNewMenu->setTearOffEnabled(true); - mFileMenu->addMenu(mNewMenu); - mNewMenu->addAction(mNewFileAct); - mNewMenu->addAction(mPrimCubeAct); - mNewMenu->addAction(mPrimOctahedronAct); - mNewMenu->addAction(mPrimTetrahedronAct); - mNewMenu->addAction(mPrimDodecahedronAct); - mNewMenu->addAction(mPrimIcosahedronAct); - mNewMenu->addAction(mPrimSoccerBallAct); - mNewMenu->addAction(mPrimGeodesicAct); - - mExportMenu = new QMenu(tr("&Export")); - mExportMenu->setIcon(QIcon(":images/document-save-as.png")); - // mFileMenu->addAction(mNewFileAct); - mFileMenu->addAction(mOpenAct); - mFileMenu->addAction(mSaveAct); - mFileMenu->addAction(mSaveAsAct); - mFileMenu->addMenu(mExportMenu); - mExportMenu->addAction(mSavePatchesAct); - mExportMenu->addAction(mSaveLG3dAct); - mExportMenu->addAction(mSaveLG3dSelectedAct); - mExportMenu->addAction(mExportSTLAct); - mFileMenu->addAction(mScreenshotViewportAct); - mFileMenu->addAction(mScreenshotAppAct); -#ifdef WITH_VERSE - mFileMenu->addSeparator(); - mVerseMenu = new QMenu(tr("&Verse")); - mFileMenu->addMenu(mVerseMenu); - mVerseMenu->addAction(mVerseStartServerAct); - // mVerseMenu->addAction(mVerseKillServerAct); - mVerseMenu->addSeparator(); - mVerseMenu->addAction(mVerseConnectLocalhostAct); - mVerseMenu->addAction(mVerseConnectAct); - // mVerseMenu->removeAction(mVerseConnectAct); - mVerseMenu->addSeparator(); - // mVerseMenu->addAction(mVerseDisconnectAct); - // mVerseMenu->addAction(mVerseDisconnectAllAct); -#endif - mFileMenu->addSeparator(); - mFileMenu->addAction(mLoadTextureAct); - // mFileMenu->addAction(printInfoAct); - // mFileMenu->addAction(printFaceListAct); - // mFileMenu->addAction(printVertexListAct); - // mFileMenu->addAction(printEdgeListAct); - // mFileMenu->addAction(mPrintCVListAct); - mFileMenu->addSeparator(); - mFileMenu->addAction(mExitAct); - - mEditMenu = new QMenu(tr("&Edit")); - mMenuBar->addMenu(mEditMenu); - mEditMenu->addAction(mDeleteSelectedAct); - mEditMenu->addSeparator(); - mEditMenu->addAction(mUndoAct); - mEditMenu->addAction(mRedoAct); - mEditMenu->setTearOffEnabled(true); - mEditMenu->addSeparator(); - mEditMenu->addAction(mClearUndoListAct); - mEditMenu->addSeparator(); - mEditMenu->addAction(mPreferencesAct); - - // mViewMenu = new QMenu(tr("&View")); - // mViewMenu->setTearOffEnabled(true); - // menuBar->addMenu(mViewMenu); - // mViewMenu->addAction(mPerspViewAct); - // mViewMenu->addAction(mTopViewAct); - // mViewMenu->addAction(mBottomViewAct); - // mViewMenu->addAction(mLeftViewAct); - // mViewMenu->addAction(mRightViewAct); - // mViewMenu->addAction(mFrontViewAct); - // mViewMenu->addAction(mBackViewAct); - - mDisplayMenu = new QMenu(tr("&Display")); - mDisplayMenu->setTearOffEnabled(true); - mMenuBar->addMenu(mDisplayMenu); - //this is now a submenu of Display to make everything on the menu bar more compact - mRendererMenu = new QMenu(tr("&Renderer")); - mRendererMenu->setTearOffEnabled(true); - // menuBar->addMenu(rendererMenu); - mDisplayMenu->addMenu(mRendererMenu); - mRendererMenu->addAction(mWireframeRendererAct); - mRendererMenu->addAction(mNormalRendererAct); - mRendererMenu->addAction(mLightedRendererAct); - mRendererMenu->addAction(mTexturedRendererAct); - // texturedRendererAct->setEnabled(false); - mRendererMenu->addAction(mTexturedLightedAct); - // texturedLightedAct->setEnabled(false); - mRendererMenu->addSeparator()->setText(tr("Special Mode??")); - mRendererMenu->addAction(mPatchRendererAct); - mRendererMenu->addAction(mColorableRendererAct); - - mDisplayMenu->addAction(mPerspViewAct); - mDisplayMenu->addAction(mShowVerticesAct); - //ID display submenu - mShowIDsMenu = new QMenu(tr("&Show IDs")); - mDisplayMenu->addMenu(mShowIDsMenu); - mShowIDsMenu->setTearOffEnabled(true); - mShowIDsMenu->addAction(mShowFaceIDsAct); - mShowIDsMenu->addAction(mShowEdgeIDsAct); - mShowIDsMenu->addAction(mShowVertexIDsAct); - mShowIDsMenu->addAction(mShowSelectedIDsAct); - //more view options - mDisplayMenu->addAction(mShowSilhouetteAct); - mDisplayMenu->addAction(mShowWireframeAct); - mDisplayMenu->addAction(mShowCoordinateAxesAct); - // mDisplayMenu->addAction(showGridAct); //removed for now - mDisplayMenu->addAction(mShowHUDAct); - #ifdef GPU_OK - mDisplayMenu->addAction(mUseGPUAct); - #endif - mDisplayMenu->addAction(mAntialiasingAct); - mDisplayMenu->addAction(mObjectOrientationAct); - mDisplayMenu->addAction(mShowNormalsAct); - mDisplayMenu->addAction(mShowFaceCentroidsAct); - mDisplayMenu->addAction(mFullscreenAct); - mDisplayMenu->addAction(mZoomInAct); - mDisplayMenu->addAction(mZoomOutAct); - - mPrimitivesMenu = new QMenu(tr("&Primitives")); - mPrimitivesMenu->setTearOffEnabled(true); - mMenuBar->addMenu(mPrimitivesMenu); - mPrimitivesMenu->addAction(mPrimCubeAct); - mPrimitivesMenu->addAction(mPrimOctahedronAct); - mPrimitivesMenu->addAction(mPrimTetrahedronAct); - mPrimitivesMenu->addAction(mPrimDodecahedronAct); - mPrimitivesMenu->addAction(mPrimIcosahedronAct); - mPrimitivesMenu->addAction(mPrimSoccerBallAct); - mPrimitivesMenu->addAction(mPrimGeodesicAct); - - mSelectionMenu = new QMenu(tr("&Selection")); - mMenuBar->addMenu(mSelectionMenu); - mSelectionMenu->addAction(mSelectAllAct); - mSelectionMenu->addAction(mSelectInverseAct); - mSelectionMenu->addAction(mSelectMultipleAct); - mSelectionMenu->addAction(mSelectSimilarAct); - mSelectionMenu->addAction(mSelectionWindowAct); - mSelectionMenu->addAction(mGrowSelectionAct); - mSelectionMenu->addAction(mShrinkSelectionAct); - // mSelectionMenu->addAction(exitSelectionModeAct); - mSelectionMenu->addAction(mClearSelectedModeAct); - mSelectionMenu->addSeparator(); - // mSelectionMenu->addAction(selectEdgeAct); - // mSelectionMenu->addAction(selectMultipleEdgesAct); - mSelectionMenu->addAction(mSelectEdgeLoopAct); - mSelectionMenu->addAction(mSelectEdgeRingAct); - // mSelectionMenu->addAction(mCollapseSelectedEdgesAct); - // mSelectionMenu->addAction(mSubdivideSelectedEdgesAct); - mSelectionMenu->addAction(mSelectEdgesFromFacesAct); - mSelectionMenu->addAction(mSelectEdgesFromVerticesAct); - mSelectionMenu->addSeparator(); - // mSelectionMenu->addAction(selectFaceAct); - mSelectionMenu->addAction(mSelectFaceLoopAct); - // mSelectionMenu->addAction(selectMultipleFacesAct); - // mSelectionMenu->addAction(selectSimilarFacesAct); - mSelectionMenu->addAction(mSelectFacesByAreaAct); - mSelectionMenu->addAction(mSelectFacesByColorAct); - mSelectionMenu->addAction(mSelectCheckerboardFacesAct); - mSelectionMenu->addAction(mSelectFacesFromEdgesAct); - mSelectionMenu->addAction(mSelectFacesFromVerticesAct); - mSelectionMenu->addSeparator(); - // mSelectionMenu->addAction(selectVertexAct); - // mSelectionMenu->addAction(selectMultipleVerticesAct); - mSelectionMenu->addAction(mEditVertexAct); - mSelectionMenu->addAction(mSelectVerticesFromFacesAct); - mSelectionMenu->addAction(mSelectVerticesFromEdgesAct); - // mSelectionMenu->addAction(selectCornerAct); - // mSelectionMenu->addSeparator(); - - mToolsMenu = new QMenu(tr("&Tools")); - mToolsMenu->setTearOffEnabled(true); - mToolsMenu->addMenu(mBasicsMode->getMenu()); - mToolsMenu->addMenu(mExtrusionsMode->getMenu()); - mToolsMenu->addMenu(mConicalMode->getMenu()); - mToolsMenu->addMenu(mHighgenusMode->getMenu()); - mToolsMenu->addMenu(mTexturingMode->getMenu()); - mToolsMenu->addMenu(mExperimentalMode->getMenu()); - #ifdef QCOMPLETER - mToolsMenu->addAction(mQuickCommandAct); - #endif - // mToolsMenu->addAction(mExtrudeMultipleAct); - mToolsMenu->addAction(mPerformExtrusionAct); - mToolsMenu->addAction(mSubdivideSelectedFacesAct); - mToolsMenu->addAction(mSubdivideSelectedEdgesAct); - mToolsMenu->addAction(mPaintSelectedFacesAct); - mMenuBar->addMenu(mToolsMenu); - - mRemeshingMenu = mRemeshingMode->getMenu(); - mRemeshingMenu->addAction(mPerformRemeshingAct); - mRemeshingMenu->setTearOffEnabled(true); - mMenuBar->addMenu(mRemeshingMenu); - - mObjectMenu = new QMenu(tr("&Object")); - mObjectMenu->setTearOffEnabled(true); - mToolsMenu->addMenu(mObjectMenu); - mObjectMenu->addAction(mMakeWireframeAct); - mObjectMenu->addAction(mMakeColumnsAct); - mObjectMenu->addAction(mMakeSierpinskiAct); - mObjectMenu->addAction(mCreateCrustThicknessAct); - mObjectMenu->addAction(mCreateCrustScalingAct); - mObjectMenu->addAction(mPerformCuttingAct); - mObjectMenu->addAction(mSubdivideAllEdgesAct); - mObjectMenu->addAction(mPlanarizeAllFacesAct); - mObjectMenu->addAction(makeObjectSphericalAct); - mObjectMenu->addAction(mMakeObjectSmoothAct); - mObjectMenu->addSeparator(); - mObjectMenu->addAction(mCleanupWingedVerticesAct); - mObjectMenu->addAction(mCleanup2gonsAct); - mObjectMenu->addAction(mSplitValence2VerticesAct); - mObjectMenu->addSeparator(); - mToolsMenu->addAction(mClearMaterialsAct); - mObjectMenu->addAction(mComputeLightingAct); - mObjectMenu->addAction(mComputeNormalsAndLightingAct); - mObjectMenu->addAction(mAssignTextureCoordinatesAct); - - //selection Masks (vertices / edges / faces / face-vertices) - mSelectionMaskMenu = new QMenu(tr("Selection &Masks")); - mSelectionMenu->addMenu(mSelectionMaskMenu); - mSelectionMaskMenu->addAction(mSelectVerticesMaskAct); - mSelectionMaskMenu->addAction(mSelectFacesMaskAct); - mSelectionMaskMenu->addAction(mSelectEdgesMaskAct); - mSelectionMaskMenu->addAction(mSelectCornersMaskAct); - - mWindowMenu = new QMenu(tr("&Window")); - mMenuBar->addMenu(mWindowMenu); - mWindowMenu->addAction(mShowStartupDialogAct); - mWindowMenu->addAction(mShowToolOptionsAct); - #ifdef WITH_PYTHON - mWindowMenu->addAction(mShowScriptEditorAct); - #endif - mWindowMenu->addAction(mShowAnimatedHelpAct); - #ifdef WITH_VERSE - mWindowMenu->addAction(mShowVerseDialogAct); - #endif - // mWindowMenu->addAction(mShowToolBarsAct); - // mWindowMenu->addAction(mHideToolBarsAct); - mWindowMenu->addSeparator(); - mWindowMenu->addAction(mEditToolBarAct); - mWindowMenu->addAction(mSelectionMaskToolBarAct); - mWindowMenu->addAction(mPrimitivesToolBarAct); - mWindowMenu->addAction(mToolsToolBarAct); - mWindowMenu->addAction(mExtrusionToolBarAct); - mWindowMenu->addAction(mConicalToolBarAct); - mWindowMenu->addAction(mHighgenusToolBarAct); - mWindowMenu->addAction(mTexturingToolBarAct); - mWindowMenu->addAction(mExperimentalToolBarAct); - mWindowMenu->addAction(mRemeshingToolBarAct); - - mHelpMenu = new QMenu(tr("&Help")); - mMenuBar->addMenu(mHelpMenu); - mHelpMenu->addAction(mHelpAct); - mHelpMenu->addAction(mCheckForUpdatesAct); - mHelpMenu->addAction(mTopModWebAct); - mHelpMenu->addAction(mVideoTutorialsAct); - mHelpMenu->addAction(mTopModResearchAct); - mHelpMenu->addSeparator(); - mLanguageMenu = new QMenu(tr("&Language")); - // mLanguageMenu->setTearOffEnabled(true); - mHelpMenu->addMenu(mLanguageMenu); - mLanguageMenu->addAction(mEnglishAct); - mLanguageMenu->addAction(mSpanishAct); - mLanguageMenu->addAction(mGermanAct); - mLanguageMenu->addAction(mFrenchAct); - mLanguageMenu->addAction(mItalianAct); - mLanguageMenu->addAction(mTurkishAct); - mLanguageMenu->addAction(mCatalanAct); - mLanguageMenu->addAction(mHindiAct); - mHelpMenu->addSeparator(); - mHelpMenu->addAction(mAboutAct); - mHelpMenu->addAction(mAboutQtAct); - - mRightClickMenu = new QMenu(); - -} - -void MainWindow::createToolBars() { - - mEditToolBar = new QToolBar(tr("Edit"),this); - //mEditToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mEditToolBar); - //mEditToolBar->setFloatable(true); - mEditToolBar->addAction(mNewFileAct); - mEditToolBar->addAction(mOpenAct); - mEditToolBar->addAction(mSaveAsAct); - mEditToolBar->addAction(mUndoAct); - mEditToolBar->addAction(mRedoAct); - mEditToolBar->addAction(mScreenshotViewportAct); - mEditToolBar->addAction(mScreenshotAppAct); - mEditToolBar->setIconSize(QSize(32,32)); - - //selection masks toolbar - mSelectionMaskToolBar = new QToolBar(tr("Selection Masks")); - // mSelectionMaskToolBar->hide(); - //mSelectionMaskToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mSelectionMaskToolBar); - mSelectionMaskToolBar->addAction(mSelectVerticesMaskAct); - mSelectionMaskToolBar->addAction(mSelectFacesMaskAct); - mSelectionMaskToolBar->addAction(mSelectEdgesMaskAct); - mSelectionMaskToolBar->addAction(mSelectCornersMaskAct); - // mSelectionMaskToolBar->setOrientation(Qt::Vertical); - - mPrimitivesToolBar = new QToolBar(tr("Primitives"),this); - //mPrimitivesToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mPrimitivesToolBar); - mPrimitivesToolBar->setIconSize(QSize(32,32)); - mPrimitivesToolBar->addAction(mPrimCubeAct); - mPrimitivesToolBar->addAction(mPrimOctahedronAct); - mPrimitivesToolBar->addAction(mPrimTetrahedronAct); - mPrimitivesToolBar->addAction(mPrimDodecahedronAct); - mPrimitivesToolBar->addAction(mPrimIcosahedronAct); - mPrimitivesToolBar->addAction(mPrimSoccerBallAct); - mPrimitivesToolBar->addAction(mPrimGeodesicAct); - - //basic tools - six buttons - mToolsToolBar = new QToolBar(tr("Tools"),this); - //mToolsToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mToolsToolBar); - mToolsToolBar->setIconSize(QSize(32,32)); - - addToolBarBreak(); - - mExtrusionToolBar = new QToolBar(tr("Extrusion Tools"),this); - //mExtrusionToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mExtrusionToolBar); - mExtrusionToolBar->setIconSize(QSize(32,32)); - - mConicalToolBar = new QToolBar(tr("Conical Tools"),this); - addToolBar(Qt::TopToolBarArea,mConicalToolBar); - mConicalToolBar->setIconSize(QSize(32,32)); - - mHighgenusToolBar = new QToolBar(tr("High Genus Tools"),this); - //mHighgenusToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mHighgenusToolBar); - mHighgenusToolBar->setIconSize(QSize(32,32)); - - mExperimentalToolBar = new QToolBar(tr("Experimental Tools"),this); - //mHighgenusToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mExperimentalToolBar); - mExperimentalToolBar->setIconSize(QSize(32,32)); - - mTexturingToolBar = new QToolBar(tr("Texturing Tools"),this); - //mTexturingToolBar->setFloatable(true); - addToolBar(Qt::TopToolBarArea,mTexturingToolBar); - mTexturingToolBar->setIconSize(QSize(32,32)); - - mRemeshingToolBar = new QToolBar(tr("Remeshing Tools"),this); - mRemeshingToolBar->setAllowedAreas(Qt::RightToolBarArea); - mRemeshingToolBar->setOrientation(Qt::Vertical); - mRemeshingToolBar->setToolButtonStyle(Qt::ToolButtonTextOnly); - //mRemeshingToolBar->setFloatable(false); - // mRemeshingToolBar->setFloating(true); - addToolBar(Qt::RightToolBarArea,mRemeshingToolBar); - // mRemeshingToolBar->setIconSize(QSize(16,16)); - mRemeshingToolBar->hide(); - - //tools ction group initialization - mToolsActionGroup = new QActionGroup(this); - mToolsActionGroup->setExclusive(true); - - mBasicsMode->addActions(mToolsActionGroup, mToolsToolBar, mToolOptionsStackedWidget); - mExtrusionsMode->addActions(mToolsActionGroup, mExtrusionToolBar, mToolOptionsStackedWidget); - mConicalMode->addActions(mToolsActionGroup, mConicalToolBar, mToolOptionsStackedWidget); - - mRemeshingActionGroup = new QActionGroup(this); - mRemeshingMode->addActions(mToolsActionGroup, mRemeshingToolBar, mToolOptionsStackedWidget); - - mHighgenusMode->addActions(mToolsActionGroup, mHighgenusToolBar, mToolOptionsStackedWidget); - mTexturingMode->addActions(mToolsActionGroup, mTexturingToolBar, mToolOptionsStackedWidget); - mExperimentalMode->addActions(mToolsActionGroup, mExperimentalToolBar, mToolOptionsStackedWidget); - - //window menu toolbar display actions - mEditToolBarAct = mEditToolBar->toggleViewAction(); - mSelectionMaskToolBarAct = mSelectionMaskToolBar->toggleViewAction(); - mPrimitivesToolBarAct = mPrimitivesToolBar->toggleViewAction(); - mToolsToolBarAct = mToolsToolBar->toggleViewAction(); - mExtrusionToolBarAct = mExtrusionToolBar->toggleViewAction(); - mConicalToolBarAct = mConicalToolBar->toggleViewAction(); - mHighgenusToolBarAct = mHighgenusToolBar->toggleViewAction(); - mTexturingToolBarAct = mTexturingToolBar->toggleViewAction(); - mExperimentalToolBarAct = mExperimentalToolBar->toggleViewAction(); - mRemeshingToolBarAct = mRemeshingToolBar->toggleViewAction(); - -} - -void MainWindow::createStartupDialog(){ - - //startup screen - links to video tutorials and free quicktime download - - // mStartupDialogDockWidget->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable /* | QDockWidget::DockWidgetClosable*/); - mStartupDialogDockWidget->setAllowedAreas(Qt::NoDockWidgetArea); - mStartupDialogDockWidget->hide(); - - mStartupDialogWidget = new QWidget; - mStartupDialogLayout = new QGridLayout; - - //actions for the startup screen - mTutorialNavigationAct = new QAction(QIcon(":/images/tutorial_01.png"),tr("Navigation Basics"), this); - connect(mTutorialNavigationAct, SIGNAL(triggered()), this, SLOT(loadNavigationTutorial())); - mTutorialNavigationButton = new QToolButton; - mTutorialNavigationButton->setFixedWidth(200); - mTutorialNavigationButton->setIconSize(QSize(48,48)); - mTutorialNavigationButton->setDefaultAction(mTutorialNavigationAct); - mTutorialNavigationButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialNavigationButton,1,0); - - mTutorialInterfaceAct = new QAction(QIcon(":/images/tutorial_02.png"),tr("Interface Basics"), this); - connect(mTutorialInterfaceAct, SIGNAL(triggered()), this, SLOT(loadInterfaceTutorial())); - mTutorialInterfaceButton = new QToolButton; - mTutorialInterfaceButton->setFixedWidth(200); - mTutorialInterfaceButton->setIconSize(QSize(48,48)); - mTutorialInterfaceButton->setDefaultAction(mTutorialInterfaceAct); - mTutorialInterfaceButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialInterfaceButton,2,0); - - mTutorialBasicAct = new QAction(QIcon(":/images/tutorial_03.png"),tr("Basic Operations"), this); - connect(mTutorialBasicAct, SIGNAL(triggered()), this, SLOT(loadBasicTutorial())); - mTutorialBasicButton = new QToolButton; - mTutorialBasicButton->setFixedWidth(200); - mTutorialBasicButton->setIconSize(QSize(48,48)); - mTutorialBasicButton->setDefaultAction(mTutorialBasicAct); - mTutorialBasicButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialBasicButton,3,0); - - mTutorialExtrusionAct = new QAction(QIcon(":/images/tutorial_04.png"),tr("Extrusion Operations"), this); - connect(mTutorialExtrusionAct, SIGNAL(triggered()), this, SLOT(loadExtrusionTutorial())); - mTutorialExtrusionButton = new QToolButton; - mTutorialExtrusionButton->setFixedWidth(200); - mTutorialExtrusionButton->setIconSize(QSize(48,48)); - mTutorialExtrusionButton->setDefaultAction(mTutorialExtrusionAct); - mTutorialExtrusionButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialExtrusionButton,4,0); - - mTutorialRemeshingAct = new QAction(QIcon(":/images/tutorial_05.png"),tr("Remeshing Operations"), this); - connect(mTutorialRemeshingAct, SIGNAL(triggered()), this, SLOT(loadRemeshingTutorial())); - mTutorialRemeshingButton = new QToolButton; - mTutorialRemeshingButton->setFixedWidth(200); - mTutorialRemeshingButton->setIconSize(QSize(48,48)); - mTutorialRemeshingButton->setDefaultAction(mTutorialRemeshingAct); - mTutorialRemeshingButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialRemeshingButton,1,1); - - mTutorialHighgenusAct = new QAction(QIcon(":/images/tutorial_06.png"),tr("High genus Operations"), this); - connect(mTutorialHighgenusAct, SIGNAL(triggered()), this, SLOT(loadHighgenusTutorial())); - mTutorialHighgenusButton = new QToolButton; - mTutorialHighgenusButton->setFixedWidth(200); - mTutorialHighgenusButton->setIconSize(QSize(48,48)); - mTutorialHighgenusButton->setDefaultAction(mTutorialHighgenusAct); - mTutorialHighgenusButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialHighgenusButton,2,1); - - mTutorialTexturingAct = new QAction(QIcon(":/images/tutorial_07.png"),tr("Texturing Operations"), this); - connect(mTutorialTexturingAct, SIGNAL(triggered()), this, SLOT(loadTexturingTutorial())); - mTutorialTexturingButton = new QToolButton; - mTutorialTexturingButton->setFixedWidth(200); - mTutorialTexturingButton->setIconSize(QSize(48,48)); - mTutorialTexturingButton->setDefaultAction(mTutorialTexturingAct); - mTutorialTexturingButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mStartupDialogLayout->addWidget(mTutorialTexturingButton,3,1); - - //show on startup? checkbox - mShowStartupDialogAtStartupCheckBox = new QCheckBox(tr("Show this dialog at startup")); - mShowStartupDialogAtStartupCheckBox->setChecked(mShowStartupDialogAtStartup); - connect(mShowStartupDialogAtStartupCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setShowStartupDialogAtStartup(int))); - mStartupDialogLayout->addWidget(mShowStartupDialogAtStartupCheckBox,5,0); - - //download quicktime link label - mQuickTimeLabel = new QLabel(tr("Quicktime 7.2 or greater recommended.")); - mDownloadQuickTimeLabel = new QLabel(tr( - "
Quicktime 7.2 or greater recommended.
"\ - "Download now.
")); - mDownloadQuickTimeLabel->setOpenExternalLinks(true); - mStartupDialogLayout->addWidget(mDownloadQuickTimeLabel,5,1, Qt::AlignRight); - - mStartupDialogLayout->setColumnStretch(2,1); - mStartupDialogLayout->setRowStretch(6,1); - mStartupDialogWidget->setLayout(mStartupDialogLayout); - mStartupDialogDockWidget->setWidget(mStartupDialogWidget); - mStartupDialogDockWidget->setFloating(true); - mStartupDialogDockWidget->move( - this->width() / 2 + this->x() - mStartupDialogDockWidget->width() / 2, - this->y() + height() / 2 - mStartupDialogDockWidget->height() / 2); - if (!mShowStartupDialogAtStartup) - mStartupDialogDockWidget->hide(); -} - -void MainWindow::setShowStartupDialogAtStartup(int b){ - mShowStartupDialogAtStartup = (bool)b; -} - -bool MainWindow::getShowStartupDialogAtStartup(){ - return mShowStartupDialogAtStartup; -} - -void MainWindow::loadNavigationTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_navigation.mov")); -} - -void MainWindow::loadInterfaceTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_interface.mov")); -} - -void MainWindow::loadBasicTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_basic.mov")); -} - -void MainWindow::loadExtrusionTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_extrusion.mov")); -} - -void MainWindow::loadRemeshingTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_remeshing.mov")); -} - -void MainWindow::loadHighgenusTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_highgenus.mov")); -} - -void MainWindow::loadTexturingTutorial(){ - QDesktopServices::openUrl(QUrl::fromLocalFile("video/tutorial_texturing.mov")); -} - -void MainWindow::showAllToolBars(){ - mEditToolBar->show(); - mSelectionMaskToolBar->show(); - mPrimitivesToolBar->show(); - mToolsToolBar->show(); - mExtrusionToolBar->show(); - mConicalToolBar->show(); - mHighgenusToolBar->show(); - mTexturingToolBar->show(); - mExperimentalToolBar->show(); - mRemeshingToolBar->show(); - -} - -void MainWindow::hideAllToolBars(){ - mEditToolBar->hide(); - mSelectionMaskToolBar->hide(); - mPrimitivesToolBar->hide(); - mToolsToolBar->hide(); - mExtrusionToolBar->hide(); - mConicalToolBar->hide(); - mHighgenusToolBar->hide(); - mTexturingToolBar->hide(); - mExperimentalToolBar->hide(); - mRemeshingToolBar->hide(); - -} - -void MainWindow::setToolOptions(QWidget *optionsWidget) -{ - mToolOptionsDockWidget->setWindowTitle(tr("Tool Options - ") + optionsWidget->windowTitle()); - mToolOptionsStackedWidget->setCurrentWidget(optionsWidget); - // Adjust option layout to be tight - mToolOptionsStackedWidget->adjustSize(); - // show or hide the dockwidget options - // if (optionsWidget->windowTitle() != "" && mToolOptionsDockWidget->isHidden()) - // mToolOptionsDockWidget->show(); - // else if (!mToolOptionsDockWidget->isHidden() && optionsWidget->windowTitle() == "") - // mToolOptionsDockWidget->hide(); -} - -void MainWindow::createStatusBar() -{ - statusBar()->showMessage(tr("Welcome to TopMod")); -} - -void MainWindow::closeEvent(QCloseEvent *event) -{ - //close the help file if it's open... not sure this is necessary - // if (mAssistantClient) - // mAssistantClient->closeAssistant(); - - mPreferencesDialog->saveSettings(); - - if (maybeSave()) - { - event->accept(); - } - else event->ignore(); -} - -void MainWindow::newFile() -{ - if (maybeSave()) - { - clearUndoList(); - mObject.destroy(); - mActiveViewport->redraw(); - } - else - { - return; - } -} - -bool MainWindow::maybeSave() -{ - if (this->isModified()) - { - int ret = QMessageBox::warning( - this, tr("TopMod"), - tr("The document has been modified.\nDo you want to save your changes?"), - QMessageBox::Yes | QMessageBox::Default, - QMessageBox::No, - QMessageBox::Cancel | QMessageBox::Escape); - - if (ret == QMessageBox::Yes) - return this->saveFile(); - else if (ret == QMessageBox::Cancel) - return false; - } - return true; -} - -void MainWindow::loadFile(QString fileName) -{ - openFile(fileName); - this->setCurrentFile(fileName); - statusBar()->showMessage(tr("File loaded"), 2000); -} - -bool MainWindow::saveFile(const QString &fileName) -{ - this->setCurrentFile(fileName); - statusBar()->showMessage(tr("File saved"), 2000); - return true; -} - -void MainWindow::openFile(const QString &fileName) -{ - QFile file(fileName); - file.open(QIODevice::ReadOnly); - QFileInfo info(file); - QByteArray ba = info.absoluteFilePath().toLatin1(); - const char *filename = ba.data(); - mWasPrimitive = false; - mIsPrimitive = false; - if (!mCurFilename.isEmpty()) - { - undoPush(); - setModified(false); - } - - readObject(filename); -#ifdef WITH_PYTHON - DLFLObjectPtr obj = &mObject; - if (obj) - emit loadedObject(obj, fileName); -#endif - mActiveViewport->createPatchObject(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - setCurrentFile(fileName); - mActiveViewport->redraw(); -} - -void MainWindow::about() -{ -//TODO: Define version number in a header file -#ifndef VER -#define VER "3.0.0" -#endif // VER - - QString s = QString( - "TopMod Topological Mesh Modeler v%1
" \ - "TopMod Home Page
" \ - "" \ - "Check for Updates.").arg(VER); - QMessageBox::about(this, tr("About TopMod"), s); -} - -void MainWindow::initializeHelp() -{ -// mAssistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this); -// QStringList arguments; -// arguments << "-profile" << QString("userdoc") + QDir::separator() + QString("topmod.adp"); -// mAssistantClient->setArguments(arguments); -} - -/** -* \brief show the help file in the QAssistant help file viewer -*/ -void MainWindow::help() -{ -// mAssistantClient->openAssistant();//showPage(QString("userdoc/index.html")); - QDesktopServices::openUrl(QUrl("http://www.topmod3d.org/wiki")); -} - -/** -* \brief will eventually check for updates on the TopMod website and download the necessary files -*/ -void MainWindow::checkForUpdates() -{ - QDesktopServices::openUrl(QUrl("http://code.google.com/p/topmod/downloads/list")); -} - -/** -* \brief opens the current TopMod homepage in the user's default web browser -*/ -void MainWindow::topModWeb() -{ - QDesktopServices::openUrl(QUrl("http://www.topmod3d.org/")); -} - -void MainWindow::topModBlip() -{ - QDesktopServices::openUrl(QUrl("http://topmod.blip.tv/")); -} - -void MainWindow::topModResearch() -{ - QDesktopServices::openUrl(QUrl("http://www.topmod3d.org/wiki/index.php?title=Research")); -} - -void MainWindow::documentWasModified() -{ - setWindowModified(this->isModified()); -} - -void MainWindow::on_editStyleAction_triggered() -{ - mStyleSheetEditor->show(); - mStyleSheetEditor->activateWindow(); -} - -void MainWindow::openPreferences() -{ - mPreferencesDialog->display(); -} - -#ifdef WITH_VERSE -void MainWindow::verseConnected() -{ - mVerseMenu->insertAction(mVerseConnectLocalhostAct, mVerseDisconnectAct); - mVerseMenu->removeAction(mVerseConnectLocalhostAct); - mVerseMenu->removeAction(mVerseConnectAct); -} -void MainWindow::verseDisconnected() -{ - mVerseMenu->insertAction(mVerseDisconnectAct, mVerseConnectLocalhostAct); - mVerseMenu->insertAction(mVerseDisconnectAct, mVerseConnectAct); - mVerseMenu->removeAction(mVerseDisconnectAct); -} -void MainWindow::verseStarted() -{ - mVerseMenu->insertAction(mVerseStartServerAct, mVerseKillServerAct); - mVerseMenu->removeAction(mVerseStartServerAct); -} -void MainWindow::verseKilled() -{ - mVerseMenu->insertAction(mVerseKillServerAct, mVerseStartServerAct); - mVerseMenu->removeAction(mVerseKillServerAct); -} -#endif - -void MainWindow::createRenderers() -{ - sWiredRenderer = new WireframeRenderer(); - // wired->setRenderFlags(DLFLRenderer::ShowWireframe); - - sNormalRenderer = new NormalRenderer(); - // normal->setRenderFlags(DLFLRenderer::ShowWireframe); - - sLitRenderer = new LitRenderer(); - // lit->setRenderFlags(DLFLRenderer::ShowWireframe); - - sTexturedRenderer = new TexturedRenderer(); - // textured->setRenderFlags(DLFLRenderer::ShowWireframe); - - sTexturedLitRenderer = new TexturedLitRenderer(); - // texturedlit->setRenderFlags(DLFLRenderer::ShowWireframe); - - sPatchRenderer = new PatchRenderer(); - // patch->setRenderFlags(DLFLRenderer::ShowWireframe); - sColorableRendererr = new ColorableRenderer(); -} - -void MainWindow::destroyRenderers() -{ - delete sWiredRenderer; - delete sNormalRenderer; - delete sLitRenderer; - delete sTexturedRenderer; - delete sTexturedLitRenderer; - delete sPatchRenderer; - delete sColorableRendererr; -} - -void MainWindow::setUndoLimit(int limit) -{ - mUndoLimit = limit; -} - -void MainWindow::toggleUndo(void) -{ - if (mUseUndo) mUseUndo = false; - else mUseUndo = true; -} - -void MainWindow::doDrag(int x, int y) // brianb -{ - int drag_endx = x; - int drag_endy = y; - - GLdouble obj_world[3]; // Object world coordinates - GLdouble obj_window[3]; // Object window coordinates - GLdouble ms_window[3]; // Mouse start drag window - GLdouble ms_world[3]; // Mouse start drag world - GLdouble me_window[3]; // Mouse end drag window - GLdouble me_world[3]; // Mouse end drag world - - GLdouble modelMatrix[16], projMatrix[16]; - GLint viewport[4]; - GLint realy; - DLFLVertexPtr vptr; - // Viewport* viewp; - - switch (mOperationMode) - { - case EditVertex: - { - if (GLWidget::numSelectedLocators() > 0) - { - if (!sIsEditing) - { - undoPush(); - sIsEditing = true; - } - vptr = mActiveViewport->getLocatorPtr()->getActiveVertex(); - - // Save previous transformations - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - - // Apply current transformation - // viewp = active->getViewport(); - // viewp->reshape(); - // viewp->apply_transform(); - - // Get the info - glGetIntegerv(GL_VIEWPORT, viewport); - glGetDoublev(GL_MODELVIEW_MATRIX, modelMatrix); - glGetDoublev(GL_PROJECTION_MATRIX, projMatrix); - - obj_world[0] = vptr->getCoords()[0]; - obj_world[1] = vptr->getCoords()[1]; - obj_world[2] = vptr->getCoords()[2]; - - // Project object coordinates to window coordinates (to get accurate window depth) - gluProject(obj_world[0], obj_world[1], obj_world[2], - modelMatrix, projMatrix, viewport, - &obj_window[0], &obj_window[1], &obj_window[2]); - - // Set start and end window coordinates using depth coordinate found above - ms_window[0] = sDragStartX; ms_window[1] = sDragStartY; ms_window[2] = obj_window[2]; - me_window[0] = drag_endx; me_window[1] = drag_endy; me_window[2] = obj_window[2]; - - // Unproject start drag window coordinates to world coordinates - gluUnProject(ms_window[0], ms_window[1], ms_window[2], - modelMatrix, projMatrix, viewport, - &ms_world[0], &ms_world[1], &ms_world[2]); - - // Unproject end drag window coordinates to world coordinates - gluUnProject(me_window[0], me_window[1], me_window[2], - modelMatrix, projMatrix, viewport, - &me_world[0], &me_world[1], &me_world[2]); - - // Switch on locked axis and update object world position - switch (mActiveViewport->getLocatorPtr()->getSelectedAxis()) - { - case 0: // X-axis - obj_world[0] = obj_world[0] + me_world[0] - ms_world[0]; - break; - - case 1: // Y-axis - obj_world[1] = obj_world[1] + me_world[1] - ms_world[1]; - break; - - case 2: // Z-axis - obj_world[2] = obj_world[2] + me_world[2] - ms_world[2]; - break; - - case 3: // User can drag freely along viewing place - default: - obj_world[0] = obj_world[0] + me_world[0] - ms_world[0]; - obj_world[1] = obj_world[1] + me_world[1] - ms_world[1]; - obj_world[2] = obj_world[2] + me_world[2] - ms_world[2]; - break; - } - - vptr->setCoords(Vector3d(obj_world[0], obj_world[1], obj_world[2])); - - // Reset drag start points - startDrag(drag_endx, drag_endy); - - // Restore previous transformations - glPopMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - - redraw(); - } - break; - } - case SelectionWindow: - { - // std::cout << "masking!\n"; - - //draw the window with qPainter - mActiveViewport->showSelectionWindow(); - mActiveViewport->setSelectionWindowStartX(sDragStartX);// mapFromGlobal(QCursor::pos()).x()); - mActiveViewport->setSelectionWindowStartY(sDragStartY);// mapFromGlobal(QCursor::pos()).y()); - //find center of rectangle - // int w = abs(mapFromGlobal(QCursor::pos()).x()-drag_startx); - // int h = abs(mapFromGlobal(QCursor::pos()).y()-(active->height()-drag_starty)); - - int w = max(1, abs(x - sDragStartX)); - int h = max(1, abs(y - sDragStartY)); - - // int cx = (w)/2+drag_startx; - // //invert this??? - // int cy = (h)/2+(active->height()-drag_starty); - - int cx = (x + sDragStartX) / 2; - int cy = (y + sDragStartY) / 2; - - // cout << "cx = " << cx << "\t\tcy = " << cy << "\t\tw = " << w << "\t\th = " << h << "\n"; - - if (mSelectionMask == MainWindow::MaskVertices) - { - DLFLVertexPtrArray svptrarr = mActiveViewport->selectVertices(cx, cy, w, h); - for (auto svPtr : svptrarr) - { - if (!mActiveViewport->isSelected(svPtr)) - { - mActiveViewport->setSelectedVertex(svPtr); - sNumSelVerts++; - } - } - mActiveViewport->redraw(); - } - else if (mSelectionMask == MainWindow::MaskEdges) - { - DLFLEdgePtrArray septrarr = mActiveViewport->selectEdges(cx, cy, w, h); - for (auto sePtr : septrarr) - { - if (!mActiveViewport->isSelected(sePtr)) - { - mActiveViewport->setSelectedEdge(sePtr); - sNumSelEdges++; - } - } - mActiveViewport->redraw(); - } - else if (mSelectionMask == MainWindow::MaskFaces) - { - // std::cout << "faces!\n"; - DLFLFacePtrArray sfptrarr = mActiveViewport->selectFaces(cx, cy, w, h); - for (auto sfPtr : sfptrarr) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sfPtr); - sNumSelFaces++; - } - } - mActiveViewport->redraw(); - } - else if (mSelectionMask == MainWindow::MaskCorners) - { - - } - break; - } - default: - { - doSelection(x, y); - break; - } - } -}// brianb - -// Do selection of various entities depending on current mode -void MainWindow::doSelection(int x, int y) -{ - DLFLVertexPtr selectedVertPtr = nullptr; - DLFLEdgePtr selectedEdgePtr = nullptr; - DLFLFacePtr selectedFacePtr = nullptr; - DLFLFaceVertexPtr selectedFaceVertPtr = nullptr; - DLFLLocatorPtr selectedLocatorPtr = nullptr; // brianb - - switch (mOperationMode) - { - case EditVertex: // brianb - { - selectedLocatorPtr = mActiveViewport->getLocatorPtr(); - selectedVertPtr = mActiveViewport->getLocatorPtr()->getActiveVertex(); - if (selectedVertPtr == nullptr) - { - selectedVertPtr = mActiveViewport->selectVertex(x, y); - selectedLocatorPtr->setActiveVertex(selectedVertPtr); - } - // Test for locater selection - if (selectedLocatorPtr->getActiveVertex() != nullptr) - { - selectedLocatorPtr = mActiveViewport->selectLocator(x, y); - if (selectedLocatorPtr != nullptr) - { - mActiveViewport->setSelectedLocator(0, selectedLocatorPtr); - startDrag(x, y); - } - else - { - mActiveViewport->getLocatorPtr()->setActiveVertex(nullptr); - mActiveViewport->clearSelectedLocators(); - } - } - break; - } - case SelectVertex: - case MarkVertex: - case CutVertex://ozgur - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedVertices(); - } - selectedVertPtr = mActiveViewport->selectVertex(x, y); - mActiveViewport->setSelectedVertex(selectedVertPtr); - break; - case MultiSelectVertex: - selectedVertPtr = mActiveViewport->selectVertex(x, y); - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { - if (mActiveViewport->isSelected(selectedVertPtr)) - { - mActiveViewport->clearSelectedVertex(selectedVertPtr); - sNumSelVerts--; - } - mActiveViewport->redraw(); - } - else - { - selectedVertPtr = mActiveViewport->selectVertex(x, y); - if (!mActiveViewport->isSelected(selectedVertPtr)) - { - mActiveViewport->setSelectedVertex(selectedVertPtr); - sNumSelVerts++; - } - mActiveViewport->redraw(); - } - // svptr = active->selectVertex(x,y); - // if ( !active->isSelected(svptr) ) - // active->setSelectedVertex(num_sel_verts,svptr); - break; - case DeleteEdge: - case SubdivideEdge: - case CollapseEdge: - case SelectEdge: - case CutEdge: - case TruncateEdge: - case MarkEdge://ozgur - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedEdges(); - } - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - mActiveViewport->setSelectedEdge(selectedEdgePtr); - // cout << "x = " << x << "\t\ty = " << y << "\n"; - break; - case CutEdgeandVertex://ozgur - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - selectedVertPtr = mActiveViewport->selectVertex(x, y); - mActiveViewport->setSelectedEdge(selectedEdgePtr); - mActiveViewport->setSelectedVertex(selectedVertPtr); - break; - case MultiSelectEdge: - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { - if (mActiveViewport->isSelected(selectedEdgePtr)) - { - mActiveViewport->clearSelectedEdge(selectedEdgePtr); - sNumSelEdges--; - } - mActiveViewport->redraw(); - } - else - { - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - if (!mActiveViewport->isSelected(selectedEdgePtr)) - { - mActiveViewport->setSelectedEdge(selectedEdgePtr); - sNumSelEdges++; - } - mActiveViewport->redraw(); - } - // septr = active->selectEdge(x,y); - // if ( !active->isSelected(septr) ) - // active->setSelectedEdge(num_sel_edges,septr); - break; - case SelectEdgeLoop: - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedEdges(); - } - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - if (selectedEdgePtr && - QApplication::keyboardModifiers() == Qt::ControlModifier && - mActiveViewport->isSelected(selectedEdgePtr)) - { - sDeselectEdges = true; - mActiveViewport->clearSelectedEdge(selectedEdgePtr); - sNumSelEdges--; - getEdgeLoopSelection(selectedEdgePtr); - sDeselectEdges = false; - } - else if (selectedEdgePtr && !mActiveViewport->isSelected(selectedEdgePtr)) - { - // active->setSelectedEdge(num_sel_edges,septr); - mActiveViewport->setSelectedEdge(selectedEdgePtr); - sNumSelEdges++; - getEdgeLoopSelection(selectedEdgePtr); - } - mActiveViewport->redraw(); - break; - case SelectFace: - case CrustModeling: - case ConnectFaces: - case CutFace://ozgur - case PaintFace://dave - case EyeDropper://dave - { - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedFaces(); - } - selectedFacePtr = mActiveViewport->selectFace(x, y); - // active->setSelectedFace(num_sel_faces,sfptr); - mActiveViewport->setSelectedFace(selectedFacePtr); - break; - // case SelectSimilarFaces : - // //clear selection if shift isn't down - // if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - // active->clearSelectedFaces(); - // sfptr = active->selectFace(x,y); - // if (sfptr){ - // if (!active->isSelected(sfptr)){ - // // active->setSelectedFace(num_sel_faces,sfptr); - // active->setSelectedFace(sfptr); - // num_sel_faces++; - // } - // DLFLFacePtrArray sfptrarray; - // DLFL::selectMatchingFaces(&object, sfptr, sfptrarray); - // for (auto sfPtr : sfptrarray){ - // if (!active->isSelected(sfPtr)){ - // active->setSelectedFace(sfPtr); - // num_sel_faces++; - // } - // } - // } - // active->redraw(); - // break; - } - case SelectSimilar: - { - // std::cout << active->getSelectionMaskString() << " = select similar\n"; - - switch (mSelectionMask) - { - case MaskFaces: - { - // std::cout<< "Mask faces select sim\n"; - //clear selection if shift isn't down - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - mActiveViewport->clearSelectedFaces(); - selectedFacePtr = mActiveViewport->selectFace(x, y); - if (selectedFacePtr) - { - if (!mActiveViewport->isSelected(selectedFacePtr)) - { - // active->setSelectedFace(num_sel_faces,sfptr); - mActiveViewport->setSelectedFace(selectedFacePtr); - sNumSelFaces++; - } - DLFLFacePtrArray sfptrarray; - DLFL::selectMatchingFaces(&mObject, selectedFacePtr, sfptrarray); - for (auto sfPtr : sfptrarray) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sfPtr); - sNumSelFaces++; - } - } - } - break; - } - case MaskEdges: - { - //clear selection if shift isn't down - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - mActiveViewport->clearSelectedEdges(); - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - if (selectedEdgePtr) - { - if (!mActiveViewport->isSelected(selectedEdgePtr)) - { - mActiveViewport->setSelectedEdge(selectedEdgePtr); - sNumSelEdges++; - } - DLFLEdgePtrArray septrarray; - DLFL::selectMatchingEdges(&mObject, selectedEdgePtr, septrarray); - for (auto sePtr : septrarray) - { - if (!mActiveViewport->isSelected(sePtr)) - { - mActiveViewport->setSelectedEdge(sePtr); - sNumSelEdges++; - } - } - } - break; - } - case MaskVertices: - { - //clear selection if shift isn't down - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - mActiveViewport->clearSelectedVertices(); - selectedVertPtr = mActiveViewport->selectVertex(x, y); - if (selectedVertPtr) - { - if (!mActiveViewport->isSelected(selectedVertPtr)) - { - mActiveViewport->setSelectedVertex(selectedVertPtr); - sNumSelVerts++; - } - DLFLVertexPtrArray svptrarray; - DLFL::selectMatchingVertices(&mObject, selectedVertPtr, svptrarray); - for (auto svPtr : svptrarray) - { - if (!mActiveViewport->isSelected(svPtr)) - { - mActiveViewport->setSelectedVertex(svPtr); - sNumSelVerts++; - } - } - } - mActiveViewport->redraw(); - break; - } - default: - break; - }; - break; - } - case SelectFacesByArea: - { - //clear selection if shift isn't down - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - mActiveViewport->clearSelectedFaces(); - selectedFacePtr = mActiveViewport->selectFace(x, y); - if (selectedFacePtr) - { - if (!mActiveViewport->isSelected(selectedFacePtr)) - { - // active->setSelectedFace(num_sel_faces,sfptr); - mActiveViewport->setSelectedFace(selectedFacePtr); - sNumSelFaces++; - } - DLFLFacePtrArray sfptrarray; - DLFL::selectFacesByArea(&mObject, selectedFacePtr, sfptrarray, MainWindow::sFaceAreaTolerance); - for (auto sfPtr : sfptrarray) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sfPtr); - sNumSelFaces++; - } - } - } - mActiveViewport->redraw(); - break; - } - case SelectFacesByColor: - { - //clear selection if shift isn't down - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - mActiveViewport->clearSelectedFaces(); - selectedFacePtr = mActiveViewport->selectFace(x, y); - if (selectedFacePtr) - { - if (!mActiveViewport->isSelected(selectedFacePtr)) - { - // active->setSelectedFace(num_sel_faces,sfptr); - mActiveViewport->setSelectedFace(selectedFacePtr); - sNumSelFaces++; - } - DLFLFacePtrArray sfptrarray; - DLFL::selectFacesByColor(&mObject, selectedFacePtr, sfptrarray, MainWindow::sFaceColorTolerance); - for (auto sfPtr : sfptrarray) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sfPtr); - sNumSelFaces++; - } - } - } - mActiveViewport->redraw(); - break; - } - case SelectFaceLoop: - { - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedFaces(); - } - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - mActiveViewport->setSelectedEdge(selectedEdgePtr); - if (selectedEdgePtr) - { - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { // deselect - sFaceLoopStartEdge = selectedEdgePtr; - getFaceLoopSelection(selectedEdgePtr, true, nullptr, false); - } - else - { //select - sFaceLoopStartEdge = selectedEdgePtr; - getFaceLoopSelection(selectedEdgePtr, true, nullptr, true); - } - } - mActiveViewport->redraw(); - break; - } - case SelectEdgeRing: - { - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedEdges(); - } - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - mActiveViewport->setSelectedEdge(selectedEdgePtr); - if (selectedEdgePtr) - { - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { // deselect - sEdgeRingStartEdge = selectedEdgePtr; - getEdgeRingSelection(selectedEdgePtr, true, nullptr, false); - } - else - { //select - sEdgeRingStartEdge = selectedEdgePtr; - getEdgeRingSelection(selectedEdgePtr, true, nullptr, true); - } - } - mActiveViewport->redraw(); - break; - } - case ExtrudeFace: - case ExtrudeFaceDS: - case ExtrudeDualFace: - case ExtrudeFaceDodeca: - case ExtrudeFaceIcosa: - case StellateFace: - case DoubleStellateFace: - case ExtrudeFaceDome: - case ExtrudeMultipleFaces: - case MultiSelectFace: - case SubdivideFace: - { - selectedFacePtr = mActiveViewport->selectFace(x, y); - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { - if (mActiveViewport->isSelected(selectedFacePtr)) - { - mActiveViewport->clearSelectedFace(selectedFacePtr); - sNumSelFaces--; - } - mActiveViewport->redraw(); - } - else - { - selectedFacePtr = mActiveViewport->selectFace(x, y); - if (!mActiveViewport->isSelected(selectedFacePtr)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, selectedFacePtr); - sNumSelFaces++; - } - mActiveViewport->redraw(); - } - break; - } - case SelectCheckerboard: - { - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedFaces(); - } - //get one selected face - selectedFacePtr = mActiveViewport->selectFace(x, y); - if (selectedFacePtr && - mActiveViewport->isSelected(selectedFacePtr) && - QApplication::keyboardModifiers() == Qt::ControlModifier) - { - mActiveViewport->clearSelectedFace(selectedFacePtr); - sNumSelFaces--; - getCheckerboardSelection(selectedFacePtr); - } - else if (selectedFacePtr && !mActiveViewport->isSelected(selectedFacePtr)) - { - mActiveViewport->setSelectedFace(selectedFacePtr); - sNumSelFaces++; - getCheckerboardSelection(selectedFacePtr); - } - mActiveViewport->redraw(); - break; - } - case SelectCorner: - case ReorderFace: - case InsertEdge: - case SpliceCorners: - case ConnectFaceVertices: - case BezierConnectFaces: - case HermiteConnectFaces: - { - selectedFacePtr = mActiveViewport->selectFace(x, y); - mActiveViewport->setSelectedFace(sNumSelFaces, selectedFacePtr); - if (selectedFacePtr) - { - selectedFaceVertPtr = mActiveViewport->selectFaceVertex(selectedFacePtr, x, y); - mActiveViewport->setSelectedFaceVertex(sNumSelFaceVerts, selectedFaceVertPtr); - } - break; - } - case MultiSelectCorner: - { - selectedFacePtr = mActiveViewport->selectFace(x, y); - mActiveViewport->setSelectedFace(selectedFacePtr); - if (selectedFacePtr) - { - selectedFaceVertPtr = mActiveViewport->selectFaceVertex(selectedFacePtr, x, y); - if (!mActiveViewport->isSelected(selectedFaceVertPtr)) - mActiveViewport->setSelectedFaceVertex(selectedFaceVertPtr); - } - break; - } - case ConnectEdges: - { - selectedFacePtr = mActiveViewport->selectFace(x, y); - mActiveViewport->setSelectedFace(sNumSelFaces, selectedFacePtr); - if (selectedFacePtr) - { - selectedEdgePtr = mActiveViewport->selectEdge(x, y); - mActiveViewport->setSelectedEdge(sNumSelEdges, selectedEdgePtr); - } - break; - } - case SelectionWindow: - { - if (QApplication::keyboardModifiers() != Qt::ShiftModifier) - { - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedVertices(); - mActiveViewport->clearSelectedFaces(); - } - startDrag(x, y); - - break; - } - } - redraw(); - // if ( svptr != nullptr || septr != nullptr || sfptr != nullptr ) redraw(); -} - -void MainWindow::dragEnterEvent(QDragEnterEvent *event) -{ - /*QMessageBox::about(this,tr("mimetype"),tr("%1").arg(event->mimeData()->formats().join(","))); - if (event->mimeData()->hasFormat("text/uri-list")) - event->acceptProposedAction();*/ -} - -void MainWindow::dropEvent(QDropEvent *event) -{ - /*textBrowser->setPlainText(event->mimeData()->text()); - mimeTypeCombo->clear(); - mimeTypeCombo->addItems(event->mimeData()->formats()); - QMessageBox::about(this, tr("mimetype"), tr("%1").arg(event->mimeData()->data("text/uri-list").data)); - - event->acceptProposedAction();*/ -} - -// Handle keyboard and mouse events -void MainWindow::mousePressEvent(QMouseEvent *event) -{ - //experimental for crossing window selection - // if (event->buttons() == Qt::LeftButton && mode == SelectionWindow) {} - if (event->buttons() == Qt::LeftButton && mOperationMode != NormalMode) - { - doSelection(event->x(), height() - mStatusBar->height() - event->y()); - } - // else if ( event->buttons() == Qt::RightButton && QApplication::keyboardModifiers() == Qt::ShiftModifier){ - // // event->ignore(); - // if (!active->isBrushVisible()) active->showBrush(); - // mBrushStartX = event->x(); - // // mBrushStartY = event->y(); - // } - else if (event->buttons() == Qt::RightButton) - { - getRightClickMenu(); - mRightClickMenu->popup(mapToGlobal(event->pos())); - } - else - { - event->ignore(); - } -} - -/** -* \brief load custom right click menu options based on the current mode of operation -* -*/ -void MainWindow::getRightClickMenu() -{ - mRightClickMenu->clear(); - //add generic items for now to test it out - - switch (mOperationMode) - { - case NormalMode: - // mRightClickMenu->addAction(createWireframeAct); - break; - case SelectVertex: - break; - case SelectEdge: - mRightClickMenu->addAction(mSubdivideSelectedEdgesAct); - break; - case SelectFace: - mRightClickMenu->addAction(mSubdivideSelectedFacesAct); - mRightClickMenu->addAction(mPaintSelectedFacesAct); - break; - case SelectCorner: - break; - case MultiSelectVertex: - break; - case MultiSelectEdge: - mRightClickMenu->addAction(mSubdivideSelectedEdgesAct); - break; - case MultiSelectFace: - mRightClickMenu->addAction(mSubdivideSelectedFacesAct); - mRightClickMenu->addAction(mPaintSelectedFacesAct); - break; - case MultiSelectCorner: - break; - case InsertEdge: - break; - case DeleteEdge: - break; - case SubdivideEdge: - break; - case CollapseEdge: - mRightClickMenu->addAction(mSubdivideSelectedEdgesAct); - mRightClickMenu->addAction(mCollapseSelectedEdgesAct); - break; - case SpliceCorners: - break; - case ConnectEdges: - mRightClickMenu->addAction(mSubdivideSelectedEdgesAct); - mRightClickMenu->addAction(mCollapseSelectedEdgesAct); - break; - case ExtrudeFace: - case ExtrudeFaceDS: - case ExtrudeDualFace: - case ExtrudeFaceDodeca: - case ExtrudeFaceIcosa: - case ExtrudeMultipleFaces: - case StellateFace: - case DoubleStellateFace: - case ExtrudeFaceDome: - mRightClickMenu->addAction(mPerformExtrusionAct); - mRightClickMenu->addAction(mSubdivideSelectedFacesAct); - mRightClickMenu->addAction(mPaintSelectedFacesAct); - break; - case ConnectFaceVertices: - case ConnectFaces: - case BezierConnectFaces: - case HermiteConnectFaces: - mRightClickMenu->addMenu(mHighgenusMode->getMenu()); - break; - case ReorderFace: - break; - case SubdivideFace: - mRightClickMenu->addAction(mSubdivideSelectedFacesAct); - break; - case CrustModeling: - mRightClickMenu->addAction(mCreateCrustThicknessAct); - mRightClickMenu->addAction(mCreateCrustScalingAct); - mRightClickMenu->addSeparator(); - break; - case CutEdge: - case CutVertex: - case CutFace: - mRightClickMenu->addAction(mPerformCuttingAct); - mRightClickMenu->addSeparator(); - break; - case TruncateEdge: - break; - case MarkEdge: - break; - case MarkVertex: - break; - case ConvexHullMode: - break; - case EditVertex: - break; - case SelectEdgeLoop: - case SelectEdgeRing: - mRightClickMenu->addAction(mSubdivideSelectedEdgesAct); - mRightClickMenu->addAction(mCollapseSelectedEdgesAct); - // mRightClickMenu->addAction(mDeleteSelectedAct); - break; - case SelectFaceLoop: - // SelectSimilarFaces : - case SelectFacesByArea: - case SelectFacesByColor: - case SelectCheckerboard: - mRightClickMenu->addAction(mSubdivideSelectedFacesAct); - mRightClickMenu->addAction(mPaintSelectedFacesAct); - break; - - default: - break; - } - - mRightClickMenu->addSeparator(); - mRightClickMenu->addAction(mSelectAllAct); - mRightClickMenu->addAction(mSelectInverseAct); - mRightClickMenu->addAction(mSelectMultipleAct); - mRightClickMenu->addAction(mSelectSimilarAct); - mRightClickMenu->addAction(mSelectionWindowAct); - mRightClickMenu->addAction(mGrowSelectionAct); - mRightClickMenu->addAction(mShrinkSelectionAct); - mRightClickMenu->addAction(mClearSelectedModeAct); - mRightClickMenu->addSeparator(); - - switch (mSelectionMask) - { - case MaskVertices: - mRightClickMenu->addAction(mDeleteSelectedAct); - // mRightClickMenu->addAction(selectVertexAct); - // mRightClickMenu->addAction(selectMultipleVerticesAct); - mRightClickMenu->addAction(mEditVertexAct); - // mRightClickMenu->addAction(mEditVertexAct); - mRightClickMenu->addAction(mSelectEdgesFromVerticesAct); - mRightClickMenu->addAction(mSelectFacesFromVerticesAct); - break; - case MaskEdges: - mRightClickMenu->addAction(mDeleteSelectedAct); - mRightClickMenu->addAction(mCollapseSelectedEdgesAct); - mRightClickMenu->addSeparator(); - // mRightClickMenu->addAction(selectEdgeAct); - // mRightClickMenu->addAction(selectMultipleEdgesAct); - mRightClickMenu->addAction(mSelectEdgeLoopAct); - mRightClickMenu->addAction(mSelectEdgeRingAct); - mRightClickMenu->addAction(mSelectVerticesFromEdgesAct); - mRightClickMenu->addAction(mSelectFacesFromEdgesAct); - break; - case MaskFaces: //face stuff - // mRightClickMenu->addAction(mDeleteSelectedAct); - // mRightClickMenu->addAction(selectFaceAct); - mRightClickMenu->addAction(mSelectFaceLoopAct); - // mRightClickMenu->addAction(selectMultipleFacesAct); - // mRightClickMenu->addAction(selectSimilarFacesAct); - mRightClickMenu->addAction(mSelectFacesByAreaAct); - mRightClickMenu->addAction(mSelectFacesByColorAct); - mRightClickMenu->addAction(mSelectCheckerboardFacesAct); - mRightClickMenu->addAction(mSelectEdgesFromFacesAct); - mRightClickMenu->addAction(mSelectVerticesFromFacesAct); - break; - case MaskCorners: - // mRightClickMenu->addAction(mDeleteSelectedAct); - // mRightClickMenu->addAction(// selectCornerAct); - break; - default: - break; - } - - // mRightClickMenu->addSeparator(); - // mRightClickMenu->addAction(mEditVertexAct); - mRightClickMenu->addSeparator(); - mRightClickMenu->addMenu(mToolsMenu); - mRightClickMenu->addMenu(mRemeshingMenu); - mRightClickMenu->addMenu(mSelectionMaskMenu); -} - - -void MainWindow::mouseMoveEvent(QMouseEvent *event) -{ - // if (active->isBrushVisible()) active->redraw(); - if (mOperationMode != NormalMode && event->buttons() == Qt::LeftButton) - { - // doSelection(event->x(),this->size().height()-event->y() ); - doDrag(event->x(), this->size().height() - mStatusBar->height() - event->y()); - } - else if (mSpinBoxMode < eInvalidSpinBox && mSpinBoxes[mSpinBoxMode] != nullptr) - { - double d = (event->x() - mStartDragX) / 20; - mSpinBoxes[mSpinBoxMode]->setValue(mSpinBoxes[mSpinBoxMode]->value() + d); - } - else - { - event->ignore(); - } -} - -//if the user holds down certain keys, allow them to -//change various properties in the scene -void MainWindow::keyPressEvent(QKeyEvent *event) -{ - mStartDragX = mapFromGlobal(QCursor::pos()).x(); - mStartDragY = mapFromGlobal(QCursor::pos()).y(); - - switch (event->key()) - { - case Qt::Key_Y: - mSpinBoxMode = eFirstSpinBox; - break; - case Qt::Key_U: - mSpinBoxMode = eSecondSpinBox; - break; - case Qt::Key_I: - mSpinBoxMode = eThirdSpinBox; - break; - case Qt::Key_O: - mSpinBoxMode = eFourthSpinBox; - break; - case Qt::Key_P: - mSpinBoxMode = eFifthSpinBox; - break; - default: - mSpinBoxMode = eInvalidSpinBox; - break; - } -} - -void MainWindow::keyReleaseEvent(QKeyEvent *event) -{ - mSpinBoxMode = eInvalidSpinBox; -} - -void MainWindow::setSpinBoxes( - QDoubleSpinBox *one, QDoubleSpinBox *two, - QDoubleSpinBox *three, QDoubleSpinBox *four, - QDoubleSpinBox *five, QDoubleSpinBox *six) -{ - mSpinBoxes = { one, two, three, four, five, six }; -} - -void MainWindow::mouseReleaseEvent(QMouseEvent *event) -{ - QString cmd; - // The mouse was dragged or released - // Send this event to the subroutine handling the current event, if any - // If we are not currently doing anything, nothing will happen - // If ALT key is pressed we are mainpulating the view which is handled by the viewport - if (mOperationMode != NormalMode) - { - switch (mOperationMode) - { - case EditVertex: // brianb - sIsEditing = false; - if (mActiveViewport->numSelectedVertices() > 0) - { - DLFLVertexPtr vp = mActiveViewport->getSelectedVertex(0); - vp->print(); - // active->clearSelectedVertices(); - // num_sel_verts = 0; - redraw(); - } - break; - case SelectVertex: - - if (mActiveViewport->numSelectedVertices() > 0) - { - // DLFLVertexPtr vp = active->getSelectedVertex(0); - // vp->print(); - // active->clearSelectedVertices(); - // num_sel_verts = 0; - // redraw(); - } - break; - case SelectEdge: - case CutEdge: - // if ( active->numSelectedEdges() > 0 ) { - // DLFLEdgePtr septr = active->getSelectedEdge(0); - // if (septr) { - //septr->print(); - //num_sel_edges = 0; - // } - // active->clearSelectedEdges(); - // redraw(); - // } - break; - case SelectEdgeLoop: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - getEdgeLoopSelection(septr); - } - // active->clearSelectedEdges(); - mActiveViewport->redraw(); - break; - case SelectEdgeRing: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { // deselect - sEdgeRingStartEdge = septr; - getEdgeRingSelection(septr, true, nullptr, false); - } - else - { //select - sEdgeRingStartEdge = septr; - getEdgeRingSelection(septr, true, nullptr, true); - } - } - } - mActiveViewport->redraw(); - break; - case SelectFaceLoop: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - if (QApplication::keyboardModifiers() == Qt::ControlModifier) - { // deselect - sFaceLoopStartEdge = septr; - getFaceLoopSelection(septr, true, nullptr, false); - } - else - { //select - sFaceLoopStartEdge = septr; - getFaceLoopSelection(septr, true, nullptr, true); - } - } - } - mActiveViewport->clearSelectedEdges(); - mActiveViewport->redraw(); - break; - case SelectFace: - // if ( active->numSelectedFaces() > 0 ) - // { - // DLFLFacePtr fp = active->getSelectedFace(0); - // // fp->print(); - // // active->clearSelectedFaces(); - // // num_sel_faces = 0; - // redraw(); - // } - break; - case PaintFace: - if (mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr fp = mActiveViewport->getSelectedFace(0); - // first search for the material in the existing list - // DLFLMaterialPtr m = object.findMaterial(RGBColor(paint_bucket_color.redF(),paint_bucket_color.greenF(),paint_bucket_color.blueF() )); - fp->setMaterial(mObject.addMaterial(RGBColor(sPaintBucketColor.redF(), sPaintBucketColor.greenF(), sPaintBucketColor.blueF()))); - // if ( m ){ - // - // } - // else { - // - // } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case EyeDropper: - if (mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr fp = mActiveViewport->getSelectedFace(0); - //grab the color from the face... set it in the interface - setPaintBucketColor(QColor(fp->material()->color.r, fp->material()->color.g, fp->material()->color.b)); - //set the color over in the experimental mode interface thing... - mExperimentalMode->setPaintBucketColor(QColor(fp->material()->color.r, fp->material()->color.g, fp->material()->color.b)); - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case SelectSimilar: - if (mSelectionMask == MainWindow::MaskFaces) - { - // cout << "select similar faces mouse release\n"; - if (mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr selectedFacePtr = mActiveViewport->getSelectedFace(0); - if (selectedFacePtr) - { - DLFLFacePtrArray sfptrarray; - DLFL::selectMatchingFaces(&mObject, selectedFacePtr, sfptrarray); - for (auto sfPtr : sfptrarray) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sfPtr); - sNumSelFaces++; - } - } - } - } - } - else if (mSelectionMask == MainWindow::MaskEdges) - { - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr selectedEdgePtr = mActiveViewport->getSelectedEdge(0); - if (selectedEdgePtr) - { - DLFLEdgePtrArray septrarray; - DLFL::selectMatchingEdges(&mObject, selectedEdgePtr, septrarray); - for (auto sePtr : septrarray) - { - if (!mActiveViewport->isSelected(sePtr)) - { - mActiveViewport->setSelectedEdge(sePtr); - sNumSelEdges++; - } - } - } - } - } - else if (mSelectionMask == MainWindow::MaskVertices) - { - if (mActiveViewport->numSelectedVertices() > 0) - { - DLFLVertexPtr svptr = mActiveViewport->getSelectedVertex(0); - if (svptr) - { - if (!mActiveViewport->isSelected(svptr)) - { - mActiveViewport->setSelectedVertex(svptr); - sNumSelVerts++; - } - DLFLVertexPtrArray svptrarray; - DLFL::selectMatchingVertices(&mObject, svptr, svptrarray); - for (auto svPtr : svptrarray) - { - if (!mActiveViewport->isSelected(svPtr)) - { - mActiveViewport->setSelectedVertex(svPtr); - sNumSelVerts++; - } - } - } - } - } - redraw(); - break; - case SelectFacesByArea: - if (mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - DLFLFacePtrArray sfptrarray; - DLFL::selectFacesByArea(&mObject, sfptr, sfptrarray, MainWindow::sFaceAreaTolerance); - for (auto sfPtr : sfptrarray) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sfPtr); - sNumSelFaces++; - } - } - redraw(); - } - } - break; - case SelectCorner: - if (mActiveViewport->numSelectedCorners() > 0) - { - DLFLFaceVertexPtr fvp = mActiveViewport->getSelectedFaceVertex(0); - fvp->print(); - mActiveViewport->clearSelectedCorners(); - mActiveViewport->clearSelectedFaces(); - sNumSelFaceVerts = 0; // num_sel_faces = 0; - redraw(); - } - break; - case InsertEdge: - // std::cout << "/ners = "<numSelectedCorners() << "\n"; - if (mActiveViewport->numSelectedCorners() >= 2) - { - DLFLFaceVertexPtr sfvptr1, sfvptr2; - sfvptr1 = mActiveViewport->getSelectedFaceVertex(0); - sfvptr2 = mActiveViewport->getSelectedFaceVertex(1); - if (sfvptr1 && sfvptr2) - { - DLFLMaterialPtr mptr = sfvptr1->getFacePtr()->material(); - undoPush(); - setModified(true); -#if WITH_PYTHON - cmd = QString("insertEdge(("); - cmd += QString().setNum(sfvptr1->getFaceID()) + QString(","); - cmd += QString().setNum(sfvptr1->getVertexID()) + QString("),("); - cmd += QString().setNum(sfvptr2->getFaceID()) + QString(","); - cmd += QString().setNum(sfvptr2->getVertexID()) + QString("))"); - emit echoCommand(cmd); - if (Py_IsInitialized()) - { - PyRun_SimpleString("from dlfl import *"); - PyRun_SimpleString(cmd.toLocal8Bit().constData()); - } -#else - DLFL::insertEdge(&mObject, sfvptr1, sfvptr2, false, mptr); -#endif - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - sNumSelFaceVerts = 0; // num_sel_faces = 0; - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - } - } - else if (mActiveViewport->numSelectedCorners() == 1) - { - sNumSelFaceVerts = 1; sNumSelFaces = 1; - } - break; - case DeleteEdge: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - undoPush(); - setModified(true); -#if WITH_PYTHON - cmd = QString("deleteEdge("); - cmd += QString().setNum(septr->getID()) + QString(")"); - emit echoCommand(cmd); -#endif - DLFL::deleteEdge(&mObject, septr, MainWindow::sDeleteEdgeCleanup); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedEdges(); - redraw(); - } - break; - case SubdivideEdge: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - undoPush(); - setModified(true); -#if WITH_PYTHON - cmd = QString("subdivideEdge("); - cmd += QString().setNum(septr->getID()) + QString(")"); - emit echoCommand(cmd); -#endif - DLFL::subdivideEdge(&mObject, sNumEdgeSubdiv, septr); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedEdges(); - redraw(); - } - break; - case CollapseEdge: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - undoPush(); - setModified(true); -#if WITH_PYTHON - cmd = QString("collapseEdge("); - cmd += QString().setNum(septr->getID()) + QString(")"); - emit echoCommand(cmd); -#endif - DLFL::collapseEdge(&mObject, septr); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedEdges(); - redraw(); - } - break; - case SpliceCorners: - if (mActiveViewport->numSelectedCorners() >= 2) - { - DLFLFaceVertexPtr sfvptr1, sfvptr2; - sfvptr1 = mActiveViewport->getSelectedFaceVertex(0); - sfvptr2 = mActiveViewport->getSelectedFaceVertex(1); - if (sfvptr1 && sfvptr2) - { - DLFLMaterialPtr mptr = sfvptr1->getFacePtr()->material(); - undoPush(); - setModified(true); - //object.spliceCorners(sfvptr1,sfvptr2); - DLFL::spliceCorners(&mObject, sfvptr1, sfvptr2); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - sNumSelFaceVerts = 0; sNumSelFaces = 0; - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - } - } - else if (mActiveViewport->numSelectedCorners() == 1) - { - sNumSelFaceVerts = 1; sNumSelFaces = 1; - } - break; - case ConnectFaces: - if (mActiveViewport->numSelectedFaces() >= 2) - { - DLFLFacePtr sfptr1, sfptr2; - sfptr1 = mActiveViewport->getSelectedFace(0); - sfptr2 = mActiveViewport->getSelectedFace(1); - if (sfptr1 && sfptr2) - { - undoPush(); - setModified(true); - DLFL::connectFaces(&mObject, sfptr1, sfptr2, sNumSegments); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->clearSelectedFaces(); - redraw(); - } - } - else if (mActiveViewport->numSelectedFaces() == 1) - { - sNumSelFaces = 1; - } - break; - case ConnectFaceVertices: - if (mActiveViewport->numSelectedCorners() >= 2) - { - DLFLFaceVertexPtr sfvptr1, sfvptr2; - sfvptr1 = mActiveViewport->getSelectedFaceVertex(0); - sfvptr2 = mActiveViewport->getSelectedFaceVertex(1); - if (sfvptr1 && sfvptr2) - { - undoPush(); - setModified(true); - DLFL::connectFaces(&mObject, sfvptr1, sfvptr2, sNumSegments, sMaxSegments); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - sNumSelFaceVerts = 0; sNumSelFaces = 0; - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - } - } - else if (mActiveViewport->numSelectedCorners() == 1) - { - sNumSelFaceVerts = 1; sNumSelFaces = 1; - } - break; - case ConnectEdges: - if (mActiveViewport->numSelectedEdges() >= 2) - { - DLFLEdgePtr septr1, septr2; - DLFLFacePtr sfptr1, sfptr2; - septr1 = mActiveViewport->getSelectedEdge(0); - septr2 = mActiveViewport->getSelectedEdge(1); - sfptr1 = mActiveViewport->getSelectedFace(0); - sfptr2 = mActiveViewport->getSelectedFace(1); - if (septr1 && septr2) - { - undoPush(); - setModified(true); - DLFL::connectEdges(&mObject, septr1, sfptr1, septr2, sfptr2); - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedFaces(); - sNumSelEdges = 0; sNumSelFaces = 0; - redraw(); - } - } - else if (mActiveViewport->numSelectedEdges() == 1) - { - sNumSelEdges = 1; sNumSelFaces = 1; - } - break; - case ExtrudeFace: - if (mSingleClickExtrude) - { - if (mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::extrudeFace(&mObject, sfptr, sExtrudeDist, sNumExtrusions, sExtrudeRot, sExtrudeScale); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - } - break; - case ExtrudeMultipleFaces: - // if (!mExtrudeMultipleAct->isChecked()){ - // if ( active->numSelectedFaces() > 0) - // { - // DLFLFacePtrArray sfptrarr = active->getSelectedFaces(); - // if ( sfptrarr[0] ) - // { - // undoPush(); - // setModified(true); - // for(auto sfPtr : sfptrarr) { - // DLFL::extrudeFace(&object,sfPtr,extrude_dist,num_extrusions,extrude_rot,extrude_scale); - // } - // active->recomputePatches(); - // active->recomputeNormals(); - // } - // active->clearSelectedFaces(); - // redraw(); - // } - // } - break; - case ExtrudeFaceDS: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::extrudeFaceDS(&mObject, sfptr, sExtrudeDist, sNumExtrusions, sDooSabinExtrusionTwist, sExtrudeScale); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case ExtrudeDualFace: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::extrudeDualFace(&mObject, sfptr, sExtrudeDist, sNumExtrusions, sExtrudeRot, sExtrudeScale, sDualMeshEdgesCheck); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case ExtrudeFaceDodeca: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::extrudeFaceDodeca( - &mObject, sfptr, sExtrudeAngle, sNumExtrusions, - sExtrudeLength1, sExtrudeLength2, sExtrudeLength3, - sHexagonalizeDodecaExtrude); - // DLFL::extrudeFaceDodeca(&object,sfptr,extrude_dist,num_extrusions, ds_ex_twist,extrude_scale, hexagonalize_dodeca_extrude); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - - } - break; - case ExtrudeFaceIcosa: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::extrudeFaceIcosa(&mObject, sfptr, sExtrudeAngle_iCosA, sNumExtrusions, sExtrudeLength1_iCosA, sExtrudeLength2_iCosA, sExtrudeLength3_iCosA); - // DLFL::extrudeFaceIcosa(&object,sfptr,extrude_dist,num_extrusions, ds_ex_twist,extrude_scale); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case StellateFace: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::stellateFace(&mObject, sfptr, sExtrudeDist); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case DoubleStellateFace: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::doubleStellateFace(&mObject, sfptr, sExtrudeDist); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case ExtrudeFaceDome: - if (mSingleClickExtrude && mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - undoPush(); - setModified(true); - DLFL::extrudeFaceDome(&mObject, sfptr, sExtrudeDist, sExtrudeRot, sExtrudeScale); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case CrustModeling: - if (mActiveViewport->numSelectedFaces() > 0) - { - DLFLFacePtr sfptr = mActiveViewport->getSelectedFace(0); - if (sfptr) - { - // No undo for hole punching in crust modeling mode - // because the ids in the recreated object - // will be different - if (QApplication::keyboardModifiers() == Qt::ShiftModifier) - { - DLFL::tagMatchingFaces(&mObject, sfptr); - DLFL::punchHoles(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - else - DLFL::cmMakeHole(&mObject, sfptr, sCrustCleanup); - // active->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - } - break; - case BezierConnectFaces: - if (mActiveViewport->numSelectedCorners() >= 2) - { - DLFLFaceVertexPtr sfvptr1 = mActiveViewport->getSelectedFaceVertex(0); - DLFLFaceVertexPtr sfvptr2 = mActiveViewport->getSelectedFaceVertex(1); - if (sfvptr1 != nullptr && sfvptr2 != nullptr) - { - undoPush(); - setModified(true); - DLFL::bezierConnectFaces( - &mObject, sfvptr1, sfvptr2, sNumSegments, sFaceNormalWeight1, sFaceNormalWeight2); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - sNumSelFaceVerts = 0; sNumSelFaces = 0; - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - } - } - else if (mActiveViewport->numSelectedCorners() == 1) - { - sNumSelFaceVerts = 1; sNumSelFaces = 1; - } - break; - case HermiteConnectFaces: - if (mActiveViewport->numSelectedCorners() >= 2) - { - DLFLFaceVertexPtr sfvptr1, sfvptr2; - sfvptr1 = mActiveViewport->getSelectedFaceVertex(0); - sfvptr2 = mActiveViewport->getSelectedFaceVertex(1); - if (sfvptr1 && sfvptr2) - { - undoPush(); - setModified(true); - if (sSymmetricWeights) - DLFL::hermiteConnectFaces(&mObject, sfvptr1, sfvptr2, - sNumSegments, sFaceNormalWeight1, sFaceNormalWeight1, - sMaxSegments, sNumExtraTwists); - else - DLFL::hermiteConnectFaces(&mObject, sfvptr1, sfvptr2, - sNumSegments, sFaceNormalWeight1, sFaceNormalWeight2, - sMaxSegments, sNumExtraTwists); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - sNumSelFaceVerts = 0; sNumSelFaces = 0; - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - } - } - else if (mActiveViewport->numSelectedCorners() == 1) - { - sNumSelFaceVerts = 1; sNumSelFaces = 1; - } - break; - case ReorderFace: - if (mActiveViewport->numSelectedCorners() > 0) - { - DLFLFaceVertexPtr sfvptr = mActiveViewport->getSelectedFaceVertex(0); - if (sfvptr) sfvptr->getFacePtr()->reorder(sfvptr); - redraw(); - } - break; - case SubdivideFace: - case MultiSelectFace: - // num_sel_faces++; - break; - case MultiSelectEdge: - break; - case MultiSelectVertex: - break; - case MultiSelectCorner: - break; - //from ozgur - // case CutEdge : - // if ( active->numSelectedEdges() > 0 ) - // { - // DLFLEdgePtr septr = active->getSelectedEdge(0); - // if ( septr ) - // { - // undoPush(); - // septr->isMarked = 1- septr->isMarked; - // // DLFL::cutEdge( &object, septr, peelDistance_factor,pnormalBendS_factor,pnormalBendT_factor, peel_all_edges); - // } - // active->clearSelectedEdges(); - // redraw(); - // } - // break; - case TruncateEdge: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - undoPush(); - septr->isMarked = !septr->isMarked; - // DLFL::cutEdge( &object, septr, peelDistance_factor,pnormalBendS_factor,pnormalBendT_factor, peel_all_edges); - } - mActiveViewport->clearSelectedEdges(); - redraw(); - } - break; - case CutVertex: - if (mActiveViewport->numSelectedVertices() > 0) - { - DLFLVertexPtr svptr = mActiveViewport->getSelectedVertex(0); - if (svptr) - { - undoPush(); - svptr->isMarked = !svptr->isMarked; - } - // active->clearSelectedVertices(); - redraw(); - } - break; - case CutEdgeandVertex: - if (mActiveViewport->numSelectedVertices() > 0 && - mActiveViewport->numSelectedEdges() > 0) - { - DLFLVertexPtr svptr = mActiveViewport->getSelectedVertex(0); - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - if (svptr) - { - undoPush(); - septr->isMarked = !septr->isMarked; - // DLFL::cutEdge( &object, septr, peelDistance_factor,pnormalBendS_factor,pnormalBendT_factor, peel_all_edges); - } - } - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedVertices(); - redraw(); - } - break; - case MarkEdge: - if (mActiveViewport->numSelectedEdges() > 0) - { - DLFLEdgePtr septr = mActiveViewport->getSelectedEdge(0); - if (septr) - { - undoPush(); - septr->isMarked = !septr->isMarked; - } - mActiveViewport->clearSelectedEdges(); - redraw(); - } - break; - case MarkVertex: - if (mActiveViewport->numSelectedVertices() > 0) - { - DLFLVertexPtr svptr = mActiveViewport->getSelectedVertex(0); - if (svptr) - { - undoPush(); - svptr->isMarked = !svptr->isMarked; - } - mActiveViewport->clearSelectedVertices(); - redraw(); - } - break; - case CutFace: - // if ( active->numSelectedFaces() > 0 ) - // { - // DLFLFacePtr sfptr = active->getSelectedFace(0); - // if ( sfptr ) - // { - // undoPush(); - // sfptr->isMarked = 1 - sfptr->isMarked; - // } - // active->clearSelectedFaces(); - // redraw(); - // } - break; - case SelectionWindow: - mActiveViewport->hideSelectionWindow(); - - break; - }//end switch (mode) - - } - else - { - event->ignore(); - } -}//end function mousereleaseevent - - -void MainWindow::testConvexHull(void) -{ - // For testing convex hull subroutine - // Vector3dArray vertices; - // vertices.resize(8); - // vertices[0].set(0,0,0); - // vertices[1].set(0,10,0); - // vertices[2].set(10,10,0); - // vertices[3].set(10,0,0); - // vertices[4].set(0,0,10); - // vertices[5].set(0,10,10); - // vertices[6].set(10,10,10); - // vertices[7].set(10,0,10); - // DLFLConvexHull convexhull; - // convexhull.createHull(vertices); - // - // ofstream file; - // file.open("convexhull.dlfl"); - // convexhull.writeDLFL(file); - // file.close(); -} - -void MainWindow::performRemeshing(void) -{ - setModified(true); - - switch (mRemeshingScheme) - { - case Dual: - createDual(); - break; - case Root3: - subdivideRoot3(); - break; - case Triangulate: - triangulate(); - break; - case DualVertexTrunc: - subdivideSqrt3(); - break; - case GlobalStellate: - globalStellate(); - break; - case Star: - subdivideStar(); - break; - case Generic1264: - subdivide1264(); - break; - case Honeycomb: - subdivideHoneycomb(); - break; - case VertexTrunc: - subdivideVertexCutting(); - break; - case DualGeneric1264: - subdivideDual1264(); - break; - case LinearVertexInsertion: - subdivideLinearVertexInsertion(); - break; - case CatmullClark: - subdivideCatmullClark(); - break; - case ModifiedStellate: - subStellate1(); - break; - case DooSabin: - subdivideDooSabin(); - break; - case CornerCutting: - subdivideCornerCutting(); - break; - case ModifiedCornerCutting: - subdivideModifiedCornerCutting(); - break; - case Simplest: - subdivideSimplest(); - break; - case Pentagonal: - subdividePentagonal(); - break; - case CubicPentagonal: - subdivideCubicPentagonal(); - break; - case DualPentagonal: - subdivideDualPentagonal(); - break; - case LoopStyle: - subdivideLoopStyle(); - break; - case Loop: - subdivideLoop(); - break; - case Root4: - subdivideRoot4(); - break; - case DualLoop: - subdivideDualLoop(); - break; - case GlobalCubicExtrude: - // cout << "NOT YET IMPLEMENTED!!!" << endl; - break; - case CheckerBoard: - subdivideCheckerBoard(); - break; - case DualGlobalCubicExtrude: - // cout << "NOT YET IMPLEMENTED!!!" << endl; - break; - case DualCheckerBoard: - subdivideDualCheckerBoard(); - break; - case PentagonPreserving: - subdividePentagonPreserving(); - break; - case DualPentagonPreserving: - subdivideDualPentagonPreserving(); - break; - case HexagonPreserving: - subdivideRoot4(); - break; - case DualHexagonPreserving: - subdivideDualHexagonPreserving(); - break; - case Fractal: - subdivideFractal(); - break; - case ModifiedDoubleStellate: - subStellate2(); - break; - case Dome: - subdivideDome(); - break; - case DooSabinBC: - subdivideDooSabinBC(); - break; - case DooSabinBCNew: - subdivideDooSabinBCNew(); - break; - } - setMode(mOperationMode); - redraw(); -} - -void MainWindow::performExtrusion() -{ - if ( mActiveViewport->numSelectedFaces() < 1 ) - { - return; - } - - DLFLFacePtrArray& sfptrarr = mActiveViewport->getSelectedFaces(); - if (sfptrarr[0]) - { - undoPush(); - setModified(true); - for (auto sfPtr : sfptrarr) - { - switch (mExtrusionMode) - { - case DooSabinExtrude: - DLFL::extrudeFaceDS(&mObject, sfPtr, sExtrudeDist, sNumExtrusions, sDooSabinExtrusionTwist, sExtrudeScale); - break; - case CubicalExtrude: - DLFL::extrudeFace(&mObject, sfPtr, sExtrudeDist, sNumExtrusions, sExtrudeRot, sExtrudeScale); - break; - // case IcosahedralExtrude: DLFL::extrudeFaceIcosa(&object,sfPtr,extrude_dist,num_extrusions, ds_ex_twist,extrude_scale); - case IcosahedralExtrude: - // std::cout<< extrude_angle_icosa << "\t" << num_extrusions << "\t" << extrude_length1_icosa << "\t" << extrude_length2_icosa << "\t" << extrude_length3_icosa <<"\n"; - DLFL::extrudeFaceIcosa(&mObject, sfPtr, sExtrudeAngle_iCosA, sNumExtrusions, sExtrudeLength1_iCosA, sExtrudeLength2_iCosA, sExtrudeLength3_iCosA); - // DLFL::extrudeFaceCubOcta(&object, sfPtr, extrude_angle_icosa,num_extrusions, extrude_length1_icosa,extrude_length2_icosa,extrude_length3_icosa); - break; - // DLFLFacePtr extrudeFaceDodeca(DLFLObjectPtr obj, DLFLFacePtr fptr, double angle, int num, double ex_dist1, double ex_dist2, double ex_dist3, bool hexagonalize); - case DodecahedralExtrude: - DLFL::extrudeFaceDodeca(&mObject, sfPtr, sExtrudeAngle, sNumExtrusions, sExtrudeLength1, sExtrudeLength2, sExtrudeLength3, sHexagonalizeDodecaExtrude); - // case DodecahedralExtrude: DLFL::extrudeFaceDodeca(&object,sfPtr,extrude_dist,num_extrusions, ds_ex_twist,extrude_scale, hexagonalize_dodeca_extrude); - // DLFL::extrudeFaceSmallRhombiCubOcta(&object,sfPtr,extrude_angle,num_extrusions, extrude_length1,extrude_length2,extrude_length3); - break; - case OctahedralExtrude: - DLFL::extrudeDualFace(&mObject, sfPtr, sExtrudeDist, sNumExtrusions, sExtrudeRot, sExtrudeScale, sDualMeshEdgesCheck); - break; - case StellateExtrude: - DLFL::stellateFace(&mObject, sfPtr, sExtrudeDist); - break; - case DoubleStellateExtrude: - DLFL::doubleStellateFace(&mObject, sfPtr, sExtrudeDist); - break; - case DomeExtrude: - DLFL::extrudeFaceDome(&mObject, sfPtr, sDomeExtrudeLengthFactor, sDomeExtrudeRotationFactor, sDomeExtrudeScaleFactor); - break; - default: - DLFL::extrudeFace(&mObject, sfPtr, sExtrudeDist, sNumExtrusions, sExtrudeRot, sExtrudeScale); - break; - }; - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); -} - -// Change the renderer for all viewports -void MainWindow::setRenderer(DLFLRendererPtr rp) -{ - mActiveViewport->setRenderer(rp); -} - -// Return pointer to the active GLWidget -GLWidget *MainWindow::getActive() -{ - return mActiveViewport; -} - -// Override redraw() method to mark subwindows also for redraw -void MainWindow::redraw() -{ - mActiveViewport->redraw(); -} - -//--- Methods to perform various operations ---// - -// Switch to specified operating mode -void MainWindow::setMode(Mode m) -{ - mOperationMode = m; - - switch (mOperationMode) - { - /*case BezierMode: // brianb - object.bezierDefaults(); - break;*/ - case EditVertex: // brianb - case SelectVertex: - case MultiSelectVertex: - case CutVertex: - case MarkVertex: - setSelectionMask(MainWindow::MaskVertices); - MainWindow::sNumSelVerts = 0; - break; - case SelectEdge: - case SelectEdgeLoop: - case SelectEdgeRing: - case MultiSelectEdge: - case DeleteEdge: - case SubdivideEdge: - case CollapseEdge: - case ConnectEdges: - case CutEdge: - case TruncateEdge: - case MarkEdge: - setSelectionMask(MainWindow::MaskEdges); - // MainWindow::num_sel_edges = 0; - break; - case SelectFace: - case SelectFaceLoop: - case MultiSelectFace: - case SelectCheckerboard: - case ExtrudeFace: - case ExtrudeFaceDS: - case ExtrudeDualFace: - case ExtrudeFaceDodeca: - case ExtrudeFaceIcosa: - case ExtrudeMultipleFaces: - case StellateFace: - case DoubleStellateFace: - case ExtrudeFaceDome: - case ConnectFaces: - case ReorderFace: - case SubdivideFace: - case CrustModeling: - case CutFace: - case SelectFacesByArea: - case SelectFacesByColor: - case PaintFace: - case EyeDropper: - setSelectionMask(MainWindow::MaskFaces); - // MainWindow::num_sel_faces = 0; - break; - case SelectSimilar: - //do nothing... - break; - /*case SelectSimilar: - { - switch (selectionmask) - { - case MaskEdges: - break; - case MaskFaces: - break; - case MaskVertices: - - break; - default: - break; - }; - break; - }*/ - case SelectCorner: - case MultiSelectCorner: - case InsertEdge: - case SpliceCorners: - case ConnectFaceVertices: - case BezierConnectFaces: - case HermiteConnectFaces: - setSelectionMask(MainWindow::MaskCorners); - // MainWindow::num_sel_faceverts = 0; - break; - case SelectionWindow: - // set - break; - case NormalMode: - setSelectionMask(MainWindow::MaskNone); - default: - // Nothing to be done for other modes except clearing selection lists - setSelectionMask(MainWindow::MaskNone); - // MainWindow::clearSelected(); - break; - } - // if (mode != MultiSelectFace) - // active->hideBrush(); - // else active->showBrush(); - - QString s; - //this switch statement is for setting the string for the Heads up display - switch (mOperationMode) - { - case NormalMode: s = tr("Normal Mode"); - break; - case SelectVertex: s = tr("Select Vertex"); - break; - case SelectEdge: s = tr("Select Edge"); - break; - case SelectFace: s = tr("Select Face"); - break; - case SelectCorner: s = tr("Select Corner"); - break; - case MultiSelectVertex: s = tr("Multi-Select Vertex"); - break; - case MultiSelectEdge: s = tr("Multi-Select Edge"); - break; - case MultiSelectFace: s = tr("Multi-Select Face"); - break; - case MultiSelectCorner: s = tr("Multi-Select Corner"); - break; - case SelectCheckerboard: s = tr("Select Checkerboard"); - break; - case InsertEdge: s = tr("Insert Edge"); - break; - case DeleteEdge: s = tr("Delete Edge"); - break; - case SubdivideEdge: s = tr("Subdivide Edge"); - break; - case CollapseEdge: s = tr("Collapse Edge"); - break; - case SpliceCorners: s = tr("Splice Corners"); - break; - case ConnectEdges: s = tr("Connect Edges"); - break; - case ExtrudeFace: s = tr("Cubical Extrusion"); - break; - case ExtrudeFaceDS: s = tr("Doo Sabin Extrusion"); - break; - case ExtrudeDualFace: s = tr("Dual Extrusion"); - break; - case ExtrudeFaceDodeca: s = tr("Dodecahedral Extrusion"); - break; - case ExtrudeFaceIcosa: s = tr("Icosahedral Extrusion"); - break; - case ExtrudeMultipleFaces: s = tr("Extrude Multiple Faces"); - break; - case StellateFace: s = tr("Stellate Face"); - break; - case DoubleStellateFace: s = tr("Double Stellate Face"); - break; - case ExtrudeFaceDome: s = tr("Dome Extrusion"); - break; - case ConnectFaceVertices: s = tr("Connect Corners"); - break; - case ConnectFaces: s = tr("Connect Faces"); - break; - case BezierConnectFaces: s = tr("Bezier Connect Faces"); - break; - case HermiteConnectFaces: s = tr("Hermite Connect Faces"); - break; - case ReorderFace: s = tr("Reorder Face"); - break; - case SubdivideFace: s = tr("Subdivide Face"); - break; - case CrustModeling: s = tr("Crust Modeling"); - break; - case CutEdge: s = tr("Cut Edge"); - break; - case CutVertex: s = tr("Cut Vertex"); - break; - case CutEdgeandVertex: s = tr("Cut Edge and Vertex"); - break; - case CutFace: s = tr("Cut Face"); - break; - case TruncateEdge: s = tr("Truncate Edge"); - break; - case MarkEdge: s = tr("Mark Edge"); - break; - case MarkVertex: s = tr("Mark Vertex"); - break; - case ConvexHullMode: s = tr("Convex Hull Mode"); - break; - case EditVertex: s = tr("Edit Vertex"); - break; - case SelectEdgeLoop: s = tr("Select Edge Loop"); - break; - case SelectEdgeRing: s = tr("Select Edge Ring"); - break; - case SelectFaceLoop: s = tr("Select Face Loop"); - break; - case SelectSimilar: s = tr("Select Similar"); - break; - case SelectFacesByArea: s = tr("Select Faces By Surf. Area"); - break; - case SelectionWindow: s = tr("Selection Window"); - break; - default: s = tr("-"); - break; - } - mActiveViewport->setModeString(s); - redraw(); -} - -void MainWindow::setExtrusionMode(ExtrusionMode mode){ - mExtrusionMode = mode; - QString modeStr; - switch(mode){ - case DooSabinExtrude: - modeStr = "Doo Sabin"; - break; - case CubicalExtrude: - modeStr = "Cubical"; - break; - case DodecahedralExtrude: - modeStr = "Dodecahedral"; - break; - case IcosahedralExtrude: - modeStr = "Icosahedral"; - break; - case OctahedralExtrude: - modeStr = "Octahedral"; - break; - // case Dual: - // break; - case StellateExtrude: - modeStr = "Stellate"; - break; - case DoubleStellateExtrude: - modeStr = "Double Stellate"; - break; - case DomeExtrude: - modeStr = "Dome"; - break; - default: - break; - } - mActiveViewport->setExtrusionModeString(modeStr); -} - -void MainWindow::setSelectionMask(SelectionMask mask) -{ - if (mSelectionMask == mask) - { - return; - } - - mSelectionMask = mask; - // active->clearSelected(); - mActiveViewport->repaint(); - //make sure we clear all other selected objects here... - switch (mSelectionMask) - { - case MaskVertices: - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - // mSelectVerticesMaskAct->activate(QAction::Trigger); - mSelectVerticesMaskAct->setChecked(true); - mSelectEdgesMaskAct->setChecked(false); - mSelectFacesMaskAct->setChecked(false); - mSelectCornersMaskAct->setChecked(false); - mActiveViewport->setSelectionMaskString(tr("Vertices")); - break; - case MaskEdges: - mActiveViewport->clearSelectedVertices(); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedCorners(); - // mSelectEdgesMaskAct->activate(QAction::Trigger); - mSelectVerticesMaskAct->setChecked(false); - mSelectEdgesMaskAct->setChecked(true); - mSelectFacesMaskAct->setChecked(false); - mSelectCornersMaskAct->setChecked(false); - mActiveViewport->setSelectionMaskString(tr("Edges")); - break; - case MaskFaces: - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedVertices(); - mActiveViewport->clearSelectedCorners(); - // mSelectFacesMaskAct->activate(QAction::Trigger); - mSelectVerticesMaskAct->setChecked(false); - mSelectEdgesMaskAct->setChecked(false); - mSelectFacesMaskAct->setChecked(true); - mSelectCornersMaskAct->setChecked(false); - mActiveViewport->setSelectionMaskString(tr("Faces")); - break; - case MaskCorners: - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedFaces(); - mActiveViewport->clearSelectedVertices(); - // mSelectCornersMaskAct->activate(QAction::Trigger); - mSelectVerticesMaskAct->setChecked(false); - mSelectEdgesMaskAct->setChecked(false); - mSelectFacesMaskAct->setChecked(false); - mSelectCornersMaskAct->setChecked(true); - mActiveViewport->setSelectionMaskString(tr("Corners")); - break; - default: - mActiveViewport->clearSelectedEdges(); - mActiveViewport->clearSelectedVertices(); - mActiveViewport->clearSelectedCorners(); - mActiveViewport->clearSelectedFaces(); - mSelectVerticesMaskAct->setChecked(false); - mSelectEdgesMaskAct->setChecked(false); - mSelectFacesMaskAct->setChecked(false); - mSelectCornersMaskAct->setChecked(false); - mActiveViewport->setSelectionMaskString(tr("None")); - - break; - } -} - -void MainWindow::setRemeshingScheme(RemeshingScheme scheme) -{ - mRemeshingScheme = scheme; - QString s; - - switch (mRemeshingScheme) - { - case Dual: - s = tr("Dual"); - break; - case Root3: - s = tr("Root-3"); - break; - case DualVertexTrunc: - s = tr("Dual Vertex Truncation"); - break; - case GlobalStellate: - s = tr("Global Stellate"); - break; - case Star: - s = tr("Star"); - break; - case Generic1264: - s = tr("Generic 12.6.4"); - break; - case Honeycomb: - s = tr("Honeycomb"); - break; - case VertexTrunc: - s = tr("Vertex Truncation"); - break; - case DualGeneric1264: - s = tr("Dual Generic 12.6.4"); - break; - case LinearVertexInsertion: - s = tr("Linear Vertex Truncation"); - break; - case CatmullClark: - s = tr("Catmull-Clark"); - break; - case ModifiedStellate: - s = tr("Modified Stellate"); - break; - case DooSabin: - s = tr("Doo Sabin"); - break; - case CornerCutting: - s = tr("Corner Cutting"); - break; - case ModifiedCornerCutting: - s = tr("Modified Corner Cutting"); - break; - case Simplest: - s = tr("Simplest"); - break; - case Pentagonal: - s = tr("Pentagonal"); - break; - case CubicPentagonal: - s = tr("Cubic Pentagonal"); - break; - case DualPentagonal: - s = tr("Dual Pentagonal"); - break; - case LoopStyle: - s = tr("Loop Style"); - break; - case Loop: - s = tr("Loop"); - break; - case Root4: - s = tr("Root4"); - break; - case DualLoop: - s = tr("Dual Loop"); - break; - case GlobalCubicExtrude: - s = tr("Global Cubic Extrude"); - break; - case CheckerBoard: - s = tr("Checkerboard"); - break; - case DualGlobalCubicExtrude: - s = tr("Dual Global Cubic Extrude"); - break; - case DualCheckerBoard: - s = tr("Dual Checkerboard"); - break; - case PentagonPreserving: - s = tr("Pentagon Preserving"); - break; - case DualPentagonPreserving: - s = tr("Dual Pentagon Preserving"); - break; - case HexagonPreserving: - s = tr("Hexagon Preserving"); - break; - case DualHexagonPreserving: - s = tr("Dual Hexagon Preserving"); - break; - case Fractal: - s = tr("Fractal"); - break; - case ModifiedDoubleStellate: - s = tr("Modified Double Stellate"); - break; - case Dome: - s = tr("Dome"); - break; - case DooSabinBC: - s = tr("Doo Sabin BC"); - break; - case DooSabinBCNew: - s = tr("Doo Sabin BC New"); - break; - default: s = tr("None"); - break; - } - mActiveViewport->setRemeshingSchemeString(s); -} - -// Read the DLFL object from a file -void MainWindow::readObject(const char * filename, const char *mtlfilename) -{ - mActiveViewport->clearSelected(); - ifstream file, mtlfile; - file.open(filename); - mtlfile.open(mtlfilename); - - if (strstr(filename, ".dlfl") || strstr(filename, ".DLFL")) - mObject.readDLFL(file, mtlfile); - else if (strstr(filename, ".obj") || strstr(filename, ".OBJ")) - mObject.readObject(file, mtlfile); - file.close(); -} - -// Read the DLFL object from a file -void MainWindow::readObjectQFile(const QString &filename) -{ - mActiveViewport->clearSelected(); - QFile file(filename); - file.open(QIODevice::ReadOnly | QIODevice::Text); - - QByteArray ba = file.readAll(); - const char *filecontents = ba.data(); - string str(filecontents); - istringstream filestring(str); - - ifstream mtlfile; - // mtlfile = 0; - - if (filename.endsWith(".dlfl", Qt::CaseInsensitive)) - mObject.readDLFL(filestring, mtlfile); - else if (filename.endsWith(".obj", Qt::CaseInsensitive)) - mObject.readObject(filestring, mtlfile); - file.close(); - -#ifdef WITH_PYTHON - DLFLObjectPtr obj = &mObject; - if (obj) - emit loadedObject(obj, filename); -#endif - mActiveViewport->createPatchObject(); - - // std::cout << "readObjectQFile end\n"; -} - -// Read the DLFL object from a file - use alternate OBJ reader for OBJ files -void MainWindow::readObjectAlt(const char * filename) -{ - // active->clearSelected(); - // ifstream file; - // file.open(filename); - // if ( strstr(filename,".dlfl") || strstr(filename,".DLFL") ) - // object.readDLFL(file); - // else if ( strstr(filename,".obj") || strstr(filename,".OBJ") ) - // object.readObjectAlt(file); - // file.close(); -} - -// Write the DLFL object to a file -void MainWindow::writeObject( - const char * filename, const char* mtlfilename, - bool with_normals, bool with_tex_coords) -{ - ofstream file; - ofstream mtlfile; - file.open(filename); - mtlfile.open(mtlfilename); - - std::cout << mtlfilename << " = mtlfilename in writeObject function\n"; - - if (strstr(filename, ".dlfl") || strstr(filename, ".DLFL")) - { - mObject.writeDLFL(file, mtlfile); - } - else if (strstr(filename, ".obj") || strstr(filename, ".OBJ")) - { - mObject.writeObject(file, mtlfile, with_normals, with_tex_coords); - } - file.close(); - mtlfile.close(); -} - -// Write the DLFL object to a file -void MainWindow::writeMTL(const char * filename) -{ - ofstream file; - file.open(filename); - mObject.writeMTL(file); - file.close(); -} - -/* stuart - bezier export */ -void MainWindow::writePatchOBJ(const char *filename) -{ - if (mActiveViewport->patchobject() != nullptr) - { - ofstream file; - file.open(filename); - mActiveViewport->patchobject()->objPatchWrite(file); - } -} - -/* dave - lg3d export */ -void MainWindow::writeLG3d(const char *filename, bool selected) -{ - // if( active->patchobject() != nullptr ) { - ofstream file; - file.open(filename); - mObject.writeLG3d(file, selected); - file.close(); - // } -} - -/* dave - lg3d export */ -void MainWindow::writeSTL(const char *filename) -{ - ofstream file; - file.open(filename); - mObject.writeSTL(file); - file.close(); -} - -// void MainWindow::writeObjectDLFL(const char * filename) { -// ofstream file; -// file.open(filename); -// object.writeDLFL(file); -// file.close(); -// } - -// File handling -void MainWindow::openFile(void) -{ - QString fileName = QFileDialog::getOpenFileName( - this, tr("Open File..."), mSaveDirectory, - tr("All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!fileName.isEmpty()) - { - if (!mCurFilename.isEmpty()) - { - undoPush(); - setModified(false); - } - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - mWasPrimitive = false; - mIsPrimitive = false; - - mSaveDirectory = QFileInfo(fileName).absoluteDir().absolutePath(); - QByteArray ba2 = mSaveDirectory.toLatin1(); - const char *dirname = ba2.data(); - mObject.setDirname(dirname); - - QString mtlfile = mSaveDirectory + "/" + QFileInfo(fileName).baseName() + ".mtl"; - QByteArray ba3 = mtlfile.toLatin1(); - const char *mtlfilename = ba3.data(); - - setCurrentFile(fileName); - std::cout << "filename for DLFL reading = " << filename << endl; - readObject(filename, mtlfilename); - -#ifdef WITH_PYTHON - // Emit and send to python script editor - DLFLObjectPtr obj = &mObject; - if (obj) - emit loadedObject(obj, fileName); -#endif - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); - } -} - -bool MainWindow::saveFile(bool with_normals, bool with_tex_coords) -{ - if (mCurFilename != "untitled") - { - statusBar()->showMessage(tr("Saving File..."), 3000); - QString curFileTemp(mCurFilename); - - if (!mCurFilename.isEmpty()) - { - if (mIncrementalSave) - { - if (sIncrementalSaveCount >= mIncrementalSaveMax) - { - //go back to zero, start overwriting files... - sIncrementalSaveCount = 0; - //insert 00 at the end of hte name before the last dot - if (curFileTemp.lastIndexOf(".") > -1) - curFileTemp.insert(curFileTemp.lastIndexOf("."), "000"); - else curFileTemp.append("000"); - } - else - { - //add the leading zeros for numbers less than 10 - QString t; - if (sIncrementalSaveCount < 10) - t = QString("00%1").arg(sIncrementalSaveCount); - else t = QString("0%1").arg(sIncrementalSaveCount); - curFileTemp.insert(curFileTemp.lastIndexOf("."), t); - } - } - //add in the directory name - QString fullpath = mSaveDirectory + "/" + curFileTemp; - QByteArray ba = fullpath.toLatin1(); - const char *filename = ba.data(); - - //materials test dave 11.07 - QString mtlFileName = fullpath; - mtlFileName.replace(QString(".obj"), QString(".mtl"), Qt::CaseInsensitive); - mtlFileName.replace(QString(".dlfl"), QString(".mtl"), Qt::CaseInsensitive); - QByteArray ba2 = mtlFileName.toLatin1(); - const char *mtlfilename = ba2.data(); - // writeMTL(mtlfilename); - - writeObject(filename, mtlfilename, with_normals, with_tex_coords); - - - if (mIncrementalSave) - sIncrementalSaveCount++; - setModified(false); - // statusBar()->clearMessage(); - return true; - } - else - { - QString fileName = QFileDialog::getSaveFileName( - this, tr("Save File As..."), - mSaveDirectory + "/" + curFileTemp, - tr("All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!fileName.isEmpty()) - { - //for incremental save test - dave - sIncrementalSaveCount = 0; - if (mIncrementalSave) - { - //insert 000's - std::cout << fileName.toLatin1().data() << "\n"; - if (fileName.lastIndexOf(".") > -1) - fileName.insert(fileName.lastIndexOf("."), "000"); - else fileName.append("000"); - } - - if (!fileName.endsWith(".obj", Qt::CaseInsensitive) || - !fileName.endsWith(".dlfl", Qt::CaseInsensitive)) - fileName.append(".obj"); - setCurrentFile(fileName); - - mSaveDirectory = QFileInfo(fileName).absoluteDir().absolutePath(); - mPreferencesDialog->setSaveDirectory(mSaveDirectory); - - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - - //materials test dave 11.07 - QString mtlFileName = fileName; - mtlFileName.replace(QString(".obj"), QString(".mtl"), Qt::CaseInsensitive); - mtlFileName.replace(QString(".dlfl"), QString(".mtl"), Qt::CaseInsensitive); - QByteArray ba2 = mtlFileName.toLatin1(); - const char *mtlfilename = ba2.data(); - // writeMTL(mtlfilename); - - writeObject(filename, mtlfilename, with_normals, with_tex_coords); - - - if (mIncrementalSave) - sIncrementalSaveCount++; - setModified(false); - // statusBar()->clearMessage(); - return true; - } - } - } - // statusBar()->clearMessage(); - return false; -} - -bool MainWindow::saveFileAs(bool with_normals, bool with_tex_coords) -{ - - statusBar()->showMessage(tr("Saving File...")); - - QString fileName = QFileDialog::getSaveFileName( - this, tr("Save File As..."), - mSaveDirectory + "/" + mCurFilename, - tr("All Supported Files (*.obj *.dlfl);;Wavefront OBJ Files (*.obj);;DLFL Files (*.dlfl);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!fileName.isEmpty()) - { - //reset the incremental save count no matter what...? - sIncrementalSaveCount = 0; - if (mIncrementalSave) - { - //account for leading zeros for digits 0-9 - if (fileName.lastIndexOf(".") > -1) - fileName.insert(fileName.lastIndexOf("."), "000"); - else fileName.append("000"); - } - if (!fileName.endsWith(".obj", Qt::CaseInsensitive) || - !fileName.endsWith(".dlfl", Qt::CaseInsensitive)) - fileName.append(".dlfl"); - setCurrentFile(fileName); - - mSaveDirectory = QFileInfo(fileName).absoluteDir().absolutePath(); - mPreferencesDialog->setSaveDirectory(mSaveDirectory); - - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - - //materials test dave 11.07 - QString mtlFileName = fileName; - mtlFileName.replace(QString(".obj"), QString(".mtl"), Qt::CaseInsensitive); - mtlFileName.replace(QString(".dlfl"), QString(".mtl"), Qt::CaseInsensitive); - QByteArray ba2 = mtlFileName.toLatin1(); - const char *mtlfilename = ba2.data(); - // writeMTL(mtlfilename); - - writeObject(filename, mtlfilename, with_normals, with_tex_coords); - - if (mIncrementalSave) - sIncrementalSaveCount++; - - statusBar()->clearMessage(); - return true; - } - statusBar()->clearMessage(); - return false; -} - -void MainWindow::setCurrentFile(const QString &fileName) -{ - - mCurFilename = QFileInfo(fileName).fileName(); - - //dir name for mtl loading...??? dave 11.07 - QString dirName = QFileInfo(fileName).absolutePath(); - QByteArray ba2 = dirName.toLatin1(); - const char *dirname = ba2.data(); - mObject.setDirname(dirname); - - //base file name for the mtllib thing... - QString baseName = QFileInfo(fileName).baseName(); - QByteArray ba = baseName.toLatin1(); - const char *filename = ba.data(); - mObject.setFilename(filename); - - QString shownName; - if (mCurFilename.isEmpty()) - shownName = "untitled.obj"; - else - shownName = mCurFilename; - - setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("TopMod"))); - setModified(false); -} - - -/* stuart - bezier export */ -bool MainWindow::saveFileBezierOBJ() -{ - QString fileName = QFileDialog::getSaveFileName( - this, tr("Save Bezier Patch (OBJ)..."), - mSaveDirectory + "/" + mCurFilename, - tr("Wavefront OBJ Files (*.obj);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!fileName.isEmpty()) - { - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - writePatchOBJ(filename); - return true; - } - return false; -} - -/* dave - lg3d export */ -bool MainWindow::saveFileLG3d() -{ - QString fileName = QFileDialog::getSaveFileName( - this, tr("Export to LiveGraphics3D (M)..."), - mSaveDirectory + "/" + mCurFilename, - tr("Mathematica Graphics3D Files (*.m);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - if (!fileName.isEmpty()) - { - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - writeLG3d(filename, false); - return true; - } - return false; -} - -bool MainWindow::saveFileLG3dSelected() -{ - QString fileName = QFileDialog::getSaveFileName( - this, tr("Export Selected Faces to LiveGraphics3D (M)..."), - mSaveDirectory + "/" + mCurFilename, - tr("Mathematica Graphics3D Files (*.m);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - if (!fileName.isEmpty()) - { - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - writeLG3d(filename, true); - return true; - } - return false; -} - -/* dave - stl export */ -bool MainWindow::saveFileSTL() -{ - -//triangulate the mesh first - this isn't the best solution but will work for now. -// globalStellate(); -//testing out a custom triangulate function - triangulate(); - - QString fileName = QFileDialog::getSaveFileName( - this, tr("Export STL..."), - mSaveDirectory + "/" + mCurFilename, - tr("STL Files (*.stl);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - if (!fileName.isEmpty()) - { - QByteArray ba = fileName.toLatin1(); - const char *filename = ba.data(); - writeSTL(filename); - return true; - } - return false; -} - -/* dave - png opengl viewport screenshot export */ -bool MainWindow::viewportScreenshot() -{ - // viewportPixmap = QPixmap::grabWidget(active,0,0,active->width(),active->height()); - // viewportPixmap = QPixmap::grabWindow(active->winId(),/*mapToGlobal(active->pos()).x()*/0,/*mapToGlobal(active->pos()).y()*/0,active->width(),active->height()); - QImage image = mActiveViewport->grabFrameBuffer(true); - QString format = "png"; - QString initialPath = mSaveDirectory + tr("/untitled.") + format; - - QString fileName = QFileDialog::getSaveFileName( - this, tr("Save Viewport Screenshot As"), - initialPath, - tr("%1 Files (*.%2);;All Files (*)").arg(format.toUpper()).arg(format), - 0, QFileDialog::DontUseSheet); - if (!fileName.isEmpty()) - { - image.save(fileName, format.toLatin1()); - return true; - } - return false; -} - -bool MainWindow::appScreenshot() -{ - // appPixmap = QPixmap::grabWidget(this); - mAppPixmap = QPixmap::grabWindow(this->winId()); - - QString format = "png"; - QString initialPath = mSaveDirectory + tr("/untitled.") + format; - - QString fileName = QFileDialog::getSaveFileName( - this, tr("Save App Screenshot As"), initialPath, - tr("%1 Files (*.%2);;All Files (*)").arg(format.toUpper()).arg(format), - 0, QFileDialog::DontUseSheet); - if (!fileName.isEmpty()) - { - mAppPixmap.save(fileName, format.toLatin1()); - return true; - } - return false; -} - -void MainWindow::loadCube() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("cube.obj")); - readObjectQFile(":/cube.obj"); - - //iterate through faces and color them red... just to test the renderer out... - // DLFLFacePtrArray fparray; - // object.getFaces(fparray); - // for (auto fPtr : fparray){ - // fPtr->material()->setColor(1.0,0.0,0.0); - // }//end for loop - - - - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -void MainWindow::loadOctahedron() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("octahedron.obj")); - readObjectQFile(":/octahedron.obj"); - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -void MainWindow::loadTetrahedron() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("tetrahedron.obj")); - readObjectQFile(":/tetrahedron.obj"); - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -void MainWindow::loadDodecahedron() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("dodecahedron.obj")); - readObjectQFile(":/dodecahedron.obj"); - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -void MainWindow::loadIcosahedron() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("icosahedron.obj")); - readObjectQFile(":/icosahedron.obj"); - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -void MainWindow::loadSoccerball() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("soccerball.obj")); - readObjectQFile(":/soccerball.obj"); - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -void MainWindow::loadGeodesic() -{ - if (isModified()) - undoPush(); - setModified(false); - mIsPrimitive = true; - mWasPrimitive = true; - setCurrentFile(tr("geodesic.obj")); - readObjectQFile(":/geodesic.obj"); - //active->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->redraw(); -} - -bool MainWindow::isModified() -{ - return mIsModified; -} - -void MainWindow::setModified(bool isModified) -{ - mIsModified = isModified; - setWindowModified(mIsModified); -} - -void MainWindow::switchPerspView() -{ - mActiveViewport->resetCamera(); - // active->switchTo(VPPersp); - mActiveViewport->redraw(); -} - -void MainWindow::switchTopView() -{ - // active->switchTo(VPTop); - mActiveViewport->redraw(); -} - -void MainWindow::switchBottomView() -{ - // active->switchTo(VPBottom); - mActiveViewport->redraw(); -} - -void MainWindow::switchRightView() -{ - // active->switchTo(VPRight); - mActiveViewport->redraw(); -} - -void MainWindow::switchLeftView() -{ - // active->switchTo(VPLeft); - mActiveViewport->redraw(); -} - -void MainWindow::switchFrontView() -{ - // active->switchTo(VPFront); - mActiveViewport->redraw(); -} - -void MainWindow::switchBackView() -{ - // active->switchTo(VPBack); - mActiveViewport->redraw(); -} - -//recurse through selected faces to get a list of checkerboard selection for the entire object -void MainWindow::getCheckerboardSelection(DLFLFacePtr selectedFacePtr) -{ - if (selectedFacePtr) - { - int numShared = 0; - DLFLFacePtrArray fparray; - selectedFacePtr->getNeighboringFaces(fparray); - for (auto fPtr : fparray) - { - if (selectedFacePtr->sharesOneVertex(fPtr) && !mActiveViewport->isSelected(fPtr)) - { - numShared++; - if (sDeselectEdges) - { - mActiveViewport->clearSelectedFace(fPtr); - sNumSelFaces--; - } - else - { - mActiveViewport->setSelectedFace(fPtr); - sNumSelFaces++; - } - getCheckerboardSelection(fPtr); - } - }//end for loop - } -} - -//recurse through selected edge to get a list of -void MainWindow::getEdgeLoopSelection(DLFLEdgePtr selectedEdgePtr) -{ - if (selectedEdgePtr) - { - //first check to see if edge only connects to only three other edges - DLFLVertexPtr vp1, vp2; - DLFLEdgePtrArray eparray; - selectedEdgePtr->getVertexPointers(vp1, vp2); - if (vp1->valence() == 4 && vp2->valence() == 4) - { - //get edges connected to vertex 1 - eparray.clear(); - vp1->getEdges(eparray); - //loop through them to find the one that doesn't share a face - for (auto ePtr : eparray) - { - if (!coFacial(ePtr, selectedEdgePtr)) - { - if (sDeselectEdges) - { - mActiveViewport->clearSelectedEdge(ePtr); - sNumSelEdges--; - getEdgeLoopSelection(ePtr); - } - else if (!mActiveViewport->isSelected(ePtr)) - { - mActiveViewport->setSelectedEdge(ePtr); - sNumSelEdges++; - getEdgeLoopSelection(ePtr); - } - } - }//end for loop - //get edges connected to vertex 2 - eparray.clear(); - vp2->getEdges(eparray); - //loop through them to find the one that doesn't share a face - for (auto ePtr : eparray) - { - if (!coFacial(ePtr, selectedEdgePtr)) - { - if (sDeselectEdges) - { - mActiveViewport->clearSelectedEdge(ePtr); - sNumSelEdges--; - getEdgeLoopSelection(ePtr); - } - else if (!mActiveViewport->isSelected(ePtr)) - { - mActiveViewport->setSelectedEdge(ePtr); - sNumSelEdges++; - getEdgeLoopSelection(ePtr); - } - } - }//end for loop - return; - }//end if vp->valence - return; - } -} - -//recurse through selected edge to get a list of -void MainWindow::getFaceLoopSelection( - DLFLEdgePtr selectedEdgePtr, bool start, - DLFLFacePtr face_loop_marker, bool select_face_loop) -{ - if ((selectedEdgePtr == sFaceLoopStartEdge) && !start) - return; - - int idx = 0; - DLFLEdgePtrArray edges; - DLFLFacePtr fptr1, fptr2; - //get the two faces corresponding to this edge ptr - selectedEdgePtr->getFacePointers(fptr1, fptr2); - //check if the two faces are quads - if (fptr1 && fptr1->numFaceVertexes() == 4 && !(fptr1 == face_loop_marker)) - { - if (!mActiveViewport->isSelected(fptr1)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, fptr1); - sNumSelFaces++; - } - fptr1->getEdges(edges); - idx = 0; - for (auto ePtr : edges) - { - if (ePtr == selectedEdgePtr) - { - getFaceLoopSelection(edges[(idx + 2) % 4], false, fptr1, select_face_loop); - } - idx++; - }//end for loop - } - if (fptr2 && fptr2->numFaceVertexes() == 4 && !(fptr2 == face_loop_marker)) - { - if (!mActiveViewport->isSelected(fptr2)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, fptr2); - sNumSelFaces++; - } - fptr2->getEdges(edges); - idx = 0; - for (auto ePtr : edges) - { - if (ePtr == selectedEdgePtr) - { - getFaceLoopSelection(edges[(idx + 2) % 4], false, fptr2, select_face_loop); - // return; - } - idx++; - }//end for loop - } -} - -//recurse through selected edge to get a list of -void MainWindow::getEdgeRingSelection( - DLFLEdgePtr selectedEdgePtr, bool start, - DLFLFacePtr face_loop_marker, bool select_face_loop) -{ - if ((selectedEdgePtr == sEdgeRingStartEdge) && !start) - return; - - int idx = 0; - DLFLEdgePtrArray edges; - DLFLFacePtr fptr1, fptr2; - if (!mActiveViewport->isSelected(selectedEdgePtr)) - { - mActiveViewport->setSelectedEdge(selectedEdgePtr); - sNumSelEdges++; - } - //get the two faces corresponding to this edge ptr - selectedEdgePtr->getFacePointers(fptr1, fptr2); - //check if the two faces are quads - if (fptr1 && fptr1->numFaceVertexes() == 4 && !(fptr1 == face_loop_marker)) - { - fptr1->getEdges(edges); - idx = 0; - for (auto ePtr : edges) - { - if (ePtr == selectedEdgePtr) - { - getEdgeRingSelection(edges[(idx + 2) % 4], false, fptr1, select_face_loop); - } - idx++; - }//end for loop - } - if (fptr2 && fptr2->numFaceVertexes() == 4 && !(fptr2 == face_loop_marker)) - { - fptr2->getEdges(edges); - idx = 0; - for (auto ePtr : edges) - { - if (ePtr == selectedEdgePtr) - { - getEdgeRingSelection(edges[(idx + 2) % 4], false, fptr2, select_face_loop); - } - idx++; - }//end for loop - } -} - -void MainWindow::setLanguageSpanish() -{ - changeLanguage("es"); -} - -void MainWindow::setLanguageFrench() -{ - changeLanguage("fr"); -} - -void MainWindow::setLanguageGerman() -{ - changeLanguage("de"); -} - -void MainWindow::setLanguageTurkish() -{ - changeLanguage("tr"); -} - -void MainWindow::setLanguageItalian() -{ - changeLanguage("it"); -} - -void MainWindow::setLanguageHindi() -{ - changeLanguage("hi"); -} - -void MainWindow::setLanguageCatalan() -{ - changeLanguage("ca"); -} - -void MainWindow::setLanguageEnglish() -{ - changeLanguage("en"); -} - -void MainWindow::changeLanguage(const QString & string) -{ - - if (string == QString("es")) - { - mTranslator_es->load(QString(":lang/topmod_es")); - QCoreApplication::installTranslator(mTranslator_es); - } - if (string == QString("fr")) - { - mTranslator_fr->load(QString(":lang/topmod_fr")); - QCoreApplication::installTranslator(mTranslator_fr); - } - if (string == QString("de")) - { - mTranslator_de->load(QString(":lang/topmod_de")); - QCoreApplication::installTranslator(mTranslator_de); - } - if (string == QString("tr")) - { - mTranslator_tr->load(QString(":lang/topmod_tr")); - QCoreApplication::installTranslator(mTranslator_tr); - } - if (string == QString("it")) - { - mTranslator_it->load(QString(":lang/topmod_it")); - QCoreApplication::installTranslator(mTranslator_it); - } - if (string == QString("hi")) - { - mTranslator_hi->load(QString(":lang/topmod_hi")); - QCoreApplication::installTranslator(mTranslator_hi); - } - if (string == QString("ca")) - { - mTranslator_ca->load(QString(":lang/topmod_ca")); - QCoreApplication::installTranslator(mTranslator_ca); - } - if (string == QString("en")) - { - QCoreApplication::removeTranslator(mTranslator_es); - QCoreApplication::removeTranslator(mTranslator_fr); - QCoreApplication::removeTranslator(mTranslator_de); - QCoreApplication::removeTranslator(mTranslator_tr); - QCoreApplication::removeTranslator(mTranslator_it); - QCoreApplication::removeTranslator(mTranslator_hi); - QCoreApplication::removeTranslator(mTranslator_ca); - } -} - -/** -* \brief realtime app translation function -* -* \todo all translatable text will eventually go in this function, but that would take forever! we'll see if there's another -* way to handle that. it's probably going to be a matter of putting all the QAction->setText() and -* QAction->setTooltip() calls into one function. This is going to be a pain but could be beneficial in the long run -* I'm testing it out right now. we'll see how this goes... -* -*/ -void MainWindow::retranslateUi() -{ - //retranslate all the operating mode classes - mBasicsMode->retranslateUi(); - mExtrusionsMode->retranslateUi(); - mRemeshingMode->retranslateUi(); - mTexturingMode->retranslateUi(); - mHighgenusMode->retranslateUi(); - mConicalMode->retranslateUi(); - mExperimentalMode->retranslateUi(); - - mStartupDialogDockWidget->setWindowTitle(tr("Learning Movies")); - mToolOptionsDockWidget->setWindowTitle(mToolOptionsDockWidget->windowTitle()); - -#ifdef WITH_PYTHON - mScriptEditor->retranslateUi(); - mScriptEditorDockWidget->setWindowTitle(tr("Script Editor")); - mShowScriptEditorAct->setStatusTip(tr("Show the script editor to execute DLFL commands")); -#endif - - //from createMenus() - mFileMenu->setTitle(tr("&File")); -#ifdef WITH_VERSE - mVerseMenu->setTitle(tr("&Verse")); -#endif - mEditMenu->setTitle(tr("&Edit")); - mDisplayMenu->setTitle(tr("&Display")); - mRendererMenu->setTitle(tr("&Renderer")); - mShowIDsMenu->setTitle(tr("&Show IDs")); - mNewMenu->setTitle(tr("&New")); - mPrimitivesMenu->setTitle(tr("&Primitives")); - mSelectionMenu->setTitle(tr("&Selection")); - mToolsMenu->setTitle(tr("&Tools")); - mObjectMenu->setTitle(tr("&Object")); - mSelectionMaskMenu->setTitle(tr("Selection &Masks")); - mWindowMenu->setTitle(tr("&Window")); - mHelpMenu->setTitle(tr("&Help")); - mLanguageMenu->setTitle(tr("&Language")); - - - //from creatActions()! - mNewFileAct->setText(tr("&New File...")); - mNewFileAct->setStatusTip(tr("Open a blank file and clear the undo list")); - mOpenAct->setText(tr("&Open...")); - mOpenAct->setStatusTip(tr("Open an existing file")); - mSaveAct->setText(tr("&Save")); - mSaveAct->setStatusTip(tr("Save the document to disk")); - mSaveAsAct->setText(tr("Save &As...")); - mSaveAsAct->setStatusTip(tr("Save the document under a new name")); - mSavePatchesAct->setText(tr("Save &Patch OBJ...")); - mSavePatchesAct->setStatusTip(tr("Save a bezier patch .obj file")); - mSaveLG3dAct->setText(tr("Export LiveGrahpics3D...")); - mSaveLG3dAct->setStatusTip(tr( - "Export a LiveGraphics3D (*.m) file for embedding into the TopMod Wiki, "\ - "Warning: you cannot import this file back into TopMod")); - mSaveLG3dSelectedAct->setText(tr("Export LG3d (Sel. Faces)...")); - mSaveLG3dSelectedAct->setStatusTip(tr( - "Export a LiveGraphics3D (*.m) of the current selected faces file "\ - "for embedding into the TopMod Wiki, "\ - "Warning: you cannot import this file back into TopMod")); - mExportSTLAct->setText(tr("Export STL...")); - mExportSTLAct->setStatusTip(tr( - "Export a stereolithography (*.stl) file " - "for use with various rapid prototyping software and hardware")); - mScreenshotAppAct->setText(tr("Save App Screenshot...")); - mScreenshotAppAct->setStatusTip(tr("Save a screenshot of the entire main application window (*.png)")); - mScreenshotViewportAct->setText(tr("Save Viewport Screenshot...")); - mScreenshotViewportAct->setStatusTip(tr("Save a screenshot of the contents of the OpenGL viewport (*.png)")); - mLoadTextureAct->setText(tr("Load &Texture...")); - mLoadTextureAct->setStatusTip(tr("Load Texture from file")); - mPrintInfoAct->setText(tr("Print &Information")); - mPrintInfoAct->setStatusTip(tr("Print Information to the console")); - mPrintFaceListAct->setText(tr("Print &Face List")); - mPrintFaceListAct->setStatusTip(tr("Print Face List to the console")); - mPrintVertexListAct->setText(tr("Print &Vertex List")); - mPrintVertexListAct->setStatusTip(tr("Save the document under a new name")); - mPrintEdgeListAct->setText(tr("Print &Edge List")); - mPrintEdgeListAct->setStatusTip(tr("Print Edge list to the console")); - mPrintCVListAct->setText(tr("Print &CV List")); - mPrintCVListAct->setStatusTip(tr("Print CV list to the console")); - mExitAct->setText(tr("E&xit")); - mExitAct->setStatusTip(tr("Exit the application")); - - - //quick command quicksilver like interface -#ifdef QCOMPLETER - mQuickCommandAct->setText(tr("Quick Command")); - mQuickCommandAct->setStatusTip(tr("Quick Command Access with Autocompletion")); -#endif - //Edit Menu Actions - mDeleteSelectedAct->setText(/*QIcon(":images/edit-undo.png"),*/ tr("&Delete Selected")); - mDeleteSelectedAct->setStatusTip(tr("Delete Selected")); - mUndoAct->setText(tr("&Undo")); - mRedoAct->setText(tr("&Redo")); - mClearUndoListAct->setText(tr("&Clear Undo List")); - //View Menu Actions - mPerspViewAct->setText(tr("&Reset Camera")); - mZoomOutAct->setText(tr("Zoom Out")); - mZoomInAct->setText(tr("Zoom In")); - // mTopViewAct->setText( tr("&Top View")); - // mBottomViewAct->setText( tr("&Bottom View")); - // mFrontViewAct->setText( tr("&Front View")); - // mBackViewAct->setText( tr("B&ack View")); - // mLeftViewAct->setText( tr("&Left View")); - // mRightViewAct->setText( tr("&Right View")); - - //Display Menu Actions - mFullscreenAct->setText(tr("&Full Screen")); - mFullscreenAct->setStatusTip(tr("Toggle Full Screen")); - mShowVerticesAct->setText(tr("Show &Vertices")); - mShowFaceIDsAct->setText(tr("Show &Face IDs")); - mShowEdgeIDsAct->setText(tr("Show &Edge IDs")); - mShowVertexIDsAct->setText(tr("Show &Vertex IDs")); - mShowSelectedIDsAct->setText(tr("Show &Selected IDs")); - mShowSilhouetteAct->setText(tr("Show &Silhouette")); - mShowWireframeAct->setText(tr("Show &Wireframe")); - mShowCoordinateAxesAct->setText(tr("Show &Coordinate Axes")); - mObjectOrientationAct->setText(tr("Reverse Object")); - mShowNormalsAct->setText(tr("Show &Normals")); - mShowFaceCentroidsAct->setText(tr("Show &Face Centroids")); - mShowHUDAct->setText(tr("Show &Heads Up Display")); - mShowHUDAct->setStatusTip(tr("Show the Heads Up Display")); -#ifdef GPU_OK - mUseGPUAct->setText(tr("&Use GPU Shading")); - mUseGPUAct->setStatusTip(tr("Use GPU Shading")); -#endif - mAntialiasingAct->setText(tr("Toggle &Antialiasing")); - mAntialiasingAct->setStatusTip(tr("Toggle Antialiasing")); - -#ifdef WITH_PYTHON - mShowScriptEditorAct->setStatusTip(tr("Show the script editor to execute DLFL commands")); -#endif -#ifdef WITH_VERSE - mShowVerseDialogAct->setStatusTip(tr("Show the verse dialog to view verse server connection status")); -#endif - - mShowToolOptionsAct->setStatusTip(tr("Show the tool options window")); - mShowStartupDialogAct->setStatusTip(tr("Show the startup screen with links to video tutorials")); - mShowAnimatedHelpAct->setStatusTip(tr("Show/Hide the animated help window")); - - //Renderer Menu Actions - mWireframeRendererAct->setText(tr("&Wireframe Renderer")); - mWireframeRendererAct->setStatusTip(tr("Switch the current renderer to Wireframe")); - mNormalRendererAct->setText(tr("&Normal Renderer")); - mNormalRendererAct->setStatusTip(tr("Switch the current renderer to Normal")); - mLightedRendererAct->setText(tr("&Lighted Renderer")); - mLightedRendererAct->setStatusTip(tr("Switch the current renderer to Lighted")); - mTexturedRendererAct->setText(tr("&Textured Renderer")); - mTexturedRendererAct->setStatusTip(tr("Switch the current renderer to Textured")); - mTexturedLightedAct->setText(tr("Te&xtured Lighted Renderer")); - mTexturedLightedAct->setStatusTip(tr("Switch the current renderer to Textured Lit")); - mPatchRendererAct->setText(tr("&Patch Renderer")); - mPatchRendererAct->setStatusTip(tr("Switch the current renderer to Patch")); - mColorableRendererAct->setText(tr("&Colorable Renderer")); - mColorableRendererAct->setStatusTip(tr("Switch the current renderer to Colorable")); - - //PRIMITIVES MENU ACTIONS - mPrimCubeAct->setText(tr("&Cube")); - mPrimCubeAct->setStatusTip(tr("Load a Cube")); - mPrimOctahedronAct->setText(tr("&Octahedron")); - mPrimOctahedronAct->setStatusTip(tr("Load an octahedron")); - mPrimTetrahedronAct->setText(tr("&Tetrahedron")); - mPrimTetrahedronAct->setStatusTip(tr("Load a tetrahedron")); - mPrimDodecahedronAct->setText(tr("&Dodecahedron")); - mPrimDodecahedronAct->setStatusTip(tr("Load a dodecahedron")); - mPrimIcosahedronAct->setText(tr("&Icosahedron")); - mPrimIcosahedronAct->setStatusTip(tr("Load an icosahedron")); - mPrimSoccerBallAct->setText(tr("&Soccer ball")); - mPrimSoccerBallAct->setStatusTip(tr("Load a soccer ball")); - mPrimGeodesicAct->setText(tr("&Geodesic Dome")); - mPrimGeodesicAct->setStatusTip(tr("Load a geodesic dome")); - //Object Menu Actions - mSubdivideAllEdgesAct->setText(tr("Subdivide All &Edges")); - mPlanarizeAllFacesAct->setText(tr("Planarize All &Faces")); - makeObjectSphericalAct->setText(tr("Make &Object Spherical")); - mCleanup2gonsAct->setText(tr("Cleanup 2-gons")); - mCleanupWingedVerticesAct->setText(tr("Remove valence-2 vertices")); - mSplitValence2VerticesAct->setText(tr("Split valence-2 vertices")); - mMakeObjectSmoothAct->setText(tr("Make Object &Smooth")); - mPerformCuttingAct->setText(tr("Perform Cutting")); - mPerformCuttingAct->setStatusTip(tr("Cut selected faces, edges, or vertices based on the current selection mask")); - mCreateCrustScalingAct->setText(tr("&Create Crust (Scaling)")); - mCreateCrustScalingAct->setStatusTip(tr("Create a crust using the currently selected faces with scaling mode")); - mCreateCrustThicknessAct->setText(tr("Create Crust (&Thickness)")); - mCreateCrustThicknessAct->setStatusTip(tr("Create a crust using the currently selected faces with thickness mode")); - mMakeWireframeAct->setText(tr("Create Wireframe")); - mMakeWireframeAct->setStatusTip(tr("Create a wireframe model using the current options")); - mMakeColumnsAct->setText(tr("Create Columns")); - mMakeColumnsAct->setStatusTip(tr("Create a column model using the current options")); - mMakeSierpinskiAct->setText(tr("Create Sierpinski")); - mMakeSierpinskiAct->setStatusTip(tr("Create a sierpinski tetrahedra")); - mComputeLightingAct->setText(tr("Compute &Lighting")); - mComputeNormalsAndLightingAct->setText(tr("Compute &Normals and Lighting")); - mAssignTextureCoordinatesAct->setText(tr("Assign &Texture Coordinates")); - //SELECTION MENU ACTIONS - mSelectVertexAct->setText(tr("Select &Vertex")); - mSelectVertexAct->setStatusTip(tr("Select a Vertex")); - mSelectMultipleVerticesAct->setText(tr("Select Multiple Vertices")); - mSelectMultipleVerticesAct->setStatusTip(tr("Select multiple vertices")); - mEditVertexAct->setText(tr("Edit Verte&x")); - mEditVertexAct->setStatusTip(tr("Select and Move Vertices One at a time.")); - mSelectFaceAct->setText(tr("Select &Face")); - mSelectFaceAct->setStatusTip(tr("Select One Face. Just for practice. :)")); - mSelectFaceLoopAct->setText(tr("Select Face Loo&p")); - mSelectFaceLoopAct->setStatusTip(tr("Select a Face Loop.")); - mSelectEdgeRingAct->setText(tr("Select Edge &Ring")); - mSelectEdgeRingAct->setStatusTip(tr("Select an Edge Ring.")); - mSelectMultipleFacesAct->setText(tr("Select &Multiple Faces")); - mSelectSimilarFacesAct->setText(tr("Select &Similar Faces")); - mSelectFacesByAreaAct->setText(tr("Select Faces By Surf. Area")); - mSelectFacesByColorAct->setText(tr("Select Faces By Color")); - mSelectionWindowAct->setText(tr("Selection Window")); - mSelectCheckerboardFacesAct->setText(tr("C&heckerboard Select Faces")); - mSelectAllAct->setText(tr("Select &All")); - mGrowSelectionAct->setText(tr("Grow Selection")); - mShrinkSelectionAct->setText(tr("Shrink Selection")); - mSelectInverseAct->setText(tr("Select &Inverse")); - mSelectEdgeAct->setText(tr("Select &Edge")); - mSelectEdgeAct->setStatusTip(tr("Select one Edge")); - mCollapseSelectedEdgesAct->setText(tr("Collapse Selected Edges")); - mCollapseSelectedEdgesAct->setStatusTip(tr("Collapse Selected Edges")); - mSelectMultipleEdgesAct->setText(tr("Select Multiple Edges")); - mSelectMultipleEdgesAct->setStatusTip(tr("Select multiple edges")); - mSelectEdgeLoopAct->setText(tr("Select Edge &Loop")); - mSelectEdgeLoopAct->setStatusTip(tr("Select an Edge Loop")); - mSelectCornerAct->setText(tr("Select &Corner")); - mSelectCornerAct->setStatusTip(tr("Select a Corner")); - mExitSelectionModeAct->setText(tr("E&xit Selection Mode")); - mClearSelectedModeAct->setText(tr("&Clear Selected")); - mSelectVerticesMaskAct->setText(tr("Select &Vertices")); - mSelectVerticesMaskAct->setStatusTip(tr("Select by Component type: Vertices")); - mSelectEdgesMaskAct->setText(tr("Select &Edges")); - mSelectEdgesMaskAct->setStatusTip(tr("Select by Component type: Edges")); - mSelectFacesMaskAct->setText(tr("Select &Faces")); - mSelectFacesMaskAct->setStatusTip(tr("Select by Component type: Faces")); - mSelectCornersMaskAct->setText(tr("Select &Corner")); - mSelectCornersMaskAct->setStatusTip(tr("Select by Component type: Corners")); - - //SETTINGS ACTIONS - mPreferencesAct->setText(tr("&Preferences")); - mPreferencesAct->setStatusTip(tr("Open the Preferences Dialog")); - - //LANGUAGE MENU BAR ACTIONS - mEnglishAct->setText(tr("English")); - mSpanishAct->setText(tr("Spanish")); - mGermanAct->setText(tr("German")); - mFrenchAct->setText(tr("French")); - mItalianAct->setText(tr("Italian")); - mTurkishAct->setText(tr("Turkish")); - mCatalanAct->setText(tr("Catalan")); - mHindiAct->setText(tr("Hindi")); - -#ifdef WITH_VERSE - //verse menu actions - mVerseConnectLocalhostAct->setText(tr("Connect to localhost...")); - mVerseConnectLocalhostAct->setStatusTip(tr("Connect to localhost")); - mVerseConnectAct->setText(tr("Connect to host...")); - mVerseConnectAct->setStatusTip(tr("Connect to host...")); - mVerseDisconnectAct->setText(tr("Disconnect session")); - mVerseDisconnectAct->setStatusTip(tr("Disconnect Verse Session")); - mVerseDisconnectAllAct->setText(tr("Disconnect All Sessions")); - mVerseDisconnectAllAct->setStatusTip(tr("Disconnect All Sessions")); - mVerseStartServerAct->setText(tr("Start Verse Server")); - mVerseStartServerAct->setStatusTip(tr("Disconnect All Nodes")); - mVerseKillServerAct->setText(tr("Kill Verse Server")); - mVerseKillServerAct->setStatusTip(tr("Kill the Local Verse server process")); -#endif - - mSubdivideSelectedFacesAct->setText(tr("Subdivide Selected Faces")); - mSubdivideSelectedFacesAct->setStatusTip(tr("Subdivide all Selected Faces")); - mPaintSelectedFacesAct->setText(tr("Paint Selected Faces")); - mPaintSelectedFacesAct->setStatusTip(tr("Paint all Selected Faces")); - mClearMaterialsAct->setText(tr("Clear Materials")); - mClearMaterialsAct->setStatusTip(tr("Clear Materials")); - mSubdivideSelectedEdgesAct->setText(tr("Subdivide Selected Edges")); - mSubdivideSelectedEdgesAct->setStatusTip(tr("Subdivide all Selected Edges")); - mPerformRemeshingAct->setText(tr("Perform Remeshing")); - mPerformRemeshingAct->setStatusTip(tr("Perform the current remeshing scheme")); - mPerformExtrusionAct->setText(tr("Perform Extrusion")); - mPerformExtrusionAct->setStatusTip(tr("Perform the current extrusion operator on the selected faces")); - mExtrudeMultipleAct->setText(tr("Extrude Multiple Faces")); - mExtrudeMultipleAct->setStatusTip(tr( - "Check this if you want to be able to select multiple faces "\ - "and then hit CTRL+X to extrude the selected faces")); - - //help menu actions - mHelpAct->setText(tr("&Online User Manual")); - mHelpAct->setStatusTip(tr("View the User Manual on the TopMod Wiki")); - mTopModWebAct->setText(tr("&TopMod on the Web")); - mTopModWebAct->setStatusTip(tr("Go to the TopMod web page")); - mVideoTutorialsAct->setText(tr("&TopMod Video Tutorials on blip.tv")); - mVideoTutorialsAct->setStatusTip(tr("Go to http://topmod.blip.tv")); - mTopModResearchAct->setText(tr("&TopMod Research Papers")); - mTopModResearchAct->setStatusTip(tr("Go to the TopMod Research web page")); - mCheckForUpdatesAct->setText(tr("&Check for Updates")); - mCheckForUpdatesAct->setStatusTip(tr("Check for updates to TopMod Online")); - mAboutAct->setText(tr("&About TopMod")); - mAboutAct->setStatusTip(tr("About TopMod")); - mAboutQtAct->setText(tr("About &Qt")); - mAboutQtAct->setStatusTip(tr("About Qt")); - mHideToolBarsAct->setText(tr("Hide All ToolBars")); - mHideToolBarsAct->setStatusTip(tr("Hide All ToolBars")); - mShowToolBarsAct->setText(tr("Show All ToolBars")); - mShowToolBarsAct->setStatusTip(tr("Show All ToolBars")); - - //from createAnimatedHelp - - - //from creatToolbars() - mEditToolBar->setWindowTitle(tr("Edit")); - mSelectionMaskToolBar->setWindowTitle(tr("Selection Masks")); - mPrimitivesToolBar->setWindowTitle(tr("Primitives")); - mToolsToolBar->setWindowTitle(tr("Tools")); - mExtrusionToolBar->setWindowTitle(tr("Extrusion Tools")); - mConicalToolBar->setWindowTitle(tr("Conical Tools")); - mHighgenusToolBar->setWindowTitle(tr("High Genus Tools")); - mTexturingToolBar->setWindowTitle(tr("Texturing Tools")); - mRemeshingToolBar->setWindowTitle(tr("Remeshing Tools")); - mExperimentalToolBar->setWindowTitle(tr("Experimental Tools")); - - //createStartupDialog - mTutorialNavigationAct->setText(tr("Navigation Basics")); - mTutorialInterfaceAct->setText(tr("Interface Basics")); - mTutorialBasicAct->setText(tr("Basic Operations")); - mTutorialExtrusionAct->setText(tr("Extrusion Operations")); - mTutorialRemeshingAct->setText(tr("Remeshing Operations")); - mTutorialHighgenusAct->setText(tr("High genus Operations")); - mTutorialTexturingAct->setText(tr("Texturing Operations")); - mShowStartupDialogAtStartupCheckBox->setText(tr("Show this dialog at startup")); - mQuickTimeLabel->setText(tr("Quicktime 7.2 or greater recommended.")); - mDownloadQuickTimeLabel->setText(tr( - "
Quicktime 7.2 or greater recommended.
"\ - "Download now.
")); - -}//end retranslateUi diff --git a/topmodx/src/MainWindow.h b/topmodx/src/MainWindow.h deleted file mode 100644 index 3580ae8..0000000 --- a/topmodx/src/MainWindow.h +++ /dev/null @@ -1,1324 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/****************************************** - * include.hh - * - ******************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include "stylesheeteditor.h" -#include "qshortcutmanager.h" -#include "qshortcutdialog.h" -#include "DLFLScriptEditor.h" -#include "VerseTopMod.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include "GLWidget.h" - -//the six modes are now separated into separate classes -#include "BasicsMode.h" -#include "ExtrusionsMode.h" -#include "RemeshingMode.h" -#include "HighgenusMode.h" -#include "ConicalMode.h" -#include "TexturingMode.h" -#include "ExperimentalModes.h" - -#ifdef QCOMPLETER -//new command auto completion interface - like quicksilver inside topmod -#include "CommandCompleter.h" -#endif - -#include "DLFLLighting.h" -#include -#include - -#include "Renderer/WireframeRenderer.h" -#include "Renderer/NormalRenderer.h" -#include "Renderer/LitRenderer.h" -#include "Renderer/TexturedRenderer.h" -#include "Renderer/TexturedLitRenderer.h" -#include "Renderer/PatchRenderer.h" -#include "Renderer/ColorableRenderer.h" -#include "TopModPreferences.h" - -// DLFLAux Library includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef StringStream * StringStreamPtr; -typedef list StringStreamPtrList; - -class TopModPreferences; - -class BasicsMode; -class ExtrusionsMode; -class RemeshingMode; -class ConicalMode; -class HighgenusMode; -class TexturingMode; -class ExperimentalMode; -#ifdef WITH_VERSE -class VerseTopMod; -#endif -class QAction; -class QMenu; -class GLWidget; -class QBoxLayout; -class QComboBox; -class QMenuBar; - -using namespace DLFL; - -/*! - \file MainWindow.hh - \brief Definition of the MainWindow class - - \see MainWindow -*/ - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - /** - * Enumerations for the various operating modes. - */ - enum Mode - { - NormalMode = 0, /**< normal mode. does not allow any selection in the viewport. */ - SelectVertex = 1, /**< select one vertex. */ - SelectEdge = 2, /**< select one edge. */ - SelectFace = 3, /**< select one face. */ - SelectCorner = 4, /**< select one corner, which requires selection of a face and a vertex. */ - MultiSelectVertex = 5, /**< select multiple vertices. */ - MultiSelectEdge = 6, /**< select multiple edges. */ - MultiSelectFace = 7, /**< . */ - MultiSelectCorner = 8, /**< . */ - SelectCheckerboard = 9, /**< select alternating faces forming a checkerboard pattern. works well after Doo Sabin Remeshing. */ - SelectionWindow = 10, /**< crossing window selection - dave. */ - InsertEdge = 11, /**< insert edge. */ - DeleteEdge = 12, /**< delete an edge. */ - SubdivideEdge = 13, /**< subdivide an edge into n segments. */ - CollapseEdge = 14, /**< collapse an edge. */ - SpliceCorners = 15, /**< select two corners and collapse the face in between. */ - ConnectEdges = 21, /**< connect two half-edges. */ - ExtrudeFace = 31, /**< cubical extrusion. */ - ExtrudeFaceDS = 32, /**< doo sabin extrusion. */ - ExtrudeDualFace = 33, /**< dual of cubical extrusion. */ - ExtrudeFaceDodeca = 34, /**< dodecahedral extrusion. */ - ExtrudeFaceIcosa = 35, /**< icosahedral extrusion. */ - ExtrudeMultipleFaces = 36, /**< cubical extrusion for multiple faces at once. */ - StellateFace = 41, /**< stellate extrusion. */ - DoubleStellateFace = 42, /**< double stellate extrusion. */ - ExtrudeFaceDome = 43, /**< dome extrusion. dave */ - ConnectFaceVertices = 51, /**< add . */ - ConnectFaces = 52, /**< add hole/handle operation. */ - BezierConnectFaces = 53, /**< add handle operation. */ - HermiteConnectFaces = 54, /**< add handle operation. */ - ReorderFace = 61, /**< reorders the corners of a face. */ - SubdivideFace = 62, /**< subdivides a face into n faces. */ - CrustModeling = 71, /**< create a crust of the current model and poke holes in it. */ - CutEdge = 200, /**< // ozgur. */ - CutVertex = 201, /**< // ozgur. */ - CutEdgeandVertex = 202, /**< // ozgur. */ - CutFace = 203, /**< // ozgur. */ - TruncateEdge = 204, /**< // ozgur. */ - MarkEdge = 206, /**< // ozgur. */ - MarkVertex = 207, /**< // ozgur. */ - ConvexHullMode = 301, /**< create a convex hull or dual convex hull // ozgur. */ - EditVertex = 81, /**< select and move individual vertices // brianb. */ - SelectEdgeLoop = 82, /**< select an edge loop. shift select for multiple. */ - SelectEdgeRing = 85, /**< select an edge ring. shift select for multiple. */ - SelectFaceLoop = 83, /**< allows user to select one edge in the viewport and selects the corresponding face loop. shift select for multiple. */ - SelectSimilar = 84, /**< select all sub objects with the same number of verts edges or faces whatever... . */ - SelectFacesByArea = 856, /**< select all faces with the a similar surface area. */ - SelectFacesByColor = 857, /**< select all faces with the same color material. */ - PaintFace = 858, /**< paint a face as you click. */ - EyeDropper = 859 /**< grab the color of the selected face. */ - }; - - /** - * Enumerations for Selection Masking (e.g. vertices, faces, edges, face-vertices, and eventually objects... ?) - */ - enum SelectionMask - { - MaskObject = 0, - MaskVertices, - MaskEdges, - MaskFaces, - MaskCorners, - MaskNone - }; - - /** - * Enumerations for Extrusion operatoers - */ - enum ExtrusionMode - { - CubicalExtrude, - DooSabinExtrude, - DodecahedralExtrude, - IcosahedralExtrude, - OctahedralExtrude, //!< also called dual - StellateExtrude, - DoubleStellateExtrude, - DomeExtrude - }; - - // Enumerations for various multi-face-handle algorithms - enum MFHAlgo - { - ConvexHull = 0, - ClosestEdge = 1 - }; - - enum RemeshingScheme - { - Dual = 0, /**< . */ - Root3 = 10, /**< . */ - Triangulate = 15, /**< . */ - DualVertexTrunc = 11, /**< . */ - GlobalStellate = 12, /**< . */ - Star = 13, /**< . */ - Generic1264 = 14, /**< . */ - Honeycomb = 20, /**< . */ - VertexTrunc = 21, /**< . */ - DualGeneric1264 = 22, /**< . */ - LinearVertexInsertion = 30, /**< . */ - CatmullClark = 31, /**< . */ - ModifiedStellate = 32, /**< . */ - DooSabin = 40, /**< . */ - CornerCutting = 41, /**< . */ - ModifiedCornerCutting = 43, /**< . */ - Simplest = 42, /**< . */ - Pentagonal = 50, /**< . */ - CubicPentagonal = 51, /**< . */ - DualPentagonal = 52, /**< . */ - LoopStyle = 60, /**< . */ - Loop = 61, /**< . */ - Root4 = 62, /**< . */ - DualLoop = 63, /**< . */ - GlobalCubicExtrude = 70, /**< . */ - CheckerBoard = 71, /**< . */ - DualGlobalCubicExtrude = 80, /**< . */ - DualCheckerBoard = 81, /**< . */ - PentagonPreserving = 90, /**< . */ - DualPentagonPreserving = 91, /**< . */ - HexagonPreserving = 100, /**< . */ - DualHexagonPreserving = 101, /**< . */ - Fractal = 110, /**< . */ - ModifiedDoubleStellate = 111, /**< . */ - Dome = 112, /**< . */ - DooSabinBC = 113, /**< . */ - DooSabinBCNew = 114 /**< . */ - }; - - enum SpinBoxMode - { - eFirstSpinBox = 0, /**< the first spinbox in the current option panel will be controlled by the Y key. */ - eSecondSpinBox, /**< the second spinbox in the current option panel will be controlled by the U key. */ - eThirdSpinBox, /**< the third spinbox in the current option panel will be controlled by the I key. */ - eFourthSpinBox, /**< the fourth spinbox in the current option panel will be controlled by the O key. */ - eFifthSpinBox, /**< the fifth spinbox in the current option panel will be controlled by the P key. */ - eSixthSpinBox, /**< the sixth spinbox in the current option panel will be controlled by the [ key. */ - eInvalidSpinBox /**< no spinbox is being manipulated */ - }; - - //-- Parameters used in various operations on the DLFL object --// - - // face area tolerance - dave - static float sFaceAreaTolerance; - // face color tolerance - dave 11/07 - static float sFaceColorTolerance; - - // Edge deletion - static bool sDeleteEdgeCleanup; //!< Flag for point-sphere cleanup after edge deletion - - //!< Handles - static int sNumSegments; //!< No. of segments in a connection/handle - static int sMaxSegments; //!< Max. no. of segments to connect - static bool sSymmetricWeights; //!< Use symmetric weight factors - static double sFaceNormalWeight1; //!< Weight factor for normal of first face - static double sFaceNormalWeight2; //!< Weight factor for normal of second face - static int sNumExtraTwists; //!< No. of extra twists in handles - - //!< Extrusions - static double sExtrudeDist; //!< Distance for an extrude - static double sExtrudeRot; //!< Rotation for an extrude - static double sExtrudeScale; //!< Scaling for an extrude - static int sNumExtrusions; //!< No. of segments for an extrude - static double sDooSabinExtrusionTwist; //!< Twist factor for doo-sabin extrude - static bool sDualMeshEdgesCheck; //!< Flag to check for removal of dual mesh edges - static bool sHexagonalizeDodecaExtrude; //!< Flag to hexagonalize when doing dodeca extrude - static double sExtrudeLength1; - static double sExtrudeLength2; - static double sExtrudeLength3; - static double sExtrudeAngle; - static double sExtrudeLength1_iCosA; - static double sExtrudeLength2_iCosA; - static double sExtrudeLength3_iCosA; - static double sExtrudeAngle_iCosA; - - //!< Edge subdivision - static int sNumEdgeSubdiv; //!< No. of subdivisions for an edge - - //!< Split valence 2 vertices - static double sVertexSplitOffset; //!< Half of distance between new vertices - - - //!< Crust modeling - static double sCrustThickness; //!< Thickness of crust - static double sCrustScaleFactor; //!< Scale factor for making crust - static bool sCrustCleanup; //!< Cleanup flag for crust modeling - - //!< Wire-frame modeling - static double sWireframeThickness; //!< Thickness of crust for wireframe - static double sWireframe2Thickness; //!< depth of crust for wireframe2 - static double sWireframe2Width; //!< width of crust for wireframe2 - static bool sWireframeSplit; //!< split valence-2 vertices or not? - static double sCornerCuttingAlpha; - - //!< Column modeling - static double sColumnThickness; //!< Thickness of columns for column modeling - static int sColumnSegments; //!< Number of segments in each column for column modeling - - //!< Subdivision - static double sTwistFactor; //!< Twist factor for root-4 subdiv - static double sWeightFactor; //!< Weight factor for root-4 subdiv - static bool sDooSabinCheck; //!< Flag to check for repeating edges - static double sVertexCuttingOffset; //!< Offset value for vertex cutting - static double sPentagonalOffset; //!< Offset value for pentagonal subdivision (conversion) - static double sPentagonalScale; //!< Scale factor for pentagonal subdivision (preserving) - static bool sAccurateDual; //!< Flag to indicate that accurate dual method should be used - static double sCheckerboardThickness; //!< Fractional thickness for checkerboard remeshing - static double sModifiedCornerCuttingThickness; //!< for modified corner cutting scheme same as Thickness of crust for wireframe - - //added by Ryan - static double sPinchingFactor; //!< scaling factor for pinched handles - static double sPinchCenter; //!< 0 to 1, the parametric cetner of the pinching factor - static double sBubbleFactor; //!< 0 to 0.5, the offset from the pinch center to the bezier control points - - static double sHoleHandlePinchingFactor; //!< scaling factor for pinched handles - static double sHoleHandlePinchCenter; - static double sHoleHandlePinchWidth; - - //!< Added by Doug - static double sStarOffset; //!< Offset value for star subdivision - static double sFractalOffset; //!< Offset value for fractal subdivision - - //!< Added by Eric - static double sSubstellateHeight; //amount of first stellation extrusion - static double sSubstellateCurve; //amount of second stellation extrusion - - //!< added by dave - static double sDomeExtrudeLengthFactor; //!< Length for dome extrusion //dave - static double sDomeExtrudeScaleFactor; //!< Scale factor for dome extrusion //dave - static double sDomeExtrudeRotationFactor; //!< Scale factor for dome extrusion //dave - - //!< Added by Bei & Cansin - static double sDomeLengthFactor; //!< Length for dome extrusion - static double sDomeScaleFactor; //!< Scale factor for dome extrusion - static double sDual1264ScaleFactor; //!< Scale factor for Dual 12-6-4 remeshing - static double sDooSabinBCnewScaleFactor; //!< Scale factor for new Doo-Sabin remeshing scheme - static double sDooSabinBCnewLengthFactor; //!< Length factor for new Doo-Sabin remeshing scheme - static double sLoopLengthFactor; //!< Length factor for Loop-style remeshing scheme - - //!< Face subdivision - static bool sUseQuads; //!< Flag indicating if face subdivision should use quads or triangles - - //!< Tile texturing - static int sTileTexSize; //!< Tiling size for tile texturing - - //!< Multi-face handles - static MFHAlgo sMfhAlgorithm; //!< Algorithm to use for multi-face handle - static double sMfhScaleFactor; //!< Scale factor for convex hull creation - static double sMfhExtrudeDist; //!< Extrude distance for convex hull creation - static bool sMfhUseMaxOffsets; //!< Flag indicating whether to compute and use the max. offset distances - static double sMfhMinAdjFactor; //!< Min. value of adjustment factor for iterative convex hull computation - static bool sMfhMakeConnections; //!< Should final connections be made or should we stop with convex hull? - - //!< Menger Sponge creation - static double sSpongeThickness; //!< Thickness for Menger Sponge - static double sSpongeCollapseThreshold; //!< Threshold angle for edge collapse - static bool sSpongeFractionalThickness; //!< Consider thickness to be fractional - - //!< Conical Sculpting Variables from Ozgur - static double sCutOffsetEdgeFactor; - static double sCutOffsetVertFactor; - static double sPNormalBendS_Factor; - static double sPNormalBendT_Factor; - static bool sGlobalCut; - static bool sSelectedCut; - static int sNumOfPeels; - static double sExtrudeBendT; - static double sExtrudeBendB; - - static int sIncrementalSaveCount; - - //dave paint bucket tool - exp. 11.07 - static QColor sPaintBucketColor; - - QString mCurFilename; - //document modified - bool isModified(); - void setModified(bool isModified); - -protected : - //-- Selection count, used as index into selection lists --// - static int sNumSelVerts; //!< No. of selected vertices - static int sNumSelEdges; //!< No. of selected edges - static int sNumSelFaces; //!< No. of selected faces - static int sNumSelFaceVerts; //!< No. of selected face vertices - - //-- should we deselect or select the current faces? --// - static bool sDeselectVerts; - static bool sDeselectEdges; - static bool sDeselectFaces; - static bool sDeselectFaceVerts; - - static DLFLEdgePtr sFaceLoopStartEdge; //!< face loop edge pointer - static DLFLEdgePtr sEdgeRingStartEdge; //!< edge ring edge pointer - static bool sFaceLoopStart; //!< face loop start - - GLWidget *mActiveViewport; //!< Active viewport to handle events - - DLFLObject mObject; //!< The DLFL object - //TMPatchObject *patchObject; //!< the patch object - Mode mOperationMode; //!< Current operating mode - ExtrusionMode mExtrusionMode; //!< Current operating mode - SelectionMask mSelectionMask; //!< Current selection mask - RemeshingScheme mRemeshingScheme; //!< Current selected remeshing scheme - PointLight mPointLight; //!< Light used to compute lighting - - StringStreamPtrList mUndoList; //!< List for Undo - StringStreamPtrList mRedoList; //!< List for Redo - StringStreamPtrList mUndoMtlList; //!< Mtl List for Undo - StringStreamPtrList mRedoMtlList; //!< Mtl List for Redo - int mUndoLimit; //!< Limit for undo - bool mUseUndo; //!< Flag to indicate if undo will be used - - void initialize(int x, int y, int w, int h, DLFLRendererPtr rp); //!< Initialize the viewports, etc. - - // brianb - static int sDragStartX; - static int sDragStartY; - double mStartDragX; - double mStartDragY; - static bool sIsEditing; - -public : - /** - * \brief Constructor - */ - MainWindow(char *filename = nullptr); - - /** - * \brief Destructor - */ - ~MainWindow() { - clearUndoList(); - clearRedoList(); - delete mActiveViewport; - } - - /** - * \brief translation function. see tutorial at http://trolltech.com/developer/knowledgebase/faq.2007-05-23.5871663589/ - */ - void changeEvent ( QEvent * event ) { - if (event->type() == QEvent::LanguageChange) { - retranslateUi(); - } - QMainWindow::changeEvent(event); - } - - void retranslateUi(); - - /** - * \brief clears all currently selected vertices, edges, faces, whatever is selected - */ - void clearSelected() { - mActiveViewport->clearSelected(); - MainWindow::clearNumSelected(); - } - - /** - * \brief current used for vertex editing, needs to be updated to allow generic and multiple subobject translation/rotation/scale editing - */ - static void startDrag(int x, int y) { // brianb - sDragStartX = x; - sDragStartY = y; - } - - /** - * \brief resets all subobject num_selected variables to 0 - */ - static void clearNumSelected() { - sNumSelVerts = 0; - sNumSelEdges = 0; - sNumSelFaces = 0; - sNumSelFaceVerts = 0; - } - - void getCheckerboardSelection(DLFLFacePtr fptr); //!< \todo needs to be moved to DLFL namespace - void getEdgeLoopSelection(DLFLEdgePtr eptr); //!< \todo needs to be moved to DLFL namespace - void getFaceLoopSelection(DLFLEdgePtr eptr, bool start, DLFLFacePtr face_loop_marker, bool select_face_loop); //!< \todo needs to be moved to DLFL namespace - void getEdgeRingSelection(DLFLEdgePtr eptr, bool start, DLFLFacePtr face_loop_marker, bool select_face_loop); //!< \todo needs to be moved to DLFL namespace - - void createRenderers(); //!< allocate memory for the renderer pointers - void destroyRenderers(); //!< delete memory allcated for the renderer pointers - - void setMode(Mode m); //!< Switch to specified operating mode - void setExtrusionMode(ExtrusionMode m); //!< Switch to specified operating mode - Mode getMode() { return mOperationMode; }; //!< returns the current operation mode enum... this needs to return a string eventually. don't know how to do that yet - void setRemeshingScheme(RemeshingScheme scheme); //!< switch the current remeshing scheme - void setSelectionMask(SelectionMask m); //!< set the current selection mask (verts, edges, faces, multiple?) - void setToolOptions(QWidget *optionsWidget); //!< set the current tool option widget to be displayed in mToolOptionsDockWidget - void loadFile(QString fileName); //!< load an OBJ or a DLFL file - - /** - * \brief this will store pointers to the current mode's spinboxes so we can do keyboard interaction with them - */ - void setSpinBoxes( - QDoubleSpinBox *one = nullptr, QDoubleSpinBox *two = nullptr, - QDoubleSpinBox *three = nullptr, QDoubleSpinBox *four = nullptr, - QDoubleSpinBox *five = nullptr, QDoubleSpinBox *six = nullptr); - -#ifdef WITH_PYTHON - DLFLScriptEditor *mScriptEditor; //!< ScriptEditor Object by Stuart - QDockWidget *mScriptEditorDockWidget; //!< docked script editor window for Python Scripting interface by Stuart -#endif - -#ifdef WITH_VERSE - VerseTopMod *mVerseDialog; //!< for a possible future implementation of the Verse protocol http://verse.blender.org - QDockWidget *mVerseDialogDockWidget; //!< for a possible future implementation of the Verse protocol http://verse.blender.org -#endif - - QDockWidget *mToolOptionsDockWidget; //!< the floating window that displays the current tool's options (spinboxes, checkboxes, etc...) - QStackedWidget *mToolOptionsStackedWidget; //!< the widget that references each tool option widget and handles switching the display - - QDockWidget *mStartupDialogDockWidget; - QWidget *mStartupDialogWidget; - QGridLayout *mStartupDialogLayout; - bool mShowStartupDialogAtStartup; - QLabel *mQuickTimeLabel; - QLabel *mDownloadQuickTimeLabel; - -protected: - void closeEvent(QCloseEvent *event); //!< what will execute when the main window is closed (on application exit/quit) - - SpinBoxMode mSpinBoxMode; //!< enum to store which spinbox mode we are in. e.g. 1, 2, 3, 4, 5, to allow mouse motion to update the values - - // Renderers - static WireframeRendererPtr sWiredRenderer; //!< WireframeRenderer - static NormalRendererPtr sNormalRenderer; //!< Normal Renderer - white color - like a "hidden line" view - static LitRendererPtr sLitRenderer; //!< Lit Renderer - static TexturedRendererPtr sTexturedRenderer; //!< Textured Renderer - static TexturedLitRendererPtr sTexturedLitRenderer; //!< Textured and Lit Renderer - static PatchRendererPtr sPatchRenderer; //!< Bezier Patch Display - static ColorableRendererPtr sColorableRendererr; //!< face colors... new ... by dave... 11/07 - - BasicsMode *mBasicsMode; //!< widget that holds all displayable option widgets for basic operating modes (InsertEdge, DeleteEdge, CollapseEdge, ConnectEdges, etc...) - ExtrusionsMode *mExtrusionsMode; //!< widget that holds all displayable option widgets for the extrusion operation modes - ConicalMode *mConicalMode; //!< for future implementation of Ozgur's Conical/Planar modeling modes. - RemeshingMode *mRemeshingMode; //!< widget that holds all displayable option widgets for all remeshing modes - HighgenusMode *mHighgenusMode; //!< high genus operation options (e.g. wireframe, sierpinsky, add handle) - TexturingMode *mTexturingMode; //!< \todo texturing mode widgets (not working at the moment) - ExperimentalMode *mExperimentalMode; //!< experimental mode widgets like the new paint bucket tool dave 11.07 - - QShortcutManager *mShortcutManager; //!< Stuff for the shortcut manager test - - QStandardItemModel *mActionModel; //!< stores all the actions in topmod. sent to CommandCompleter class in order to create an index of the possible actions based on the text and icon associated with each action - QWidget *mActionListWidget; //!< widget that stores all actions availabe in topmod for CommandCompleter autocompletion functionality - -private: - //document modified - bool mIsModified; //!< bool to stop program from exiting if file has been edited but not saved - bool mIsPrimitive; //!< bool to stop program from exiting if file has been edited but not saved - bool mWasPrimitive; //!< bool to stop program from exiting if file has been edited but not saved, used in DLFLUndo.cc - bool mAutoSave, mIncrementalSave; - int mIncrementalSaveMax; - QTimer *mAutoSaveTimer; - int mAutoSaveDelay; - QString mSaveDirectory; - bool mCommandCompleterIndexToggle; - bool mSingleClickExtrude; - - - void createActions(); //!< create all MainWindow actions for menu's and icons, also create operating mode actions in subclasses - void createMenus(); //!< create top-level QMenuBar and add actions to each QMenu - void createToolBars(); //!< create toolbars with large icons for one-click operations - void createStatusBar(); //!< status bar will display extra info about what different operations or buttons do in TopMod interface - bool maybeSave(); //!< save before exit? - void initializeHelp(); //!< initialize the help files / create index / load html files - - void createStartupDialog(); //!< initialize the startup screen that will show links to beginner video tutorials / will include link to quicktime website and "disable checkbox" - void initializeAnimatedHelp(); //!< initialize the in-context help animated screen captures. these will display in a small floatable window to the right - - //QAssistantClient *mAssistantClient; //!< Qt help file viewer, will display html files created by DocBook xml transformation - - //top level and sublevel menus - QMenuBar *mMenuBar; //!< the main menubar pointer to which all qmenu's will be added - QMenu *mFileMenu; //!< the file menu which contains save, save as, quit etc... - QMenu *mExportMenu; - QMenu *mEditMenu; //!< undo, redo, clear undo list, and also preferences (except on os/x) - QMenu *mDisplayMenu; //!< all viewport display functionality (HUD, IDs, renderer, verts, faces, normals, etc...) - QMenu *mViewMenu; //!< probably going to remove... but could contain choices for which view to use (persp or left / right /top/ bottom etc...) - QMenu *mShowIDsMenu; //!< submenu of mDisplayMenu - QMenu *mRendererMenu; //!< now a submenu of mDisplayMenu - QMenu *mPrimitivesMenu; //!< stores actions for one-click loading of primitive objects - QMenu *mNewMenu; //!< stores same actions as the primitives menu plus a "new file" command that loads a blank object - QMenu *mObjectMenu; //!< \todo needs to be removed. not necessary - QMenu *mSelectionMenu; //!< all different selection options - QMenu *mSelectionMaskMenu; //!< \todo figure out how to integrate a selection mask functionality into the current implementation of mode switching in TopMod - QMenu *mLanguageMenu; //!< \todo add multi-lingual support using Qt's Linguist application and make dynamic language changing possible... could be very difficult to do... - QMenu *mWindowMenu; //!< menu choices for hiding and showing all floating windows and toolbars / also fullscreen mode - QMenu *mHelpMenu; //!< about TopMod, about Qt, Local documentation, Online documentation - - QMenu *mRightClickMenu; - -#ifdef WITH_VERSE - QMenu *mVerseMenu; -#endif - - QMenu *mRemeshingMenu; - QMenu *mToolsMenu; - - //File Menu Actions - QAction *mNewFileAct; - QAction *mOpenAct; - QAction *mSaveAct; - QAction *mSavePatchesAct; - QAction *mSaveLG3dAct; - QAction *mSaveLG3dSelectedAct; - QAction *mExportSTLAct; - QAction *mScreenshotViewportAct; - QAction *mScreenshotAppAct; - QAction *mSaveAsAct; - QAction *mLoadTextureAct; - QAction *mPrintInfoAct; - QAction *mPrintFaceListAct; - QAction *mPrintVertexListAct; - QAction *mPrintEdgeListAct; - QAction *mPrintCVListAct; - QAction *mExitAct; - - QAction *mFullscreenAct; - QAction *mPerformRemeshingAct; - QAction *mPerformExtrusionAct; - QAction *mSubdivideSelectedFacesAct; - QAction *mPaintSelectedFacesAct; - QAction *mClearMaterialsAct; - QAction *mExtrudeMultipleAct; //!< temporary for now... not sure how to handle this in the future... - QAction *mQuickCommandAct; - - //Edit Menu Actions - QAction *mDeleteSelectedAct; //!< delete the selected objects. - QAction *mUndoAct; //!< pop the previous model state off the undo stack - QAction *mRedoAct; //!< push the model back onto the undo stack - QAction *mClearUndoListAct; //!< clear the undo list to free up memory - - //view switching actions - QAction *mTopViewAct; //!< switch to top view - QAction *mBottomViewAct; //!< switch to bottom view - QAction *mLeftViewAct; //!< switch to left view - QAction *mRightViewAct; //!< switch to right view - QAction *mFrontViewAct; //!< switch to front view - QAction *mBackViewAct; //!< switch to back view - QAction *mPerspViewAct; //!< switch to perspective view or reset the current one - - QAction *mZoomInAct; - QAction *mZoomOutAct; - - //Display Menu Actions - QAction *mShowVerticesAct; - QAction *mShowFaceIDsAct; - QAction *mShowEdgeIDsAct; - QAction *mShowVertexIDsAct; - QAction *mShowSelectedIDsAct; - QAction *mShowSilhouetteAct; - QAction *mShowWireframeAct; - QAction *mObjectOrientationAct; - QAction *mShowNormalsAct; - QAction *mShowGridAct; - QAction *mShowHUDAct; - QAction *mShowCoordinateAxesAct; -#ifdef GPU_OK - QAction *mUseGPUAct; -#endif - QAction *mAntialiasingAct; - - QAction *mShowFaceCentroidsAct; - - //Renderer Menu Actions - QAction *mWireframeRendererAct; - QAction *mNormalRendererAct; - QAction *mShadedRendererAct; - QAction *mLightedRendererAct; - QAction *mTexturedRendererAct; - QAction *mTexturedLightedAct; - QAction *mPatchRendererAct; - QAction *mColorableRendererAct; - - //Primitives Menu Actions - QAction *mPrimCubeAct; - QAction *mPrimDodecahedronAct; - QAction *mPrimIcosahedronAct; - QAction *mPrimTetrahedronAct; - QAction *mPrimSoccerBallAct; - QAction *mPrimOctahedronAct; - QAction *mPrimGeodesicAct; - - //Object Menu Actions - QAction *mSubdivideAllEdgesAct; - QAction *mPlanarizeAllFacesAct; - QAction *makeObjectSphericalAct; - QAction *mCleanup2gonsAct; - QAction *mCleanupWingedVerticesAct; - QAction *mSplitValence2VerticesAct; - QAction *mMakeObjectSmoothAct; - QAction *mMakeWireframeAct; - QAction *mMakeColumnsAct; - QAction *mMakeSierpinskiAct; - QAction *mCreateCrustThicknessAct; - QAction *mCreateCrustScalingAct; - QAction *mPerformCuttingAct; - QAction *mComputeLightingAct; - QAction *mComputeNormalsAndLightingAct; - QAction *mAssignTextureCoordinatesAct; - - //Selection Menu Actions - QAction *mSelectVertexAct; - QAction *mSelectMultipleVerticesAct; - QAction *mSelectMultipleAct; - QAction *mEditVertexAct; - QAction *mSelectFaceAct; - QAction *mSelectFaceLoopAct; - QAction *mSelectEdgeRingAct; - QAction *mSubdivideSelectedEdgesAct; //!< subdivide the selected edges. - QAction *mCollapseSelectedEdgesAct; //!< collapse the selected edges. - QAction *mSelectMultipleFacesAct; - QAction *mSelectSimilarFacesAct; - QAction *mSelectSimilarAct; - QAction *mSelectFacesByAreaAct; - QAction *mSelectFacesByColorAct; - QAction *mSelectionWindowAct; - QAction *mSelectCheckerboardFacesAct; - QAction *mSelectAllAct; - QAction *mGrowSelectionAct; - QAction *mShrinkSelectionAct; - QAction *mSelectInverseAct; - QAction *mSelectEdgeAct; - QAction *mSelectMultipleEdgesAct; - QAction *mSelectEdgeLoopAct; - QAction *mSelectCornerAct; - QAction *mClearSelectedModeAct; - QAction *mExitSelectionModeAct; - QAction *mSelectEdgesFromFacesAct; - QAction *mSelectEdgesFromVerticesAct; - QAction *mSelectFacesFromEdgesAct; - QAction *mSelectFacesFromVerticesAct; - QAction *mSelectVerticesFromFacesAct; - QAction *mSelectVerticesFromEdgesAct; - - //selection mask actions - QAction *mSelectVerticesMaskAct; - QAction *mSelectFacesMaskAct; - QAction *mSelectEdgesMaskAct; - QAction *mSelectCornersMaskAct; - - //Language Menu actions; - QActionGroup *mLanguageActionGroup; - QAction *mEnglishAct; - QAction *mSpanishAct; - QAction *mGermanAct; - QAction *mFrenchAct; - QAction *mHindiAct; - QAction *mItalianAct; - QAction *mTurkishAct; - QAction *mCatalanAct; - - //help menu - QAction *mAboutQtAct; - QAction *mHelpAct; - QAction *mTopModWebAct; - QAction *mVideoTutorialsAct; - QAction *mTopModResearchAct; - QAction *mCheckForUpdatesAct; - QAction *mAboutAct; - -#ifdef WITH_VERSE - //verse menu actions - QAction *mVerseConnectLocalhostAct; - QAction *mVerseConnectAct; - QAction *mVerseDisconnectAct; - QAction *mVerseDisconnectAllAct; - QAction *mVerseStartServerAct; - QAction *mVerseKillServerAct; -#endif - - //Window Menu - toolbar display - QAction *mEditToolBarAct; - QAction *mSelectionMaskToolBarAct; - QAction *mPrimitivesToolBarAct; - QAction *mToolsToolBarAct; - QAction *mExtrusionToolBarAct; - QAction *mConicalToolBarAct; - QAction *mHighgenusToolBarAct; - QAction *mTexturingToolBarAct; - QAction *mExperimentalToolBarAct; - QAction *mRemeshingToolBarAct; - QAction *mHideToolBarsAct; - QAction *mShowToolBarsAct; - - QWidget *mToolOptionsTitleBarWidget; - QBoxLayout *mToolOptionsTitleBarLayout; - - //QToolbars - QToolBar *mEditToolBar; - QToolBar *mSelectionMaskToolBar; - QToolBar *mPrimitivesToolBar; - QToolBar *mToolsToolBar; - QToolBar *mExtrusionToolBar; - QToolBar *mConicalToolBar; - QToolBar *mHighgenusToolBar; - QToolBar *mTexturingToolBar; - QToolBar *mExperimentalToolBar; - QToolBar *mRemeshingToolBar; - - //QActionGroups - QActionGroup *mToolsActionGroup; - QActionGroup *mRendererActionGroup; - QActionGroup *mRemeshingActionGroup; - QActionGroup *mSelectionMaskActionGroup; - - //the status bar - QStatusBar *mStatusBar; - -#ifdef WITH_PYTHON - QAction *mShowScriptEditorAct; -#endif - -#ifdef WITH_VERSE - QAction *mShowVerseDialogAct; -#endif - - QAction *mShowToolOptionsAct; - QAction *mShowStartupDialogAct; - - StyleSheetEditor *mStyleSheetEditor; - QAction *mEditStyleSheetAct; - TopModPreferences *mPreferencesDialog; - QAction *mPreferencesAct; - QSettings *mSettings; - #ifdef QCOMPLETER - CommandCompleter *mCommandCompleter; - #endif - QStringList mCommandList; - - //popup helper animations - QMovie *mAnimatedHelpMovie; - QLabel *mAnimatedHelpLabel; - QWidget *mAnimatedHelpWidget; - QVBoxLayout *mAnimatedHelpLayout; - QDockWidget *mAnimatedHelpDockWidget; - QAction *mShowAnimatedHelpAct; - - std::array mSpinBoxes = {}; - - //startup dialog actions for loading movies - QAction *mTutorialNavigationAct; - QAction *mTutorialInterfaceAct; - QAction *mTutorialBasicAct; - QAction *mTutorialExtrusionAct; - QAction *mTutorialRemeshingAct; - QAction *mTutorialHighgenusAct; - QAction *mTutorialTexturingAct; - //associated toolbuttons - QToolButton *mTutorialNavigationButton; - QToolButton *mTutorialInterfaceButton; - QToolButton *mTutorialBasicButton; - QToolButton *mTutorialExtrusionButton; - QToolButton *mTutorialRemeshingButton; - QToolButton *mTutorialHighgenusButton; - QToolButton *mTutorialTexturingButton; - QCheckBox *mShowStartupDialogAtStartupCheckBox; - - //translation stuff for future - QTranslator *mTranslator_es; //!< \todo translation widget spanish - QTranslator *mTranslator_fr; //!< \todo translation widget french - QTranslator *mTranslator_de; //!< \todo translation widget german - QTranslator *mTranslator_tr; //!< \todo translation widget turkish - QTranslator *mTranslator_ca; //!< \todo translation widget catalan - QTranslator *mTranslator_it; //!< \todo translation widget italian - QTranslator *mTranslator_hi; //!< \todo translation widget hindi - - //for screenshots - QPixmap mViewportPixmap; - QPixmap mAppPixmap; - - //paint bucket tool dave //11.07 - // QColor mPaintBucketColor; - -public slots: - - bool viewportScreenshot(); //!< take a screenshot of just the opengl viewport - bool appScreenshot(); //!< take a screenshot of the whole app (for forum posting and bug reports) - - //brand new stuff - dave - 9/12/07 - void setAutoSave(int value); - void setAutoSaveDelay(double value); - void setIncrementalSave(int value); - void setCommandCompleterIndexToggle(int value); - void setSingleClickExtrude(int value); - void setIncrementalSaveMax(double value); - void setSaveDirectory(QString s); - void checkSaveDirectory(); - - - // i18n stuff - void changeLanguage(const QString &string); - void setLanguageSpanish(); - void setLanguageFrench(); - void setLanguageGerman(); - void setLanguageTurkish(); - void setLanguageItalian(); - void setLanguageCatalan(); - void setLanguageHindi(); - void setLanguageEnglish(); - - void about(); //!< \todo topmod developer credits - void help(); //!< open the qtassistantclient help viewer - void checkForUpdates(); //!< check for updates on the topMod home page - void topModWeb(); //!< open the TopMod web page in the default browser - void topModBlip(); //!< open the http://topmod.blip.tv web page - void topModResearch(); //!< open the TopMod research web page in the default browser - void documentWasModified(); - void toggleFullScreen(); //!< fullscreen mode in the mainwindow class... this is a test... - - void getCommand(); //!< this will open up the quicksilver like interface and accept a value from the user - - void setAnimatedHelpImage(); - - void showAllToolBars(); - void hideAllToolBars(); - - bool getShowStartupDialogAtStartup(); - void setShowStartupDialogAtStartup(int b); - //load the seven basic tutorial movies - void loadNavigationTutorial(); - void loadInterfaceTutorial(); - void loadBasicTutorial(); - void loadExtrusionTutorial(); - void loadRemeshingTutorial(); - void loadHighgenusTutorial(); - void loadTexturingTutorial(); - - void load_texture(); - //renderers - void useWireframeRenderer(); - void useNormalRenderer(); - void useLightedRenderer(); - void useTexturedRenderer(); - void useTexturedLitRenderer(); - void usePatchRenderer(); - void useColorableRenderer(); - - void select_vertex(); - void select_multiple_vertices(); - void select_multiple(); - void edit_vertex(); - void select_face(); - void select_face_loop(); - void select_edge_ring(); - void select_multiple_faces(); - void select_similar_faces(); - void select_similar(); - void select_faces_by_area(); - void select_faces_by_color(); - void selection_window(); - void select_checkerboard_faces(); - void select_edge(); - void select_multiple_edges(); - void select_edge_loop(); - void select_corner(); - void exit_selection_mode(); - void clear_selected(); - void selectionMaskVertices(); - void selectionMaskFaces(); - void selectionMaskEdges(); - void selectionMaskCorners(); - void selectAll(); - void growSelection(); - void shrinkSelection(); - void selectInverse(); - void selectEdgesFromFaces(); - void selectEdgesFromVertices(); - void selectFacesFromEdges(); - void selectFacesFromVertices(); - void selectVerticesFromFaces(); - void selectVerticesFromEdges(); - void reorderSelectedFaces(); - - void setPaintBucketColor(QColor c); - void paintSelectedFaces(); - void clearMaterials(); - - void deleteSelected(); //!< delete selected objects - void collapseSelectedEdges(); //!< collapse selected edges - - //Basics Widget - void toggleDeleteEdgeCleanupFlag(int state); - void changeNumSubDivs(double value); - void changeCornerCuttingAlpha(double value); - - void changeTileTexNum(double value); - void toggleUseQuadsFlag(int state); - - void changeFaceAreaTolerance(double value); //!< dave - facial area calculation - - // Extrusion - void changeExtrudeLength(double value); - void changeExtrudeRotation(double value); - void changeExtrudeScale(double value); - void changeNumExtrusions(double value); - void changeStellateLength(double value); - void toggleDualMeshEdgesFlag(int state); - void toggleHexagonalizeDodecaExtrudeFlag(int state); - void changeExtrudeLength1(double value); - void changeExtrudeLength2(double value); - void changeExtrudeLength3(double value); - void changeExtrudeAngle(double value); - void changeExtrudeLength1Icosa(double value); - void changeExtrudeLength2Icosa(double value); - void changeExtrudeLength3Icosa(double value); - void changeExtrudeAngleIcosa(double value); - - void changeValence2SplitOffset(double value); - void toggleWireframeSplit(int state); - - void changeNumSegments(double value); - void changeMaxSegments(double value); - void changeNumSegments2(double value); - void changeMaxSegments2(double value); - void changeWeight1(double value); - void toggleSymmetricWeightsFlag(int state); - void changeWeight2(double value); - void changeExtraTwists(double value); - - //pinching - void changePinch(double value); //Ryan - void changePinchCenter(double value); //Ryan - void changeBubble(double value); //Ryan - void changeHoleHandlePinchValue(double value); //Ryan - void changeHoleHandlePinchCenterValue(double value); //Ryan - void changeHoleHandlePinchWidthValue(double value); //Ryan - - void changeCrustScaleFactor(double value); - void changeCrustThickness(double value); - void toggleCrustCleanupFlag(int state); - - void changeWireframeThickness(double value); - void changeWireframe2Width(double value); - void changeWireframe2Thickness(double value); - void changeModifiedCornerCuttingThickness(double value); - - void changeColumnThickness(double value); // Esan - void changeColumnSegments(double value); // Esan - - void changeMultiFaceHandleScaleFactor(double value); - void changeMultiFaceHandleExtrudeDist(double value); - void toggleMultiFaceHandleUseMaxOffsetFlag(int state); - - void changeMengerSpongeThickness(double value); - void toggleMengerSpongeFractionalThicknessFlag(int state); - void changeMengerSpongeCollapseThreshold(double value); - - void on_editStyleAction_triggered(); // stylesheet editor - void openPreferences(); - - void changeCutOffsetE(double value); //ozgur - void changeCutOffsetV(double value); //ozgur - void changePNormalBendS(double value); //ozgur - void changePNormalBendT(double value); //ozgur - void toggleGlobalCut(int state); //ozgur - void toggleSelectedCut(int state); //ozgur - void changeTiltPlane1(double value); //dave - void changeTiltPlane2(double value); //dave - - //remeshing slot functions - void toggleDooSabinEdgeFlag(int state); - void changeRoot4Twist(double value); - void changeRoot4Weight(double value); - void changeVertexCuttingOffset(double value); - void changePentagonalOffset(double value); - void changePentagonalScaleFactor(double value); - void changeStarOffset(double value); // Doug - void changeFractalOffset(double value); // Doug - void changeSubStellateAmount(double value); // Eric - void changeSubStellateCurve(double value); // Eric - void changeDooSabinBCnewScale(double value); // Bei & Cansin - void changeDooSabinBCnewLength(double value); // Bei & Cansin - void changeLoopStyleSubdivisionLength(double value); // Bei & Cansin - void changeDual1264Scale(double value); // Bei & Cansin - void changeDomeSubdivisionLength(double value); // Bei & Cansin - void changeDomeSubdivisionScale(double value); // Bei & Cansin - void changeDomeExtrudeLength(double value); // dave - void changeDomeExtrudeRotation(double value); // dave - void changeDomeExtrudeScale(double value); // dave - void changeDooSabinExtrudeTwist(double value); // dave - void toggleAccurateDualFlag(int state); - - //right click menu support coming soon... - void mousePressEvent(QMouseEvent * event); - void mouseReleaseEvent(QMouseEvent * event); - void mouseMoveEvent(QMouseEvent * event); - - void keyPressEvent(QKeyEvent *event); - void keyReleaseEvent(QKeyEvent *event); - - void dragEnterEvent(QDragEnterEvent *event); - void dropEvent(QDropEvent *event); - - void getRightClickMenu(); - -#ifdef WITH_VERSE - void verseConnected(); - void verseDisconnected(); - void verseStarted(); - void verseKilled(); -#endif - - void switchPerspView(); - void switchTopView(); - void switchBottomView(); - void switchRightView(); - void switchLeftView(); - void switchFrontView(); - void switchBackView(); - - // void writeObjectOBJ(const char * filename, bool with_normals=false, bool with_tex_coords=false); - // void writeObjectDLFL(const char * filename); - void setUndoLimit(int limit); - void toggleUndo(); - - void clearUndoList(); // Erase all elements on Undo list - void clearRedoList(); // Erase all elements on Redo list - void undoPush(); // Put current object onto undo list - void undo(); // Undo last operation - void redo(); // Redo previously undone operation - - // Change the renderer for all viewports - void setRenderer(DLFLRendererPtr rp); - // void setPatchRenderer(); // just testing out the signals/slots functionality of Qt - - // Do appropriate selection depending on current mode - // Mouse position is passed. Selected entities will be added - // to the selection lists in the GLWidget class, which are assumed - // to have been cleared before calling this function - void doSelection(int x, int y); - void doDrag(int x, int y); - - // Return pointer to the active GLWidget - GLWidget *getActive(); - - void redraw(); //!< Override redraw() method to mark subwindows also for redraw - - // Geometric transformations - void translatex(double x); - void translatey(double y); - void translatez(double z); - void scalex(double x); - void scaley(double y); - void scalez(double z); - void freezeTransforms(); - - // Global operations (don't require selection) - -#ifdef WITH_PYTHON - // run after an operation is done via python - void recomputeAll() { - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - }; -#endif - - // void recomputeNormals(); - // void recomputeLighting(); - // void recomputePatches(); - void subdivideAllEdges(); - void subdivideSelectedEdges(); - void subdivideSelectedFaces(); - void subdivideAllFaces(); - void createMultiFaceHandle(); - void multiConnectMidpoints(); - void multiConnectCrust(); - void modifiedMultiConnectCrust(); - void createSponge(); - void planarizeFaces(); - - void spheralizeObject(); - void smoothMesh(); - void performRemeshing(); //!< Generic method for all remeshing schemes - void performExtrusion(); //!< Generic method for all extrusion schemes on multiple faces - //void getExtrudeMultiple(); //!< are we in multi select mode or not? - void subdivideCatmullClark(); - void subdivideDooSabin(); - void subdivideHoneycomb(); - void subdivideRoot4(); - void subdivideCornerCutting(); - void subdivideModifiedCornerCutting(); - void subdivideLinearVertexInsertion(); - void subdivideSimplest(); - void subdivideVertexCutting(); - void subdividePentagonal(); - void subdivideCubicPentagonal(); - void subdivideDualPentagonal(); - void subdividePentagonPreserving(); - void subdivideDualPentagonPreserving(); - void subdivideDualHexagonPreserving(); - void subdivideRoot3(); - void subdivideLoop(); - void subdivideDualLoop(); - void subdivide1264(); - void subdivideDual1264(); - void subdivideCheckerBoard(); - void subdivideDualCheckerBoard(); - void subdivideStar(); - void subdivideSqrt3(); - void subdivideFractal(); - void subStellate1(); - void subStellate2(); - void subdivideDome(); - void subdivideDooSabinBC(); - void subdivideDooSabinBCNew(); - void subdivideLoopStyle(); - void globalStellate(); - void triangulate(); - void splitValence2Vertices(); - void cleanupWingedVertices(); - void cleanup2gons(); - void createDual(); - void crustModeling1(); - void crustModeling2(); - void crustModeling3(); - void crustModeling4(); - void createCrust(bool use_scaling=false); - void createCrust2(bool use_scaling=false); - void makeWireframe(); - void makeWireframe2(); - void makeWireframeWithColumns(); - // void makeUnitCube(double edgelength); - // void makeUnitTetrahedron(double edgelength); - // void makeMengerSponge(int level); - // void makeSierpinskiTetrahedron(int level); - void randomAssignTexCoords(); - void assignTileTexCoords(); - void edgeCleanup(); - void printSummary(); - void printVertexList(); - void printEdgeList(); - void printCVList(); - void printFaceList(); - - void mfh_use_closest_edge_algo(); - void mfh_use_convex_hull_algo(); - - //conical functions from ozgur - void performCutting(); - void createConvexHull(); - void createDualConvexHull(); - void testConvexHull(); - - // File handling - void openFile(); - void openFile(const QString &fileName); - bool saveFile(const QString &fileName); - void newFile(); - bool saveFile(bool with_normals=true, bool with_tex_coords=true); - bool saveFileAs(bool with_normals=true, bool with_tex_coords=true); - void setCurrentFile(const QString &fileName); - - // Read the DLFL object from a file - void readObject(const char * filename, const char *mtlfilename = nullptr); - void readObjectQFile(const QString &file); - // Read the DLFL object from a file - use alternate OBJ reader for OBJ files - void readObjectAlt(const char * filename); - // Write the DLFL object to a file - void writeObject(const char * filename, const char *mtlfilename = nullptr, bool with_normals=true, bool with_tex_coords=true); - void writeMTL(const char * filename); - - //exporters - bool saveFileBezierOBJ( ); - bool saveFileLG3d( ); - bool saveFileLG3dSelected(); - bool saveFileSTL( ); - void writePatchOBJ(const char *filename); - void writeLG3d(const char *filename, bool selected = false); - void writeSTL(const char *filename); - - //primitive slot functions finally work - void loadCube(); - void loadOctahedron(); - void loadTetrahedron(); - void loadDodecahedron(); - void loadIcosahedron(); - void loadSoccerball(); - void loadGeodesic(); - -signals: -#ifdef WITH_PYTHON - void loadedObject( DLFLObject *obj, QString fileName ); // echo command for loading object -#endif - void echoCommand( QString cmd ); // all other commands - -}; - -#endif diff --git a/topmodx/src/MainWindowCallbacks.cc b/topmodx/src/MainWindowCallbacks.cc deleted file mode 100644 index 39d7722..0000000 --- a/topmodx/src/MainWindowCallbacks.cc +++ /dev/null @@ -1,2514 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: MainWindowCallbacks.cc,v 4.13 2004/01/20 22:18:36 vinod Exp $ */ - -// Definitions for callback functions in the MainWindow class -// All these are static methods - -#include "MainWindow.h" - -void MainWindow::load_texture() -{ - QString fileName = QFileDialog::getOpenFileName( - this, tr("Open File..."), "$HOME", - tr("All Supported Files (*.jpg *.png);;JPEG Files (*.jpg);;PNG Files (*.png);;All Files (*)"), - 0, QFileDialog::DontUseSheet); - - if (!fileName.isEmpty()) - { - // undoPush(); - QByteArray ba = fileName.toLatin1(); - const char *texfile = ba.data(); - if (texfile != nullptr) - { - sTexturedRenderer->setTexture(texfile); - sTexturedLitRenderer->setTexture(texfile); - // getActive()->valid(0); // To ensure new texture is loaded into OpenGL - redraw(); - } - // readObject(filename); - // active->recomputePatches(); - // active->recomputeNormals(); - // //loadFile(fileName); - // active->redraw(); - } -} - -// void DLFLAppWindow::load_texture(Fl_Menu_*, void*) -// { -// char * texfile = fl_file_chooser("Load Texture","*.{jpg,png}",""); -// if (texfile != nullptr) -// { -// textured->setTexture(texfile); -// texturedlit->setTexture(texfile); -// mainWindowPtr->getActive()->valid(0); // To ensure new texture is loaded into OpenGL -// mainWindowPtr->redraw(); -// Fl::focus(mainWindowPtr); -// } -// } - -//use a specific renderer... -void MainWindow::useWireframeRenderer() -{ - setRenderer(sWiredRenderer); - redraw(); -} - -void MainWindow::useNormalRenderer() -{ - setRenderer(sNormalRenderer); - redraw(); -} - -void MainWindow::useLightedRenderer() -{ - mActiveViewport->recomputeNormals(); - setRenderer(sLitRenderer); - redraw(); -} - -void MainWindow::useTexturedRenderer() -{ - setRenderer(sTexturedRenderer); - redraw(); -} - -void MainWindow::useTexturedLitRenderer() -{ - setRenderer(sTexturedLitRenderer); - redraw(); -} - -void MainWindow::usePatchRenderer() -{ - setRenderer(sPatchRenderer); - redraw(); -} - -void MainWindow::useColorableRenderer() -{ - setRenderer(sColorableRendererr); - redraw(); -} - -//preference functions for topmodpreferences - dave -void MainWindow::setAutoSave(int value) -{ - //start the timer if it's ON - //stop timer if it's OFF - mAutoSave = bool(value); - if (mAutoSave) - mAutoSaveTimer->start(); - else - mAutoSaveTimer->stop(); -} - -//this value is sent in minutes... so multiply it by 6000! -void MainWindow::setAutoSaveDelay(double value) -{ - mAutoSaveDelay = value; - mAutoSaveTimer->setInterval(mAutoSaveDelay * 60000); - // mAutoSaveTimer->setInterval(5000); -} - -//incremental save will just save a new file each time... -void MainWindow::setIncrementalSave(int value) -{ - mIncrementalSave = (bool)value; -} - -void MainWindow::setIncrementalSaveMax(double value) -{ - mIncrementalSaveMax = (int)value; -} - -void MainWindow::setSaveDirectory(QString s){ - mSaveDirectory = s; -} - -void MainWindow::checkSaveDirectory() -{ - QDir dir(mSaveDirectory); - if (dir.exists()) - { - // std::cout<<"good job\n"; - } - else - { - QString s = QString( - "Directory\n\n%1\n\ndoes not exist, "\ - "please type a different directory name.\n\n"\ - "Check to make sure there are no unnecessary spaces at the end.").arg(mSaveDirectory); - QMessageBox::about(this, tr("TopMod Error"), s); - } -} - -void MainWindow::setCommandCompleterIndexToggle(int value) -{ - //stuff here...? - // std::cout << "toggle command completer thing\n"; - mCommandCompleterIndexToggle = (bool)value; -} - -//dave -void MainWindow::changeValence2SplitOffset(double value) -{ - MainWindow::sVertexSplitOffset = value; -} - -void MainWindow::changeCornerCuttingAlpha(double value) -{ - MainWindow::sCornerCuttingAlpha = value; -} - -void MainWindow::changeDomeExtrudeLength(double value) -{ - MainWindow::sDomeExtrudeLengthFactor = value; -} - -void MainWindow::changeDooSabinExtrudeTwist(double value) -{ - MainWindow::sDooSabinExtrusionTwist = value; -} - -void MainWindow::changeDomeExtrudeScale(double value) -{ - MainWindow::sDomeExtrudeScaleFactor = value; -} - -void MainWindow::changeDomeExtrudeRotation(double value) -{ - MainWindow::sDomeExtrudeRotationFactor = value; -} - -void MainWindow::setSingleClickExtrude(int value) -{ - mSingleClickExtrude = (bool)value; -} - -// Selection Menu. -void MainWindow::select_vertex() -{ - setMode(MainWindow::SelectVertex); -} - -void MainWindow::edit_vertex() -{ - setMode(MainWindow::EditVertex); -} - -void MainWindow::select_face() -{ - setMode(MainWindow::SelectFace); -} - -void MainWindow::select_face_loop() -{ - setMode(MainWindow::SelectFaceLoop); -} - -void MainWindow::select_edge_ring() -{ - setMode(MainWindow::SelectEdgeRing); -} - -void MainWindow::select_multiple_faces() -{ - setMode(MainWindow::MultiSelectFace); -} - -void MainWindow::select_multiple() -{ - switch (mSelectionMask) - { - case MaskVertices: - setMode(MainWindow::MultiSelectVertex); - break; - case MaskEdges: - setMode(MainWindow::MultiSelectEdge); - break; - case MaskFaces://face stuff - setMode(MainWindow::MultiSelectFace); - break; - case MaskCorners: - break; - default: - break; - } -} - -void MainWindow::select_multiple_edges() -{ - setMode(MainWindow::MultiSelectEdge); -} - -void MainWindow::select_multiple_vertices() -{ - setMode(MainWindow::MultiSelectVertex); -} - -void MainWindow::select_similar_faces() -{ - // setMode(MainWindow::SelectSimilarFaces); -} - -void MainWindow::select_similar() -{ - // switch(selectionmask){ - // case MaskFaces: - setMode(MainWindow::SelectSimilar); - // break; - // case MaskEdges: - // setMode(MainWindow::SelectSimilarEdges); - // break; - // case MaskVertices: - // setMode(MainWindow::SelectSimilarVertices); - // break; - // default: - // break; - // }; -} - -void MainWindow::select_faces_by_area() -{ - setMode(MainWindow::SelectFacesByArea); -} - -void MainWindow::select_faces_by_color() -{ - setMode(MainWindow::SelectFacesByColor); -} - -void MainWindow::selection_window() -{ - setMode(MainWindow::SelectionWindow); -} - -void MainWindow::select_checkerboard_faces() -{ - setMode(MainWindow::SelectCheckerboard); -} - -void MainWindow::select_edge() -{ - setMode(MainWindow::SelectEdge); -} - -void MainWindow::select_edge_loop() -{ - setMode(MainWindow::SelectEdgeLoop); -} - -void MainWindow::select_corner() -{ - setMode(MainWindow::SelectCorner); -} - -void MainWindow::selectionMaskVertices() -{ - // setSelectionMask(MainWindow::MaskVertices); - setMode(MainWindow::SelectVertex); -} - -void MainWindow::selectionMaskFaces() -{ - // setSelectionMask(MainWindow::MaskFaces); - setMode(MainWindow::SelectFace); -} - -void MainWindow::selectionMaskEdges() -{ - // setSelectionMask(MainWindow::MaskEdges); - setMode(MainWindow::SelectEdge); -} - -void MainWindow::selectionMaskCorners() -{ - // setSelectionMask(MainWindow::MaskCorners); - setMode(MainWindow::SelectCorner); -} - -void MainWindow::selectAll() -{ - switch (mSelectionMask) - { - case MaskVertices: - mActiveViewport->selectAllVertices(); - break; - case MaskEdges: - mActiveViewport->selectAllEdges(); - break; - case MaskFaces: - mActiveViewport->selectAllFaces(); - break; - case MaskCorners: - // active->selectAllCorners(); - case MaskObject: - break; - default: - // active->selectAllVertices(); - break; - } -} - -void MainWindow::selectInverse() -{ - switch (mSelectionMask) - { - case MaskVertices: - mActiveViewport->selectInverseVertices(); - break; - case MaskEdges: - mActiveViewport->selectInverseEdges(); - break; - case MaskFaces: - mActiveViewport->selectInverseFaces(); - break; - case MaskCorners: - mActiveViewport->selectInverseFaceVertices(); - case MaskObject: - break; - default: - // active->selectInverseVertices(); - break; - } -} - -void MainWindow::exit_selection_mode() -{ - setMode(MainWindow::NormalMode); - redraw(); -} - -void MainWindow::clear_selected() -{ - MainWindow::clearSelected(); - redraw(); -} - -//dave -void MainWindow::toggleWireframeSplit(int state) -{ - MainWindow::sWireframeSplit = bool(state); -} - -// Basics. -void MainWindow::toggleDeleteEdgeCleanupFlag(int state) -{ - MainWindow::sDeleteEdgeCleanup = bool(state); -} - -void MainWindow::changeNumSubDivs(double value) -{ - MainWindow::sNumEdgeSubdiv = (int)value; -} - -void MainWindow::changeFaceAreaTolerance(double value) -{ - MainWindow::sFaceAreaTolerance = value; -} - -void MainWindow::changeTileTexNum(double value) -{ - MainWindow::sTileTexSize = (int)value; -} - -// Extrusions. -void MainWindow::changeExtrudeLength(double value) -{ - MainWindow::sExtrudeDist = value; -} - -void MainWindow::changeExtrudeRotation(double value) -{ - MainWindow::sExtrudeRot = (int)value; -} - -void MainWindow::changeExtrudeScale(double value) -{ - MainWindow::sExtrudeScale = value; -} - -void MainWindow::changeExtrudeLength1(double value) -{ - MainWindow::sExtrudeLength1 = value; -} - -void MainWindow::changeExtrudeLength2(double value) -{ - MainWindow::sExtrudeLength2 = value; -} - -void MainWindow::changeExtrudeLength3(double value) -{ - MainWindow::sExtrudeLength3 = value; -} - -void MainWindow::changeExtrudeAngle(double value) -{ - MainWindow::sExtrudeAngle = value; -} - -void MainWindow::changeExtrudeLength1Icosa(double value) -{ - MainWindow::sExtrudeLength1_iCosA = value; -} - -void MainWindow::changeExtrudeLength2Icosa(double value) -{ - MainWindow::sExtrudeLength2_iCosA = value; -} - -void MainWindow::changeExtrudeLength3Icosa(double value) -{ - MainWindow::sExtrudeLength3_iCosA = value; -} - -void MainWindow::changeExtrudeAngleIcosa(double value) -{ - MainWindow::sExtrudeAngle_iCosA = value; -} - -void MainWindow::changeNumExtrusions(double value) -{ - MainWindow::sNumExtrusions = (int)value; -} - -void MainWindow::toggleDualMeshEdgesFlag(int state) -{ - MainWindow::sDualMeshEdgesCheck = bool(state); -} - -void MainWindow::toggleHexagonalizeDodecaExtrudeFlag(int state) -{ - MainWindow::sHexagonalizeDodecaExtrude = bool(state); -} - -// Stellation -void MainWindow::changeStellateLength(double value) -{ - MainWindow::sExtrudeDist = value; -} - -// Holes and Handles. -void MainWindow::changeMaxSegments(double value) -{ - MainWindow::sMaxSegments = (int)value; -} - -void MainWindow::changeNumSegments(double value) -{ - MainWindow::sNumSegments = (int)value; -} - -void MainWindow::changeNumSegments2(double value) -{ - -} - -void MainWindow::changeMaxSegments2(double value) -{ - -} - -void MainWindow::changeWeight1(double value) -{ - MainWindow::sFaceNormalWeight1 = value; -} - -void MainWindow::toggleSymmetricWeightsFlag(int state) -{ - MainWindow::sSymmetricWeights = bool(state); -} - -void MainWindow::changeWeight2(double value) -{ - MainWindow::sFaceNormalWeight2 = value; -} - -void MainWindow::changeExtraTwists(double value) -{ - MainWindow::sNumExtraTwists = (int)value; -} - -//added by Ryan -void MainWindow::changePinch(double value) -{ - MainWindow::sPinchingFactor = value; -} -void MainWindow::changePinchCenter(double value) -{ - MainWindow::sPinchCenter = value; -} -void MainWindow::changeBubble(double value) -{ - MainWindow::sBubbleFactor = value; -} -void MainWindow::changeHoleHandlePinchValue(double value) -{ - MainWindow::sHoleHandlePinchingFactor = value; -} -void MainWindow::changeHoleHandlePinchCenterValue(double value) -{ - MainWindow::sHoleHandlePinchCenter = value; -} -void MainWindow::changeHoleHandlePinchWidthValue(double value) -{ - MainWindow::sHoleHandlePinchWidth = value; -} -//end Ryan's stuff - -// Crust Modeling. -void MainWindow::changeCrustScaleFactor(double value) -{ - MainWindow::sCrustScaleFactor = value; -} - -void MainWindow::changeCrustThickness(double value) -{ - MainWindow::sCrustThickness = value; -} - -void MainWindow::toggleCrustCleanupFlag(int state) -{ - MainWindow::sCrustCleanup = bool(state); -} - -void MainWindow::crustModeling1() -{ - setMode(MainWindow::CrustModeling); - createCrust(true); - redraw(); -} - -void MainWindow::crustModeling2() -{ - setMode(MainWindow::CrustModeling); - createCrust(false); - redraw(); -} - -void MainWindow::crustModeling3() -{ - // setMode(MainWindow::CrustModelingPainting); - createCrust2(false); - redraw(); -} - -void MainWindow::crustModeling4() -{ - // setMode(MainWindow::CrustModelingPainting); - createCrust2(true); - redraw(); -} - -//for modified corner cutting scheme... it's the same as the first step in the wireframe process -void MainWindow::changeModifiedCornerCuttingThickness(double value) -{ - MainWindow::sModifiedCornerCuttingThickness = value; -} - -//column modeling and wireframe modeling -void MainWindow::changeWireframeThickness(double value) -{ - MainWindow::sWireframeThickness = value; -} - -void MainWindow::changeWireframe2Thickness(double value) -{ - MainWindow::sWireframe2Thickness = value; -} - -void MainWindow::changeWireframe2Width(double value) -{ - MainWindow::sWireframe2Width = value; -} - -void MainWindow::changeColumnThickness(double value) -{ - MainWindow::sColumnThickness = value; -} - -void MainWindow::changeColumnSegments(double value) -{ - MainWindow::sColumnSegments = (int)value; -} - -// Multi-face handle -void MainWindow::mfh_use_closest_edge_algo() -{ - MainWindow::sMfhAlgorithm = MainWindow::ClosestEdge; -} - -void MainWindow::mfh_use_convex_hull_algo() -{ - MainWindow::sMfhAlgorithm = MainWindow::ConvexHull; -} - -void MainWindow::changeMultiFaceHandleScaleFactor(double value) -{ - MainWindow::sMfhScaleFactor = value; -} - -void MainWindow::changeMultiFaceHandleExtrudeDist(double value) -{ - MainWindow::sMfhExtrudeDist = value; -} - -void MainWindow::toggleMultiFaceHandleUseMaxOffsetFlag(int state) -{ - MainWindow::sMfhUseMaxOffsets = bool(state); -} - -//menger sponge operations -void MainWindow::changeMengerSpongeThickness(double value) -{ - MainWindow::sSpongeThickness = value; -} - -void MainWindow::changeMengerSpongeCollapseThreshold(double value) -{ - MainWindow::sSpongeCollapseThreshold = value; -} - -void MainWindow::toggleMengerSpongeFractionalThicknessFlag(int state) -{ - MainWindow::sSpongeFractionalThickness = bool(state); -} - -/* begin ozgur */ -//sculpting operations from ozgur -//conical stuff from ozgur -void MainWindow::performCutting() -{ - // DLFLEdgePtrArray eparray; - // DLFLVertexPtrArray vparray; - // DLFLEdgePtrArray fparray; - - undoPush(); - setModified(true); - // void performCutting( DLFLObjectPtr obj, int type,float offsetE,float offsetV,bool global,bool selected) { - // DLFL::performCutting(&object, MainWindow::mode,MainWindow::cutOffsetE_factor,MainWindow::cutOffsetV_factor,MainWindow::global_cut,MainWindow::selected_cut); - switch (mSelectionMask) - { - case MaskEdges: - // std::cout << "cut by edge!\n"; - // active->getSelectedEdges(eparray); - DLFL::cutSelectedEdges(&mObject, MainWindow::sCutOffsetEdgeFactor, MainWindow::sCutOffsetVertFactor, MainWindow::sGlobalCut); - break; - case MaskVertices: - // std::cout << "cut by vertex!\n"; - // active->getSelectedVertices(vparray); - DLFL::cutSelectedVertices(&mObject, MainWindow::sCutOffsetEdgeFactor, MainWindow::sCutOffsetVertFactor, MainWindow::sGlobalCut); - break; - case MaskFaces: - // std::cout << "cut by face!\n"; - // active->getSelectedFaces(fparray); - DLFL::cutSelectedFaces(&mObject, MainWindow::sCutOffsetEdgeFactor, MainWindow::sCutOffsetVertFactor, MainWindow::sGlobalCut); - break; - default: - break; - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::createConvexHull() -{ - undoPush(); - setModified(true); - DLFL::createConvexHull(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::createDualConvexHull() -{ - undoPush(); - setModified(true); - DLFL::createDualConvexHull(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::changeCutOffsetE(double value) -{ - MainWindow::sCutOffsetEdgeFactor = value; -} - -void MainWindow::changeCutOffsetV(double value) -{ - MainWindow::sCutOffsetVertFactor = value; -} - -void MainWindow::changePNormalBendS(double value) -{ - MainWindow::sPNormalBendS_Factor = value; -} - -void MainWindow::changePNormalBendT(double value) -{ - MainWindow::sPNormalBendT_Factor = value; -} - -void MainWindow::toggleGlobalCut(int state)//ozgur -{ - MainWindow::sGlobalCut = bool(state); -} -void MainWindow::toggleSelectedCut(int state)//ozgur -{ - MainWindow::sSelectedCut = bool(state); -} - -void MainWindow::changeTiltPlane1(double value) -{ -} -void MainWindow::changeTiltPlane2(double value) -{ -} -/* end ozgur */ - -//dave 11.07 -void MainWindow::setPaintBucketColor(QColor c) -{ - MainWindow::sPaintBucketColor = c; -} - -void MainWindow::paintSelectedFaces() -{ - //iterate through the selected faces and color them with object.addMaterial? - undoPush(); - // DLFLFacePtrArray fparray; - // fparray.resize(active->numSelectedFaces()); - for (int i = 0; i < mActiveViewport->numSelectedFaces(); ++i) - { - mActiveViewport->getSelectedFace(i)->setMaterial( - mObject.addMaterial( - RGBColor(sPaintBucketColor.redF(), sPaintBucketColor.greenF(), sPaintBucketColor.blueF()))); - } - MainWindow::clearSelected(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -void MainWindow::clearMaterials() -{ - undoPush(); - mObject.clearMaterials(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -// Geometric transformations -void MainWindow::translatex(double x) -{ - Vector3d oldtr = mObject.position; - mObject.position[0] = x; - mObject.tr.transform[0][3] = x; - redraw(); -} - -void MainWindow::translatey(double y) -{ - mObject.position[1] = y; - mObject.tr.transform[1][3] = y; - redraw(); -} - -void MainWindow::translatez(double z) -{ - mObject.position[2] = z; - mObject.tr.transform[2][3] = z; - redraw(); -} - -void MainWindow::scalex(double x) -{ - mObject.scale_factor[0] = x; - mObject.tr.transform[0][0] = x; - redraw(); -} - -void MainWindow::scaley(double y) -{ - mObject.scale_factor[1] = y; - mObject.tr.transform[1][1] = y; - redraw(); -} - -void MainWindow::scalez(double z) -{ - mObject.scale_factor[2] = z; - mObject.tr.transform[2][2] = z; - redraw(); -} - -void MainWindow::freezeTransforms() -{ - mObject.freezeTransformations(); - mObject.position.reset(); - mObject.scale_factor.set(1, 1, 1); - mObject.rotation.reset(); - mObject.tr.reset(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeLighting(); - redraw(); -} - -/*// Global operations (don't require selection) -void MainWindow::active->recomputeNormals(void) // Recompute normals and lighting -{ - object.computeNormals(); - computeLighting( &object, patchObject, &plight); -} - -void MainWindow::recomputeLighting(void) // Recompute lighting -{ - computeLighting( &object, patchObject, &plight); -} - -void MainWindow::active->recomputePatches(void) // Recompute the patches for patch rendering -{ - if(patchObject) - patchObject->updatePatches(&object); -}*/ - -// Sub-divide all edges -void MainWindow::subdivideAllEdges(void) -{ - undoPush(); - DLFL::subdivideAllEdges(&mObject, MainWindow::sNumEdgeSubdiv); - MainWindow::clearSelected(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -void MainWindow::subdivideSelectedEdges(void) // Subdivide all selected edges -{ - undoPush(); - // DLFLEdgePtrArray eparray; - // eparray.resize(active->numSelectedEdges()); - for (int i=0; i < mActiveViewport->numSelectedEdges(); ++i) { - subdivideEdge(&mObject,MainWindow::sNumEdgeSubdiv, mActiveViewport->getSelectedEdge(i)); - } - // DLFL::subdivideEdges(&object,fparray,use_quads); - MainWindow::clearSelected(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -void MainWindow::subdivideSelectedFaces(void) // Subdivide all selected faces -{ - undoPush(); - DLFLFacePtrArray fparray; - fparray.resize(mActiveViewport->numSelectedFaces()); - for (int i = 0; i < mActiveViewport->numSelectedFaces(); ++i) - { - fparray[i] = mActiveViewport->getSelectedFace(i); - } - DLFL::subdivideFaces(&mObject, fparray, sUseQuads); - MainWindow::clearSelected(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -void MainWindow::subdivideAllFaces(void) // Subdivide all the faces -{ - undoPush(); - DLFL::subdivideAllFaces(&mObject,sUseQuads); - MainWindow::clearSelected(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -void MainWindow::createMultiFaceHandle(void) // Create multi-face handle between selected faces -{ - int numsel = mActiveViewport->numSelectedFaces(); - if (numsel < 3) return; - undoPush(); - DLFLFacePtrArray sel_faces; - DLFLFacePtr sfptr; - for (int i = 0; i < numsel; ++i) - { - sfptr = mActiveViewport->getSelectedFace(i); - if (sfptr) sel_faces.push_back(sfptr); - } - switch (MainWindow::sMfhAlgorithm) - { - case ConvexHull: - DLFL::multiConnectFaces(&mObject, sel_faces, MainWindow::sMfhScaleFactor, MainWindow::sMfhExtrudeDist, MainWindow::sMfhUseMaxOffsets); - break; - case ClosestEdge: - DLFL::multiConnectFaces(&mObject, sel_faces); - break; - default: - break; - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::multiConnectMidpoints(void) -{ - // Multi-connect midpoints after simplest-subdivision without edge deletion - undoPush(); - DLFL::multiConnectMidpoints(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::multiConnectCrust(void) -{ - // Multi-connect after creating crust - undoPush(); - DLFL::multiConnectCrust(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::modifiedMultiConnectCrust(void) -{ - // Modified multi-connect after creating crust - undoPush(); - DLFL::modifiedMultiConnectCrust(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -void MainWindow::createSponge(void) -{ - undoPush(); - DLFL::createSponge(&mObject,MainWindow::sSpongeThickness, - MainWindow::sSpongeCollapseThreshold); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// Planarize all faces -void MainWindow::planarizeFaces(void) -{ - undoPush(); - DLFL::planarize(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -// Spheralize object vertices -void MainWindow::spheralizeObject(void) -{ - undoPush(); - DLFL::spheralize(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -// Smooth the mesh -void MainWindow::smoothMesh(void) -{ - undoPush(); - DLFL::meshsmooth(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); -} - -// Catmull-Clark subdivision -void MainWindow::subdivideCatmullClark(void) -{ - undoPush(); - DLFL::catmullClarkSubdivide(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd( "subdivide(\"catmull-clark\")"); - emit echoCommand( cmd ); - // redraw(); -} - -// Doo-Sabin subdivision -void MainWindow::subdivideDooSabin(void) -{ - undoPush(); - - // QProgressDialog *progress = new QProgressDialog("Performing Doo Sabin Remeshing...", "Cancel", 0, 1); - // progress->setMinimumDuration(2000); - // progress->setWindowModality(Qt::WindowModal); - - // DLFLObjectPtr t = object; - // active->setRenderingEnabled(false); - - // if (!DLFL::dooSabinSubdivide(&object, doo_sabin_check/* , progress*/) ){ - // active->recomputePatches(); - // active->recomputeNormals(); - // undo(); - // MainWindow::clearSelected(); - // active->setRenderingEnabled(true); - // } - // else { - // object = t; - // delete t; - // active->setRenderingEnabled(true); - DLFL::dooSabinSubdivide(&mObject, sDooSabinCheck/* , progress*/); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"doo-sabin\","); - QString check("False"); - if (sDooSabinCheck) - check = QString("True"); - cmd += check + QString(")"); - emit echoCommand(cmd); - // } - -} - -// Honeycomb subdivision -void MainWindow::subdivideHoneycomb(void) -{ - undoPush(); - DLFL::honeycombSubdivide(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd("subdivide(\"honeycomb\")"); - emit echoCommand(cmd); -} - -// Root-4 subdivision -void MainWindow::subdivideRoot4(void) -{ - undoPush(); - DLFL::root4Subdivide(&mObject, MainWindow::sWeightFactor, MainWindow::sTwistFactor); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"root4\","); - cmd += QString().setNum(MainWindow::sWeightFactor) + QString(","); - cmd += QString().setNum(MainWindow::sTwistFactor) + QString(")"); - emit echoCommand(cmd); -} - -// Corner-cutting subdivision -void MainWindow::subdivideCornerCutting(void) -{ - undoPush(); - DLFL::cornerCuttingSubdivide(&mObject, MainWindow::sCornerCuttingAlpha); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"corner-cut\")"); - emit echoCommand(cmd); -} - -// Modified Corner-cutting subdivision -void MainWindow::subdivideModifiedCornerCutting(void) -{ - undoPush(); - DLFL::modifiedCornerCuttingSubdivide(&mObject, MainWindow::sModifiedCornerCuttingThickness); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - // QString cmd("subdivide(\"modified-corner-cut\")"); - // emit echoCommand( cmd ); -} - -// Bi-linear Vertex-insertion remeshing -void MainWindow::subdivideLinearVertexInsertion(void) -{ - undoPush(); - DLFL::subdivideAllFaces(&mObject, true); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"linear-vertex\",True)"); - emit echoCommand(cmd); -} - -// Corner-cutting subdivision -void MainWindow::subdivideSimplest(void) -{ - undoPush(); - DLFL::simplestSubdivide(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"simplest\")"); - emit echoCommand(cmd); -} - -// Vertex-cutting subdivision -void MainWindow::subdivideVertexCutting(void) -{ - undoPush(); - DLFL::vertexCuttingSubdivide(&mObject, MainWindow::sVertexCuttingOffset); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"vertex-cut\",") - + QString().setNum(MainWindow::sVertexCuttingOffset) - + QString(")"); - emit echoCommand(cmd); -} - -// Pentagonal subdivision -void MainWindow::subdividePentagonal(void) -{ - undoPush(); - DLFL::pentagonalSubdivide(&mObject, MainWindow::sPentagonalOffset); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"pentagon\","); - cmd += QString().setNum(MainWindow::sPentagonalOffset) + QString(")"); - emit echoCommand(cmd); -} - -// Cubic Pentagonal remeshing scheme -void MainWindow::subdivideCubicPentagonal(void) -{ -// Implemented as Pentagonal + Dual + Dual - undoPush(); - DLFL::pentagonalSubdivide(&mObject, MainWindow::sPentagonalOffset); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"pentagon\","); - cmd += QString().setNum(MainWindow::sPentagonalOffset) + QString(")"); - cmd += QString("\ndual()\ndual()"); - emit echoCommand(cmd); -} - -// Dual-Pentagonal subdivision -void MainWindow::subdivideDualPentagonal(void) -{ -// Implemented as Dual + Pentagonal + Dual - undoPush(); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::pentagonalSubdivide(&mObject, MainWindow::sPentagonalOffset); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("dual()\nsubdivide(\"pentagon\","); - cmd += QString().setNum(MainWindow::sPentagonalOffset) + QString(")"); - cmd += QString("\ndual()"); - emit echoCommand(cmd); -} - -// Pentagon preserving remeshing -void MainWindow::subdividePentagonPreserving(void) -{ - undoPush(); - DLFL::pentagonalSubdivide2(&mObject, MainWindow::sPentagonalScale); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"pentagon-preserve\","); - cmd += QString().setNum(MainWindow::sPentagonalScale) + QString(")"); - emit echoCommand(cmd); -} - -// Dual Pentagon preserving remeshing -void MainWindow::subdivideDualPentagonPreserving(void) -{ -// Implemented as Dual + Pentagonal + Dual - undoPush(); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::pentagonalSubdivide2(&mObject, MainWindow::sPentagonalScale); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("dual()\nsubdivide(\"pentagon-preserve\","); - cmd += QString().setNum(MainWindow::sPentagonalScale) + QString(")"); - cmd += QString("\ndual()"); - emit echoCommand(cmd); -} - -// Dual Hexagon Preserving remeshing -void MainWindow::subdivideDualHexagonPreserving(void) -{ -// Implemented as Dual + Root4 + Dual - undoPush(); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::root4Subdivide(&mObject, MainWindow::sWeightFactor, MainWindow::sTwistFactor); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("dual()\nsubdivide(\"root4\","); - cmd += QString().setNum(MainWindow::sWeightFactor) + QString(","); - cmd += QString().setNum(MainWindow::sTwistFactor) + QString(")"); - cmd += QString("\ndual()"); - emit echoCommand(cmd); -} - -// Root-3 remeshing -void MainWindow::subdivideRoot3(void) -{ -// Implemented as Dual + Honeycomb + Dual - undoPush(); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::honeycombSubdivide(&mObject); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("dual()\n"); - cmd += QString("subdivide(\"honeycomb\")\n"); - cmd += QString("dual()"); - emit echoCommand(cmd); -} - -// Loop subdivision -void MainWindow::subdivideLoop(void) -{ - undoPush(); - DLFL::loopSubdivide(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd("subdivide(\"loop\")\n"); - emit echoCommand(cmd); -} - -// Dual of Loop subdivision -void MainWindow::subdivideDualLoop(void) -{ - // Implemented as Dual + Loop + Dual - undoPush(); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::loopSubdivide(&mObject); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("dual()\n"); - cmd += QString("subdivide(\"loop\")\n"); - cmd += QString("dual()"); - emit echoCommand(cmd); -} - -// 12-6-4 remeshing -void MainWindow::subdivide1264(void) -{ - // Implemented as Dual + Dual 12-6-4 + Dual - undoPush(); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::dual1264Subdivide(&mObject, MainWindow::sDual1264ScaleFactor); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("dual()\ndual()\n"); - cmd += QString("subdivide(\"dual-12.6.4\",") - + QString().setNum(MainWindow::sDual1264ScaleFactor) - + QString(")\n"); - cmd += QString("dual()"); - emit echoCommand(cmd); -} - -// Dual of 12-6-4 remeshing - Bei & Cansin -void MainWindow::subdivideDual1264(void) -{ - undoPush(); - DLFL::dual1264Subdivide(&mObject, MainWindow::sDual1264ScaleFactor); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd("subdivide(\"dual-12.6.4\","); - cmd += QString().setNum(MainWindow::sDual1264ScaleFactor); - cmd += QString(")"); - emit echoCommand(cmd); -} - -// Checker board remeshing -void MainWindow::subdivideCheckerBoard(void) -{ - undoPush(); - DLFL::checkerBoardRemeshing(&mObject, MainWindow::sCheckerboardThickness); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("subdivide(\"checker\","); - cmd += QString().setNum(MainWindow::sCheckerboardThickness); - cmd += QString(")"); - emit echoCommand(cmd); -} - -// Dual Checker board remeshing -void MainWindow::subdivideDualCheckerBoard(void) -{ - // Implemented as Dual + Checker board + Dual - undoPush(); - setModified(true); - DLFL::createDual(&mObject, true); // Use accurate method - DLFL::checkerBoardRemeshing(&mObject, MainWindow::sCheckerboardThickness); - DLFL::createDual(&mObject, true); // Use accurate method - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd("dual()\nsubdivide(\"checker\","); - cmd += QString().setNum(MainWindow::sCheckerboardThickness); - cmd += QString(")\ndual()"); - emit echoCommand(cmd); -} - -// Star subdivision - Doug -void MainWindow::subdivideStar(void) -{ - undoPush(); - setModified(true); - DLFL::starSubdivide(&mObject, MainWindow::sStarOffset); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"star\")"); - emit echoCommand(cmd); -} - -// sqrt(3) subdivision - Doug -void MainWindow::subdivideSqrt3(void) -{ - undoPush(); - setModified(true); - DLFL::sqrt3Subdivide(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"sqrt3\")"); - emit echoCommand(cmd); -} - -// fractal - Doug -void MainWindow::subdivideFractal(void) -{ - undoPush(); - setModified(true); - DLFL::fractalSubdivide(&mObject, MainWindow::sFractalOffset); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd("subdivide(\"fractal\","); - cmd += QString().setNum(MainWindow::sFractalOffset); - cmd += QString(")"); - emit echoCommand(cmd); -} - -// stellate subdivision - Eric -void MainWindow::subStellate1(void) -{ - undoPush(); - setModified(true); - DLFL::stellateSubdivide(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"stellate\")"); - emit echoCommand(cmd); -} - -// stellate subdivision - Eric -void MainWindow::subStellate2(void) -{ - undoPush(); - setModified(true); - DLFL::twostellateSubdivide(&mObject, MainWindow::sSubstellateHeight, MainWindow::sSubstellateCurve); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"double-stellate\","); - cmd += QString().setNum(MainWindow::sSubstellateHeight) + QString(","); - cmd += QString().setNum(MainWindow::sSubstellateCurve) + QString(")"); - emit echoCommand(cmd); -} - -// Bei & Cansin -void MainWindow::subdivideDome(void) -{ - undoPush(); - setModified(true); - DLFL::domeSubdivide(&mObject, MainWindow::sDomeLengthFactor, MainWindow::sDomeScaleFactor); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"dome\","); - cmd += QString().setNum(MainWindow::sSubstellateHeight) + QString(","); - cmd += QString().setNum(MainWindow::sSubstellateCurve) + QString(")"); - emit echoCommand(cmd); -} - -// Doo-Sabin(BC) subdivision - Bei & Cansin -void MainWindow::subdivideDooSabinBC(void) -{ - undoPush(); - setModified(true); - DLFL::dooSabinSubdivideBC(&mObject, MainWindow::sDooSabinCheck); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString check("False"); - if (MainWindow::sDooSabinCheck) - check = QString("True"); - QString cmd = QString("subdivide(\"doo-sabin-bc\","); - cmd += check + QString(")"); - emit echoCommand(cmd); -} - -// Doo-Sabin(BCNew) Bei & Cansin -void MainWindow::subdivideDooSabinBCNew(void) -{ - undoPush(); - setModified(true); - DLFL::dooSabinSubdivideBCNew(&mObject, MainWindow::sDooSabinBCnewScaleFactor, - MainWindow::sDooSabinBCnewLengthFactor); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd = QString("subdivide(\"doo-sabin-bc-new\","); - cmd += QString().setNum(MainWindow::sDooSabinBCnewScaleFactor) + QString(","); - cmd += QString().setNum(MainWindow::sDooSabinBCnewLengthFactor) + QString(")"); - emit echoCommand(cmd); -} - -// Loop-style subdivision - Bei -void MainWindow::subdivideLoopStyle(void) -{ - undoPush(); - setModified(true); - DLFL::loopStyleSubdivide(&mObject, MainWindow::sLoopLengthFactor); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - QString cmd = QString("subdivide(\"loop-style\","); - cmd += QString().setNum(MainWindow::sLoopLengthFactor) + QString(")"); - emit echoCommand(cmd); -} - -void MainWindow::globalStellate(void) -{ - // Does not use length parameter for now. Uses subdivideFace method with triangles - undoPush(); - setModified(true); - DLFL::subdivideAllFaces(&mObject, false); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("subdivide(\"allfaces\",False)"); - emit echoCommand(cmd); -} - -void MainWindow::triangulate(void) -{ - undoPush(); - setModified(true); - DLFL::triangulateAllFaces(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - // QString cmd = QString("subdivide(\"triangulate\",False)"); - // emit echoCommand( cmd ); -} - -// Split Valence 2 vertices -void MainWindow::splitValence2Vertices(void) -{ - undoPush(); - setModified(true); - DLFL::splitValence2Vertices(&mObject, MainWindow::sVertexSplitOffset); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// cleanup 2-gons -void MainWindow::cleanup2gons(void) -{ - undoPush(); - setModified(true); - DLFL::cleanup2gons(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// Remove valence 2 vertices -void MainWindow::cleanupWingedVertices(void) -{ - undoPush(); - setModified(true); - DLFL::cleanupWingedVertices(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// Create dual object -void MainWindow::createDual(void) -{ - undoPush(); - setModified(true); - DLFL::createDual(&mObject, MainWindow::sAccurateDual); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - - QString cmd = QString("dual()"); - emit echoCommand(cmd); -} - -// Create a crust -void MainWindow::createCrust(bool use_scaling) -{ - undoPush(); - setModified(true); - if (use_scaling) - DLFL::createCrustWithScaling(&mObject, MainWindow::sCrustScaleFactor); - else - DLFL::createCrust(&mObject, MainWindow::sCrustThickness); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -//this function will tag all currently selected faces with the FTHole type -//when the user presses the rind modeling button, and it will punch out all those faces -void MainWindow::createCrust2(bool use_scaling) -{ - QString facelist("["); - - undoPush(); - setModified(true); - if (use_scaling) - DLFL::createCrustWithScaling(&mObject, MainWindow::sCrustScaleFactor); - else - DLFL::createCrust(&mObject, MainWindow::sCrustThickness); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - if (mActiveViewport->numSelectedFaces() >= 1) - { - DLFLFacePtrArray sfptrarr = mActiveViewport->getSelectedFaces(); - if (sfptrarr[0]) - { - for (auto sfPtr : sfptrarr) - { - sfPtr->setType(FTHole); - facelist += QString().setNum(sfPtr->getID()) + QString(","); - } - - facelist += QString("]"); - DLFL::punchHoles(&mObject); - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - mActiveViewport->clearSelectedFaces(); - redraw(); - - QString cmd = QString("rind(") + - facelist + QString(",True,") + - MainWindow::sCrustThickness + - QString(")"); - emit echoCommand(cmd); -} - -// Create a wireframe -void MainWindow::makeWireframe(void) -{ - undoPush(); - setModified(true); - DLFL::makeWireframe(&mObject, MainWindow::sWireframeThickness, MainWindow::sWireframeSplit); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// Create a wireframe // dave -void MainWindow::makeWireframe2() -{ - undoPush(); - setModified(true); - DLFL::makeWireframe2( - &mObject, - MainWindow::sWireframe2Thickness, - MainWindow::sWireframe2Width, - MainWindow::sWireframeSplit); - // active->recomputePatches(); - // active->recomputeNormals(); - // if ( active->numSelectedFaces() >= 1 ) { - // DLFLFacePtrArray sfptrarr = active->getSelectedFaces(); - // if ( sfptrarr[0] ) { - // //mark all the faces for hole punching - // for(auto sfPtr : sfptrarr) - // sfPtr->setType(FTHole); - // // object.punchHoles(); - // object.makeWireframe2(MainWindow::wireframe_thickness); - // } - // } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// Create a wireframe using columns -void MainWindow::makeWireframeWithColumns(void) -{ - undoPush(); - setModified(true); - DLFL::makeWireframeWithColumns(&mObject, MainWindow::sColumnThickness, MainWindow::sColumnSegments); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -/* -void MainWindow::makeUnitCube(double edgelength) -{ - undoPush(); - setModified(true); - DLFLObjectPtr unitcube = DLFLObject::makeUnitCube(edgelength); - object.reset(); - object.splice(*unitcube); - delete unitcube; - active->recomputePatches(); - active->recomputeNormals(); - MainWindow::clearSelected(); -} - -void MainWindow::makeUnitTetrahedron(double edgelength) -{ - undoPush(); - setModified(true); - DLFLObjectPtr unittetra = DLFLObject::makeUnitTetrahedron(); - object.reset(); - object.splice(*unittetra); - delete unittetra; - active->recomputePatches(); - active->recomputeNormals(); - MainWindow::clearSelected(); -} - -void MainWindow::makeMengerSponge(int level) -{ - undoPush(); - setModified(true); - DLFLObjectPtr mengersponge = DLFLObject::makeMengerSponge(level); - object.reset(); - object.splice(*mengersponge); - delete mengersponge; - active->recomputePatches(); - active->recomputeNormals(); - MainWindow::clearSelected(); -} - -void MainWindow::makeSierpinskiTetrahedron(int level) -{ - undoPush(); - setModified(true); - DLFLObjectPtr stetra = DLFLObject::makeSierpinskiTetrahedron(level); - object.reset(); - object.splice(*stetra); - delete stetra; - active->recomputePatches(); - active->recomputeNormals(); - MainWindow::clearSelected(); -} -*/ - -// Randomly assign texture coordinates -void MainWindow::randomAssignTexCoords(void) -{ - mObject.randomAssignTexCoords(); - redraw(); -} - -// Assign texture coordinates for tile texturing -void MainWindow::assignTileTexCoords(void) -{ - mObject.assignTileTexCoords(MainWindow::sTileTexSize); - redraw(); -} - -// Cleanup redundant edges -void MainWindow::edgeCleanup(void) -{ - undoPush(); - setModified(true); - DLFL::edgeCleanup(&mObject); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - MainWindow::clearSelected(); - redraw(); -} - -// Print summary information -void MainWindow::printSummary(void) -{ - mObject.print(); -} - -// Print vertex list -void MainWindow::printVertexList(void) -{ - mObject.printVertexList(); -} - -// Print edge list -void MainWindow::printEdgeList(void) -{ - mObject.printEdgeList(); -} - -// Print CV list -void MainWindow::printCVList(void) -{ - ///object.printPatchCVList(); -} - -// Print face list -void MainWindow::printFaceList(void) -{ - mObject.printFaces(); -} - -void MainWindow::getCommand() -{ -#ifdef QCOMPLETER - int i = mCommandCompleter->exec(); - mCommandCompleter->setFocus(Qt::PopupFocusReason); - // QMessageBox::about(this, tr("%1").arg(text),tr("%1").arg(mCommandList.indexOf(text))); - if (i > -1) - mActionListWidget->actions().at(i)->activate(QAction::Trigger); -#endif -} - -void MainWindow::initializeAnimatedHelp() -{ - mAnimatedHelpWidget = new QWidget(this); - // QSplashScreen *w = new QSplashScreen(this); - mAnimatedHelpLayout = new QVBoxLayout; - - mAnimatedHelpMovie = new QMovie(this); - mAnimatedHelpMovie->setCacheMode(QMovie::CacheAll); - mAnimatedHelpMovie->setBackgroundColor(QColor(255, 255, 255, 255)); - - mAnimatedHelpLabel = new QLabel(tr("No movie loaded")); - mAnimatedHelpLabel->setAlignment(Qt::AlignCenter); - // mAnimatedHelpLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); - // mAnimatedHelpLabel->setBackgroundRole(QPalette::Dark); - // mAnimatedHelpLabel->setAutoFillBackground(true); - - mAnimatedHelpLayout->addWidget(mAnimatedHelpLabel); - mAnimatedHelpLayout->addStretch(1); - mAnimatedHelpLayout->setMargin(0); - mAnimatedHelpWidget->setLayout(mAnimatedHelpLayout); - - mAnimatedHelpMovie->stop(); - mAnimatedHelpLabel->setMovie(mAnimatedHelpMovie); - // mAnimatedHelp->setFileName("images/insert_edge.mng"); - // w->move(QCursor::pos()); - // w->show(); - - // create the dockwidget, set it to the right side - mAnimatedHelpDockWidget = new QDockWidget(tr("TopMod Animated Help"), this); - mAnimatedHelpDockWidget->setAllowedAreas(Qt::NoDockWidgetArea); - mAnimatedHelpDockWidget->setWidget(mAnimatedHelpWidget); - // addDockWidget(Qt::RightDockWidgetArea, mAnimatedHelpDockWidget); - mAnimatedHelpDockWidget->hide(); - mAnimatedHelpDockWidget->setFloating(true); - mAnimatedHelpDockWidget->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable); - // mAnimatedHelpDockWidget->setResizeEnabled(false); - //sizing - mAnimatedHelpDockWidget->setMinimumSize(200, 200); - mAnimatedHelpDockWidget->setMaximumSize(200, 200); - - //fix positioning later - mAnimatedHelpDockWidget->move(width(), 150 + mToolOptionsDockWidget->height() + 200); -} - -void MainWindow::setAnimatedHelpImage() -{ - mAnimatedHelpMovie->setFileName("images/insert_edge.mng"); - mAnimatedHelpMovie->start(); -} - -void MainWindow::deleteSelected() -{ - DLFLEdgePtrArray septrarr; - DLFLFacePtrArray sfptrarr; - DLFLVertexPtrArray svptrarr; - DLFLFaceVertexPtrArray sfvptrarr; - - // undoPush(); - // setModified(true); - switch (mSelectionMask) - { - case MaskEdges: - { - septrarr = mActiveViewport->getSelectedEdges(); - if (septrarr[0]) - { - undoPush(); - setModified(true); - for (auto sePtr : septrarr) - { - DLFL::deleteEdge(&mObject, sePtr, true); - // DLFL::deleteEdge( &object, septr, MainWindow::delete_edge_cleanup); - // active->recomputePatches(); - // active->recomputeNormals(); - } - } - mActiveViewport->clearSelectedEdges(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - break; - } - case MaskVertices: - { - svptrarr = mActiveViewport->getSelectedVertices(); - if (svptrarr[0]) - { - undoPush(); - setModified(true); - for (auto svPtr : svptrarr) - { - svPtr->getEdges(septrarr); - for (auto sePtr : septrarr) - { - DLFL::deleteEdge(&mObject, sePtr, true); - } - // active->recomputePatches(); - // active->recomputeNormals(); - } - } - mActiveViewport->clearSelectedVertices(); - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - redraw(); - break; - } - case MaskFaces: - { - sfptrarr = mActiveViewport->getSelectedFaces(); - if (sfptrarr[0]) - { - undoPush(); - setModified(true); - for (auto sfPtr : sfptrarr) - { - //get edges, collapse them - sfPtr->getEdges(septrarr); - for (auto sePtr : septrarr) - { - DLFL::collapseEdge(&mObject, sePtr, MainWindow::sDeleteEdgeCleanup); - } - sfPtr->getCorners(sfvptrarr); - for (auto sfvPtr : sfvptrarr) - { - if (sfvPtr != nullptr) - { - DLFLVertexPtr vptr = sfvPtr->getVertexPtr(); - if (vptr) - { - vptr->getEdges(septrarr); - for (auto sePtr : septrarr) - { - DLFL::deleteEdge(&mObject, sePtr, MainWindow::sDeleteEdgeCleanup); - } - } - } - } // end loop through corners of current face - } //end loop through selected faces - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - mActiveViewport->clearSelectedFaces(); - redraw(); - break; - } - case MaskCorners: - break; - case MaskObject://someday... - break; - default: - break; - } -} - -void MainWindow::collapseSelectedEdges() -{ - DLFLEdgePtrArray septrarr = mActiveViewport->getSelectedEdges(); - if (septrarr[0]) - { - undoPush(); - setModified(true); - for (auto sePtr : septrarr) - { - if (sePtr != nullptr) - { - DLFL::collapseEdge(&mObject, sePtr, MainWindow::sDeleteEdgeCleanup); - mActiveViewport->recomputeNormals(); - } - } - mActiveViewport->recomputePatches(); - } - mActiveViewport->clearSelectedEdges(); - redraw(); -} - -void MainWindow::selectEdgesFromFaces() -{ - DLFLFacePtrArray& sfptrarr = mActiveViewport->getSelectedFaces(); - //loop through selected faces, get corresponding edges, select them - if (!sfptrarr.empty() && sfptrarr[0]) - { - for (auto sfPtr : sfptrarr) - { - DLFLEdgePtrArray septrarr; - sfPtr->getEdges(septrarr); - for (auto sePtr : septrarr) - { - if (!mActiveViewport->isSelected(sePtr)) - { - mActiveViewport->setSelectedEdge(sNumSelEdges, sePtr); - sNumSelEdges++; - } - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - setMode(MainWindow::SelectEdge); - mActiveViewport->clearSelectedFaces(); - redraw(); -} - -void MainWindow::selectEdgesFromVertices() -{ - //loop through selected vertices, get corresponding edges, select them - DLFLVertexPtrArray& svptrarr = mActiveViewport->getSelectedVertices(); - if (svptrarr.size() > 0 && svptrarr[0]) - { - for (auto svPtr : svptrarr) - { - DLFLEdgePtrArray septrarr; - svPtr->getEdges(septrarr); - for (auto sePtr : septrarr) - { - if (!mActiveViewport->isSelected(sePtr)) - { - mActiveViewport->setSelectedEdge(sNumSelEdges, sePtr); - sNumSelEdges++; - } - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - setMode(MainWindow::SelectEdge); - mActiveViewport->clearSelectedVertices(); - redraw(); -} - -void MainWindow::selectFacesFromEdges() -{ - DLFLFacePtr fptr1, fptr2; - //loop through selected faces, get corresponding vertices, select them - DLFLEdgePtrArray& septrarr = mActiveViewport->getSelectedEdges(); - if (septrarr.size() > 0 && septrarr[0]) - { - for (auto sePtr : septrarr) - { - sePtr->getFacePointers(fptr1, fptr2); - if (!mActiveViewport->isSelected(fptr1)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, fptr1); - sNumSelFaces++; - } - if (!mActiveViewport->isSelected(fptr2)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, fptr2); - sNumSelFaces++; - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - setMode(MainWindow::SelectFace); - mActiveViewport->clearSelectedEdges(); - redraw(); -} - -void MainWindow::selectFacesFromVertices() -{ - DLFLVertexPtrArray svptrarr = mActiveViewport->getSelectedVertices(); - //loop through selected faces, get corresponding edges, select them - if (svptrarr.size() > 0 && svptrarr[0]) - { - for (auto svPtr : svptrarr) - { - DLFLFacePtrArray sfptrarr; - svPtr->getFaces(sfptrarr); - for (auto sfPtr : sfptrarr) - { - if (!mActiveViewport->isSelected(sfPtr)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, sfPtr); - sNumSelFaces++; - } - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - setMode(MainWindow::SelectFace); - mActiveViewport->clearSelectedVertices(); - redraw(); -} - -void MainWindow::selectVerticesFromFaces() -{ - DLFLFacePtrArray& sfptrarr = mActiveViewport->getSelectedFaces(); - - //loop through selected faces, get corresponding vertices, select them - if (sfptrarr.size() > 0 && sfptrarr[0]) - { - for (auto sfPtr : sfptrarr) - { - DLFLFaceVertexPtrArray sfvptrarr; - sfPtr->getCorners(sfvptrarr); - for (auto sfvPtr : sfvptrarr) - { - DLFLVertexPtr vptr = sfvPtr->getVertexPtr(); - if (!mActiveViewport->isSelected(vptr)) - { - mActiveViewport->setSelectedVertex(sNumSelVerts, vptr); - sNumSelVerts++; - } - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - setMode(MainWindow::SelectVertex); - mActiveViewport->clearSelectedFaces(); - redraw(); -} - -void MainWindow::selectVerticesFromEdges() -{ - DLFLEdgePtrArray septrarr = mActiveViewport->getSelectedEdges(); - //loop through selected faces, get corresponding vertices, select them - if (septrarr.size() > 0 && septrarr[0]) - { - for (auto sePtr : septrarr) - { - DLFLVertexPtr vptr1, vptr2; - sePtr->getVertexPointers(vptr1, vptr2); - if (!mActiveViewport->isSelected(vptr1)) - { - mActiveViewport->setSelectedVertex(sNumSelVerts, vptr1); - sNumSelVerts++; - } - if (!mActiveViewport->isSelected(vptr2)) - { - mActiveViewport->setSelectedVertex(sNumSelVerts, vptr2); - sNumSelVerts++; - } - } - mActiveViewport->recomputePatches(); - mActiveViewport->recomputeNormals(); - } - setMode(MainWindow::SelectVertex); - mActiveViewport->clearSelectedEdges(); - redraw(); -} - -void MainWindow::growSelection() -{ - switch (mSelectionMask) - { - case MaskVertices: - { - //loop through selected vertices, get corresponding edges - DLFLVertexPtrArray& svptrarr = mActiveViewport->getSelectedVertices(); - if (svptrarr.size() > 0 && svptrarr[0]) - { - for (auto svPtr : svptrarr) - { - DLFLEdgePtrArray septrarr; - svPtr->getEdges(septrarr); - //loop through edges, select all vertices connected to these edges - for (auto sePtr : septrarr) - { - DLFLVertexPtr vp1, vp2; - //get the two vertices for each edge, select them if they aren't already selected - sePtr->getVertexPointers(vp1, vp2); - if (!mActiveViewport->isSelected(vp1)) - { - mActiveViewport->setSelectedVertex(sNumSelVerts, vp1); - sNumSelVerts++; - } - if (!mActiveViewport->isSelected(vp2)) - { - mActiveViewport->setSelectedVertex(sNumSelVerts, vp2); - sNumSelVerts++; - } - } - } - } - redraw(); - break; - } - case MaskEdges: - { - //loop through selected edges, get vertices, then get those edges - DLFLEdgePtrArray& septrarr = mActiveViewport->getSelectedEdges(); - if (septrarr.size() > 0 && septrarr[0]) - { - for (auto sePtr : septrarr) - { - DLFLVertexPtr vptr1, vptr2; - DLFLEdgePtrArray eptrarray; - //get the 2 vertices for the current edge - sePtr->getVertexPointers(vptr1, vptr2); - //get the edges for vertex 1 - vptr1->getEdges(eptrarray); - for (auto v1EdgePtr : eptrarray) - { - if (!mActiveViewport->isSelected(v1EdgePtr)) - { - mActiveViewport->setSelectedEdge(sNumSelEdges, v1EdgePtr); - sNumSelEdges++; - } - } - //get edges for vertex 2 - vptr2->getEdges(eptrarray); - for (auto v2EdgePtr : eptrarray) - { - if (!mActiveViewport->isSelected(v2EdgePtr)) - { - mActiveViewport->setSelectedEdge(sNumSelEdges, v2EdgePtr); - sNumSelEdges++; - } - } - } - } - redraw(); - break; - } - case MaskFaces: - { - DLFLFacePtrArray& sfptrarr = mActiveViewport->getSelectedFaces(); - //loop through selected faces - if (sfptrarr.size() > 0 && sfptrarr[0]) - { - for (auto sfPtr : sfptrarr) - { - //get the edges for the current face - DLFLEdgePtrArray eptrarray; - sfPtr->getEdges(eptrarray); - for (auto faceEdgePtr : eptrarray) - { - DLFLFacePtr fptr1, fptr2; - //get the 2 faces for the current edge, - //select them if they aren't already selected - faceEdgePtr->getFacePointers(fptr1, fptr2); - if (!mActiveViewport->isSelected(fptr1)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, fptr1); - sNumSelFaces++; - } - if (!mActiveViewport->isSelected(fptr2)) - { - mActiveViewport->setSelectedFace(sNumSelFaces, fptr2); - sNumSelFaces++; - } - } - } - } - redraw(); - break; - } - case MaskCorners: - break; - case MaskObject: - break; - default: - break; - } -} - -void MainWindow::shrinkSelection() -{ - int i = 0; - - DLFLEdgePtrArray eptrarray; - - switch (mSelectionMask) - { - case MaskVertices: - { - //loop through selected vertices, get corresponding edges - DLFLVertexPtrArray& svptrarr = mActiveViewport->getSelectedVertices(); - if (!svptrarr.empty() && svptrarr[0]) - { - vector deselectvertices(svptrarr.size()); - for (auto svPtr : svptrarr) - { - deselectvertices[i] = false; - DLFLEdgePtrArray septrarr; - svPtr->getEdges(septrarr); - //loop through edges, select all vertices connected to these edges - for (auto sePtr : septrarr) - { - DLFLVertexPtr vp1, vp2; - //get the two vertices for each edge, select them if they aren't already selected - sePtr->getVertexPointers(vp1, vp2); - if (!mActiveViewport->isSelected(vp1) || !mActiveViewport->isSelected(vp2)) - deselectvertices[i] = true; - } - i++; - } - //loop back through verts, now deselect the flagged ones - i = 0; - for (auto svPtr : svptrarr) - { - //if it's flagged, deselect it - if (deselectvertices[i]) - mActiveViewport->clearSelectedVertex(svPtr); - i++; - } - } - redraw(); - break; - } - case MaskEdges: - { - //loop through selected edges, get vertices, then get those edges - DLFLEdgePtrArray& septrarr = mActiveViewport->getSelectedEdges(); - if (!septrarr.empty() && septrarr[0]) - { - vector deselectedges(septrarr.size()); - for (auto sePtr : septrarr) - { - DLFLVertexPtr vptr1, vptr2; - //get the 2 vertices for the current edge - sePtr->getVertexPointers(vptr1, vptr2); - //get the edges for vertex 1 - vptr1->getEdges(eptrarray); - deselectedges[i] = false; - for (auto v1EdgePtr : eptrarray) - { - if (!mActiveViewport->isSelected(v1EdgePtr)) - deselectedges[i] = true; - } - //get edges for vertex 2 - vptr2->getEdges(eptrarray); - for (auto v2EdgePtr : eptrarray) - { - if (!mActiveViewport->isSelected(v2EdgePtr)) - deselectedges[i] = true; - } - i++; - } - //loop back through edges, now deselect the flagged ones - i = 0; - for (auto sePtr : septrarr) - { - //if it's flagged, deselect it - if (deselectedges[i]) - mActiveViewport->clearSelectedEdge(sePtr); - i++; - } - } - redraw(); - break; - } - case MaskFaces: - { - //loop through selected faces - DLFLFacePtrArray& sfptrarr = mActiveViewport->getSelectedFaces(); - if (!sfptrarr.empty() && sfptrarr[0]) - { - vector deselectfaces(sfptrarr.size()); - for (auto sfPtr : sfptrarr) - { - //get the edges for the current face - sfPtr->getEdges(eptrarray); - //by default don't deselect this face - deselectfaces[i] = false; - for (auto faceEdgePtr : eptrarray) - { - DLFLFacePtr fptr1, fptr2; - //get the 2 faces for the current edge, - //check if both of them are selected, flag the current face - faceEdgePtr->getFacePointers(fptr1, fptr2); - if (!mActiveViewport->isSelected(fptr1) || !mActiveViewport->isSelected(fptr2)) - deselectfaces[i] = true; - } - i++; - } - //loop back through faces, now deselect the flagged ones - i = 0; - for (auto sfPtr : sfptrarr) - { - //if it's flagged, deselect it - if (deselectfaces[i]) - mActiveViewport->clearSelectedFace(sfPtr); - i++; - } - } - redraw(); - break; - } - case MaskCorners: - // active->selectAllCorners(); - case MaskObject: - break; - default: - break; - } -} - -void MainWindow::reorderSelectedFaces() -{ - // DLFLFaceVertexPtrArray sfvptrarr; - // vector::iterator fvit; - // DLFLFacePtrArray sfptrarr; - // vector::iterator fit; - // //loop through selected corners, get corresponding faces, reorder them to start from the selected fvptr's - // svptrarr = active->getSelectedVertices(); - // if ( svptrarr[0] ) { - // for(vit = svptrarr.begin(); vit != svptrarr.end(); vit++){ - // (*vit)->getFaces(sfptrarr); - // for(fit = sfptrarr.begin(); fit != sfptrarr.end(); fit++){ - // if (!active->isSelected(*fit)){ - // active->setSelectedFace(num_sel_faces,*fit); - // num_sel_faces++; - // } - // } - // } - // active->recomputePatches(); - // active->recomputeNormals(); - // } - // active->clearSelectedVertices(); - // redraw(); -} - -void MainWindow::toggleFullScreen() -{ - // go back into normal screen mode - if (windowState() == Qt::WindowFullScreen && !mToolsToolBar->isVisible()) - { - setWindowState(Qt::WindowNoState); - mEditToolBar->setVisible(true); - //mSelectionMaskToolBar->toggleViewAction(); - mPrimitivesToolBar->setVisible(true); - mToolsToolBar->setVisible(true); - mExtrusionToolBar->setVisible(true); - //mConicalToolBar->toggleViewAction(); - mHighgenusToolBar->setVisible(true); - mTexturingToolBar->setVisible(true); - // mRemeshingToolBar->setVisible(true); - mStatusBar->show(); - } - // go to full screen mode 2 - else if (windowState() == Qt::WindowFullScreen) - { - // setWindowState(windowState() ^ Qt::WindowFullScreen); - mStatusBar->hide(); - mEditToolBar->setVisible(false); - mPrimitivesToolBar->setVisible(false); - mToolsToolBar->setVisible(false); - mExtrusionToolBar->setVisible(false); - mHighgenusToolBar->setVisible(false); - mTexturingToolBar->setVisible(false); - mRemeshingToolBar->setVisible(false); - } - //go into full screen mode 1 - else - { - setWindowState(windowState() ^ Qt::WindowFullScreen); - } -} diff --git a/topmodx/src/MainWindowRemeshingCallbacks.cc b/topmodx/src/MainWindowRemeshingCallbacks.cc deleted file mode 100644 index fd92230..0000000 --- a/topmodx/src/MainWindowRemeshingCallbacks.cc +++ /dev/null @@ -1,132 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "MainWindow.h" - -// Controls for remeshing schemes -void MainWindow::toggleDooSabinEdgeFlag(int state) -{ - MainWindow::sDooSabinCheck = bool(state); -} - -void MainWindow::changeRoot4Twist(double value) -{ - MainWindow::sTwistFactor = value; -} - -void MainWindow::changeRoot4Weight(double value) -{ - MainWindow::sWeightFactor = value; -} - -void MainWindow::changeVertexCuttingOffset(double value) -{ - MainWindow::sVertexCuttingOffset = value; -} - -void MainWindow::changePentagonalOffset(double value) -{ - MainWindow::sPentagonalOffset = value; -} - -void MainWindow::changePentagonalScaleFactor(double value) -{ - MainWindow::sPentagonalScale = value; -} - -// Added by Doug -void MainWindow::changeStarOffset(double value) -{ - MainWindow::sStarOffset = value; -} - -void MainWindow::changeFractalOffset(double value) -{ - MainWindow::sFractalOffset = value; -} - -// End additions by Doug - -// Added by Eric -void MainWindow::changeSubStellateAmount(double value) -{ - MainWindow::sSubstellateHeight = value; -} - -void MainWindow::changeSubStellateCurve(double value) -{ - MainWindow::sSubstellateCurve = value; -} - -// End additions by Eric -void MainWindow::toggleAccurateDualFlag(int state) -{ - MainWindow::sAccurateDual = !bool(state); -} - -void MainWindow::toggleUseQuadsFlag(int state) -{ - MainWindow::sUseQuads = bool(state); -} - -// Added by Bei & Cansin - -void MainWindow::changeDomeSubdivisionLength(double value) -{ - MainWindow::sDomeLengthFactor = value; -} - -void MainWindow::changeDomeSubdivisionScale(double value) -{ - MainWindow::sDomeScaleFactor = value; -} - -void MainWindow::changeDual1264Scale(double value) -{ - MainWindow::sDual1264ScaleFactor = value; -} - -void MainWindow::changeDooSabinBCnewScale(double value) -{ - MainWindow::sDooSabinBCnewScaleFactor = value; -} - -void MainWindow::changeDooSabinBCnewLength(double value) -{ - MainWindow::sDooSabinBCnewLengthFactor = value; -} - -void MainWindow::changeLoopStyleSubdivisionLength(double value) -{ - MainWindow::sLoopLengthFactor = value; -} diff --git a/topmodx/src/PythonHighlighter.cc b/topmodx/src/PythonHighlighter.cc deleted file mode 100644 index 702cb6a..0000000 --- a/topmodx/src/PythonHighlighter.cc +++ /dev/null @@ -1,143 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "PythonHighlighter.h" - -PythonHighlighter::PythonHighlighter(QTextEdit *parent) - : QSyntaxHighlighter(parent) -{ - pythonKeywords << "and" << "assert" << "break" << "class" << "continue" << "def" - << "del" << "elif" << "else" << "except" << "exec" << "finally" - << "for" << "from" << "global" << "if" << "import" << "in" - << "is" << "lambda" << "not" << "or" << "pass" << "print" << "raise" - << "return" << "try" << "while" << "yield" << "True" << "False"; - - promptFormat.setForeground(QColor("greenyellow")); - promptFormat.setFontWeight(QFont::Bold); - promptFormat.setFontItalic(true); - - functionFormat.setForeground(QColor("royalblue")); - functionFormat.setFontWeight(QFont::Bold); - - tupleFormat.setForeground(QColor("lightskyblue")); - tupleFormat.setFontWeight(QFont::Bold); - - pythonFormat.setForeground(QColor("coral")); - pythonFormat.setFontWeight(QFont::Bold); - - stringFormat.setForeground(QColor("crimson")); - - commentFormat.setForeground(QColor("orangered")); - commentFormat.setFontItalic(true); - compilePattern(); -} - -PythonHighlighter::~PythonHighlighter() -{ -} - -void PythonHighlighter::compilePattern() -{ - pythonPatterns.clear(); - QString delim("\\b"); - QStringList::iterator lit = pythonKeywords.begin(); - for (; lit != pythonKeywords.end(); lit++) - { - pythonPatterns.push_back(QRegExp(delim + *lit + delim)); - } - - stringPattern = QRegExp("(\".*\")|'.*'"); - functionPattern = QRegExp("\\b[A-Za-z0-9_]+(?=\\()"); - tuplePattern = QRegExp("(\\((-?\\d+(\\.\\d*)?,[ ]*)+-?\\d+(\\.\\d*)?\\))|(\\[(-?\\d+(\\.\\d*)?,[ ]*)+-?\\d+(\\.\\d*)?\\])"); - promptPattern = QRegExp("dlfl>"); - commentPattern = QRegExp("#.*"); -} - -void PythonHighlighter::highlightBlock(const QString& text) -{ - if (text.startsWith(">")) return; - - for (int p = 0; p < pythonPatterns.size(); p++) - { - const QRegExp& expression = pythonPatterns[p]; - int index = text.indexOf(expression); - while (index >= 0) - { - int length = expression.matchedLength(); - setFormat(index, length, pythonFormat); - index = text.indexOf(expression, index + length); - } - } - - int index = text.indexOf(stringPattern); - while (index >= 0) - { - int length = stringPattern.matchedLength(); - setFormat(index, length, stringFormat); - index = text.indexOf(stringPattern, index + length); - } - - index = text.indexOf(functionPattern); - while (index >= 0) - { - int length = functionPattern.matchedLength(); - setFormat(index, length, functionFormat); - index = text.indexOf(functionPattern, index + length); - } - - index = text.indexOf(tuplePattern); - while (index >= 0) - { - int length = tuplePattern.matchedLength(); - setFormat(index, length, tupleFormat); - index = text.indexOf(tuplePattern, index + length); - } - - index = text.indexOf(promptPattern); - while (index >= 0) - { - int length = promptPattern.matchedLength(); - setFormat(index, length, promptFormat); - index = text.indexOf(promptPattern, index + length); - } - - // Must be last to highlight correctly - index = text.indexOf(commentPattern); - while (index >= 0) - { - int length = commentPattern.matchedLength(); - setFormat(index, length, commentFormat); - index = text.indexOf(commentPattern, index + length); - } -} - diff --git a/topmodx/src/PythonHighlighter.h b/topmodx/src/PythonHighlighter.h deleted file mode 100644 index e013561..0000000 --- a/topmodx/src/PythonHighlighter.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _PYTHON_HIGHLIGHTER_H_ -#define _PYTHON_HIGHLIGHTER_H_ - -#include -#include -#include - -class PythonHighlighter : public QSyntaxHighlighter -{ - Q_OBJECT - -public: - PythonHighlighter(QTextEdit *parent = 0); - ~PythonHighlighter(); - -protected: - void highlightBlock(const QString &text); - void compilePattern(); - -private: - QVector pythonPatterns; - QRegExp stringPattern; - QRegExp commentPattern; - QRegExp functionPattern; - QRegExp tuplePattern; - QRegExp promptPattern; - - QStringList pythonKeywords; - - QTextCharFormat pythonFormat; - QTextCharFormat commentFormat; - QTextCharFormat stringFormat; - QTextCharFormat functionFormat; - QTextCharFormat tupleFormat; - QTextCharFormat promptFormat; -}; - -#endif // _PYTHON_HIGHLIGHTER_H_ diff --git a/topmodx/src/RemeshingMode.cc b/topmodx/src/RemeshingMode.cc deleted file mode 100644 index 3c50251..0000000 --- a/topmodx/src/RemeshingMode.cc +++ /dev/null @@ -1,1745 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include - -#include "RemeshingMode.h" - -/*! -\ingroup gui -@{ - -\class RemeshingMode -\brief Remeshing Operations GUI elements. - -\note - -\see RemeshingMode -*/ - -/*! -* \brief Constructor -* -* @param parent the MainWindow widget -* @param sm the shortcut manager class for adding a custom shortcut to each menu action or icon -* @param actionList the master list of actions for use with the CommandCompleter class -* -*/ -RemeshingMode::RemeshingMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Dual); - - //setup stacked widget pages here, - setupDual(); - setupThreeConversion(); - setupFourConversion(); - setupFiveConversion(); - setupThreePreservation(); - setupFourPreservation(); - setupFivePreservation(); - setupSixPreservation(); - setupMiscellaneous(); - - mDualAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual"), this); - mDualAction->setCheckable(true); - sm->registerAction(mDualAction, "Remeshing", ""); - mDualAction->setStatusTip(tr("Enter Dual Remeshing Mode")); - mDualAction->setToolTip(tr("Dual Remeshing Mode")); - connect(mDualAction, SIGNAL(triggered()), this, SLOT(triggerDual())); - actionList->addAction(mDualAction); - - mRootThreeAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Root-3"), this); - mRootThreeAction->setCheckable(true); - sm->registerAction(mRootThreeAction, "Remeshing", ""); - mRootThreeAction->setStatusTip(tr("Enter Root-3 Remeshing Mode")); - mRootThreeAction->setToolTip(tr("Root-3 Remeshing Mode")); - connect(mRootThreeAction, SIGNAL(triggered()), this, SLOT(triggerRootThree())); - actionList->addAction(mRootThreeAction); - - mTriangulateAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Triangulate"), this); - mTriangulateAction->setCheckable(true); - sm->registerAction(mTriangulateAction, "Remeshing", ""); - mTriangulateAction->setStatusTip(tr("Enter Triangulate Remeshing Mode")); - mTriangulateAction->setToolTip(tr("Triangulate Remeshing Mode")); - connect(mTriangulateAction, SIGNAL(triggered()), this, SLOT(triggerTriangulate())); - actionList->addAction(mTriangulateAction); - - mDualVertexTruncationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Vertex Truncation"), this); - mDualVertexTruncationAction->setCheckable(true); - sm->registerAction(mDualVertexTruncationAction, "Remeshing", ""); - mDualVertexTruncationAction->setStatusTip(tr("Enter Dual Vertex Truncation Remeshing Mode")); - mDualVertexTruncationAction->setToolTip(tr("Dual Vertex Truncation Remeshing Mode")); - connect(mDualVertexTruncationAction, SIGNAL(triggered()), this, SLOT(triggerDualVertexTruncation())); - actionList->addAction(mDualVertexTruncationAction); - - mStellationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Stellate"), this); - mStellationAction->setCheckable(true); - sm->registerAction(mStellationAction, "Remeshing", ""); - mStellationAction->setStatusTip(tr("Enter Stellate Remeshing Mode")); - mStellationAction->setToolTip(tr("Stellate Remeshing Mode")); - connect(mStellationAction, SIGNAL(triggered()), this, SLOT(triggerStellation())); - actionList->addAction(mStellationAction); - - mDoubleStellationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Double Stellate"), this); - mDoubleStellationAction->setCheckable(true); - sm->registerAction(mDoubleStellationAction, "Remeshing", ""); - mDoubleStellationAction->setStatusTip(tr("Enter Double Stellate Remeshing Mode")); - mDoubleStellationAction->setToolTip(tr("Double Stellate Remeshing Mode")); - connect(mDoubleStellationAction, SIGNAL(triggered()), this, SLOT(triggerDoubleStellation())); - actionList->addAction(mDoubleStellationAction); - - mTwelveSixFourAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("12.6.4"), this); - mTwelveSixFourAction->setCheckable(true); - sm->registerAction(mTwelveSixFourAction, "Remeshing", ""); - mTwelveSixFourAction->setStatusTip(tr("Enter 12.6.4 Remeshing Mode")); - mTwelveSixFourAction->setToolTip(tr("12.6.4 Remeshing Mode")); - connect(mTwelveSixFourAction, SIGNAL(triggered()), this, SLOT(triggerTwelveSixFour())); - actionList->addAction(mTwelveSixFourAction); - - mHoneycombAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Honeycomb"), this); - mHoneycombAction->setCheckable(true); - sm->registerAction(mHoneycombAction, "Remeshing", ""); - mHoneycombAction->setStatusTip(tr("Enter Honeycomb Remeshing Mode")); - mHoneycombAction->setToolTip(tr("Honeycomb Remeshing Mode")); - connect(mHoneycombAction, SIGNAL(triggered()), this, SLOT(triggerHoneycomb())); - actionList->addAction(mHoneycombAction); - - mVertexTruncationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Vertex Truncation"), this); - mVertexTruncationAction->setCheckable(true); - sm->registerAction(mVertexTruncationAction, "Remeshing", ""); - mVertexTruncationAction->setStatusTip(tr("Enter Vertex Truncation Remeshing Mode")); - mVertexTruncationAction->setToolTip(tr("Vertex Truncation Remeshing Mode")); - connect(mVertexTruncationAction, SIGNAL(triggered()), this, SLOT(triggerVertexTruncation())); - actionList->addAction(mVertexTruncationAction); - - mDualTwelveSixFourAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual 12.6.4"), this); - mDualTwelveSixFourAction->setCheckable(true); - sm->registerAction(mDualTwelveSixFourAction, "Remeshing", ""); - mDualTwelveSixFourAction->setStatusTip(tr("Enter Dual 12.6.4 Remeshing Mode")); - mDualTwelveSixFourAction->setToolTip(tr("Dual 12.6.4 Remeshing Mode")); - connect(mDualTwelveSixFourAction, SIGNAL(triggered()), this, SLOT(triggerDualTwelveSixFour())); - actionList->addAction(mDualTwelveSixFourAction); - - mLinearVertexAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Linear Vertex Insertion"), this); - mLinearVertexAction->setCheckable(true); - sm->registerAction(mLinearVertexAction, "Remeshing", ""); - mLinearVertexAction->setStatusTip(tr("Enter Linear Vertex Insertion Remeshing Mode")); - mLinearVertexAction->setToolTip(tr("Linear Vertex Insertion Remeshing Mode")); - connect(mLinearVertexAction, SIGNAL(triggered()), this, SLOT(triggerLinearVertex())); - actionList->addAction(mLinearVertexAction); - - mCatmullClarkAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Catmull Clark"), this); - mCatmullClarkAction->setCheckable(true); - sm->registerAction(mCatmullClarkAction, "Remeshing", ""); - mCatmullClarkAction->setStatusTip(tr("Enter Catmull Clark Remeshing Mode")); - mCatmullClarkAction->setToolTip(tr("Catmull Clark Remeshing Mode")); - connect(mCatmullClarkAction, SIGNAL(triggered()), this, SLOT(triggerCatmullClark())); - actionList->addAction(mCatmullClarkAction); - - mStellateEdgeRemovalAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Stellate with Edge Removal"), this); - mStellateEdgeRemovalAction->setCheckable(true); - sm->registerAction(mStellateEdgeRemovalAction, "Remeshing", ""); - mStellateEdgeRemovalAction->setStatusTip(tr("Enter Stellate with Edge Removal Remeshing Mode")); - mStellateEdgeRemovalAction->setToolTip(tr("Stellate with Edge Removal Remeshing Mode")); - connect(mStellateEdgeRemovalAction, SIGNAL(triggered()), this, SLOT(triggerStellateEdgeRemoval())); - actionList->addAction(mStellateEdgeRemovalAction); - - mDooSabinAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Doo Sabin"), this); - mDooSabinAction->setCheckable(true); - sm->registerAction(mDooSabinAction, "Remeshing", ""); - mDooSabinAction->setStatusTip(tr("Enter Doo Sabin Remeshing Mode")); - mDooSabinAction->setToolTip(tr("Doo Sabin Remeshing Mode")); - connect(mDooSabinAction, SIGNAL(triggered()), this, SLOT(triggerDooSabin())); - actionList->addAction(mDooSabinAction); - - mCornerCuttingAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Corner Cutting"), this); - mCornerCuttingAction->setCheckable(true); - sm->registerAction(mCornerCuttingAction, "Remeshing", ""); - mCornerCuttingAction->setStatusTip(tr("Enter Corner Cutting Remeshing Mode")); - mCornerCuttingAction->setToolTip(tr("Corner Cutting Remeshing Mode")); - connect(mCornerCuttingAction, SIGNAL(triggered()), this, SLOT(triggerCornerCutting())); - actionList->addAction(mCornerCuttingAction); - - mModifiedCornerCuttingAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Modified Corner Cutting"), this); - mModifiedCornerCuttingAction->setCheckable(true); - sm->registerAction(mModifiedCornerCuttingAction, "Remeshing", ""); - mModifiedCornerCuttingAction->setStatusTip(tr("Enter Modified Corner Cutting Remeshing Mode")); - mModifiedCornerCuttingAction->setToolTip(tr("Modified Corner Cutting Remeshing Mode")); - connect(mModifiedCornerCuttingAction, SIGNAL(triggered()), this, SLOT(triggerModifiedCornerCutting())); - actionList->addAction(mModifiedCornerCuttingAction); - - mSimplestAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Simplest"), this); - mSimplestAction->setCheckable(true); - sm->registerAction(mSimplestAction, "Remeshing", ""); - mSimplestAction->setStatusTip(tr("Enter Simplest Remeshing Mode")); - mSimplestAction->setToolTip(tr("Simplest Remeshing Mode")); - connect(mSimplestAction, SIGNAL(triggered()), this, SLOT(triggerSimplest())); - actionList->addAction(mSimplestAction); - - mPentagonalizationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Pentagonalization"), this); - mPentagonalizationAction->setCheckable(true); - sm->registerAction(mPentagonalizationAction, "Remeshing", ""); - mPentagonalizationAction->setStatusTip(tr("Enter Pentagonalization Remeshing Mode")); - mPentagonalizationAction->setToolTip(tr("Pentagonalization Remeshing Mode")); - connect(mPentagonalizationAction, SIGNAL(triggered()), this, SLOT(triggerPentagonalization())); - actionList->addAction(mPentagonalizationAction); - - mCubicPentagonalizationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Cubic Pentagonalization"), this); - mCubicPentagonalizationAction->setCheckable(true); - sm->registerAction(mCubicPentagonalizationAction, "Remeshing", ""); - mCubicPentagonalizationAction->setStatusTip(tr("Enter Cubic Pentagonalization Remeshing Mode")); - mCubicPentagonalizationAction->setToolTip(tr("Cubic Pentagonalization Remeshing Mode")); - connect(mCubicPentagonalizationAction, SIGNAL(triggered()), this, SLOT(triggerCubicPentagonalization())); - actionList->addAction(mCubicPentagonalizationAction); - - mDualPentagonalizationAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Pentagonalization"), this); - mDualPentagonalizationAction->setCheckable(true); - sm->registerAction(mDualPentagonalizationAction, "Remeshing", ""); - mDualPentagonalizationAction->setStatusTip(tr("Enter Dual Pentagonalization Remeshing Mode")); - mDualPentagonalizationAction->setToolTip(tr("Dual Pentagonalization Remeshing Mode")); - connect(mDualPentagonalizationAction, SIGNAL(triggered()), this, SLOT(triggerDualPentagonalization())); - actionList->addAction(mDualPentagonalizationAction); - - mLoopStyleRemeshingAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Loop Style Remeshing"), this); - mLoopStyleRemeshingAction->setCheckable(true); - sm->registerAction(mLoopStyleRemeshingAction, "Remeshing", ""); - mLoopStyleRemeshingAction->setStatusTip(tr("Enter Loop Style Remeshing Remeshing Mode")); - mLoopStyleRemeshingAction->setToolTip(tr("Loop Style Remeshing Remeshing Mode")); - connect(mLoopStyleRemeshingAction, SIGNAL(triggered()), this, SLOT(triggerLoopStyleRemeshing())); - actionList->addAction(mLoopStyleRemeshingAction); - - mLoopSubdivisionAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Loop Subdivision"), this); - mLoopSubdivisionAction->setCheckable(true); - sm->registerAction(mLoopSubdivisionAction, "Remeshing", ""); - mLoopSubdivisionAction->setStatusTip(tr("Enter Loop Subdivision Remeshing Mode")); - mLoopSubdivisionAction->setToolTip(tr("Loop Subdivision Remeshing Mode")); - connect(mLoopSubdivisionAction, SIGNAL(triggered()), this, SLOT(triggerLoopSubdivision())); - actionList->addAction(mLoopSubdivisionAction); - - mDualLoopStyleRemeshingAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Loop Style Remeshing"), this); - mDualLoopStyleRemeshingAction->setCheckable(true); - sm->registerAction(mDualLoopStyleRemeshingAction, "Remeshing", ""); - mDualLoopStyleRemeshingAction->setStatusTip(tr("Enter Dual Loop Style Remeshing Remeshing Mode")); - mDualLoopStyleRemeshingAction->setToolTip(tr("Dual Loop Style Remeshing Remeshing Mode")); - connect(mDualLoopStyleRemeshingAction, SIGNAL(triggered()), this, SLOT(triggerDualLoopStyleRemeshing())); - actionList->addAction(mDualLoopStyleRemeshingAction); - - mDualLoopSubdivisionAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Loop Subdivision"), this); - mDualLoopSubdivisionAction->setCheckable(true); - sm->registerAction(mDualLoopSubdivisionAction, "Remeshing", ""); - mDualLoopSubdivisionAction->setStatusTip(tr("Enter Dual Loop Subdivision Remeshing Mode")); - mDualLoopSubdivisionAction->setToolTip(tr("Dual Loop Subdivision Remeshing Mode")); - connect(mDualLoopSubdivisionAction, SIGNAL(triggered()), this, SLOT(triggerDualLoopSubdivision())); - actionList->addAction(mDualLoopSubdivisionAction); - - mGlobalExtrudeAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Global Extrude"), this); - mGlobalExtrudeAction->setCheckable(true); - sm->registerAction(mGlobalExtrudeAction, "Remeshing", ""); - mGlobalExtrudeAction->setStatusTip(tr("Enter Global Extrude Remeshing Mode")); - mGlobalExtrudeAction->setToolTip(tr("Global Extrude Remeshing Mode")); - connect(mGlobalExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerGlobalExtrude())); - actionList->addAction(mGlobalExtrudeAction); - - mCheckerboardAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Checkerboard"), this); - mCheckerboardAction->setCheckable(true); - sm->registerAction(mCheckerboardAction, "Remeshing", ""); - mCheckerboardAction->setStatusTip(tr("Enter Checkerboard Remeshing Mode")); - mCheckerboardAction->setToolTip(tr("Checkerboard Remeshing Mode")); - connect(mCheckerboardAction, SIGNAL(triggered()), this, SLOT(triggerCheckerboard())); - actionList->addAction(mCheckerboardAction); - - mDualGlobalExtrudeAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Global Extrude"), this); - mDualGlobalExtrudeAction->setCheckable(true); - sm->registerAction(mDualGlobalExtrudeAction, "Remeshing", ""); - mDualGlobalExtrudeAction->setStatusTip(tr("Enter Dual Global Extrude Remeshing Mode")); - mDualGlobalExtrudeAction->setToolTip(tr("Dual Global Extrude Remeshing Mode")); - connect(mDualGlobalExtrudeAction, SIGNAL(triggered()), this, SLOT(triggerDualGlobalExtrude())); - actionList->addAction(mDualGlobalExtrudeAction); - - mDualCheckerboardAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Checkerboard"), this); - mDualCheckerboardAction->setCheckable(true); - sm->registerAction(mDualCheckerboardAction, "Remeshing", ""); - mDualCheckerboardAction->setStatusTip(tr("Enter Dual Checkerboard Remeshing Mode")); - mDualCheckerboardAction->setToolTip(tr("Dual Checkerboard Remeshing Mode")); - connect(mDualCheckerboardAction, SIGNAL(triggered()), this, SLOT(triggerDualCheckerboard())); - actionList->addAction(mDualCheckerboardAction); - - mPentagonPreservingAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Pentagon Preserving"), this); - mPentagonPreservingAction->setCheckable(true); - sm->registerAction(mPentagonPreservingAction, "Remeshing", ""); - mPentagonPreservingAction->setStatusTip(tr("Enter Pentagon Preserving Remeshing Mode")); - mPentagonPreservingAction->setToolTip(tr("Pentagon Preserving Remeshing Mode")); - connect(mPentagonPreservingAction, SIGNAL(triggered()), this, SLOT(triggerPentagonPreserving())); - actionList->addAction(mPentagonPreservingAction); - - mDualPentagonPreservingAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Pentagon Preserving"), this); - mDualPentagonPreservingAction->setCheckable(true); - sm->registerAction(mDualPentagonPreservingAction, "Remeshing", ""); - mDualPentagonPreservingAction->setStatusTip(tr("Enter Dual Pentagon Preserving Remeshing Mode")); - mDualPentagonPreservingAction->setToolTip(tr("Dual Pentagon Preserving Remeshing Mode")); - connect(mDualPentagonPreservingAction, SIGNAL(triggered()), this, SLOT(triggerDualPentagonPreserving())); - actionList->addAction(mDualPentagonPreservingAction); - - mDualLoopStyleRemeshingSixAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Loop Style"), this); - mDualLoopStyleRemeshingSixAction->setCheckable(true); - sm->registerAction(mDualLoopStyleRemeshingSixAction, "Remeshing", ""); - mDualLoopStyleRemeshingSixAction->setStatusTip(tr("Enter Loop Style Remeshing Remeshing Mode")); - mDualLoopStyleRemeshingSixAction->setToolTip(tr("Dual Loop Style Remeshing Remeshing Mode")); - connect(mDualLoopStyleRemeshingSixAction, SIGNAL(triggered()), this, SLOT(triggerDualLoopStyleRemeshingSix())); - actionList->addAction(mDualLoopStyleRemeshingSixAction); - - mLoopStyleRemeshingSixAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Loop Style"), this); - mLoopStyleRemeshingSixAction->setCheckable(true); - sm->registerAction(mLoopStyleRemeshingSixAction, "Remeshing", ""); - mLoopStyleRemeshingSixAction->setStatusTip(tr("Enter Loop Style Remeshing Remeshing Mode")); - mLoopStyleRemeshingSixAction->setToolTip(tr("Loop Style Remeshing Remeshing Mode")); - connect(mLoopStyleRemeshingSixAction, SIGNAL(triggered()), this, SLOT(triggerLoopStyleRemeshingSix())); - actionList->addAction(mLoopStyleRemeshingSixAction); - - mFractalAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Fractal"), this); - mFractalAction->setCheckable(true); - sm->registerAction(mFractalAction, "Remeshing", ""); - mFractalAction->setStatusTip(tr("Enter Fractal Remeshing Mode")); - mFractalAction->setToolTip(tr("Fractal Remeshing Mode")); - connect(mFractalAction, SIGNAL(triggered()), this, SLOT(triggerFractal())); - actionList->addAction(mFractalAction); - - mDoubleStellateMiscAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Double Stellate"), this); - mDoubleStellateMiscAction->setCheckable(true); - sm->registerAction(mDoubleStellateMiscAction, "Remeshing", ""); - mDoubleStellateMiscAction->setStatusTip(tr("Enter Double Stellate Remeshing Mode")); - mDoubleStellateMiscAction->setToolTip(tr("Double Stellate Remeshing Mode")); - connect(mDoubleStellateMiscAction, SIGNAL(triggered()), this, SLOT(triggerDoubleStellateMisc())); - actionList->addAction(mDoubleStellateMiscAction); - - mDooSabinBCAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Doo Sabin BC"), this); - mDooSabinBCAction->setCheckable(true); - sm->registerAction(mDooSabinBCAction, "Remeshing", ""); - mDooSabinBCAction->setStatusTip(tr("Enter Doo Sabin BC Remeshing Mode")); - mDooSabinBCAction->setToolTip(tr("Doo Sabin BC Remeshing Mode")); - connect(mDooSabinBCAction, SIGNAL(triggered()), this, SLOT(triggerDooSabinBC())); - actionList->addAction(mDooSabinBCAction); - - mDooSabinBCNewAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Doo Sabin BC New"), this); - mDooSabinBCNewAction->setCheckable(true); - sm->registerAction(mDooSabinBCNewAction, "Remeshing", ""); - mDooSabinBCNewAction->setStatusTip(tr("Enter Doo Sabin BC New Remeshing Mode")); - mDooSabinBCNewAction->setToolTip(tr("Doo Sabin BC New Remeshing Mode")); - connect(mDooSabinBCNewAction, SIGNAL(triggered()), this, SLOT(triggerDooSabinBCNew())); - actionList->addAction(mDooSabinBCNewAction); - - mDomeAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dome"), this); - mDomeAction->setCheckable(true); - sm->registerAction(mDomeAction, "Remeshing", ""); - mDomeAction->setStatusTip(tr("Enter Dome Remeshing Mode")); - mDomeAction->setToolTip(tr("Dome Remeshing Mode")); - connect(mDomeAction, SIGNAL(triggered()), this, SLOT(triggerDome())); - actionList->addAction(mDomeAction); - - mSubdivideFaceAction = new QAction(/*QIcon(":images/doosabin_extrude.png"),*/tr("Subdivide Face"), this); - mSubdivideFaceAction->setCheckable(true); - sm->registerAction(mSubdivideFaceAction, "Remeshing", ""); - mSubdivideFaceAction->setStatusTip(tr("Enter Subdivide Face Remeshing Mode")); - mSubdivideFaceAction->setToolTip(tr("Subdivide Face Remeshing Mode")); - connect(mSubdivideFaceAction, SIGNAL(triggered()), this, SLOT(triggerSubdivideFace())); - actionList->addAction(mSubdivideFaceAction); - -} - -QMenu* RemeshingMode::getMenu() -{ - mRemeshingMenu = new QMenu(tr("Remeshing")); - - mRemeshingMenu->addAction(mDualAction); - - mThreeConversionMenu = new QMenu(tr("3-Conversion")); - mThreeConversionMenu->addAction(mRootThreeAction); - mThreeConversionMenu->addAction(mTriangulateAction); - mThreeConversionMenu->addAction(mDualVertexTruncationAction); - mThreeConversionMenu->addAction(mStellationAction); - mThreeConversionMenu->addAction(mDoubleStellationAction); - mThreeConversionMenu->addAction(mTwelveSixFourAction); - mThreeConversionMenu->addSeparator(); - mThreeConversionMenu->addAction(mHoneycombAction); - mThreeConversionMenu->addAction(mVertexTruncationAction); - mThreeConversionMenu->addAction(mDualTwelveSixFourAction); - - mRemeshingMenu->addMenu(mThreeConversionMenu); - - mFourConversionMenu = new QMenu(tr("4-Conversion")); - mFourConversionMenu->addAction(mLinearVertexAction); - mFourConversionMenu->addAction(mCatmullClarkAction); - mFourConversionMenu->addAction(mStellateEdgeRemovalAction); - mFourConversionMenu->addSeparator(); - mFourConversionMenu->addAction(mDooSabinAction); - mFourConversionMenu->addAction(mCornerCuttingAction); - mFourConversionMenu->addAction(mModifiedCornerCuttingAction); - mFourConversionMenu->addAction(mSimplestAction); - - mRemeshingMenu->addMenu(mFourConversionMenu); - - mFiveConversionMenu = new QMenu(tr("5-Conversion")); - mFiveConversionMenu->addAction(mPentagonalizationAction); - mFiveConversionMenu->addAction(mCubicPentagonalizationAction); - mFiveConversionMenu->addSeparator(); - mFiveConversionMenu->addAction(mDualPentagonalizationAction); - - mRemeshingMenu->addMenu(mFiveConversionMenu); - - mThreePreservationMenu = new QMenu(tr("3-Preservation")); - mThreePreservationMenu->addAction(mLoopStyleRemeshingAction); - mThreePreservationMenu->addAction(mLoopSubdivisionAction); - mThreePreservationMenu->addSeparator(); - mThreePreservationMenu->addAction(mDualLoopStyleRemeshingAction); - mThreePreservationMenu->addAction(mDualLoopSubdivisionAction); - - mRemeshingMenu->addMenu(mThreePreservationMenu); - - mFourPreservationMenu = new QMenu(tr("4-Preservation")); - // mFourPreservationMenu->addAction(mGlobalExtrudeAction); - mFourPreservationMenu->addAction(mCheckerboardAction); - mFourPreservationMenu->addSeparator(); - // mFourPreservationMenu->addAction(mDualGlobalExtrudeAction); - mFourPreservationMenu->addAction(mDualCheckerboardAction); - - mRemeshingMenu->addMenu(mFourPreservationMenu); - - mFivePreservationMenu = new QMenu(tr("5-Preservation")); - mFivePreservationMenu->addAction(mPentagonPreservingAction); - mFivePreservationMenu->addSeparator(); - mFivePreservationMenu->addAction(mDualPentagonPreservingAction); - - mRemeshingMenu->addMenu(mFivePreservationMenu); - - mSixPreservationMenu = new QMenu(tr("6-Preservation")); - mSixPreservationMenu->addAction(mDualLoopStyleRemeshingSixAction); - mSixPreservationMenu->addSeparator(); - mSixPreservationMenu->addAction(mLoopStyleRemeshingSixAction); - - mRemeshingMenu->addMenu(mSixPreservationMenu); - - mMiscellaneousMenu = new QMenu(tr("Miscellaneous")); - mMiscellaneousMenu->addAction(mFractalAction); - mMiscellaneousMenu->addAction(mDoubleStellateMiscAction); - mMiscellaneousMenu->addAction(mDooSabinBCAction); - mMiscellaneousMenu->addAction(mDooSabinBCNewAction); - mMiscellaneousMenu->addAction(mDomeAction); - mMiscellaneousMenu->addAction(mSubdivideFaceAction); - - mRemeshingMenu->addMenu(mMiscellaneousMenu); - - return mRemeshingMenu; -} - -void RemeshingMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mDualAction); - actionGroup->addAction(mRootThreeAction); - actionGroup->addAction(mTriangulateAction); - actionGroup->addAction(mDualVertexTruncationAction); - actionGroup->addAction(mStellationAction); - actionGroup->addAction(mDoubleStellationAction); - actionGroup->addAction(mTwelveSixFourAction); - actionGroup->addAction(mHoneycombAction); - actionGroup->addAction(mVertexTruncationAction); - actionGroup->addAction(mDualTwelveSixFourAction); - actionGroup->addAction(mLinearVertexAction); - actionGroup->addAction(mCatmullClarkAction); - actionGroup->addAction(mStellateEdgeRemovalAction); - actionGroup->addAction(mDooSabinAction); - actionGroup->addAction(mCornerCuttingAction); - actionGroup->addAction(mModifiedCornerCuttingAction); - actionGroup->addAction(mSimplestAction); - actionGroup->addAction(mPentagonalizationAction); - actionGroup->addAction(mCubicPentagonalizationAction); - actionGroup->addAction(mDualPentagonalizationAction); - actionGroup->addAction(mLoopStyleRemeshingAction); - actionGroup->addAction(mLoopSubdivisionAction); - actionGroup->addAction(mDualLoopStyleRemeshingAction); - actionGroup->addAction(mDualLoopSubdivisionAction); - // actionGroup->addAction(mGlobalExtrudeAction); - actionGroup->addAction(mCheckerboardAction); - // actionGroup->addAction(mDualGlobalExtrudeAction); - actionGroup->addAction(mDualCheckerboardAction); - actionGroup->addAction(mPentagonPreservingAction); - actionGroup->addAction(mDualPentagonPreservingAction); - actionGroup->addAction(mDualLoopStyleRemeshingSixAction); - actionGroup->addAction(mLoopStyleRemeshingSixAction); - actionGroup->addAction(mFractalAction); - actionGroup->addAction(mDoubleStellateMiscAction); - actionGroup->addAction(mDooSabinBCAction); - actionGroup->addAction(mDooSabinBCNewAction); - actionGroup->addAction(mDomeAction); - - actionGroup->addAction(mSubdivideFaceAction); - - // toolBar->setOrientation(Qt::Vertical); - // toolBar->setToolButtonStyle(Qt::ToolButtonTextOnly); - // toolBar->setFloatable(true); - - toolBar->addAction(mDualAction); - toolBar->addAction(mRootThreeAction); - toolBar->addAction(mTriangulateAction); - toolBar->addAction(mDualVertexTruncationAction); - toolBar->addAction(mStellationAction); - toolBar->addAction(mDoubleStellationAction); - toolBar->addAction(mTwelveSixFourAction); - // toolBar->addSeparator(); - toolBar->addAction(mHoneycombAction); - toolBar->addAction(mVertexTruncationAction); - toolBar->addAction(mDualTwelveSixFourAction); - toolBar->addAction(mLinearVertexAction); - toolBar->addAction(mCatmullClarkAction); - toolBar->addAction(mStellateEdgeRemovalAction); - toolBar->addAction(mDooSabinAction); - toolBar->addAction(mCornerCuttingAction); - toolBar->addAction(mModifiedCornerCuttingAction); - toolBar->addAction(mSimplestAction); - // toolBar->addSeparator(); - toolBar->addAction(mPentagonalizationAction); - toolBar->addAction(mCubicPentagonalizationAction); - toolBar->addAction(mDualPentagonalizationAction); - // toolBar->addSeparator(); - toolBar->addAction(mLoopStyleRemeshingAction); - toolBar->addAction(mLoopSubdivisionAction); - toolBar->addAction(mDualLoopStyleRemeshingAction); - toolBar->addAction(mDualLoopSubdivisionAction); - // toolBar->addSeparator(); - // toolBar->addAction(mGlobalExtrudeAction); - toolBar->addAction(mCheckerboardAction); - // toolBar->addAction(mDualGlobalExtrudeAction); - toolBar->addAction(mDualCheckerboardAction); - // toolBar->addSeparator(); - toolBar->addAction(mPentagonPreservingAction); - toolBar->addAction(mDualPentagonPreservingAction); - // toolBar->addSeparator(); - toolBar->addAction(mDualLoopStyleRemeshingSixAction); - toolBar->addAction(mLoopStyleRemeshingSixAction); - // toolBar->addSeparator(); - toolBar->addAction(mFractalAction); - toolBar->addAction(mDoubleStellateMiscAction); - toolBar->addAction(mDooSabinBCAction); - toolBar->addAction(mDooSabinBCNewAction); - toolBar->addAction(mDomeAction); - toolBar->addAction(mSubdivideFaceAction); - - stackedWidget->addWidget(mDualWidget); - stackedWidget->addWidget(mRootThreeWidget); - stackedWidget->addWidget(mTriangulateWidget); - stackedWidget->addWidget(mDualVertexTruncationWidget); - stackedWidget->addWidget(mStellationWidget); - stackedWidget->addWidget(mDoubleStellationWidget); - stackedWidget->addWidget(mTwelveSixFourWidget); - stackedWidget->addWidget(mHoneycombWidget); - stackedWidget->addWidget(mVertexTruncationWidget); - stackedWidget->addWidget(mDualTwelveSixFourWidget); - stackedWidget->addWidget(mLinearVertexWidget); - stackedWidget->addWidget(mCatmullClarkWidget); - stackedWidget->addWidget(mStellateEdgeRemovalWidget); - stackedWidget->addWidget(mDooSabinWidget); - stackedWidget->addWidget(mCornerCuttingWidget); - stackedWidget->addWidget(mModifiedCornerCuttingWidget); - stackedWidget->addWidget(mSimplestWidget); - stackedWidget->addWidget(mPentagonalizationWidget); - stackedWidget->addWidget(mCubicPentagonalizationWidget); - stackedWidget->addWidget(mDualPentagonalizationWidget); - stackedWidget->addWidget(mLoopStyleRemeshingWidget); - stackedWidget->addWidget(mLoopSubdivisionWidget); - stackedWidget->addWidget(mDualLoopStyleRemeshingWidget); - stackedWidget->addWidget(mDualLoopSubdivisionWidget); - // stackedWidget->addWidget(mGlobalExtrudeWidget); - stackedWidget->addWidget(mCheckerboardWidget); - // stackedWidget->addWidget(mDualGlobalExtrudeWidget); - stackedWidget->addWidget(mDualCheckerboardWidget); - stackedWidget->addWidget(mPentagonPreservingWidget); - stackedWidget->addWidget(mDualPentagonPreservingWidget); - stackedWidget->addWidget(mDualLoopStyleRemeshingSixWidget); - stackedWidget->addWidget(mLoopStyleRemeshingSixWidget); - stackedWidget->addWidget(mFractalWidget); - stackedWidget->addWidget(mDoubleStellateMiscWidget); - stackedWidget->addWidget(mDooSabinBCWidget); - stackedWidget->addWidget(mDooSabinBCNewWidget); - stackedWidget->addWidget(mDomeWidget); - stackedWidget->addWidget(mSubdivideFaceWidget); - -} - -QDoubleSpinBox *RemeshingMode::createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col) -{ - // label = new QLabel(s,this); - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox(this); - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -void RemeshingMode::setupDual() -{ - mDualWidget = new QWidget; - mDualLayout = new QGridLayout; - mDualLayout->setVerticalSpacing(1); - mDualLayout->setHorizontalSpacing(1); - - dualFasterCheckBox = new QCheckBox(tr("Use Faster Method")); - connect(dualFasterCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(toggleAccurateDualFlag(int))); - mDualLayout->addWidget(dualFasterCheckBox, 0, 0); - //create crust button - dualCreateButton = new QPushButton(tr("Create Dual"), this); - connect(dualCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualLayout->addWidget(dualCreateButton, 1, 0, 1, 2); - - mDualLayout->setRowStretch(2, 1); - mDualLayout->setColumnStretch(2, 1); - mDualWidget->setWindowTitle(tr("Dual Remeshing")); - mDualWidget->setLayout(mDualLayout); -} - -void RemeshingMode::triggerDual() -{ - ((MainWindow*)mParent)->setToolOptions(mDualWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Dual); -} - -void RemeshingMode::setupThreeConversion() -{ - mRootThreeWidget = new QWidget; - mTriangulateWidget = new QWidget; - mDualVertexTruncationWidget = new QWidget; - mStellationWidget = new QWidget; - mDoubleStellationWidget = new QWidget; - mTwelveSixFourWidget = new QWidget; - mHoneycombWidget = new QWidget; - mVertexTruncationWidget = new QWidget; - mDualTwelveSixFourWidget = new QWidget; - - //create the panels for each of these three conversion schemes - - //root 3 - mRootThreeLayout = new QGridLayout; - mRootThreeLayout->setVerticalSpacing(1); - mRootThreeLayout->setHorizontalSpacing(1); - // mRootThreeLayout->setMargin(0); - rootThreeCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(rootThreeCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mRootThreeLayout->addWidget(rootThreeCreateButton, 0, 0); - - mRootThreeLayout->setRowStretch(1, 1); - mRootThreeLayout->setColumnStretch(1, 1); - mRootThreeWidget->setWindowTitle(tr("Root-3 Remeshing")); - mRootThreeWidget->setLayout(mRootThreeLayout); - - //triangulate - mTriangulateLayout = new QGridLayout; - mTriangulateLayout->setVerticalSpacing(1); - mTriangulateLayout->setHorizontalSpacing(1); - triangulateCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(triangulateCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mTriangulateLayout->addWidget(triangulateCreateButton, 0, 0); - - mTriangulateLayout->setRowStretch(1, 1); - mTriangulateLayout->setColumnStretch(1, 1); - mTriangulateWidget->setWindowTitle(tr("Triangulate Remeshing")); - mTriangulateWidget->setLayout(mTriangulateLayout); - - //dual vertex truncation - mDualVertexTruncationLayout = new QGridLayout; - mDualVertexTruncationLayout->setVerticalSpacing(1); - mDualVertexTruncationLayout->setHorizontalSpacing(1); - // mDualVertexTruncationLayout->setMargin(0); - dualVertexTruncationButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualVertexTruncationButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualVertexTruncationLayout->addWidget(dualVertexTruncationButton, 0, 0); - - mDualVertexTruncationLayout->setRowStretch(1, 1); - mDualVertexTruncationLayout->setColumnStretch(1, 1); - mDualVertexTruncationWidget->setWindowTitle(tr("Dual Vertex Truncation")); - mDualVertexTruncationWidget->setLayout(mDualVertexTruncationLayout); - - //stellation - mStellationLayout = new QGridLayout; - mStellationLayout->setVerticalSpacing(1); - mStellationLayout->setHorizontalSpacing(1); - // mStellationLayout->setMargin(0); - stellationButton = new QPushButton(tr("Perform Remeshing"), this); - connect(stellationButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mStellationLayout->addWidget(stellationButton, 0, 0); - - mStellationLayout->setRowStretch(1, 1); - mStellationLayout->setColumnStretch(1, 1); - mStellationWidget->setWindowTitle(tr("Stellation Remeshing")); - mStellationWidget->setLayout(mStellationLayout); - - //double stellate - mDoubleStellationLayout = new QGridLayout; - mDoubleStellationLayout->setVerticalSpacing(1); - mDoubleStellationLayout->setHorizontalSpacing(1); - // mDoubleStellationLayout->setMargin(0); - //scale factor - starLabel = new QLabel(this); - starSpinBox = createDoubleSpinBox(mDoubleStellationLayout, starLabel, tr("Offset:"), 0.0, 1.0, 0.01, 0.0, 3, 0, 0); - connect(starSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeStarOffset(double))); - //create button - starButton = new QPushButton(tr("Perform Remeshing"), this); - connect(starButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDoubleStellationLayout->addWidget(starButton, 1, 0, 1, 2); - - mDoubleStellationLayout->setRowStretch(2, 1); - mDoubleStellationLayout->setColumnStretch(2, 1); - mDoubleStellationWidget->setWindowTitle(tr("Double Stellation Remeshing")); - mDoubleStellationWidget->setLayout(mDoubleStellationLayout); - - //12.6.4 - mTwelveSixFourLayout = new QGridLayout; - mTwelveSixFourLayout->setVerticalSpacing(1); - mTwelveSixFourLayout->setHorizontalSpacing(1); - // mTwelveSixFourLayout->setMargin(0); - twelveSixFourLabel = new QLabel(this); - twelveSixFourSpinBox = createDoubleSpinBox(mTwelveSixFourLayout, twelveSixFourLabel, tr("Offset:"), 0.0, 1.0, 0.01, 0.7, 3, 0, 0); - connect(twelveSixFourSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeSubStellateCurve(double))); - //create button - twelveSixFourButton = new QPushButton(tr("Perform Remeshing"), this); - connect(twelveSixFourButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mTwelveSixFourLayout->addWidget(twelveSixFourButton, 1, 0, 1, 2); - - mTwelveSixFourLayout->setRowStretch(2, 1); - mTwelveSixFourLayout->setColumnStretch(2, 1); - mTwelveSixFourWidget->setWindowTitle(tr("12.6.4")); - mTwelveSixFourWidget->setLayout(mTwelveSixFourLayout); - - //honeycomb - mHoneycombLayout = new QGridLayout; - mHoneycombLayout->setVerticalSpacing(1); - mHoneycombLayout->setHorizontalSpacing(1); - - // mHoneycombLayout->setMargin(0); - honeycombButton = new QPushButton(tr("Perform Remeshing"), this); - connect(honeycombButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mHoneycombLayout->addWidget(honeycombButton, 0, 0); - - mHoneycombLayout->setRowStretch(1, 1); - mHoneycombLayout->setColumnStretch(2, 1); - mHoneycombWidget->setWindowTitle(tr("Honeycomb Remeshing")); - mHoneycombWidget->setLayout(mHoneycombLayout); - - //vertexTruncation - mVertexTruncationLayout = new QGridLayout; - mVertexTruncationLayout->setVerticalSpacing(1); - mVertexTruncationLayout->setHorizontalSpacing(1); - // mVertexTruncationLayout->setMargin(0); - //scale factor - vertexTruncationLabel = new QLabel(this); - vertexTruncationSpinBox = createDoubleSpinBox(mVertexTruncationLayout, vertexTruncationLabel, tr("Offset:"), 0.0, 0.5, 0.01, 0.25, 3, 0, 0); - connect(vertexTruncationSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeVertexCuttingOffset(double))); - vertexTruncationButton = new QPushButton(tr("Perform Remeshing"), this); - connect(vertexTruncationButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mVertexTruncationLayout->addWidget(vertexTruncationButton, 1, 0); - mVertexTruncationLayout->setRowStretch(4, 1); - mVertexTruncationLayout->setColumnStretch(2, 1); - mVertexTruncationWidget->setWindowTitle(tr("Vertex Truncation Remeshing")); - mVertexTruncationWidget->setLayout(mVertexTruncationLayout); - - //dual 12.6.4 - mDualTwelveSixFourLayout = new QGridLayout; - mDualTwelveSixFourLayout->setVerticalSpacing(1); - mDualTwelveSixFourLayout->setHorizontalSpacing(1); - // mDualTwelveSixFourLayout->setMargin(0); - //scale factor - dualTwelveSixFourLabel = new QLabel(this); - dualTwelveSixFourSpinBox = createDoubleSpinBox(mDualTwelveSixFourLayout, dualTwelveSixFourLabel, tr("Offset:"), 0.0, 1.0, 0.01, 0.06, 3, 0, 0); - connect(dualTwelveSixFourSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDual1264Scale(double))); - //create button - dualTwelveSixFourButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualTwelveSixFourButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualTwelveSixFourLayout->addWidget(dualTwelveSixFourButton, 1, 0, 1, 2); - mDualTwelveSixFourLayout->setRowStretch(2, 1); - mDualTwelveSixFourLayout->setColumnStretch(2, 1); - mDualTwelveSixFourWidget->setWindowTitle(tr("Dual 12.6.4 Remeshing")); - mDualTwelveSixFourWidget->setLayout(mDualTwelveSixFourLayout); -} - -void RemeshingMode::triggerRootThree() -{ - ((MainWindow*)mParent)->setToolOptions(mRootThreeWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Root3); -} - -void RemeshingMode::triggerTriangulate() -{ - ((MainWindow*)mParent)->setToolOptions(mTriangulateWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Triangulate); -} - -void RemeshingMode::triggerDualVertexTruncation() -{ - ((MainWindow*)mParent)->setToolOptions(mDualVertexTruncationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualVertexTrunc); -} - -void RemeshingMode::triggerStellation() -{ - ((MainWindow*)mParent)->setToolOptions(mStellationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::GlobalStellate); -} - -void RemeshingMode::triggerDoubleStellation() -{ - ((MainWindow*)mParent)->setToolOptions(mDoubleStellationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Star); -} - -void RemeshingMode::triggerTwelveSixFour() -{ - ((MainWindow*)mParent)->setToolOptions(mTwelveSixFourWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Generic1264); -} - -void RemeshingMode::triggerHoneycomb() -{ - ((MainWindow*)mParent)->setToolOptions(mHoneycombWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Honeycomb); -} - -void RemeshingMode::triggerVertexTruncation() -{ - ((MainWindow*)mParent)->setToolOptions(mVertexTruncationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::VertexTrunc); -} - -void RemeshingMode::triggerDualTwelveSixFour() -{ - ((MainWindow*)mParent)->setToolOptions(mDualTwelveSixFourWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualGeneric1264); -} - -void RemeshingMode::setupFourConversion() -{ - mLinearVertexWidget = new QWidget; - mCatmullClarkWidget = new QWidget; - mStellateEdgeRemovalWidget = new QWidget; - mDooSabinWidget = new QWidget; - mCornerCuttingWidget = new QWidget; - mModifiedCornerCuttingWidget = new QWidget; - mSimplestWidget = new QWidget; - - //linear vertex insertion - mLinearVertexLayout = new QGridLayout; - mLinearVertexLayout->setVerticalSpacing(1); - mLinearVertexLayout->setHorizontalSpacing(1); - // mLinearVertexLayout->setMargin(0); - linearVertexCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(linearVertexCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mLinearVertexLayout->addWidget(linearVertexCreateButton, 0, 0); - mLinearVertexLayout->setRowStretch(1, 1); - mLinearVertexLayout->setColumnStretch(2, 1); - mLinearVertexWidget->setWindowTitle(tr("Linear Vertex Insertion Remeshing")); - mLinearVertexWidget->setLayout(mLinearVertexLayout); - - //catmull clark - mCatmullClarkLayout = new QGridLayout; - mCatmullClarkLayout->setVerticalSpacing(1); - mCatmullClarkLayout->setHorizontalSpacing(1); - // mCatmullClarkLayout->setMargin(0); - catmullClarkCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(catmullClarkCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mCatmullClarkLayout->addWidget(catmullClarkCreateButton, 0, 0); - mCatmullClarkLayout->setRowStretch(1, 1); - mCatmullClarkLayout->setColumnStretch(2, 1); - mCatmullClarkWidget->setWindowTitle(tr("Catmull-Clark Remeshing")); - mCatmullClarkWidget->setLayout(mCatmullClarkLayout); - - //stellate with edge removal - mStellateEdgeRemovalLayout = new QGridLayout; - mStellateEdgeRemovalLayout->setVerticalSpacing(1); - mStellateEdgeRemovalLayout->setHorizontalSpacing(1); - // mStellateEdgeRemovalLayout->setMargin(0); - stellateEdgeRemovalCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(stellateEdgeRemovalCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mStellateEdgeRemovalLayout->addWidget(stellateEdgeRemovalCreateButton, 0, 0); - mStellateEdgeRemovalLayout->setRowStretch(1, 1); - mStellateEdgeRemovalLayout->setColumnStretch(2, 1); - mStellateEdgeRemovalWidget->setWindowTitle(tr("Stellate with Edge Removal Remeshing")); - mStellateEdgeRemovalWidget->setLayout(mStellateEdgeRemovalLayout); - - //doo sabin - mDooSabinLayout = new QGridLayout; - mDooSabinLayout->setVerticalSpacing(1); - mDooSabinLayout->setHorizontalSpacing(1); - // mDooSabinLayout->setMargin(0); - dooSabinCheckBox = new QCheckBox(tr("Check for multiple edges")); - mDooSabinLayout->addWidget(dooSabinCheckBox, 0, 0); - //connect the checkbox - connect(dooSabinCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(toggleDooSabinEdgeFlag(int))); - dooSabinCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dooSabinCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDooSabinLayout->addWidget(dooSabinCreateButton, 1, 0); - mDooSabinLayout->setRowStretch(1, 1); - mDooSabinLayout->setColumnStretch(2, 1); - mDooSabinWidget->setWindowTitle(tr("Doo Sabin Remeshing")); - mDooSabinWidget->setLayout(mDooSabinLayout); - - //corner cutting - mCornerCuttingLayout = new QGridLayout; - mCornerCuttingLayout->setVerticalSpacing(1); - mCornerCuttingLayout->setHorizontalSpacing(1); - // mCornerCuttingLayout->setMargin(0); - cornerCuttingAlphaLabel = new QLabel(this); - cornerCuttingAlphaSpinBox = createDoubleSpinBox(mCornerCuttingLayout, cornerCuttingAlphaLabel, tr("Alpha:"), 0.333, .999, 0.01, 0.5625, 3, 0, 0); - connect(cornerCuttingAlphaSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeCornerCuttingAlpha(double))); - cornerCuttingCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(cornerCuttingCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mCornerCuttingLayout->addWidget(cornerCuttingCreateButton, 1, 0, 1, 2); - mCornerCuttingLayout->setRowStretch(2, 1); - mCornerCuttingLayout->setColumnStretch(2, 1); - mCornerCuttingWidget->setWindowTitle(tr("Corner Cutting Remeshing")); - mCornerCuttingWidget->setLayout(mCornerCuttingLayout); - - //modified corner cutting - mModifiedCornerCuttingLayout = new QGridLayout; - mModifiedCornerCuttingLayout->setVerticalSpacing(1); - mModifiedCornerCuttingLayout->setHorizontalSpacing(1); - // mCornerCuttingLayout->setMargin(0); - //offset spinbox - modifiedCornerCuttingLabel = new QLabel(this); - modifiedCornerCuttingSpinBox = createDoubleSpinBox(mModifiedCornerCuttingLayout, modifiedCornerCuttingLabel, tr("Thickness:"), 0.0, 1.0, 0.01, 0.25, 3, 0, 0); - connect(modifiedCornerCuttingSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeModifiedCornerCuttingThickness(double))); - modifiedCornerCuttingCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(modifiedCornerCuttingCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mModifiedCornerCuttingLayout->addWidget(modifiedCornerCuttingCreateButton, 1, 0, 1, 2); - mModifiedCornerCuttingLayout->setRowStretch(2, 1); - mModifiedCornerCuttingLayout->setColumnStretch(2, 1); - mModifiedCornerCuttingWidget->setWindowTitle(tr("Modified Corner Cutting Remeshing")); - mModifiedCornerCuttingWidget->setLayout(mModifiedCornerCuttingLayout); - - //simplest - mSimplestLayout = new QGridLayout; - mSimplestLayout->setVerticalSpacing(1); - mSimplestLayout->setHorizontalSpacing(1); - // mSimplestLayout->setMargin(0); - simplestCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(simplestCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mSimplestLayout->addWidget(simplestCreateButton, 0, 0); - - mSimplestLayout->setRowStretch(1, 1); - mSimplestLayout->setColumnStretch(2, 1); - mSimplestWidget->setWindowTitle(tr("Simplest Remeshing Scheme")); - mSimplestWidget->setLayout(mSimplestLayout); -} - -void RemeshingMode::triggerLinearVertex() -{ - ((MainWindow*)mParent)->setToolOptions(mLinearVertexWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::LinearVertexInsertion); -} - -void RemeshingMode::triggerCatmullClark() -{ - ((MainWindow*)mParent)->setToolOptions(mCatmullClarkWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::CatmullClark); -} - -void RemeshingMode::triggerStellateEdgeRemoval() -{ - ((MainWindow*)mParent)->setToolOptions(mStellateEdgeRemovalWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::ModifiedStellate); -} - -void RemeshingMode::triggerDooSabin() -{ - ((MainWindow*)mParent)->setToolOptions(mDooSabinWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DooSabin); -} - -void RemeshingMode::triggerCornerCutting() -{ - ((MainWindow*)mParent)->setToolOptions(mCornerCuttingWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::CornerCutting); -} - -void RemeshingMode::triggerModifiedCornerCutting() -{ - ((MainWindow*)mParent)->setToolOptions(mModifiedCornerCuttingWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::ModifiedCornerCutting); -} - -void RemeshingMode::triggerSimplest() -{ - ((MainWindow*)mParent)->setToolOptions(mSimplestWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Simplest); -} - -void RemeshingMode::setupFiveConversion() -{ - //create the stacked widget and all child widget pages - mPentagonalizationWidget = new QWidget; - mCubicPentagonalizationWidget = new QWidget; - mDualPentagonalizationWidget = new QWidget; - - //pentagonalization - mPentagonalizationLayout = new QGridLayout; - mPentagonalizationLayout->setVerticalSpacing(1); - mPentagonalizationLayout->setHorizontalSpacing(1); - // mPentagonalizationLayout->setMargin(0); - //offset spinbox - pentagonalizationLabel = new QLabel(this); - pentagonalizationSpinBox = createDoubleSpinBox(mPentagonalizationLayout, pentagonalizationLabel, tr("Offset:"), 0.0, 1.0, 0.01, 0.0, 3, 0, 0); - connect(pentagonalizationSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changePentagonalOffset(double))); - //button - pentagonalizationCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(pentagonalizationCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mPentagonalizationLayout->addWidget(pentagonalizationCreateButton, 1, 0, 1, 2); - mPentagonalizationLayout->setRowStretch(2, 1); - mPentagonalizationLayout->setColumnStretch(2, 1); - mPentagonalizationWidget->setWindowTitle(tr("Pentagonalization Remeshing")); - mPentagonalizationWidget->setLayout(mPentagonalizationLayout); - - //cubic Pentagonalization - mCubicPentagonalizationLayout = new QGridLayout; - mCubicPentagonalizationLayout->setVerticalSpacing(1); - mCubicPentagonalizationLayout->setHorizontalSpacing(1); - // mCubicPentagonalizationLayout->setMargin(0); - //offset spinbox - cubicPentagonalizationLabel = new QLabel(this); - cubicPentagonalizationSpinBox = createDoubleSpinBox(mCubicPentagonalizationLayout, cubicPentagonalizationLabel, tr("Offset:"), 0.0, 1.0, 0.01, 0.0, 3, 0, 0); - connect(cubicPentagonalizationSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changePentagonalOffset(double))); - cubicPentagonalizationCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(cubicPentagonalizationCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mCubicPentagonalizationLayout->addWidget(cubicPentagonalizationCreateButton, 1, 0, 1, 2); - mCubicPentagonalizationLayout->setRowStretch(2, 1); - mCubicPentagonalizationLayout->setColumnStretch(2, 1); - mCubicPentagonalizationWidget->setWindowTitle(tr("Cubic Pentagonalization Remeshing")); - mCubicPentagonalizationWidget->setLayout(mCubicPentagonalizationLayout); - - //dual pentagonalization - mDualPentagonalizationLayout = new QGridLayout; - mDualPentagonalizationLayout->setVerticalSpacing(1); - mDualPentagonalizationLayout->setHorizontalSpacing(1); - // mDualPentagonalizationLayout->setMargin(0); - dualPentagonalizationCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualPentagonalizationCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualPentagonalizationLayout->addWidget(dualPentagonalizationCreateButton, 0, 0); - mDualPentagonalizationLayout->setRowStretch(1, 1); - mDualPentagonalizationLayout->setColumnStretch(2, 1); - mDualPentagonalizationWidget->setWindowTitle(tr("Dual Pentagonalization Remeshing")); - mDualPentagonalizationWidget->setLayout(mDualPentagonalizationLayout); -} - -void RemeshingMode::triggerPentagonalization() -{ - ((MainWindow*)mParent)->setToolOptions(mPentagonalizationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Pentagonal); -} - -void RemeshingMode::triggerCubicPentagonalization() -{ - ((MainWindow*)mParent)->setToolOptions(mCubicPentagonalizationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::CubicPentagonal); -} - -void RemeshingMode::triggerDualPentagonalization() -{ - ((MainWindow*)mParent)->setToolOptions(mDualPentagonalizationWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualPentagonal); -} - -void RemeshingMode::setupThreePreservation() -{ - //create the stacked widget and all child widget pages - mLoopStyleRemeshingWidget = new QWidget; - mLoopSubdivisionWidget = new QWidget; - mDualLoopStyleRemeshingWidget = new QWidget; - mDualLoopSubdivisionWidget = new QWidget; - - //loop-style remeshing - mLoopStyleRemeshingLayout = new QGridLayout; - mLoopStyleRemeshingLayout->setVerticalSpacing(1); - mLoopStyleRemeshingLayout->setHorizontalSpacing(1); - // mLoopStyleRemeshingLayout->setMargin(0); - //offset spinbox - loopStyleRemeshingLabel = new QLabel(this); - loopStyleRemeshingSpinBox = createDoubleSpinBox(mLoopStyleRemeshingLayout, loopStyleRemeshingLabel, tr("Length:"), 0.0, 1.0, 0.01, 1.0, 3, 0, 0); - connect(loopStyleRemeshingSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeLoopStyleSubdivisionLength(double))); - loopStyleRemeshingButton = new QPushButton(tr("Perform Remeshing"), this); - connect(loopStyleRemeshingButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mLoopStyleRemeshingLayout->addWidget(loopStyleRemeshingButton, 1, 0, 1, 2); - mLoopStyleRemeshingLayout->setRowStretch(4, 1); - mLoopStyleRemeshingLayout->setColumnStretch(2, 1); - mLoopStyleRemeshingWidget->setWindowTitle(tr("Loop Style Remeshing")); - mLoopStyleRemeshingWidget->setLayout(mLoopStyleRemeshingLayout); - - //loop subdivision - mLoopSubdivisionLayout = new QGridLayout; - mLoopSubdivisionLayout->setVerticalSpacing(1); - mLoopSubdivisionLayout->setHorizontalSpacing(1); - // mLoopSubdivisionLayout->setMargin(0); - loopSubdivisionCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(loopSubdivisionCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mLoopSubdivisionLayout->addWidget(loopSubdivisionCreateButton, 0, 0); - mLoopSubdivisionLayout->setRowStretch(1, 1); - mLoopSubdivisionLayout->setColumnStretch(2, 1); - mLoopSubdivisionWidget->setWindowTitle(tr("Loop Subdivision Remeshing")); - mLoopSubdivisionWidget->setLayout(mLoopSubdivisionLayout); - - //dual of loop-style remeshing - mDualLoopStyleRemeshingLayout = new QGridLayout; - mDualLoopStyleRemeshingLayout->setVerticalSpacing(1); - mDualLoopStyleRemeshingLayout->setHorizontalSpacing(1); - // mDualLoopStyleRemeshingLayout->setMargin(0); - dualLoopStyleRemeshingTwistLabel = new QLabel(this); - dualLoopStyleRemeshingTwistSpinBox = createDoubleSpinBox(mDualLoopStyleRemeshingLayout, dualLoopStyleRemeshingTwistLabel, tr("Twist:"), 0.0, 1.0, 0.01, 0.0, 3, 0, 0); - connect(dualLoopStyleRemeshingTwistSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeRoot4Twist(double))); - dualLoopStyleRemeshingWeightLabel = new QLabel(this); - dualLoopStyleRemeshingWeightSpinBox = createDoubleSpinBox(mDualLoopStyleRemeshingLayout, dualLoopStyleRemeshingWeightLabel, tr("Weight:"), 0.0, 1.0, 0.01, 0.0, 3, 1, 0); - connect(dualLoopStyleRemeshingWeightSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeRoot4Weight(double))); - dualLoopStyleRemeshingButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualLoopStyleRemeshingButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualLoopStyleRemeshingLayout->addWidget(dualLoopStyleRemeshingButton, 2, 0, 1, 2); - mDualLoopStyleRemeshingLayout->setRowStretch(3, 1); - mDualLoopStyleRemeshingLayout->setColumnStretch(2, 1); - mDualLoopStyleRemeshingWidget->setWindowTitle(tr("Dual Loop Style Remeshing")); - mDualLoopStyleRemeshingWidget->setLayout(mDualLoopStyleRemeshingLayout); - - //dual of loop subdivision - mDualLoopSubdivisionLayout = new QGridLayout; - mDualLoopSubdivisionLayout->setVerticalSpacing(1); - mDualLoopSubdivisionLayout->setHorizontalSpacing(1); - // mDualLoopSubdivisionLayout->setMargin(0); - dualLoopSubdivisionCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualLoopSubdivisionCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualLoopSubdivisionLayout->addWidget(dualLoopSubdivisionCreateButton, 0, 0); - mDualLoopSubdivisionLayout->setRowStretch(1, 1); - mDualLoopSubdivisionLayout->setColumnStretch(1, 1); - mDualLoopSubdivisionWidget->setWindowTitle(tr("Dual Loop Subdivision Remeshing")); - mDualLoopSubdivisionWidget->setLayout(mDualLoopSubdivisionLayout); - -} - -void RemeshingMode::triggerLoopStyleRemeshing() -{ - ((MainWindow*)mParent)->setToolOptions(mLoopStyleRemeshingWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::LoopStyle); -} - -void RemeshingMode::triggerLoopSubdivision() -{ - ((MainWindow*)mParent)->setToolOptions(mLoopSubdivisionWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Loop); -} - -void RemeshingMode::triggerDualLoopStyleRemeshing() -{ - ((MainWindow*)mParent)->setToolOptions(mDualLoopStyleRemeshingWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Root4); -} - -void RemeshingMode::triggerDualLoopSubdivision() -{ - ((MainWindow*)mParent)->setToolOptions(mDualLoopSubdivisionWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualLoop); -} - -void RemeshingMode::setupFourPreservation() -{ - mGlobalExtrudeWidget = new QWidget; - mCheckerboardWidget = new QWidget; - mDualGlobalExtrudeWidget = new QWidget; - mDualCheckerboardWidget = new QWidget; - - //global extrude - mGlobalExtrudeLayout = new QGridLayout; - mGlobalExtrudeLayout->setVerticalSpacing(1); - mGlobalExtrudeLayout->setHorizontalSpacing(1); - // mGlobalExtrudeLayout->setMargin(0); - globalExtrudeButton = new QPushButton(tr("Perform Remeshing"), this); - connect(globalExtrudeButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mGlobalExtrudeLayout->addWidget(globalExtrudeButton, 0, 0); - mGlobalExtrudeLayout->setRowStretch(1, 1); - mGlobalExtrudeLayout->setColumnStretch(1, 1); - mGlobalExtrudeWidget->setWindowTitle(tr("Global Extrude Remeshing")); - mGlobalExtrudeWidget->setLayout(mGlobalExtrudeLayout); - - //checkerboard - mCheckerboardLayout = new QGridLayout; - mCheckerboardLayout->setVerticalSpacing(1); - mCheckerboardLayout->setHorizontalSpacing(1); - // mCheckerboardLayout->setMargin(0); - checkerboardCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(checkerboardCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mCheckerboardLayout->addWidget(checkerboardCreateButton, 0, 0); - mCheckerboardLayout->setRowStretch(1, 1); - mCheckerboardLayout->setColumnStretch(1, 1); - mCheckerboardWidget->setWindowTitle(tr("Checkerboard Remeshing")); - mCheckerboardWidget->setLayout(mCheckerboardLayout); - - //dual of global extrude - mDualGlobalExtrudeLayout = new QGridLayout; - mDualGlobalExtrudeLayout->setVerticalSpacing(1); - mDualGlobalExtrudeLayout->setHorizontalSpacing(1); - // mDualGlobalExtrudeLayout->setMargin(0); - dualGlobalExtrudeButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualGlobalExtrudeButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualGlobalExtrudeLayout->addWidget(dualGlobalExtrudeButton, 0, 0); - mDualGlobalExtrudeLayout->setRowStretch(1, 1); - mDualGlobalExtrudeLayout->setColumnStretch(1, 1); - mDualGlobalExtrudeWidget->setWindowTitle(tr("Dual Global Extrude Remeshing")); - mDualGlobalExtrudeWidget->setLayout(mDualGlobalExtrudeLayout); - - //dual of checkerboard remeshing - mDualCheckerboardLayout = new QGridLayout; - mDualCheckerboardLayout->setVerticalSpacing(1); - mDualCheckerboardLayout->setHorizontalSpacing(1); - // mDualCheckerboardLayout->setMargin(0); - dualCheckerboardCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualCheckerboardCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualCheckerboardLayout->addWidget(dualCheckerboardCreateButton, 0, 0); - mDualCheckerboardLayout->setRowStretch(1, 1); - mDualCheckerboardLayout->setColumnStretch(2, 1); - mDualCheckerboardWidget->setWindowTitle(tr("Dual Checkerboard Remeshing")); - mDualCheckerboardWidget->setLayout(mDualCheckerboardLayout); -} - -void RemeshingMode::triggerGlobalExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mGlobalExtrudeWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::GlobalCubicExtrude); -} - -void RemeshingMode::triggerCheckerboard() -{ - ((MainWindow*)mParent)->setToolOptions(mCheckerboardWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::CheckerBoard); -} - -void RemeshingMode::triggerDualGlobalExtrude() -{ - ((MainWindow*)mParent)->setToolOptions(mDualGlobalExtrudeWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualGlobalCubicExtrude); -} - -void RemeshingMode::triggerDualCheckerboard() -{ - ((MainWindow*)mParent)->setToolOptions(mDualCheckerboardWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualCheckerBoard); -} - -void RemeshingMode::setupFivePreservation() -{ - //create the stacked widget and all child widget pages - mPentagonPreservingWidget = new QWidget; - mDualPentagonPreservingWidget = new QWidget; - - //Pentagon Preserving - mPentagonPreservingLayout = new QGridLayout; - mPentagonPreservingLayout->setVerticalSpacing(1); - mPentagonPreservingLayout->setHorizontalSpacing(1); - // mPentagonPreservingLayout->setMargin(0); - pentagonPreservingLabel = new QLabel(this); - pentagonPreservingSpinBox = createDoubleSpinBox(mPentagonPreservingLayout, pentagonPreservingLabel, tr("Scale Factor:"), 0.0, 1.0, 0.01, 0.75, 3, 0, 0); - connect(pentagonPreservingSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changePentagonalScaleFactor(double))); - pentagonPreservingButton = new QPushButton(tr("Perform Remeshing"), this); - connect(pentagonPreservingButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mPentagonPreservingLayout->addWidget(pentagonPreservingButton, 1, 0, 1, 2); - mPentagonPreservingLayout->setRowStretch(2, 1); - mPentagonPreservingLayout->setColumnStretch(2, 1); - mPentagonPreservingWidget->setWindowTitle(tr("Pentagon Preserving Remeshing")); - mPentagonPreservingWidget->setLayout(mPentagonPreservingLayout); - - //dual of Pentagon Preserving - mDualPentagonPreservingLayout = new QGridLayout; - mDualPentagonPreservingLayout->setVerticalSpacing(1); - mDualPentagonPreservingLayout->setHorizontalSpacing(1); - // mDualPentagonPreservingLayout->setMargin(0); - dualPentagonPreservingCreateButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualPentagonPreservingCreateButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualPentagonPreservingLayout->addWidget(dualPentagonPreservingCreateButton, 0, 0); - mDualPentagonPreservingLayout->setRowStretch(1, 1); - mDualPentagonPreservingLayout->setColumnStretch(2, 1); - mDualPentagonPreservingWidget->setWindowTitle(tr("Dual Pentagon Preserving Remeshing")); - mDualPentagonPreservingWidget->setLayout(mDualPentagonPreservingLayout); -} - -void RemeshingMode::triggerPentagonPreserving() -{ - ((MainWindow*)mParent)->setToolOptions(mPentagonPreservingWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::PentagonPreserving); -} - -void RemeshingMode::triggerDualPentagonPreserving() -{ - ((MainWindow*)mParent)->setToolOptions(mDualPentagonPreservingWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualPentagonPreserving); -} - -void RemeshingMode::setupSixPreservation() -{ - mDualLoopStyleRemeshingSixWidget = new QWidget; - mLoopStyleRemeshingSixWidget = new QWidget; - - //dual of loop-style remeshing - mDualLoopStyleRemeshingSixLayout = new QGridLayout; - mDualLoopStyleRemeshingSixLayout->setVerticalSpacing(1); - mDualLoopStyleRemeshingSixLayout->setHorizontalSpacing(1); - // mDualLoopStyleRemeshingSixLayout->setMargin(0); - dualLoopStyleRemeshingSixTwistLabel = new QLabel(this); - dualLoopStyleRemeshingSixTwistSpinBox = createDoubleSpinBox(mDualLoopStyleRemeshingSixLayout, dualLoopStyleRemeshingSixTwistLabel, tr("Twist:"), 0.0, 1.0, 0.01, 0.0, 3, 0, 0); - connect(dualLoopStyleRemeshingSixTwistSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeRoot4Twist(double))); - dualLoopStyleRemeshingSixWeightLabel = new QLabel(this); - dualLoopStyleRemeshingSixWeightSpinBox = createDoubleSpinBox(mDualLoopStyleRemeshingLayout, dualLoopStyleRemeshingSixWeightLabel, tr("Weight:"), 0.0, 1.0, 0.01, 0.0, 3, 1, 0); - connect(dualLoopStyleRemeshingSixWeightSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeRoot4Weight(double))); - dualLoopStyleRemeshingSixButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dualLoopStyleRemeshingSixButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDualLoopStyleRemeshingSixLayout->addWidget(dualLoopStyleRemeshingSixButton, 2, 0, 1, 2); - mDualLoopStyleRemeshingSixLayout->setRowStretch(3, 1); - mDualLoopStyleRemeshingSixLayout->setColumnStretch(2, 1); - mDualLoopStyleRemeshingSixWidget->setWindowTitle(tr("Dual Loop Style Six Remeshing")); - mDualLoopStyleRemeshingSixWidget->setLayout(mDualLoopStyleRemeshingSixLayout); - - //loop-style remeshing - mLoopStyleRemeshingSixLayout = new QGridLayout; - mLoopStyleRemeshingSixLayout->setVerticalSpacing(1); - mLoopStyleRemeshingSixLayout->setHorizontalSpacing(1); - // mLoopStyleRemeshingSixLayout->setMargin(0); - loopStyleRemeshingSixLabel = new QLabel(this); - loopStyleRemeshingSixSpinBox = createDoubleSpinBox(mLoopStyleRemeshingSixLayout, loopStyleRemeshingSixLabel, tr("Length:"), 0.0, 1.0, 0.01, 1.0, 3, 0, 0); - connect(loopStyleRemeshingSixSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeLoopStyleSubdivisionLength(double))); - loopStyleRemeshingSixButton = new QPushButton(tr("Perform Remeshing"), this); - connect(loopStyleRemeshingSixButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mLoopStyleRemeshingSixLayout->addWidget(loopStyleRemeshingSixButton, 1, 0, 1, 2); - mLoopStyleRemeshingSixLayout->setRowStretch(2, 1); - mLoopStyleRemeshingSixLayout->setColumnStretch(2, 1); - mLoopStyleRemeshingSixWidget->setWindowTitle(tr("Loop Style Six Remeshing")); - mLoopStyleRemeshingSixWidget->setLayout(mLoopStyleRemeshingSixLayout); -} - -void RemeshingMode::triggerDualLoopStyleRemeshingSix() -{ - ((MainWindow*)mParent)->setToolOptions(mDualLoopStyleRemeshingSixWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::HexagonPreserving); -} - -void RemeshingMode::triggerLoopStyleRemeshingSix() -{ - ((MainWindow*)mParent)->setToolOptions(mLoopStyleRemeshingSixWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DualHexagonPreserving); -} - -void RemeshingMode::setupMiscellaneous() -{ - mFractalWidget = new QWidget; - mDoubleStellateMiscWidget = new QWidget; - mDooSabinBCWidget = new QWidget; - mDooSabinBCNewWidget = new QWidget; - mDomeWidget = new QWidget; - mSubdivideFaceWidget = new QWidget; - - //Fractal - mFractalLayout = new QGridLayout; - mFractalLayout->setVerticalSpacing(1); - mFractalLayout->setHorizontalSpacing(1); - // mFractalLayout->setMargin(0); - fractalMultiplierLabel = new QLabel(this); - fractalMultiplierSpinBox = createDoubleSpinBox(mFractalLayout, fractalMultiplierLabel, tr("Multiplier:"), 0.0, 2.0, 0.01, 1.0, 3, 0, 0); - connect(fractalMultiplierSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeFractalOffset(double))); - fractalButton = new QPushButton(tr("Perform Remeshing"), this); - connect(fractalButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mFractalLayout->addWidget(fractalButton, 1, 0, 1, 2); - mFractalLayout->setRowStretch(2, 1); - mFractalLayout->setColumnStretch(2, 1); - mFractalWidget->setWindowTitle(tr("Fractal Remeshing")); - mFractalWidget->setLayout(mFractalLayout); - - //double stellate with Edge Removal - mDoubleStellateMiscLayout = new QGridLayout; - mDoubleStellateMiscLayout->setVerticalSpacing(1); - mDoubleStellateMiscLayout->setHorizontalSpacing(1); - // mDoubleStellateMiscLayout->setMargin(0); - doubleStellateMiscHeightLabel = new QLabel(this); - doubleStellateMiscHeightSpinBox = createDoubleSpinBox(mDoubleStellateMiscLayout, doubleStellateMiscHeightLabel, tr("Height:"), -1.0, 1.0, 0.01, 0.0, 3, 0, 0); - connect(doubleStellateMiscHeightSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeSubStellateAmount(double))); - doubleStellateMiscCurveLabel = new QLabel(this); - doubleStellateMiscCurveSpinBox = createDoubleSpinBox(mDoubleStellateMiscLayout, doubleStellateMiscCurveLabel, tr("Curve:"), -1.0, 1.0, 0.01, 0.0, 3, 1, 0); - connect(doubleStellateMiscCurveSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeSubStellateCurve(double))); - doubleStellateMiscButton = new QPushButton(tr("Perform Remeshing"), this); - connect(doubleStellateMiscButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDoubleStellateMiscLayout->addWidget(doubleStellateMiscButton, 2, 0, 1, 2); - mDoubleStellateMiscLayout->setRowStretch(3, 1); - mDoubleStellateMiscLayout->setColumnStretch(2, 1); - mDoubleStellateMiscWidget->setWindowTitle(tr("Double Stellate (Misc.)")); - mDoubleStellateMiscWidget->setLayout(mDoubleStellateMiscLayout); - - //doo sabin bc - mDooSabinBCLayout = new QGridLayout; - mDooSabinBCLayout->setVerticalSpacing(1); - mDooSabinBCLayout->setHorizontalSpacing(1); - // mDooSabinBCLayout->setMargin(0); - dooSabinBCButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dooSabinBCButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDooSabinBCLayout->addWidget(dooSabinBCButton, 0, 0); - mDooSabinBCLayout->setRowStretch(1, 1); - mDooSabinBCLayout->setColumnStretch(1, 1); - mDooSabinBCWidget->setWindowTitle(tr("Doo Sabin BC Remeshing")); - mDooSabinBCWidget->setLayout(mDooSabinBCLayout); - - //doo sabin bc new - mDooSabinBCNewLayout = new QGridLayout; - mDooSabinBCNewLayout->setVerticalSpacing(1); - mDooSabinBCNewLayout->setHorizontalSpacing(1); - // mDooSabinBCNewLayout->setMargin(0); - dooSabinBCNewScaleLabel = new QLabel(this); - dooSabinBCNewScaleSpinBox = createDoubleSpinBox(mDooSabinBCNewLayout, dooSabinBCNewScaleLabel, tr("Scale:"), 0.0, 2.0, 0.01, 1.0, 3, 0, 0); - connect(dooSabinBCNewScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDooSabinBCnewScale(double))); - dooSabinBCNewLengthLabel = new QLabel(this); - dooSabinBCNewLengthSpinBox = createDoubleSpinBox(mDooSabinBCNewLayout, dooSabinBCNewLengthLabel, tr("Length:"), 0.0, 1.0, 0.01, 1.0, 3, 1, 0); - connect(dooSabinBCNewLengthSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDooSabinBCnewLength(double))); - dooSabinBCNewButton = new QPushButton(tr("Perform Remeshing"), this); - connect(dooSabinBCNewButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDooSabinBCNewLayout->addWidget(dooSabinBCNewButton, 2, 0); - mDooSabinBCNewLayout->setRowStretch(3, 1); - mDooSabinBCNewLayout->setColumnStretch(2, 1); - mDooSabinBCNewWidget->setWindowTitle(tr("Doo Sabin BC New Remeshing")); - mDooSabinBCNewWidget->setLayout(mDooSabinBCNewLayout); - - //dome - mDomeLayout = new QGridLayout; - mDomeLayout->setVerticalSpacing(1); - mDomeLayout->setHorizontalSpacing(1); - // mDomeLayout->setMargin(0); - domeHeightLabel = new QLabel(this); - domeHeightSpinBox = createDoubleSpinBox(mDomeLayout, domeHeightLabel, tr("Height:"), 0.0, 2.0, 0.01, 1.0, 3, 0, 0); - connect(domeHeightSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDomeSubdivisionLength(double))); - domeScaleLabel = new QLabel(this); - domeScaleSpinBox = createDoubleSpinBox(mDomeLayout, domeScaleLabel, tr("Scale:"), 0.0, 2.0, 0.01, 1.0, 3, 1, 0); - connect(domeScaleSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeDomeSubdivisionScale(double))); - domeButton = new QPushButton(tr("Perform Remeshing"), this); - connect(domeButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(performRemeshing())); - mDomeLayout->addWidget(domeButton, 2, 0, 1, 2); - mDomeLayout->setRowStretch(3, 1); - mDomeLayout->setColumnStretch(2, 1); - mDomeWidget->setWindowTitle(tr("Dome Remeshing")); - mDomeWidget->setLayout(mDomeLayout); - - //subdivide face - mSubdivideFaceLayout = new QGridLayout; - mSubdivideFaceLayout->setVerticalSpacing(1); - mSubdivideFaceLayout->setHorizontalSpacing(1); - // mSubdivideFaceLayout->setMargin(0); - subdivideFaceCheckBox = new QCheckBox(tr("Use Quads (off -> triangles)")); - connect(subdivideFaceCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(toggleUseQuadsFlag(int))); - mSubdivideFaceLayout->addWidget(subdivideFaceCheckBox, 0, 0); - subdivideFaceCheckBox->setChecked(true); - subdivideFaceButton = new QPushButton(tr("Subdivide Selected Faces"), this); - connect(subdivideFaceButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(subdivideSelectedFaces())); - mSubdivideFaceLayout->addWidget(subdivideFaceButton, 1, 0); - mSubdivideFaceLayout->setRowStretch(2, 1); - mSubdivideFaceLayout->setColumnStretch(1, 1); - mSubdivideFaceWidget->setWindowTitle(tr("Subdivide Selected Faces")); - mSubdivideFaceWidget->setLayout(mSubdivideFaceLayout); -} - -void RemeshingMode::triggerFractal() -{ - ((MainWindow*)mParent)->setToolOptions(mFractalWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Fractal); -} - -void RemeshingMode::triggerDoubleStellateMisc() -{ - ((MainWindow*)mParent)->setToolOptions(mDoubleStellateMiscWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::ModifiedDoubleStellate); -} - -void RemeshingMode::triggerDooSabinBC() -{ - ((MainWindow*)mParent)->setToolOptions(mDooSabinBCWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DooSabinBC); -} - -void RemeshingMode::triggerDooSabinBCNew() -{ - ((MainWindow*)mParent)->setToolOptions(mDooSabinBCNewWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::DooSabinBCNew); -} - -void RemeshingMode::triggerDome() -{ - ((MainWindow*)mParent)->setToolOptions(mDomeWidget); - ((MainWindow*)mParent)->setRemeshingScheme(MainWindow::Dome); -} - -void RemeshingMode::triggerSubdivideFace() -{ - ((MainWindow*)mParent)->setToolOptions(mSubdivideFaceWidget); - ((MainWindow*)mParent)->setMode(MainWindow::SubdivideFace); -} - -void RemeshingMode::retranslateUi() -{ - //actions and menus - mDualAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual")); - mDualAction->setStatusTip(tr("Enter Dual Remeshing Mode")); - mDualAction->setToolTip(tr("Dual Remeshing Mode")); - mRootThreeAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Root-3")); - mRootThreeAction->setStatusTip(tr("Enter Root-3 Remeshing Mode")); - mRootThreeAction->setToolTip(tr("Root-3 Remeshing Mode")); - mTriangulateAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Triangulate")); - mTriangulateAction->setStatusTip(tr("Enter Triangulate Remeshing Mode")); - mTriangulateAction->setToolTip(tr("Triangulate Remeshing Mode")); - mDualVertexTruncationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Vertex Truncation")); - mDualVertexTruncationAction->setStatusTip(tr("Enter Dual Vertex Truncation Remeshing Mode")); - mDualVertexTruncationAction->setToolTip(tr("Dual Vertex Truncation Remeshing Mode")); - mStellationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Stellate")); - mStellationAction->setStatusTip(tr("Enter Stellate Remeshing Mode")); - mStellationAction->setToolTip(tr("Stellate Remeshing Mode")); - mDoubleStellationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Double Stellate")); - mDoubleStellationAction->setStatusTip(tr("Enter Double Stellate Remeshing Mode")); - mDoubleStellationAction->setToolTip(tr("Double Stellate Remeshing Mode")); - mTwelveSixFourAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("12.6.4")); - mTwelveSixFourAction->setStatusTip(tr("Enter 12.6.4 Remeshing Mode")); - mTwelveSixFourAction->setToolTip(tr("12.6.4 Remeshing Mode")); - mHoneycombAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Honeycomb")); - mHoneycombAction->setStatusTip(tr("Enter Honeycomb Remeshing Mode")); - mHoneycombAction->setToolTip(tr("Honeycomb Remeshing Mode")); - mVertexTruncationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Vertex Truncation")); - mVertexTruncationAction->setStatusTip(tr("Enter Vertex Truncation Remeshing Mode")); - mVertexTruncationAction->setToolTip(tr("Vertex Truncation Remeshing Mode")); - mDualTwelveSixFourAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual 12.6.4")); - mDualTwelveSixFourAction->setStatusTip(tr("Enter Dual 12.6.4 Remeshing Mode")); - mDualTwelveSixFourAction->setToolTip(tr("Dual 12.6.4 Remeshing Mode")); - mLinearVertexAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Linear Vertex Insertion")); - mLinearVertexAction->setStatusTip(tr("Enter Linear Vertex Insertion Remeshing Mode")); - mLinearVertexAction->setToolTip(tr("Linear Vertex Insertion Remeshing Mode")); - mCatmullClarkAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Catmull Clark")); - mCatmullClarkAction->setStatusTip(tr("Enter Catmull Clark Remeshing Mode")); - mCatmullClarkAction->setToolTip(tr("Catmull Clark Remeshing Mode")); - mStellateEdgeRemovalAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Stellate with Edge Removal")); - mStellateEdgeRemovalAction->setStatusTip(tr("Enter Stellate with Edge Removal Remeshing Mode")); - mStellateEdgeRemovalAction->setToolTip(tr("Stellate with Edge Removal Remeshing Mode")); - mDooSabinAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Doo Sabin")); - mDooSabinAction->setStatusTip(tr("Enter Doo Sabin Remeshing Mode")); - mDooSabinAction->setToolTip(tr("Doo Sabin Remeshing Mode")); - mCornerCuttingAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Corner Cutting")); - mCornerCuttingAction->setStatusTip(tr("Enter Corner Cutting Remeshing Mode")); - mCornerCuttingAction->setToolTip(tr("Corner Cutting Remeshing Mode")); - mModifiedCornerCuttingAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Modified Corner Cutting")); - mModifiedCornerCuttingAction->setStatusTip(tr("Enter Modified Corner Cutting Remeshing Mode")); - mModifiedCornerCuttingAction->setToolTip(tr("Modified Corner Cutting Remeshing Mode")); - mSimplestAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Simplest")); - mSimplestAction->setStatusTip(tr("Enter Simplest Remeshing Mode")); - mSimplestAction->setToolTip(tr("Simplest Remeshing Mode")); - mPentagonalizationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Pentagonalization")); - mPentagonalizationAction->setStatusTip(tr("Enter Pentagonalization Remeshing Mode")); - mPentagonalizationAction->setToolTip(tr("Pentagonalization Remeshing Mode")); - mCubicPentagonalizationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Cubic Pentagonalization")); - mCubicPentagonalizationAction->setStatusTip(tr("Enter Cubic Pentagonalization Remeshing Mode")); - mCubicPentagonalizationAction->setToolTip(tr("Cubic Pentagonalization Remeshing Mode")); - mDualPentagonalizationAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Pentagonalization")); - mDualPentagonalizationAction->setStatusTip(tr("Enter Dual Pentagonalization Remeshing Mode")); - mDualPentagonalizationAction->setToolTip(tr("Dual Pentagonalization Remeshing Mode")); - mLoopStyleRemeshingAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Loop Style Remeshing")); - mLoopStyleRemeshingAction->setStatusTip(tr("Enter Loop Style Remeshing Remeshing Mode")); - mLoopStyleRemeshingAction->setToolTip(tr("Loop Style Remeshing Remeshing Mode")); - mLoopSubdivisionAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Loop Subdivision")); - mLoopSubdivisionAction->setStatusTip(tr("Enter Loop Subdivision Remeshing Mode")); - mLoopSubdivisionAction->setToolTip(tr("Loop Subdivision Remeshing Mode")); - mDualLoopStyleRemeshingAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Loop Style Remeshing")); - mDualLoopStyleRemeshingAction->setStatusTip(tr("Enter Dual Loop Style Remeshing Remeshing Mode")); - mDualLoopStyleRemeshingAction->setToolTip(tr("Dual Loop Style Remeshing Remeshing Mode")); - mDualLoopSubdivisionAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Loop Subdivision")); - mDualLoopSubdivisionAction->setStatusTip(tr("Enter Dual Loop Subdivision Remeshing Mode")); - mDualLoopSubdivisionAction->setToolTip(tr("Dual Loop Subdivision Remeshing Mode")); - mGlobalExtrudeAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Global Extrude")); - mGlobalExtrudeAction->setStatusTip(tr("Enter Global Extrude Remeshing Mode")); - mGlobalExtrudeAction->setToolTip(tr("Global Extrude Remeshing Mode")); - mCheckerboardAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Checkerboard")); - mCheckerboardAction->setStatusTip(tr("Enter Checkerboard Remeshing Mode")); - mCheckerboardAction->setToolTip(tr("Checkerboard Remeshing Mode")); - mDualGlobalExtrudeAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Global Extrude")); - mDualGlobalExtrudeAction->setStatusTip(tr("Enter Dual Global Extrude Remeshing Mode")); - mDualGlobalExtrudeAction->setToolTip(tr("Dual Global Extrude Remeshing Mode")); - mDualCheckerboardAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Checkerboard")); - mDualCheckerboardAction->setStatusTip(tr("Enter Dual Checkerboard Remeshing Mode")); - mDualCheckerboardAction->setToolTip(tr("Dual Checkerboard Remeshing Mode")); - mPentagonPreservingAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Pentagon Preserving")); - mPentagonPreservingAction->setStatusTip(tr("Enter Pentagon Preserving Remeshing Mode")); - mPentagonPreservingAction->setToolTip(tr("Pentagon Preserving Remeshing Mode")); - mDualPentagonPreservingAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Pentagon Preserving")); - mDualPentagonPreservingAction->setStatusTip(tr("Enter Dual Pentagon Preserving Remeshing Mode")); - mDualPentagonPreservingAction->setToolTip(tr("Dual Pentagon Preserving Remeshing Mode")); - mDualLoopStyleRemeshingSixAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dual Loop Style")); - mDualLoopStyleRemeshingSixAction->setStatusTip(tr("Enter Loop Style Remeshing Remeshing Mode")); - mDualLoopStyleRemeshingSixAction->setToolTip(tr("Dual Loop Style Remeshing Remeshing Mode")); - mLoopStyleRemeshingSixAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Loop Style")); - mLoopStyleRemeshingSixAction->setStatusTip(tr("Enter Loop Style Remeshing Remeshing Mode")); - mLoopStyleRemeshingSixAction->setToolTip(tr("Loop Style Remeshing Remeshing Mode")); - mFractalAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Fractal")); - mFractalAction->setStatusTip(tr("Enter Fractal Remeshing Mode")); - mFractalAction->setToolTip(tr("Fractal Remeshing Mode")); - mDoubleStellateMiscAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Double Stellate")); - mDoubleStellateMiscAction->setStatusTip(tr("Enter Double Stellate Remeshing Mode")); - mDoubleStellateMiscAction->setToolTip(tr("Double Stellate Remeshing Mode")); - mDooSabinBCAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Doo Sabin BC")); - mDooSabinBCAction->setStatusTip(tr("Enter Doo Sabin BC Remeshing Mode")); - mDooSabinBCAction->setToolTip(tr("Doo Sabin BC Remeshing Mode")); - mDooSabinBCNewAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Doo Sabin BC New")); - mDooSabinBCNewAction->setStatusTip(tr("Enter Doo Sabin BC New Remeshing Mode")); - mDooSabinBCNewAction->setToolTip(tr("Doo Sabin BC New Remeshing Mode")); - mDomeAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Dome")); - mDomeAction->setStatusTip(tr("Enter Dome Remeshing Mode")); - mDomeAction->setToolTip(tr("Dome Remeshing Mode")); - mSubdivideFaceAction->setText(/*QIcon(":images/doosabin_extrude.png"),*/tr("Subdivide Face")); - mSubdivideFaceAction->setStatusTip(tr("Enter Subdivide Face Remeshing Mode")); - mSubdivideFaceAction->setToolTip(tr("Subdivide Face Remeshing Mode")); - //qmenus titles - mRemeshingMenu->setTitle(tr("Remeshing")); - mThreeConversionMenu->setTitle(tr("3-Conversion")); - mFourConversionMenu->setTitle(tr("4-Conversion")); - mFiveConversionMenu->setTitle(tr("5-Conversion")); - mThreePreservationMenu->setTitle(tr("3-Preservation")); - mFourPreservationMenu->setTitle(tr("4-Preservation")); - mFivePreservationMenu->setTitle(tr("5-Preservation")); - mSixPreservationMenu->setTitle(tr("6-Preservation")); - mMiscellaneousMenu->setTitle(tr("Miscellaneous")); - - // widgets and stuff - //!< \todo add buttons and spinbox labels to retranslate function for remeshingmode.cc .. .done i think... dave - dualFasterCheckBox->setText(tr("Use Faster Method")); - dualCreateButton->setText(tr("Create Dual")); - mDualWidget->setWindowTitle(tr("Dual Remeshing")); - rootThreeCreateButton->setText(tr("Perform Remeshing")); - mRootThreeWidget->setWindowTitle(tr("Root-3 Remeshing")); - triangulateCreateButton->setText(tr("Perform Remeshing")); - mTriangulateWidget->setWindowTitle(tr("Triangulate Remeshing")); - dualVertexTruncationButton->setText(tr("Perform Remeshing")); - mDualVertexTruncationWidget->setWindowTitle(tr("Dual Vertex Truncation")); - stellationButton->setText(tr("Perform Remeshing")); - mStellationWidget->setWindowTitle(tr("Stellation Remeshing")); - starLabel->setText(tr("Offset:")); - starButton->setText(tr("Perform Remeshing")); - mDoubleStellationWidget->setWindowTitle(tr("Double Stellation Remeshing")); - twelveSixFourLabel->setText(tr("Offset:")); - twelveSixFourButton->setText(tr("Perform Remeshing")); - honeycombButton->setText(tr("Perform Remeshing")); - mHoneycombWidget->setWindowTitle(tr("Honeycomb Remeshing")); - vertexTruncationLabel->setText(tr("Offset:")); - vertexTruncationButton->setText(tr("Perform Remeshing")); - mVertexTruncationWidget->setWindowTitle(tr("Vertex Truncation Remeshing")); - dualTwelveSixFourLabel->setText(tr("Offset:")); - dualTwelveSixFourButton->setText(tr("Perform Remeshing")); - mDualTwelveSixFourWidget->setWindowTitle(tr("Dual 12.6.4 Remeshing")); - linearVertexCreateButton->setText(tr("Perform Remeshing")); - mLinearVertexWidget->setWindowTitle(tr("Linear Vertex Insertion Remeshing")); - catmullClarkCreateButton->setText(tr("Perform Remeshing")); - mCatmullClarkWidget->setWindowTitle(tr("Catmull-Clark Remeshing")); - stellateEdgeRemovalCreateButton->setText(tr("Perform Remeshing")); - mStellateEdgeRemovalWidget->setWindowTitle(tr("Stellate with Edge Removal Remeshing")); - dooSabinCheckBox->setText(tr("Check for multiple edges")); - dooSabinCreateButton->setText(tr("Perform Remeshing")); - mDooSabinWidget->setWindowTitle(tr("Doo Sabin Remeshing")); - cornerCuttingCreateButton->setText(tr("Perform Remeshing")); - mCornerCuttingWidget->setWindowTitle(tr("Corner Cutting Remeshing")); - modifiedCornerCuttingLabel->setText(tr("Thickness:")); - modifiedCornerCuttingCreateButton->setText(tr("Perform Remeshing")); - mModifiedCornerCuttingWidget->setWindowTitle(tr("Modified Corner Cutting Remeshing")); - simplestCreateButton->setText(tr("Perform Remeshing")); - mSimplestWidget->setWindowTitle(tr("Simplest Remeshing Scheme")); - pentagonalizationLabel->setText(tr("Offset:")); - pentagonalizationCreateButton->setText(tr("Perform Remeshing")); - mPentagonalizationWidget->setWindowTitle(tr("Pentagonalization Remeshing")); - cubicPentagonalizationLabel->setText(tr("Offset:")); - cubicPentagonalizationCreateButton->setText(tr("Perform Remeshing")); - mCubicPentagonalizationWidget->setWindowTitle(tr("Cubic Pentagonalization Remeshing")); - dualPentagonalizationCreateButton->setText(tr("Perform Remeshing")); - mDualPentagonalizationWidget->setWindowTitle(tr("Dual Pentagonalization Remeshing")); - loopStyleRemeshingLabel->setText(tr("Length:")); - loopStyleRemeshingButton->setText(tr("Perform Remeshing")); - mLoopStyleRemeshingWidget->setWindowTitle(tr("Loop Style Remeshing")); - loopSubdivisionCreateButton->setText(tr("Perform Remeshing")); - mLoopSubdivisionWidget->setWindowTitle(tr("Loop Subdivision Remeshing")); - dualLoopStyleRemeshingTwistLabel->setText(tr("Twist:")); - dualLoopStyleRemeshingWeightLabel->setText(tr("Weight:")); - dualLoopStyleRemeshingButton->setText(tr("Perform Remeshing")); - mDualLoopStyleRemeshingWidget->setWindowTitle(tr("Dual Loop Style Remeshing")); - dualLoopSubdivisionCreateButton->setText(tr("Perform Remeshing")); - mDualLoopSubdivisionWidget->setWindowTitle(tr("Dual Loop Subdivision Remeshing")); - globalExtrudeButton->setText(tr("Perform Remeshing")); - mGlobalExtrudeWidget->setWindowTitle(tr("Global Extrude Remeshing")); - checkerboardCreateButton->setText(tr("Perform Remeshing")); - mCheckerboardWidget->setWindowTitle(tr("Checkerboard Remeshing")); - dualGlobalExtrudeButton->setText(tr("Perform Remeshing")); - mDualGlobalExtrudeWidget->setWindowTitle(tr("Dual Global Extrude Remeshing")); - dualCheckerboardCreateButton->setText(tr("Perform Remeshing")); - mDualCheckerboardWidget->setWindowTitle(tr("Dual Checkerboard Remeshing")); - pentagonPreservingLabel->setText(tr("Scale Factor:")); - pentagonPreservingButton->setText(tr("Perform Remeshing")); - mPentagonPreservingWidget->setWindowTitle(tr("Pentagon Preserving Remeshing")); - dualPentagonPreservingCreateButton->setText(tr("Perform Remeshing")); - mDualPentagonPreservingWidget->setWindowTitle(tr("Dual Pentagon Preserving Remeshing")); - dualLoopStyleRemeshingSixTwistLabel->setText(tr("Twist:")); - dualLoopStyleRemeshingSixWeightLabel->setText(tr("Weight:")); - dualLoopStyleRemeshingSixButton->setText(tr("Perform Remeshing")); - mDualLoopStyleRemeshingSixWidget->setWindowTitle(tr("Dual Loop Style Six Remeshing")); - loopStyleRemeshingSixLabel->setText(tr("Length:")); - loopStyleRemeshingSixButton->setText(tr("Perform Remeshing")); - mLoopStyleRemeshingSixWidget->setWindowTitle(tr("Loop Style Six Remeshing")); - fractalMultiplierLabel->setText(tr("Multiplier:")); - fractalButton->setText(tr("Perform Remeshing")); - mFractalWidget->setWindowTitle(tr("Fractal Remeshing")); - doubleStellateMiscHeightLabel->setText(tr("Height:")); - doubleStellateMiscCurveLabel->setText(tr("Curve:")); - doubleStellateMiscButton->setText(tr("Perform Remeshing")); - mDoubleStellateMiscWidget->setWindowTitle(tr("Double Stellate (Misc.)")); - dooSabinBCButton->setText(tr("Perform Remeshing")); - mDooSabinBCWidget->setWindowTitle(tr("Doo Sabin BC Remeshing")); - dooSabinBCNewScaleLabel->setText(tr("Scale:")); - dooSabinBCNewLengthLabel->setText(tr("Length:")); - dooSabinBCNewButton->setText(tr("Perform Remeshing")); - mDooSabinBCNewWidget->setWindowTitle(tr("Doo Sabin BC New Remeshing")); - domeHeightLabel->setText(tr("Height:")); - domeScaleLabel->setText(tr("Scale:")); - domeButton->setText(tr("Perform Remeshing")); - mDomeWidget->setWindowTitle(tr("Dome Remeshing")); - subdivideFaceCheckBox->setText(tr("Use Quads (off -> triangles)")); - subdivideFaceButton->setText(tr("Subdivide Selected Faces")); - mSubdivideFaceWidget->setWindowTitle(tr("Subdivide Selected Faces")); -} diff --git a/topmodx/src/RemeshingMode.h b/topmodx/src/RemeshingMode.h deleted file mode 100644 index cb0c4b6..0000000 --- a/topmodx/src/RemeshingMode.h +++ /dev/null @@ -1,378 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef REMESHINGMODE_H -#define REMESHINGMODE_H - -#include -#include -#include - -#include "MainWindow.h" - -class MainWindow; - -/*! -\file RemeshingMode.hh -\brief Definition of the RemeshingMode class - -\see RemeshingMode -*/ - -class RemeshingMode : public QWidget -{ - Q_OBJECT - -public: - RemeshingMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); - - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu *getMenu(); - void retranslateUi(); - -protected: - void setupDual(); - void setupThreeConversion(); - void setupFourConversion(); - void setupFiveConversion(); - void setupThreePreservation(); - void setupFourPreservation(); - void setupFivePreservation(); - void setupSixPreservation(); - void setupMiscellaneous(); - - QDoubleSpinBox *createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col); - - public slots: - - void triggerDual(); - - void triggerRootThree(); - void triggerTriangulate(); - void triggerDualVertexTruncation(); - void triggerStellation(); - void triggerDoubleStellation(); - void triggerTwelveSixFour(); - void triggerHoneycomb(); - void triggerVertexTruncation(); - void triggerDualTwelveSixFour(); - - void triggerLinearVertex(); - void triggerCatmullClark(); - void triggerStellateEdgeRemoval(); - void triggerDooSabin(); - void triggerCornerCutting(); - void triggerModifiedCornerCutting(); - void triggerSimplest(); - - void triggerPentagonalization(); - void triggerCubicPentagonalization(); - void triggerDualPentagonalization(); - - void triggerLoopStyleRemeshing(); - void triggerLoopSubdivision(); - void triggerDualLoopStyleRemeshing(); - void triggerDualLoopSubdivision(); - - void triggerGlobalExtrude(); - void triggerCheckerboard(); - void triggerDualGlobalExtrude(); - void triggerDualCheckerboard(); - - void triggerPentagonPreserving(); - void triggerDualPentagonPreserving(); - - void triggerDualLoopStyleRemeshingSix(); - void triggerLoopStyleRemeshingSix(); - - void triggerFractal(); - void triggerDoubleStellateMisc(); - void triggerDooSabinBC(); - void triggerDooSabinBCNew(); - void triggerDome(); - void triggerSubdivideFace(); - -public: - //dual - QGridLayout *mDualLayout; - QWidget *mDualWidget; - QAction *mDualAction; - - //three conversion - QWidget *mRootThreeWidget; - QWidget *mTriangulateWidget; - QWidget *mDualVertexTruncationWidget; - QWidget *mStellationWidget; - QWidget *mDoubleStellationWidget; - QWidget *mTwelveSixFourWidget; - QWidget *mHoneycombWidget; - QWidget *mVertexTruncationWidget; - QWidget *mDualTwelveSixFourWidget; - - QGridLayout *mRootThreeLayout; - QGridLayout *mTriangulateLayout; - QGridLayout *mDualVertexTruncationLayout; - QGridLayout *mStellationLayout; - QGridLayout *mDoubleStellationLayout; - QGridLayout *mTwelveSixFourLayout; - QGridLayout *mHoneycombLayout; - QGridLayout *mVertexTruncationLayout; - QGridLayout *mDualTwelveSixFourLayout; - - QAction *mRootThreeAction; - QAction *mTriangulateAction; - QAction *mDualVertexTruncationAction; - QAction *mStellationAction; - QAction *mDoubleStellationAction; - QAction *mTwelveSixFourAction; - QAction *mHoneycombAction; - QAction *mVertexTruncationAction; - QAction *mDualTwelveSixFourAction; - - //four conversion - QWidget *mLinearVertexWidget; - QWidget *mCatmullClarkWidget; - QWidget *mStellateEdgeRemovalWidget; - QWidget *mDooSabinWidget; - QWidget *mCornerCuttingWidget; - QWidget *mModifiedCornerCuttingWidget; - QWidget *mSimplestWidget; - - QGridLayout *mLinearVertexLayout; - QGridLayout *mCatmullClarkLayout; - QGridLayout *mStellateEdgeRemovalLayout; - QGridLayout *mDooSabinLayout; - QGridLayout *mCornerCuttingLayout; - QGridLayout *mModifiedCornerCuttingLayout; - QGridLayout *mSimplestLayout; - - QAction *mLinearVertexAction; - QAction *mCatmullClarkAction; - QAction *mStellateEdgeRemovalAction; - QAction *mDooSabinAction; - QAction *mCornerCuttingAction; - QAction *mModifiedCornerCuttingAction; - QAction *mSimplestAction; - - - //five conversion - QWidget *mPentagonalizationWidget; - QWidget *mCubicPentagonalizationWidget; - QWidget *mDualPentagonalizationWidget; - - QGridLayout *mPentagonalizationLayout; - QGridLayout *mCubicPentagonalizationLayout; - QGridLayout *mDualPentagonalizationLayout; - - QAction *mPentagonalizationAction; - QAction *mCubicPentagonalizationAction; - QAction *mDualPentagonalizationAction; - - //three preservation - QWidget *mLoopStyleRemeshingWidget; - QWidget *mLoopSubdivisionWidget; - QWidget *mDualLoopStyleRemeshingWidget; - QWidget *mDualLoopSubdivisionWidget; - - QGridLayout *mLoopStyleRemeshingLayout; - QGridLayout *mLoopSubdivisionLayout; - QGridLayout *mDualLoopStyleRemeshingLayout; - QGridLayout *mDualLoopSubdivisionLayout; - - QAction *mLoopStyleRemeshingAction; - QAction *mLoopSubdivisionAction; - QAction *mDualLoopStyleRemeshingAction; - QAction *mDualLoopSubdivisionAction; - - //four preservation - QWidget *mGlobalExtrudeWidget; - QWidget *mCheckerboardWidget; - QWidget *mDualGlobalExtrudeWidget; - QWidget *mDualCheckerboardWidget; - - QGridLayout *mGlobalExtrudeLayout; - QGridLayout *mCheckerboardLayout; - QGridLayout *mDualGlobalExtrudeLayout; - QGridLayout *mDualCheckerboardLayout; - - QAction *mGlobalExtrudeAction; - QAction *mCheckerboardAction; - QAction *mDualGlobalExtrudeAction; - QAction *mDualCheckerboardAction; - - //five preservation - QWidget *mPentagonPreservingWidget; - QWidget *mDualPentagonPreservingWidget; - - QGridLayout *mPentagonPreservingLayout; - QGridLayout *mDualPentagonPreservingLayout; - - QAction *mPentagonPreservingAction; - QAction *mDualPentagonPreservingAction; - - //six preservation - QWidget *mDualLoopStyleRemeshingSixWidget; - QWidget *mLoopStyleRemeshingSixWidget; - - QGridLayout *mDualLoopStyleRemeshingSixLayout; - QGridLayout *mLoopStyleRemeshingSixLayout; - - QAction *mDualLoopStyleRemeshingSixAction; - QAction *mLoopStyleRemeshingSixAction; - - //miscellaneous - QWidget *mFractalWidget; - QWidget *mDoubleStellateMiscWidget; - QWidget *mDooSabinBCWidget; - QWidget *mDooSabinBCNewWidget; - QWidget *mDomeWidget; - QWidget *mSubdivideFaceWidget; - - QGridLayout *mFractalLayout; - QGridLayout *mDoubleStellateMiscLayout; - QGridLayout *mDooSabinBCLayout; - QGridLayout *mDooSabinBCNewLayout; - QGridLayout *mDomeLayout; - QGridLayout *mSubdivideFaceLayout; - - QAction *mFractalAction; - QAction *mDoubleStellateMiscAction; - QAction *mDooSabinBCAction; - QAction *mDooSabinBCNewAction; - QAction *mDomeAction; - QAction *mSubdivideFaceAction; - -private: - QWidget *mParent; - - QMenu *mRemeshingMenu; - QMenu *mThreeConversionMenu; - QMenu *mFourConversionMenu; - QMenu *mFiveConversionMenu; - QMenu *mThreePreservationMenu; - QMenu *mFourPreservationMenu; - QMenu *mFivePreservationMenu; - QMenu *mSixPreservationMenu; - QMenu *mMiscellaneousMenu; - - QDoubleSpinBox *starSpinBox; - QDoubleSpinBox *twelveSixFourSpinBox; - QDoubleSpinBox *vertexTruncationSpinBox; - QDoubleSpinBox *dualTwelveSixFourSpinBox; - QDoubleSpinBox *pentagonalizationSpinBox; - QDoubleSpinBox *modifiedCornerCuttingSpinBox; - QDoubleSpinBox *cubicPentagonalizationSpinBox; - QDoubleSpinBox *loopStyleRemeshingSpinBox; - QDoubleSpinBox *dualLoopStyleRemeshingTwistSpinBox; - QDoubleSpinBox *dualLoopStyleRemeshingWeightSpinBox; - QDoubleSpinBox *pentagonPreservingSpinBox; - QDoubleSpinBox *dualLoopStyleRemeshingSixTwistSpinBox; - QDoubleSpinBox *dualLoopStyleRemeshingSixWeightSpinBox; - QDoubleSpinBox *loopStyleRemeshingSixSpinBox; - QDoubleSpinBox *fractalMultiplierSpinBox; - QDoubleSpinBox *doubleStellateMiscHeightSpinBox; - QDoubleSpinBox *doubleStellateMiscCurveSpinBox; - QDoubleSpinBox *dooSabinBCNewScaleSpinBox; - QDoubleSpinBox *dooSabinBCNewLengthSpinBox; - QDoubleSpinBox *domeHeightSpinBox; - QDoubleSpinBox *domeScaleSpinBox; - QDoubleSpinBox *cornerCuttingAlphaSpinBox; - - QLabel *cornerCuttingAlphaLabel; - QLabel *starLabel; - QLabel *twelveSixFourLabel; - QLabel *vertexTruncationLabel; - QLabel *dualTwelveSixFourLabel; - QLabel *pentagonalizationLabel; - QLabel *modifiedCornerCuttingLabel; - QLabel *cubicPentagonalizationLabel; - QLabel *loopStyleRemeshingLabel; - QLabel *dualLoopStyleRemeshingTwistLabel; - QLabel *dualLoopStyleRemeshingWeightLabel; - QLabel *pentagonPreservingLabel; - QLabel *dualLoopStyleRemeshingSixTwistLabel; - QLabel *dualLoopStyleRemeshingSixWeightLabel; - QLabel *loopStyleRemeshingSixLabel; - QLabel *fractalMultiplierLabel; - QLabel *doubleStellateMiscHeightLabel; - QLabel *doubleStellateMiscCurveLabel; - QLabel *dooSabinBCNewLengthLabel; - QLabel *dooSabinBCNewScaleLabel; - QLabel *domeHeightLabel; - QLabel *domeScaleLabel; - - QCheckBox *dualFasterCheckBox; - QPushButton *dualCreateButton; - QPushButton *rootThreeCreateButton; - QPushButton *triangulateCreateButton; - QPushButton *dualVertexTruncationButton; - QPushButton *stellationButton; - QPushButton *starButton; - QPushButton *twelveSixFourButton; - QPushButton *honeycombButton; - QPushButton *vertexTruncationButton; - QPushButton *dualTwelveSixFourButton; - QPushButton *linearVertexCreateButton; - QPushButton *catmullClarkCreateButton; - QPushButton *stellateEdgeRemovalCreateButton; - QCheckBox *dooSabinCheckBox; - QPushButton *dooSabinCreateButton; - QPushButton *cornerCuttingCreateButton; - QPushButton *modifiedCornerCuttingCreateButton; - QPushButton *simplestCreateButton; - QPushButton *pentagonalizationCreateButton; - QPushButton *cubicPentagonalizationCreateButton; - QPushButton *dualPentagonalizationCreateButton; - QPushButton *loopStyleRemeshingButton; - QPushButton *loopSubdivisionCreateButton; - QPushButton *dualLoopStyleRemeshingButton; - QPushButton *dualLoopSubdivisionCreateButton; - QPushButton *globalExtrudeButton; - QPushButton *checkerboardCreateButton; - QPushButton *dualGlobalExtrudeButton; - QPushButton *dualCheckerboardCreateButton; - QPushButton *pentagonPreservingButton; - QPushButton *dualPentagonPreservingCreateButton; - QPushButton *dualLoopStyleRemeshingSixButton; - QPushButton *loopStyleRemeshingSixButton; - QPushButton *fractalButton; - QPushButton *doubleStellateMiscButton; - QPushButton *dooSabinBCButton; - QPushButton *dooSabinBCNewButton; - QPushButton *domeButton; - QCheckBox *subdivideFaceCheckBox; - QPushButton *subdivideFaceButton; - -}; - -#endif diff --git a/topmodx/src/Renderer/ColorableRenderer.h b/topmodx/src/Renderer/ColorableRenderer.h deleted file mode 100644 index ef18427..0000000 --- a/topmodx/src/Renderer/ColorableRenderer.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _COLORABLE_RENDERER_HH_ -#define _COLORABLE_RENDERER_HH_ - -/* - ColorableRenderer - A renderer for DLFL objects, derived from DLFLRenderer - Renders with face-vertex normals, with material colors -*/ - -#include "DLFLRenderer.h" - -class ColorableRenderer; -typedef ColorableRenderer * ColorableRendererPtr; - -class ColorableRenderer : public DLFLRenderer -{ - -public: - /* Default constructor */ - ColorableRenderer() : DLFLRenderer() {} - - ColorableRenderer(QColor wc, double wt, QColor sc, double st, QColor vc, double vt) - { - }//: DLFLRenderer(wc, wt, sc, st, vc, vt) { } - - /* Copy constructor */ - ColorableRenderer(const ColorableRenderer& nr) - : DLFLRenderer(nr) - { - } - - /* Assignment operator */ - ColorableRenderer& operator = (const ColorableRenderer& nr) - { - DLFLRenderer::operator = (nr); - return (*this); - } - - /* Destructor */ - virtual ~ColorableRenderer() {} - - /* Implement render function */ - virtual int render(DLFLObjectPtr object) - { - - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - glEnable(GL_BLEND); // Enable Blending - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Type Of Blending To Use - - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - //object->renderFaces(); - gr->render(object); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - - } - - virtual void setState() - { - gr->useLighting = false; - gr->useColorable = true; - gr->useMaterial = false; - gr->useTexture = false; - gr->useOutline = false; - } - -}; - -#endif /* #ifndef _COLORABLE_RENDERER_HH_ */ diff --git a/topmodx/src/Renderer/DLFLRenderer.cc b/topmodx/src/Renderer/DLFLRenderer.cc deleted file mode 100644 index 62c4f6d..0000000 --- a/topmodx/src/Renderer/DLFLRenderer.cc +++ /dev/null @@ -1,57 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* $Id: DLFLRenderer.cc,v 4.1 2004/04/18 18:09:06 vinod Exp $ */ - -// Non-inline function and static variable definitions for DLFLRenderer class - -#include "DLFLRenderer.h" - -// int DLFLRenderer::render_flags = 0; -bool DLFLRenderer::sReverseObject = false; -bool DLFLRenderer::sAntialiasing = false; -#ifdef GPU_OK -bool DLFLRenderer::sUseGPU = false; -#endif - -QColor DLFLRenderer::sWireframeColor = QColor(0, 0, 0); //!< wireframe RGB color -QColor DLFLRenderer::sSilhouetteColor = QColor(0, 0, 0); //!< silhouette RGB color -QColor DLFLRenderer::sVertexColor = QColor(0, 0, 0); //!< vertex RGB color -QColor DLFLRenderer::sFaceCentroidColor = QColor(0, 0, 0); //!< face centroid RGB color -QColor DLFLRenderer::sNormalColor = QColor(0, 0, 0); //!< normals RGB color -double DLFLRenderer::sFaceCentroidThickness = 5.0; //!< face centroid point size -double DLFLRenderer::sNormalThickness = 5.0; //!< normal line thickness -double DLFLRenderer::sNormalLength = 1.0; //!< normal length -double DLFLRenderer::sWireframeThickness = 1.0; //!< wireframe line thickness -double DLFLRenderer::sSilhouetteThickness = 8.0; //!< silhouette line thickness -double DLFLRenderer::sVertexThickness = 1.5; //!< vertex point size diff --git a/topmodx/src/Renderer/DLFLRenderer.h b/topmodx/src/Renderer/DLFLRenderer.h deleted file mode 100644 index 3ef6893..0000000 --- a/topmodx/src/Renderer/DLFLRenderer.h +++ /dev/null @@ -1,378 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _DLFL_RENDERER_HH_ -#define _DLFL_RENDERER_HH_ - -// Abstrtact base class for various renderers for DLFL -// Defines the minimum interface that renderer classes must implement -// Also contains an integer which can be used to store render flags -// The way the integer is used to specify the render flags is left -// to the derived class. An enumeration for render flags is also defined -// with the various values defined as powers of 2 to allow ORing together -// The class also provides static functions for rendering the object as a wireframe, -// silhouette and vertices, which can be used by derived classes - -#include -#include - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -#include -#include "GeometryRenderer.h" -#include "TMPatchObject.h" - -#include "CgData.h" - -#ifdef GPU_OK -using namespace Cg; -#endif // GPU_OK - - -using namespace DLFL; - -class DLFLRenderer; -typedef DLFLRenderer * DLFLRendererPtr; - -class DLFLRenderer -{ -protected: - /* Default constructor */ - DLFLRenderer() - { - // mWireframeThickness(0.1);mSilhouetteThickness(8.0);mVertexThickness(5.0);mFaceCentroidThickness(5.0);mNormalThickness(1.0);mNormalLength(0.5) -#ifdef GPU_OK - DLFLRenderer::sUseGPU = false; -#endif - DLFLRenderer::sAntialiasing = false; - DLFLRenderer::sWireframeColor.setRgbF(0.0, 0.0, 0.0, 0.9); - DLFLRenderer::sSilhouetteColor.setRgbF(0.0, 0.0, 0.0, 0.8); - DLFLRenderer::sVertexColor.setRgbF(0.5, 1.0, 0.0, 0.9); - DLFLRenderer::sFaceCentroidColor.setRgbF(0.5, 0.0, 0.0, 0.9); - DLFLRenderer::sNormalColor.setRgbF(0.5, 0.0, 0.0, 0.9); - render_flags = 0; - // reverse_object = 0; - gr = GeometryRenderer::instance(); - gr->drawWireframe = true; - }; - - DLFLRenderer(QColor wc, double wt, QColor sc, double st, QColor vc, double vt, QColor fc, double ft, QColor nc, double nt, bool gpu = false, bool aa = false) - { - // mWireframeThickness(wt), mSilhouetteThickness(st), mVertexThickness(vt), mWireframeColor(wc), - // mSilhouetteColor(sc), mVertexColor(vc),mFaceCentroidColor(fc), mFaceCentroidThickness(ft), - // mNormalColor(nc), mNormalThickness(nt), - // mNormalLength(0.5); -#ifdef GPU_OK - DLFLRenderer::sUseGPU = gpu; -#endif - DLFLRenderer::sAntialiasing = aa; - render_flags = 0; - gr = GeometryRenderer::instance(); - gr->drawWireframe = true; - }; - - /* Copy constructor */ - DLFLRenderer(const DLFLRenderer&) {}; - -public: - - /* Assignment operator */ - DLFLRenderer& operator = (const DLFLRenderer&) - { - return (*this); - }; - - /* Destructor */ - virtual ~DLFLRenderer() {} - - /* Set the render flags */ - void setRenderFlags(int rflags) - { - // render_flags = rflags; - }; - - void toggleWireframe(void) - { - // render_flags ^= ShowWireframe; - gr->drawWireframe = !(gr->drawWireframe); - }; - - void toggleSilhouette(void) - { - // render_flags ^= ShowSilhouette; - gr->drawSilhouette = !(gr->drawSilhouette); - }; - - void toggleVertices(void) - { - // render_flags ^= ShowVertices; - gr->drawVertices = !(gr->drawVertices); - }; - - void toggleFaceNormals(void) - { - // render_flags ^= ShowFaceNormals; - gr->drawFaceNormals = !(gr->drawFaceNormals); - }; - - void toggleFaceCentroids(void) - { - // render_flags ^= ShowFaceCentroids; - gr->drawFaceCentroids = !(gr->drawFaceCentroids); - }; - -#ifdef GPU_OK - void toggleGPU() - { - DLFLRenderer::sUseGPU = !DLFLRenderer::sUseGPU; - gr->useGPU = !gr->useGPU; - }; -#endif - - void toggleAntialiasing() - { - DLFLRenderer::sAntialiasing = !DLFLRenderer::sAntialiasing; - gr->antialiasing = !(gr->antialiasing); - }; - - void toggleObjectOrientation(void) - { - DLFLRenderer::sReverseObject != DLFLRenderer::sReverseObject; - if (gr) gr->isReversed = DLFLRenderer::sReverseObject; - if (DLFLRenderer::sReverseObject) - { - DLFLRenderer::sReverseObject = false; - } - else - { - DLFLRenderer::sReverseObject = true; - } - }; - - static bool isReversed(void) - { - return DLFLRenderer::sReverseObject; - }; - - /* Get the render flags */ - int getRenderFlags(void) const - { - return render_flags; - }; - - // #ifdef GPU_OK - // void setCgData(CgData cg){ mCg = cg; } - // #endif - /* - Render the DLFLObject specified by the given pointer. - This is a virtual function which has to be implemented by derived classes. - Return value can be used for error reporting.. - */ - virtual int render(DLFLObjectPtr object) = 0; - virtual int render(TMPatchObjectPtr patchObject) { return 0; }; - /* - Perform any initializations required - */ - virtual void initialize(void) - { - // Derived classes should override this if necessary - // to do any initializations (like texture setup) - }; - - virtual void setState() {}; - -public: - - /* - Set the culling based on which side of object we want to display. - Has effect only if culling is enabled - */ - void setCulling(void) - { - if (DLFLRenderer::sReverseObject) - glCullFace(GL_FRONT); - else - glCullFace(GL_BACK); - }; - - /* Methods for various types of rendering */ - void drawWireframe(DLFLObjectPtr object) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glColor4f( - DLFLRenderer::sWireframeColor.redF(), - DLFLRenderer::sWireframeColor.greenF(), - DLFLRenderer::sWireframeColor.blueF(), - DLFLRenderer::sWireframeColor.alphaF()); - glDepthRange(0.0, 1.0 - 0.0005); - //object->renderEdges(mWireframeThickness); - //test material - gr->renderEdges(object, DLFLRenderer::sWireframeThickness); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - }; - - void drawSilhouette(DLFLObjectPtr object) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glColor4f( - DLFLRenderer::sSilhouetteColor.redF(), - DLFLRenderer::sSilhouetteColor.greenF(), - DLFLRenderer::sSilhouetteColor.blueF(), - DLFLRenderer::sSilhouetteColor.alphaF()); - glDepthRange(0.1, 1.0); - if (DLFLRenderer::sReverseObject) //object->renderEdges(mWireframeThickness); - gr->renderEdges(object, DLFLRenderer::sWireframeThickness); - else //object->renderEdges(mSilhouetteThickness); - gr->renderEdges(object, DLFLRenderer::sSilhouetteThickness); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - }; - - void drawVertices(DLFLObjectPtr object) - { - glColor4f( - DLFLRenderer::sVertexColor.redF(), - DLFLRenderer::sVertexColor.greenF(), - DLFLRenderer::sVertexColor.blueF(), - DLFLRenderer::sVertexColor.alphaF()); - glDepthRange(0.0, 1.0 - 0.00075); - //object->renderVertices(mVertexThickness); - gr->renderVertices(object, sVertexThickness); - }; - - void drawFaceCentroids(DLFLObjectPtr object) - { -#ifdef GPU_OK - if (DLFLRenderer::sUseGPU) - { - cgSetParameter3f(CgData::instance()->basecolor, 0.0, 0.0, 0.0); - // cgSetParameter3f(CgData::instance()->basecolor, mVertexColor.redF(), mVertexColor.greenF(), mVertexColor.blueF()); - cgSetParameter3f(CgData::instance()->Ka, 0.0, 0.0, 0.0); - cgSetParameter3f(CgData::instance()->Kd, 0.0, 0.0, 0.0); - cgSetParameter3f(CgData::instance()->Ks, 0.0, 0.0, 0.0); - cgSetParameter1f(CgData::instance()->shininess, 0.0); - } -#endif - glColor4f( - DLFLRenderer::sFaceCentroidColor.redF(), - DLFLRenderer::sFaceCentroidColor.greenF(), - DLFLRenderer::sFaceCentroidColor.blueF(), - DLFLRenderer::sFaceCentroidColor.alphaF()); - glDepthRange(0.0, 1.0 - 0.00075); - //object->renderVertices(mVertexThickness); - gr->renderFaceCentroids(object, DLFLRenderer::sFaceCentroidThickness); - }; - - void drawFaceNormals(DLFLObjectPtr object) - { - glColor4f( - DLFLRenderer::sNormalColor.redF(), - DLFLRenderer::sNormalColor.greenF(), - DLFLRenderer::sNormalColor.blueF(), - DLFLRenderer::sNormalColor.alphaF()); - glDepthRange(0.0, 1.0 - 0.00075); - //object->renderVertices(mVertexThickness); - gr->renderFaceNormals(object, DLFLRenderer::sNormalThickness, DLFLRenderer::sNormalLength); - }; - - /* - This checks the render flags and calls the above functions. - This is not defined as static since it needs access to the render flags - */ - void drawOverlays(DLFLObjectPtr object) - { - // if ( render_flags & ShowWireframe ) drawWireframe(object); - // if ( render_flags & ShowSilhouette ) drawSilhouette(object); - // if ( render_flags & ShowVertices ) drawVertices(object); - // if ( render_flags & ShowFaceNormals ) drawFaceNormals(object); - // if ( render_flags & ShowFaceCentroids ) drawFaceCentroids(object); - - if (gr->drawWireframe) drawWireframe(object); - if (gr->drawSilhouette) drawSilhouette(object); - if (gr->drawVertices) drawVertices(object); - if (gr->drawFaceNormals) drawFaceNormals(object); - if (gr->drawFaceCentroids) drawFaceCentroids(object); - }; - - //getters and setters for color and thickness - void setSilhouetteColor(QColor c) { DLFLRenderer::sSilhouetteColor = c; }; - void setSilhouetteThickness(double t) { DLFLRenderer::sSilhouetteThickness = t; }; - void setWireframeColor(QColor c) { DLFLRenderer::sWireframeColor = c; }; - void setWireframeThickness(double t) { DLFLRenderer::sWireframeThickness = t; }; - void setVertexColor(QColor c) { DLFLRenderer::sVertexColor = c; }; - void setVertexThickness(double t) { DLFLRenderer::sVertexThickness = t; }; - void setFaceCentroidColor(QColor c) { DLFLRenderer::sFaceCentroidColor = c; }; - void setFaceCentroidThickness(double t) { DLFLRenderer::sFaceCentroidThickness = t; }; - void setNormalColor(QColor c) { DLFLRenderer::sNormalColor = c; }; - void setNormalThickness(double t) { DLFLRenderer::sNormalThickness = t; }; - void setNormalLength(double l) { DLFLRenderer::sNormalLength = l; }; - -public: - - /* Enumeration for render flags */ - // enum RenderFlags { ShowWireframe=1, ShowSilhouette=2, ShowVertices=4, ShowFaceNormals=8, ShowFaceCentroids=16 }; - -protected: - //!< pointer to the singleton class GeometryRenderer - GeometryRenderer *gr; - - /* Integer which can be used to represent a combination of render flags */ - // static int render_flags; - - /* Flag indicating if we should front or back side of object */ - int render_flags; - static bool sReverseObject; -#ifdef GPU_OK - static bool sUseGPU; -#endif - static bool sAntialiasing; - -private: - static QColor sWireframeColor; //!< wireframe RGB color - static QColor sSilhouetteColor; //!< silhouette RGB color - static QColor sVertexColor; //!< vertex RGB color - static QColor sFaceCentroidColor; //!< face centroid RGB color - static QColor sNormalColor; //!< normals RGB color - static double sFaceCentroidThickness; //!< face centroid point size - static double sNormalThickness; //!< normal line thickness - static double sNormalLength; //!< normal length - static double sWireframeThickness; //!< wireframe line thickness - static double sSilhouetteThickness; //!< silhouette line thickness - static double sVertexThickness; //!< vertex point size - -}; - -#endif diff --git a/topmodx/src/Renderer/GeometryRenderer.cc b/topmodx/src/Renderer/GeometryRenderer.cc deleted file mode 100644 index 8f307fb..0000000 --- a/topmodx/src/Renderer/GeometryRenderer.cc +++ /dev/null @@ -1,328 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "GeometryRenderer.h" -#include "DLFLRenderer.h" - -/*! -\ingroup gui -@{ - - \class GeometryRenderer - \brief functions for rendering edges, faces, vertices of DLFL Objects - - \note - - \see GeometryRenderer -*/ - -static void transform(DLFLObjectPtr obj) -{ - double mat[16]; - obj->tr.fillArrayColumnMajor(mat); - glMultMatrixd(mat); -} - -void GeometryRenderer::render(DLFLObjectPtr obj) const -{ - // std::cout << "usegpu = " << useGPU << "\n"; - DLFLMaterialPtrList::iterator mp_it; - DLFLFacePtrList::iterator fp_it; - glPushMatrix(); - { - transform(obj); - for (mp_it = obj->beginMaterial(); mp_it != obj->endMaterial(); mp_it++) - { - DLFLMaterialPtr mat = *mp_it; - for (fp_it = mat->faces.begin(); fp_it != mat->faces.end(); fp_it++) - { - renderFace(*fp_it); - } - } - } glPopMatrix(); -} - -void GeometryRenderer::renderFace(DLFLFacePtr df, bool useAttrs) const -{ -#ifdef GPU_OK - if (useGPU) - { - double Ka = df->material()->Ka; - double Kd = df->material()->Kd; - double Ks = df->material()->Ks; - RGBColor basecolor = df->material()->color; - - cgSetParameter3f(CgData::instance()->basecolor, basecolor.r, basecolor.g, basecolor.b); - cgSetParameter3f(CgData::instance()->Ka, Ka, Ka, Ka); - cgSetParameter3f(CgData::instance()->Kd, Kd, Kd, Kd); - cgSetParameter3f(CgData::instance()->Ks, Ks, Ks, Ks); - cgSetParameter1f(CgData::instance()->shininess, 50); - } -#endif - if (useAttrs) - { - glBeginFace(df->size(), useOutline); - } - else - { - glBeginFace(df->size(), false); - } - DLFLFaceVertexPtr head, curr; - curr = head = df->front(); - renderFaceVertex(curr, useAttrs); - curr = curr->next(); - while (curr != head) - { - renderFaceVertex(curr, useAttrs); - curr = curr->next(); - } - glEnd(); -} - -void GeometryRenderer::renderFaceVertex(DLFLFaceVertexPtr dfv, bool useAttrs) const -{ - if (dfv->vertex) - { - if (useAttrs) - { - if (useNormal) - { - glNormal3dv((dfv->normal).getCArray()); - } - if (useLighting && useMaterial) - { - // Lighting and solid color material - RGBColor rgb(renderColor[0], renderColor[1], renderColor[2]); - // RGBColor rgb( 0.1, 0.1, 0.1 ); -#ifdef GPU_OK - if (!useGPU) - { - rgb = product(rgb, dfv->color); // this multiplies corresponding elements together (e.g. RGBColor(r1*r2, g1*g2, b1*b2) ) - } -#else - rgb = product(rgb, dfv->color); // this multiplies corresponding elements together (e.g. RGBColor(r1*r2, g1*g2, b1*b2) ) -#endif - glColor4f(rgb.r, rgb.g, rgb.b, renderColor[3]); - } - else - { - if (useLighting) { glColor(dfv->color); } // Actually means use lighting - if (useMaterial) { glColor4dv(renderColor); } - if (useColorable) - { - RGBColor rgb(dfv->getFacePtr()->material()->color); - // RGBColor rgb(renderColor[0], renderColor[1], renderColor[2] ); - glColor4f(rgb.r, rgb.g, rgb.b, renderColor[3]); - } - } - if (useTexture) - { - // std::cout <<"geomrend using texture!!!\n"; - - if (isReversed) - glTexCoord2d(1.0 - dfv->texcoord[0], 1.0 - dfv->texcoord[1]); - else - glTexCoord2d(1.0 - dfv->texcoord[0], 1.0 - dfv->texcoord[1]); - } - } - DLFLVertexPtr vp = dfv->vertex; - glVertex3dv((vp->coords).getCArray()); - } -} - -void GeometryRenderer::renderEdge(DLFLEdgePtr dep) const -{ - DLFLFaceVertexPtr fvptr1, fvptr2; - dep->getFaceVertexPointers(fvptr1, fvptr2); - glVertex3dv((fvptr1->vertex->coords).getCArray()); - glVertex3dv((fvptr2->vertex->coords).getCArray()); -} - -void GeometryRenderer::renderVertex(DLFLVertexPtr dvp) const -{ - glBegin(GL_POINTS); - { - glVertex3dv(dvp->coords.getCArray()); - } glEnd(); -} - -void GeometryRenderer::renderVertices(DLFLObjectPtr obj, double size) const -{ - DLFLVertexPtrList::iterator it; - // Just render all the vertices with specified point size - glPushMatrix(); - { - transform(obj); - glPointSize(size); - for (it = obj->beginVertex(); it != obj->endVertex(); it++) - { - renderVertex(*it); - } - glPointSize(1.0); - } glPopMatrix(); -} - -void GeometryRenderer::renderEdges(DLFLObjectPtr obj, double width) const -{ - DLFLEdgePtrList::iterator it; - // Just render all the edges with specified line width - glPushMatrix(); - { - transform(obj); - glLineWidth(width); - glBegin(GL_LINES); - for (it = obj->beginEdge(); it != obj->endEdge(); it++) - { - renderEdge(*it); - } - glEnd(); - glLineWidth(1.0); - glPopMatrix(); - } -} - -// if( drawFaceCentroids || drawFaceNormals ) -// -// if( drawFaceCentroids ) { -// } -// if( drawFaceNormals ) { -// // std::cout << "hey this is a normal! \n"; -// glPushAttrib( GL_CURRENT_BIT ); -// glLineWidth(3.0); -// glColor4f(1.0,0.0,0.0,1.0); -// glBegin( GL_LINES ); { -// Vector3d norm = df->centroid + (df->getAuxNormal() * 0.2); -// glVertex3dv( (df->centroid).getCArray() ); -// glVertex3dv( norm.getCArray() ); -// } glEnd( ); -// glPopAttrib( ); -// } -// -void GeometryRenderer::renderFaceCentroids(DLFLObjectPtr obj, double size) const -{ - DLFLFacePtrList::iterator it; - glPushMatrix(); - { - transform(obj); - glPointSize(size); - glBegin(GL_POINTS); - for (it = obj->beginFace(); it != obj->endFace(); it++) - { - (*it)->updateCentroid(); - // renderVertex( *it ); - glVertex3dv((*it)->centroid.getCArray()); - } - glEnd(); - glPointSize(1.0); - } glPopMatrix(); -} - -void GeometryRenderer::renderFaceNormals(DLFLObjectPtr obj, double width, double length) const -{ - DLFLFacePtrList::iterator it; - glPushMatrix(); - { - transform(obj); - glLineWidth(width); - glBegin(GL_LINES); - for (it = obj->beginFace(); it != obj->endFace(); it++) - { - // renderEdge( *it ); - (*it)->updateCentroid(); - // (*it)->updateNormal(); - Vector3d norm = (*it)->centroid + ((*it)->getNormal() * length); - glVertex3dv((*it)->centroid.getCArray()); - glVertex3dv(norm.getCArray()); - } - glEnd(); - glLineWidth(1.0); - } glPopMatrix(); - // glPushAttrib( GL_CURRENT_BIT ); - // glLineWidth(3.0); - // glColor4f(1.0,0.0,0.0,1.0); - // glBegin( GL_LINES ); { - // Vector3d norm = df->centroid + (df->getAuxNormal() * 0.2); - // glVertex3dv( (df->centroid).getCArray() ); - // glVertex3dv( norm.getCArray() ); - // } glEnd( ); - // glPopAttrib( ); -} - -// Call glBegin with the appropriate macro depending on no of vertices -// This is for filled polygons. -void GeometryRenderer::glBeginFace(int num, bool outline) -{ - if (outline) - { - switch (num) - { - case 0: - return; - case 1: - glBegin(GL_POINTS); break; - case 2: - glBegin(GL_LINES); break; - default: - glBegin(GL_LINE_LOOP); - } - } - else - { - switch (num) - { - case 0: - return; - case 1: - glBegin(GL_POINTS); break; - case 2: - glBegin(GL_LINES); break; - case 3: - glBegin(GL_TRIANGLES); break; - case 4: - glBegin(GL_QUADS); break; - default: - glBegin(GL_POLYGON); - } - } -} - -// Singleton Stuff -GeometryRenderer* GeometryRenderer::mInstance = 0; - -GeometryRenderer* GeometryRenderer::instance() -{ - // ensures only 1 instance (singleton) - if (!mInstance) - mInstance = new GeometryRenderer; - return mInstance; -} diff --git a/topmodx/src/Renderer/GeometryRenderer.h b/topmodx/src/Renderer/GeometryRenderer.h deleted file mode 100644 index 4bdb3b5..0000000 --- a/topmodx/src/Renderer/GeometryRenderer.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _GEOMETRY_RENDERER_H_ -#define _GEOMETRY_RENDERER_H_ - -#include -#include "CgData.h" - -#ifdef GPU_OK -using namespace Cg; -#endif // GPU_OK - -using namespace DLFL; - -/*! -\file GeometryRenderer.hh -\brief Definition of the GeometryRenderer class - -\see GeometryRenderer -*/ - -class GeometryRenderer -{ -public: - /** Singleton Methods **/ - //static GeometryRenderer& instance( ); - static GeometryRenderer* instance(); - ~GeometryRenderer() { delete renderColor; renderColor = 0; }; - - //void setObject( DLFLObjectPtr obj ) { mObj = obj; }; - static void glBeginFace(int num, bool outline = false); - - void render(DLFLObjectPtr obj) const; - void renderFace(DLFLFacePtr dfp, bool useAttrs = true) const; - void renderFaceVertex(DLFLFaceVertexPtr dfvp, bool useAttrs = true) const; - void renderEdge(DLFLEdgePtr dep) const; - void renderVertex(DLFLVertexPtr dvp) const; - - void renderVertices(DLFLObjectPtr obj, double size = 5.0) const; - void renderEdges(DLFLObjectPtr obj, double width = 1.0) const; - void renderFaceNormals(DLFLObjectPtr obj, double width, double length) const; - void renderFaceCentroids(DLFLObjectPtr obj, double size) const; - -private: - //DLFLObjectPtr mObj; - - static GeometryRenderer *mInstance; - GeometryRenderer(bool gpu = false) : useMaterial(false), useColorable(false), useLighting(false), - useNormal(false), useTexture(false), antialiasing(false), - useOutline(false), drawFaceCentroids(false), drawVertices(false), - drawSilhouette(false), drawWireframe(true), - drawFaceNormals(false), isReversed(false), useGPU(gpu) - { - renderColor = new GLdouble[4]; - }; - -public: - bool useMaterial; - bool useLighting; - bool useColorable; - bool useNormal; - bool useTexture; - bool useOutline; - bool drawWireframe; - bool drawSilhouette; - bool drawVertices; - bool drawFaceCentroids; - bool drawFaceNormals; - bool isReversed; - bool useGPU; - bool antialiasing; - - bool drawPatchWireframe; - bool drawPatchBoundaries; - bool drawCVs; - bool drawPatchNormals; - GLdouble* renderColor; - -}; - -#endif // _GEOMETRY_RENDERER_H_ diff --git a/topmodx/src/Renderer/LitRenderer.h b/topmodx/src/Renderer/LitRenderer.h deleted file mode 100644 index 705496f..0000000 --- a/topmodx/src/Renderer/LitRenderer.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _LIT_RENDERER_HH_ -#define _LIT_RENDERER_HH_ - -/* - LitRenderer - A renderer for DLFL objects, derived from DLFLRenderer - Renders with face-vertex colors and normals. - Renders using light information. -*/ - -#include "DLFLRenderer.h" - -class LitRenderer; -typedef LitRenderer * LitRendererPtr; - -class LitRenderer : public DLFLRenderer -{ -public: - - /* Default constructor */ - LitRenderer() : DLFLRenderer() {} - - LitRenderer(QColor wc, double wt, QColor sc, double st, QColor vc, double vt, QColor fc, double ft, QColor nc, double nt) - : DLFLRenderer(wc, wt, sc, st, vc, vt, fc, ft, nc, nt) - { - } - - /* Copy constructor */ - LitRenderer(const LitRenderer& lr) : DLFLRenderer(lr) {} - - /* Assignment operator */ - LitRenderer& operator=(const LitRenderer& lr) - { - DLFLRenderer::operator=(lr); - return (*this); - } - - /* Destructor */ - virtual ~LitRenderer() {} - - /* Implement render function */ - virtual int render(DLFLObjectPtr object) - { - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - glEnable(GL_BLEND); // Enable Blending - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Type Of Blending To Use - - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - //object->renderFaces(); - gr->render(object); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual void setState() - { - gr->useLighting = true; - gr->useColorable = false; - gr->useMaterial = true; - gr->useTexture = false; - gr->useOutline = false; - } - -}; - -#endif /* #ifndef _LIT_RENDERER_HH_ */ diff --git a/topmodx/src/Renderer/NormalRenderer.h b/topmodx/src/Renderer/NormalRenderer.h deleted file mode 100644 index 54c0a78..0000000 --- a/topmodx/src/Renderer/NormalRenderer.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _NORMAL_RENDERER_H_ -#define _NORMAL_RENDERER_H_ - -/** - * NormalRenderer - * A renderer for DLFL objects, derived from DLFLRenderer - * Renders with face-vertex wireframes with solid colors, no shading/materials/lighting -*/ - -#include "DLFLRenderer.h" - -class NormalRenderer; -typedef NormalRenderer *NormalRendererPtr; - -class NormalRenderer : public DLFLRenderer -{ -public: - /* Default constructor */ - NormalRenderer() : DLFLRenderer() - { - } - - NormalRenderer( - QColor wc, double wt, QColor sc, double st, - QColor vc, double vt, QColor fc, double ft, - QColor nc, double nt) - : DLFLRenderer(wc, wt, sc, st, vc, vt, fc, ft, nc, nt) - { - } - - /* Copy constructor */ - NormalRenderer(const NormalRenderer& nr) : DLFLRenderer(nr) {} - - /* Assignment operator */ - NormalRenderer& operator = (const NormalRenderer& nr) - { - DLFLRenderer::operator = (nr); - return (*this); - } - - /* Destructor */ - virtual ~NormalRenderer() {} - - /* Implement render function */ - virtual int render(DLFLObjectPtr object) - { - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glEnable(GL_BLEND); // Enable Blending - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Type Of Blending To Use - - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - //glColor4f(mNormalColor.redF(),mNormalColor.greenF(),mNormalColor.blueF(),mNormalColor.alphaF()); - //object->plainRender(); - gr->render(object); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual void setState() - { - gr->useLighting = false; - gr->useColorable = false; - gr->useMaterial = true; - gr->useTexture = false; - gr->useOutline = false; - } -}; - -#endif /* #ifndef _NORMAL_RENDERER_HH_ */ - diff --git a/topmodx/src/Renderer/PatchRenderer.h b/topmodx/src/Renderer/PatchRenderer.h deleted file mode 100644 index a111b09..0000000 --- a/topmodx/src/Renderer/PatchRenderer.h +++ /dev/null @@ -1,170 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _PATCH_RENDERER_HH_ -#define _PATCH_RENDERER_HH_ - -/* -PatchRenderer -A renderer for DLFL objects, derived from DLFLRenderer -Renders using Bezier patches -*/ - -#include "DLFLRenderer.h" - -class PatchRenderer; -typedef PatchRenderer *PatchRendererPtr; - -class PatchRenderer : public DLFLRenderer -{ -public: - /* Default constructor */ - PatchRenderer() : DLFLRenderer() {} - - PatchRenderer( - QColor wc, double wt, QColor sc, double st, - QColor vc, double vt, QColor fc, double ft, - QColor nc, double nt) - : DLFLRenderer(wc, wt, sc, st, vc, vt, fc, ft, nc, nt) - { - } - - /* Copy constructor */ - PatchRenderer(const PatchRenderer& nr) : DLFLRenderer(nr) - { - } - - /* Assignment operator */ - PatchRenderer& operator = (const PatchRenderer& nr) - { - operator = (nr); - return (*this); - } - - /* Destructor */ - virtual ~PatchRenderer() {} - - /* Draw the overlays - different from regular renderers */ - virtual void drawPatchOverlays(TMPatchObjectPtr patch_object) - { - if (gr->drawWireframe) - { - glColor3d(0.0, 0.0, 0.0); - glLineWidth(.8); - glDepthRange(0.0, 1.0 - 0.0005); - patch_object->renderWireframePatches(); - } - - if (gr->drawSilhouette) - { - glColor3d(0.4, 0.6, 0.4); - glLineWidth(3.0); - glDepthRange(0.0, 1.0 - 0.00055); - patch_object->renderPatchBoundaries(); - - glColor3d(0.2, 0.2, 0.3); - glLineWidth(3.0); - glDepthRange(0.0, 1.0 - 0.0006); - patch_object->renderPatchFaceBoundaries(); - } - - if (gr->drawVertices) - { - glColor3d(0.2, 0.2, 0.3); - glLineWidth(3.0); - glDepthRange(0.0, 1.0 - 0.0006); - patch_object->renderPatchFaceBoundaries(); - - glColor3d(0.5, 1.0, 0.0); - glPointSize(5.0); - glDepthRange(0.0, 1.0 - 0.00075); - patch_object->renderPointPatches(); - } - - if (gr->drawFaceNormals) - { - glColor3d(0.2, 0.8, 0.2); - glLineWidth(1.0); - patch_object->renderPatchNormals(); - } - } - - /* Implement render function */ - virtual int render(TMPatchObjectPtr patchObject) - { - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glColor3d(0.3, 0.5, 0.8); - patchObject->renderPatches(); - drawPatchOverlays(patchObject); - glColor3d(0.0, 0.0, 0.0); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual int render(DLFLObjectPtr object) - { - glEnable(GL_CULL_FACE); - glEnable(GL_BLEND); // Enable Blending - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Type Of Blending To Use - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - //drawWireframe( object ); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual void setState() - { - gr->useLighting = false; - gr->useColorable = false; - gr->useOutline = true; - gr->useTexture = false; - gr->useMaterial = false; - } -}; - -#endif /* #ifndef _PATCH_RENDERER_HH_ */ diff --git a/topmodx/src/Renderer/ShadedRenderer.h b/topmodx/src/Renderer/ShadedRenderer.h deleted file mode 100644 index 1b3cc7f..0000000 --- a/topmodx/src/Renderer/ShadedRenderer.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _SHADED_RENDERER_HH_ -#define _SHADED_RENDERER_HH_ - -/* - ShadedRenderer - A renderer for DLFL objects, derived from DLFLRenderer - Renders with face-vertex normals, with material colors -*/ - -#include "DLFLRenderer.h" - -class ShadedRenderer; -typedef ShadedRenderer *ShadedRendererPtr; - -class ShadedRenderer : public DLFLRenderer -{ - -public: - /* Default constructor */ - ShadedRenderer() : DLFLRenderer() {} - - ShadedRenderer( - QColor wc, double wt, - QColor sc, double st, - QColor vc, double vt) - : DLFLRenderer(wc, wt, sc, st, vc, vt) - { - } - - /* Copy constructor */ - ShadedRenderer(const ShadedRenderer& nr) - : DLFLRenderer(nr) - { - } - - /* Assignment operator */ - ShadedRenderer& operator = (const ShadedRenderer& nr) - { - DLFLRenderer::operator = (nr); - return (*this); - } - - /* Destructor */ - virtual ~ShadedRenderer() {} - - /* Implement render function */ - virtual int render(DLFLObjectPtr object) - { - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - gr->render(object); - //object->render(); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual void setState() - { - gr->useLighting = false; - gr->useColorable = false; - gr->useMaterial = true; - gr->useTexture = false; - gr->useOutline = false; - } - -}; - -#endif /* #ifndef _SHADED_RENDERER_HH_ */ diff --git a/topmodx/src/Renderer/TexturedLitRenderer.h b/topmodx/src/Renderer/TexturedLitRenderer.h deleted file mode 100644 index 5a47177..0000000 --- a/topmodx/src/Renderer/TexturedLitRenderer.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TEXTURED_LIT_RENDERER_HH_ -#define _TEXTURED_LIT_RENDERER_HH_ - -/* - TexturedLitRenderer - A renderer for DLFL objects, derived from DLFLTexturedRenderer - Renders with face-vertex normals, without material colors or fave-vertex colors. - Renders with texture, specified through an OpenGL texture ID - Renders with lighting information -*/ - -#include "TexturedRenderer.h" - -class TexturedLitRenderer; -typedef TexturedLitRenderer * TexturedLitRendererPtr; - -class TexturedLitRenderer : public TexturedRenderer -{ -public: - /* Default constructor */ - TexturedLitRenderer() : TexturedRenderer() {} - - /* Copy constructor */ - TexturedLitRenderer(const TexturedLitRenderer& tlr) - : TexturedRenderer(tlr) - { - } - - /* Construct using given image file as texture */ - TexturedLitRenderer(const char * filename) - : TexturedRenderer(filename) - { - } - - TexturedLitRenderer( - QColor wc, double wt, QColor sc, double st, - QColor vc, double vt, QColor fc, double ft, - QColor nc, double nt) - : TexturedRenderer(wc, wt, sc, st, vc, vt, fc, ft, nc, nt) - { - } - - /* Assignment operator */ - TexturedLitRenderer& operator = (const TexturedLitRenderer& tlr) - { - TexturedRenderer::operator = (tlr); - return (*this); - } - - /* Destructor */ - virtual ~TexturedLitRenderer() {} - - /* Implement render function */ - virtual int render(DLFLObjectPtr object) - { - if (isValid() == false) return -1; - - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, texture_id); - gr->render(object); - //object->renderFacesT(); - glDisable(GL_TEXTURE_2D); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual void setState() - { - gr->useLighting = true; - gr->useColorable = false; - gr->useTexture = true; - gr->useMaterial = false; - gr->useOutline = false; - } -}; - -#endif /* #ifndef _TEXTURED_LIT_RENDERER_HH_ */ diff --git a/topmodx/src/Renderer/TexturedRenderer.h b/topmodx/src/Renderer/TexturedRenderer.h deleted file mode 100644 index c3f2828..0000000 --- a/topmodx/src/Renderer/TexturedRenderer.h +++ /dev/null @@ -1,215 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TEXTURED_RENDERER_HH_ -#define _TEXTURED_RENDERER_HH_ - -/* - TexturedRenderer - A renderer for DLFL objects, derived from DLFLRenderer - Renders with face-vertex normals, without material colors or fave-vertex colors. - Renders with texture, specified through an OpenGL texture ID -*/ -#include -#include -#include -#include "DLFLRenderer.h" - -class TexturedRenderer; -typedef TexturedRenderer * TexturedRendererPtr; - -class TexturedRenderer : public DLFLRenderer -{ -public: - - /* Default constructor */ - TexturedRenderer() - : DLFLRenderer(), image(nullptr), width(0), height(0), depth(0), texture_id(0) - { - - } - - TexturedRenderer(QColor wc, double wt, QColor sc, double st, QColor vc, double vt, QColor fc, double ft, QColor nc, double nt) - : DLFLRenderer(wc, wt, sc, st, vc, vt, fc, ft, nc, nt) - { - - } - - /* Copy constructor */ - TexturedRenderer(const TexturedRenderer& tr) - : DLFLRenderer(tr), width(tr.width), height(tr.height), depth(tr.depth), texture_id(tr.texture_id) - { - image = new QImage(tr.image->bits(), tr.width, tr.height, tr.image->format()); - //(*image) = tr.image->copy(); - } - - /* Construct using given image file as texture */ - TexturedRenderer(const char * filename) - : DLFLRenderer(), image(nullptr), width(0), height(0), depth(0), texture_id(0) - { - readTexture(filename); - } - - /* Assignment operator */ - TexturedRenderer& operator = (const TexturedRenderer& tr) - { - DLFLRenderer::operator = (tr); - delete image; - image = new QImage(tr.image->bits(), tr.width, tr.height, tr.image->format()); - width = tr.width; height = tr.height; depth = tr.depth; - texture_id = tr.texture_id; - return (*this); - } - - /* Destructor */ - virtual ~TexturedRenderer() - { - delete image; - } - - /* Associate a texture with this renderer */ - void setTexture(const char * filename) - { - delete image; image = nullptr; - readTexture(filename); - } - - bool isValid(void) - { - return ((image != nullptr) && (!image->isNull()) && (depth > 0)); - } - - /* - Override base class method - Initialize the texture stuff. This should be called after viewport - has been setup in the draw() method - */ - virtual void initialize(void) - { - if (isValid()) - { - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - glGenTextures(1, &texture_id); - glBindTexture(GL_TEXTURE_2D, texture_id); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - glTexture(); - } - } - - /* Implement render function. Doesn't render if texture_id is negative */ - virtual int render(DLFLObjectPtr object) - { - if (isValid() == false) return -1; - - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - - glEnable(GL_CULL_FACE); - setCulling(); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glColor3f(1.0, 1.0, 1.0); - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, texture_id); - //object->plainRenderT(); - gr->render(object); - glDisable(GL_TEXTURE_2D); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - } - - virtual void setState() - { - gr->useLighting = false; - gr->useColorable = false; - gr->useMaterial = false; - gr->useTexture = true; - gr->useOutline = false; - } - -protected: - // Read the image from the given file - void readTexture(const char *imagefile) - { - QString filename(imagefile); - if (filename.indexOf(".jpg", filename.length() - 5) == filename.length() - 4 || - filename.indexOf(".jpeg", filename.length() - 5) == filename.length() - 4 || - filename.indexOf(".JPG", filename.length() - 5) == filename.length() - 4 || - filename.indexOf(".JPEG", filename.length() - 5) == filename.length() - 4 || - filename.indexOf(".png", filename.length() - 5) == filename.length() - 4 || - filename.indexOf(".PNG", filename.length() - 5) == filename.length() - 4) - image = new QImage(imagefile); - // std::cout << image->height() << "\n"; - if (!image->isNull()) - { - width = image->width(); - height = image->height(); - depth = image->depth() / 8; - // glTexture(); - } - } - - void glTexture(void) - { - // std::cout << image->bits() << "\n"; - - // Do a glTexImage2D using the texture image data - if (image && !image->isNull()) - { - // std::cout<<"depth = " << depth << "\n"; - if (depth == 1) - glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, width, height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, image->bits()); - else if (depth == 2) - glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, width, height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, image->bits()); - else if (depth == 3) - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, image->bits()); - else if (depth == 4) - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, image->bits()); - } - } - -protected: - QImage *image; // QImage pointer containing image data - int width, height, depth; // Width, height and color depth - GLuint texture_id; - -}; - -#endif /* #ifndef _TEXTURED_RENDERER_HH_ */ diff --git a/topmodx/src/Renderer/WireframeRenderer.h b/topmodx/src/Renderer/WireframeRenderer.h deleted file mode 100644 index 4dd1f0f..0000000 --- a/topmodx/src/Renderer/WireframeRenderer.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _WIREFRAME_RENDERER_H_ -#define _WIREFRAME_RENDERER_H_ - -/** - * WireframeRenderer - * A renderer for DLFL objects, derived from DLFLRenderer - * Renders with face-vertex wireframes only -*/ - -#include "DLFLRenderer.h" - -class WireframeRenderer; -typedef WireframeRenderer *WireframeRendererPtr; - -class WireframeRenderer : public DLFLRenderer -{ -public: - /* Default constructor */ - WireframeRenderer() : DLFLRenderer() {}; - - WireframeRenderer( - QColor wc, double wt, QColor sc, double st, - QColor vc, double vt, QColor fc, double ft, - QColor nc, double nt) - : DLFLRenderer(wc, wt, sc, st, vc, vt, fc, ft, nc, nt) - { - } - - /* Copy constructor */ - WireframeRenderer(const WireframeRenderer& nr) : DLFLRenderer(nr) {}; - - /* Destructor */ - virtual ~WireframeRenderer() {}; - - /* Assignment operator */ - WireframeRenderer& operator=(const WireframeRenderer& nr) - { - DLFLRenderer::operator = (nr); - return (*this); - }; - - /* Implement render function */ - virtual int render(DLFLObjectPtr object) - { - glEnable(GL_CULL_FACE); - glEnable(GL_BLEND); // Enable Blending - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Type Of Blending To Use - if (DLFLRenderer::sAntialiasing) - { - glEnable(GL_LINE_SMOOTH); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // Set Line Antialiasing - } - else - { - glDisable(GL_LINE_SMOOTH); - } - //drawWireframe( object ); - drawOverlays(object); - glDisable(GL_CULL_FACE); - return 0; - }; - - virtual void setState() - { - gr->useLighting = false; - gr->useColorable = false; - gr->useMaterial = false; - gr->useTexture = false; - gr->useOutline = false; - } - -}; - -#endif // _WIREFRAME_RENDERER_H_ diff --git a/topmodx/src/TMPatch.h b/topmodx/src/TMPatch.h deleted file mode 100644 index 17913cd..0000000 --- a/topmodx/src/TMPatch.h +++ /dev/null @@ -1,427 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TM_PATCH_HH_ -#define _TM_PATCH_HH_ - -/* Class for a TopMod Bezier Patch */ - -#include -#include -#include -#include - -using namespace DLFL; - -class TMPatch; -typedef vector TMPatchArray; -typedef TMPatch* TMPatchPtr; -typedef vector TMPatchPtrArray; - -// This stuff is to map the patches to the face vertices by index -/* -struct compare -{ - bool operator()(DLFLFaceVertexPtr a, DLFLFaceVertexPtr b) const - { - return (a->getID() < b->getID()); - } -};*/ - -typedef std::unordered_map TMPatchMap; - -/* -static void setPatchPtr(TMPatchMap &map, TMPatchPtr p, DLFLFaceVertexPtr fvp) -{ - map[fvp] = p; -};*/ - -/* -static TMPatchPtr getPatchPtr(TMPatchMap &map, DLFLFaceVertexPtr fvp) -{ - auto it = map.find(fvp); - return (*it).second; -};*/ - -static bool destroyPatchMap(TMPatchMap &map) -{ - map.clear(); - return map.empty(); -}; - -class TMPatch -{ -public: - // Default constructor - TMPatch() - : patchsize(0), ctrlpts(), ctrlptnormals(), ctrlptcolors(), glctrlpts(nullptr), glctrlptcolors(nullptr) - { - resizePatch(4); - } - - // Copy constructor - TMPatch(const TMPatch& patch) - : patchsize(patch.patchsize), ctrlpts(patch.ctrlpts), ctrlptnormals(patch.ctrlptnormals), - ctrlptcolors(patch.ctrlptcolors), - glctrlpts(nullptr), glctrlptcolors(nullptr) - { - allocateGLArray(); - populateGLArray(); - } - - // Destructor - ~TMPatch() - { - delete[] glctrlpts; - delete[] glctrlptcolors; - } - - // Assignment operator - TMPatch& operator = (const TMPatch& patch) - { - patchsize = patch.patchsize; - ctrlpts = patch.ctrlpts; ctrlptnormals = patch.ctrlptnormals; - ctrlptcolors = patch.ctrlptcolors; - allocateGLArray(); populateGLArray(); - return (*this); - } - - // Resize the patch of control points - void resizePatch(int size) - { - if (size != patchsize) - { - patchsize = size; - ctrlpts.resize(patchsize); ctrlptnormals.resize(patchsize); ctrlptcolors.resize(patchsize); - for (int i = 0; i < ctrlpts.size(); ++i) - { - ctrlpts[i].resize(patchsize); - ctrlptnormals[i].resize(patchsize); - ctrlptcolors[i].resize(patchsize); - } - allocateGLArray(); // Has to be reallocated if size changes - } - } - - const Vector3d& getControlPoint(int i, int j) const - { - // Return the control point at the specified location - // Does not check for index out of bounds errors - // Flips the i and j since it is flipped when control points are stored (see calculatePatchPoints method) - return ctrlpts[j][i]; - } - - void setControlPoint(int i, int j, const Vector3d& p) - { - // Set the control point at the specified location - // Does not check for index out of bounds errors - // Flips the i and j since it is flipped when control points are stored (see calculatePatchPoints method) - ctrlpts[j][i] = p; - } - - // Calculate the points of the patch given the base grid points and base grid normals - void calculatePatchPoints(const Vector3d(&cp)[4][4], const Vector3d(&cn)[4][4]) - { - // Simply assign the points from the control grid - // Base grid normals are ignored for now - - // resize the patch to be 4x4 - resizePatch(4); - int index; - for (int i = 0; i < patchsize; ++i) - for (int j = 0; j < patchsize; ++j) - { - ctrlpts[j][i] = cp[i][j]; - ctrlptnormals[j][i] = cn[i][j]; - index = (i*patchsize + j) * 3; - glctrlpts[index + 0] = ctrlpts[j][i][0]; - glctrlpts[index + 1] = ctrlpts[j][i][1]; - glctrlpts[index + 2] = ctrlpts[j][i][2]; - } - } - - void updateGLPointArray(void) - { - if (glctrlpts == nullptr) - return; - int index; - for (int i = 0; i < patchsize; ++i) - for (int j = 0; j < patchsize; ++j) - { - index = (i*patchsize + j) * 3; - glctrlpts[index + 0] = ctrlpts[j][i][0]; - glctrlpts[index + 1] = ctrlpts[j][i][1]; - glctrlpts[index + 2] = ctrlpts[j][i][2]; - } - } - - void computeLighting(const RGBColor& basecolor, double Ka, double Kd, double Ks, LightPtr lightptr) - { - // Calculate lighting at each control point and update the color - int colorindex; - RGBColor color; - for (int i = 0; i < patchsize; ++i) - for (int j = 0; j < patchsize; ++j) - { - color = Kd * lightptr->illuminate(ctrlpts[j][i], ctrlptnormals[j][i]); - color += (1.0 - Kd) * basecolor; - colorindex = (i*patchsize + j) * 4; - glctrlptcolors[colorindex + 0] = color.r; - glctrlptcolors[colorindex + 1] = color.g; - glctrlptcolors[colorindex + 2] = color.b; - glctrlptcolors[colorindex + 3] = 1.0; - } - } - - // Calculate the points of the patch given 4 corners and normals at the 4 corners - // Points are assumed to be in counter-clockwise direction w.r.t. the patch - void calculatePatchPoints( - const Vector3d& p1, const Vector3d& p2, - const Vector3d& p3, const Vector3d& p4, - const Vector3d& n1, const Vector3d& n2, - const Vector3d& n3, const Vector3d& n4, - double w1, double w2, double w3, double w4); - - // Render this patch using filled polygons - void render(void) - { - glMap2d(GL_MAP2_VERTEX_3, 0, 1, 3, patchsize, 0, 1, patchsize * 3, patchsize, glctrlpts); - glMap2d(GL_MAP2_COLOR_4, 0, 1, 4, patchsize, 0, 1, patchsize * 4, patchsize, glctrlptcolors); - glEnable(GL_MAP2_VERTEX_3); - glEnable(GL_MAP2_COLOR_4); - glMapGrid2d(12, 0.0, 1.0, 12, 0.0, 1.0); - glEvalMesh2(GL_FILL, 0, 12, 0, 12); - glDisable(GL_MAP2_COLOR_4); - glDisable(GL_MAP2_VERTEX_3); - } - - // Render this patch using outlined polygons - void outline(void) - { - glMap2d(GL_MAP2_VERTEX_3, 0, 1, 3, patchsize, 0, 1, patchsize * 3, patchsize, glctrlpts); - glEnable(GL_MAP2_VERTEX_3); - glMapGrid2d(6, 0.0, 1.0, 6, 0.0, 1.0); - glEvalMesh2(GL_LINE, 0, 6, 0, 6); - glDisable(GL_MAP2_VERTEX_3); - } - - // Render the patch boundary - void patch_boundary(void) - { - glMap1d(GL_MAP1_VERTEX_3, 0, 1, 3, patchsize, glctrlpts); - glEnable(GL_MAP1_VERTEX_3); - glMapGrid1d(12, 0.0, 1.0); - glEvalMesh1(GL_LINE, 0, 12); - glDisable(GL_MAP1_VERTEX_3); - - glMap1d(GL_MAP1_VERTEX_3, 0, 1, patchsize * 3, patchsize, glctrlpts + patchsize * 3 - 3); - glEnable(GL_MAP1_VERTEX_3); - glMapGrid1d(12, 0.0, 1.0); - glEvalMesh1(GL_LINE, 0, 12); - glDisable(GL_MAP1_VERTEX_3); - } - - // Render the patch boundary - void face_boundary(void) - { - glMap1d(GL_MAP1_VERTEX_3, 0, 1, 3, patchsize, glctrlpts); - glEnable(GL_MAP1_VERTEX_3); - glMapGrid1d(12, 0.0, 1.0); - glEvalMesh1(GL_LINE, 0, 12); - glDisable(GL_MAP1_VERTEX_3); - } - - // Render the control patch as a grid of lines - void controlgrid(void) - { - for (int i = 0; i < patchsize; ++i) - { - glBegin(GL_LINE_STRIP); - for (int j = 0; j < patchsize; ++j) - glVertex3dv((ctrlpts[i][j]).getCArray()); - glEnd(); - - glBegin(GL_LINE_STRIP); - for (int j = 0; j < patchsize; ++j) - glVertex3dv((ctrlpts[j][i]).getCArray()); - glEnd(); - } - } - - // Show the control points alone - void controlpoints(void) - { - glBegin(GL_POINTS); - for (int i = 0; i < patchsize; ++i) - for (int j = 0; j < patchsize; ++j) - glVertex3dv((ctrlpts[i][j]).getCArray()); - glEnd(); - } - - void renderNormals(void) - { - glBegin(GL_LINES); - for (int i = 0; i < patchsize; ++i) - for (int j = 0; j < patchsize; ++j) - { - glVertex3dv((ctrlpts[i][j]).getCArray()); - Vector3d vec = ctrlpts[i][j] + 0.25*ctrlptnormals[i][j]; - glVertex3dv(vec.getCArray()); - } - } - /* stuart - bezier export */ - void printControlPoints(ostream &stream) - { - for (int i = 0; i < patchsize; i++) - { - for (int j = 0; j < patchsize; j++) - { - stream << "v " - << ctrlpts[i][j][0] << " " - << ctrlpts[i][j][1] << " " - << ctrlpts[i][j][2] - << std::endl; - } - } - } - -protected: - void allocateGLArray() - { - // Allocate memory for the GLdouble array to be sent to OpenGL - // Uses patchsize to determine size of grid - // Releases existing memory - delete[] glctrlpts; glctrlpts = nullptr; - delete[] glctrlptcolors; glctrlptcolors = nullptr; - if (patchsize > 0) - { - glctrlpts = new GLdouble[patchsize*patchsize * 3]; - glctrlptcolors = new GLdouble[patchsize*patchsize * 4]; - } - } - - void populateGLArray() - { - // Copy values from the Vector3dGrid to the GLdouble array - // Assumes that the GLdouble array has enough space - // Assumes that the Vector3dGrid is a square grid of size patchsize - if (glctrlpts != nullptr) - { - // The order of traversal may have to be changed - int index, colorindex; - for (int i = 0; i < patchsize; ++i) - for (int j = 0; j < patchsize; ++j) - { - index = (i*patchsize + j) * 3; - glctrlpts[index + 0] = ctrlpts[j][i][0]; - glctrlpts[index + 1] = ctrlpts[j][i][1]; - glctrlpts[index + 2] = ctrlpts[j][i][2]; - - colorindex = (i*patchsize + j) * 4; - glctrlptcolors[colorindex + 0] = ctrlptcolors[j][i][0]; - glctrlptcolors[colorindex + 1] = ctrlptcolors[j][i][1]; - glctrlptcolors[colorindex + 2] = ctrlptcolors[j][i][2]; - glctrlptcolors[colorindex + 3] = ctrlptcolors[j][i][3]; - } - } - } - -protected: - int patchsize; // Size of the control grid - Vector3dGrid ctrlpts; // The grid of control points - Vector3dGrid ctrlptnormals; // Normal for each control point - Vector4dGrid ctrlptcolors; // Color for each control point (RGBA) - GLdouble * glctrlpts; // Control points for OpenGL - GLdouble * glctrlptcolors; // Control point colors for OpenGL - -}; - -inline void TMPatch::calculatePatchPoints( - const Vector3d& p1, const Vector3d& p2, - const Vector3d& p3, const Vector3d& p4, - const Vector3d& n1, const Vector3d& n2, - const Vector3d& n3, const Vector3d& n4, - double w1, double w2, double w3, double w4) -{ - int maxindex = patchsize - 1; - double u, v; - - // cout << p1 << " " << p2 << " " << p3 << " " << p4 << endl; - // cout << norm(n1) << " " << norm(n2) << " " << norm(n3) << " " << norm(n4) << endl; - - ctrlpts[0][0] = p1; - ctrlpts[0][maxindex] = p2; - ctrlpts[maxindex][maxindex] = p3; - ctrlpts[maxindex][0] = p4; - - for (int i = 0; i < patchsize; ++i) - { - for (int j = 0; j < patchsize; ++j) - { - // Exclude corner points - if (!((i == 0 && j == 0) || - (i == 0 && j == maxindex) || - (i == maxindex && j == maxindex) || - (i == maxindex && j == 0))) - { - u = double(j) / double(maxindex); v = double(i) / double(maxindex); - - ctrlpts[i][j] = (1.0 - v) * ((1.0 - u)*ctrlpts[0][0] + u*ctrlpts[0][maxindex]) + - v * ((1.0 - u)*ctrlpts[maxindex][0] + u*ctrlpts[maxindex][maxindex]); - - // Adjust the points for curvature - if (i < patchsize / 2) - { - if (j < patchsize / 2) - { - ctrlpts[i][j] -= ((ctrlpts[i][j] - ctrlpts[0][0])*n1)*n1; - } - else - { - ctrlpts[i][j] -= ((ctrlpts[i][j] - ctrlpts[0][maxindex])*n2)*n2; - } - } - else - { - if (j < patchsize / 2) - { - ctrlpts[i][j] -= ((ctrlpts[i][j] - ctrlpts[maxindex][0])*n4)*n4; - } - else - { - ctrlpts[i][j] -= ((ctrlpts[i][j] - ctrlpts[maxindex][maxindex])*n3)*n3; - } - } - } - } - } - populateGLArray(); -} - -#endif /* #ifndef _TM_PATCH_HH_ */ - diff --git a/topmodx/src/TMPatchFace.cc b/topmodx/src/TMPatchFace.cc deleted file mode 100644 index ad074fc..0000000 --- a/topmodx/src/TMPatchFace.cc +++ /dev/null @@ -1,254 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "TMPatchFace.h" - -// Resize the patch array depending on number of corners in the DLFLFace -void TMPatchFace::resizePatchArray(void) -{ - if (dlflface != nullptr) - { - patcharray.resize(dlflface->size()); - for (uint i = 0; i < patcharray.size(); ++i) - { - //if( patcharray[i] == nullptr ) - //patcharray[i] = new TMPatch; - patcharray[i].resizePatch(patchsize); - } - } -} - -// Resize all patches -void TMPatchFace::resizePatches(int psize) -{ - if (psize != patchsize) - { - patchsize = psize; - for (uint i = 0; i < patcharray.size(); ++i) - { - patcharray[i].resizePatch(patchsize); - } - } -} - -// Create the patches using face information -void TMPatchFace::createPatches(TMPatchMap &patchMap) -{ - if (dlflface == nullptr) return; - - // patcharray will be resized here - // This is to take care of situations where the no. of corners in the face has - // changed after it was associated with a TMPatchFace - resizePatchArray(); - - // Get the centroid and normal for the face - these will be used in all patches - Vector3d vface = dlflface->getAuxCoords(); - Vector3d nface = dlflface->getAuxNormal(); - // std::cout << vface << " " << nface << "\n"; - - // Get the corners of the face as an array - // A patch will be created for each corner - DLFLFaceVertexPtrArray corners; - int size; - dlflface->getCorners(corners); - size = corners.size(); - - Vector3d cp[4][4]; // Grid of control points - Vector3d cn[4][4]; // Grid of control normals used to modify the control points - - for (int i = 0; i < size; ++i) - { - cp[0][0] = corners[i]->vertex->getAuxCoords(); - cn[0][0] = corners[i]->vertex->getAuxNormal(); - - cp[1][0] = corners[i]->vnext()->getDS2Coord(0); - cn[1][0] = cn[0][0]; - - cp[1][1] = corners[i]->getDS2Coord(0); - cn[1][1] = cn[0][0]; - - cp[0][1] = corners[i]->vprev()->getDS2Coord(0); - cn[0][1] = cn[0][0]; - - - cp[3][0] = corners[i]->getEdgePtr()->getAuxCoords(); - cn[3][0] = corners[i]->getEdgePtr()->getAuxNormal(); - - cp[3][1] = corners[i]->next()->getDS2Coord(3); - cn[3][1] = cn[3][0]; - - cp[2][1] = corners[i]->getDS2Coord(1); - cn[2][1] = cn[3][0]; - - cp[2][0] = corners[i]->vnext()->getDS2Coord(3); - cn[2][0] = cn[3][0]; - - - cp[3][3] = vface; - cn[3][3] = nface; - - cp[2][3] = corners[i]->prev()->getDS2Coord(2); - cn[2][3] = cn[3][3]; - - cp[2][2] = corners[i]->getDS2Coord(2); - cn[2][2] = cn[3][3]; - - cp[3][2] = corners[i]->next()->getDS2Coord(2); - cn[3][2] = cn[3][3]; - - - cp[0][3] = corners[i]->prev()->getEdgePtr()->getAuxCoords(); - cn[0][3] = corners[i]->prev()->getEdgePtr()->getAuxNormal(); - - cp[0][2] = corners[i]->vprev()->getDS2Coord(1); - cn[0][2] = cn[0][3]; - - cp[1][2] = corners[i]->getDS2Coord(3); - cn[1][2] = cn[0][3]; - - cp[1][3] = corners[i]->prev()->getDS2Coord(1); - cn[1][3] = cn[0][3]; - - - // Adjust the points along the edges of the patch - cp[1][0] = planarProjectAndIntersect(cp[0][0], cp[3][0], cp[1][1], cp[1][0], cp[0][0], cn[0][0]); - cp[2][0] = planarProjectAndIntersect(cp[0][0], cp[3][0], cp[2][1], cp[2][0], cp[3][0], cn[3][0]); - - cp[3][1] = planarProjectAndIntersect(cp[3][0], cp[3][3], cp[2][1], cp[3][1], cp[3][0], cn[3][0]); - cp[3][2] = planarProjectAndIntersect(cp[3][0], cp[3][3], cp[2][2], cp[3][2], cp[3][3], cn[3][3]); - - cp[2][3] = planarProjectAndIntersect(cp[3][3], cp[0][3], cp[2][2], cp[2][3], cp[3][3], cn[3][3]); - cp[1][3] = planarProjectAndIntersect(cp[3][3], cp[0][3], cp[1][2], cp[1][3], cp[0][3], cn[0][3]); - - cp[0][2] = planarProjectAndIntersect(cp[0][3], cp[0][0], cp[1][2], cp[0][2], cp[0][3], cn[0][3]); - cp[0][1] = planarProjectAndIntersect(cp[0][3], cp[0][0], cp[1][1], cp[0][1], cp[0][0], cn[0][0]); - - // Adjust the central points - planarProject(cp[1][1], cp[0][0], cn[0][0]); - planarProject(cp[2][1], cp[3][0], cn[3][0]); - planarProject(cp[2][2], cp[3][3], cn[3][3]); - planarProject(cp[1][2], cp[0][3], cn[0][3]); - - // Adjust the control points - cp[1][0] = cp[0][0] + (cp[1][0] - cp[0][0])*4.0 / 3.0; - cp[1][1] = cp[0][0] + (cp[1][1] - cp[0][0])*4.0 / 3.0; - cp[0][1] = cp[0][0] + (cp[0][1] - cp[0][0])*4.0 / 3.0; - - cp[2][0] = cp[3][0] + (cp[2][0] - cp[3][0])*4.0 / 3.0; - cp[2][1] = cp[3][0] + (cp[2][1] - cp[3][0])*4.0 / 3.0; - cp[3][1] = cp[3][0] + (cp[3][1] - cp[3][0])*4.0 / 3.0; - - cp[3][2] = cp[3][3] + (cp[3][2] - cp[3][3])*4.0 / 3.0; - cp[2][2] = cp[3][3] + (cp[2][2] - cp[3][3])*4.0 / 3.0; - cp[2][3] = cp[3][3] + (cp[2][3] - cp[3][3])*4.0 / 3.0; - - cp[0][2] = cp[0][3] + (cp[0][2] - cp[0][3])*4.0 / 3.0; - cp[1][2] = cp[0][3] + (cp[1][2] - cp[0][3])*4.0 / 3.0; - cp[1][3] = cp[0][3] + (cp[1][3] - cp[0][3])*4.0 / 3.0; - - // Adjust the normals for interior and edge middle points - cn[1][0] = normalized(3 * cn[0][0] + cn[3][0]); - cn[0][1] = normalized(3 * cn[0][0] + cn[0][3]); - cn[1][1] = normalized(6 * cn[0][0] + cn[0][3] + cn[3][0]); - - cn[2][0] = normalized(3 * cn[3][0] + cn[0][0]); - cn[3][1] = normalized(3 * cn[3][0] + cn[3][3]); - cn[2][1] = normalized(6 * cn[3][0] + cn[0][0] + cn[3][3]); - - cn[0][2] = normalized(3 * cn[0][3] + cn[0][0]); - cn[1][3] = normalized(3 * cn[0][3] + cn[3][3]); - cn[1][2] = normalized(6 * cn[0][3] + cn[0][0] + cn[3][3]); - - cn[2][3] = normalized(3 * cn[3][3] + cn[0][3]); - cn[3][2] = normalized(3 * cn[3][3] + cn[3][0]); - cn[2][2] = normalized(6 * cn[3][3] + cn[0][3] + cn[3][0]); - - patcharray[i].calculatePatchPoints(cp, cn); - patchMap[corners[i]] = &patcharray[i]; - } - - // Make adjustment to face point for quadrilaterals - if (size == 4) - { - TMPatchPtr pptr1, pptr2; - pptr1 = patchMap.at(corners[0]); - pptr2 = patchMap.at(corners[2]); - - if (pptr1 == nullptr || pptr2 == nullptr) - return; - - Vector3d p00, p01, p10, p11, ip; - p00 = pptr1->getControlPoint(3, 2); p01 = pptr2->getControlPoint(3, 2); - p10 = pptr1->getControlPoint(2, 3); p11 = pptr2->getControlPoint(2, 3); - ip = intersectCoplanarLines(p00, p01, p10, p11); - - for (int i = 0; i < size; ++i) - { - pptr1 = patchMap.at(corners[i]); - pptr1->setControlPoint(3, 3, ip); - pptr1->updateGLPointArray(); - } - } -} - -// Adjust the edge points for each patch in the face -void TMPatchFace::adjustEdgePoints(TMPatchMap &patchMap) -{ - if (dlflface == nullptr) return; - DLFLFaceVertexPtrArray corners; dlflface->getCorners(corners); - DLFLFaceVertexPtr fvp, nfvp, pfvp; - TMPatchPtr pptr, npptr, ppptr; - Vector3d p00, p01, p10, p11, ip; - for (uint i = 0; i < corners.size(); ++i) - { - fvp = corners[i]; pptr = patchMap.at(fvp); - nfvp = corners[i]->getOppositeCorner(); npptr = patchMap.at(nfvp); - pfvp = corners[i]->prev()->vnext(); ppptr = patchMap.at(pfvp); - - p00 = pptr->getControlPoint(2, 0); p01 = npptr->getControlPoint(2, 0); - p10 = pptr->getControlPoint(3, 1); p11 = npptr->getControlPoint(3, 1); - ip = intersectCoplanarLines(p00, p01, p10, p11); - pptr->setControlPoint(3, 0, ip); - npptr->setControlPoint(3, 0, ip); - - p00 = pptr->getControlPoint(0, 2); p01 = ppptr->getControlPoint(0, 2); - p10 = pptr->getControlPoint(1, 3); p11 = ppptr->getControlPoint(1, 3); - ip = intersectCoplanarLines(p00, p01, p10, p11); - pptr->setControlPoint(0, 3, ip); - ppptr->setControlPoint(0, 3, ip); - - pptr->updateGLPointArray(); - npptr->updateGLPointArray(); - ppptr->updateGLPointArray(); - } -} diff --git a/topmodx/src/TMPatchFace.h b/topmodx/src/TMPatchFace.h deleted file mode 100644 index 3d7d27c..0000000 --- a/topmodx/src/TMPatchFace.h +++ /dev/null @@ -1,164 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TM_PATCH_FACE_HH_ -#define _TM_PATCH_FACE_HH_ - -#include "TMPatch.h" - -/* Class for a TopMod Bezier Face containing several Patches */ - -class TMPatchFace; -typedef TMPatchFace *TMPatchFacePtr; - -typedef list TMPatchFacePtrList; -typedef vector TMPatchFacePtrArray; - -typedef list TMPatchFaceList; -typedef vector TMPatchFaceArray; - -class TMPatchFace -{ -public: - // Default & 1-arg constructor - TMPatchFace(int psize = 4) : patchsize(psize), patcharray(), dlflface(nullptr) - { - } - - // Destructor - ~TMPatchFace() {} - - // Copy constructor - TMPatchFace(const TMPatchFace& tmpf) - : patchsize(tmpf.patchsize), patcharray(tmpf.patcharray), dlflface(tmpf.dlflface) - { - } - - // Assignment operator - TMPatchFace& operator = (const TMPatchFace& tmpf) - { - patchsize = tmpf.patchsize; patcharray = tmpf.patcharray; dlflface = tmpf.dlflface; - return (*this); - } - - // Resize all patches - void resizePatches(int psize); - - // Set the DLFLFace pointer - void setDLFLFace(DLFLFacePtr fp) - { - dlflface = fp; - resizePatchArray(); - } - - // Create the patches using face information - void createPatches(TMPatchMap &patchMap); - - // Adjust the edge points for each patch in the face - void adjustEdgePoints(TMPatchMap &patchMap); - - // Compute lighting for the patches in this face - void computeLighting(LightPtr lightptr) - { - DLFLMaterialPtr matl; - for (uint i = 0; i < patcharray.size(); ++i) - { - matl = dlflface->material(); - patcharray[i].computeLighting(matl->color, matl->Ka, matl->Kd, matl->Ks, lightptr); - } - } - - // Render the patches using filled polygons - void render(void) - { - for (uint i = 0; i < patcharray.size(); ++i) - { - patcharray[i].render(); - } - } - - // Render the patches using outlined polygons - void outline(void) - { - for (uint i = 0; i < patcharray.size(); ++i) patcharray[i].outline(); - } - - // Render the boundaries of the patches - void patch_boundary(void) - { - for (uint i = 0; i < patcharray.size(); ++i) patcharray[i].patch_boundary(); - } - - // Render the boundaries of the patches - void face_boundary(void) - { - for (uint i = 0; i < patcharray.size(); ++i) patcharray[i].face_boundary(); - } - - // Render the control grids of the patches - void controlgrid(void) - { - for (uint i = 0; i < patcharray.size(); ++i) patcharray[i].controlgrid(); - } - - // Show the conrtol points - void controlpoints(void) - { - for (uint i = 0; i < patcharray.size(); ++i) patcharray[i].controlpoints(); - } - - // Show the normals - void renderNormals(void) - { - for (uint i = 0; i < patcharray.size(); ++i) patcharray[i].renderNormals(); - } - - /* stuart - bezier export */ - int print(ostream &stream) - { - for (int i = 0; i < patcharray.size(); i++) - { - patcharray[i].printControlPoints(stream); - stream << std::endl; - } - return patcharray.size(); - } - -protected: - // Resize the patch array depending on number of corners in the DLFLFace - void resizePatchArray(void); - -protected: - int patchsize; // Grid size of each patch in the face - TMPatchArray patcharray; // Array of Bezier patches for this face - DLFLFacePtr dlflface; // DLFLFace associated with this Bezier face - -}; - -#endif /* #ifndef _TM_PATCH_FACE_HH_ */ - diff --git a/topmodx/src/TMPatchObject.cc b/topmodx/src/TMPatchObject.cc deleted file mode 100644 index 0b6a3be..0000000 --- a/topmodx/src/TMPatchObject.cc +++ /dev/null @@ -1,276 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "TMPatchObject.h" - -void TMPatchObject::updateForPatches(DLFLObjectPtr obj) -{ - DLFLFacePtrList face_list = obj->getFaceList(); - DLFLEdgePtrList edge_list = obj->getEdgeList(); - DLFLVertexPtrList vertex_list = obj->getVertexList(); - - // Update information stored at each face, vertex, edge and corner for patch rendering - - // Compute doo-sabin coordinates for each face and store them in the auxcoord field of the corner - // Update the auxcoord field of the face - Vector3dArray coords; - DLFLFacePtrList::iterator ffirst = face_list.begin(), flast = face_list.end(); - DLFLFacePtr fp; - DLFLFaceVertexPtrArray corners; - int valence; - - while (ffirst != flast) - { - fp = *ffirst; ++ffirst; - fp->getCornersAndCoords(corners, coords); - valence = coords.size(); - - if (valence > 0) - { - // Compute Doo-Sabin coordinates - Level 1 - DLFL::computeDooSabinCoords(coords); - for (int i = 0; i < valence; ++i) - corners[i]->setAuxCoords(coords[i]); - - // Compute Doo-Sabin coordinates - Level 2 - DLFL::computeDooSabinCoords(coords); - for (int i = 0; i < valence; ++i) - corners[i]->setDS2Coord2(coords[i]); - - // Compute the patch point and patch normal - Vector3d pp, pn; - DLFL::computeCentroidAndNormal(coords, pp, pn); - fp->setAuxCoords(pp); fp->setAuxNormal(pn); - } - } - - // Compute patch point and normal for all edges - DLFLEdgePtrList::iterator efirst = edge_list.begin(), elast = edge_list.end(); - DLFLEdgePtr ep; - while (efirst != elast) - { - ep = *efirst; ++efirst; - - Vector3dArray p; - ep->getEFCornersAuxCoords(p); - - // Compute Doo-Sabin coordinates - Level 2 - DLFL::computeDooSabinCoords(p); - - Vector3d pp, pn; - computeCentroidAndNormal(p, pp, pn); - ep->setAuxCoords(pp); ep->setAuxNormal(pn); - - DLFLFaceVertexPtrArray fvp; - ep->getEFCorners(fvp); - fvp[0]->setDS2Coord3(p[0]); fvp[1]->setDS2Coord1(p[1]); - fvp[2]->setDS2Coord3(p[2]); fvp[3]->setDS2Coord1(p[3]); - } - - // Compute patch point and normal for all vertices - DLFLVertexPtrList::iterator vfirst = vertex_list.begin(), vlast = vertex_list.end(); - DLFLVertexPtr vp; - while (vfirst != vlast) - { - vp = *vfirst; ++vfirst; - Vector3dArray p; - vp->getOrderedCornerAuxCoords(p); - - // Compute Doo-Sabin coordinates - Level 2 - DLFL::computeDooSabinCoords(p); - - Vector3d pp, pn; - DLFL::computeCentroidAndNormal(p, pp, pn); - vp->setAuxCoords(pp); vp->setAuxNormal(-pn); // Reverse the normal since the rotation order around the vertex is clockwise - - DLFLFaceVertexPtrArray fvp; - vp->getOrderedCorners(fvp); - for (int i = 0; i < fvp.size(); ++i) - fvp[i]->setDS2Coord0(p[i]); - } -} - -void TMPatchObject::for_each(void (TMPatchFace::*func)(void)) -{ - for (it = patch_list.begin(); it != patch_list.end(); it++) - { - TMPatchFacePtr pfp = *it; - (pfp->*func)(); - } -} - -// Free the memory allocated for the patches -void TMPatchObject::destroyPatches() -{ - TMPatchFacePtrList::iterator first = patch_list.begin(), last = patch_list.end(); - TMPatchFacePtr pfp = nullptr; - while (first != last) - { - pfp = (*first); ++first; - delete pfp; - } - patch_list.clear(); -} - -// Build the list of patch faces -void TMPatchObject::createPatches(DLFLObjectPtr obj) -{ - destroyPatches(); - destroyPatchMap(patchMap); - DLFLFacePtrList face_list = obj->getFaceList(); - DLFLFacePtrList::iterator ffirst = face_list.begin(), flast = face_list.end(); - DLFLFacePtr fp = nullptr; - TMPatchFacePtr pfp = nullptr; - - while (ffirst != flast) - { - fp = (*ffirst); ++ffirst; - pfp = new TMPatchFace(patchsize); - pfp->setDLFLFace(fp); - pfp->createPatches(patchMap); - patch_list.push_back(pfp); - } - - // Adjust the edge points for all patches - DLFLEdgePtrList edge_list = obj->getEdgeList(); - DLFLEdgePtrList::iterator efirst = edge_list.begin(), elast = edge_list.end(); - DLFLEdgePtr ep = nullptr; - DLFLFaceVertexPtr fvp1, fvp2; - TMPatchPtr pp1, pp2; - Vector3d p00, p01, p10, p11, ip; - while (efirst != elast) - { - ep = (*efirst); ++efirst; - ep->getCorners(fvp1, fvp2); - pp1 = patchMap.at(fvp1); - pp2 = patchMap.at(fvp2); - - if (pp1 == nullptr || pp2 == nullptr) - return; - - p00 = pp1->getControlPoint(2, 0); - p01 = pp2->getControlPoint(2, 0); - p10 = pp1->getControlPoint(3, 1); - p11 = pp2->getControlPoint(3, 1); - ip = intersectCoplanarLines(p00, p01, p10, p11); - - pp1->setControlPoint(3, 0, ip); pp2->setControlPoint(3, 0, ip); - pp1->updateGLPointArray(); pp2->updateGLPointArray(); - - pp1 = patchMap.at(fvp1->next()); - pp2 = patchMap.at(fvp2->next()); - pp1->setControlPoint(0, 3, ip); pp2->setControlPoint(0, 3, ip); - pp1->updateGLPointArray(); pp2->updateGLPointArray(); - } - - // Adjust the vertex points for 4-valence vertices - DLFLVertexPtrList vertex_list = obj->getVertexList(); - DLFLVertexPtrList::iterator vfirst = vertex_list.begin(), vlast = vertex_list.end(); - DLFLVertexPtr vp = nullptr; - while (vfirst != vlast) - { - vp = (*vfirst); ++vfirst; - if (vp->valence() == 4) - { - DLFLFaceVertexPtrArray vcorners; - vp->getOrderedCorners(vcorners); - pp1 = patchMap.at(vcorners[0]); - pp2 = patchMap.at(vcorners[2]); - - p00 = pp1->getControlPoint(1, 0); p01 = pp2->getControlPoint(1, 0); - p10 = pp1->getControlPoint(0, 1); p11 = pp2->getControlPoint(0, 1); - ip = intersectCoplanarLines(p00, p01, p10, p11); - - for (int i = 0; i < 4; ++i) - { - pp1 = patchMap.at(vcorners[i]); - pp1->setControlPoint(0, 0, ip); - pp1->updateGLPointArray(); - } - } - } - - /* - TMPatchFacePtrList::iterator pfirst = patch_list.begin(), plast = patch_list.end(); - while ( pfirst != plast ) { - pfp = (*pfirst); ++pfirst; - pfp->adjustEdgePoints(patchMap); - } - */ -} - -void TMPatchObject::setPatchSize(int size, DLFLObjectPtr obj) -{ - if (size != patchsize && size > 0) - { - patchsize = size; - if (!obj) { obj = mObj; } - if (!obj) { return; } - createPatches(obj); - } -} - -/* stuart - bezier export */ -void TMPatchObject::objPatchWrite(ostream& o) -{ - o << "g patches" << std::endl - << "mg 1 0.5" << std::endl << std::endl; - TMPatchFacePtrList::const_iterator first = patch_list.begin(), last = patch_list.end(); - int i = 0; - int v = 0; - while (first != last) - { - o << "# Face " << i + 1 << std::endl; - int npatches = (*first)->print(o); - int j = 0; - while (j < npatches) - { - o << "# Patch" << i + j + 1 << std::endl; - o << "cstype bezier" << std::endl - << "deg 3 3" << std::endl - << "surf 0.000000 1.000000 0.000000 1.000000 " - << 1 + v << " " << 2 + v << " " << 3 + v << " " << 4 + v << " " - << 5 + v << " " << 6 + v << " " << 7 + v << " " << 8 + v << " " - << 9 + v << " " << 10 + v << " " << 11 + v << " " << 12 + v << " " - << 13 + v << " " << 14 + v << " " << 15 + v << " " << 16 + v - << std::endl - << "parm u 0.000000 1.000000" << std::endl - << "parm v 0.000000 1.000000" << std::endl - << "end" << std::endl << std::endl; - j++; - v += 16; - } - ++first; - i++; - } -} diff --git a/topmodx/src/TMPatchObject.h b/topmodx/src/TMPatchObject.h deleted file mode 100644 index b16278d..0000000 --- a/topmodx/src/TMPatchObject.h +++ /dev/null @@ -1,185 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TM_PATCH_OBJECT_HH_ -#define _TM_PATCH_OBJECT_HH_ - -#include "TMPatchFace.h" - -class TMPatchObject; -typedef TMPatchObject* TMPatchObjectPtr; - -class TMPatchObject -{ -public: - // Default constructor - TMPatchObject(uint id) : uid(id), patch_list(), patchsize(4) {} - // Destructor - ~TMPatchObject() { destroyPatches(); destroyPatchMap(patchMap); } - - uint id() { return uid; }; - int size() { return patchsize; }; - const TMPatchFacePtrList& list() { return patch_list; }; - void for_each(void (TMPatchFace::*func)(void)); - - /* stuart - bezier export */ - void objPatchWrite(ostream& o); - - // Set the patch size - void setPatchSize(int size, DLFLObjectPtr obj = nullptr); - - void updateForPatches(DLFLObjectPtr obj); - - // Update the patches - void updatePatches(DLFLObjectPtr obj = nullptr) - { - if (!obj) { obj = mObj; } - if (!obj) { return; } // never set an obj to update - updateForPatches(obj); - createPatches(obj); - } - - // Render the patches - void renderPatches(void) - { - glPushMatrix(); - transform(); - for_each(&TMPatchFace::render); - glPopMatrix(); - } - - // Render the object using wireframe patches - void renderWireframePatches(void) - { - glPushMatrix(); - transform(); - //for_each(face_list.begin(), face_list.end(), outline); - for_each(&TMPatchFace::outline); - glPopMatrix(); - } - - // Render the object using point patches - void renderPointPatches(void) - { - glPushMatrix(); - transform(); - //for_each(face_list.begin(), face_list.end(), controlpoints); - for_each(&TMPatchFace::controlpoints); - glPopMatrix(); - } - - void renderPatchBoundaries(void) - { - glPushMatrix(); - transform(); - //for_each(patch_list.begin(), patch_list.end(), tmpf_patch_boundary); - for_each(&TMPatchFace::patch_boundary); - glPopMatrix(); - } - - void renderPatchFaceBoundaries(void) - { - glPushMatrix(); - transform(); - //for_each(patch_list.begin(), patch_list.end(), tmpf_face_boundary); - for_each(&TMPatchFace::face_boundary); - glPopMatrix(); - } - - void renderPatchNormals(void) - { - glPushMatrix(); - transform(); - //for_each(patch_list.begin(), patch_list.end(), tmpf_render_normals); - for_each(&TMPatchFace::renderNormals); - glPopMatrix(); - } - - // Compute lighting for patches and the base object - void computeLighting(DLFLObjectPtr obj, LightPtr lightptr) - { - cout << "TMPatchObject::computeLighting" << endl; - computeLighting(obj, lightptr); - TMPatchFacePtrList::iterator first = patch_list.begin(), last = patch_list.end(); - TMPatchFacePtr pfp = nullptr; - while (first != last) - { - pfp = (*first); ++first; - pfp->computeLighting(lightptr); - } - } - - /* stuart - bezier export */ - void printPatchCVList() const - { - cout << "Patch CVs" << endl; - TMPatchFacePtrList::const_iterator first = patch_list.begin(), last = patch_list.end(); - while (first != last) - { - (*first)->print(cout); - ++first; - } - } - - void transform() - { - double mat[16]; - mObj->tr.fillArrayColumnMajor(mat); - glMultMatrixd(mat); - } - -protected: - // Free the memory allocated for the patches - void destroyPatches(); - // Build the list of patch faces - void createPatches(DLFLObjectPtr obj); - -private: - // Copy constructor - private to prevent access - TMPatchObject(const TMPatchObject& tmpo) - : patch_list(), patchsize(tmpo.patchsize) - { - } - - // Assignment operator - private to prevent access - void operator=(const TMPatchObject& tmpo) {} - -protected: - uint uid; - TMPatchFacePtrList patch_list; // List of patch faces - TMPatchFacePtrList::iterator it; - int patchsize; // Size of each patch - - DLFLObjectPtr mObj; // the last obj created from - - TMPatchMap patchMap; -}; - - -#endif /* #ifndef _TM_PATCH_OBJECT_HH_ */ - diff --git a/topmodx/src/TdxDeviceWrappers.cc b/topmodx/src/TdxDeviceWrappers.cc deleted file mode 100644 index abbad58..0000000 --- a/topmodx/src/TdxDeviceWrappers.cc +++ /dev/null @@ -1,237 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/* - * @file TdxDeviceEvents.c - * @brief Wrappers for 3Dx driver events and callbacks - * - * Copyright (c) 1998-2007 3Dconnexion. All rights reserved. - * - * Permission to use, copy, modify, and distribute this software for all - * purposes and without fees is hereby granted provided that this copyright - * notice appears in all copies. Permission to modify this software is granted - * and 3Dconnexion will support such modifications only if said modifications - * are approved by 3Dconnexion. - * - */ - -#ifdef WITH_SPACENAV - -#include -#include -#include - -#include "TdxDeviceWrappers.h" - - /* ========================================================================== */ -#pragma mark * Data structures * - -typedef struct -{ - UInt16 clientID; /* ID assigned by the driver */ - Boolean showClientEventsOnly; - EventQueueRef mainEventQueue; -} TdxDeviceWrapperInfo, *TdxDeviceWrapperInfoPtr; - -/* ========================================================================== */ -#pragma mark * Global variables Initialization * - -TdxDeviceWrapperInfo gDevWrapperInfo; - -/* ========================================================================== */ -#pragma mark * Function prototypes * - -static void tdx_drv_handler( - io_connect_t connection, natural_t messageType, void *messageArgument); - -/* ========================================================================== */ -#pragma mark - -#pragma mark * Façade of 3DconnexionClient framework APIs * - -/* -------------------------------------------------------------------------- */ -long TdxInitDevice(UInt32 appID, Boolean showOnlyMyClientEvents, UInt16 mode, UInt32 mask) -{ - - OSStatus err; - gDevWrapperInfo.showClientEventsOnly = showOnlyMyClientEvents; - - /* must save the main event queue while we're running within the main - thread. GetMainEventQueue() is not thread-safe and will cause big - problems if called from the spawned thread. */ - gDevWrapperInfo.mainEventQueue = GetMainEventQueue(); - - /* make sure the framework is installed */ - if (InstallConnexionHandlers == nullptr) - { - printf("3Dconnexion framework not found!\n"); - return -1; - } - - /* install 3dx message handler in order to receive driver events */ - err = InstallConnexionHandlers(tdx_drv_handler, 0L, 0L); - assert(err == 0); - if (err) return err; - - /* register our app with the driver */ - // err = TdxInitDevice('3Dm1', TRUE, kConnexionClientModeTakeOver, (kConnexionMaskAxis | kConnexionMaskButtons)); - // gDevWrapperInfo.clientID = RegisterConnexionClient(appID, (UInt8*)"\pTopMod", mode, mask); - gDevWrapperInfo.clientID = RegisterConnexionClient('TopM', (UInt8*)"\pTopMod", kConnexionClientModeTakeOver, kConnexionMaskAll); - if (gDevWrapperInfo.clientID == 0) return -2; - - printf("3Dconnexion device initialized. Client ID: %d\n", gDevWrapperInfo.clientID); - - return err; -} - -/* -------------------------------------------------------------------------- */ -void TdxTerminateDevice() -{ - UInt16 wasConnexionOpen = gDevWrapperInfo.clientID; - - /* make sure the framework is installed */ - if (InstallConnexionHandlers == nullptr) - return; - - /* close the connection with the 3dx driver */ - if (wasConnexionOpen) - UnregisterConnexionClient(gDevWrapperInfo.clientID); - CleanupConnexionHandlers(); - - fprintf(stderr, "Terminated connection with 3Dconnexion device.\n"); -} - -#pragma mark - -#pragma mark * Static functions implementation * - -/* ---------------------------------------------------------------------------- -Handler for driver events. This function is able to handle the events in -different ways: (1) re-package the events as Carbon events, (2) compute -them directly, (3) write the event info in a shared memory location for -usage by reader threads. -*/ -static void tdx_drv_handler(io_connect_t connection, natural_t messageType, void *messageArgument) -{ - - ConnexionDeviceStatePtr msg = (ConnexionDeviceStatePtr)messageArgument; - static UInt16 lastBtnPressed = 0; - - switch (messageType) - { - case kConnexionMsgDeviceState: - /* Device state messages are broadcast to all clients. It is up to - * the client to figure out if the message is meant for them. This - * is done by comparing the "client" id sent in the message to our - * assigned id when the connection to the driver was established. - * - * There is a special mode wherein all events are sent to this - * client regardless if it was meant for it or not. This mode is - * determined by the showClientEventOnly flag. - */ - if (!gDevWrapperInfo.showClientEventsOnly || msg->client == gDevWrapperInfo.clientID) - { - switch (msg->command) - { - case kConnexionCmdHandleAxis: - { - static SInt16 zerodata[] = { 0, 0, 0, 0, 0, 0 }; - static Boolean isZero = FALSE, wasZero; - - wasZero = isZero; - if (isZero == (memcmp(msg->axis, zerodata, sizeof(zerodata)) == 0)) - { - if (wasZero == FALSE) - TdxComputeEventZero(); - } - else - { - TdxComputeAxes(msg->axis); - } - break; - } - - case kConnexionCmdHandleButtons: - { - SInt16 buttonState; - - if (msg->value == 0) - { - buttonState = 0; - } - else - { - lastBtnPressed = msg->buttons; - buttonState = 1; - } - - TdxComputeButtons(lastBtnPressed, buttonState); - break; - } - - default: - break; - - } /* switch */ - } - - break; - - default: - /* other messageTypes can happen and should be ignored */ - break; - } - - printf("connection: %X\n", connection); - printf("messageType: %X\n", messageType); - printf("version: %d\n", msg->version); - printf("front app client: %d ourID: %d\n", - msg->client, gDevWrapperInfo.clientID); - printf("command: %u\n", msg->command); - printf("value: %ld\n", msg->value); - printf("param: %hd\n", msg->param); - for (int i = 0; i<8; i++) - printf("report[%d]: %d\n", i, msg->report[i]); - printf("buttons: %d\n", msg->buttons); - printf("TX: %d\n", msg->axis[0]); - printf("TY: %d\n", msg->axis[1]); - printf("TZ: %d\n", msg->axis[2]); - printf("RX: %d\n", msg->axis[3]); - printf("RY: %d\n", msg->axis[4]); - printf("RZ: %d\n", msg->axis[5]); - printf("-----------------------------------------\n\n"); - //*/ -#ifdef __MWERKS__ -#pragma unused(connection) -#endif -} - -#endif diff --git a/topmodx/src/TdxDeviceWrappers.h b/topmodx/src/TdxDeviceWrappers.h deleted file mode 100644 index 611d97f..0000000 --- a/topmodx/src/TdxDeviceWrappers.h +++ /dev/null @@ -1,146 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* - * @file TdxDeviceWrappers.h - * @brief Wrappers for 3Dx driver events and callbacks - * - * Copyright (c) 1998-2007 3Dconnexion. All rights reserved. - * - * Permission to use, copy, modify, and distribute this software for all - * purposes and without fees is hereby granted provided that this copyright - * notice appears in all copies. Permission to modify this software is granted - * and 3Dconnexion will support such modifications only if said modifications - * are approved by 3Dconnexion. - * - */ - -#ifdef WITH_SPACENAV - -#ifndef __TdxDeviceWrappers_h__ -#define __TdxDeviceWrappers_h__ - -#include "3DconnexionClient/ConnexionClientAPI.h" - -// setenv MACOSX_DEPLOYMENT_TARGET 10.2 - -#ifdef __cplusplus -extern "C" { -#endif - - // setenv(MACOSX_DEPLOYMENT_TARGET,10.2,1); - - /* ========================================================================== */ -#pragma mark * Weakly linked symbols * - - /* Weak link 3Dx framework so this app can run without crashing even on - * systems that don't have the 3Dx driver installed. For more info on - * weak linking, see: - * http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html - */ - // extern OSErr InstallConnexionHandlers() __attribute__((weak_import)); - - /* ========================================================================== */ -#pragma mark * 3Dx Types * - -/* 3Dconnexion event class */ - enum - { - kEventClassTdxDevice = 'tdxE' - }; - - /* 3Dconnexion event kinds */ - typedef enum - { - kTdxDeviceEventButton = 1, - kTdxDeviceEventMotion, - kTdxDeviceEventZero, - } TdxDeviceEventKind; - - /* 3Dconnexion event parameters */ - typedef enum - { - kEventParamTX = 'Tpnx', /* typeSInt16 */ - kEventParamTY = 'Tpny', /* typeSInt16 */ - kEventParamTZ = 'Tpnz', /* typeSInt16 */ - kEventParamRX = 'Trtx', /* typeSInt16 */ - kEventParamRY = 'Trty', /* typeSInt16 */ - kEventParamRZ = 'Trtz', /* typeSInt16 */ - kEventParamButtonID = 'Tbtn', /* typeSInt16 */ - kEventParamButtonDown = 'Tbts', /* typeSInt16 */ - } TdxDeviceEventParam; - - typedef SInt16 TdxDeviceAxes[6]; - - /* ========================================================================== */ - // #pragma mark * Façade of 3DconnexionClient framework APIs * - - /** Initialization routine for starting a data link to the 3Dconnexion driver. - * @param appID signature of the parent application calling this function - * @param showOnlyMyClientEvents this flag determines whether only events - * meant for this registered client are - * processed or if all events from the device - * will be sent to this client - * @param mode possible values are kConnexionClientModeTakeOver or - * kConnexionClientModePlugin - * @param mask Possible values are kConnexionMask* as listed - * in ConnexionClient.h - */ - long TdxInitDevice(UInt32 appID, Boolean showOnlyMyClientEvents, UInt16 mode, UInt32 mask); - - /** Cleanup rountine to close down the data link with the driver */ - void TdxTerminateDevice(); - - /* ========================================================================== */ -#pragma mark * Wrapper Callbacks * - - /******************************************************************************* - * Clients will need to define the callbacks below. - * These callbacks are invoked by our wrappers. - ******************************************************************************/ - - /** Callback for processing the axes data. - * @param inArrayPtr Array with translations and rotations data */ - extern int TdxComputeAxes(const TdxDeviceAxes inArrayPtr); - - /** Callback for processing a "release knob" event. */ - extern int TdxComputeEventZero(); - - /** Callback for processing the button data. - * @param currentButtonState '1' if any button is held down, '0' otherwise. - * @param lastBtnPressed Buttons mask: 1 = btn1, 2 = btn2, 3 = btn1&btn2 - */ - extern int TdxComputeButtons(UInt16 lastBtnPressed, SInt16 currentButtonState); - -#ifdef __cplusplus -} -#endif - -#endif - -#endif \ No newline at end of file diff --git a/topmodx/src/TexturingMode.cc b/topmodx/src/TexturingMode.cc deleted file mode 100644 index 0b0ed30..0000000 --- a/topmodx/src/TexturingMode.cc +++ /dev/null @@ -1,151 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ -#include - -#include "TexturingMode.h" - - /*! - \ingroup gui - @{ - - \class TexturingMode - \brief Texturing Operations GUI elements. - - \note - - \see TexturingMode - */ - - /*! - * \brief Constructor - * - * @param parent the MainWindow widget - * @param sm the shortcut manager class for adding a custom shortcut to each menu action or icon - * @param actionList the master list of actions for use with the CommandCompleter class - * - */ -TexturingMode::TexturingMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList) - : QWidget(parent) -{ - setParent(0); - mParent = parent; - - mTileTexturingWidget = new QWidget; - setupTileTexturing(); - - mTileTexturingAction = new QAction(tr("Tile Texturing"), this); - mTileTexturingAction->setIcon(QIcon(":images/mode_texturing.png")); - mTileTexturingAction->setCheckable(true); - sm->registerAction(mTileTexturingAction, "Texturing Operations", ""); - mTileTexturingAction->setStatusTip(tr("Enter Tile Texturing Mode")); - mTileTexturingAction->setToolTip(tr("Tile Texturing Mode")); - connect(mTileTexturingAction, SIGNAL(triggered()), this, SLOT(triggerTileTexturing())); - actionList->addAction(mTileTexturingAction); -} - -QMenu* TexturingMode::getMenu() -{ - mTexturingMenu = new QMenu(tr("Texturing")); - - mTexturingMenu->addAction(mTileTexturingAction); - - return mTexturingMenu; -} - -void TexturingMode::triggerTileTexturing() -{ - ((MainWindow*)mParent)->setToolOptions(mTileTexturingWidget); - ((MainWindow*)mParent)->setMode(MainWindow::NormalMode); - -} - -void TexturingMode::addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget) -{ - actionGroup->addAction(mTileTexturingAction); - toolBar->addAction(mTileTexturingAction); - stackedWidget->addWidget(mTileTexturingWidget); - -} - -QDoubleSpinBox *TexturingMode::createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col) -{ - label->setText(s); - QDoubleSpinBox *spinbox = new QDoubleSpinBox(this); - spinbox->setAccelerated(true); - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(75, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - - return spinbox; -} - -void TexturingMode::setupTileTexturing() -{ - mTileTexturingLayout = new QGridLayout; - mTileTexturingLayout->setVerticalSpacing(1); - mTileTexturingLayout->setHorizontalSpacing(1); - // mTileTexturingLayout->setMargin(0); - - tileTexturingNumTilesLabel = new QLabel(this); - tileTexturingNumTilesSpinBox = createDoubleSpinBox(mTileTexturingLayout, tileTexturingNumTilesLabel, tr("Tiling Number"), 2, 8, 1, 2, 0, 0, 0); - connect(tileTexturingNumTilesSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(changeTileTexNum(double))); - - tileTexturingAssignButton = new QPushButton(tr("Assign Texture\nCoordinates"), this); - connect(tileTexturingAssignButton, SIGNAL(clicked()), ((MainWindow*)mParent), SLOT(assignTileTexCoords())); - mTileTexturingLayout->addWidget(tileTexturingAssignButton, 1, 0, 1, 2); - - mTileTexturingLayout->setRowStretch(2, 1); - mTileTexturingLayout->setColumnStretch(2, 1); - mTileTexturingWidget->setWindowTitle(tr("Tile Texturing")); - mTileTexturingWidget->setLayout(mTileTexturingLayout); -} - -void TexturingMode::retranslateUi() -{ - mTexturingMenu->setTitle(tr("Texturing")); - mTileTexturingAction->setText(tr("Tile Texturing")); - mTileTexturingAction->setStatusTip(tr("Enter Tile Texturing Mode")); - mTileTexturingAction->setToolTip(tr("Tile Texturing Mode")); - // tileTexturingNumTilesLabel->setText(tr("Tiling Number")); - tileTexturingAssignButton->setText(tr("Assign Texture\nCoordinates")); - mTileTexturingWidget->setWindowTitle(tr("Tile Texturing")); -} diff --git a/topmodx/src/TexturingMode.h b/topmodx/src/TexturingMode.h deleted file mode 100644 index 34e7c78..0000000 --- a/topmodx/src/TexturingMode.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ - -#ifndef TEXTURINGMODE_H -#define TEXTURINGMODE_H - -#include - -#include -#include -#include - -/*! -\file TexturingMode.hh -\brief Definition of the TexturingMode class - -\see TexturingMode -*/ - -#include "MainWindow.h" -class MainWindow; - -class TexturingMode : public QWidget -{ - Q_OBJECT - -public: - TexturingMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); - void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); - QMenu *getMenu(); - void retranslateUi(); - - QAction *mTileTexturingAction; - QWidget *mTileTexturingWidget; - -protected: - void setupTileTexturing(); - QDoubleSpinBox *createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col); - - - public slots: - void triggerTileTexturing(); - -private: - - QWidget *mParent; - QMenu *mTexturingMenu; - QDoubleSpinBox *tileTexturingNumTilesSpinBox; - QLabel *tileTexturingNumTilesLabel; - QPushButton *tileTexturingAssignButton; - - QGridLayout *mTileTexturingLayout; - -}; - -#endif diff --git a/topmodx/src/TopMod.cc b/topmodx/src/TopMod.cc deleted file mode 100644 index 8a486e3..0000000 --- a/topmodx/src/TopMod.cc +++ /dev/null @@ -1,80 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "TopMod.h" - -TopMod::~TopMod() -{ -} - -TopMod::TopMod(int & argc, char ** argv, bool GUIenabled) - : QApplication(argc, argv, GUIenabled) -{ - setApplicationName("TopMod"); - - mainWindow = new MainWindow(); - - QString locale = QLocale::system().name(); - QTranslator translator; - translator.load(QString(":/topmod_") + locale); - installTranslator(&translator); - - processEvents(); - - mainWindow->resize(1280, 800); - mainWindow->show(); -} - -MainWindow *TopMod::getMainWindow() -{ - return mainWindow; -} - -bool TopMod::event(QEvent *event) -{ - switch (event->type()) - { - case 116:// case QEvent::FileOpen: - mainWindow->loadFile(static_cast(event)->file()); - return true; - default: - return QApplication::event(event); - }; -} - -// #ifdef __APPLE__ -// bool TopMod::macEventFilter( EventHandlerCallRef caller, EventRef event ){ -// // std::cout << event << "\n"; -// return false; -// } -// #endif diff --git a/topmodx/src/TopMod.h b/topmodx/src/TopMod.h deleted file mode 100644 index 3f8744a..0000000 --- a/topmodx/src/TopMod.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TOPMOD_H -#define _TOPMOD_H - -#include -#include -// -#include "MainWindow.h" - -class TopMod : public QApplication -{ - Q_OBJECT - -public: - TopMod(int & argc, char ** argv, bool GUIenabled); - ~TopMod(); - - MainWindow *getMainWindow(); - -//#ifdef __APPLE__ - // bool macEventFilter( EventHandlerCallRef caller, EventRef event ); -//#endif - -protected: - bool event(QEvent *event); - -private: - // void loadFile(const QString &fileName); - -private: - MainWindow *mainWindow; - -}; - -#endif diff --git a/topmodx/src/TopModPreferences.cc b/topmodx/src/TopModPreferences.cc deleted file mode 100644 index 91c2f1b..0000000 --- a/topmodx/src/TopModPreferences.cc +++ /dev/null @@ -1,811 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include "TopModPreferences.h" - -TopModPreferences::TopModPreferences(QSettings *settings, StyleSheetEditor *sse, QShortcutManager *sm, QWidget *parent) - : QDialog(parent) -{ - mSettings = settings; - mParent = parent; - setSizeGripEnabled(false); - resize(700, 600); - setFixedSize(700, 600); - setWindowTitle(tr("TopMod Preferences")); - // setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog); - - // mMainTab = new QWidget; - mStyleSheetsTab = sse; - mShortcutsManager = sm; - mShortcutsTab = sm->getShortcutDialog(); - - mPrefTabs = new QTabWidget; - //setup layouts - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(mPrefTabs); - QHBoxLayout *lowLayout = new QHBoxLayout; - mainLayout->addLayout(lowLayout, 1); - lowLayout->addStretch(1); - - mOkButton = new QPushButton(tr("OK")); - // mOkButton->setDefault(true); - connect(mOkButton, SIGNAL(clicked()), this, SLOT(saveSettings())); - mCancelButton = new QPushButton(tr("Cancel")); - connect(mCancelButton, SIGNAL(clicked()), this, SLOT(discardSettings())); - lowLayout->addWidget(mOkButton); - lowLayout->addWidget(mCancelButton); - setLayout(mainLayout); - - createTabs(); - readSettings(); - setupColors(); - setupMain(); -} - -TopModPreferences::~TopModPreferences() -{ -} - -int TopModPreferences::display() -{ - mShortcutsTab->exec(); - return exec(); -} - -void TopModPreferences::createTabs() -{ - mMainTab = new QWidget; - mColorsTab = new QWidget; - - mPrefTabs->addTab(mMainTab, tr("Main")); - mPrefTabs->addTab(mColorsTab, tr("Colors")); - mPrefTabs->addTab(((QWidget*)mShortcutsTab), tr("Shortcuts")); - mPrefTabs->addTab(mStyleSheetsTab, tr("Stylesheets")); -#ifdef WITH_PYTHON - mScriptEditTab = new QWidget; - mPrefTabs->addTab(mScriptEditTab, tr("Script Editor")); -#endif -} - - -void TopModPreferences::saveSettings() -{ - mSettings->beginGroup("Colors"); - mSettings->setValue("ViewportColor", mViewportColor); - mSettings->setValue("RenderColor", mRenderColor); - mSettings->setValue("CoolLightColor", mCoolLightColor); - mSettings->setValue("WarmLightColor", mWarmLightColor); - mSettings->setValue("WireframeColor", mWireframeColor); - mSettings->setValue("SilhouetteColor", mSilhouetteColor); - mSettings->setValue("PatchBoundaryColor", mPatchBoundaryColor); - mSettings->setValue("SelectedVertexColor", mSelectedVertexColor); - mSettings->setValue("SelectedEdgeColor", mSelectedEdgeColor); - mSettings->setValue("SelectedFaceColor", mSelectedFaceColor); - mSettings->setValue("VertexIDBgColor", mVertexIDBgColor); - mSettings->setValue("EdgeIDBgColor", mEdgeIDBgColor); - mSettings->setValue("NormalColor", mNormalColor); - mSettings->setValue("FaceCentroidColor", mFaceCentroidColor); - mSettings->setValue("FaceIDBgColor", mFaceIDBgColor); - mSettings->setValue("LightIntensity", mLightIntensity); - mSettings->endGroup(); - - mSettings->beginGroup("Display"); - mSettings->setValue("NormalThickness", mNormalThickness); - mSettings->setValue("FaceCentroidThickness", mFaceCentroidThickness); - mSettings->setValue("NormalLength", mNormalLength); - mSettings->setValue("SilhouetteThickness", mSilhouetteThickness); - mSettings->setValue("VertexThickness", mVertexThickness); - mSettings->setValue("SelectedVertexThickness", mSelectedVertexThickness); - mSettings->setValue("SelectedEdgeThickness", mSelectedEdgeThickness); - mSettings->endGroup(); - - mSettings->beginGroup("Camera"); - mSettings->setValue("NearPlane", mCameraNearPlaneSpinBox->value()); - mSettings->setValue("FarPlane", mCameraFarPlaneSpinBox->value()); - mSettings->setValue("Fov", mCameraFovSpinBox->value()); - mSettings->endGroup(); - - mSettings->beginGroup("Save Options"); - mSettings->setValue("SaveDirectory", mSaveDirectoryLineEdit->text()); - mSettings->setValue("AutoSave", mAutoSaveCheckBox->checkState()); - mSettings->setValue("AutoSaveDelay", mAutoSaveDelaySpinBox->value()); - mSettings->setValue("IncrementalSave", mIncrementalSaveCheckBox->checkState()); - mSettings->setValue("IncrementalSaveMax", mIncrementalSaveMaxSpinBox->value()); - mSettings->endGroup(); - - mSettings->beginGroup("MainWindow"); - mSettings->setValue("pos", ((MainWindow*)mParent)->pos()); - mSettings->setValue("size", ((MainWindow*)mParent)->size()); - // std::cout << "size = " << ((MainWindow*)mParent)->size().width(); - mSettings->setValue("showStartupDialogAtStartup", ((MainWindow*)mParent)->getShowStartupDialogAtStartup()); - mSettings->setValue("toolOptionsPos", ((MainWindow*)mParent)->mToolOptionsDockWidget->pos()); - mSettings->setValue("CommandCompleterIndex", mCommandCompleterIndexToggle->checkState()); - mSettings->setValue("SingleClickExtrude", mSingleClickExtrudeCheckBox->checkState()); - -#ifdef WITH_PYTHON - mSettings->setValue("scriptEditorPos", ((MainWindow*)mParent)->mScriptEditorDockWidget->pos()); - mSettings->setValue("scriptEditorSize", ((MainWindow*)mParent)->mScriptEditorDockWidget->size()); -#endif - mSettings->endGroup(); - - accept(); -} - -void TopModPreferences::readSettings() -{ - //load the settings file and set defaults if values don't exist - mSettings->beginGroup("Colors"); - mViewportColorDefault = QColor(67, 68, 88); //this is where you set defaults now. only one time in the code it - mViewportColor = mSettings->value("ViewportColor", mViewportColorDefault).value(); - mRenderColorDefault = QColor(255, 151, 92); - mRenderColor = mSettings->value("RenderColor", mRenderColorDefault).value(); - mCoolLightColorDefault = QColor(27, 26, 23); - mCoolLightColor = mSettings->value("CoolLightColor", mCoolLightColorDefault).value(); - mWarmLightColorDefault = QColor(255, 250, 226); - mWarmLightColor = mSettings->value("WarmLightColor", mWarmLightColorDefault).value(); - mWireframeColorDefault = QColor(0, 0, 0, 255); - mWireframeColor = mSettings->value("WireframeColor", mWireframeColorDefault).value(); - mSilhouetteColorDefault = QColor(0, 0, 0, 255); - mSilhouetteColor = mSettings->value("SilhouetteColor", mSilhouetteColorDefault).value(); - mPatchBoundaryColorDefault = QColor(0, 0, 0); - mPatchBoundaryColor = mSettings->value("PatchBoundaryColor", mPatchBoundaryColor).value(); - mSelectedVertexColorDefault = QColor(0, 255, 0, 127); - mSelectedVertexColor = mSettings->value("SelectedVertexColor", mSelectedVertexColorDefault).value(); - mSelectedEdgeColorDefault = QColor(255, 0, 0, 127); - mSelectedEdgeColor = mSettings->value("SelectedEdgeColor", mSelectedEdgeColorDefault).value(); - mSelectedFaceColorDefault = QColor(247, 0, 229, 127); - mSelectedFaceColor = mSettings->value("SelectedFaceColor", mSelectedFaceColorDefault).value(); - mVertexIDBgColorDefault = QColor(127, 0, 0, 127); - mVertexIDBgColor = mSettings->value("VertexIDBgColor", mVertexIDBgColorDefault).value(); - mEdgeIDBgColorDefault = QColor(0, 127, 0, 127); - mEdgeIDBgColor = mSettings->value("EdgeIDBgColor", mEdgeIDBgColorDefault).value(); - mNormalColorDefault = QColor(127, 127, 0); - mNormalColor = mSettings->value("NormalColor", mNormalColorDefault).value(); - mFaceCentroidColorDefault = QColor(127, 0, 127); - mFaceCentroidColor = mSettings->value("FaceCentroidColor", mFaceCentroidColorDefault).value(); - mFaceIDBgColorDefault = QColor(0, 0, 127, 127); - mFaceIDBgColor = mSettings->value("FaceIDBgColor", mFaceIDBgColorDefault).value(); - mSettings->endGroup(); - - mSettings->beginGroup("Display"); - mLightIntensityDefault = 2.0; - mLightIntensity = mSettings->value("LightIntensity", mLightIntensityDefault).toDouble(); - mWireframeThicknessDefault = 0.1; - mWireframeThickness = mSettings->value("WireframeThickness", mWireframeThicknessDefault).toDouble(); - mSilhouetteThicknessDefault = 6.0; - mSilhouetteThickness = mSettings->value("SilhouetteThickness", mSilhouetteThicknessDefault).toDouble(); - mVertexThicknessDefault = 5.0; - mVertexThickness = mSettings->value("VertexThickness", mVertexThicknessDefault).toDouble(); - mSelectedVertexThicknessDefault = 8.0; - mSelectedVertexThickness = mSettings->value("SelectedVertexThickness", mSelectedVertexThicknessDefault).toDouble(); - mSelectedEdgeThicknessDefault = 5.0; - mSelectedEdgeThickness = mSettings->value("SelectedEdgeThickness", mSelectedEdgeThicknessDefault).toDouble(); - mNormalThicknessDefault = 0.1; - mNormalThickness = mSettings->value("NormalThickness", mNormalThicknessDefault).toDouble(); - mNormalLengthDefault = 1.0; - mNormalLength = mSettings->value("NormalLength", mNormalLengthDefault).toDouble(); - mFaceCentroidThicknessDefault = 5.0; - mFaceCentroidThickness = mSettings->value("FaceCentroidThickness", mFaceCentroidThicknessDefault).toDouble(); - mSettings->endGroup(); - - mSettings->beginGroup("Camera"); - mCameraNearPlaneDefault = 1.0; - mCameraNearPlane = mSettings->value("NearPlane", mCameraNearPlaneDefault).toDouble(); - mCameraFarPlaneDefault = 200; - mCameraFarPlane = mSettings->value("FarPlane", mCameraFarPlaneDefault).toDouble(); - mCameraFovDefault = 60; - mCameraFov = mSettings->value("Fov", mCameraFovDefault).toDouble(); - mSettings->endGroup(); - - mSettings->beginGroup("Save Options"); - // std::cout<< QDir::currentPath().toLatin1().data() << "\n"; - // mSaveDirectory = QDir::currentPath(); - mSaveDirectoryDefault = QDir::currentPath(); - mSaveDirectory = mSettings->value("SaveDirectory", mSaveDirectoryDefault).toString(); - // std::cout<< mSaveDirectory.toLatin1().data() << "\n"; - mAutoSaveDefault = false; - mAutoSave = mSettings->value("AutoSave", mAutoSaveDefault).toBool(); - mAutoSaveDelayDefault = 5; - mAutoSaveDelay = mSettings->value("AutoSaveDelay", mAutoSaveDelayDefault).toDouble(); - mIncrementalSaveDefault = false; - mIncrementalSave = mSettings->value("IncrementalSave", mIncrementalSaveDefault).toBool(); - mIncrementalSaveMaxDefault = 20; - mIncrementalSaveMax = mSettings->value("IncrementalSaveMax", mIncrementalSaveMaxDefault).toDouble(); - mSettings->endGroup(); - - mSettings->beginGroup("MainWindow"); - QPoint pos = mSettings->value("pos", QPoint(100, 100)).toPoint(); - if (pos.y() == 0) pos.setY(pos.y() + 20); - QSize size = mSettings->value("size", QSize(800, 600)).toSize(); - QPoint toolOptionsPos = mSettings->value("toolOptionsPos", QPoint()).toPoint(); - - mCommandCompleterIndexDefault = false; - mCommandCompleterIndex = mSettings->value("CommandCompleterIndex", mCommandCompleterIndexDefault).toBool(); - - mSingleClickExtrudeDefault = false; - mSingleClickExtrude = mSettings->value("SingleClickExtrude", mSingleClickExtrudeDefault).toBool(); - -#ifdef WITH_PYTHON - QSize scriptEditorSize = mSettings->value("scriptEditorSize", QSize(500, 300)).toSize(); - QPoint scriptEditorPos = mSettings->value("scriptEditorPos", QPoint(20, QApplication::desktop()->height() - 500)).toPoint(); -#endif - mShowStartupDialogAtStartup = mSettings->value("showStartupDialogAtStartup", false).toBool(); - mSettings->endGroup(); - - ((MainWindow*)mParent)->resize(size.width(), size.height()); - ((MainWindow*)mParent)->move(pos); - ((MainWindow*)mParent)->setShowStartupDialogAtStartup((int)mShowStartupDialogAtStartup); - ((MainWindow*)mParent)->mToolOptionsDockWidget->setGeometry(10 + ((MainWindow*)mParent)->x(), ((MainWindow*)mParent)->y() + 150, ((MainWindow*)mParent)->mToolOptionsDockWidget->width(), ((MainWindow*)mParent)->mToolOptionsDockWidget->height()); -#ifdef WITH_PYTHON - ((MainWindow*)mParent)->mScriptEditorDockWidget->resize(scriptEditorSize.width(), scriptEditorSize.height()); - ((MainWindow*)mParent)->mScriptEditorDockWidget->move(scriptEditorPos); -#endif - - //initialize the settings - ((MainWindow*)mParent)->getActive()->setViewportColor(mViewportColor); - ((MainWindow*)mParent)->getActive()->setRenderColor(mRenderColor); - ((MainWindow*)mParent)->getActive()->setCoolLightColor(mCoolLightColor); - ((MainWindow*)mParent)->getActive()->setWarmLightColor(mWarmLightColor); - ((MainWindow*)mParent)->getActive()->setWireframeColor(mWireframeColor); - ((MainWindow*)mParent)->getActive()->setSilhouetteColor(mSilhouetteColor); - ((MainWindow*)mParent)->getActive()->setSelectedVertexColor(mSelectedVertexColor); - ((MainWindow*)mParent)->getActive()->setSelectedEdgeColor(mSelectedEdgeColor); - ((MainWindow*)mParent)->getActive()->setSelectedFaceColor(mSelectedFaceColor); - // ((MainWindow*)mParent)->getActive()->setPatchBoundaryColor(mPatchBoundaryColor); - ((MainWindow*)mParent)->getActive()->setVertexIDBgColor(mVertexIDBgColor); - ((MainWindow*)mParent)->getActive()->setEdgeIDBgColor(mEdgeIDBgColor); - ((MainWindow*)mParent)->getActive()->setNormalColor(mNormalColor); - ((MainWindow*)mParent)->getActive()->setFaceCentroidColor(mFaceCentroidColor); - ((MainWindow*)mParent)->getActive()->setFaceIDBgColor(mFaceIDBgColor); - ((MainWindow*)mParent)->getActive()->setFaceCentroidColor(mFaceCentroidColor); - ((MainWindow*)mParent)->getActive()->setNormalColor(mNormalColor); - ((MainWindow*)mParent)->getActive()->setNormalThickness(mNormalThickness); - ((MainWindow*)mParent)->getActive()->setFaceCentroidThickness(mFaceCentroidThickness); - ((MainWindow*)mParent)->getActive()->setNormalLength(mNormalLength); - ((MainWindow*)mParent)->getActive()->setWireframeThickness(mWireframeThickness); - ((MainWindow*)mParent)->getActive()->setSilhouetteThickness(mSilhouetteThickness); - ((MainWindow*)mParent)->getActive()->setVertexThickness(mVertexThickness); - ((MainWindow*)mParent)->getActive()->setSelectedVertexThickness(mSelectedVertexThickness); - ((MainWindow*)mParent)->getActive()->setSelectedEdgeThickness(mSelectedEdgeThickness); - - ((MainWindow*)mParent)->getActive()->setNearPlane(mCameraNearPlane); - ((MainWindow*)mParent)->getActive()->setFarPlane(mCameraFarPlane); - ((MainWindow*)mParent)->getActive()->setFOV(mCameraFov); - //save options - ((MainWindow*)mParent)->setSaveDirectory(mSaveDirectory); - ((MainWindow*)mParent)->setAutoSave(mAutoSave); - ((MainWindow*)mParent)->setAutoSaveDelay(mAutoSaveDelay); - ((MainWindow*)mParent)->setIncrementalSave(mIncrementalSave); - ((MainWindow*)mParent)->setIncrementalSaveMax(mIncrementalSaveMax); - ((MainWindow*)mParent)->setCommandCompleterIndexToggle(mCommandCompleterIndex); - ((MainWindow*)mParent)->setSingleClickExtrude(mSingleClickExtrude); - -} - -void TopModPreferences::discardSettings() -{ - reject(); -} - -void TopModPreferences::setButtonColor(QColor color, QPushButton *button) -{ - // color = c; - QPalette p = button->palette(); - p.setColor(QPalette::Button, color); - button->setPalette(p); -} - -/*! -* \brief load all the default settings and attach this as a signal for a reset button -*/ -void TopModPreferences::loadDefaults() -{ - mViewportColor = mViewportColorDefault; - ((MainWindow*)mParent)->getActive()->setViewportColor(mViewportColor); - setButtonColor(mViewportColor, mViewportColorButton); - - mRenderColor = mRenderColorDefault; - ((MainWindow*)mParent)->getActive()->setRenderColor(mRenderColor); - setButtonColor(mRenderColor, mRenderColorButton); - - mCoolLightColor = mCoolLightColorDefault; - ((MainWindow*)mParent)->getActive()->setCoolLightColor(mCoolLightColor); - setButtonColor(mCoolLightColor, mCoolLightColorButton); - - mWarmLightColor = mWarmLightColorDefault; - ((MainWindow*)mParent)->getActive()->setWarmLightColor(mWarmLightColor); - setButtonColor(mWarmLightColor, mWarmLightColorButton); - - mWireframeColor = mWireframeColorDefault; - ((MainWindow*)mParent)->getActive()->setWireframeColor(mWireframeColor); - setButtonColor(mWireframeColor, mWireframeColorButton); - - mSilhouetteColor = mSilhouetteColorDefault; - ((MainWindow*)mParent)->getActive()->setSilhouetteColor(mSilhouetteColor); - setButtonColor(mSilhouetteColor, mSilhouetteColorButton); - - mPatchBoundaryColor = mPatchBoundaryColorDefault; - // ((MainWindow*)mParent)->getActive()->setPatchBoundaryColor(mPatchBoundaryColor); - setButtonColor(mPatchBoundaryColor, mPatchBoundaryColorButton); - - mSelectedVertexColor = mSelectedVertexColorDefault; - ((MainWindow*)mParent)->getActive()->setSelectedVertexColor(mSelectedVertexColor); - setButtonColor(mSelectedVertexColor, mSelectedVertexColorButton); - - mSelectedEdgeColor = mSelectedEdgeColorDefault; - ((MainWindow*)mParent)->getActive()->setSelectedEdgeColor(mSelectedEdgeColor); - setButtonColor(mSelectedEdgeColor, mSelectedEdgeColorButton); - - mSelectedFaceColor = mSelectedFaceColorDefault; - ((MainWindow*)mParent)->getActive()->setSelectedFaceColor(mSelectedFaceColor); - setButtonColor(mSelectedFaceColor, mSelectedFaceColorButton); - - mVertexIDBgColor = mVertexIDBgColor; - ((MainWindow*)mParent)->getActive()->setVertexIDBgColor(mVertexIDBgColor); - setButtonColor(mVertexIDBgColor, mVertexIDBgColorButton); - - mNormalColor = mNormalColorDefault; - ((MainWindow*)mParent)->getActive()->setNormalColor(mNormalColor); - setButtonColor(mNormalColor, mNormalColorButton); - - mFaceCentroidColor = mFaceCentroidColorDefault; - ((MainWindow*)mParent)->getActive()->setFaceCentroidColor(mFaceCentroidColor); - setButtonColor(mFaceCentroidColor, mFaceCentroidColorButton); - - mFaceIDBgColor = mFaceIDBgColorDefault; - ((MainWindow*)mParent)->getActive()->setFaceIDBgColor(mFaceIDBgColor); - setButtonColor(mFaceIDBgColor, mFaceIDBgColorButton); - - mLightIntensity = mLightIntensityDefault; - mLightIntensitySpinBox->setValue(mLightIntensity); - - mWireframeThickness = mWireframeThicknessDefault; - mWireframeThicknessSpinBox->setValue(mWireframeThickness); - - mSilhouetteThickness = mSilhouetteThicknessDefault; - mSilhouetteThicknessSpinBox->setValue(mSilhouetteThickness); - - mNormalThickness = mNormalThicknessDefault; - mNormalThicknessSpinBox->setValue(mNormalThickness); - - mNormalLength = mNormalLengthDefault; - mNormalLengthSpinBox->setValue(mNormalLength); - - mFaceCentroidThickness = mFaceCentroidThicknessDefault; - mFaceCentroidThicknessSpinBox->setValue(mFaceCentroidThickness); - - mVertexThickness = mVertexThicknessDefault; - mVertexThicknessSpinBox->setValue(mVertexThickness); - - mSelectedVertexThickness = mSelectedVertexThicknessDefault; - mVertexThicknessSpinBox->setValue(mSelectedVertexThickness); - - mSelectedEdgeThickness = mSelectedEdgeThicknessDefault; - mSelectedEdgeThicknessSpinBox->setValue(mSelectedVertexThickness); - - - //camera stuff - mCameraNearPlane = mCameraNearPlaneDefault; - ((MainWindow*)mParent)->getActive()->setNearPlane(mCameraNearPlane); - - mCameraFarPlane = mCameraFarPlaneDefault; - ((MainWindow*)mParent)->getActive()->setFarPlane(mCameraFarPlane); - - mCameraFov = mCameraFovDefault; - ((MainWindow*)mParent)->getActive()->setFOV(mCameraFov); - - //save options! - mSaveDirectory = mSaveDirectoryDefault; - ((MainWindow*)mParent)->setSaveDirectory(mSaveDirectory); - - mAutoSave = mAutoSaveDefault; - ((MainWindow*)mParent)->setAutoSave(mAutoSave); - - mAutoSaveDelay = mAutoSaveDelayDefault; - ((MainWindow*)mParent)->setAutoSaveDelay(mAutoSaveDelay); - - mIncrementalSave = mIncrementalSaveDefault; - ((MainWindow*)mParent)->setIncrementalSave(mIncrementalSave); - - mIncrementalSaveMax = mIncrementalSaveMaxDefault; - ((MainWindow*)mParent)->setIncrementalSaveMax(mIncrementalSaveMax); - - mCommandCompleterIndex = mCommandCompleterIndexDefault; - ((MainWindow*)mParent)->setCommandCompleterIndexToggle(mCommandCompleterIndex); - - mSingleClickExtrude = mSingleClickExtrudeDefault; - ((MainWindow*)mParent)->setSingleClickExtrude(mSingleClickExtrude); -} - -void TopModPreferences::setupMain() -{ - QGridLayout *mMainLayout = new QGridLayout; - - // mResetCameraButton = new QPushButton(tr("Reset")); - // connect(mResetCameraButton,SIGNAL(clicked()), - // ((MainWindow*)mParent), SLOT(switchPerspView())); - - // mShowStartupDialogAtStartupCheckBox = new QCheckBox(tr("Show Tutorial Dialog at Startup")); - // mShowStartupDialogAtStartupCheckBox->setChecked(mShowStartupDialogAtStartup); - // connect(mShowStartupDialogAtStartupCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setShowStartupDialogAtStartup(int))); - - QStyle* colorPickerStyle = QStyleFactory::create("Fusion"); - QPalette p; - - //camera nearplane - mCameraNearPlaneSpinBox = addSpinBoxPreference(mCameraNearPlaneLabel, tr("Near Plane:"), 0.0, 100, 0.1, mCameraNearPlane, 1, mMainLayout, 0, 0); - connect(mCameraNearPlaneSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setNearPlane(double))); - - //camera farplane - mCameraFarPlaneSpinBox = addSpinBoxPreference(mCameraFarPlaneLabel, tr("Far Plane:"), 10, 1000, 0.1, mCameraFarPlane, 1, mMainLayout, 1, 0); - connect(mCameraFarPlaneSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setFarPlane(double))); - - //camera nearplane - mCameraFovSpinBox = addSpinBoxPreference(mCameraFovLabel, tr("Field of View:"), 15, 100, 1, mCameraFov, 0, mMainLayout, 2, 0); - connect(mCameraFovSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setFOV(double))); - - //auto save toggle - mAutoSaveCheckBox = new QCheckBox(tr("Auto Save:"), this); - mAutoSaveCheckBox->setChecked(mAutoSave); - connect(mAutoSaveCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(setAutoSave(int))); - mMainLayout->addWidget(mAutoSaveCheckBox, 3, 0); - - //auto save delay in minutes - mAutoSaveDelaySpinBox = addSpinBoxPreference(mAutoSaveDelayLabel, tr("Auto Save Delay\n(in minutes):"), 1, 30, 1, mAutoSaveDelay, 0, mMainLayout, 4, 0); - connect(mAutoSaveDelaySpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(setAutoSaveDelay(double))); - - //incremental save toggle - mIncrementalSaveCheckBox = new QCheckBox(tr("Incremental Save:"), this); - mIncrementalSaveCheckBox->setChecked(mIncrementalSave); - connect(mIncrementalSaveCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(setIncrementalSave(int))); - mMainLayout->addWidget(mIncrementalSaveCheckBox, 5, 0); - - //max incremental save files on disk - mIncrementalSaveMaxSpinBox = addSpinBoxPreference(mIncrementalSaveMaxLabel, tr("Max Incremental Saves:"), 2, 50, 1, mIncrementalSaveMax, 0, mMainLayout, 6, 0); - connect(mIncrementalSaveMaxSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent), SLOT(setIncrementalSaveMax(double))); - - //default save directory - mSaveDirectoryLabel = new QLabel(tr("Default Save Directory"), this); - mSaveDirectoryLineEdit = new QLineEdit(this); - std::cout << mSaveDirectory.toLatin1().data() << "\n"; - mSaveDirectoryLineEdit->setText(mSaveDirectory); - connect(mSaveDirectoryLineEdit, SIGNAL(textEdited(QString)), ((MainWindow*)mParent), SLOT(setSaveDirectory(QString))); - connect(mSaveDirectoryLineEdit, SIGNAL(editingFinished()), ((MainWindow*)mParent), SLOT(checkSaveDirectory())); - mMainLayout->addWidget(mSaveDirectoryLabel, 7, 0); - mMainLayout->addWidget(mSaveDirectoryLineEdit, 8, 0, 1, 3); - - //command completer word typing toggle - mCommandCompleterIndexToggle = new QCheckBox(tr("Command Completer\nSingle Word Completion"), this); - mCommandCompleterIndexToggle->setChecked(mCommandCompleterIndex); - connect(mCommandCompleterIndexToggle, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(setCommandCompleterIndexToggle(int))); - mMainLayout->addWidget(mCommandCompleterIndexToggle, 9, 0); - - //single click extrude word typing toggle - mSingleClickExtrudeCheckBox = new QCheckBox(tr("Single Click Extrusions"), this); - mSingleClickExtrudeCheckBox->setChecked(mSingleClickExtrude); - connect(mSingleClickExtrudeCheckBox, SIGNAL(stateChanged(int)), ((MainWindow*)mParent), SLOT(setSingleClickExtrude(int))); - mMainLayout->addWidget(mSingleClickExtrudeCheckBox, 10, 0); - - mMainLayout->setRowStretch(11, 2); - mMainLayout->setColumnStretch(4, 2); - - mMainTab->setLayout(mMainLayout); - // mMainLayout->addWidget(mResetCameraButton,0,0); - - // persp->switchTo(VPPersp); -} - -QPushButton* TopModPreferences::addColorPreference( - QLabel *label, QString text, QColor color, - QGridLayout *layout, QStyle *style, - int row, int col) -{ - label = new QLabel(text); - QPushButton *button = new QPushButton(mColorsTab); - button->setMaximumSize(QSize(100, 25)); - button->setAutoFillBackground(true); - button->setStyle(style); - QPalette p = button->palette(); - p.setColor(button->backgroundRole(), color); - button->setPalette(p); - layout->addWidget(label, row, col); - layout->addWidget(button, row, col + 1); - return button; -} - -QDoubleSpinBox* TopModPreferences::addSpinBoxPreference(QLabel *label, QString text, double low, double high, double step, double value, int decimals, QGridLayout *layout, int row, int col) -{ - label = new QLabel(text); - QDoubleSpinBox *spinbox = new QDoubleSpinBox; - spinbox->setRange(low, high); - spinbox->setSingleStep(step); - spinbox->setValue(value); - spinbox->setDecimals(decimals); - spinbox->setMaximumSize(100, 25); - layout->addWidget(label, row, col); - layout->addWidget(spinbox, row, col + 1); - return spinbox; -} - -void TopModPreferences::setupColors() -{ - //layout for colors tab page - QGridLayout *mColorsLayout = new QGridLayout; - //style for the color - QStyle* colorPickerStyle = QStyleFactory::create("Fusion"); - QPalette p; - - //viewport background color - mViewportColorButton = addColorPreference(mViewportColorLabel, tr("Viewport Background:"), mViewportColor, mColorsLayout, colorPickerStyle, 0, 0); - connect(mViewportColorButton, SIGNAL(clicked()), this, SLOT(setViewportColor())); - //object render color - mRenderColorButton = addColorPreference(mRenderColorLabel, tr("Object Render Color:"), mRenderColor, mColorsLayout, colorPickerStyle, 1, 0); - connect(mRenderColorButton, SIGNAL(clicked()), this, SLOT(setRenderColor())); - //CoolLight color - mCoolLightColorButton = addColorPreference(mCoolLightColorLabel, tr("Cool Light Color:"), mCoolLightColor, mColorsLayout, colorPickerStyle, 2, 0); - connect(mCoolLightColorButton, SIGNAL(clicked()), this, SLOT(setCoolLightColor())); - //WarmLight color - mWarmLightColorButton = addColorPreference(mWarmLightColorLabel, tr("Warm Light Color:"), mWarmLightColor, mColorsLayout, colorPickerStyle, 3, 0); - connect(mWarmLightColorButton, SIGNAL(clicked()), this, SLOT(setWarmLightColor())); - //Wireframe color - mWireframeColorButton = addColorPreference(mWireframeColorLabel, tr("Wireframe Color:"), mWireframeColor, mColorsLayout, colorPickerStyle, 4, 0); - connect(mWireframeColorButton, SIGNAL(clicked()), this, SLOT(setWireframeColor())); - //Silhouette color - mSilhouetteColorButton = addColorPreference(mSilhouetteColorLabel, tr("Silhouette Color:"), mSilhouetteColor, mColorsLayout, colorPickerStyle, 5, 0); - connect(mSilhouetteColorButton, SIGNAL(clicked()), this, SLOT(setSilhouetteColor())); - //PatchBoundary color - mPatchBoundaryColorButton = addColorPreference(mPatchBoundaryColorLabel, tr("Patch Boundary Color:"), mPatchBoundaryColor, mColorsLayout, colorPickerStyle, 6, 0); - connect(mPatchBoundaryColorButton, SIGNAL(clicked()), this, SLOT(setPatchBoundaryColor())); - //SelectedVertex color - mSelectedVertexColorButton = addColorPreference(mSelectedVertexColorLabel, tr("Selected Vertex Color:"), mSelectedVertexColor, mColorsLayout, colorPickerStyle, 7, 0); - connect(mSelectedVertexColorButton, SIGNAL(clicked()), this, SLOT(setSelectedVertexColor())); - //SelectedEdge color - mSelectedEdgeColorButton = addColorPreference(mSelectedEdgeColorLabel, tr("Selected Edge Color:"), mSelectedEdgeColor, mColorsLayout, colorPickerStyle, 8, 0); - connect(mSelectedEdgeColorButton, SIGNAL(clicked()), this, SLOT(setSelectedEdgeColor())); - //SelectedFace color - mSelectedFaceColorButton = addColorPreference(mSelectedFaceColorLabel, tr("Selected Face Color:"), mSelectedFaceColor, mColorsLayout, colorPickerStyle, 9, 0); - connect(mSelectedFaceColorButton, SIGNAL(clicked()), this, SLOT(setSelectedFaceColor())); - //VertexIDBg color - mVertexIDBgColorButton = addColorPreference(mVertexIDBgColorLabel, tr("Vertex ID Bg Color:"), mVertexIDBgColor, mColorsLayout, colorPickerStyle, 10, 0); - connect(mVertexIDBgColorButton, SIGNAL(clicked()), this, SLOT(setVertexIDBgColor())); - //FaceIDBg color - mFaceIDBgColorButton = addColorPreference(mFaceIDBgColorLabel, tr("Face ID Bg Color:"), mFaceIDBgColor, mColorsLayout, colorPickerStyle, 11, 0); - connect(mFaceIDBgColorButton, SIGNAL(clicked()), this, SLOT(setFaceIDBgColor())); - //EdgeIDBg color - mEdgeIDBgColorButton = addColorPreference(mEdgeIDBgColorLabel, tr("Edge ID Bg Color:"), mEdgeIDBgColor, mColorsLayout, colorPickerStyle, 12, 0); - connect(mEdgeIDBgColorButton, SIGNAL(clicked()), this, SLOT(setEdgeIDBgColor())); - //Normal color - mNormalColorButton = addColorPreference(mNormalColorLabel, tr("Normal Color:"), mNormalColor, mColorsLayout, colorPickerStyle, 13, 0); - connect(mNormalColorButton, SIGNAL(clicked()), this, SLOT(setNormalColor())); - //FaceCentroid color - mFaceCentroidColorButton = addColorPreference(mFaceCentroidColorLabel, tr("Face Centroid Color:"), mFaceCentroidColor, mColorsLayout, colorPickerStyle, 14, 0); - connect(mFaceCentroidColorButton, SIGNAL(clicked()), this, SLOT(setFaceCentroidColor())); - - //new column - - //light intensity - mLightIntensitySpinBox = addSpinBoxPreference(mLightIntensityLabel, tr("Light Intensity:"), 0.0, 10.0, 0.1, mLightIntensity, 1, mColorsLayout, 0, 2); - connect(mLightIntensitySpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setLightIntensity(double))); - //wireframe thickness - mWireframeThicknessSpinBox = addSpinBoxPreference(mWireframeThicknessLabel, tr("Wireframe Thickness:"), 0.1, 30.0, 0.1, mWireframeThickness, 1, mColorsLayout, 1, 2); - connect(mWireframeThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setWireframeThickness(double))); - //vertex thickness - mVertexThicknessSpinBox = addSpinBoxPreference(mVertexThicknessLabel, tr("Vertex Size:"), 0.1, 10.0, 0.5, mVertexThickness, 1, mColorsLayout, 2, 2); - connect(mVertexThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setVertexThickness(double))); - //silhouette thickness - mSilhouetteThicknessSpinBox = addSpinBoxPreference(mSilhouetteThicknessLabel, tr("Silhouette Thickness:"), 0.1, 15.0, 0.5, mSilhouetteThickness, 1, mColorsLayout, 3, 2); - connect(mSilhouetteThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setSilhouetteThickness(double))); - //SelectedVertex thickness - mSelectedVertexThicknessSpinBox = addSpinBoxPreference(mSelectedVertexThicknessLabel, tr("Selected Vertex Size:"), 0.1, 15.0, 0.5, mSelectedVertexThickness, 1, mColorsLayout, 4, 2); - connect(mSelectedVertexThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setSelectedVertexThickness(double))); - //SelectedEdge thickness - mSelectedEdgeThicknessSpinBox = addSpinBoxPreference(mSelectedEdgeThicknessLabel, tr("Selected Edge Thickness:"), 0.1, 15.0, 0.5, mSelectedEdgeThickness, 1, mColorsLayout, 5, 2); - connect(mSelectedEdgeThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setSelectedEdgeThickness(double))); - //Normal Size - mNormalThicknessSpinBox = addSpinBoxPreference(mNormalThicknessLabel, tr("Normal Thickness:"), 0.1, 15.0, 0.5, mNormalThickness, 1, mColorsLayout, 6, 2); - connect(mNormalThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setNormalThickness(double))); - //SelectedEdge thickness - mNormalLengthSpinBox = addSpinBoxPreference(mNormalLengthLabel, tr("Normal Length:"), 0.1, 15.0, 0.5, mNormalLength, 1, mColorsLayout, 7, 2); - connect(mNormalLengthSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setNormalLength(double))); - //SelectedEdge thickness - mFaceCentroidThicknessSpinBox = addSpinBoxPreference(mFaceCentroidThicknessLabel, tr("Face Centroid Thickness:"), 0.1, 15.0, 0.5, mFaceCentroidThickness, 1, mColorsLayout, 8, 2); - connect(mFaceCentroidThicknessSpinBox, SIGNAL(valueChanged(double)), ((MainWindow*)mParent)->getActive(), SLOT(setFaceCentroidThickness(double))); - - //reset button - mResetColorsButton = new QPushButton(tr("Reset")); - connect(mResetColorsButton, SIGNAL(clicked()), this, SLOT(loadDefaults())); - mColorsLayout->addWidget(mResetColorsButton, 14, 3); - - mColorsLayout->setRowStretch(15, 17); - mColorsLayout->setColumnStretch(4, 10); - - // mColorsLayout->addStretch(1); - mColorsTab->setLayout(mColorsLayout); - -} - -void TopModPreferences::setViewportColor() -{ - mViewportColor.setRgba(QColorDialog::getRgba(mViewportColor.rgba())); - if (mViewportColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setViewportColor(mViewportColor); - setButtonColor(mViewportColor, mViewportColorButton); - } -} - -void TopModPreferences::setRenderColor() -{ - mRenderColor.setRgba(QColorDialog::getRgba(mRenderColor.rgba())); - if (mRenderColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setRenderColor(mRenderColor); - setButtonColor(mRenderColor, mRenderColorButton); - } -} - -void TopModPreferences::setCoolLightColor() -{ - mCoolLightColor.setRgba(QColorDialog::getRgba(mCoolLightColor.rgba())); - if (mCoolLightColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setCoolLightColor(mCoolLightColor); - setButtonColor(mCoolLightColor, mCoolLightColorButton); - } -} - -void TopModPreferences::setWarmLightColor() -{ - mWarmLightColor.setRgba(QColorDialog::getRgba(mWarmLightColor.rgba())); - if (mWarmLightColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setWarmLightColor(mWarmLightColor); - setButtonColor(mWarmLightColor, mWarmLightColorButton); - } -} - -void TopModPreferences::setWireframeColor() -{ - mWireframeColor.setRgba(QColorDialog::getRgba(mWireframeColor.rgba())); - if (mWireframeColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setWireframeColor(mWireframeColor); - setButtonColor(mWireframeColor, mWireframeColorButton); - } -} - -void TopModPreferences::setSilhouetteColor() -{ - mSilhouetteColor.setRgba(QColorDialog::getRgba(mSilhouetteColor.rgba())); - if (mSilhouetteColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setSilhouetteColor(mSilhouetteColor); - setButtonColor(mSilhouetteColor, mSilhouetteColorButton); - } -} - -void TopModPreferences::setPatchBoundaryColor() -{ - mPatchBoundaryColor.setRgba(QColorDialog::getRgba(mPatchBoundaryColor.rgba())); - if (mPatchBoundaryColor.isValid()) - { - // ((MainWindow*)mParent)->getActive()->setPatchBoundaryColor(mPatchBoundaryColor); - setButtonColor(mPatchBoundaryColor, mPatchBoundaryColorButton); - } -} - -void TopModPreferences::setSelectedVertexColor() -{ - mSelectedVertexColor.setRgba(QColorDialog::getRgba(mSelectedVertexColor.rgba())); - if (mSelectedVertexColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setSelectedVertexColor(mSelectedVertexColor); - setButtonColor(mSelectedVertexColor, mSelectedVertexColorButton); - } -} - -void TopModPreferences::setSelectedEdgeColor() -{ - mSelectedEdgeColor.setRgba(QColorDialog::getRgba(mSelectedEdgeColor.rgba())); - if (mSelectedEdgeColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setSelectedEdgeColor(mSelectedEdgeColor); - setButtonColor(mSelectedEdgeColor, mSelectedEdgeColorButton); - } -} - -void TopModPreferences::setSelectedFaceColor() -{ - mSelectedFaceColor.setRgba(QColorDialog::getRgba(mSelectedFaceColor.rgba())); - if (mSelectedFaceColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setSelectedFaceColor(mSelectedFaceColor); - setButtonColor(mSelectedFaceColor, mSelectedFaceColorButton); - } -} - -void TopModPreferences::setFaceIDBgColor() -{ - mFaceIDBgColor.setRgba(QColorDialog::getRgba(mFaceIDBgColor.rgba())); - if (mFaceIDBgColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setFaceIDBgColor(mFaceIDBgColor); - setButtonColor(mFaceIDBgColor, mFaceIDBgColorButton); - } -} - -void TopModPreferences::setVertexIDBgColor() -{ - mVertexIDBgColor.setRgba(QColorDialog::getRgba(mVertexIDBgColor.rgba())); - if (mVertexIDBgColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setVertexIDBgColor(mVertexIDBgColor); - setButtonColor(mVertexIDBgColor, mVertexIDBgColorButton); - } -} - -void TopModPreferences::setEdgeIDBgColor() -{ - mEdgeIDBgColor.setRgba(QColorDialog::getRgba(mEdgeIDBgColor.rgba())); - if (mEdgeIDBgColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setEdgeIDBgColor(mEdgeIDBgColor); - setButtonColor(mEdgeIDBgColor, mEdgeIDBgColorButton); - } -} - -void TopModPreferences::setNormalColor() -{ - mNormalColor.setRgba(QColorDialog::getRgba(mNormalColor.rgba())); - if (mNormalColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setNormalColor(mNormalColor); - setButtonColor(mNormalColor, mNormalColorButton); - } -} - -void TopModPreferences::setFaceCentroidColor() -{ - mFaceCentroidColor.setRgba(QColorDialog::getRgba(mFaceCentroidColor.rgba())); - if (mFaceCentroidColor.isValid()) - { - ((MainWindow*)mParent)->getActive()->setFaceCentroidColor(mFaceCentroidColor); - setButtonColor(mFaceCentroidColor, mFaceCentroidColorButton); - } -} - -void TopModPreferences::setSaveDirectory(QString s) -{ - mSaveDirectory = s; - mSaveDirectoryLineEdit->setText(s); -} diff --git a/topmodx/src/TopModPreferences.h b/topmodx/src/TopModPreferences.h deleted file mode 100644 index 94de789..0000000 --- a/topmodx/src/TopModPreferences.h +++ /dev/null @@ -1,279 +0,0 @@ -/* -* $Id: SourceFileTemplates.txt,v 1.2 2005/07/28 15:37:03 JiriHnidek Exp www-data $ -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _TOPMODPREFERENCES_H -#define _TOPMODPREFERENCES_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "MainWindow.h" -#include "qshortcutdialog.h" -#include "qshortcutmanager.h" - -class QShortcutDialog; -class QShortcutManager; -class MainWindow; - -class TopModPreferences : public QDialog -{ - Q_OBJECT - -public: - TopModPreferences(QSettings *settings, StyleSheetEditor *sse, QShortcutManager *sm, QWidget *parent = 0); - ~TopModPreferences(); - - int display(); - void readSettings(); - void setSaveDirectory(QString s); - -protected: - void createTabs(); - void setupColors(); - void setupMain(); - QPushButton* addColorPreference(QLabel *label, QString text, QColor color, QGridLayout *layout, QStyle *style, int row, int col); - void setButtonColor(QColor color, QPushButton *button); - QDoubleSpinBox* addSpinBoxPreference( - QLabel *label, QString text, - double low, double high, double step, double value, int decimals, - QGridLayout *layout, int row, int col); - -public slots: - void saveSettings(); - void discardSettings(); - - void setViewportColor(); - void setRenderColor(); - void setCoolLightColor(); - void setWarmLightColor(); - void setWireframeColor(); - void setSilhouetteColor(); - void setPatchBoundaryColor(); - void setSelectedVertexColor(); - void setSelectedEdgeColor(); - void setSelectedFaceColor(); - void setVertexIDBgColor(); - void setFaceIDBgColor(); - void setEdgeIDBgColor(); - void setNormalColor(); - void setFaceCentroidColor(); - - void loadDefaults(); - -private: - QSettings *mSettings; - QTabWidget *mPrefTabs; - QWidget *mParent; - - QPushButton *mOkButton; - QPushButton *mCancelButton; - - //tab pages - QWidget *mMainTab; - QWidget *mColorsTab; -#ifdef WITH_PYTHON - QWidget *mScriptEditTab; -#endif - QShortcutDialog *mShortcutsTab; - QShortcutManager *mShortcutsManager; - StyleSheetEditor *mStyleSheetsTab; - - //COLORS - - //viewport color - QColor mViewportColor, mViewportColorDefault; - QPushButton *mViewportColorButton; - QLabel *mViewportColorLabel; - - //Render color - QColor mRenderColor, mRenderColorDefault; - QPushButton *mRenderColorButton; - QLabel *mRenderColorLabel; - - //Cool Light Color - QColor mCoolLightColor, mCoolLightColorDefault; - QPushButton *mCoolLightColorButton; - QLabel *mCoolLightColorLabel; - - //Warm Light Color - QColor mWarmLightColor, mWarmLightColorDefault; - QPushButton *mWarmLightColorButton; - QLabel *mWarmLightColorLabel; - - //Wireframe Color - QColor mWireframeColor, mWireframeColorDefault; - QPushButton *mWireframeColorButton; - QLabel *mWireframeColorLabel; - - //Silhouette Color - QColor mSilhouetteColor, mSilhouetteColorDefault; - QPushButton *mSilhouetteColorButton; - QLabel *mSilhouetteColorLabel; - - //FaceCentroid Color - QColor mFaceCentroidColor, mFaceCentroidColorDefault; - QPushButton *mFaceCentroidColorButton; - QLabel *mFaceCentroidColorLabel; - - //Normal Color - QColor mNormalColor, mNormalColorDefault; - QPushButton *mNormalColorButton; - QLabel *mNormalColorLabel; - - //patch boundary color - QColor mPatchBoundaryColor, mPatchBoundaryColorDefault; - QPushButton *mPatchBoundaryColorButton; - QLabel *mPatchBoundaryColorLabel; - - //light intensity - double mLightIntensity, mLightIntensityDefault; - QLabel *mLightIntensityLabel; - QDoubleSpinBox *mLightIntensitySpinBox; - - //wireframe thickness - double mWireframeThickness, mWireframeThicknessDefault; - QLabel *mWireframeThicknessLabel; - QDoubleSpinBox *mWireframeThicknessSpinBox; - - //silhouette thickness - double mSilhouetteThickness, mSilhouetteThicknessDefault; - QLabel *mSilhouetteThicknessLabel; - QDoubleSpinBox *mSilhouetteThicknessSpinBox; - - //vertex thickness - double mVertexThickness, mVertexThicknessDefault; - QLabel *mVertexThicknessLabel; - QDoubleSpinBox *mVertexThicknessSpinBox; - - //Normal thickness - double mNormalThickness, mNormalThicknessDefault; - QLabel *mNormalThicknessLabel; - QDoubleSpinBox *mNormalThicknessSpinBox; - - //Normal Length - double mNormalLength, mNormalLengthDefault; - QLabel *mNormalLengthLabel; - QDoubleSpinBox *mNormalLengthSpinBox; - - //face centroid thickness - double mFaceCentroidThickness, mFaceCentroidThicknessDefault; - QLabel *mFaceCentroidThicknessLabel; - QDoubleSpinBox *mFaceCentroidThicknessSpinBox; - - //selected vertex thickness - double mSelectedVertexThickness, mSelectedVertexThicknessDefault; - QLabel *mSelectedVertexThicknessLabel; - QDoubleSpinBox *mSelectedVertexThicknessSpinBox; - - //selected edge thickness - double mSelectedEdgeThickness, mSelectedEdgeThicknessDefault; - QLabel *mSelectedEdgeThicknessLabel; - QDoubleSpinBox *mSelectedEdgeThicknessSpinBox; - - //selected edge color - QColor mSelectedEdgeColor, mSelectedEdgeColorDefault; - QPushButton *mSelectedEdgeColorButton; - QLabel *mSelectedEdgeColorLabel; - - //selected vertex color - QColor mSelectedVertexColor, mSelectedVertexColorDefault; - QPushButton *mSelectedVertexColorButton; - QLabel *mSelectedVertexColorLabel; - - //selected face color - QColor mSelectedFaceColor, mSelectedFaceColorDefault; - QPushButton *mSelectedFaceColorButton; - QLabel *mSelectedFaceColorLabel; - - //vertex id bg color - QColor mVertexIDBgColor, mVertexIDBgColorDefault; - QPushButton *mVertexIDBgColorButton; - QLabel *mVertexIDBgColorLabel; - - //face id bg color - QColor mFaceIDBgColor, mFaceIDBgColorDefault; - QPushButton *mFaceIDBgColorButton; - QLabel *mFaceIDBgColorLabel; - - //edge id bg color - QColor mEdgeIDBgColor, mEdgeIDBgColorDefault; - QPushButton *mEdgeIDBgColorButton; - QLabel *mEdgeIDBgColorLabel; - - //reset button - QPushButton *mResetColorsButton; - - //reset camera button - QPushButton *mResetCameraButton; - - //camera nearplane/farplane/fov - QLabel *mCameraFovLabel, *mCameraNearPlaneLabel, *mCameraFarPlaneLabel; - QDoubleSpinBox *mCameraFovSpinBox, *mCameraNearPlaneSpinBox, *mCameraFarPlaneSpinBox; - float mCameraFov, mCameraFovDefault; - float mCameraNearPlane, mCameraNearPlaneDefault; - float mCameraFarPlane, mCameraFarPlaneDefault; - - bool mShowStartupDialogAtStartup; - - QCheckBox *mAutoSaveCheckBox; - QCheckBox *mIncrementalSaveCheckBox; - bool mIncrementalSave, mIncrementalSaveDefault; - QDoubleSpinBox *mAutoSaveDelaySpinBox; - QLabel *mAutoSaveDelayLabel; - int mAutoSaveDelay, mAutoSaveDelayDefault; - bool mAutoSave, mAutoSaveDefault; - QLineEdit *mSaveDirectoryLineEdit; - QLabel *mSaveDirectoryLabel; - QString mSaveDirectory, mSaveDirectoryDefault; - QDoubleSpinBox *mIncrementalSaveMaxSpinBox; - QLabel *mIncrementalSaveMaxLabel; - int mIncrementalSaveMax, mIncrementalSaveMaxDefault; - - QCheckBox *mCommandCompleterIndexToggle; - bool mCommandCompleterIndex, mCommandCompleterIndexDefault; - - QCheckBox *mSingleClickExtrudeCheckBox; - bool mSingleClickExtrude, mSingleClickExtrudeDefault; - -}; - -#endif diff --git a/topmodx/src/VerseTopMod.cc b/topmodx/src/VerseTopMod.cc deleted file mode 100644 index 018bf55..0000000 --- a/topmodx/src/VerseTopMod.cc +++ /dev/null @@ -1,232 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#ifdef WITH_VERSE - -#include -#include - -#include -#include - -#include "VerseTopMod.h" - -// /* A callback for connection acception: will be called when server accepts this client. */ -// void callback_accept_connect(void *user, uint32 avatar, void *address, void *connection, uint8 *host_id) { -// -// uint32 i, mask = 0; -// VerseTopMod::Instance()->write("Connected to a Verse host!\n\nListing nodes:\n"); -// // std::cout <<"Connected to a Verse host!\n\nListing nodes:\n"; -// -// /* Build node subscription mask. */ -// for(i = 0; i < V_NT_NUM_TYPES; i++) -// mask |= 1 << i; -// verse_send_node_index_subscribe(mask); /* Request listing of all nodes. */ -// } -// -// /* A callback for node creation: is called to report information about existing nodes, too. */ -// void callback_node_create(void *user, VNodeID node_id, VNodeType type, VNodeOwner ownership) { -// VerseTopMod::Instance()->write(" Node #" + QString(node_id) + " has type " + QString(type) + "\n"); -// // std::cout <<" Node #" << node_id << " has type " << type << std::endl; -// } - -VerseTopMod* VerseTopMod::pinstance = 0;// initialize pointer - -VerseTopMod* VerseTopMod::Instance(QWidget *parent) -{ - if (pinstance == 0) // is it the first call? - pinstance = new VerseTopMod(parent); // create sole instance - return pinstance; // address of sole instance -} - -VerseTopMod* VerseTopMod::Instance() -{ - if (pinstance == 0) // is it the first call? - pinstance = new VerseTopMod(); // create sole instance - return pinstance; // address of sole instance -} - -//constructor -VerseTopMod::VerseTopMod(QWidget *parent, Qt::WindowFlags f) - : QWidget(parent), isConnected(false) -{ - - mParent = parent; - mTextEdit = new QTextEdit; - mLineEdit = new QLineEdit; - QObject::connect(mLineEdit, SIGNAL(returnPressed()), this, SLOT(executeCommand())); - - QPalette whiteOnBlack; - whiteOnBlack.setColor(QPalette::Active, QPalette::Text, Qt::white); - whiteOnBlack.setColor(QPalette::Active, QPalette::Base, Qt::black); - mTextEdit->setPalette(whiteOnBlack); - mLineEdit->setPalette(whiteOnBlack); - - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(mTextEdit); - mainLayout->addWidget(mLineEdit); - setLayout(mainLayout); - //create update timer - mTimer = new QTimer(this); - connect(mTimer, SIGNAL(timeout()), this, SLOT(updateVerse())); - - mProcess = new QProcess(this); - // connect(mProcess, SIGNAL(readyRead()), this, SLOT(writeStandardOutput())); -} - -VerseTopMod::VerseTopMod(const VerseTopMod& v) : QWidget(0) -{ - -} -void VerseTopMod::executeCommand() -{ - QString command = mLineEdit->text(); - QString result; - - mTextEdit->moveCursor(QTextCursor::End); - - if (!command.isEmpty()) - { - - } - else - { - command = QString(""); - result = QString(""); - } - - const QByteArray cmd(command.toLatin1()); - mTextEdit->insertPlainText("\nVerseTopMod> " + command); - if (!result.isEmpty()) - mTextEdit->insertPlainText("\n" + result); - mLineEdit->clear(); - - QScrollBar *vBar = mTextEdit->verticalScrollBar(); - vBar->triggerAction(QAbstractSlider::SliderToMaximum); -} - -void VerseTopMod::write(QString s) -{ - // std::cout << "VerseTopMod> " << s << std::endl; - mTextEdit->insertPlainText(" " + s + "\n"); -} - -void VerseTopMod::connectLocalhost() -{ - - write(tr("Connecting to localhost!")); - t_verse_connect("localhost"); - - /* Register callbacks for interesting commands. */ - // verse_callback_set((void *)verse_send_connect_accept, (void *)callback_accept_connect, nullptr); - // verse_callback_set((void *)verse_send_node_create, (void *)callback_node_create, nullptr); - // - // /* Kick off program by connecting to Verse host on local machine. */ - // verse_send_connect("TopMod", "password", "localhost", nullptr); - // while(TRUE) - // verse_callback_update(100); /* Listen to network, get callbacks. */ - - mTimer->start(100); - ((MainWindow*)mParent)->verseConnected(); -} - -void VerseTopMod::connectHost() -{ - bool ok; - QString text = QInputDialog::getText(this, tr("Connect to Verse Server"), - tr("Server Address:"), QLineEdit::Normal, - tr("localhost"), &ok); - if (ok && !text.isEmpty() && text.length() < 64) - { - write(tr("Connecting to %1!").arg(text)); - QByteArray ba = text.toLatin1(); - t_verse_connect(ba.data()); - mTimer->start(100); - ((MainWindow*)mParent)->verseConnected(); - } - -} - -void VerseTopMod::disconnectHost() -{ - VerseSession *session = nullptr; - session = session_menu(); - if (session) - { - write(tr("Disconnecting session %1!").arg(session->address)); - end_verse_session(session); - // mTimer->stop(); - } - end_all_verse_sessions(); - ((MainWindow*)mParent)->verseDisconnected(); -} - -void VerseTopMod::disconnectAll() -{ - write(tr("Disconnecting all sessions!")); - end_all_verse_sessions(); - // mTimer->stop(); - ((MainWindow*)mParent)->verseDisconnected(); -} - -void VerseTopMod::updateVerse() -{ - // write(tr("Update Verse")); - t_verse_update(); -} - -void VerseTopMod::writeStandardOutput() -{ - write(QString(mProcess->readAllStandardOutput())); -} - -void VerseTopMod::startServer() -{ - connect(mProcess, SIGNAL(readyRead()), this, SLOT(writeStandardOutput())); -#ifdef WIN32 - mProcess->start("verse.exe"); -#else - mProcess->start("verse"); -#endif - ((MainWindow*)mParent)->verseStarted(); -} - -void VerseTopMod::killServer() -{ - mProcess->kill(); - ((MainWindow*)mParent)->verseKilled(); -} - -VerseTopMod::~VerseTopMod() {} - -#endif diff --git a/topmodx/src/VerseTopMod.h b/topmodx/src/VerseTopMod.h deleted file mode 100644 index 4cae498..0000000 --- a/topmodx/src/VerseTopMod.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** - ** - ** - ****************************************************************************/ -#ifdef WITH_VERSE - -#ifndef VERSETOPMOD_H -#define VERSETOPMOD_H - -#include -#include -#include - -#include "MainWindow.h" -#include "TKE_verse.h" -#include "TIF_verse.h" -#include "TKE_global.h" - - // #include "TLI_dynamiclist.h" - // #include "verse_session.c" - // #include "verse.h" - -class MainWindow; -class QLineEdit; -class QTextEdit; - -// extern ListBase session_list; - -class VerseTopMod : public QWidget -{ - Q_OBJECT - -public: - static VerseTopMod* Instance(QWidget *parent); - static VerseTopMod* Instance(); - void write(QString s); - -protected: - // VerseTopMod(); - VerseTopMod(QWidget *parent = 0, Qt::WindowFlags f = Qt::Tool); - VerseTopMod(const VerseTopMod&); - VerseTopMod& operator= (const VerseTopMod&); - ~VerseTopMod(); - -public slots: - void killServer(); - void startServer(); - void writeStandardOutput(); - void executeCommand(); - //actions in the file menu - void connectLocalhost(); - void connectHost(); - void disconnectHost(); - void disconnectAll(); - void updateVerse(); - -private: - bool isConnected; - QLineEdit *mLineEdit; - QTextEdit *mTextEdit; - static VerseTopMod* pinstance; - // QEventLoop *mEventLoop; - QTimer *mTimer; - QProcess *mProcess; - QWidget *mParent; - -}; - -#endif - -#endif diff --git a/topmodx/src/Viewport.h b/topmodx/src/Viewport.h deleted file mode 100644 index 5cb5a60..0000000 --- a/topmodx/src/Viewport.h +++ /dev/null @@ -1,402 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/* $Id: Viewport.hh,v 1.5 2002/10/28 07:00:16 vinod Exp $ */ - -#ifndef _VIEWPORT_HH_ - -#define _VIEWPORT_HH_ - -// Class for a generic Viewport. Supports rotation, panning, zooming and dollying -// using a transformation matrix and subroutines to handle corresponding events -// This is a modified version of the ViewWindow class, with all connection to FLTK -// or any other user interface/windowing system removed. - - -#ifdef __APPLE__ -#include -#include -#else -#ifdef _WIN32 || _WIN64 -#include -#endif -#include -#include -#endif - -#include -#include -#include -#include -#include -#include - -// Enumerations for the different views. The names imply looking from the corresponding -// side. ie Front -> looking *from* front, Right -> looking *from* right -enum VPView -{ - VPPersp = 0, - VPFront = 1, - VPRight = 2, - VPTop = 3, - VPBack = 4, - VPLeft = 5, - VPBottom = 6 -}; - -// Enumerations for current transformation mode -enum VPTransformType -{ - VPNone = 0, - VPPan = 1, - VPRotate = 2, - VPZoom = 3, - VPDolly = 4 -}; - -// Enumerations for mouse events -enum VPMouseEvent -{ - VPUnknown = 0, - VPPush = 1, - VPRelease = 2, - VPDrag = 3 -}; - -class Viewport -{ -public: - // Set eyepoint, center, etc. for perspective views - // Setting these requires modifying the transformation matrix - // to get the proper rotation using arcball - void setPerspView(const Vector3d& eye, const Vector3d& center, const Vector3d& up) - { - if (view == VPPersp) - { - Vector3d neweye = eye - center; - double eyedist = norm(neweye); - Matrix4x4 lmat = Transformation::lookat(neweye, Vector3d(0, 0, 0), up); - transform = lmat; - transform.translate(-center); - camera.setEye(Vector3d(0, 0, eyedist)); - } - } - - void setPerspView(double eyex, double eyey, double eyez, double cenx, double ceny, double cenz, double upx, double upy, double upz) - { - setPerspView(Vector3d(eyex, eyey, eyez), Vector3d(cenx, ceny, cenz), Vector3d(upx, upy, upz)); - } - - // Change camera settings to get specified view - void switchTo(VPView v) - { - view = v; - camera.setCenter(0, 0, 0); - camera.setNearFar(1, 1000); - if (view == VPPersp) - { - camera.makePerspective(); - camera.setPerspectiveViewVolume(60.0, double(width) / double(height)); - } - else - { - camera.makeOrthographic(); - camera.setOrthographicViewVolume(2, 2, true); - transform.reset(); - } - switch (view) - { - case VPPersp: - setPerspView(50, 50, 50, 0, 0, 0, 0, 1, 0); - break; - case VPFront: - camera.setEye(0, 0, 100); - camera.setUpVector(0, 1, 0); - break; - case VPRight: - camera.setEye(100, 0, 0); - camera.setUpVector(0, 1, 0); - break; - case VPTop: - camera.setEye(0, 100, 0); - camera.setUpVector(0, 0, -1); - break; - case VPBack: - camera.setEye(0, 0, -100); - camera.setUpVector(0, 1, 0); - break; - case VPLeft: - camera.setEye(-100, 0, 0); - camera.setUpVector(0, 1, 0); - break; - case VPBottom: - camera.setEye(0, -100, 0); - camera.setUpVector(0, 0, 1); - break; - } - } - - Viewport(int w, int h) - : width(w), height(h), - arcball(), trcontrol(), zoomcontrol(), dollycontrol(10.0), - transform(), currenttr(VPNone), view(VPPersp), camera() - { - switchTo(view); - } - - Viewport(int w, int h, VPView v) - : width(w), height(h), arcball(), trcontrol(), zoomcontrol(), dollycontrol(10.0), - transform(), currenttr(VPNone), view(v), camera() - { - switchTo(view); - } - - virtual ~Viewport() - { - } - - VPTransformType current(void) const - { - return currenttr; - } - - // Apply the GL transformation matrices - // This function should be called when the view needs to be setup - virtual void reshape(void) - { - glViewport(0, 0, width, height); - camera.applyTransform(); - } - - // Convert mouse coordinates to real-world coordinates - // Give mouse x and y in x and y respectively - void mouseToViewport(double& x, double& y, double& z) - { - x = (2.0*x / width) - 1.0; y = (-2.0*y / height) + 1.0; - camera.adjust(x, y, z); - Vector4d p(x, y, z, 1), p1; - Matrix4x4 tmat = inverse(transform.matrix()); - double w; - p1 = tmat * p; - p1.get(x, y, z, w); x /= w; y /= w; z /= w; - } - - // Resize the viewport. Automatically calls reshape - // This function should be called when the window using this viewport is resized - virtual void resize(int w, int h) - { - width = w; height = h; - camera.setAspect(double(width) / double(height)); - reshape(); - } - - // Handle rotation by mouse - virtual void handle_rotate(VPMouseEvent event, int event_x, int event_y) - { - // Don't do anything if we aren't in a neutral state or aren't rotating - if (currenttr != VPNone && currenttr != VPRotate) return; - - currenttr = VPRotate; - if (view == VPPersp) // No rotations for ortho views - { - double x, y; - // Transform coords to lie between -1 to 1 - x = (double(event_x << 1) / width) - 1.0; - y = (-double(event_y << 1) / height) + 1.0; - - arcball.mouse(x, y); arcball.update(); - - if (event == VPPush) arcball.beginDrag(); - // else if (event == VPDrag) transform.rotate(arcball.quat_value()); // Update the combined transformation - else if (event == VPRelease) - { - arcball.endDrag(); - transform.rotate(arcball.quat_value()); // Update the combined transformation - arcball.reset(); - } - } - if (event == VPRelease) currenttr = VPNone; - } - - // Handle panning by mouse - virtual void handle_pan(VPMouseEvent event, int event_x, int event_y) - { - // Don't do anything if we aren't in a neutral state or aren't panning - if (currenttr != VPNone && currenttr != VPPan) return; - - currenttr = VPPan; - - double x, y, z; - - // Transform coords to lie between -1 to 1 - x = (double(event_x << 1) / width) - 1.0; - y = (-double(event_y << 1) / height) + 1.0; - - // Adjust the x and y values so that moving mouse by 1 pixel - // on screen moves point under mouse by 1 pixel - camera.adjust(x, y, z); - trcontrol.mouse(x, y, z); trcontrol.update(); - - if (event == VPPush) trcontrol.beginDrag(); - // else if (event == VPDrag) transform.translate(trcontrol.trans_value());// Update the combined transformation - else if (event == VPRelease) - { - trcontrol.endDrag(); - transform.translate(trcontrol.trans_value());// Update the combined transformation - trcontrol.reset(); currenttr = VPNone; - } - } - - // Handle zooming by mouse (only x movement is used) - virtual void handle_zoom(VPMouseEvent event, int event_x, int event_y = 0) - { - // Don't do anything if we aren't in a neutral state or aren't zooming - if (currenttr != VPNone && currenttr != VPZoom) return; - - currenttr = VPZoom; - double z; - // Transform coords to lie between -1 to 1 - z = (double(event_x << 1) / width) - 1.0; - // Currently both orthographic and perspective zoom is handled by same - // controller which simply does a scaling - zoomcontrol.mouse(z); zoomcontrol.update(); - - if (event == VPPush) zoomcontrol.beginDrag(); - // else if (event == VPDrag) transform.scale(zoomcontrol.zoom_value());// Update the combined transformation - else if (event == VPRelease) - { - zoomcontrol.endDrag(); - transform.scale(zoomcontrol.zoom_value());// Update the combined transformation - zoomcontrol.reset(); currenttr = VPNone; - } - } - - // Handle dollying by mouse (only x movement is used) - virtual void handle_dolly(VPMouseEvent event, int event_x, int event_y = 0) - { - // For orthographic views, call handle_zoom, since handle_dolly has no effect - if (view != VPPersp) handle_zoom(event, event_x, event_y); - else - { - // Don't do anything if we aren't in a neutral state or aren't dollying - if (currenttr != VPNone && currenttr != VPDolly) return; - - currenttr = VPDolly; - - double z; - - // Transform coords to lie between -1 to 1 - z = (double(event_x << 1) / width) - 1.0; - - dollycontrol.mouse(z); dollycontrol.update(); - - if (event == VPPush) dollycontrol.beginDrag(); - // else if (event == VPDrag ) - else if (event == VPRelease) - { - dollycontrol.endDrag(); - // Shouldn't reset since the value is directly used for transformations - // separate from other transformations - currenttr = VPNone; - } - } - } - - virtual bool send_to_current(VPMouseEvent event, int event_x, int event_y) - { - // Send the given event to the subroutine handling the current transformation - bool handled = true; - switch (currenttr) - { - case VPPan: - handle_pan(event, event_x, event_y); break; - case VPZoom: - handle_zoom(event, event_x, event_y); break; - case VPRotate: - handle_rotate(event, event_x, event_y); break; - case VPDolly: - handle_dolly(event, event_x, event_y); break; - case VPNone: - default: - handled = false; - } - return handled; - } - - // Apply the transformation - Transformation apply_transform(void) - { - double mat[16]; - // Do the dollying separately before everything else - glTranslated(0, 0, dollycontrol.dolly_value()); - switch (currenttr) - { - case VPPan: - trcontrol.value().fillArrayColumnMajor(mat); - glMultMatrixd(mat); - break; - case VPZoom: - zoomcontrol.value().fillArrayColumnMajor(mat); - glMultMatrixd(mat); - break; - case VPRotate: - arcball.value().fillArrayColumnMajor(mat); - glMultMatrixd(mat); - break; - case VPDolly: - case VPNone: - default: break; - } - /// transform.apply(); - transform.fillArrayColumnMajor(mat); - glMultMatrixd(mat); - // transform.invert(); - // transform.apply(); - camera.setPos(inverse(transform.matrix())*camera.getEye()); - return transform; - } - -public: - // Made public to allow changing camera settings easily (view-volume, near/far) - Camera camera; // Camera attached to this window - -protected: - int width, height; // Width and height of viewport - Arcball arcball; // The arcball controller - TransControl trcontrol; // Translation controller - ZoomControl zoomcontrol; // Zoom controller - DollyControl dollycontrol; // Dolly controller (10.0 scale) - - Transformation transform; // Combined transformation - - VPTransformType currenttr; // Current transformation - VPView view; // Which view? - -}; - -#endif /* #ifndef _VIEWPORT_HH_ */ diff --git a/topmodx/src/editor.cc b/topmodx/src/editor.cc deleted file mode 100644 index e4a8f43..0000000 --- a/topmodx/src/editor.cc +++ /dev/null @@ -1,733 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -//#include "function.h" -//#include "valuemanager.h" -#include "editor.h" -//#include "evaluator.h" -//#include "result.h" -//#include "lexer.h" - -#include "PythonHighlighter.h" - -//#include -//#include // netwm.h includes X11 headers which conflict with qevent - -#include -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include - -/*class EditorHighlighter : public PythonHighlighter { -public: -EditorHighlighter( Editor* ); - -private: -Editor* editor; -};*/ - -class Editor::Private -{ -public: - Private() {} - ~Private() {} - -public: - QString unExecuted; - QStringList history; - int index; - bool autoCompleteEnabled; - EditorCompletion* completion; - QTimer* completionTimer; - bool syntaxHighlightEnabled; - PythonHighlighter* highlighter; - QMap highlightColors; - QTimer* matchingTimer; - -}; - -class EditorCompletion::Private -{ -public: - Editor* editor; - QFrame *completionPopup; - QListWidget *completionListBox; - -}; - -class ChoiceItem : public QListWidgetItem -{ -public: - ChoiceItem(const QString&, QListWidget*); - void setMinNameWidth(int w) { minNameWidth = w; } - int nameWidth() const; - -protected: - void paint(QPainter* p); - -private: - QString item; - QString desc; - int minNameWidth; -}; - -ChoiceItem::ChoiceItem(const QString& text, QListWidget* listBox) : - QListWidgetItem(text, listBox), minNameWidth(0) -{ - QStringList list = text.split(':'); - - if (!list.isEmpty()) - item = list[0]; - - if (list.count() > 1) - desc = list[1]; -} - -// Returns width of this particular list item's name. -int ChoiceItem::nameWidth() const -{ - if (item.isEmpty()) - return 0; - - QFontMetrics fm = listWidget()->fontMetrics(); - return fm.width(item); -} - -void ChoiceItem::paint(QPainter* painter) -{ - int itemHeight = listWidget()->height(); - QFontMetrics fm = painter->fontMetrics(); - int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent(); - painter->drawText(3, yPos, item); - - //int xPos = fm.width( item ); - int xPos = qMax(fm.width(item), minNameWidth); - - if (!isSelected()) - { - QPalette p = listWidget()->palette(); - p.setCurrentColorGroup(QPalette::Disabled); - - painter->setPen(p.color(QPalette::Text).dark()); - } - - painter->drawText(10 + xPos, yPos, desc); -} - -/*EditorHighlighter::EditorHighlighter(Editor* e) : - QSyntaxHighlighter(e) -{ - editor = e; -} - -void EditorHighlighter::highlightBlock(const QString & text) -{ - if (!editor->isSyntaxHighlightEnabled()) - { - setFormat(0, text.length(), editor->palette().color(QPalette::Text)); - return; - } - - QStringList fnames = FunctionManager::instance()->functionList(FunctionManager::All); - fnames.sort(); // Sort list so we can bin search it. - - TokenList tokens = Lexer::tokenize(text); - - for (int i = 0; i < tokens.count(); i++) - { - Token& token = tokens[i]; - QString text = token.text().toLower(); - QColor color = editor->palette().color(QPalette::Text); - - switch (token.type()) - { - case Token::Number: - color = editor->highlightColor(Editor::Number); - break; - - case Token::Identifier: - color = editor->highlightColor(Editor::Variable); - - if (qBinaryFind(fnames.begin(), fnames.end(), text) != fnames.end()) - color = editor->highlightColor(Editor::FunctionName); - - break; - - case Token::Operator: - break; - - default: break; - } - - if (token.pos() >= 0) - setFormat(token.pos(), token.text().length(), color); - } - return; -}*/ - -Editor::Editor(QWidget* parent) : - QTextEdit(parent) -{ - d = new Private; - d->index = 0; - d->autoCompleteEnabled = true; - d->completion = new EditorCompletion(this); - d->completionTimer = new QTimer(this); - d->syntaxHighlightEnabled = true; - d->highlighter = new PythonHighlighter(this);//EditorHighlighter( this ); - - d->completionTimer->setSingleShot(true); - - //setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); - setWordWrapMode(QTextOption::NoWrap); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - //setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); - setAcceptRichText(false); - setAutoFormatting(AutoNone); - setTabChangesFocus(false); //true ); - - connect(d->completion, SIGNAL(selectedCompletion(const QString&)), - SLOT(autoComplete(const QString&))); - connect(this, SIGNAL(textChanged()), SLOT(checkAutoComplete())); - connect(d->completionTimer, SIGNAL(timeout()), SLOT(triggerAutoComplete())); - - setHighlightColor(Number, QColor(0, 0, 127)); - setHighlightColor(FunctionName, QColor(85, 0, 0)); - setHighlightColor(Variable, QColor(0, 85, 0)); - setHighlightColor(MatchedPar, QColor(255, 255, 183)); -} - -Editor::~Editor() -{ - delete d; -} - -QSize Editor::sizeHint() const -{ - ensurePolished(); - - QFontMetrics fm = fontMetrics(); - int h = qMax(fm.lineSpacing(), 14) + 4; - int w = fm.width('x') * 17 + 4; - int m = frameWidth() * 2; - - QStyleOptionFrameV2 styleOptions; - styleOptions.rect = rect(); - styleOptions.palette = palette(); - styleOptions.state = QStyle::State_None; - - return style()->sizeFromContents( - QStyle::CT_LineEdit, &styleOptions, - QSize(w + m, h + m).expandedTo(QApplication::globalStrut())); -} - -QStringList Editor::history() const -{ - return d->history; -} - -void Editor::setHistory(const QStringList& h) -{ - d->history = h; - d->index = d->history.count(); -} - -bool Editor::autoCompleteEnabled() const -{ - return d->autoCompleteEnabled; -} - -void Editor::setAutoCompleteEnabled(bool enable) -{ - d->autoCompleteEnabled = enable; -} - -void Editor::appendHistory(const QString& text) -{ - if (text.isEmpty()) return; - - QString lastText; - if (d->history.count()) - lastText = d->history[d->history.count() - 1]; - if (text == lastText) return; - - d->history.append(text); - d->index = d->history.count(); -} - -void Editor::clearHistory() -{ - d->history.clear(); - d->index = 0; -} - -void Editor::moveCursorToEnd() -{ - QTextCursor cursor = textCursor(); - cursor.movePosition(QTextCursor::End); - setTextCursor(cursor); -} - -void Editor::setPlainText(const QString &txt) -{ - QTextEdit::setPlainText(txt); -} - -void Editor::checkAutoComplete() -{ - if (!d->autoCompleteEnabled) - return; - - d->completionTimer->stop(); - d->completionTimer->start(500); -} - -void Editor::triggerAutoComplete() -{ - if (!d->autoCompleteEnabled) return; - /*// tokenize the expression (don't worry, this is very fast) - // faster now that it uses flex. ;) - QTextCursor cursor = textCursor(); - cursor.movePosition(QTextCursor::Start, QTextCursor::KeepAnchor); - - QString subtext = cursor.selectedText(); - TokenList tokens = Lexer::tokenize(subtext); - - if (tokens.isEmpty() || subtext.endsWith(" ")) - return; - - Token lastToken = tokens[tokens.count() - 1]; - - // last token must be an identifier - if (lastToken.type() != Token::Identifier) - return; - - QString id = lastToken.text(); - if (id.isEmpty()) - return; - - // find matches in function names - QStringList fnames = FunctionManager::instance()->functionList(FunctionManager::All); - QStringList choices; - - foreach(QString str, fnames) - { - if (str.startsWith(id, Qt::CaseInsensitive)) - { - ::Function* f = FunctionManager::instance()->function(str); - if (f && !f->description.isEmpty()) - str.append(':').append(f->description); - - choices.append(str); - } - } - - choices.sort(); - - // find matches in variables names - QStringList vchoices; - QStringList values = ValueManager::instance()->valueNames(); - - for (QStringList::ConstIterator it = values.begin(); it != values.end(); ++it) - if ((*it).startsWith(id, Qt::CaseInsensitive)) - { - QString choice = ValueManager::description(*it); - if (choice.isEmpty()) - choice = ValueManager::instance()->value(*it).toString(); - - vchoices.append(QString("%1:%2").arg(*it, choice)); - } - - vchoices.sort(); - choices += vchoices; - - // no match, don't bother with completion - if (choices.isEmpty()) - return; - - // one match, complete it for the user - if (choices.count() == 1) - { - QString str = choices[0].split(':')[0]; - - // single perfect match, no need to give choices. - if (str == id.toLower()) - return; - - str = str.remove(0, id.length()); - - blockSignals(true); - - cursor = textCursor(); - cursor.insertText(str); - cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, str.length()); - setTextCursor(cursor); - - blockSignals(false); - return; - } - - // present the user with completion choices - d->completion->showCompletion(choices);*/ -} - -void Editor::autoComplete(const QString& item) -{ - /*if (!d->autoCompleteEnabled || item.isEmpty()) - return; - - QTextCursor cursor = textCursor(); - cursor.movePosition(QTextCursor::Start, QTextCursor::KeepAnchor); - - TokenList tokens = Lexer::tokenize(cursor.selectedText()); - - if (tokens.isEmpty()) - return; - - Token lastToken = tokens[tokens.count() - 1]; - if (lastToken.type() != Token::Identifier) - return; - - QStringList str = item.split(':'); - - blockSignals(true); - - cursor.setPosition(lastToken.pos()); - cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, lastToken.text().length()); - cursor.insertText(str[0]); - - setTextCursor(cursor); - - blockSignals(false);*/ -} - -void Editor::historyBack() -{ - if (d->history.isEmpty()) - return; - - d->index--; - if (d->index < 0) - d->index = 0; - - if (d->index >= d->history.count() - 1) - { - if (!(toPlainText().isEmpty())) - d->unExecuted = toPlainText(); - else - d->unExecuted = QString(""); - } - - if (d->index >= 0 && d->index < d->history.count()) - setPlainText(d->history[d->index]); - - QTextCursor cursor = textCursor(); - cursor.movePosition(QTextCursor::End); - setTextCursor(cursor); - - ensureCursorVisible(); -} - -void Editor::goToHistoryStart() -{ - d->index = d->history.count(); - setPlainText(d->unExecuted); //tr("") ); -} - -void Editor::historyForward() -{ - if (d->history.isEmpty()) - return; - - if (d->index < d->history.count()) - d->index++; - - if (d->index >= d->history.count()) - { - d->index = d->history.count(); - setPlainText(d->unExecuted); //tr("") ); - } - else - { - setPlainText(d->history[d->index]); - } - - QTextCursor cursor = textCursor(); - cursor.movePosition(QTextCursor::End); - setTextCursor(cursor); - - ensureCursorVisible(); -} - -void Editor::mousePressEvent(QMouseEvent *e) -{ - if (e->button() == Qt::RightButton) - { - - } - QTextEdit::mousePressEvent(e); -} - -void Editor::keyPressEvent(QKeyEvent* e) -{ - if (e->key() == Qt::Key_PageUp)//&& e->modifiers() == Qt::CTRL ) - { - historyBack(); - //e->accept(); - return; - } - - if (e->key() == Qt::Key_PageDown)//&& e->modifiers() == Qt::CTRL ) - { - historyForward(); - //e->accept(); - return; - } - - if ((e->key() == Qt::Key_Enter && e->modifiers() == Qt::CTRL) || - (e->key() == Qt::Key_Return && e->modifiers() == Qt::CTRL)) - { - d->unExecuted = QString(""); - emit ctrlReturnPressed(); - return; - } - /* - if( e->key() == Qt::Key_Left || - e->key() == Qt::Key_Right || - e->key() == Qt::Key_Home || - e->key() == Qt::Key_End ) - { - //checkMatching(); - } - */ - QTextEdit::keyPressEvent(e); -} - -void Editor::wheelEvent(QWheelEvent *e) -{ - /*if( e->delta() > 0 ) - historyBack(); - else if( e->delta() < 0 ) - historyForward(); - - e->accept(); - */ - QTextEdit::wheelEvent(e); -} - -void Editor::setSyntaxHighlight(bool enable) -{ - d->syntaxHighlightEnabled = enable; - d->highlighter->rehighlight(); -} - -bool Editor::isSyntaxHighlightEnabled() const -{ - return d->syntaxHighlightEnabled; -} - -void Editor::setHighlightColor(ColorType type, QColor color) -{ - d->highlightColors[type] = color; - d->highlighter->rehighlight(); -} - -QColor Editor::highlightColor(ColorType type) -{ - return d->highlightColors[type]; -} - - -EditorCompletion::EditorCompletion(Editor* editor) : QObject(editor) -{ - d = new Private; - d->editor = editor; - - d->completionPopup = new QFrame(editor->topLevelWidget()); - d->completionPopup->setWindowFlags(Qt::Popup); - d->completionPopup->setFrameStyle(QFrame::Box | QFrame::Plain); - d->completionPopup->setLineWidth(1); - d->completionPopup->installEventFilter(this); - d->completionPopup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); - - QLayout *layout = new QVBoxLayout(d->completionPopup); - layout->setMargin(0); - - d->completionListBox = new QListWidget(d->completionPopup); - d->completionPopup->setFocusProxy(d->completionListBox); - d->completionListBox->setFrameStyle(QFrame::NoFrame); - //d->completionListBox->setVariableWidth( true ); - d->completionListBox->installEventFilter(this); - - layout->addWidget(d->completionListBox); -} - -EditorCompletion::~EditorCompletion() -{ - delete d; -} - -bool EditorCompletion::eventFilter(QObject *obj, QEvent *ev) -{ - if (obj == d->completionPopup || obj == d->completionListBox) - { - - if (ev->type() == QEvent::KeyPress) - { - QKeyEvent *ke = (QKeyEvent*)ev; - if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) - { - doneCompletion(); - return true; - } - else if (ke->key() == Qt::Key_Left || ke->key() == Qt::Key_Right || - ke->key() == Qt::Key_Up || ke->key() == Qt::Key_Down || - ke->key() == Qt::Key_Home || ke->key() == Qt::Key_End || - ke->key() == Qt::Key_PageUp || ke->key() == Qt::Key_PageDown) - return false; - - d->completionPopup->close(); - d->editor->setFocus(); - QApplication::sendEvent(d->editor, ev); - return true; - } - - if (ev->type() == QEvent::MouseButtonDblClick) - { - doneCompletion(); - return true; - } - - } - - return false; -} - -void EditorCompletion::doneCompletion() -{ - d->completionPopup->close(); - d->editor->setFocus(); - emit selectedCompletion(d->completionListBox->currentItem()->text()); -} - -void EditorCompletion::showCompletion(const QStringList &choices) -{ - static bool shown = false; - - if (choices.isEmpty()) - return; - - d->completionListBox->clear(); - int maxWidth = 0; - for (int i = 0; i < choices.count(); i++) - { - ChoiceItem *item = new ChoiceItem(choices[i], d->completionListBox); - int itemMaxWidth = item->nameWidth(); - - if (itemMaxWidth > maxWidth) - maxWidth = itemMaxWidth; - } - - for (unsigned i = 0; i < d->completionListBox->count(); ++i) - { - ChoiceItem *item = static_cast(d->completionListBox->item(i)); - item->setMinNameWidth(maxWidth); - } - - d->completionListBox->setCurrentItem(0); - - // size of the pop-up - d->completionPopup->setMaximumHeight(120); - d->completionPopup->resize( - d->completionListBox->sizeHint() + - QSize( - d->completionListBox->verticalScrollBar()->width() + 4, - d->completionListBox->horizontalScrollBar()->height() + 4)); - - if (!shown) - { - d->completionPopup->show(); - QTimer::singleShot(0, this, SLOT(moveCompletionPopup())); - } - else - { - moveCompletionPopup(); - d->completionPopup->show(); - } -} - -void EditorCompletion::moveCompletionPopup() -{ - /*int h = d->completionListBox->height(); - int w = d->completionListBox->width(); - - // position, reference is editor's cursor position in global coord - QFontMetrics fm(d->editor->font()); - - // int pixelsOffset = fm.width( d->editor->text(), curPos ); - // pixelsOffset -= d->editor->contentsX(); - QPoint pos = d->editor->mapToGlobal(QPoint(d->editor->cursorRect().right(), d->editor->height())); - - // if popup is partially invisible, move to other position - NETRootInfo info(QX11Info::display(), - NET::CurrentDesktop | NET::WorkArea | NET::NumberOfDesktops, - -1, false); - info.activate(); // wtf is this needed for? - NETRect NETarea = info.workArea(info.currentDesktop()); - - QRect area(NETarea.pos.x, NETarea.pos.y, NETarea.size.width, NETarea.size.height); - - if (pos.y() + h > area.y() + area.height()) - pos.setY(pos.y() - h - d->editor->height()); - if (pos.x() + w > area.x() + area.width()) - pos.setX(area.x() + area.width() - w); - - d->completionPopup->move(pos); - d->completionListBox->setFocus();*/ -} - - diff --git a/topmodx/src/editor.h b/topmodx/src/editor.h deleted file mode 100644 index fd5f1e8..0000000 --- a/topmodx/src/editor.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef _EDITOR_H_ -#define _EDITOR_H_ - -#include - -enum ColorType -{ - Number, - FunctionName, - Variable, - MatchedPar -}; - -class QEvent; -class QKeyEvent; -class QWheelEvent; -class QWidget; -class Evaluator; -class QStringList; - -class Editor : public QTextEdit -{ - Q_OBJECT - -public: - Editor(QWidget* parent = 0); - ~Editor(); - - QSize sizeHint() const; - - QStringList history() const; - void setHistory(const QStringList& history); - void goToHistoryStart(); - - bool autoCompleteEnabled() const; - void setAutoCompleteEnabled(bool enable); - - void setSyntaxHighlight(bool enable); - bool isSyntaxHighlightEnabled() const; - - void setHighlightColor(ColorType type, QColor color); - QColor highlightColor(ColorType type); - -signals: - void ctrlReturnPressed(); - - public slots: - void appendHistory(const QString& text); - void clearHistory(); - - void moveCursorToEnd(); - - void setPlainText(const QString &txt); - - protected slots: - void checkAutoComplete(); - void triggerAutoComplete(); - void autoComplete(const QString& item); - void historyBack(); - void historyForward(); - -protected: - void mousePressEvent(QMouseEvent*); - void keyPressEvent(QKeyEvent*); - void wheelEvent(QWheelEvent*); - -private: - class Private; - Private* d; - Editor(const Editor&); - Editor& operator=(const Editor&); -}; - -class EditorCompletion : public QObject -{ - Q_OBJECT - -public: - EditorCompletion(Editor* editor); - ~EditorCompletion(); - - bool eventFilter(QObject *o, QEvent *e); - void doneCompletion(); - void showCompletion(const QStringList &choices); - - protected slots: - void moveCompletionPopup(); - -signals: - void selectedCompletion(const QString& item); - -private: - class Private; - Private* d; - EditorCompletion(const EditorCompletion&); - EditorCompletion& operator=(const EditorCompletion&); -}; - -#endif // _EDITOR_H_ diff --git a/topmodx/src/main.cc b/topmodx/src/main.cc deleted file mode 100644 index 402ec87..0000000 --- a/topmodx/src/main.cc +++ /dev/null @@ -1,202 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -/*! \mainpage TopMod Source Code Documentation - * - * \section intro_sec Introduction - * - * Welcome to the TopMod source code documentation. Here you will find descriptions of - * all the Namespaces, Classes, and other variables defined in the TopMod source code. - * This documentation was generated by - * Doxygen directly from the comments in the source code. Please see the "Related Pages" - * section for a Todo List of things that currently need to be implemented or completed - * in the TopMod source code. - * - * For other more current updates to the development, please click visit the - * TopMod Wiki and the Discussion Forum. - * - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -// #include - -#include "MainWindow.h" -#include "TopMod.h" - -#define max(a, b) (((a) < (b)) ? (b) : (a)) -#define min(x1,x2) ((x1)<(x2)?(x1):(x2)) - -// #ifdef TOPMOD_VERSION -// TOPMOD_VERSION 2.1 -// #endif - -#ifdef WITH_VERSE -Global G; -#endif - -#ifdef WITH_SPACENAV -#ifdef __APPLE__ -/* -#include "TdxDeviceWrappers.h" - -int TdxComputeAxes(const TdxDeviceAxes inArrayPtr) -{ -OSStatus err; -// CFStringRef txt; -// HIViewRef transField, rotatField; -// const HIViewID viewID1 = { '3Dm1', k3DxCarbonDemoTextFieldID1 }; -// const HIViewID viewID2 = { '3Dm1', k3DxCarbonDemoTextFieldID2 }; -char st[128]; - -//fprintf(stderr, "TdxComputeAxes...\n"); - -// // find the refs of the EditText controls we want to write into -// err = HIViewFindByID(HIViewGetRoot(gWindow), viewID1, &transField); -// assert(err == noErr); -// err = HIViewFindByID(HIViewGetRoot(gWindow), viewID2, &rotatField); -// assert(err == noErr); - -// write the values into the 1st EditText control -// sprintf(st, "(%hd, %hd, %hd)", inArrayPtr[0], inArrayPtr[1], inArrayPtr[2]); -// txt = CFStringCreateWithCString(nullptr, st, kCFStringEncodingUTF8); -// err = SetControlData(transField, -// kControlEntireControl, -// kControlEditTextCFStringTag, -// sizeof(txt), -// &txt); -// CFRelease(txt); -// -// // write the values into the 2nd EditText control -// sprintf(st, "(%hd, %hd, %hd)", inArrayPtr[3], inArrayPtr[4], inArrayPtr[5]); -// txt = CFStringCreateWithCString(nullptr, st, kCFStringEncodingUTF8); -// err = SetControlData(rotatField, -// kControlEntireControl, -// kControlEditTextCFStringTag, -// sizeof(txt), -// &txt); -// CFRelease(txt); - -return err; -} - -int TdxComputeButtons(UInt16 btnPressed, SInt16 btnState) -{ -OSStatus err; -// QMessageBox::about(0, "About TopMod","SPACE NAV"); - -// CFStringRef txt; -// HIViewRef txtField; -// const HIViewID viewID3 = { '3Dm1', k3DxCarbonDemoTextFieldID3 }; -// char st[128]; -// -// fprintf(stderr, "TdxComputeButtons...\n"); -// -// -// find the ref of the EditText control we want to write into -// err = HIViewFindByID(HIViewGetRoot(gWindow), viewID3, &txtField); -// assert(err == noErr); -// -// // write the values into the EditText control -// sprintf(st, "last:%hu status:%hd", btnPressed, btnState); -// txt = CFStringCreateWithCString(nullptr, st, kCFStringEncodingUTF8); -// err = SetControlData(txtField, -// kControlEntireControl, -// kControlEditTextCFStringTag, -// sizeof(txt), -// &txt); -// assert(err == noErr); -// CFRelease(txt); - -return err; -} - - -int TdxComputeEventZero() -{ -static SInt16 zero[6]; -memset(zero, 0, sizeof(zero)); - -//fprintf(stderr, "TdxComputeEventZero...\n"); - - -// in this case, just process the zero event like any other axes event. -return TdxComputeAxes(zero); -}//*/ -#endif -#endif - -#include -int main( int argc, char **argv ) { - -#if QT_VERSION > QT_VERSION_CHECK(5, 5, 0) - qunsetenv("QT_DEVICE_PIXEL_RATIO"); - qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", QByteArray("1")); -#else - qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("0")); -#endif - - TopMod app(argc, argv, true); - QApplication::setWindowIcon(QIcon(":/images/topmod.png")); - - //this is a preliminary version of a splash screen functionality. - //the app opens so quickly it is hardly shown, so i will consider adding a delay - QPixmap pixmap(":/images/splash.png"); - QSplashScreen *splash = new QSplashScreen(pixmap, Qt::WindowStaysOnTopHint); - splash->setMask(pixmap.mask()); - splash->setGeometry(300, 200, splash->width(), splash->height()); - splash->show(); - // splash->showMessage("doin stuff..."); - app.processEvents(); - //artificial delay for now to debug, and to give mad props to the developers - // splash->finish(app.getMainWindow()); - QTimer::singleShot(1000, splash, SLOT(hide())); - -#ifdef WITH_SPACENAV -#ifdef __APPLE__ - //3d connexion stuff ... isn't working right now - // OSStatus err; - // err = TdxInitDevice('TopM', TRUE, kConnexionClientModeTakeOver, kConnexionMaskAll); - //pass kConnexionClientModeTakeOver as the mode and try kConnexionMaskAxis | kConnexionMaskButtons as the mask. kConnexionMaskAll should also work. -#endif -#endif - - return app.exec(); -} diff --git a/topmodx/src/qcumber.h b/topmodx/src/qcumber.h deleted file mode 100644 index 6a97e55..0000000 --- a/topmodx/src/qcumber.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Created using Edyuk IDE 0.8.0 -** -** File : qcumber.h -** Date : Fri Feb 2 21:07:45 2007 -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#ifndef _QCUMBER_H_ -#define _QCUMBER_H_ - -#ifdef _QCUMBER_BUILD_ -#if (defined(QT_DLL) || defined(QT_SHARED)) && !defined(QT_PLUGIN) -#define QCUMBER_EXPORT Q_DECL_EXPORT -#else -#define QCUMBER_EXPORT Q_DECL_IMPORT -#endif -#else -#define QCUMBER_EXPORT -#endif - -#include - -namespace QCumber -{ -enum Events -{ - FirstEvent = QEvent::User + 100, - - SystemRequestEvent = FirstEvent, - CustomRequestEvent, - - LastEvent -}; - -} - -#endif // _QCUMBER_H_ diff --git a/topmodx/src/qshortcutdialog.cc b/topmodx/src/qshortcutdialog.cc deleted file mode 100644 index e40f155..0000000 --- a/topmodx/src/qshortcutdialog.cc +++ /dev/null @@ -1,598 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -/**************************************************************************** -** -** Copyright (C) 2006 FullMetalCoder -** -** This file is part of the Edyuk project (beta version) -** -** This file may be used under the terms of the GNU General Public License -** version 2 as published by the Free Software Foundation and appearing in the -** file GPL.txt included in the packaging of this file. -** -** Notes : Parts of the project are derivative work of Trolltech's QSA library -** or Trolltech's Qt4 framework but, unless notified, every single line of code -** is the work of the Edyuk team or a contributor. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#include "qshortcutdialog.h" - -#include "qshortcutmanager.h" - -/*! - \file qshortcutdialog.cpp - \brief Implementation of the QShortcutDialog class - - \see QShortcutDialog -*/ - -// #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*! - \ingroup gui - @{ - - \class QShortcutDialog - \brief A simple dialog used to set shortcuts on run-time. - - \note Changes are immediately propagated to the registered actions - - \see QShortcutDialog -*/ - -static QHash keyMap; - -static void initKeyMap() -{ - if (!keyMap.isEmpty()) - return; - - /* - I'm a bit unsure about these one... - */ - keyMap[Qt::Key_Escape] = "Escape"; - keyMap[Qt::Key_Space] = "Space"; - keyMap[Qt::Key_Return] = "Return"; - keyMap[Qt::Key_Enter] = "Enter"; - keyMap[Qt::Key_Insert] = "Ins"; - keyMap[Qt::Key_Delete] = "Delete"; - keyMap[Qt::Key_Home] = "Home"; - keyMap[Qt::Key_End] = "End"; - keyMap[Qt::Key_Left] = "Left"; - keyMap[Qt::Key_Up] = "Up"; - keyMap[Qt::Key_Right] = "Right"; - keyMap[Qt::Key_Down] = "Down"; - keyMap[Qt::Key_PageUp] = "PageUp"; - keyMap[Qt::Key_PageDown] = "PageDown"; - keyMap[Qt::Key_CapsLock] = "CapsLock"; - keyMap[Qt::Key_NumLock] = "NumLock"; - keyMap[Qt::Key_ScrollLock] = "ScrollLock"; - - /* - These one are quite sure... - */ - keyMap[Qt::Key_F1] = "F1"; - keyMap[Qt::Key_F2] = "F2"; - keyMap[Qt::Key_F3] = "F3"; - keyMap[Qt::Key_F4] = "F4"; - keyMap[Qt::Key_F5] = "F5"; - keyMap[Qt::Key_F6] = "F6"; - keyMap[Qt::Key_F7] = "F7"; - keyMap[Qt::Key_F8] = "F8"; - keyMap[Qt::Key_F9] = "F9"; - keyMap[Qt::Key_F10] = "F10"; - keyMap[Qt::Key_F11] = "F11"; - keyMap[Qt::Key_F12] = "F12"; - keyMap[Qt::Key_F13] = "F13"; - keyMap[Qt::Key_F14] = "F14"; - keyMap[Qt::Key_F15] = "F15"; - keyMap[Qt::Key_F16] = "F16"; - keyMap[Qt::Key_F17] = "F17"; - keyMap[Qt::Key_F18] = "F18"; - keyMap[Qt::Key_F19] = "F19"; - keyMap[Qt::Key_F20] = "F20"; - keyMap[Qt::Key_F21] = "F21"; - keyMap[Qt::Key_F22] = "F22"; - keyMap[Qt::Key_F23] = "F23"; - keyMap[Qt::Key_F24] = "F24"; - keyMap[Qt::Key_F25] = "F25"; - keyMap[Qt::Key_F26] = "F26"; - keyMap[Qt::Key_F27] = "F27"; - keyMap[Qt::Key_F28] = "F28"; - keyMap[Qt::Key_F29] = "F29"; - keyMap[Qt::Key_F30] = "F30"; - keyMap[Qt::Key_F31] = "F31"; - keyMap[Qt::Key_F32] = "F32"; - keyMap[Qt::Key_F33] = "F33"; - keyMap[Qt::Key_F34] = "F34"; - keyMap[Qt::Key_F35] = "F35"; - - keyMap[Qt::Key_Exclam] = "!"; - keyMap[Qt::Key_QuoteDbl] = "\""; - keyMap[Qt::Key_NumberSign] = "-"; - keyMap[Qt::Key_Dollar] = "$"; - keyMap[Qt::Key_Percent] = "%"; - keyMap[Qt::Key_Ampersand] = "&"; - keyMap[Qt::Key_Apostrophe] = "\'"; - keyMap[Qt::Key_ParenLeft] = "("; - keyMap[Qt::Key_ParenRight] = ")"; - keyMap[Qt::Key_Asterisk] = "*"; - keyMap[Qt::Key_Plus] = "+"; - keyMap[Qt::Key_Comma] = ","; - keyMap[Qt::Key_Minus] = "-"; - keyMap[Qt::Key_Period] = "Period"; - keyMap[Qt::Key_Slash] = "/"; - - keyMap[Qt::Key_0] = "0"; - keyMap[Qt::Key_1] = "1"; - keyMap[Qt::Key_2] = "2"; - keyMap[Qt::Key_3] = "3"; - keyMap[Qt::Key_4] = "4"; - keyMap[Qt::Key_5] = "5"; - keyMap[Qt::Key_6] = "6"; - keyMap[Qt::Key_7] = "7"; - keyMap[Qt::Key_8] = "8"; - keyMap[Qt::Key_9] = "9"; - - keyMap[Qt::Key_Colon] = ":"; - keyMap[Qt::Key_Semicolon] = ";"; - keyMap[Qt::Key_Less] = "<"; - keyMap[Qt::Key_Equal] = "="; - keyMap[Qt::Key_Greater] = ">"; - keyMap[Qt::Key_Question] = "?"; - keyMap[Qt::Key_At] = "@"; - - keyMap[Qt::Key_A] = "A"; - keyMap[Qt::Key_B] = "B"; - keyMap[Qt::Key_C] = "C"; - keyMap[Qt::Key_D] = "D"; - keyMap[Qt::Key_E] = "E"; - keyMap[Qt::Key_F] = "F"; - keyMap[Qt::Key_G] = "G"; - keyMap[Qt::Key_H] = "H"; - keyMap[Qt::Key_I] = "I"; - keyMap[Qt::Key_J] = "J"; - keyMap[Qt::Key_K] = "K"; - keyMap[Qt::Key_L] = "L"; - keyMap[Qt::Key_M] = "M"; - keyMap[Qt::Key_N] = "N"; - keyMap[Qt::Key_O] = "O"; - keyMap[Qt::Key_P] = "P"; - keyMap[Qt::Key_Q] = "Q"; - keyMap[Qt::Key_R] = "R"; - keyMap[Qt::Key_S] = "S"; - keyMap[Qt::Key_T] = "T"; - keyMap[Qt::Key_U] = "U"; - keyMap[Qt::Key_V] = "V"; - keyMap[Qt::Key_W] = "W"; - keyMap[Qt::Key_X] = "X"; - keyMap[Qt::Key_Y] = "Y"; - keyMap[Qt::Key_Z] = "Z"; - - keyMap[Qt::Key_BracketLeft] = "["; - keyMap[Qt::Key_Backslash] = "\\"; - keyMap[Qt::Key_BracketRight] = "]"; - - keyMap[Qt::Key_Underscore] = "_"; - keyMap[Qt::Key_BraceLeft] = "{"; - keyMap[Qt::Key_Bar] = "|"; - keyMap[Qt::Key_BraceRight] = "}"; - keyMap[Qt::Key_AsciiTilde] = "~"; - -} - -static QString keyToString(int k) -{ - if (k == Qt::Key_Shift || k == Qt::Key_Control || k == Qt::Key_Meta || - k == Qt::Key_Alt || k == Qt::Key_AltGr) - return QString::null; - - initKeyMap(); - - return keyMap[k]; -} - -static QStringList modToString(Qt::KeyboardModifiers k) -{ - QStringList l; - - if (k & Qt::ShiftModifier) - l << QShortcut::tr("Shift"); - if (k & Qt::ControlModifier) - l << QShortcut::tr("Ctrl"); - if (k & Qt::AltModifier) - l << QShortcut::tr("Alt"); - if (k & Qt::MetaModifier) - l << QShortcut::tr("Meta"); - if (k & Qt::KeypadModifier) - ; - - return l; -} - -class ShortcutGetter : public QDialog -{ - // Q_OBJECT -public: - ShortcutGetter(QWidget *p = 0) - : QDialog(p) - { - setWindowTitle(tr("Shortcut getter")); - - QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(2); - vbox->setSpacing(4); - - QLabel *l = new QLabel(this); - l->setText(tr("Press the key combination\nyou want to assign.")); - vbox->addWidget(l); - - leKey = new QLineEdit(this); - leKey->setReadOnly(true); - leKey->installEventFilter(this); - vbox->addWidget(leKey); - - QHBoxLayout *hbox = new QHBoxLayout; - hbox->setMargin(2); - hbox->setSpacing(4); - - QPushButton *b; - - b = new QPushButton(QIcon(":/ok.png"), tr("OK"), this); - connect(b, SIGNAL(clicked()), - this, SLOT(accept())); - hbox->addWidget(b); - - b = new QPushButton(QIcon(":/cancel.png"), tr("Cancel"), this); - connect(b, SIGNAL(clicked()), - this, SLOT(reject())); - hbox->addWidget(b); - - vbox->addLayout(hbox); - } - - QString exec(const QString& s) - { - bStop = false; - leKey->setText(s); - - if (QDialog::exec() == QDialog::Accepted) - return leKey->text(); - - return QString(); - } - -protected: - bool event(QEvent *e) - { - QString key; - QStringList mods; - QKeyEvent *k = static_cast(e); - - switch (e->type()) - { - case QEvent::KeyPress: - - if (bStop) - { - lKeys.clear(); - bStop = false; - - } - - - key = keyToString(k->key()); - mods = modToString(k->modifiers()); - - if (key.count() || mods.count()) - { - - if (key.count() && !lKeys.contains(key)) - lKeys << key; - - foreach(key, mods) - if (!lKeys.contains(key)) - lKeys << key; - - } - else - { - key = k->text(); - - if (!lKeys.contains(key)) - lKeys << key; - } - - setText(); - break; - - case QEvent::KeyRelease: - - bStop = true; - break; - - /* - case QEvent::ShortcutOverride : - leKey->setText("Shortcut override"); - break; - */ - - default: - return QDialog::event(e); - break; - } - - return true; - } - - bool eventFilter(QObject *o, QEvent *e) - { - if (e->type() == QEvent::KeyPress || - e->type() == QEvent::KeyRelease) - return event(e); - else - return QDialog::eventFilter(o, e); - } - - void setText() - { - QStringList seq; - - if (lKeys.contains(QShortcut::tr("Shift"))) - seq << QShortcut::tr("Shift"); - - if (lKeys.contains(QShortcut::tr("Ctrl"))) - seq << QShortcut::tr("Ctrl"); - - if (lKeys.contains(QShortcut::tr("Alt"))) - seq << QShortcut::tr("Alt"); - - if (lKeys.contains(QShortcut::tr("Meta"))) - seq << QShortcut::tr("Meta"); - - foreach(QString s, lKeys) - if (s != QShortcut::tr("Shift") && s != QShortcut::tr("Ctrl") - && s != QShortcut::tr("Alt") && s != QShortcut::tr("Meta")) - seq << s; - - leKey->setText(seq.join("+")); - } - -private: - bool bStop; - QLineEdit *leKey; - QStringList lKeys; -}; - -enum NodeType -{ - Null, - Menu, - Action -}; - -QShortcutDialog::QShortcutDialog(QShortcutManager *m, QWidget *p) - : QWidget(p), pManager(m) -{ - setupUi(this); -} - -void QShortcutDialog::retranslate() -{ - retranslateUi(this); -} - -void QShortcutDialog::exec() -{ - twShortcuts->clear(); - - /* - QMultiHash map; - map = pManager->shortcuts(); - - QMultiHash::const_iterator i; - - for ( i = map.begin(); i != map.end(); i++ ) - { - QStringList cxt = QString(i.key()).split("/"); - - if ( cxt.isEmpty() ) - continue; - - QString name = i->name(), - shortcut = i->shortcut(); - - QList l; - l = twShortcuts->findItems(cxt.at(0), Qt::MatchExactly, 0); - - QTreeWidgetItem *child, *item; - - if ( l.count() ) - { - item = l.at(0); - } else { - item = new QTreeWidgetItem(QStringList(cxt.at(0)), Menu); - twShortcuts->addTopLevelItem(item); - } - - cxt.removeAt(0); - - foreach ( QString s, cxt ) - { - if ( !item->childCount() ) - { - child = new QTreeWidgetItem(QStringList(s), Menu); - item->addChild(child); - item = child; - continue; - } - - for ( int j = 0; j < item->childCount(); j++ ) - { - child = item->child(j); - - if ( child->text(0) == s ) - { - item = child; - break; - } else if ( j == (item->childCount() - 1) ) { - child = new QTreeWidgetItem(QStringList(s), Menu); - item->addChild(child); - item = child; - break; - } - } - } - - child = new QTreeWidgetItem(QStringList(name) << shortcut, Action); - - item->addChild(child); - } - */ - - for (auto i = pManager->m_actions.begin(); i != pManager->m_actions.end(); i++) - { - QStringList cxt = QString(i.key()).split("/"); - - if (cxt.isEmpty() || i->isEmpty()) - continue; - - QString name = cxt.takeAt(cxt.count() - 1); - QString shortcut = i->at(0)->shortcut().toString(); - - QList l; - l = twShortcuts->findItems(cxt.at(0), Qt::MatchExactly, 0); - - QTreeWidgetItem *child, *item; - - if (l.count()) - { - item = l.at(0); - } - else - { - item = new QTreeWidgetItem(QStringList(cxt.at(0)), Menu); - twShortcuts->addTopLevelItem(item); - twShortcuts->expandItem(item); - } - - cxt.removeAt(0); - - foreach(QString s, cxt) - { - if (!item->childCount()) - { - child = new QTreeWidgetItem(QStringList(s), Menu); - item->addChild(child); - item = child; - continue; - } - - for (int j = 0; j < item->childCount(); j++) - { - child = item->child(j); - - if (child->text(0) == s) - { - item = child; - break; - } - else if (j == (item->childCount() - 1)) - { - child = new QTreeWidgetItem(QStringList(s), Menu); - item->addChild(child); - item = child; - break; - } - } - } - - child = new QTreeWidgetItem(QStringList(name) << shortcut, Action); - - item->addChild(child); - } - - // QDialog::exec(); - twShortcuts->resizeColumnToContents(0); - - pManager->writeXml(); -} - -void QShortcutDialog::on_twShortcuts_itemDoubleClicked(QTreeWidgetItem *i, int col) -{ - if (!i || col != 1) - return; - - if (i->type() != Action) - return; - - - QStringList cxt; - QString name = i->text(0); - - QTreeWidgetItem *p = i->parent(); - - while (p) - { - cxt.prepend(p->text(0)); - - p = p->parent(); - } - - QString ns; - - ns = ShortcutGetter().exec(pManager->node(name, cxt.join("/")).attribute("shortcut")); - - if (ns.isNull()) - return; - - i->setText(1, ns); - pManager->apply(ns, cxt.join("/") + "/" + name); -} - -/*! @} */ diff --git a/topmodx/src/qshortcutdialog.h b/topmodx/src/qshortcutdialog.h deleted file mode 100644 index 67f82f2..0000000 --- a/topmodx/src/qshortcutdialog.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** -** -** Copyright (C) 2006 FullMetalCoder -** -** This file is part of the Edyuk project (beta version) -** -** This file may be used under the terms of the GNU General Public License -** version 2 as published by the Free Software Foundation and appearing in the -** file GPL.txt included in the packaging of this file. -** -** Notes : Parts of the project are derivative work of Trolltech's QSA library -** or Trolltech's Qt4 framework but, unless notified, every single line of code -** is the work of the Edyuk team or a contributor. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#ifndef _QSHORTCUT_DIALOG_H_ -#define _QSHORTCUT_DIALOG_H_ - -#include "qcumber.h" - -#include "ui_shortcutdialog.h" - -#include - -/*! - \file qshortcutdialog.h - \brief Definition of the QShortcutDialog class - - \see QShortcutDialog -*/ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - - -#include -#include - -class QTreeWidgetItem; -class QShortcutManager; - -class QCUMBER_EXPORT QShortcutDialog : public QWidget, private Ui::ShortcutDialog -{ - Q_OBJECT - -public: - QShortcutDialog(QShortcutManager *m, QWidget *p = 0); - void retranslate(); - void exec(); - - private slots: - void on_twShortcuts_itemDoubleClicked(QTreeWidgetItem *i, int col); - -private: - QShortcutManager *pManager; - -}; - -#endif // _DEV_SHORTCUT_DIALOG_H_ diff --git a/topmodx/src/qshortcutmanager.cc b/topmodx/src/qshortcutmanager.cc deleted file mode 100644 index 1f7f76b..0000000 --- a/topmodx/src/qshortcutmanager.cc +++ /dev/null @@ -1,447 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - - -/**************************************************************************** -** -** Copyright (C) 2006 FullMetalCoder -** -** This file is part of the Edyuk project (beta version) -** -** This file may be used under the terms of the GNU General Public License -** version 2 as published by the Free Software Foundation and appearing in the -** file GPL.txt included in the packaging of this file. -** -** Notes : Parts of the project are derivative work of Trolltech's QSA library -** or Trolltech's Qt4 framework but, unless notified, every single line of code -** is the work of the Edyuk team or a contributor. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#include "qshortcutmanager.h" - -#include "qshortcutdialog.h" - -#include - -/*! -\file qshortcutmanager.cpp -\brief implementation of the QShortcutManager class - -\see QShortcutManager -*/ - -/*! -\class QShortcutManager -\brief Generic shortcut management class. - -This class manages shortcuts for the complete application, plugins included. -The only thing needed is to register actions and to make sure not to override -shortcuts of managed actions. - -\see registerAction() -\see unregisterAction() -*/ - -#include -#include -#include -// #include "qtglogal.h" -//typedef void* quintptr; // Has a previous declaration Qt 4.2 - -/*! -\brief Constructor -*/ -QShortcutManager::QShortcutManager() - : sLang("en_us") -{ - pDialog = new QShortcutDialog(this); - pDoc = new QDomDocument("SHORTCUTS"); - readXml(); -} - -/*! -\brief Destructor -*/ -QShortcutManager::~QShortcutManager() -{ - writeXml(); - - delete pDoc; -} - -QShortcutDialog* QShortcutManager::getShortcutDialog() -{ - return pDialog; -} - -/*! -\brief Shows the shortcut configuration dialog -*/ -void QShortcutManager::configure() -{ - pDialog->exec(); -} - -/*! -\brief Applies the changes -*/ -void QShortcutManager::applyAll() -{ - -} - -/*! -\brief Applies the change -*/ -void QShortcutManager::apply(const QString& s, const QString& t) -{ - QHash::iterator i; - -#ifdef _DEBUG_ - //qDebug("target = %s;", qPrintable(t)); -#endif - - QStringList l = t.split('/'); - - QString name = l.takeAt(l.count() - 1); - QString context = l.join("/"); - - if (s.count()) - { - if (m_shortcuts.contains(s)) - { - if (m_shortcuts.value(s) == t) - return; - - apply("", m_shortcuts.value(s)); - } - - m_shortcuts[s] = t; - } - -#ifdef _DEBUG_ - qDebug("context = %s; name = %s; shortcut = %s;", - qPrintable(context), - qPrintable(name), - qPrintable(s)); -#endif - - QDomElement e = node(name, context); - - // update XML config file - e.setAttribute("shortcut", s); - - // apply shortcut sequences to registered actions - for (QAction *a : m_actions[t]) - { - a->setShortcut(s); - } - -} - -/*! -\brief changes shortcut data according to \a lang - -\param lang current language - -If another language was previously managed, shortcuts are automatically -saved. -*/ -void QShortcutManager::languageChanged(const QString& lang) -{ - if (lang == sLang) - return; - -#ifdef _DEBUG_ - qDebug() << "giving up " << sLang << " and switching to " << lang; -#endif - - // save previous shortcuts - writeXml(); - - sLang = lang; - - // read new shortcuts - readXml(); - - QHash >::iterator i; - - for (i = m_actions.begin(); i != m_actions.end(); i++) - { - QDomElement e = node(i.key().section('/', -1), i.key().section('/', 0, -2)); - QString ks = e.attribute("shortcut"); - - if (ks.isEmpty()) - { - apply(e.attribute("default"), i.key()); - } - else - { - apply(ks, i.key()); - } - } - - pDialog->retranslate(); -} - -/*! -\internal -*/ -void QShortcutManager::readXml() -{ - QFile f(file(sLang)); - -#ifdef _EDYUK_DEBUG_ - qDebug() << "reading xml shortcut file : " << file(sLang) << " ..."; -#endif - - if (!f.open(QFile::ReadOnly | QFile::Text)) - { - if (!f.open(QFile::WriteOnly | QFile::Text)) - qWarning("Unable to access shortcuts..."); - - QString s = "\n\n\n\n"; - - QTextStream out(&f); - out << s; - - f.close(); - - if (!f.open(QFile::ReadOnly | QFile::Text)) - return (void)qWarning("Unable to access shortcuts..."); - } - - if (!pDoc->setContent(&f) || pDoc->documentElement().isNull()) - { - QDomElement root = pDoc->createElement("SHORTCUTS"); - - pDoc->appendChild(root); - } -} - -/*! -\internal -*/ -void QShortcutManager::writeXml() -{ - if (!sLang.isEmpty()) - { - QFile prev(file(sLang)); - QTextStream out(&prev); - - if (prev.open(QFile::WriteOnly | QFile::Text)) - out << pDoc->toString(4).replace(" ", "\t"); - else - qWarning("Can\'t save %s shortcuts : check out permissions", - qPrintable(sLang)); - } -} - -/*! -\brief check if action \a a is already registered - -\return true if a is found, otherwise false -*/ -bool QShortcutManager::contains(QAction *a) const -{ - foreach(QList l, m_actions) - if (l.contains(a)) - return true; - - return false; -} - -/*! -\brief register an action in the shortcut manager - -\param a action to register -\param cxt context of the action, usually a menu/toolbar name -\param def default shortcut -*/ -void QShortcutManager::registerAction(QAction *a, const QString& cxt, const QString& def) -{ - if (!a || contains(a)) - return; - -#ifdef _DEBUG_ - qDebug() << "adding action : " << a->text() - << " from " << cxt - << " with " << def; -#endif - - connect(a, SIGNAL(destroyed(QObject*)), - this, SLOT(destroyed(QObject*))); - - m_actions[cxt + "/" + a->text()] << a; - - QDomElement e = node(a, cxt); - - e.setAttribute("default", def); - - QString sh = e.attribute("shortcut"); - - if (sh.isEmpty() && !m_shortcuts.contains(def)) - sh = def; - - if (sh.count()) - { - e.setAttribute("shortcut", sh); - m_shortcuts[sh] = cxt + "/" + a->text(); - - a->setShortcut(QKeySequence(sh)); - } - - //apply(def, cxt + "/" + a->text()); -} - -/*! -\brief unregister an action from the shortcut manager - -\param a action to unregister -*/ -void QShortcutManager::unregisterAction(QAction *a) -{ - if (!a) - return; - - foreach(QList l, m_actions) - { - if (l.contains(a)) - { - l.removeAll(a); - a->setShortcut(QKeySequence("")); - } - } -} - -/*! -\param lang Language whose shortcut file is asked -\return file name of the shrtcut file corresponding to language \a lang -*/ -QString QShortcutManager::file(const QString& lang) -{ - // return QDir::homePath() - // + QDir::separator() - // + "." - // + QApplication::applicationName() - // + QDir::separator() - // + "shortcuts" - // + QDir::separator() - // + "shortcuts_" - // + "en_us" - // + ".xml"; - - return "shortcuts_" + lang + ".xml"; - -} - -/*! -\overload - -\param a action whose xml representation is searched -\param cxt context of the action (usually menu/toolbar name) - -\return the corresponding dom element, if none found, one is created. -*/ -QDomElement QShortcutManager::node(QAction *a, const QString& cxt) -{ - if (!a) - qFatal("Can\'t find xml for a nullptr action!!!"); - - return node(a->text(), cxt); -} - -/*! -\brief find the xml element representing the name \a n in context \a cxt - -\param a action whose xml representation is searched -\param cxt context of the action (usually menu/toolbar name) - -\return the corresponding dom element, if none found, one is created. -*/ -QDomElement QShortcutManager::node(const QString& n, const QString& cxt) -{ - QDomElement elem; - QDomNodeList nodes = pDoc->elementsByTagName("action"); - - for (int i = 0; i < nodes.size(); i++) - { - elem = nodes.at(i).toElement(); - - if (elem.attribute("name") == n && elem.attribute("context") == cxt) - return elem; - } - - elem = pDoc->createElement("action"); - - elem.setAttribute("name", n); - elem.setAttribute("context", cxt); - - pDoc->documentElement().appendChild(elem); - - return elem; -} - -/*! -\internal -*/ -void QShortcutManager::destroyed(QObject *o) -{ - if (o == nullptr) - return; - - //qDebug("spotted deletion..."); - - foreach(QList l, m_actions) - { - QList::iterator i = l.begin(); - - while (i != l.end()) - { - if (quintptr(*i) == quintptr(o)) - { - //qDebug("erasing occurence of %s", qPrintable((*i)->text())); - i = l.erase(i); - } - else - { - i++; - } - } - } -} - diff --git a/topmodx/src/qshortcutmanager.h b/topmodx/src/qshortcutmanager.h deleted file mode 100644 index c9a241f..0000000 --- a/topmodx/src/qshortcutmanager.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -/**************************************************************************** -** -** Copyright (C) 2006 FullMetalCoder -** -** This file is part of the Edyuk project (beta version) -** -** This file may be used under the terms of the GNU General Public License -** version 2 as published by the Free Software Foundation and appearing in the -** file GPL.txt included in the packaging of this file. -** -** Notes : Parts of the project are derivative work of Trolltech's QSA library -** or Trolltech's Qt4 framework but, unless notified, every single line of code -** is the work of the Edyuk team or a contributor. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#ifndef _QSHORTCUT_MANAGER_H_ -#define _QSHORTCUT_MANAGER_H_ - -#include "qcumber.h" - -/*! -\file qshortcutmanager.h -\brief Definition of the QShortcutManager class - -\see QShortcutManager -*/ - -#include -#include -#include -#include -#include -#include - -class QAction; -class QDomDocument; -class QShortcutDialog; - -class QCUMBER_EXPORT QShortcutManager : public QObject -{ - Q_OBJECT - -public: - QShortcutManager(); - virtual ~QShortcutManager(); - - QShortcutDialog* getShortcutDialog(); - - void applyAll(); - void apply(const QString& s, const QString& t); - - bool contains(QAction *a) const; - - void registerAction(QAction *a, const QString& cxt, const QString& def); - void unregisterAction(QAction *a); - - public slots: - void readXml(); - void writeXml(); - - void configure(); - void languageChanged(const QString& lang); - - private slots: - void destroyed(QObject *o); - -private: - QString file(const QString& lang); - QDomElement node(QAction *a, const QString& cxt); - QDomElement node(const QString& n, const QString& cxt); - -private: - QString sLang; - - QDomDocument *pDoc; - - QHash m_shortcuts; - QHash > m_actions; - - QShortcutDialog *pDialog; - - friend class QShortcutDialog; -}; - -#endif - -// _QSHORTCUT_MANAGER_H_ diff --git a/topmodx/src/stylesheeteditor.cc b/topmodx/src/stylesheeteditor.cc deleted file mode 100644 index 87b0709..0000000 --- a/topmodx/src/stylesheeteditor.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -* -* Short description of this file -* -* name of .hh file containing function prototypes -* -*/ - -#include -#include -#include "stylesheeteditor.h" - -StyleSheetEditor::StyleSheetEditor(QWidget *parent) - : QWidget(parent) -{ - ui.setupUi(this); - - QRegExp regExp("Q(.*)Style"); - QString defaultStyle = QApplication::style()->metaObject()->className(); - if (regExp.exactMatch(defaultStyle)) - defaultStyle = regExp.cap(1); - - ui.styleCombo->addItems(QStyleFactory::keys()); - ui.styleCombo->setCurrentIndex(ui.styleCombo->findText(defaultStyle)); - //ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText("Coffee")); - loadStyleSheet("default"); -} - -void StyleSheetEditor::on_styleCombo_activated(const QString &styleName) -{ - qApp->setStyle(styleName); - ui.applyButton->setEnabled(false); -} - -void StyleSheetEditor::on_styleSheetCombo_activated(const QString &sheetName) -{ - loadStyleSheet(sheetName); -} - -void StyleSheetEditor::on_styleTextEdit_textChanged() -{ - ui.applyButton->setEnabled(true); -} - -void StyleSheetEditor::on_applyButton_clicked() -{ - qApp->setStyleSheet(ui.styleTextEdit->toPlainText()); - ui.applyButton->setEnabled(false); -} - -void StyleSheetEditor::loadStyleSheet(const QString &sheetName) -{ - QFile file(":/qss/" + sheetName.toLower() + ".qss"); - file.open(QFile::ReadOnly); - QString styleSheet = QLatin1String(file.readAll()); - - ui.styleTextEdit->setPlainText(styleSheet); - qApp->setStyleSheet(styleSheet); - ui.applyButton->setEnabled(false); -} diff --git a/topmodx/src/stylesheeteditor.h b/topmodx/src/stylesheeteditor.h deleted file mode 100644 index 2c8f10a..0000000 --- a/topmodx/src/stylesheeteditor.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* 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 2 -* 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, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#ifndef STYLESHEETEDITOR_H -#define STYLESHEETEDITOR_H - -#include - -#include "ui_stylesheeteditor.h" - -class StyleSheetEditor : public QWidget -{ - Q_OBJECT - -public: - StyleSheetEditor(QWidget *parent = 0); - - private slots: - void on_styleCombo_activated(const QString &styleName); - void on_styleSheetCombo_activated(const QString &styleSheetName); - void on_styleTextEdit_textChanged(); - void on_applyButton_clicked(); - -private: - void loadStyleSheet(const QString &sheetName); - - Ui::StyleSheetEditor ui; -}; - -#endif diff --git a/topmodx/stylesheeteditor.ui b/topmodx/stylesheeteditor.ui deleted file mode 100644 index e12ad4a..0000000 --- a/topmodx/stylesheeteditor.ui +++ /dev/null @@ -1,148 +0,0 @@ - - StyleSheetEditor - - - - 0 - 0 - 475 - 408 - - - - Style Editor - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 32 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 32 - 20 - - - - - - - - - Default - - - - - Modo - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 16 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Style: - - - - - - - - - Qt::Horizontal - - - - 321 - 20 - - - - - - - - false - - - &Apply - - - - - - - - - - - - - 0 - 0 - - - - Style Sheet: - - - - - - - - diff --git a/topmodx/tmp/test-script.sh b/topmodx/tmp/test-script.sh deleted file mode 100644 index 16607dc..0000000 --- a/topmodx/tmp/test-script.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh - # renna: rename multiple files according to several rules - # written by felix hudson Jan - 2000 - - #first check for the various 'modes' that this program has - #if the first ($1) condition matches then we execute that portion of the - #program and then exit - - # check for the prefix condition - if [ $1 = p ]; then - - #we now get rid of the mode ($1) variable and prefix ($2) - prefix=$2 ; shift ; shift - - # a quick check to see if any files were given - # if none then its better not to do anything than rename some non-existent - # files!! - - if [$1 = ]; then - echo "no files given" - exit 0 - fi - - # this for loop iterates through all of the files that we gave the program - # it does one rename per file given - for file in $* - do - mv ${file} $prefix$file - done - - #we now exit the program - exit 0 - fi - - # check for a suffix rename - # the rest of this part is virtually identical to the previous section - # please see those notes - if [ $1 = s ]; then - suffix=$2 ; shift ; shift - - if [$1 = ]; then - echo "no files given" - exit 0 - fi - - for file in $* - do - mv ${file} $file$suffix - done - - exit 0 - fi - - # check for the replacement rename - if [ $1 = r ]; then - - shift - - # remove other information - OLD=$1 ; NEW=$2 ; shift ; shift - - # this for loop iterates through all of the files that we give the program - # it does one rename per file given using the program 'sed' - # this is a sinple command line program that parses standard input and - # replaces a set expression with a give string - # here we pass it the file name ( as standard input) and replace the nessesary - # text - - for file in $* - do - new=`echo ${file} | sed s/${OLD}/${NEW}/g` - mv ${file} $new - done - exit 0 - fi - - # if we have reached here then nothing proper was passed to the program - # so we tell the user how to use it - echo "usage;" - echo " renna p [prefix] files.." - echo " renna s [suffix] files.." - echo " renna r [expression] [replacement] files.." - exit 0 - - # done! \ No newline at end of file diff --git a/topmodx/topmod.icns b/topmodx/topmod.icns deleted file mode 100644 index f52b21a..0000000 Binary files a/topmodx/topmod.icns and /dev/null differ diff --git a/topmodx/topmod.ico b/topmodx/topmod.ico deleted file mode 100644 index 60c6913..0000000 Binary files a/topmodx/topmod.ico and /dev/null differ diff --git a/topmodx/topmod.pro b/topmodx/topmod.pro deleted file mode 100644 index 754ae6c..0000000 --- a/topmodx/topmod.pro +++ /dev/null @@ -1,310 +0,0 @@ -# version info : code from -- http://wiki.qtcentre.org/index.php?title=Version_numbering_using_QMake -#VERSION = $$system(git log -1 --pretty=format:%H | cut -c 1-8) -#!isEmpty(VERSION){ - VERSION = $${VERSION} - VERSTR = '\\"$${VERSION}\\"' # place quotes around the version string - DEFINES += VER=\"$${VERSTR}\" # create a VER macro containing the version string -#} - -#qt version -QTVERSION = $$[QT_VERSION] -QT_VERSTR = '\\"$${QTVERSION}\\"' # place quotes around the version string -DEFINES += QT_VER=\"$${QT_VERSTR}\" # create a QT_VER macro containing the version string - -# main stuff -QT += opengl xml -CONFIG += qt debug warn_off link_prl -CONFIG += c++11 - -#QMAKE_CXXFLAGS_DEBUG += -pg -#QMAKE_LFLAGS_DEBUG += -pg - -# exclude verse python or spacenav drivers -# or include them with CONFIG += -CONFIG -= WITH_PYTHON WITH_SPACENAV WITH_VERSE -CONFIG += WITH_PYTHON - -# to include the popup command line interface leave the following line uncommented -DEFINES *= QCOMPLETER - -# DEFINES += TOPMOD_VERSION -DEFINES -= GPU_OK - -TEMPLATE = app - -SUBDIRS = include - -MOC_DIR = tmp -OBJECTS_DIR = tmp -# UI_DIR = tmp - -# TopModd will be the name for the debug version, -# and TopMod will be the release version -CONFIG(debug, debug|release) { - TARGET = TopMod# -$${VERSION} - LIB_CONF_SUB_DIR = Debug - CONFIG += console -} else { - TARGET = TopMod# -$${VERSION} - LIB_CONF_SUB_DIR = Debug -} - -INCLUDEPATH += \ - include \ - #include/arcball \ - include/dlflaux \ - include/dlflcore \ - include/Graphics \ - include/Light \ - include/vecmat \ - include/verse \ - src - -CONFIG(WITH_VERSE){ - message("VERSE will be included") - DEFINES *= WITH_VERSE -} - -CONFIG(WITH_PYTHON){ - message("PYTHON support will be included") - DEFINES *= WITH_PYTHON -} - -CONFIG(WITH_SPACENAV){ - message("SPACENAV support will be included") - DEFINES *= WITH_SPACENAV -} - -macx { - #mac icon when not using a custom info.plist file - ICON = topmod.icns - - # either compile the mac version as an app bundle or a console app - # tell it to load a custom info.plist file here - QMAKE_INFO_PLIST = Info.plist - #MACOSX_DEPLOYMENT_TARGET = 10.12 - # compile release + universal binary - #CONFIG += x86 ppc - - CONFIG(GPU_OK){# for cg gpu shading - INCLUDEPATH += /Library/Frameworks/Cg.framework/Versions/1.0 - QMAKE_LFLAGS += -L/Library/Frameworks/Cg.framework - LIBS += -framework Cg - } - - #QMAKE_LFLAGS += -F./lib - #LIBS += -framework vecmat -framework dlflcore -framework dlflaux - #QMAKE_LFLAGS += -L./lib - LIBS += -L"$$PWD/$${LIB_CONF_SUB_DIR}/lib" -lvecmat -ldlflcore -ldlflaux - - #PRIVATE_FRAMEWORKS.files = ./lib/vecmat.framework ./lib/dlflcore.framework ./lib/dlflaux.framework - #PRIVATE_FRAMEWORKS.path = Contents/Frameworks - #QMAKE_BUNDLE_DATA += PRIVATE_FRAMEWORKS - - INCLUDEPATH += /usr/include - QMAKE_LFLAGS += -L/usr/lib - - CONFIG(WITH_PYTHON){ - INCLUDEPATH += /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 - QMAKE_LFLAGS += -L/System/Library/Frameworks/Python.framework - LIBS += -framework Python - } - CONFIG(WITH_SPACENAV){ - INCLUDEPATH += /Library/Frameworks/3DconnexionClient.framework/Versions/A/Headers - LIBS += -framework 3DconnexionClient - QMAKE_LFLAGS += -L/Library/Frameworks/3DconnexionClient.framework - } - CONFIG(WITH_VERSE){ - LIBS += -lverse - } -} else:unix { - CONFIG -= WITH_SPACENAV WITH_VERSE - QMAKE_LFLAGS += -L./lib/$${LIB_CONF_SUB_DIR} - LIBS += -lvecmat -ldlflcore -ldlflaux - DEFINES *= LINUX - - CONFIG(WITH_PYTHON){ - INCLUDEPATH += /usr/include/python2.7 - LIBS += -lpython2.7 -L/usr/lib/python2.7/config - } - CONFIG(WITH_SPACENAV){ - - } - CONFIG(WITH_VERSE){ - - } -} else:win32 { - - # TopModd will be the name for the debug version, - # and TopMod will be the release version - CONFIG(debug, debug|release) { - TARGET = TopMod# -$${VERSION} - } else { - TARGET = TopMod# -$${VERSION} - } - CONFIG+=suppress_vcproj_warnings - - #application icon windows - RC_FILE = topmod.rc - - CONFIG -= WITH_SPACENAV - - #QMAKE_LFLAGS += -L"$$PWD/lib/$${LIB_CONF_SUB_DIR}" - LIBS += -L"$$PWD/lib/$${LIB_CONF_SUB_DIR}" -lvecmat -ldlflcore -ldlflaux - LIBS += -lopengl32 -lglu32 - - CONFIG(WITH_PYTHON){ - INCLUDEPATH += "C:/Python27/include" - QMAKE_LFLAGS += -L"C:/Python27/libs" - LIBS += -L"C:/Python27/libs" python27.lib - } - CONFIG (GPU_OK){ - - } - CONFIG(WITH_SPACENAV){ - - } - CONFIG(WITH_VERSE){ - LIBS += -lverse - INCLUDEPATH += C:/verse/include - QMAKE_LFLAGS += -LC:/verse/lib - } -} - -# Input -HEADERS += \ - #include/Camera2.h \ - #include/Graphics/Camera.h \ - include/Base/BaseObject.h \ - include/Base/Constants.h \ - include/Base/Inlines.h \ - include/Base/StreamIO.h \ - include/Camera3.h \ - include/Graphics/Color.h \ - include/Graphics/Grid.h \ - include/Graphics/Texture.h \ - include/Graphics/Transform.h \ - include/Light/AmbientLight.h \ - include/Light/Light.h \ - include/Light/PointLight.h \ - include/Light/SpotLight.h \ - src/Renderer/DLFLRenderer.h \ - src/Renderer/GeometryRenderer.h \ - src/BasicsMode.h \ - src/CgData.h \ - src/CommandCompleter.h \ - src/ConicalMode.h \ - src/DLFLLighting.h \ - src/DLFLLocator.h \ - src/DLFLScriptEditor.h \ - src/DLFLSelection.h \ - src/editor.h \ - src/ExperimentalModes.h \ - src/ExtrusionsMode.h \ - src/GLWidget.h \ - src/HighgenusMode.h \ - src/MainWindow.h \ - src/PythonHighlighter.h \ - src/qcumber.h \ - src/qshortcutdialog.h \ - src/qshortcutmanager.h \ - src/RemeshingMode.h \ - src/stylesheeteditor.h \ - src/TdxDeviceWrappers.h \ - src/TexturingMode.h \ - src/TMPatch.h \ - src/TMPatchFace.h \ - src/TMPatchObject.h \ - src/TopMod.h \ - src/TopModPreferences.h \ - src/Viewport.h - -FORMS += shortcutdialog.ui stylesheeteditor.ui - -SOURCES += \ - include/Camera3.cc \ - # DLFLSculpting.cc \ - src/Renderer/DLFLRenderer.cc \ - src/Renderer/GeometryRenderer.cc \ - src/BasicsMode.cc \ - src/CgData.cc \ - src/CommandCompleter.cc \ - src/ConicalMode.cc \ - src/DLFLLighting.cc \ - src/DLFLLocator.cc \ - src/DLFLScriptEditor.cc \ - src/DLFLSelection.cc \ - src/DLFLUndo.cc \ - src/editor.cc \ - src/ExperimentalModes.cc \ - src/ExtrusionsMode.cc \ - src/GLWidget.cc \ - src/HighgenusMode.cc \ - src/main.cc \ - src/MainWindow.cc \ - src/MainWindowCallbacks.cc \ - src/MainWindowRemeshingCallbacks.cc \ - src/PythonHighlighter.cc \ - src/qshortcutdialog.cc \ - src/qshortcutmanager.cc \ - src/RemeshingMode.cc \ - src/stylesheeteditor.cc \ - src/TdxDeviceWrappers.cc \ - src/TexturingMode.cc \ - src/TMPatchFace.cc \ - src/TMPatchObject.cc \ - src/TopMod.cc \ - src/TopModPreferences.cc - -RESOURCES += application.qrc - -TRANSLATIONS += \ - lang/topmod_ca.ts \ - lang/topmod_de.ts \ - lang/topmod_en.ts \ - lang/topmod_es.ts \ - lang/topmod_fr.ts \ - lang/topmod_hi.ts \ - lang/topmod_it.ts \ - lang/topmod_tr.ts - -CONFIG(WITH_VERSE){ - -HEADERS += \ - include/verse/DNA_ID.h \ - include/verse/DNA_listBase.h \ - include/verse/DNA_mesh_types.h \ - include/verse/DNA_meshdata_types.h \ - include/verse/DNA_object_types.h \ - include/verse/DNA_scriptlink_types.h \ - include/verse/MEM_guardedalloc.h \ - include/verse/mydevice.h \ - include/verse/TIF_editmesh.h \ - include/verse/TIF_space.h \ - include/verse/TIF_verse.h \ - include/verse/TKE_depsgraph.h \ - include/verse/TKE_global.h \ - include/verse/TKE_mesh.h \ - include/verse/TKE_object.h \ - include/verse/TKE_utildefines.h \ - include/verse/TKE_verse.h \ - include/verse/TLI_arithb.h \ - include/verse/TLI_dynamiclist.h \ - include/verse/TLI_editVert.h \ - include/verse/TLI_toplib.h \ - include/verse/TLI_util.h \ - src/VerseTopMod.h - -SOURCES += \ - include/verse/mallocn.cc \ - include/verse/util.cc \ - include/verse/verse_common.cc \ - include/verse/verse_geometry_node.cc \ - include/verse/verse_mesh.cc \ - include/verse/verse_node.cc \ - include/verse/verse_object.cc \ - include/verse/verse_object_node.cc \ - include/verse/verse_session.cc \ - src/VerseTopMod.cc - -} diff --git a/topmodx/topmod.rc b/topmodx/topmod.rc deleted file mode 100644 index e07aee1..0000000 --- a/topmodx/topmod.rc +++ /dev/null @@ -1 +0,0 @@ - IDI_ICON1 ICON DISCARDABLE "win_icon.ico" \ No newline at end of file diff --git a/topmodx/vecmat.vcxproj b/topmodx/vecmat.vcxproj deleted file mode 100644 index 22e1396..0000000 --- a/topmodx/vecmat.vcxproj +++ /dev/null @@ -1,148 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {98695EF0-A067-47D9-B871-CBD07EF4262F} - vecmat - 10.0.15063.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - StaticLibrary - true - v141 - MultiByte - - - StaticLibrary - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)lib\$(Configuration)\ - $(SolutionDir)\tmp\$(ProjectName)\$(Platform)\$(Configuration)\ - - - $(SolutionDir)lib\$(Configuration)\ - $(SolutionDir)\tmp\$(ProjectName)\$(Platform)\$(Configuration)\ - - - - Level3 - Disabled - true - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ./include;%(AdditionalIncludeDirectories) - - - - - Level3 - Disabled - true - ./include;%(AdditionalIncludeDirectories) - - - - - Level3 - MaxSpeed - true - true - true - ./include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - ./include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - - - true - true - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/topmodx/vecmat.vcxproj.filters b/topmodx/vecmat.vcxproj.filters deleted file mode 100644 index 5f3c936..0000000 --- a/topmodx/vecmat.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/topmodx/video/tutorial_navigation.mov b/topmodx/video/tutorial_navigation.mov deleted file mode 100644 index a886627..0000000 Binary files a/topmodx/video/tutorial_navigation.mov and /dev/null differ diff --git a/topmodx/win_icon.ico b/topmodx/win_icon.ico deleted file mode 100644 index e5bb4eb..0000000 Binary files a/topmodx/win_icon.ico and /dev/null differ