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
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
85345a67
Commit
85345a67
authored
May 25, 2011
by
Mathias Goldau
Browse files
[FIX] made it compile on Mac.
parent
3bd4b8f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
src/core/common/math/WPlane.cpp
src/core/common/math/WPlane.cpp
+8
-4
src/core/dataHandler/datastructures/WFiberCluster.cpp
src/core/dataHandler/datastructures/WFiberCluster.cpp
+1
-1
src/core/graphicsEngine/WGEGraphicsWindow.cpp
src/core/graphicsEngine/WGEGraphicsWindow.cpp
+8
-4
No files found.
src/core/common/math/WPlane.cpp
View file @
85345a67
...
...
@@ -79,10 +79,14 @@ boost::shared_ptr< std::set< WPosition > > WPlane::samplePoints( double stepWidt
{
for
(
size_t
j
=
0
;
j
<
numX
;
++
j
)
{
result
->
insert
(
m_pos
-
i
*
ycrement
-
j
*
xcrement
);
result
->
insert
(
m_pos
+
i
*
ycrement
-
j
*
xcrement
);
result
->
insert
(
m_pos
-
i
*
ycrement
+
j
*
xcrement
);
result
->
insert
(
m_pos
+
i
*
ycrement
+
j
*
xcrement
);
// NOTE: on some machines with older compilers, the size_t is not mapped to uint32_t or uint64_t. This
// breaks our WMatrixFixed type promotion. So we use doubles directly.
double
id
=
i
;
double
jd
=
j
;
result
->
insert
(
m_pos
-
id
*
ycrement
-
jd
*
xcrement
);
result
->
insert
(
m_pos
+
id
*
ycrement
-
jd
*
xcrement
);
result
->
insert
(
m_pos
-
id
*
ycrement
+
jd
*
xcrement
);
result
->
insert
(
m_pos
+
id
*
ycrement
+
jd
*
xcrement
);
}
}
return
result
;
...
...
src/core/dataHandler/datastructures/WFiberCluster.cpp
View file @
85345a67
...
...
@@ -162,7 +162,7 @@ void WFiberCluster::generateCenterLine() const
{
avgPosition
+=
cit
->
at
(
i
);
}
avgPosition
/=
fibs
->
size
();
avgPosition
/=
static_cast
<
double
>
(
fibs
->
size
()
)
;
m_centerLine
->
push_back
(
avgPosition
);
}
...
...
src/core/graphicsEngine/WGEGraphicsWindow.cpp
View file @
85345a67
...
...
@@ -28,16 +28,19 @@
#include "exceptions/WGEInitFailed.h"
WGEGraphicsWindow
::
WGEGraphicsWindow
(
osg
::
ref_ptr
<
osg
::
Referenced
>
wdata
,
WGEGraphicsWindow
::
WGEGraphicsWindow
(
osg
::
ref_ptr
<
osg
::
Referenced
>
#ifndef __APPLE__
wdata
// this parameter is only needed on non-mac
#endif
,
int
x
,
int
y
,
int
width
,
int
height
)
{
#ifndef __APPLE__
m_WindowData
=
wdata
;
// initialize context
m_WindowData
=
wdata
;
try
{
createContext
(
x
,
y
,
width
,
height
);
...
...
@@ -48,7 +51,8 @@ WGEGraphicsWindow::WGEGraphicsWindow( osg::ref_ptr<osg::Referenced> wdata,
throw
WGEInitFailed
(
"Initialization of OpenGL graphics context failed."
);
}
#else
m_GraphicsWindow
(
new
osgViewer
::
GraphicsWindowEmbedded
(
x
,
y
,
width
,
height
)
);
m_GraphicsWindow
=
osg
::
ref_ptr
<
osgViewer
::
GraphicsWindow
>
(
static_cast
<
osgViewer
::
GraphicsWindow
*>
(
new
osgViewer
::
GraphicsWindowEmbedded
(
x
,
y
,
width
,
height
)
)
);
#endif
}
...
...
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