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 Modules
Commits
7d3850bb
Commit
7d3850bb
authored
Apr 02, 2015
by
reichenbach
Browse files
[MERGE]
parents
5494f314
8c71a9a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
FiberStippleToolbox/src/isoLines/WMIsoLines.cpp
FiberStippleToolbox/src/isoLines/WMIsoLines.cpp
+5
-5
No files found.
FiberStippleToolbox/src/isoLines/WMIsoLines.cpp
View file @
7d3850bb
...
@@ -124,6 +124,8 @@ namespace
...
@@ -124,6 +124,8 @@ namespace
for
(
int
k
=
0
;
k
<
4
;
++
k
)
for
(
int
k
=
0
;
k
<
4
;
++
k
)
{
{
vertices
->
push_back
(
base
+
aNorm
*
i
*
resolution
+
bNorm
*
j
*
resolution
);
vertices
->
push_back
(
base
+
aNorm
*
i
*
resolution
+
bNorm
*
j
*
resolution
);
normals
->
push_back
(
aCrossB
);
colors
->
push_back
(
osg
::
Vec4
(
1.0
,
1.0
,
1.0
,
1.0
)
);
}
}
texcoords0
->
push_back
(
(
-
aNorm
+
-
bNorm
)
*
0.5
*
resolution
);
texcoords0
->
push_back
(
(
-
aNorm
+
-
bNorm
)
*
0.5
*
resolution
);
...
@@ -139,18 +141,16 @@ namespace
...
@@ -139,18 +141,16 @@ namespace
}
}
}
}
normals
->
push_back
(
aCrossB
);
colors
->
push_back
(
osg
::
Vec4
(
1.0
,
1.0
,
1.0
,
1.0
)
);
// put it all together
// put it all together
osg
::
ref_ptr
<
osg
::
Geometry
>
geometry
=
new
osg
::
Geometry
();
osg
::
ref_ptr
<
osg
::
Geometry
>
geometry
=
new
osg
::
Geometry
();
geometry
->
setVertexArray
(
vertices
);
geometry
->
setVertexArray
(
vertices
);
geometry
->
setTexCoordArray
(
0
,
texcoords0
);
geometry
->
setTexCoordArray
(
0
,
texcoords0
);
geometry
->
setTexCoordArray
(
1
,
texcoords1
);
geometry
->
setTexCoordArray
(
1
,
texcoords1
);
geometry
->
setNormalBinding
(
osg
::
Geometry
::
BIND_OVERALL
);
geometry
->
setColorBinding
(
osg
::
Geometry
::
BIND_OVERALL
);
geometry
->
setNormalArray
(
normals
);
geometry
->
setNormalArray
(
normals
);
geometry
->
setColorArray
(
colors
);
geometry
->
setColorArray
(
colors
);
geometry
->
setNormalBinding
(
osg
::
Geometry
::
BIND_PER_VERTEX
);
geometry
->
setColorBinding
(
osg
::
Geometry
::
BIND_PER_VERTEX
);
geometry
->
addPrimitiveSet
(
new
osg
::
DrawArrays
(
osg
::
PrimitiveSet
::
QUADS
,
0
,
vertices
->
size
()
)
);
geometry
->
addPrimitiveSet
(
new
osg
::
DrawArrays
(
osg
::
PrimitiveSet
::
QUADS
,
0
,
vertices
->
size
()
)
);
osg
::
ref_ptr
<
osg
::
Geode
>
geode
=
new
osg
::
Geode
();
osg
::
ref_ptr
<
osg
::
Geode
>
geode
=
new
osg
::
Geode
();
...
@@ -190,7 +190,7 @@ void WMIsoLines::initOSG( boost::shared_ptr< WDataSetScalar > scalars, const dou
...
@@ -190,7 +190,7 @@ void WMIsoLines::initOSG( boost::shared_ptr< WDataSetScalar > scalars, const dou
m_pos
->
set
(
midBB
[
axis
]
);
m_pos
->
set
(
midBB
[
axis
]
);
}
}
osg
::
ref_ptr
<
osg
::
Uniform
>
u_WorldTransform
=
new
osg
::
Uniform
(
"u_WorldTransform"
,
osg
::
Matrix
::
identity
()
);
osg
::
ref_ptr
<
osg
::
Uniform
>
u_WorldTransform
=
new
osg
::
Uniform
(
"u_WorldTransform"
,
osg
::
Matrix
f
::
identity
()
);
wge
::
bindAsUniform
(
m_output
,
u_WorldTransform
,
"u_WorldTransform"
);
wge
::
bindAsUniform
(
m_output
,
u_WorldTransform
,
"u_WorldTransform"
);
wge
::
bindAsUniform
(
m_output
,
m_isovalue
,
"u_isovalue"
);
wge
::
bindAsUniform
(
m_output
,
m_isovalue
,
"u_isovalue"
);
wge
::
bindAsUniform
(
m_output
,
m_lineWidth
,
"u_lineWidth"
);
wge
::
bindAsUniform
(
m_output
,
m_lineWidth
,
"u_lineWidth"
);
...
...
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