-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f2cf129
Showing
108 changed files
with
23,955 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
#------------------------------------------------- | ||
# | ||
# Project created by QtCreator 2013-07-09T22:24:18 | ||
# | ||
#------------------------------------------------- | ||
|
||
QT += core gui opengl | ||
|
||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | ||
|
||
TARGET = TopOptim | ||
TEMPLATE = app | ||
|
||
|
||
SOURCES += main.cpp\ | ||
mainwindow.cpp \ | ||
model.cpp \ | ||
face.cpp \ | ||
part.cpp \ | ||
vertex.cpp \ | ||
filemanager.cpp \ | ||
optimalizationmanager.cpp \ | ||
ga/GATreeGenome.C \ | ||
ga/GATreeBASE.C \ | ||
ga/GATree.C \ | ||
ga/GAStringGenome.C \ | ||
ga/GAStatistics.C \ | ||
ga/GASStateGA.C \ | ||
ga/GASimpleGA.C \ | ||
ga/GASelector.C \ | ||
ga/GAScaling.C \ | ||
ga/GARealGenome.C \ | ||
ga/garandom.C \ | ||
ga/GAPopulation.C \ | ||
ga/GAParameter.C \ | ||
ga/GAListGenome.C \ | ||
ga/GAListBASE.C \ | ||
ga/GAList.C \ | ||
ga/GAIncGA.C \ | ||
ga/GAGenome.C \ | ||
ga/gaerror.C \ | ||
ga/GADemeGA.C \ | ||
ga/GADCrowdingGA.C \ | ||
ga/GABinStr.C \ | ||
ga/gabincvt.C \ | ||
ga/GABin2DecGenome.C \ | ||
ga/GABaseGA.C \ | ||
ga/GAAllele.C \ | ||
ga/GA3DBinStrGenome.C \ | ||
ga/GA3DArrayGenome.C \ | ||
ga/GA2DBinStrGenome.C \ | ||
ga/GA2DArrayGenome.C \ | ||
ga/GA1DBinStrGenome.C \ | ||
ga/GA1DArrayGenome.C \ | ||
group.cpp \ | ||
configurationwindow.cpp \ | ||
modelview.cpp | ||
|
||
HEADERS += mainwindow.h \ | ||
errorCodes.h \ | ||
model.h \ | ||
face.h \ | ||
part.h \ | ||
vertex.h \ | ||
filemanager.h \ | ||
optimalizationmanager.h \ | ||
ga/gaversion.h \ | ||
ga/gatypes.h \ | ||
ga/GATreeGenome.h \ | ||
ga/GATreeBASE.h \ | ||
ga/GATree.h \ | ||
ga/GAStringGenome.h \ | ||
ga/GAStatistics.h \ | ||
ga/GASStateGA.h \ | ||
ga/GASimpleGA.h \ | ||
ga/GASelector.h \ | ||
ga/GAScaling.h \ | ||
ga/GARealGenome.h \ | ||
ga/garandom.h \ | ||
ga/GAPopulation.h \ | ||
ga/GAParameter.h \ | ||
ga/GANode.h \ | ||
ga/GAMask.h \ | ||
ga/GAListGenome.h \ | ||
ga/GAListBASE.h \ | ||
ga/GAList.h \ | ||
ga/GAIncGA.h \ | ||
ga/gaid.h \ | ||
ga/GAGenome.h \ | ||
ga/GAEvalData.h \ | ||
ga/gaerror.h \ | ||
ga/GADemeGA.h \ | ||
ga/GADCrowdingGA.h \ | ||
ga/gaconfig.h \ | ||
ga/GABinStr.h \ | ||
ga/gabincvt.h \ | ||
ga/GABin2DecGenome.h \ | ||
ga/GABaseGA.h \ | ||
ga/GAArray.h \ | ||
ga/GAAllele.h \ | ||
ga/GA3DBinStrGenome.h \ | ||
ga/GA3DArrayGenome.h \ | ||
ga/GA2DBinStrGenome.h \ | ||
ga/GA2DArrayGenome.h \ | ||
ga/GA1DBinStrGenome.h \ | ||
ga/GA1DArrayGenome.h \ | ||
ga/ga.h \ | ||
group.h \ | ||
configurationwindow.h \ | ||
modelview.h | ||
|
||
FORMS += mainwindow.ui \ | ||
configurationwindow.ui | ||
|
||
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/lib/ -lPocoXML | ||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/lib/ -lPocoXMLd | ||
else:unix: LIBS += -L$$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/lib/ -lPocoXML | ||
|
||
INCLUDEPATH += $$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/XML/include | ||
DEPENDPATH += $$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/XML/include | ||
|
||
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/lib/ -lPocoFoundation | ||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/lib/ -lPocoFoundationd | ||
else:unix: LIBS += -L$$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/lib/ -lPocoFoundation | ||
|
||
INCLUDEPATH += $$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/Foundation/include | ||
DEPENDPATH += $$PWD/../../../../../../Biblioteki/poco-1.4.6p1-all/Foundation/include | ||
|
||
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../Biblioteki/boost/lib/release -llibboost_system-vc100-mt-1_54 | ||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../Biblioteki/boost/lib/debug -llibboost_system-vc100-mt-1_54 | ||
else:unix: LIBS += -L$$PWD/../../../../../../Biblioteki/boost/lib/ -llibboost_system-vc100-mt-1_54 | ||
|
||
INCLUDEPATH += $$PWD/../../../../../../Biblioteki/boost/include/boost-1_54 | ||
DEPENDPATH += $$PWD/../../../../../../Biblioteki/boost/include/boost-1_54 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "configurationwindow.h" | ||
#include "ui_configurationwindow.h" | ||
|
||
ConfigurationWindow::ConfigurationWindow(QWidget *parent) : | ||
QDialog(parent), | ||
ui(new Ui::ConfigurationWindow) | ||
{ | ||
ui->setupUi(this); | ||
} | ||
|
||
ConfigurationWindow::~ConfigurationWindow() | ||
{ | ||
delete ui; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef CONFIGURATIONWINDOW_H | ||
#define CONFIGURATIONWINDOW_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class ConfigurationWindow; | ||
} | ||
|
||
class ConfigurationWindow : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit ConfigurationWindow(QWidget *parent = 0); | ||
~ConfigurationWindow(); | ||
|
||
private: | ||
Ui::ConfigurationWindow *ui; | ||
}; | ||
|
||
#endif // CONFIGURATIONWINDOW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<ui version="4.0"> | ||
<author/> | ||
<comment/> | ||
<exportmacro/> | ||
<class>ConfigurationWindow</class> | ||
<widget name="ConfigurationWindow" class="QDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<widget name="buttonBox" class="QDialogButtonBox"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>30</x> | ||
<y>240</y> | ||
<width>341</width> | ||
<height>32</height> | ||
</rect> | ||
</property> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | ||
</property> | ||
</widget> | ||
</widget> | ||
<pixmapfunction/> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>accepted()</signal> | ||
<receiver>ConfigurationWindow</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>248</x> | ||
<y>254</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>157</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>rejected()</signal> | ||
<receiver>ConfigurationWindow</receiver> | ||
<slot>reject()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>316</x> | ||
<y>260</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>286</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef ERRORCODES_H | ||
#define ERRORCODES_H | ||
|
||
#endif // ERRORCODES_H | ||
|
||
const int ERR_NO_ERROR = 0; | ||
|
||
const int ERR_OUT_OF_RANGE = 111; | ||
|
||
const int ERR_OPEN_FILE = 200; | ||
|
||
const int ERR_FACE_NOT_FOUND = 301; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#include "face.h" | ||
#include "errorCodes.h" | ||
|
||
CmFace::CmFace(const unsigned int &num, | ||
const std::vector<unsigned int> &verticesNums, | ||
int &error) | ||
{ | ||
if(verticesNums.size() == 4) | ||
{ | ||
m_verticesNums = verticesNums; | ||
m_num = num; | ||
error = ERR_NO_ERROR; | ||
} | ||
else | ||
{ | ||
error = ERR_OUT_OF_RANGE; | ||
} | ||
} | ||
|
||
bool CmFace::VerticesNums(const std::vector<unsigned int> &verticesNums) | ||
{ | ||
if(verticesNums.size() > 4) | ||
return false; | ||
m_verticesNums = verticesNums; | ||
return true; | ||
} | ||
|
||
std::vector<unsigned int> CmFace::VerticesNums() | ||
{ | ||
return m_verticesNums; | ||
} | ||
|
||
unsigned int CmFace::GetIndex() | ||
{ | ||
return m_num; | ||
} | ||
|
||
void CmFace::AddNeighbor(const unsigned int &neighborIndex) | ||
{ | ||
m_neighbors.insert(neighborIndex); | ||
} | ||
|
||
void CmFace::RemoveNeighbor(const unsigned int &neighborIndex) | ||
{ | ||
m_neighbors.erase(neighborIndex); | ||
} | ||
|
||
std::set<unsigned int> CmFace::GetNeighbors() | ||
{ | ||
return m_neighbors; | ||
} | ||
|
||
void CmFace::SetMaterialIndex(const unsigned int &materialIndex) | ||
{ | ||
m_materialIndex = materialIndex; | ||
} | ||
|
||
unsigned int CmFace::GetMaterialIndex() | ||
{ | ||
return m_materialIndex; | ||
} | ||
|
||
void CmFace::BL(const unsigned int &index) | ||
{ | ||
m_BL = index; | ||
} | ||
|
||
unsigned int CmFace::BL() | ||
{ | ||
return m_BL; | ||
} | ||
|
||
void CmFace::BR(const unsigned int &index) | ||
{ | ||
m_BR = index; | ||
} | ||
|
||
unsigned int CmFace::BR() | ||
{ | ||
return m_BR; | ||
} | ||
|
||
void CmFace::TL(const unsigned int &index) | ||
{ | ||
m_TL = index; | ||
} | ||
|
||
unsigned int CmFace::TL() | ||
{ | ||
return m_TL; | ||
} | ||
|
||
void CmFace::TR(const unsigned int &index) | ||
{ | ||
m_TR = index; | ||
} | ||
|
||
unsigned int CmFace::TR() | ||
{ | ||
return m_TR; | ||
} |
Oops, something went wrong.