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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hurstel
CGoGN
Commits
1b7ac321
Commit
1b7ac321
authored
Sep 03, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve bug of topo drawing in tuto_oper3
parent
3d4119e2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
39 deletions
+37
-39
include/Algo/Render/GL2/topoRender.h
include/Algo/Render/GL2/topoRender.h
+3
-3
include/Algo/Render/GL2/topoRender.hpp
include/Algo/Render/GL2/topoRender.hpp
+18
-24
include/Topology/generic/dartmarker.h
include/Topology/generic/dartmarker.h
+16
-12
No files found.
include/Algo/Render/GL2/topoRender.h
View file @
1b7ac321
...
...
@@ -251,7 +251,7 @@ public:
Dart
raySelection
(
MAP
&
map
,
const
Geom
::
Vec3f
&
rayA
,
const
Geom
::
Vec3f
&
rayAB
,
float
distmax
);
virtual
void
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
=
false
)
=
0
;
virtual
void
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
=
false
,
bool
onlyBoundary
=
false
)
=
0
;
/**
* Special update function used to draw boundary of map3
...
...
@@ -290,7 +290,7 @@ class TopoRenderMap : public TopoRender<PFP>
public:
TopoRenderMap
(
float
bs
=
0.01
f
)
:
TopoRender
<
PFP
>
(
bs
)
{}
void
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
=
false
);
void
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
=
false
,
bool
onlyBoundary
=
false
);
};
template
<
typename
PFP
>
...
...
@@ -302,7 +302,7 @@ class TopoRenderGMap : public TopoRender<PFP>
public:
TopoRenderGMap
(
float
bs
=
0.01
f
)
:
TopoRender
<
PFP
>
(
bs
)
{}
void
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
=
false
);
void
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
=
false
,
bool
onlyBoundary
=
false
);
};
}
// namespace GL2
...
...
include/Algo/Render/GL2/topoRender.hpp
View file @
1b7ac321
...
...
@@ -432,45 +432,34 @@ void TopoRender<PFP>::setBoundaryShift(float bs)
}
template
<
typename
PFP
>
void
TopoRender
<
PFP
>::
updateDataBoundary
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
float
ns
)
void
TopoRender
<
PFP
>::
updateDataBoundary
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
float
ns
)
{
m_normalShift
=
ns
;
SelectorDartBoundary
<
MAP
>
sdb
(
map
);
DartContainerBrowserSelector
<
MAP
>
browser
(
map
,
sdb
);
browser
.
enable
();
updateData
(
map
,
positions
,
ke
,
kf
,
true
);
updateData
(
map
,
positions
,
ke
,
kf
,
false
,
true
);
// false,true because we are drawing the boundary of a 3map
browser
.
disable
();
m_normalShift
=
0.0
f
;
}
//template<typename PFP>
//void TopoRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP>& positions, float ke, float kf, bool withBoundary)
//{
// std::string typeName = map.mapTypeName();
// if (typeName[0] == 'M') // "Map2"
// {
// updateDataMap(map, positions, ke, kf, withBoundary);
// return;
// }
// if (typeName[0] == 'G') // "GMap2"
// {
// updateDataGMap(map, positions, ke, kf, withBoundary);
// return;
// }
//}
template
<
typename
PFP
>
void
TopoRenderMap
<
PFP
>::
updateData
(
MAP
&
mapx
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
)
void
TopoRenderMap
<
PFP
>::
updateData
(
MAP
&
mapx
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
,
bool
onlyBoundary
)
{
//Map2& map = reinterpret_cast<Map2&>(mapx);
std
::
string
name_index
(
"dart_index2"
);
if
(
onlyBoundary
)
name_index
=
std
::
string
(
"dart_boundary_index2"
);
std
::
vector
<
Dart
>
vecDarts
;
vecDarts
.
reserve
(
mapx
.
getNbDarts
());
// no problem dart is int: no problem of memory
this
->
m_attIndex
=
mapx
.
template
getAttribute
<
unsigned
int
,
DART
,
MAP
>(
"dart_index2"
);
this
->
m_attIndex
=
mapx
.
template
getAttribute
<
unsigned
int
,
DART
,
MAP
>(
name_index
);
if
(
!
this
->
m_attIndex
.
isValid
())
this
->
m_attIndex
=
mapx
.
template
addAttribute
<
unsigned
int
,
DART
,
MAP
>(
"dart_index2"
);
this
->
m_attIndex
=
mapx
.
template
addAttribute
<
unsigned
int
,
DART
,
MAP
>(
name_index
);
for
(
Dart
d
=
mapx
.
begin
();
d
!=
mapx
.
end
();
mapx
.
next
(
d
))
{
...
...
@@ -653,18 +642,23 @@ void TopoRenderMap<PFP>::updateData(MAP& mapx, const VertexAttribute<VEC3, MAP>&
template
<
typename
PFP
>
void
TopoRenderGMap
<
PFP
>::
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
)
void
TopoRenderGMap
<
PFP
>::
updateData
(
MAP
&
map
,
const
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
float
ke
,
float
kf
,
bool
withBoundary
,
bool
onlyBoundary
)
{
// GMap2& map = dynamic_cast<GMap2&>(mapx);
std
::
vector
<
Dart
>
vecDarts
;
vecDarts
.
reserve
(
map
.
getNbDarts
());
// no problem dart is int: no problem of memory
std
::
string
name_index
(
"dart_index2"
);
if
(
onlyBoundary
)
name_index
=
std
::
string
(
"dart_boundary_index2"
);
if
(
this
->
m_attIndex
.
map
()
!=
&
map
)
this
->
m_attIndex
=
map
.
template
getAttribute
<
unsigned
int
,
DART
,
MAP
>(
"dart_index2"
);
this
->
m_attIndex
=
map
.
template
getAttribute
<
unsigned
int
,
DART
,
MAP
>(
name_index
);
if
(
!
this
->
m_attIndex
.
isValid
())
this
->
m_attIndex
=
map
.
template
addAttribute
<
unsigned
int
,
DART
,
MAP
>(
"dart_index2"
);
this
->
m_attIndex
=
map
.
template
addAttribute
<
unsigned
int
,
DART
,
MAP
>(
name_index
);
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
...
...
include/Topology/generic/dartmarker.h
View file @
1b7ac321
...
...
@@ -232,11 +232,13 @@ protected:
public:
inline
void
unmarkAll
()
{
AttributeContainer
&
cont
=
this
->
m_map
.
template
getAttributeContainer
<
DART
>();
if
(
cont
.
hasBrowser
())
for
(
unsigned
int
i
=
cont
.
begin
();
i
!=
cont
.
end
();
cont
.
next
(
i
))
this
->
m_markVector
->
setFalse
(
i
);
else
// AttributeContainer& cont = this->m_map.template getAttributeContainer<DART>();
// if (cont.hasBrowser())
// for (unsigned int i = cont.begin(); i != cont.end(); cont.next(i))
// this->m_markVector->setFalse(i);
// else
// always unmark all darts, it's to dangerous because of markOrbit that can mark dart out of Browser !
this
->
m_markVector
->
allFalse
();
}
}
;
...
...
@@ -354,11 +356,13 @@ protected:
public:
inline
void
unmarkAll
()
{
AttributeContainer
&
cont
=
this
->
m_map
.
template
getAttributeContainer
<
DART
>();
if
(
cont
.
hasBrowser
())
for
(
unsigned
int
i
=
cont
.
begin
();
i
!=
cont
.
end
();
cont
.
next
(
i
))
this
->
m_markVector
->
setFalse
(
i
);
else
// AttributeContainer& cont = this->m_map.template getAttributeContainer<DART>();
// if (cont.hasBrowser())
// for (unsigned int i = cont.begin(); i != cont.end(); cont.next(i))
// this->m_markVector->setFalse(i);
// else
// always unmark all darts, it's to dangerous because of markOrbit that can mark dart out of Browser !
this
->
m_markVector
->
allFalse
();
}
...
...
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