Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
9e3f43a6
Commit
9e3f43a6
authored
Dec 16, 2015
by
Jan Möbius
Browse files
Workaround for strange compiler error on VS2015 Update 1
parent
0aced4c8
Pipeline
#442
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/OpenMesh/Tools/VDPM/ViewingParameters.cc
View file @
9e3f43a6
...
...
@@ -86,7 +86,16 @@ update_viewing_configurations()
float
invdet
;
float
a11
,
a12
,
a13
,
a21
,
a22
,
a23
,
a31
,
a32
,
a33
;
Vec3f
inv_rot
[
3
],
trans
;
Vec3f
trans
;
// Workaround for internal compiler error on Visual Studio 2015 Update 1
#if (_MSC_VER >= 1900 )
Vec3f
inv_rot
[
3
]{
{},{},{}
};
Vec3f
normal
[
4
]{
{},{},{},{}
};
#else
Vec3f
inv_rot
[
3
];
Vec3f
normal
[
4
];
#endif
a11
=
(
float
)
modelview_matrix_
[
0
];
a12
=
(
float
)
modelview_matrix_
[
4
];
...
...
@@ -103,7 +112,7 @@ update_viewing_configurations()
a33
=
(
float
)
modelview_matrix_
[
10
];
trans
[
2
]
=
(
float
)
modelview_matrix_
[
14
];
invdet
=
a11
*
(
a33
*
a22
-
a32
*
a23
)
-
a21
*
(
a33
*
a12
-
a32
*
a13
)
+
a31
*
(
a23
*
a12
-
a22
*
a13
);
invdet
=
a11
*
(
a33
*
a22
-
a32
*
a23
)
-
a21
*
(
a33
*
a12
-
a32
*
a13
)
+
a31
*
(
a23
*
a12
-
a22
*
a13
);
invdet
=
(
float
)
1.0
/
invdet
;
(
inv_rot
[
0
])[
0
]
=
(
a33
*
a22
-
a32
*
a23
)
*
invdet
;
...
...
@@ -123,15 +132,14 @@ update_viewing_configurations()
up_dir_
=
Vec3f
(
a21
,
a22
,
a23
);
view_dir_
=
-
Vec3f
(
a31
,
a32
,
a33
);
Vec3f
normal
[
4
];
//float aspect = width() / height();
float
half_theta
=
fovy
()
*
0.5
f
;
float
half_phi
=
atanf
(
aspect
()
*
tanf
(
half_theta
));
const
float
half_theta
=
fovy
()
*
0.5
f
;
const
float
half_phi
=
atanf
(
aspect
()
*
tanf
(
half_theta
));
float
sin1
=
sinf
(
half_theta
);
float
cos1
=
cosf
(
half_theta
);
float
sin2
=
sinf
(
half_phi
);
float
cos2
=
cosf
(
half_phi
);
const
float
sin1
=
sinf
(
half_theta
);
const
float
cos1
=
cosf
(
half_theta
);
const
float
sin2
=
sinf
(
half_phi
);
const
float
cos2
=
cosf
(
half_phi
);
normal
[
0
]
=
cos2
*
right_dir_
+
sin2
*
view_dir_
;
normal
[
1
]
=
-
cos1
*
up_dir_
-
sin1
*
view_dir_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment