Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
20fa73ce
Commit
20fa73ce
authored
Nov 17, 2014
by
reichenbach
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE]
parents
372156e1
94e1ee84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/core/dataHandler/WCreateColorArraysThread.cpp
src/core/dataHandler/WCreateColorArraysThread.cpp
+7
-0
No files found.
src/core/dataHandler/WCreateColorArraysThread.cpp
View file @
20fa73ce
...
...
@@ -89,6 +89,9 @@ void WCreateColorArraysThread::threadMain()
b
*=
-
1.0
;
float
norm
=
std
::
sqrt
(
r
*
r
+
g
*
g
+
b
*
b
);
if
(
norm
==
0.0
)
norm
=
1.0
;
r
*=
1.0
/
norm
;
g
*=
1.0
/
norm
;
b
*=
1.0
/
norm
;
...
...
@@ -107,6 +110,9 @@ void WCreateColorArraysThread::threadMain()
lastz
=
(
*
m_vertices
)[
pc
+
2
];
float
norm
=
std
::
sqrt
(
rr
*
rr
+
gg
*
gg
+
bb
*
bb
);
if
(
norm
==
0.0
)
norm
=
1.0
;
rr
*=
1.0
/
norm
;
gg
*=
1.0
/
norm
;
bb
*=
1.0
/
norm
;
...
...
@@ -139,3 +145,4 @@ bool WCreateColorArraysThread::isFinished()
{
return
m_myThreadFinished
;
}
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