mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-13 03:40:31 +02:00
Ran Uncrustify Again
This commit is contained in:
@@ -6,5 +6,5 @@ IntelliRenderSettings::IntelliRenderSettings()
|
||||
}
|
||||
|
||||
bool IntelliRenderSettings::getFastRenderer(){
|
||||
return fastRenderer;
|
||||
return fastRenderer;
|
||||
}
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
class IntelliRenderSettings
|
||||
{
|
||||
public:
|
||||
IntelliRenderSettings();
|
||||
IntelliRenderSettings();
|
||||
|
||||
/*!
|
||||
* \brief The getfastRenderer gets the value of the flag for the fastRenderer setting.
|
||||
* \return Returns true if fastRenderer is active else false
|
||||
*/
|
||||
bool getFastRenderer();
|
||||
/*!
|
||||
* \brief The getfastRenderer gets the value of the flag for the fastRenderer setting.
|
||||
* \return Returns true if fastRenderer is active else false
|
||||
*/
|
||||
bool getFastRenderer();
|
||||
|
||||
private:
|
||||
bool fastRenderer = true;
|
||||
bool fastRenderer = true;
|
||||
};
|
||||
|
||||
#endif // INTELLIRENDERSETTINGS_H
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
IntelliToolsettings::IntelliToolsettings()
|
||||
{
|
||||
lineWidth = 1;
|
||||
innerAlpha = 255;
|
||||
Linestyle = LineStyle::SOLID_LINE;
|
||||
lineWidth = 1;
|
||||
innerAlpha = 255;
|
||||
Linestyle = LineStyle::SOLID_LINE;
|
||||
}
|
||||
|
||||
IntelliToolsettings::~IntelliToolsettings(){
|
||||
@@ -13,41 +13,41 @@ IntelliToolsettings::~IntelliToolsettings(){
|
||||
}
|
||||
|
||||
int IntelliToolsettings::getLineWidth(){
|
||||
return lineWidth;
|
||||
return lineWidth;
|
||||
}
|
||||
|
||||
void IntelliToolsettings::setLineWidth(){
|
||||
lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",1,1,50,1);
|
||||
lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",1,1,50,1);
|
||||
}
|
||||
|
||||
void IntelliToolsettings::setLineWidth(int LineWidth){
|
||||
if(LineWidth < 1){
|
||||
LineWidth = 1;
|
||||
}
|
||||
else if(LineWidth > 50){
|
||||
LineWidth = 50;
|
||||
}
|
||||
lineWidth = LineWidth;
|
||||
if(LineWidth < 1) {
|
||||
LineWidth = 1;
|
||||
}
|
||||
else if(LineWidth > 50) {
|
||||
LineWidth = 50;
|
||||
}
|
||||
lineWidth = LineWidth;
|
||||
}
|
||||
|
||||
int IntelliToolsettings::getInnerAlpha(){
|
||||
return this->innerAlpha;
|
||||
return this->innerAlpha;
|
||||
}
|
||||
|
||||
void IntelliToolsettings::setInnerAlpha(){
|
||||
this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Aplha Input", "Value",0,0,255,1);
|
||||
this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Aplha Input", "Value",0,0,255,1);
|
||||
}
|
||||
|
||||
void IntelliToolsettings::setInnerAlpha(int innerAlpha){
|
||||
if(innerAlpha < 0){
|
||||
innerAlpha = 0;
|
||||
}
|
||||
else if(innerAlpha > 255){
|
||||
innerAlpha = 255;
|
||||
}
|
||||
this->innerAlpha = innerAlpha;
|
||||
if(innerAlpha < 0) {
|
||||
innerAlpha = 0;
|
||||
}
|
||||
else if(innerAlpha > 255) {
|
||||
innerAlpha = 255;
|
||||
}
|
||||
this->innerAlpha = innerAlpha;
|
||||
}
|
||||
|
||||
IntelliToolsettings::LineStyle IntelliToolsettings::getLinestyle(){
|
||||
return Linestyle;
|
||||
return Linestyle;
|
||||
}
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
|
||||
class IntelliToolsettings {
|
||||
public:
|
||||
/*!
|
||||
* \brief The LineStyle enum classifing all ways of drawing a line.
|
||||
*/
|
||||
enum class LineStyle {
|
||||
SOLID_LINE,
|
||||
DOTTED_LINE
|
||||
};
|
||||
IntelliToolsettings();
|
||||
virtual ~IntelliToolsettings();
|
||||
int getLineWidth();
|
||||
void setLineWidth();
|
||||
void setLineWidth(int LineWidth);
|
||||
int getInnerAlpha();
|
||||
void setInnerAlpha();
|
||||
void setInnerAlpha(int innerAlpha);
|
||||
LineStyle getLinestyle();
|
||||
/*!
|
||||
* \brief The LineStyle enum classifing all ways of drawing a line.
|
||||
*/
|
||||
enum class LineStyle {
|
||||
SOLID_LINE,
|
||||
DOTTED_LINE
|
||||
};
|
||||
IntelliToolsettings();
|
||||
virtual ~IntelliToolsettings();
|
||||
int getLineWidth();
|
||||
void setLineWidth();
|
||||
void setLineWidth(int LineWidth);
|
||||
int getInnerAlpha();
|
||||
void setInnerAlpha();
|
||||
void setInnerAlpha(int innerAlpha);
|
||||
LineStyle getLinestyle();
|
||||
|
||||
private:
|
||||
int lineWidth;
|
||||
int innerAlpha;
|
||||
LineStyle Linestyle;
|
||||
int lineWidth;
|
||||
int innerAlpha;
|
||||
LineStyle Linestyle;
|
||||
};
|
||||
|
||||
#endif // INTELLITOOLSETTINGS_H
|
||||
|
||||
@@ -19,7 +19,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
QPoint BP(point.x()-post.x(), point.y()-post.y());
|
||||
|
||||
float topSclar = AP.x()*BP.x()+AP.y()*BP.y();
|
||||
float absolute = static_cast<float>(sqrt(pow(AP.x(),2.)+pow(AP.y(),2.))*sqrt(pow(BP.x(),2.)+pow(BP.y(),2.)));
|
||||
float absolute = static_cast<float>(sqrt(pow(AP.x(),2.)+pow(AP.y(),2.))*sqrt(pow(BP.x(),2.)+pow(BP.y(),2.)));
|
||||
return acos(topSclar/absolute);
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
|
||||
// return if the vertex is a tip
|
||||
auto isTip = [](float angle){
|
||||
return static_cast<double>(angle)<(pi/2.);
|
||||
return static_cast<double>(angle)<(pi/2.);
|
||||
};
|
||||
|
||||
std::vector<TriangleHelper> Vertices;
|
||||
@@ -88,7 +88,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
}
|
||||
|
||||
// update post und prev idx
|
||||
post = getPrev(post, Vertices.size());
|
||||
post = getPrev(post, Vertices.size());
|
||||
prev = prev<smallest.idx ? prev : (prev-1);
|
||||
|
||||
// calcultae neighboors of prev and post to calculate new interior angles
|
||||
@@ -115,7 +115,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
|
||||
|
||||
bool IntelliTriangulation::isInPolygon(std::vector<Triangle> &triangles, QPoint &point){
|
||||
for(auto triangle : triangles) {
|
||||
if(IntelliTriangulation::isInTriangle(triangle, point)) {
|
||||
if(IntelliTriangulation::isInTriangle(triangle, point)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ inline bool isInTriangle(Triangle& tri, QPoint& P){
|
||||
float val1, val2, val3;
|
||||
bool neg, pos;
|
||||
|
||||
val1 = IntelliTriangulation::sign(P,tri.A,tri.B);
|
||||
val2 = IntelliTriangulation::sign(P,tri.B,tri.C);
|
||||
val3 = IntelliTriangulation::sign(P,tri.C,tri.A);
|
||||
val1 = IntelliTriangulation::sign(P,tri.A,tri.B);
|
||||
val2 = IntelliTriangulation::sign(P,tri.B,tri.C);
|
||||
val3 = IntelliTriangulation::sign(P,tri.C,tri.A);
|
||||
|
||||
neg = (val1<0.f) || (val2<0.f) || (val3<0.f);
|
||||
pos = (val1>0.f) || (val2>0.f) || (val3>0.f);
|
||||
|
||||
Reference in New Issue
Block a user