Skip to content

Commit e2a753e

Browse files
committed
Constexpr std::cos cannot be used in clang. Replaced with numeric values.
1 parent aac66f8 commit e2a753e

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

external/assm/algorithms/ScreenDifferentialGeometry.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ template<typename Camera = Orthographic>
7474
class ScreenDifferentialGeometry
7575
{
7676
public:
77-
static constexpr Scalar degrees = M_PI / 180.;
78-
static constexpr Scalar cos_max_angle = std::cos(85. * degrees);
79-
static constexpr Scalar sin_max_angle = std::sqrt(1. - cos_max_angle * cos_max_angle);
80-
static constexpr float sigma_ = std::sqrt(2);
81-
77+
static constexpr Scalar degrees = 0.017453292; //M_PI / 180.;
78+
static constexpr Scalar cos_max_angle = 0.087155743; //std::cos(85. * degrees);
79+
static constexpr Scalar sin_max_angle = 0.996194698; //std::sqrt(1. - cos_max_angle * cos_max_angle);
80+
static constexpr float sigma_ = 1.414213562; //std::sqrt(2);
8281
private:
8382
SurfaceMesh& mesh_;
8483
Camera camera_;

relightlab/normalstask.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class NormalsTask : public Task {
2626
bool exportTiff = false;
2727

2828
bool exportPly = false;
29-
bool bni_k = 2.0;
29+
float bni_k = 2.0;
3030
ImageSet imageset;
3131
Lens lens;
3232
float pixelSize = 0.0f;

relightlab/relightlab.pro

+6
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,14 @@ RESOURCES += \
115115

116116

117117
HEADERS += \
118+
../external/assm/algorithms/DifferentialGeometry.h \
118119
../external/assm/algorithms/Integration.h \
119120
../external/assm/algorithms/PhotometricRemeshing.h \
121+
../external/assm/algorithms/Rasterizer.h \
122+
../external/assm/algorithms/ScreenDifferentialGeometry.h \
123+
../external/assm/algorithms/ScreenMeshing.h \
124+
../external/assm/algorithms/ScreenRemeshing.h \
125+
../external/assm/algorithms/Triangulation.h \
120126
../relight-cli/rtibuilder.h \
121127
../src/flatnormals.h \
122128
processqueue.h \

relightlab/rtiframe.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ void RtiFrame::basisChanged() {
149149
case Rti::RBF:
150150
case Rti::BILINEAR:
151151
if(colorspace != Rti::YCC) nchroma = 0;
152+
default:
153+
break;
152154
}
153155

154156
planes_row->setNPlanes(nplanes);

relightlab/rtiplan.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ void RtiColorSpaceRow::setColorspace(Rti::ColorSpace colorspace, bool emitting)
130130
case Rti::LRGB: lrgb->setChecked(true); break;
131131
case Rti::MRGB: mrgb->setChecked(true); break;
132132
case Rti::YCC: ycc->setChecked(true); break;
133+
default:
134+
break; //TODO check MYCC!
133135
}
134136
}
135137

0 commit comments

Comments
 (0)