Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenMesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenMesh
OpenMesh
Commits
2e86df2b
Commit
2e86df2b
authored
Sep 25, 2020
by
Jan Möbius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'revert-
331703b3
' into 'Warning_fixes'
Revert "Try to fix float warning" See merge request
!281
parents
331703b3
cd886a23
Pipeline
#15238
passed with stages
in 91 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
src/Unittests/unittests_read_write_PLY.cc
src/Unittests/unittests_read_write_PLY.cc
+24
-24
No files found.
src/Unittests/unittests_read_write_PLY.cc
View file @
2e86df2b
...
...
@@ -996,21 +996,21 @@ TEST_F(OpenMeshReadWritePLY, LoadSimplePLYWithFaceColors) {
EXPECT_EQ
(
12u
,
mesh_
.
n_faces
())
<<
"The number of loaded faces is not correct!"
;
#ifdef TEST_DOUBLE_TRAITS
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
0
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
DOUBLE
_EQ
(
117
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
1
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
DOUBLE
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
2
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
0
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
FLOAT
_EQ
(
117
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
1
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
FLOAT
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
2
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
0
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
DOUBLE
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
1
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
DOUBLE
_EQ
(
135
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
2
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
0
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
FLOAT
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
1
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
FLOAT
_EQ
(
135
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
2
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
DOUBLE
_EQ
(
163
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
0
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
1
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
DOUBLE
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
2
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
FLOAT
_EQ
(
163
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
0
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
1
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
FLOAT
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
2
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
DOUBLE
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
0
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
DOUBLE
_EQ
(
140
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
1
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
2
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
FLOAT
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
0
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
FLOAT
_EQ
(
140
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
1
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
2
]
)
<<
"Wrong face color at face 7"
;
#else
EXPECT_EQ
(
107
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
0
]
)
<<
"Wrong face color at face 0"
;
EXPECT_EQ
(
117
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
1
]
)
<<
"Wrong face color at face 0"
;
...
...
@@ -1104,21 +1104,21 @@ TEST_F(OpenMeshReadWritePLY, WriteAndReadPLYWithFaceColors) {
EXPECT_EQ
(
12u
,
mesh_
.
n_faces
())
<<
"The number of loaded faces is not correct: "
<<
outFileName
;
#ifdef TEST_DOUBLE_TRAITS
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
0
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
DOUBLE
_EQ
(
117
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
1
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
DOUBLE
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
2
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
0
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
FLOAT
_EQ
(
117
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
1
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
FLOAT
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
2
]
)
<<
"Wrong face color at face 0"
;
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
0
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
DOUBLE
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
1
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
DOUBLE
_EQ
(
135
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
2
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
0
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
FLOAT
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
1
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
FLOAT
_EQ
(
135
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
3
))[
2
]
)
<<
"Wrong face color at face 3"
;
EXPECT_
DOUBLE
_EQ
(
163
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
0
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
1
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
DOUBLE
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
2
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
FLOAT
_EQ
(
163
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
0
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
1
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
FLOAT
_EQ
(
177
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
4
))[
2
]
)
<<
"Wrong face color at face 4"
;
EXPECT_
DOUBLE
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
0
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
DOUBLE
_EQ
(
140
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
1
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
DOUBLE
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
2
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
FLOAT
_EQ
(
255
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
0
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
FLOAT
_EQ
(
140
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
1
]
)
<<
"Wrong face color at face 7"
;
EXPECT_
FLOAT
_EQ
(
107
/
255.0
,
mesh_
.
color
(
mesh_
.
face_handle
(
7
))[
2
]
)
<<
"Wrong face color at face 7"
;
#else
EXPECT_EQ
(
107
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
0
]
)
<<
"Wrong face color at face 0"
;
EXPECT_EQ
(
117
,
mesh_
.
color
(
mesh_
.
face_handle
(
0
))[
1
]
)
<<
"Wrong face color at face 0"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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