mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
--User changes
-Add new variations waves22, waves23, waves42, waves3 and waves4 from user tatasz. -Add new stylesheet called lightdark.qss which gives a more modern look to the dark theme. Started by Michel Mastriani (triptychaos). --Included in the qmake and Wix installers. --Code changes -Add a new C# project that attempts to convert Apophysis plugins to Fractorium style Variation classes. It's not entirely perfect, but gets most of the job done much more quickly than doing so manually. -Remove unused OpenCL functions from variations: elliptic, poincare, mask, bMod, bSwirl, bTransform, bCollide, farblur, popcorn2_3D, falloff, falloff2, falloff3, crackle2, waves2b, hypercrop, depth_gaussian2, depth_sine, depth_sine2, dust, asteria, vibration, vibration2, arctanh, smartshape, squares, starblur2, Truchet,. -Add code in EmberTester to automatically detect such unused functions.
This commit is contained in:
parent
5faa8aa5bd
commit
b4ba6d6a82
@ -264,6 +264,10 @@
|
||||
<Component Id="dark_windows.qss" Guid="c120ace3-5fab-416f-b7f1-a8d9e3e0f061">
|
||||
<File Id="dark_windows.qss" Source="$(var.SolutionDir)..\..\..\Data\dark_windows.qss" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
|
||||
</Component>
|
||||
|
||||
<Component Id="lightdark.qss" Guid="e4cbb38c-359e-464d-938b-e52ff0ce375d">
|
||||
<File Id="lightdark.qss" Source="$(var.SolutionDir)..\..\..\Data\lightdark.qss" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
|
||||
</Component>
|
||||
|
||||
<Component Id="VersionHistory.txt" Guid="8b031217-9e7d-4700-9ab8-2593a4e002b6">
|
||||
<File Id="VersionHistory.txt" Source="$(var.SolutionDir)..\..\..\Data\Version History.txt" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2036
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ember", "Ember.vcxproj", "{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}"
|
||||
EndProject
|
||||
@ -32,45 +32,76 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
..\..\..\Data\Version History.txt = ..\..\..\Data\Version History.txt
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apoconv", "..\..\..\Source\apoconv\apoconv.csproj", "{4F78C421-8985-4411-8FFD-B0F323F857BE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}.Debug|x64.Build.0 = Debug|x64
|
||||
{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}.Release|x64.ActiveCfg = Release|x64
|
||||
{2BDB7A54-BB1A-476B-A6E5-F81E90AD4E67}.Release|x64.Build.0 = Release|x64
|
||||
{320F611A-F9CE-4196-A8DC-FA24B2E8A320}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{320F611A-F9CE-4196-A8DC-FA24B2E8A320}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{320F611A-F9CE-4196-A8DC-FA24B2E8A320}.Debug|x64.Build.0 = Debug|x64
|
||||
{320F611A-F9CE-4196-A8DC-FA24B2E8A320}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{320F611A-F9CE-4196-A8DC-FA24B2E8A320}.Release|x64.ActiveCfg = Release|x64
|
||||
{320F611A-F9CE-4196-A8DC-FA24B2E8A320}.Release|x64.Build.0 = Release|x64
|
||||
{6547D5FA-64CE-44BA-9D3C-B6E217456445}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{6547D5FA-64CE-44BA-9D3C-B6E217456445}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6547D5FA-64CE-44BA-9D3C-B6E217456445}.Debug|x64.Build.0 = Debug|x64
|
||||
{6547D5FA-64CE-44BA-9D3C-B6E217456445}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{6547D5FA-64CE-44BA-9D3C-B6E217456445}.Release|x64.ActiveCfg = Release|x64
|
||||
{6547D5FA-64CE-44BA-9D3C-B6E217456445}.Release|x64.Build.0 = Release|x64
|
||||
{4A191F4C-03AC-4F1B-AFFD-F5483ECEBD29}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{4A191F4C-03AC-4F1B-AFFD-F5483ECEBD29}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4A191F4C-03AC-4F1B-AFFD-F5483ECEBD29}.Debug|x64.Build.0 = Debug|x64
|
||||
{4A191F4C-03AC-4F1B-AFFD-F5483ECEBD29}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{4A191F4C-03AC-4F1B-AFFD-F5483ECEBD29}.Release|x64.ActiveCfg = Release|x64
|
||||
{4A191F4C-03AC-4F1B-AFFD-F5483ECEBD29}.Release|x64.Build.0 = Release|x64
|
||||
{35285FCF-6FA8-410E-841B-70AE744D38B8}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{35285FCF-6FA8-410E-841B-70AE744D38B8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{35285FCF-6FA8-410E-841B-70AE744D38B8}.Debug|x64.Build.0 = Debug|x64
|
||||
{35285FCF-6FA8-410E-841B-70AE744D38B8}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{35285FCF-6FA8-410E-841B-70AE744D38B8}.Release|x64.ActiveCfg = Release|x64
|
||||
{35285FCF-6FA8-410E-841B-70AE744D38B8}.Release|x64.Build.0 = Release|x64
|
||||
{7930CAAC-9FC4-4202-B6A3-E760F73F88B7}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{7930CAAC-9FC4-4202-B6A3-E760F73F88B7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7930CAAC-9FC4-4202-B6A3-E760F73F88B7}.Debug|x64.Build.0 = Debug|x64
|
||||
{7930CAAC-9FC4-4202-B6A3-E760F73F88B7}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{7930CAAC-9FC4-4202-B6A3-E760F73F88B7}.Release|x64.ActiveCfg = Release|x64
|
||||
{7930CAAC-9FC4-4202-B6A3-E760F73F88B7}.Release|x64.Build.0 = Release|x64
|
||||
{F6A9102C-69A9-48FB-BC4B-49E49AF43236}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{F6A9102C-69A9-48FB-BC4B-49E49AF43236}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F6A9102C-69A9-48FB-BC4B-49E49AF43236}.Debug|x64.Build.0 = Debug|x64
|
||||
{F6A9102C-69A9-48FB-BC4B-49E49AF43236}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{F6A9102C-69A9-48FB-BC4B-49E49AF43236}.Release|x64.ActiveCfg = Release|x64
|
||||
{F6A9102C-69A9-48FB-BC4B-49E49AF43236}.Release|x64.Build.0 = Release|x64
|
||||
{C8096C47-E358-438C-A520-146D46B0637D}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{C8096C47-E358-438C-A520-146D46B0637D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C8096C47-E358-438C-A520-146D46B0637D}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{C8096C47-E358-438C-A520-146D46B0637D}.Release|x64.ActiveCfg = Release|x64
|
||||
{C8096C47-E358-438C-A520-146D46B0637D}.Release|x64.Build.0 = Release|x64
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4F78C421-8985-4411-8FFD-B0F323F857BE}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C7C67FAD-9040-4BCB-8613-18DFE58D38C4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -98,6 +98,8 @@ unix:!macx {
|
||||
themes.files = $$ASSETS_DIR/dark_linux.qss
|
||||
}
|
||||
|
||||
themes.files += $$ASSETS_DIR/lightdark.qss
|
||||
|
||||
#message(THEMES INSTALL SOURCE: $$themes.files)
|
||||
INSTALLS += themes
|
||||
|
||||
|
769
Data/lightdark.qss
Normal file
769
Data/lightdark.qss
Normal file
@ -0,0 +1,769 @@
|
||||
*
|
||||
{
|
||||
font: 8.5pt "MS Shell Dlg 2";/*For some reason the font changes if you set any style. Set this to whatever font is the default on your system*/
|
||||
}
|
||||
|
||||
QObject
|
||||
{
|
||||
background-color: #5e5e5e;
|
||||
color: rgb(224, 224, 224);
|
||||
alternate-background-color: #5e5e5e;
|
||||
selection-color: black;
|
||||
selection-background-color: #7cabf9;
|
||||
}
|
||||
|
||||
QObject:disabled
|
||||
{
|
||||
color: rgba(255, 255, 255, 40);
|
||||
}
|
||||
|
||||
/*This is needed to give the labels on the status bar some padding.*/
|
||||
QStatusBar QLabel { padding-left: 2px; padding-right: 2px; }
|
||||
|
||||
Fractorium
|
||||
{
|
||||
qproperty-VariationTreeColorNonZero:black;
|
||||
qproperty-VariationTreeColorZero:white;
|
||||
qproperty-VariationTreeBgColorNonZero: #AAAAAA;
|
||||
qproperty-VariationTreeBgColorZero:#5e5e5e;
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
QTableView
|
||||
==================================================================================================*/
|
||||
|
||||
/*For some reason, Qt does not draw table headers correctly, so the style must always be manually specified.*/
|
||||
QHeaderView::section::vertical:enabled
|
||||
{
|
||||
width: 12px;
|
||||
color: black;
|
||||
background-color: lightgray;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QHeaderView::section::horizontal:enabled
|
||||
{
|
||||
height: 18px;
|
||||
color: black;
|
||||
background-color: lightgray;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QHeaderView::section::vertical:disabled
|
||||
{
|
||||
width: 12px;
|
||||
color: rgb(35, 35, 35);
|
||||
background-color: rgb(53, 53, 53);
|
||||
border: none;
|
||||
padding: 0px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QHeaderView::section::horizontal:disabled
|
||||
{
|
||||
height: 18px;
|
||||
color:rgb(35, 35, 35);
|
||||
background-color: rgb(53, 53, 53);
|
||||
border: none;
|
||||
padding: 0px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QTableView
|
||||
{
|
||||
border: 1px solid lightgray;
|
||||
gridline-color: gray;
|
||||
selection-color: darkgray;
|
||||
selection-background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section:enabled
|
||||
{
|
||||
border: none;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section:disabled
|
||||
{
|
||||
border: none;
|
||||
background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QTableView::indicator:disabled
|
||||
{
|
||||
background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QTableView:disabled
|
||||
{
|
||||
color: rgb(35, 35, 35);
|
||||
border: 1px solid rgb(53, 53, 53);
|
||||
gridline-color: rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QTableWidget
|
||||
{
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
QScrollBar
|
||||
==================================================================================================*/
|
||||
|
||||
QScrollBar::vertical
|
||||
{
|
||||
background-color: darkgray;
|
||||
border: 0px solid darkgray;
|
||||
width: 15px;
|
||||
margin: 22px 0 22px 0;
|
||||
}
|
||||
|
||||
QScrollBar::handle::vertical
|
||||
{
|
||||
background-color: gray;
|
||||
border-top: 1px solid darkgray;
|
||||
border-bottom: 1px solid darkgray;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line::vertical
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
height: 22px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line::vertical
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
height: 22px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::up-arrow::vertical, QScrollBar::down-arrow::vertical
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
width: 5px;
|
||||
height: 12px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QScrollBar::add-page::vertical,
|
||||
QScrollBar::sub-page::vertical,
|
||||
QScrollBar::add-page::horizontal,
|
||||
QScrollBar::sub-page::horizontal
|
||||
{
|
||||
background-color: darkgray;
|
||||
}
|
||||
|
||||
QScrollBar::horizontal
|
||||
{
|
||||
background-color: darkgray;
|
||||
border: 0px solid darkgray;
|
||||
height: 15px;
|
||||
margin: 0px 20px 0 20px;
|
||||
}
|
||||
|
||||
QScrollBar::handle::horizontal
|
||||
{
|
||||
background-color: gray;
|
||||
border-left: 1px solid darkgray;
|
||||
border-right: 1px solid darkgray;
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line::horizontal
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
width: 20px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line::horizontal
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
width: 20px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::left-arrow::horizontal,
|
||||
QScrollBar::right-arrow::horizontal
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
width: 12px;
|
||||
height: 5px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
QMenu
|
||||
==================================================================================================*/
|
||||
|
||||
QMenuBar::item
|
||||
{
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QMenuBar::item:selected
|
||||
{
|
||||
background: #7cabf9;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
QMenu
|
||||
{
|
||||
border: none;
|
||||
margin: 0;
|
||||
menu-scrollable: 0;
|
||||
}
|
||||
|
||||
QMenu::icon
|
||||
{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
QMenu::item
|
||||
{
|
||||
padding: 5px 30px 5px 30px;
|
||||
}
|
||||
|
||||
QMenu::item:enabled:selected
|
||||
{
|
||||
background: #7cabf9;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
QMenu::item:disabled
|
||||
{
|
||||
color: #A0A0A0;
|
||||
}
|
||||
|
||||
QMenu::separator
|
||||
{
|
||||
height: 1px;
|
||||
background: #A9A9A9;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
Dock widget
|
||||
==================================================================================================*/
|
||||
|
||||
QDockWidget::title
|
||||
{
|
||||
text-align: center;
|
||||
background-color: rgba(0,0,0,20);
|
||||
border: 2px solid #5e5e5e; /* fix to simulate margin between this :title and tabs */ /* same as main background color */
|
||||
border-radius: 6px; /* bigger than normal due to previous border fix */
|
||||
padding: 4px 0px; /* also needed because of previous border fix */
|
||||
}
|
||||
|
||||
QDockWidget::float-button
|
||||
{
|
||||
background: gray;
|
||||
border-radius: 3px;
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: right center;
|
||||
}
|
||||
|
||||
QDockWidget::float-button
|
||||
{
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
QDockWidget::float-button:hover
|
||||
{
|
||||
background-color: rgba(255,255,255,15);
|
||||
}
|
||||
|
||||
QDockWidget::float-button:pressed
|
||||
{
|
||||
background-color: rgba(255,255,255,30);
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
QTabWidget
|
||||
==================================================================================================*/
|
||||
|
||||
QTabWidget::pane
|
||||
{
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
}
|
||||
QTabWidget::pane:top
|
||||
{
|
||||
top: -1px;
|
||||
border-top: 1px solid #4a4a4a;
|
||||
}
|
||||
|
||||
QTabWidget::pane:bottom
|
||||
{
|
||||
bottom: -1px;
|
||||
border-bottom: 1px solid #4a4a4a;
|
||||
}
|
||||
|
||||
QTabWidget::pane:left
|
||||
{
|
||||
right: -1px;
|
||||
border-right: 1px solid #4a4a4a;
|
||||
}
|
||||
|
||||
QTabWidget::pane:right
|
||||
{
|
||||
left: -1px;
|
||||
border-left: 1px solid #4a4a4a;
|
||||
}
|
||||
|
||||
QTabWidget::tab-bar:top,
|
||||
QTabWidget::tab-bar:bottom
|
||||
{
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
QTabWidget::tab-bar:left,
|
||||
QTabWidget::tab-bar:right
|
||||
{
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
QTabBar
|
||||
==================================================================================================*/
|
||||
|
||||
QTabBar
|
||||
{
|
||||
qproperty-drawBase: 0; /* important */
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Workaround for QTabBars created from docked QDockWidgets which don't draw the border if not set and reseted as follows: */
|
||||
QTabBar
|
||||
{
|
||||
border-top: 0px;
|
||||
border-bottom: 1px solid #4a4a4a;
|
||||
}
|
||||
|
||||
QDockWidget QTabBar
|
||||
{
|
||||
border-color: transparent; /* set color for all QTabBars but ones created from QDockWidget */
|
||||
}
|
||||
|
||||
QDialog QTabBar
|
||||
{
|
||||
border-color: transparent; /* set color for QTabBars inside Preferences dialog */
|
||||
}
|
||||
/* end fix */
|
||||
|
||||
QTabBar::tab
|
||||
{
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
padding: 4px 4px 4px 4px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
QDialog QTabBar::tab:top
|
||||
{
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
padding: 4px 4px 4px 4px;
|
||||
min-width: 20ex;
|
||||
}
|
||||
|
||||
QTabBar::tab:left,
|
||||
QTabBar::tab:right
|
||||
{
|
||||
border-left-width: 0px;
|
||||
border-right-width: 4px;
|
||||
min-height: 9ex;
|
||||
}
|
||||
|
||||
QTabBar::tab:top,
|
||||
QTabBar::tab:bottom
|
||||
{
|
||||
border-top-width: 0px;
|
||||
border-bottom-width: 4px;
|
||||
min-width: 9ex;
|
||||
}
|
||||
|
||||
QDialog QTabBar::tab:selected,
|
||||
QTabBar::tab:selected
|
||||
{
|
||||
background-color: #5e5e5e; /* same as tab content background color */
|
||||
border-color: #4a4a4a;
|
||||
}
|
||||
|
||||
QTabBar::tab:top:selected
|
||||
{
|
||||
border-top: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5e90fa, stop:1 #3874f2); /* selection color */
|
||||
border-bottom-color: #5e5e5e; /* same as tab content background color */
|
||||
}
|
||||
|
||||
QTabBar::tab:bottom:selected
|
||||
{
|
||||
border-bottom: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5e90fa, stop:1 #3874f2); /* selection color */
|
||||
border-right-color: #5e5e5e; /* same as tab content background color */
|
||||
}
|
||||
|
||||
QTabBar::tab:right:selected
|
||||
{
|
||||
border-left: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #5e90fa, stop:1 #3874f2); /* selection color */
|
||||
border-right-color: #5e5e5e; /* same as tab content background color */
|
||||
}
|
||||
|
||||
QTabBar::tab:left:selected
|
||||
{
|
||||
border-right: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #5e90fa, stop:1 #3874f2); /* selection color */
|
||||
border-left-color: #5e5e5e; /* same as tab content background color */
|
||||
}
|
||||
|
||||
QTabBar::tab:first:selected
|
||||
{
|
||||
margin-left: 4px; /* the first selected tab has nothing to overlap with on the left */
|
||||
}
|
||||
|
||||
QTabBar::tab:last:selected
|
||||
{
|
||||
margin-right: 4px; /* the last selected tab has nothing to overlap with on the right */
|
||||
}
|
||||
|
||||
QTabBar::tab:only-one
|
||||
{
|
||||
margin: 0; /* if there is only one tab, we don't want overlapping margins */
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
QToolBar
|
||||
==================================================================================================*/
|
||||
|
||||
QToolBar
|
||||
{
|
||||
padding: 0px;
|
||||
border: 0px none gray;
|
||||
}
|
||||
|
||||
QToolBar > QToolButton
|
||||
{
|
||||
margin: 1px;
|
||||
padding: 1px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #5e5e5e;
|
||||
position: relative;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QDialog > QToolBar > QToolButton
|
||||
{
|
||||
width: 95px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
|
||||
QDialog > QToolBar > QToolButton::menu-button
|
||||
{
|
||||
left: -2px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #5e5e5e;
|
||||
}
|
||||
|
||||
/* when QToolButton is checked: */
|
||||
QToolBar > QToolButton:checked
|
||||
{
|
||||
border: 1px solid #7cabf9;
|
||||
background-color: rgba(124,171,249,60); /* transparency for #7cabf9 color */
|
||||
}
|
||||
|
||||
QToolBar > QToolButton:checked:hover
|
||||
{
|
||||
border: 1px solid #7cabf9;
|
||||
background-color: rgba(124,171,249,80); /* transparency for #7cabf9 color */
|
||||
}
|
||||
|
||||
QToolBar > QToolButton:hover
|
||||
{
|
||||
background-color: rgba(0,0,0,20);
|
||||
}
|
||||
|
||||
QToolBar > QToolButton:pressed
|
||||
{
|
||||
background-color: rgba(0,0,0,40);
|
||||
}
|
||||
|
||||
QToolBar > QToolButton:disabled
|
||||
{
|
||||
background-color: rgba(0, 0, 0, 50);
|
||||
}
|
||||
|
||||
/*==================================================================================================
|
||||
Remainder from the previous attempt at a stylesheet, dark_windows.qss
|
||||
==================================================================================================*/
|
||||
|
||||
QPushButton
|
||||
{
|
||||
margin: 1px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QPushButton:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QLineEdit, QTextEdit
|
||||
{
|
||||
border: 2px solid gray;
|
||||
color: darkgray;
|
||||
background-color: rgb(40, 40, 50);
|
||||
}
|
||||
|
||||
QSpinBox,
|
||||
QDoubleSpinBox
|
||||
{
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
QCheckBox
|
||||
{
|
||||
spacing: 5px;
|
||||
}
|
||||
|
||||
QCheckBox::indicator,
|
||||
QTableView::indicator,
|
||||
QGroupBox::indicator
|
||||
{
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
QCheckBox::indicator:enabled:unchecked,
|
||||
QTableView::indicator:enabled:unchecked,
|
||||
QGroupBox::indicator:enabled:unchecked
|
||||
{
|
||||
background-color: lightgray;
|
||||
image: url(:/Fractorium/Icons/checkbox_unchecked.png);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:enabled:checked,
|
||||
QTableView::indicator:enabled:checked,
|
||||
QGroupBox::indicator:enabled:checked
|
||||
{
|
||||
background-color: lightgray;
|
||||
image: url(:/Fractorium/Icons/checkbox_checked.png);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:disabled:unchecked,
|
||||
QTableView::indicator:disabled:unchecked,
|
||||
QGroupBox::indicator:disabled:unchecked
|
||||
{
|
||||
background-color: gray;
|
||||
image: none;
|
||||
}
|
||||
|
||||
QCheckBox::indicator:disabled:checked,
|
||||
QTableView::indicator:disabled:checked,
|
||||
QGroupBox::indicator:disabled:checked
|
||||
{
|
||||
background-color: gray;
|
||||
image: none;
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked
|
||||
{
|
||||
background-color: black;
|
||||
border: 2px solid gray;
|
||||
border-radius: 7px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 3px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked:disabled
|
||||
{
|
||||
background-color: rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:unchecked
|
||||
{
|
||||
border: 2px solid gray;
|
||||
border-radius: 7px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 3px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
QComboBox
|
||||
{
|
||||
margin: 1px;
|
||||
padding-left: 4px;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow:enabled
|
||||
{
|
||||
border: 1px solid gray;
|
||||
margin-right: 2px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow:disabled
|
||||
{
|
||||
border: 1px solid rgb(35, 35, 35);
|
||||
margin-right: 2px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
QComboBox::drop-down
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView
|
||||
{
|
||||
border: 1px solid gray;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QProgressBar
|
||||
{
|
||||
color: black;
|
||||
background-color: gray;
|
||||
border: 0px none gray;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QProgressBar::chunk
|
||||
{
|
||||
border-radius: 3px;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
QStatusBar QProgressBar
|
||||
{
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
QGroupBox
|
||||
{
|
||||
padding-top: 8px;
|
||||
border: 2px solid gray;
|
||||
border-radius: 4px;
|
||||
margin-top: 3ex;
|
||||
}
|
||||
|
||||
QGroupBox::title
|
||||
{
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: top left;
|
||||
margin-top: 1ex;
|
||||
margin-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
top: -2ex;
|
||||
left: 8px;
|
||||
}
|
||||
|
||||
/*Setting this gives a more consistent look. Also, by omitting color and background color, it allows us to set it above with VariationTreeColorNonZero etc...*/
|
||||
QTreeView
|
||||
{
|
||||
background-color: #5e5e5e;
|
||||
}
|
||||
|
||||
QTreeView::item
|
||||
{
|
||||
outline: none;
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
QTreeView::item:selected,
|
||||
QTreeView::item:hover
|
||||
{
|
||||
border: 0px none black;
|
||||
background-color: #7cabf9;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/*Specific controls*/
|
||||
QLineEdit#PaletteFilterLineEdit,
|
||||
QLineEdit#VariationsFilterLineEdit
|
||||
{
|
||||
height: 20px;
|
||||
min-height: 20px;
|
||||
max-height: 20px;
|
||||
}
|
||||
|
||||
QSpinBox#ThreadCountSpin,
|
||||
QSpinBox#RandomCountSpin,
|
||||
QSpinBox#CpuSubBatchSpin,
|
||||
QSpinBox#OpenCLSubBatchSpin,
|
||||
QSpinBox#CpuQualitySpin,
|
||||
QSpinBox#OpenCLQualitySpin,
|
||||
QDoubleSpinBox#OpenCLSubBatchPctSpin,
|
||||
QSpinBox#FinalRenderCurrentSpin,
|
||||
QSpinBox#FinalRenderThreadCountSpin,
|
||||
QDoubleSpinBox#FinalRenderOpenCLSubBatchPctSpin
|
||||
{
|
||||
padding: 2px;
|
||||
border: 1px solid gray;/*Even though we normally use lightgray for borders, gray looks nicer here*/
|
||||
}
|
||||
|
||||
QTableView#FinalRenderParamsTable QComboBox
|
||||
{
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
QTableView#FinalRenderParamsTable QPushButton
|
||||
{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
QTableView#XaosTableView QHeaderView::section::vertical,
|
||||
QTableView#XaosDistVizTableWidget QHeaderView::section::vertical,
|
||||
QTableView#XaosAppliedTableView QHeaderView::section::vertical
|
||||
{
|
||||
width: 19px;
|
||||
}
|
||||
|
||||
QTableView#SummaryTable QHeaderView::section::vertical
|
||||
{
|
||||
width: 69px;
|
||||
}
|
||||
|
||||
QssDialog QssTextEdit#QssEdit
|
||||
{
|
||||
background-color: #FFFCE1;
|
||||
}
|
||||
|
||||
QTextEdit#CreditsTextBrowser
|
||||
{
|
||||
background-color: #FFFCE1;
|
||||
}
|
||||
|
@ -484,6 +484,11 @@ uint Timing::m_ProcessorCount;
|
||||
EXPORTPREPOSTREGVAR(DCTriangle, T) \
|
||||
EXPORTPREPOSTREGVAR(RandCubes, T) \
|
||||
EXPORTPREPOSTREGVAR(PixelFlow, T) \
|
||||
EXPORTPREPOSTREGVAR(Waves22, T) \
|
||||
EXPORTPREPOSTREGVAR(Waves23, T) \
|
||||
EXPORTPREPOSTREGVAR(Waves42, T) \
|
||||
EXPORTPREPOSTREGVAR(Waves3, T) \
|
||||
EXPORTPREPOSTREGVAR(Waves4, T) \
|
||||
template EMBER_API class VariationList<T>; \
|
||||
template EMBER_API class SpatialFilter<T>; \
|
||||
template EMBER_API class GaussianFilter<T>; \
|
||||
|
@ -52,6 +52,7 @@ namespace EmberNs
|
||||
#define M_3PI (T(M_PI * 3))
|
||||
#define SQRT5 T(2.2360679774997896964091736687313)
|
||||
#define M_PHI T(1.61803398874989484820458683436563)
|
||||
#define M_1_2PI T(0.15915494309189533576888376337251)
|
||||
#define COLORMAP_LENGTH 256//These will need to change if 2D palette support is ever added, or variable sized palettes.
|
||||
#define WHITE 255
|
||||
#define DEFAULT_SBS (1024 * 10)
|
||||
|
@ -434,9 +434,14 @@ enum class eVariationId : et
|
||||
VAR_WAFFLE,
|
||||
VAR_WAVES ,
|
||||
VAR_WAVES2 ,
|
||||
VAR_WAVES2_RADIAL,
|
||||
VAR_WAVES22,
|
||||
VAR_WAVES23,
|
||||
VAR_WAVES23D ,
|
||||
VAR_WAVES2B ,
|
||||
VAR_WAVES2_RADIAL,
|
||||
VAR_WAVES3,
|
||||
VAR_WAVES4,
|
||||
VAR_WAVES42,
|
||||
VAR_WAVESN ,
|
||||
VAR_WDISC ,
|
||||
VAR_WEDGE ,
|
||||
@ -841,9 +846,14 @@ enum class eVariationId : et
|
||||
VAR_PRE_WAFFLE,
|
||||
VAR_PRE_WAVES,
|
||||
VAR_PRE_WAVES2,
|
||||
VAR_PRE_WAVES2_RADIAL,
|
||||
VAR_PRE_WAVES22,
|
||||
VAR_PRE_WAVES23,
|
||||
VAR_PRE_WAVES23D,
|
||||
VAR_PRE_WAVES2B,
|
||||
VAR_PRE_WAVES2_RADIAL,
|
||||
VAR_PRE_WAVES3,
|
||||
VAR_PRE_WAVES4,
|
||||
VAR_PRE_WAVES42,
|
||||
VAR_PRE_WAVESN,
|
||||
VAR_PRE_WDISC,
|
||||
VAR_PRE_WEDGE,
|
||||
@ -1248,9 +1258,14 @@ enum class eVariationId : et
|
||||
VAR_POST_WAFFLE,
|
||||
VAR_POST_WAVES,
|
||||
VAR_POST_WAVES2,
|
||||
VAR_POST_WAVES2_RADIAL,
|
||||
VAR_POST_WAVES22,
|
||||
VAR_POST_WAVES23,
|
||||
VAR_POST_WAVES23D,
|
||||
VAR_POST_WAVES2B,
|
||||
VAR_POST_WAVES2_RADIAL,
|
||||
VAR_POST_WAVES3,
|
||||
VAR_POST_WAVES4,
|
||||
VAR_POST_WAVES42,
|
||||
VAR_POST_WAVESN,
|
||||
VAR_POST_WDISC,
|
||||
VAR_POST_WEDGE,
|
||||
|
@ -423,6 +423,11 @@ VariationList<T>::VariationList()
|
||||
ADDPREPOSTREGVAR(Modulusy)
|
||||
ADDPREPOSTREGVAR(Rotate)
|
||||
ADDPREPOSTREGVAR(Shift)
|
||||
ADDPREPOSTREGVAR(Waves22)
|
||||
ADDPREPOSTREGVAR(Waves23)
|
||||
ADDPREPOSTREGVAR(Waves3)
|
||||
ADDPREPOSTREGVAR(Waves4)
|
||||
ADDPREPOSTREGVAR(Waves42)
|
||||
//ADDPREPOSTREGVAR(LinearXZ)
|
||||
//ADDPREPOSTREGVAR(LinearYZ)
|
||||
//DC are special.
|
||||
|
@ -4355,11 +4355,6 @@ public:
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
virtual string OpenCLFuncsString() const override
|
||||
{
|
||||
return
|
||||
|
@ -4460,7 +4460,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Zeps" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -5016,8 +5016,8 @@ public:
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T c0 = m_Ax / (1 + std::exp(m_Sx * helper.In.x));
|
||||
T c1 = m_Ay / (1 + std::exp(m_Sy * helper.In.y));
|
||||
T c0 = m_Ax / Zeps(1 + std::exp(m_Sx * helper.In.x));
|
||||
T c1 = m_Ay / Zeps(1 + std::exp(m_Sy * helper.In.y));
|
||||
T x = (2 * (c0 - T(0.5)));
|
||||
T y = (2 * (c1 - T(0.5)));
|
||||
helper.Out.x = m_Vv * x;
|
||||
@ -5040,8 +5040,8 @@ public:
|
||||
string ay = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string vv = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t c0 = " << ax << " / (1 + exp(" << sx << " * vIn.x));\n"
|
||||
<< "\t\treal_t c1 = " << ay << " / (1 + exp(" << sy << " * vIn.y));\n"
|
||||
<< "\t\treal_t c0 = " << ax << " / Zeps(1 + exp(" << sx << " * vIn.x));\n"
|
||||
<< "\t\treal_t c1 = " << ay << " / Zeps(1 + exp(" << sy << " * vIn.y));\n"
|
||||
<< "\t\treal_t x = (2 * (c0 - (real_t)(0.5)));\n"
|
||||
<< "\t\treal_t y = (2 * (c1 - (real_t)(0.5)));\n"
|
||||
<< "\n"
|
||||
@ -5793,11 +5793,6 @@ public:
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr" };
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -5813,7 +5808,7 @@ public:
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T d = m_Weight / helper.m_PrecalcSumSquares;
|
||||
T d = m_Weight / Zeps(helper.m_PrecalcSumSquares);
|
||||
T sinx = std::sin(helper.In.x);
|
||||
T sinx2 = SQR(sinx);
|
||||
T cosx = std::cos(helper.In.x);
|
||||
@ -5829,7 +5824,7 @@ public:
|
||||
intmax_t varIndex = IndexInXform();
|
||||
string weight = WeightDefineString();
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t d = " << weight << " / precalcSumSquares;\n"
|
||||
<< "\t\treal_t d = " << weight << " / Zeps(precalcSumSquares);\n"
|
||||
<< "\t\treal_t sinx = sin(vIn.x);\n"
|
||||
<< "\t\treal_t sinx2 = SQR(sinx);\n"
|
||||
<< "\t\treal_t cosx = cos(vIn.x);\n"
|
||||
@ -5844,7 +5839,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2286,9 +2286,10 @@ public:
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T e = 1 / helper.m_PrecalcSumSquares + SQR(T(M_2_PI));
|
||||
helper.Out.x = m_Weight * (m_Weight / helper.m_PrecalcSumSquares * helper.In.x / e);
|
||||
helper.Out.y = m_Weight * (m_Weight / helper.m_PrecalcSumSquares * helper.In.y / e);
|
||||
T e = 1 / Zeps(helper.m_PrecalcSumSquares) + SQR(T(M_2_PI));
|
||||
T temp = m_Weight / Zeps(helper.m_PrecalcSumSquares);
|
||||
helper.Out.x = m_Weight * (temp * helper.In.x / e);
|
||||
helper.Out.y = m_Weight * (temp * helper.In.y / e);
|
||||
helper.Out.z = DefaultZ(helper);
|
||||
}
|
||||
|
||||
@ -2298,10 +2299,11 @@ public:
|
||||
intmax_t varIndex = IndexInXform();
|
||||
string weight = WeightDefineString();
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t e = fma(M2PI, M2PI, 1 / precalcSumSquares);\n"
|
||||
<< "\t\treal_t e = fma(M2PI, M2PI, 1 / Zeps(precalcSumSquares));\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (" << weight << " / precalcSumSquares * vIn.x / e);\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (" << weight << " / precalcSumSquares * vIn.y / e);\n"
|
||||
<< "\t\treal_t temp = " << weight << " / Zeps(precalcSumSquares);\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (temp * vIn.x / e);\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (temp * vIn.y / e);\n"
|
||||
<< "\t\tvOut.z = " << DefaultZCl()
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
@ -3804,7 +3806,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Zeps" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -3877,7 +3879,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Zeps" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -3963,7 +3965,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Zeps" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -4054,7 +4056,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Zeps" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
|
@ -3001,11 +3001,6 @@ public:
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr" };
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
|
@ -1995,11 +1995,6 @@ public:
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
{
|
||||
m_SinTanC = std::sin(SafeTan<T>(m_C));
|
||||
@ -2547,7 +2542,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Lerp" };
|
||||
return vector<string> { "Lerp" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
@ -2751,7 +2746,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sqr", "Zeps" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
@ -2984,7 +2979,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "SignNz", "LogMap", "LogScale", "Sqr", "Zeps" };
|
||||
return vector<string> { "SignNz", "LogMap", "LogScale", "Zeps" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
|
@ -4014,7 +4014,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Fract", "HashShadertoy" };
|
||||
return vector<string> { "Fract", "HashShadertoy" };
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr", "SignNz", "SafeDivInv", "JacobiElliptic", "EvalRational", "J1" };
|
||||
return vector<string> { "Zeps", "SignNz", "SafeDivInv", "JacobiElliptic", "EvalRational", "J1" };
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalDataNames() const override
|
||||
@ -1966,7 +1966,7 @@ public:
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T lvl = (Floor<T>(rand.Frand01<T>() * m_Density) / Zeps(m_Density)); //random level. should care if density=0 but meh, works fine
|
||||
T lvl = T(Floor<T>(rand.Frand01<T>() * m_Density) / Zeps(m_Density)); //random level. should care if density=0 but meh, works fine
|
||||
T randa = rand.Frand01<T>() * M_2PI; //random angle
|
||||
T randr = lvl * m_Radius; //calc radius of rings
|
||||
|
||||
@ -2173,7 +2173,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr" };
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -2983,7 +2983,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr" };
|
||||
return vector<string> { "Sqr" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -3337,11 +3337,6 @@ public:
|
||||
m_BlurOver10 = m_Blur / 10;
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
@ -3443,7 +3438,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr" };
|
||||
return vector<string> { "Sqr" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -3597,7 +3592,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Fract", "HashShadertoy" };
|
||||
return vector<string> { "Fract", "HashShadertoy" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -3725,7 +3720,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr" };
|
||||
return vector<string> { "Sqr" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -3991,11 +3986,6 @@ public:
|
||||
m_PhaseShift2 = M_2PI * m_Phase2 / Zeps(m_Freq2);
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr" };
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
@ -4192,7 +4182,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Sqr", "Modulate" };
|
||||
return vector<string> { "Zeps", "Modulate" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -4542,7 +4532,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Sign", "Zeps", "ComplexMultReal", "ComplexLog", "ComplexPlusReal", "ComplexDivComplex" };
|
||||
return vector<string> { "Zeps", "ComplexMultReal", "ComplexLog", "ComplexPlusReal", "ComplexDivComplex" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -4961,11 +4951,6 @@ public:
|
||||
m_Comp = m_Compensation <= 0 ? T(0) : T(1);
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps" };
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
@ -5110,7 +5095,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Fract", "HashShadertoy" };
|
||||
return vector<string> { "Fract", "HashShadertoy" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -5250,11 +5235,6 @@ public:
|
||||
m_CosAlpha = std::cos(m_Alpha);
|
||||
}
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Fract", "HashShadertoy" };
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
@ -5885,7 +5865,7 @@ public:
|
||||
|
||||
virtual vector<string> OpenCLGlobalFuncNames() const override
|
||||
{
|
||||
return vector<string> { "Zeps", "Fract", "HashShadertoy" };
|
||||
return vector<string> { "Fract", "HashShadertoy" };
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -6612,6 +6592,468 @@ private:
|
||||
T m_AngleRad;//Precalc.
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// waves3.
|
||||
/// By tatasz.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
class Waves3Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Waves3Variation(T weight = 1.0) : ParametricVariation<T>("waves3", eVariationId::VAR_WAVES3, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
PARVARCOPY(Waves3Variation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T x0 = helper.In.x;
|
||||
T y0 = helper.In.y;
|
||||
T scalex = T(0.5) * m_Scalex * (T(1.0) + std::sin(y0 * m_Sxfreq));
|
||||
T scaley = T(0.5) * m_Scaley * (T(1.0) + std::sin(x0 * m_Syfreq));
|
||||
helper.Out.x = m_Weight * (x0 + std::sin(y0 * m_Freqx) * scalex);
|
||||
helper.Out.y = m_Weight * (y0 + std::sin(x0 * m_Freqy) * scaley);
|
||||
helper.Out.z = DefaultZ(helper);
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
{
|
||||
ostringstream ss, ss2;
|
||||
intmax_t i = 0, varIndex = IndexInXform();
|
||||
ss2 << "_" << XformIndexInEmber() << "]";
|
||||
string index = ss2.str();
|
||||
string weight = WeightDefineString();
|
||||
string scalex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string scaley = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqx = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqy = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string sxfreq = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string syfreq = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t x0 = vIn.x;\n"
|
||||
<< "\t\treal_t y0 = vIn.y;\n"
|
||||
<< "\n"
|
||||
<< "\t\treal_t scalex = (real_t)(0.5) * " << scalex << " * ((real_t)(1.0) + sin(y0 * " << sxfreq << "));\n"
|
||||
<< "\t\treal_t scaley = (real_t)(0.5) * " << scaley << " * ((real_t)(1.0) + sin(x0 * " << syfreq << "));\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (x0 + sin(y0 * " << freqx << ") * scalex);\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (y0 + sin(x0 * " << freqy << ") * scaley);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << DefaultZCl()
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scalex, prefix + "waves3_scalex", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scaley, prefix + "waves3_scaley", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqx, prefix + "waves3_freqx", T(7.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqy, prefix + "waves3_freqy", T(13.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Sxfreq, prefix + "waves3_sx_freq"));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Syfreq, prefix + "waves3_sy_freq", T(2.0)));
|
||||
}
|
||||
|
||||
private:
|
||||
T m_Scalex;
|
||||
T m_Scaley;
|
||||
T m_Freqx;
|
||||
T m_Freqy;
|
||||
T m_Sxfreq;
|
||||
T m_Syfreq;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// waves4.
|
||||
/// By tatasz.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
class Waves4Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Waves4Variation(T weight = 1.0) : ParametricVariation<T>("waves4", eVariationId::VAR_WAVES4, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
PARVARCOPY(Waves4Variation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T x0 = helper.In.x;
|
||||
T y0 = helper.In.y;
|
||||
T ax = T(Floor<T>(y0 * m_Freqx / M_2PI));
|
||||
ax = std::sin(ax * T(12.9898) + ax * T(78.233) + T(1.0) + y0 * T(0.001) * m_Yfact) * T(43758.5453);
|
||||
ax = ax - (int)ax;
|
||||
|
||||
if (m_Cont == 1) ax = (ax > T(0.5)) ? T(1.0) : T(0.0);
|
||||
|
||||
helper.Out.x = m_Weight * (x0 + std::sin(y0 * m_Freqx) * ax * ax * m_Scalex);
|
||||
helper.Out.y = m_Weight * (y0 + std::sin(x0 * m_Freqy) * m_Scaley);
|
||||
helper.Out.z = DefaultZ(helper);
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
{
|
||||
ostringstream ss, ss2;
|
||||
intmax_t i = 0, varIndex = IndexInXform();
|
||||
ss2 << "_" << XformIndexInEmber() << "]";
|
||||
string index = ss2.str();
|
||||
string weight = WeightDefineString();
|
||||
string scalex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string scaley = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqx = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqy = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string cont = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string yfact = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t x0 = vIn.x;\n"
|
||||
<< "\t\treal_t y0 = vIn.y;\n"
|
||||
<< "\n"
|
||||
<< "\t\treal_t ax = floor(y0 * " << freqx << " / M_2PI);\n"
|
||||
<< "\t\tax = sin(ax * (real_t)(12.9898) + ax * (real_t)(78.233) + (real_t)(1.0) + y0 * (real_t)(0.001) * " << yfact << ") * (real_t)(43758.5453);\n"
|
||||
<< "\t\tax = ax - (int) ax;\n"
|
||||
<< "\t\tif (" << cont << " == 1) ax = (ax > (real_t)(0.5)) ? (real_t)(1.0) : 0.0;\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (x0 + sin(y0 * " << freqx << ") * ax * ax * " << scalex << ");\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (y0 + sin(x0 * " << freqy << ") * " << scaley << ");\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << DefaultZCl()
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scalex, prefix + "waves4_scalex", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scaley, prefix + "waves4_scaley", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqx, prefix + "waves4_freqx", T(7.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqy, prefix + "waves4_freqy", T(13.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Cont, prefix + "waves4_cont", T(0), eParamType::INTEGER, T(0), T(1)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Yfact, prefix + "waves4_yfact", T(0.1)));
|
||||
}
|
||||
|
||||
private:
|
||||
T m_Scalex;
|
||||
T m_Scaley;
|
||||
T m_Freqx;
|
||||
T m_Freqy;
|
||||
T m_Cont;
|
||||
T m_Yfact;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// waves22.
|
||||
/// By tatasz.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
class Waves22Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Waves22Variation(T weight = 1.0) : ParametricVariation<T>("waves22", eVariationId::VAR_WAVES22, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
PARVARCOPY(Waves22Variation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T x0 = helper.In.x;
|
||||
T y0 = helper.In.y;
|
||||
T sinx, siny;
|
||||
int px = (int)m_Powerx;
|
||||
int py = (int)m_Powery;
|
||||
|
||||
if (m_Modex < T(0.5))
|
||||
{
|
||||
sinx = std::sin(y0 * m_Freqx);
|
||||
}
|
||||
else
|
||||
{
|
||||
sinx = T(0.5) * (T(1.0) + std::sin(y0 * m_Freqx));
|
||||
}
|
||||
|
||||
T offsetx = std::pow(sinx, px) * m_Scalex;
|
||||
|
||||
if (m_Modey < T(0.5))
|
||||
{
|
||||
siny = std::sin(x0 * m_Freqy);
|
||||
}
|
||||
else
|
||||
{
|
||||
siny = T(0.5) * (T(1.0) + std::sin(x0 * m_Freqy));
|
||||
}
|
||||
|
||||
T offsety = std::pow(siny, py) * m_Scaley;
|
||||
helper.Out.x = m_Weight * (x0 + offsetx);
|
||||
helper.Out.y = m_Weight * (y0 + offsety);
|
||||
helper.Out.z = DefaultZ(helper);
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
{
|
||||
ostringstream ss, ss2;
|
||||
intmax_t i = 0, varIndex = IndexInXform();
|
||||
ss2 << "_" << XformIndexInEmber() << "]";
|
||||
string index = ss2.str();
|
||||
string weight = WeightDefineString();
|
||||
string scalex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string scaley = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqx = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqy = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string modex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string modey = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string powerx = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string powery = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t x0 = vIn.x;\n"
|
||||
<< "\t\treal_t y0 = vIn.y;\n"
|
||||
<< "\n"
|
||||
<< "\t\treal_t sinx, siny;\n"
|
||||
<< "\n"
|
||||
<< "\t\tint px = (int) " << powerx << ";\n"
|
||||
<< "\t\tint py = (int) " << powery << ";\n"
|
||||
<< "\t\tif (" << modex << " < (real_t)(0.5)){\n"
|
||||
<< "\t\tsinx = sin(y0 * " << freqx << ");\n"
|
||||
<< "\t\t} else {\n"
|
||||
<< "\t\tsinx = (real_t)(0.5) * ((real_t)(1.0) + sin(y0 * " << freqx << "));\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\t\treal_t offsetx = pow(sinx, px) * " << scalex << ";\n"
|
||||
<< "\t\tif (" << modey << " < (real_t)(0.5)){\n"
|
||||
<< "\t\tsiny = sin(x0 * " << freqy << ");\n"
|
||||
<< "\t\t} else {\n"
|
||||
<< "\t\tsiny = (real_t)(0.5) * ((real_t)(1.0) + sin(x0 * " << freqy << "));\n"
|
||||
<< "\t\t}\n"
|
||||
<< "\t\treal_t offsety = pow(siny, py) * " << scaley << ";\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (x0 + offsetx);\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (y0 + offsety);\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << DefaultZCl()
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scalex, prefix + "waves22_scalex", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scaley, prefix + "waves22_scaley", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqx, prefix + "waves22_freqx", T(7.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqy, prefix + "waves22_freqy", T(13.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Modex, prefix + "waves22_modex", T(0), eParamType::INTEGER, T(0), T(1)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Modey, prefix + "waves22_modey", T(0), eParamType::INTEGER, T(0), T(1)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Powerx, prefix + "waves22_powerx", T(2.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Powery, prefix + "waves22_powery", T(2.0)));
|
||||
}
|
||||
|
||||
private:
|
||||
T m_Scalex;
|
||||
T m_Scaley;
|
||||
T m_Freqx;
|
||||
T m_Freqy;
|
||||
T m_Modex;
|
||||
T m_Modey;
|
||||
T m_Powerx;
|
||||
T m_Powery;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// waves23.
|
||||
/// By tatasz.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
class Waves23Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Waves23Variation(T weight = 1.0) : ParametricVariation<T>("waves23", eVariationId::VAR_WAVES23, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
PARVARCOPY(Waves23Variation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T x0 = helper.In.x;
|
||||
T y0 = helper.In.y;
|
||||
T mx = y0 * m_Freqx * M_1_2PI;
|
||||
T fx = mx - Floor<T>(mx);
|
||||
|
||||
if (fx > T(0.5)) fx = T(0.5) - fx;
|
||||
|
||||
T my = x0 * m_Freqy * M_1_2PI;
|
||||
T fy = my - Floor<T>(my);
|
||||
|
||||
if (fy > T(0.5)) fy = T(0.5) - fy;
|
||||
|
||||
helper.Out.x = m_Weight * (x0 + fx * m_Scalex);
|
||||
helper.Out.y = m_Weight * (y0 + fy * m_Scaley);
|
||||
helper.Out.z = DefaultZ(helper);
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
{
|
||||
ostringstream ss, ss2;
|
||||
intmax_t i = 0, varIndex = IndexInXform();
|
||||
ss2 << "_" << XformIndexInEmber() << "]";
|
||||
string index = ss2.str();
|
||||
string weight = WeightDefineString();
|
||||
string scalex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string scaley = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqx = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqy = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t x0 = vIn.x;\n"
|
||||
<< "\t\treal_t y0 = vIn.y;\n"
|
||||
<< "\n"
|
||||
<< "\t\treal_t mx = y0 * " << freqx << " * M_1_2PI;\n"
|
||||
<< "\t\treal_t fx = mx - floor(mx);\n"
|
||||
<< "\t\tif (fx > (real_t)(0.5)) fx = (real_t)(0.5) - fx;\n"
|
||||
<< "\t\treal_t my = x0 * " << freqy << " * M_1_2PI;\n"
|
||||
<< "\t\treal_t fy = my - floor(my);\n"
|
||||
<< "\t\tif (fy > (real_t)(0.5)) fy = (real_t)(0.5) - fy;\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (x0 + fx * " << scalex << ");\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (y0 + fy * " << scaley << ");\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << DefaultZCl()
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scalex, prefix + "waves23_scalex", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scaley, prefix + "waves23_scaley", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqx, prefix + "waves23_freqx", T(7.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqy, prefix + "waves23_freqy", T(13.0)));
|
||||
}
|
||||
|
||||
private:
|
||||
T m_Scalex;
|
||||
T m_Scaley;
|
||||
T m_Freqx;
|
||||
T m_Freqy;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// waves42.
|
||||
/// By tatasz.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
class Waves42Variation : public ParametricVariation<T>
|
||||
{
|
||||
public:
|
||||
Waves42Variation(T weight = 1.0) : ParametricVariation<T>("waves42", eVariationId::VAR_WAVES42, weight)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
PARVARCOPY(Waves42Variation)
|
||||
|
||||
virtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override
|
||||
{
|
||||
T x0 = helper.In.x;
|
||||
T y0 = helper.In.y;
|
||||
T ax = T(Floor<T>(y0 * m_Freqx2));
|
||||
ax = std::sin(ax * T(12.9898) + ax * T(78.233) + T(1.0) + y0 * T(0.001) * m_Yfact) * T(43758.5453);
|
||||
ax = ax - (int)ax;
|
||||
|
||||
if (m_Cont == 1) ax = (ax > T(0.5)) ? T(1.0) : T(0.0);
|
||||
|
||||
helper.Out.x = m_Weight * (x0 + std::sin(y0 * m_Freqx) * ax * ax * m_Scalex);
|
||||
helper.Out.y = m_Weight * (y0 + std::sin(x0 * m_Freqy) * m_Scaley);
|
||||
helper.Out.z = DefaultZ(helper);
|
||||
}
|
||||
|
||||
virtual string OpenCLString() const override
|
||||
{
|
||||
ostringstream ss, ss2;
|
||||
intmax_t i = 0, varIndex = IndexInXform();
|
||||
ss2 << "_" << XformIndexInEmber() << "]";
|
||||
string index = ss2.str();
|
||||
string weight = WeightDefineString();
|
||||
string scalex = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string scaley = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqx = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqy = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string cont = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string yfact = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
string freqx2 = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||
ss << "\t{\n"
|
||||
<< "\t\treal_t x0 = vIn.x;\n"
|
||||
<< "\t\treal_t y0 = vIn.y;\n"
|
||||
<< "\n"
|
||||
<< "\t\treal_t ax = floor(y0 * " << freqx2 << ");\n"
|
||||
<< "\t\tax = sin(ax * (real_t)(12.9898) + ax * (real_t)(78.233) + (real_t)(1.0) + y0 * (real_t)(0.001) * " << yfact << ") * (real_t)(43758.5453);\n"
|
||||
<< "\t\tax = ax - (int) ax;\n"
|
||||
<< "\t\tif (" << cont << " == 1) ax = (ax > (real_t)(0.5)) ? (real_t)(1.0) : 0.0;\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.x = " << weight << " * (x0 + sin(y0 * " << freqx << ") * ax * ax * " << scalex << ");\n"
|
||||
<< "\t\tvOut.y = " << weight << " * (y0 + sin(x0 * " << freqy << ") * " << scaley << ");\n"
|
||||
<< "\n"
|
||||
<< "\t\tvOut.z = " << DefaultZCl()
|
||||
<< "\t}\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
virtual void Precalc() override
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
string prefix = Prefix();
|
||||
m_Params.clear();
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scalex, prefix + "waves42_scalex", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Scaley, prefix + "waves42_scaley", T(0.05)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqx, prefix + "waves42_freqx", T(7.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqy, prefix + "waves42_freqy", T(13.0)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Cont, prefix + "waves42_cont", T(0), eParamType::INTEGER, T(0), T(1)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Yfact, prefix + "waves42_yfact", T(0.1)));
|
||||
m_Params.push_back(ParamWithName<T>(&m_Freqx2, prefix + "waves42_freqx2", T(1.0)));
|
||||
}
|
||||
|
||||
private:
|
||||
T m_Scalex;
|
||||
T m_Scaley;
|
||||
T m_Freqx;
|
||||
T m_Freqy;
|
||||
T m_Cont;
|
||||
T m_Yfact;
|
||||
T m_Freqx2;
|
||||
};
|
||||
|
||||
MAKEPREPOSTPARVAR(Splits3D, splits3D, SPLITS3D)
|
||||
MAKEPREPOSTPARVAR(Waves2B, waves2b, WAVES2B)
|
||||
MAKEPREPOSTPARVAR(JacCn, jac_cn, JAC_CN)
|
||||
@ -6675,4 +7117,9 @@ MAKEPREPOSTPARVAR(Modulusx, modulusx, MODULUSX)
|
||||
MAKEPREPOSTPARVAR(Modulusy, modulusy, MODULUSY)
|
||||
MAKEPREPOSTPARVAR(Rotate, rotate, ROTATE)
|
||||
MAKEPREPOSTPARVAR(Shift, shift, SHIFT)
|
||||
MAKEPREPOSTPARVAR(Waves22, waves22, WAVES22)
|
||||
MAKEPREPOSTPARVAR(Waves23, waves23, WAVES23)
|
||||
MAKEPREPOSTPARVAR(Waves42, waves42, WAVES42)
|
||||
MAKEPREPOSTPARVAR(Waves3, waves3, WAVES3)
|
||||
MAKEPREPOSTPARVAR(Waves4, waves4, WAVES4)
|
||||
}
|
||||
|
@ -185,13 +185,13 @@ static const char* RandFunctionString =
|
||||
"inline real_t MwcNextFRange(uint2* s, real_t lower, real_t upper)\n"
|
||||
"{\n"
|
||||
" real_t f = (real_t)MwcNext(s) / (real_t)UINT_MAX;\n"
|
||||
" return lower + (f * (upper - lower));\n"
|
||||
" return fma(f, upper - lower, lower);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"inline real_t MwcNextNeg1Pos1(uint2* s)\n"
|
||||
"{\n"
|
||||
" real_t f = (real_t)MwcNext(s) / (real_t)UINT_MAX;\n"
|
||||
" return -1.0 + (f * 2.0);\n"
|
||||
" return fma(f, 2.0, -1.0);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"inline real_t MwcNext0505(uint2* s)\n"
|
||||
@ -213,11 +213,12 @@ static const char* AddToAccumWithCheckFunctionString =
|
||||
|
||||
/// <summary>
|
||||
/// OpenCL equivalent various CarToRas member functions.
|
||||
/// Normaly would subtract m_RasLlX and m_RasLlY, but they were negated in RendererCL before being passed in, so they could be used with fma().
|
||||
/// </summary>
|
||||
static const char* CarToRasFunctionString =
|
||||
"inline void CarToRasConvertPointToSingle(__constant CarToRasCL* carToRas, Point* point, uint* singleBufferIndex)\n"
|
||||
"{\n"
|
||||
" *singleBufferIndex = (uint)(carToRas->m_PixPerImageUnitW * point->m_X - carToRas->m_RasLlX) + (carToRas->m_RasWidth * (uint)(carToRas->m_PixPerImageUnitH * point->m_Y - carToRas->m_RasLlY));\n"
|
||||
" *singleBufferIndex = (uint)fma(carToRas->m_PixPerImageUnitW, point->m_X, carToRas->m_RasLlX) + (carToRas->m_RasWidth * (uint)fma(carToRas->m_PixPerImageUnitH, point->m_Y, carToRas->m_RasLlY));\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"inline bool CarToRasInBounds(__constant CarToRasCL* carToRas, Point* point)\n"
|
||||
|
@ -83,6 +83,7 @@ static string ConstantDefinesString(bool doublePrecision)
|
||||
"#define M_3PI (MPI * 3)\n"
|
||||
"#define SQRT5 2.2360679774997896964091736687313\n"
|
||||
"#define M_PHI 1.61803398874989484820458683436563\n"
|
||||
"#define M_1_2PI 0.15915494309189533576888376337251\n"
|
||||
"#define DEG_2_RAD (MPI / 180)\n"
|
||||
"#define CURVES_LENGTH_M1 ((real_bucket_t)" << CURVES_LENGTH_M1 << ")\n" <<
|
||||
"#define ONE_OVER_CURVES_LENGTH_M1 ((real_bucket_t)" << ONE_OVER_CURVES_LENGTH_M1 << ")\n" <<
|
||||
|
@ -93,7 +93,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(const Ember<T>& ember,
|
||||
if (needPrecalcAtanYX)
|
||||
xformFuncs << "\treal_t precalcAtanyx;\n";
|
||||
|
||||
xformFuncs << "\treal_t tempColor = outPoint->m_ColorX = xform->m_ColorSpeedCache + (xform->m_OneMinusColorCache * inPoint->m_ColorX);\n\n";
|
||||
xformFuncs << "\treal_t tempColor = outPoint->m_ColorX = fma(xform->m_OneMinusColorCache, inPoint->m_ColorX, xform->m_ColorSpeedCache);\n\n";
|
||||
|
||||
if (xform->PreVariationCount() + xform->VariationCount() == 0)
|
||||
{
|
||||
@ -215,7 +215,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(const Ember<T>& ember,
|
||||
"\toutPoint->m_Y = fma(xform->m_PostD, tempX, fma(xform->m_PostE, outPoint->m_Y, xform->m_PostF));\n";
|
||||
}
|
||||
|
||||
xformFuncs << "\toutPoint->m_ColorX = tempColor + xform->m_DirectColor * (outPoint->m_ColorX - tempColor);\n";
|
||||
xformFuncs << "\toutPoint->m_ColorX = fma(xform->m_DirectColor, (outPoint->m_ColorX - tempColor), tempColor);\n";
|
||||
xformFuncs << "\n";
|
||||
xformFuncs << "\tif (isnan(outPoint->m_ColorX))\n";
|
||||
xformFuncs << "\t outPoint->m_ColorX = 0.0; \n";
|
||||
|
@ -1822,9 +1822,9 @@ void RendererCL<T, bucketT>::ConvertCarToRas(const CarToRas<T>& carToRas)
|
||||
{
|
||||
m_CarToRasCL.m_RasWidth = uint(carToRas.RasWidth());
|
||||
m_CarToRasCL.m_PixPerImageUnitW = carToRas.PixPerImageUnitW();
|
||||
m_CarToRasCL.m_RasLlX = carToRas.RasLlX();
|
||||
m_CarToRasCL.m_RasLlX = -carToRas.RasLlX();//Flip here because it's only used by CarToRasConvertPointToSingle(), which only needs the negative of it.
|
||||
m_CarToRasCL.m_PixPerImageUnitH = carToRas.PixPerImageUnitH();
|
||||
m_CarToRasCL.m_RasLlY = carToRas.RasLlY();
|
||||
m_CarToRasCL.m_RasLlY = -carToRas.RasLlY();//Ditto here.
|
||||
m_CarToRasCL.m_CarLlX = carToRas.CarLlX();
|
||||
m_CarToRasCL.m_CarLlY = carToRas.CarLlY();
|
||||
m_CarToRasCL.m_CarUrX = carToRas.CarUrX();
|
||||
|
@ -1278,6 +1278,12 @@ bool TestGlobalFuncs()
|
||||
{
|
||||
auto var = vlf->GetVariation(i);
|
||||
funcs = var->OpenCLGlobalFuncNames();
|
||||
auto localfuncs = var->OpenCLFuncsString();
|
||||
Ember<float> ember;
|
||||
Xform<float> xf;
|
||||
xf.AddVariation(var->Copy());
|
||||
ember.AddXform(xf);
|
||||
auto kernel = GetEmberCLKernelString(ember, true, false, false, 1u, false);
|
||||
|
||||
for (auto& func : funcs)//Test if the functions the variation says it requires actually exist.
|
||||
{
|
||||
@ -1308,6 +1314,44 @@ bool TestGlobalFuncs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Test whether the global functions the variations purports to need are actually used.
|
||||
for (auto& v : vec)
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
for (auto& v2 : vec)//Test if the functions the variation uses possibly use this function. It can be the case sometimes where a variation does not use it directly, but its global functions do.
|
||||
{
|
||||
if (v != v2)
|
||||
{
|
||||
auto it = funcmap.find(v2);
|
||||
|
||||
if (it != funcmap.end())
|
||||
{
|
||||
if (Find(it->second, v + "("))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found && Find(str, v + "("))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found && Find(localfuncs, v + "("))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
cout << "Variation " << var->Name() << " purported to require the usage of global function " << v << ", but it's not found in its OpenCL function string:\n" /*<< kernel*/ << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
@ -40,7 +40,7 @@
|
||||
<x>6</x>
|
||||
<y>5</y>
|
||||
<width>681</width>
|
||||
<height>221</height>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -58,7 +58,7 @@
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="center">Fractorium 1.0.0.15</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" text-decoration: underline; color:#0000ff;">fractorium.com</span></a></p></body></html></string>
|
||||
<string><html><head/><body><p align="center" style=" font-size:10pt;">Fractorium 1.0.0.15</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" text-decoration: underline; color:#0000ff; font-size:10pt;">fractorium.com</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
@ -104,7 +104,7 @@
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.1pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.14286pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Developers:</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Lead: </span><a href="http://www.fractorium.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Matt Feemster</span></a><span style=" font-size:10pt;"><br />Contributors: </span><a href="http://blog.highlyillogical.org/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Simon Detheridge</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/triptychaos"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Michel Mastriani.</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
|
@ -539,13 +539,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>45</height>
|
||||
<height>46</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>45</height>
|
||||
<height>46</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -748,13 +748,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>199</height>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>199</height>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
|
@ -80,7 +80,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1305</width>
|
||||
<width>1277</width>
|
||||
<height>985</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -173,7 +173,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>230</width>
|
||||
<height>936</height>
|
||||
<height>934</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
@ -570,96 +570,6 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTableWidget" name="ColorTableHeader">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerItem</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerItem</enum>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="cornerButtonEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>15</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>15</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderDefaultSectionSize">
|
||||
<number>15</number>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderMinimumSectionSize">
|
||||
<number>15</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<spacer name="FlameTabVerticalSpacer3">
|
||||
<property name="orientation">
|
||||
@ -1675,6 +1585,11 @@
|
||||
<property name="text">
|
||||
<string>Brightness</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
@ -1715,6 +1630,11 @@
|
||||
<property name="text">
|
||||
<string>Field</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
@ -1827,6 +1747,96 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableWidget" name="ColorTableHeader">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerItem</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerItem</enum>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="cornerButtonEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>15</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>15</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderDefaultSectionSize">
|
||||
<number>16</number>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderMinimumSectionSize">
|
||||
<number>16</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -2389,13 +2399,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -2622,13 +2632,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>21</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>21</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -3310,13 +3320,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>42</height>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>42</height>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -3519,13 +3529,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>22</height>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>22</height>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -3849,13 +3859,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>45</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -6260,7 +6270,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>267</width>
|
||||
<height>676</height>
|
||||
<height>670</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -6472,13 +6482,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>126</height>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>126</height>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -6812,13 +6822,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>250</height>
|
||||
<height>255</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>250</height>
|
||||
<height>255</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
@ -6863,13 +6873,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>173</height>
|
||||
<height>170</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>173</height>
|
||||
<height>170</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
@ -7499,8 +7509,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>407</width>
|
||||
<height>541</height>
|
||||
<width>424</width>
|
||||
<height>574</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -571,13 +571,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -764,13 +764,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>67</height>
|
||||
<height>68</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
|
6
Source/apoconv/App.config
Normal file
6
Source/apoconv/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
|
||||
</startup>
|
||||
</configuration>
|
122
Source/apoconv/Form1.Designer.cs
generated
Normal file
122
Source/apoconv/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,122 @@
|
||||
namespace apoconv
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.AllowDrop = true;
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.textBox1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.textBox2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(2871, 1225);
|
||||
this.splitContainer1.SplitterDistance = 1389;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.AllowDrop = true;
|
||||
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.textBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBox1.Size = new System.Drawing.Size(1389, 1225);
|
||||
this.textBox1.TabIndex = 0;
|
||||
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
|
||||
this.textBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.textBox1_DragDrop);
|
||||
this.textBox1.DragEnter += new System.Windows.Forms.DragEventHandler(this.textBox1_DragEnter);
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox2.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.textBox2.Location = new System.Drawing.Point(0, 0);
|
||||
this.textBox2.Multiline = true;
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.textBox2.Size = new System.Drawing.Size(1478, 1225);
|
||||
this.textBox2.TabIndex = 1;
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(28, 28);
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(2871, 1225);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Apophysis to Fractorium Plugin Converter";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
}
|
||||
}
|
||||
|
597
Source/apoconv/Form1.cs
Normal file
597
Source/apoconv/Form1.cs
Normal file
@ -0,0 +1,597 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace apoconv
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
private List<ParamInfo> m_Params = new List<ParamInfo>();
|
||||
private List<PrecalcParamInfo> m_StructParams = new List<PrecalcParamInfo>();
|
||||
private List<string> m_PrecalcFuncLines = new List<string>();
|
||||
private List<string> m_CalcFuncLines = new List<string>();
|
||||
private List<string> m_FinalCalcFuncLines = new List<string>();
|
||||
private readonly SortedDictionary<string, string> replacements = new SortedDictionary<string, string>()
|
||||
{
|
||||
{ "(double)", "" },
|
||||
{ "(float)", "" },
|
||||
{ "double", "T" },
|
||||
{ "float", "T" },
|
||||
//{ "0.0", "0" },
|
||||
{ "0.5", "T(0.5)" },
|
||||
{ "1.0", "T(1.0)" },
|
||||
{ "0.1", "T(0.1)" },
|
||||
{ "0.01", "T(0.01)" },
|
||||
{ "0.001", "T(0.001)" },
|
||||
{ "12.9898", "T(12.9898)" },
|
||||
{ "78.233", "T(78.233)" },
|
||||
{ "43758.5453", "T(43758.5453)" },
|
||||
{ "FTx", "helper.In.x" },
|
||||
{ "FTy", "helper.In.y" },
|
||||
{ "FTz", "helper.In.z" },
|
||||
{ "FPx", "helper.Out.x" },
|
||||
{ "FPy", "helper.Out.y" },
|
||||
{ "FPz", "helper.Out.z" },
|
||||
{ "VVAR", "m_Weight" },
|
||||
{ "floor(", "Floor<T>(" },
|
||||
{ "cel(", "std::ceil(" },
|
||||
{ "sin(", "std::sin(" },
|
||||
{ "sinh(", "std::sinh(" },
|
||||
{ "asin(", "std::asin(" },
|
||||
{ "asinh(", "std::asinh(" },
|
||||
|
||||
{ "cos(", "std::cos(" },
|
||||
{ "cosh(", "std::cosh(" },
|
||||
{ "acos(", "std::acos(" },
|
||||
{ "acosh(", "std::acosh(" },
|
||||
|
||||
{ "tan(", "std::tan(" },
|
||||
{ "tanh(", "std::tanh(" },
|
||||
{ "atan(", "std::atan(" },
|
||||
{ "atan2(", "std::atan2(" },
|
||||
{ "atanh(", "std::atanh(" },
|
||||
|
||||
{ "sqrt(", "std::sqrt(" },
|
||||
{ "pow(", "std::pow(" },
|
||||
{ "fabs(", "std::abs(" },
|
||||
|
||||
{ "sqr(", "Sqr(" },
|
||||
|
||||
{ "M_E", "T(M_E)" },
|
||||
{ "M_LOG2E", "T(M_LOG2E)" },
|
||||
{ "M_LOG10E", "T(M_LOG10E)" },
|
||||
{ "M_LN2", "T(M_LN2)" },
|
||||
{ "M_LN10", "T(M_LN10)" },
|
||||
{ "M_PI", "T(M_PI)" },
|
||||
{ "M_PI_2", "T(M_PI_2)" },
|
||||
{ "M_PI_4", "T(M_PI_4)" },
|
||||
{ "M_1_PI", "T(M_1_PI)" },
|
||||
{ "M_2_PI", "T(M_2_PI)" },
|
||||
{ "M_2_SQRTPI", "T(M_2_SQRTPI)" },
|
||||
{ "M_SQRT2", "T(M_SQRT2)" },
|
||||
{ "M_SQRT1_2", "T(M_SQRT1_2)" },
|
||||
|
||||
};
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
//var lines = File.ReadAllLines("./waves4.cpp");
|
||||
//textBox1.Lines = lines;
|
||||
}
|
||||
|
||||
string Apo2Fractorium(string[] lines, bool doexport)
|
||||
{
|
||||
if (lines.Length == 0)
|
||||
return "";
|
||||
|
||||
//doexport = false;
|
||||
|
||||
bool isparvar = false;
|
||||
string pluginname = "";
|
||||
string varclassname = "";
|
||||
m_Params.Clear();
|
||||
m_StructParams.Clear();
|
||||
m_PrecalcFuncLines.Clear();
|
||||
m_CalcFuncLines.Clear();
|
||||
m_FinalCalcFuncLines.Clear();
|
||||
|
||||
bool structstart = false;
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains("APO_PLUGIN"))
|
||||
{
|
||||
var splits = line.Split(new char[] { '\"' });
|
||||
|
||||
if (splits.Length >= 1)
|
||||
{
|
||||
pluginname = splits[1];
|
||||
varclassname = pluginname.FirstCharToUpper() + "Variation";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains("typedef struct"))
|
||||
{
|
||||
structstart = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (structstart)
|
||||
{
|
||||
if (line.Contains("{"))
|
||||
continue;
|
||||
|
||||
if (line.Contains("}"))
|
||||
break;
|
||||
|
||||
var splits = line.Trim().Split(new string[] { " ", ",", ";", "(", ")", "double", "float", "int", "unsigned", "long", "short", "char" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var split in splits)
|
||||
{
|
||||
m_StructParams.Add(new PrecalcParamInfo
|
||||
{
|
||||
OrigName = split.Trim(),
|
||||
Name = split.Trim(),
|
||||
MemberName = "m_" + split.RemoveFirst(pluginname + "_").FirstCharToUpper().Replace("_", "").Trim(),
|
||||
});
|
||||
|
||||
isparvar = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool paramsstart = false;
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains("APO_VARIABLES("))
|
||||
{
|
||||
paramsstart = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (paramsstart)
|
||||
{
|
||||
if (line.Contains(");"))
|
||||
break;
|
||||
|
||||
var splits = line.Split(new char[] { '(', ')', ',' });
|
||||
|
||||
if (splits.Length > 2)
|
||||
{
|
||||
var pt = "";
|
||||
var l = "";
|
||||
var u = "";
|
||||
var def = "";
|
||||
|
||||
if (line.Contains("VAR_INTEGER_RANGE"))
|
||||
{
|
||||
pt = "eParamType::INTEGER";
|
||||
|
||||
if (splits.Length >= 5)
|
||||
{
|
||||
l = splits[2].Trim();
|
||||
u = splits[3].Trim();
|
||||
def = splits[4].Trim();
|
||||
}
|
||||
}
|
||||
else if (line.Contains("VAR_REAL_RANGE"))
|
||||
{
|
||||
pt = "eParamType::REAL";
|
||||
|
||||
if (splits.Length >= 5)
|
||||
{
|
||||
l = splits[2].Trim();
|
||||
u = splits[3].Trim();
|
||||
def = splits[4].Trim();
|
||||
}
|
||||
}
|
||||
else if (line.Contains("VAR_REAL_CYCLE"))
|
||||
{
|
||||
pt = "eParamType::REAL_CYCLIC";
|
||||
|
||||
if (splits.Length >= 5)
|
||||
{
|
||||
l = splits[2].Trim();
|
||||
u = splits[3].Trim();
|
||||
def = splits[4].Trim();
|
||||
}
|
||||
}
|
||||
else if (line.Contains("VAR_INTEGER_NONZERO"))
|
||||
{
|
||||
pt = "eParamType::INTEGER_NONZERO";
|
||||
def = splits[2].Trim();
|
||||
}
|
||||
else if (line.Contains("INTEGER("))
|
||||
{
|
||||
pt = "eParamType::INTEGER";
|
||||
def = splits[2].Trim();
|
||||
}
|
||||
else
|
||||
def = splits[2].Trim();
|
||||
|
||||
m_Params.Add(new ParamInfo
|
||||
{
|
||||
Name = splits[1].Trim(),
|
||||
MemberName = "m_" + splits[1].RemoveFirst(pluginname + "_").FirstCharToUpper().Replace("_", "").Trim(),
|
||||
Default = def,
|
||||
Lower = l,
|
||||
Upper = u,
|
||||
ParamType = pt
|
||||
});
|
||||
isparvar = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var param in m_Params)
|
||||
{
|
||||
if (m_StructParams.Any(pi => pi.Name == param.Name))
|
||||
m_StructParams.RemoveAll(pi => pi.Name == param.Name);
|
||||
}
|
||||
|
||||
foreach (var param in m_StructParams)
|
||||
{
|
||||
if (!param.Name.StartsWith(pluginname + "_"))
|
||||
param.Name = pluginname + "_" + param.Name;
|
||||
|
||||
if (!param.Name.EndsWith("_precalc"))
|
||||
param.Name = param.Name + "_precalc";
|
||||
|
||||
if (!param.MemberName.EndsWith("Precalc"))
|
||||
param.MemberName += "Precalc";
|
||||
}
|
||||
|
||||
bool calcstart = false;
|
||||
int bracketcount = 0;
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains("PluginVarCalc"))
|
||||
{
|
||||
calcstart = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (calcstart)
|
||||
{
|
||||
if (line.Contains("{"))
|
||||
bracketcount++;
|
||||
|
||||
if (line.Contains("}"))
|
||||
bracketcount--;
|
||||
|
||||
if (bracketcount <= 0)
|
||||
break;
|
||||
|
||||
if (line != "{" && !line.Contains("return"))
|
||||
{
|
||||
var templine = line;
|
||||
|
||||
if (line.Contains("FPx") || line.Contains("FPy") || line.Contains("FPz"))
|
||||
{
|
||||
templine = templine.Replace("+=", "=");
|
||||
templine = templine.Replace("-=", "= -(");//Will cause an error, forcing manual inspection
|
||||
}
|
||||
|
||||
m_CalcFuncLines.Add(templine.Trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool precalcstart = false;
|
||||
bracketcount = 0;
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains("PluginVarPrepare"))
|
||||
{
|
||||
precalcstart = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (precalcstart)
|
||||
{
|
||||
if (line.Contains("{"))
|
||||
bracketcount++;
|
||||
|
||||
if (line.Contains("}"))
|
||||
bracketcount--;
|
||||
|
||||
if (bracketcount <= 0)
|
||||
break;
|
||||
|
||||
if (line != "{" && !line.Contains("return"))
|
||||
{
|
||||
var templine = line;
|
||||
|
||||
foreach (var rep in replacements)
|
||||
templine = templine.Replace(rep.Key, rep.Value);
|
||||
|
||||
m_PrecalcFuncLines.Add(templine.Trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string final = "/// <summary>\r\n";
|
||||
final += "/// " + pluginname + ".\r\n";
|
||||
final += "/// </summary>\r\n";
|
||||
final += "template <typename T>\r\n";
|
||||
|
||||
if (isparvar)
|
||||
final += "class " + varclassname + " : public ParametricVariation<T>\r\n";
|
||||
else
|
||||
final += "class " + varclassname + " : public Variation<T>\r\n";
|
||||
|
||||
final += "{\r\n";
|
||||
final += "public:\r\n";
|
||||
|
||||
if (isparvar)
|
||||
final += "\t" + varclassname + "(T weight = 1.0) : ParametricVariation<T>(\"" + pluginname + "\", eVariationId::VAR_" + pluginname.ToUpper() + ", weight)\r\n";
|
||||
else
|
||||
final += "\t" + varclassname + "(T weight = 1.0) : Variation<T>(\"" + pluginname + "\", eVariationId::VAR_" + pluginname.ToUpper() + ", weight)\r\n";
|
||||
|
||||
final += "\t{\r\n";
|
||||
|
||||
if (isparvar)
|
||||
final += "\t Init();\r\n";
|
||||
|
||||
final += "\t}\r\n\r\n";
|
||||
|
||||
if (isparvar)
|
||||
final += "\tPARVARCOPY(" + varclassname + ")\r\n";
|
||||
else
|
||||
final += "\tVARCOPY(" + varclassname + ")\r\n";
|
||||
|
||||
final += "\r\n\tvirtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override\r\n";
|
||||
final += "\t{\r\n";
|
||||
|
||||
foreach (var line in m_CalcFuncLines)
|
||||
{
|
||||
var templine = "\t\t" + line;
|
||||
|
||||
foreach (var rep in replacements)
|
||||
templine = templine.Replace(rep.Key, rep.Value);
|
||||
|
||||
templine += "\r\n";
|
||||
|
||||
foreach (var param in m_Params)
|
||||
templine = templine.Replace("VAR(" + param.Name + ")", param.MemberName);
|
||||
|
||||
foreach (var param in m_StructParams)
|
||||
templine = templine.Replace("VAR(" + param.OrigName + ")", param.MemberName);
|
||||
|
||||
m_FinalCalcFuncLines.Add(templine.Trim());
|
||||
final += templine;
|
||||
}
|
||||
|
||||
final += "\t\thelper.Out.z = DefaultZ(helper);\r\n";
|
||||
final += "\t}\r\n";
|
||||
|
||||
final += "\r\n\tvirtual string OpenCLString() const override\r\n";
|
||||
final += "\t{\r\n";
|
||||
final += "\t ostringstream ss, ss2;\r\n";
|
||||
final += "\t intmax_t i = 0, varIndex = IndexInXform();\r\n";
|
||||
final += "\t ss2 << \"_\" << XformIndexInEmber() << \"]\";\r\n";
|
||||
final += "\t string index = ss2.str();\r\n";
|
||||
final += "\t string weight = WeightDefineString();\r\n";
|
||||
|
||||
foreach (var param in m_Params)
|
||||
{
|
||||
final += "\t\tstring " + param.MemberName.Replace("m_", "").ToLower() + " = \"parVars[\" + ToUpper(m_Params[i++].Name()) + index;\r\n";
|
||||
}
|
||||
|
||||
final += "\t\tss << \"\\t{\\n\"\r\n";
|
||||
|
||||
foreach (var line in m_FinalCalcFuncLines)
|
||||
{
|
||||
string templine;
|
||||
|
||||
if (line != "")
|
||||
templine = "\t\t<< \"\\t\\t" + line + "\\n\"\r\n";
|
||||
else
|
||||
templine = "\t\t<< \"\\n\"\r\n";
|
||||
|
||||
templine = templine.Replace("\\tT ", "\\treal_t ").
|
||||
Replace("helper.In.x", "vIn.x").
|
||||
Replace("helper.In.y", "vIn.y").
|
||||
Replace("helper.In.z", "vIn.z").
|
||||
Replace("helper.Out.x", "vOut.x").
|
||||
Replace("helper.Out.y", "vOut.y").
|
||||
Replace("helper.Out.z", "vOut.z").
|
||||
Replace("Floor<T>", "floor").
|
||||
Replace("std::abs", "fabs").
|
||||
Replace("m_Weight", "\" << weight << \"").
|
||||
Replace("std::", "").
|
||||
Replace("T(", "(real_t)(")
|
||||
;
|
||||
|
||||
foreach (var param in m_Params)
|
||||
{
|
||||
if (templine.Contains(param.MemberName))
|
||||
templine = templine.Replace(param.MemberName, "\" << " + param.MemberName.Substring(2).ToLower() + " << \"");
|
||||
}
|
||||
|
||||
foreach (var param in m_StructParams)
|
||||
{
|
||||
if (templine.Contains(param.MemberName))
|
||||
templine = templine.Replace(param.MemberName, "\" << " + param.MemberName.Substring(2).ToLower() + " << \"");
|
||||
}
|
||||
|
||||
final += templine;
|
||||
}
|
||||
|
||||
final += "\t\t<< \"\\t\\tvOut.z = \" << DefaultZCl()\r\n";
|
||||
final += "\t\t<< \"\\t}\\n\";\r\n";
|
||||
final += "\t\treturn ss.str();\r\n";
|
||||
final += "\t}\r\n";
|
||||
|
||||
if (isparvar)
|
||||
{
|
||||
final += "\r\n\tvirtual void Precalc() override\r\n";
|
||||
final += "\t{\r\n";
|
||||
|
||||
foreach (var line in m_PrecalcFuncLines)
|
||||
{
|
||||
var templine = line;
|
||||
|
||||
foreach (var param in m_Params)
|
||||
templine = templine.Replace("VAR(" + param.Name + ")", param.MemberName);
|
||||
|
||||
foreach (var param in m_StructParams)
|
||||
templine = templine.Replace("VAR(" + param.OrigName + ")", param.MemberName);
|
||||
|
||||
final += "\t\t" + templine + "\r\n";
|
||||
}
|
||||
|
||||
final += "\t}\r\n";
|
||||
}
|
||||
|
||||
final += "\r\n\tvirtual vector<string> OpenCLGlobalFuncNames() const override\r\n";
|
||||
final += "\t{\r\n";
|
||||
final += "\t return vector<string> { \"Zeps\" };\r\n";
|
||||
final += "\t}\r\n";
|
||||
bool saidprecalc = false;
|
||||
|
||||
if (isparvar)
|
||||
{
|
||||
|
||||
final += "\r\nprotected:\r\n";
|
||||
final += "\tvoid Init()\r\n";
|
||||
final += "\t{\r\n";
|
||||
final += "\t\tstring prefix = Prefix();\r\n";
|
||||
final += "\t\tm_Params.clear();\r\n";
|
||||
|
||||
foreach (var param in m_Params)
|
||||
final += "\t\tm_Params.push_back(ParamWithName<T>(&" + param.MemberName
|
||||
+ ", prefix + \""
|
||||
+ param.Name
|
||||
+ (param.Default != "0" && param.Default != "0.0" && param.Default != "" || param.ParamType != "" ?
|
||||
"\", T(" + param.Default + ")"
|
||||
:
|
||||
"\"")
|
||||
+ (param.ParamType != "" ? ", " + param.ParamType : "")
|
||||
+ (param.Lower != "" ? ", T(" + param.Lower + ")" : "")
|
||||
+ (param.Upper != "" ? ", T(" + param.Upper + ")" : "")
|
||||
+ "));\r\n";
|
||||
|
||||
foreach (var param in m_StructParams)
|
||||
{
|
||||
final += "\t\tm_Params.push_back(ParamWithName<T>(true, &" + param.MemberName
|
||||
+ ", prefix + \""
|
||||
+ param.Name + "\"));" + (!saidprecalc ? "//Precalc." : "") + "\r\n";
|
||||
saidprecalc = true;
|
||||
}
|
||||
|
||||
final += "\t}\r\n";
|
||||
final += "\r\nprivate:\r\n";
|
||||
|
||||
foreach (var param in m_Params)
|
||||
final += "\tT " + param.MemberName + ";\r\n";
|
||||
|
||||
saidprecalc = false;
|
||||
|
||||
foreach (var param in m_StructParams)
|
||||
{
|
||||
final += "\tT " + param.MemberName + ";" + (!saidprecalc ? "//Precalc." : "") + "\r\n";
|
||||
saidprecalc = true;
|
||||
}
|
||||
}
|
||||
|
||||
final += "};\r\n\r\n";
|
||||
|
||||
if (doexport)
|
||||
{
|
||||
if (isparvar)
|
||||
final += "MAKEPREPOSTPARVAR(" + pluginname.FirstCharToUpper() + ", " + pluginname + ", " + pluginname.ToUpper() + ")\r\n";
|
||||
else
|
||||
final += "MAKEPREPOSTVAR(" + pluginname.FirstCharToUpper() + ", " + pluginname + ", " + pluginname.ToUpper() + ")\r\n";
|
||||
|
||||
final += "EXPORTPREPOSTREGVAR(" + pluginname.FirstCharToUpper() + ", T) \\\r\n";
|
||||
final += "ADDPREPOSTREGVAR(" + pluginname.FirstCharToUpper() + ")\r\n\r\n";
|
||||
}
|
||||
|
||||
return final;
|
||||
}
|
||||
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
textBox2.Text = Apo2Fractorium(textBox1.Lines, true);
|
||||
|
||||
}
|
||||
|
||||
private void textBox1_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
textBox1.TextChanged -= textBox1_TextChanged;
|
||||
string final = "";
|
||||
List<string> tb1lines = new List<string>();
|
||||
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
var lines = File.ReadAllLines(file);
|
||||
tb1lines.AddRange(lines.ToList());
|
||||
final += Apo2Fractorium(lines, true);
|
||||
}
|
||||
|
||||
textBox1.Lines = tb1lines.ToArray();
|
||||
textBox2.Text = final;
|
||||
}
|
||||
|
||||
textBox1.TextChanged += textBox1_TextChanged;
|
||||
}
|
||||
|
||||
private void textBox1_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
|
||||
public class ParamInfo
|
||||
{
|
||||
public string Name = "";
|
||||
public string MemberName = "";
|
||||
public string Default = "";
|
||||
public string Lower = "";
|
||||
public string Upper = "";
|
||||
public string ParamType = "";
|
||||
}
|
||||
|
||||
|
||||
public class PrecalcParamInfo : ParamInfo
|
||||
{
|
||||
public string OrigName = "";
|
||||
}
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string FirstCharToUpper(this string input)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case null: throw new ArgumentNullException(nameof(input));
|
||||
|
||||
case "": throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input));
|
||||
|
||||
default: return input.First().ToString().ToUpper() + input.Substring(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static string RemoveFirst(this string input, string removeString)
|
||||
{
|
||||
int index = input.IndexOf(removeString);
|
||||
return (index < 0)
|
||||
? input
|
||||
: input.Remove(index, removeString.Length);
|
||||
}
|
||||
}
|
||||
}
|
123
Source/apoconv/Form1.resx
Normal file
123
Source/apoconv/Form1.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
22
Source/apoconv/Program.cs
Normal file
22
Source/apoconv/Program.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace apoconv
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
36
Source/apoconv/Properties/AssemblyInfo.cs
Normal file
36
Source/apoconv/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("apoconv")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("apoconv")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("4f78c421-8985-4411-8ffd-b0f323f857be")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
Source/apoconv/Properties/Resources.Designer.cs
generated
Normal file
71
Source/apoconv/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace apoconv.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("apoconv.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
Source/apoconv/Properties/Resources.resx
Normal file
117
Source/apoconv/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
Source/apoconv/Properties/Settings.Designer.cs
generated
Normal file
30
Source/apoconv/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace apoconv.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
Source/apoconv/Properties/Settings.settings
Normal file
7
Source/apoconv/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
83
Source/apoconv/apoconv.csproj
Normal file
83
Source/apoconv/apoconv.csproj
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4F78C421-8985-4411-8FFD-B0F323F857BE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>apoconv</RootNamespace>
|
||||
<AssemblyName>apoconv</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user