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
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
6bc4d3b7
Commit
6bc4d3b7
authored
Nov 24, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge
https://github.com/cgogn/CGoGN
into develop
parents
145c0409
688e6976
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
CGoGN/include/Algo/Render/GL2/topoRender.h
CGoGN/include/Algo/Render/GL2/topoRender.h
+8
-0
CGoGN/include/Algo/Render/GL2/topoRender.hpp
CGoGN/include/Algo/Render/GL2/topoRender.hpp
+17
-0
No files found.
CGoGN/include/Algo/Render/GL2/topoRender.h
View file @
6bc4d3b7
...
...
@@ -383,6 +383,14 @@ public:
template
<
typename
MAP
>
void
drawColoredDarts
(
MAP
&
map
);
/**
* Get back middle position of drawn darts
* @param map the map
* @param posExpl the output positions
*/
template
<
typename
PFP
>
void
computeDartMiddlePositions
(
typename
PFP
::
MAP
&
map
,
DartAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
posExpl
);
};
...
...
CGoGN/include/Algo/Render/GL2/topoRender.hpp
View file @
6bc4d3b7
...
...
@@ -641,6 +641,23 @@ Dart TopoRender::raySelection(MAP& map, const Geom::Vec3f& rayA, const Geom::Vec
return
dFinal
;
}
template
<
typename
PFP
>
void
TopoRender
::
computeDartMiddlePositions
(
typename
PFP
::
MAP
&
map
,
DartAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
posExpl
)
{
DartAttribute
<
unsigned
int
,
typename
PFP
::
MAP
>
attIndex
=
map
.
template
getAttribute
<
unsigned
int
,
DART
,
typename
PFP
::
MAP
>(
m_nameIndex
);
if
(
!
attIndex
.
isValid
())
attIndex
=
map
.
template
addAttribute
<
unsigned
int
,
DART
,
typename
PFP
::
MAP
>(
m_nameIndex
);
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
const
Geom
::
Vec3f
&
P
=
m_bufferDartPosition
[
attIndex
[
d
]];
const
Geom
::
Vec3f
&
Q
=
m_bufferDartPosition
[
attIndex
[
d
]
+
1
];
posExpl
[
d
]
=
(
P
+
Q
)
*
0.5
f
;
}
}
}
// namespace GL2
}
// namespace Algo
...
...
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