Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
a8af8890
Commit
a8af8890
authored
Dec 16, 2015
by
Jan Möbius
Browse files
Merge branch 'cdt_fix' into 'master'
Cdt fix See merge request
!40
parents
451c8f82
b64f0469
Pipeline
#437
passed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/OpenMesh/Core/Mesh/PolyConnectivity.cc
View file @
a8af8890
...
...
@@ -135,7 +135,7 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
edgeData_
.
resize
(
n
);
next_cache_
.
resize
(
6
*
n
);
}
next_cache_count
_
=
0
;
int
next_cache_count
=
0
;
// don't allow degenerated faces
assert
(
n
>
2
);
...
...
@@ -208,9 +208,9 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
assert
(
inner_next
.
is_valid
());
// relink
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
boundary_prev
,
patch_start
);
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
patch_end
,
boundary_next
);
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
inner_prev
,
inner_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
boundary_prev
,
patch_start
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
patch_end
,
boundary_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
inner_prev
,
inner_next
);
}
}
}
...
...
@@ -252,14 +252,14 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
case
1
:
// prev is new, next is old
boundary_prev
=
prev_halfedge_handle
(
inner_next
);
assert
(
boundary_prev
.
is_valid
());
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
boundary_prev
,
outer_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
boundary_prev
,
outer_next
);
set_halfedge_handle
(
vh
,
outer_next
);
break
;
case
2
:
// next is new, prev is old
boundary_next
=
next_halfedge_handle
(
inner_prev
);
assert
(
boundary_next
.
is_valid
());
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
outer_prev
,
boundary_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
outer_prev
,
boundary_next
);
set_halfedge_handle
(
vh
,
boundary_next
);
break
;
...
...
@@ -267,7 +267,7 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
if
(
!
halfedge_handle
(
vh
).
is_valid
())
{
set_halfedge_handle
(
vh
,
outer_next
);
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
outer_prev
,
outer_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
outer_prev
,
outer_next
);
}
else
{
...
...
@@ -275,14 +275,14 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
boundary_prev
=
prev_halfedge_handle
(
boundary_next
);
assert
(
boundary_prev
.
is_valid
());
assert
(
boundary_next
.
is_valid
());
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
boundary_prev
,
outer_next
);
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
outer_prev
,
boundary_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
boundary_prev
,
outer_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
outer_prev
,
boundary_next
);
}
break
;
}
// set inner link
next_cache_
[
next_cache_count
_
++
]
=
std
::
make_pair
(
inner_prev
,
inner_next
);
next_cache_
[
next_cache_count
++
]
=
std
::
make_pair
(
inner_prev
,
inner_next
);
}
else
edgeData_
[
ii
].
needs_adjust
=
(
halfedge_handle
(
vh
)
==
inner_next
);
...
...
@@ -292,7 +292,7 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
}
// process next halfedge cache
for
(
i
=
0
;
i
<
next_cache_count
_
;
++
i
)
for
(
i
=
0
;
i
<
next_cache_count
;
++
i
)
set_next_halfedge_handle
(
next_cache_
[
i
].
first
,
next_cache_
[
i
].
second
);
...
...
src/OpenMesh/Core/Mesh/PolyConnectivity.hh
View file @
a8af8890
...
...
@@ -1185,66 +1185,66 @@ public:
class
CirculatorRange
{
public:
CirculatorRange
(
CONTAINER_TYPE
&
container
,
const
CONTAINER_TYPE
&
container
,
CENTER_ENTITY_TYPE
center
)
:
container_
(
container
),
center_
(
center
)
{}
ITER_TYPE
begin
()
{
return
(
container_
.
*
begin_fn
)(
center_
);
}
ITER_TYPE
end
()
{
return
(
container_
.
*
end_fn
)(
center_
);
}
private:
CONTAINER_TYPE
&
container_
;
const
CONTAINER_TYPE
&
container_
;
CENTER_ENTITY_TYPE
center_
;
};
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstVertexVertexCWIter
,
VertexHandle
,
&
PolyConnectivity
::
cvv_cwbegin
,
&
PolyConnectivity
::
cvv_cwend
>
ConstVertexVertexRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstVertexIHalfedgeIter
,
VertexHandle
,
&
PolyConnectivity
::
cvih_begin
,
&
PolyConnectivity
::
cvih_end
>
ConstVertexIHalfedgeRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstVertexOHalfedgeIter
,
VertexHandle
,
&
PolyConnectivity
::
cvoh_begin
,
&
PolyConnectivity
::
cvoh_end
>
ConstVertexOHalfedgeRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstVertexEdgeIter
,
VertexHandle
,
&
PolyConnectivity
::
cve_begin
,
&
PolyConnectivity
::
cve_end
>
ConstVertexEdgeRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstVertexFaceIter
,
VertexHandle
,
&
PolyConnectivity
::
cvf_begin
,
&
PolyConnectivity
::
cvf_end
>
ConstVertexFaceRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstFaceVertexIter
,
FaceHandle
,
&
PolyConnectivity
::
cfv_begin
,
&
PolyConnectivity
::
cfv_end
>
ConstFaceVertexRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstFaceHalfedgeIter
,
FaceHandle
,
&
PolyConnectivity
::
cfh_begin
,
&
PolyConnectivity
::
cfh_end
>
ConstFaceHalfedgeRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstFaceEdgeIter
,
FaceHandle
,
&
PolyConnectivity
::
cfe_begin
,
&
PolyConnectivity
::
cfe_end
>
ConstFaceEdgeRange
;
typedef
CirculatorRange
<
const
PolyConnectivity
,
PolyConnectivity
,
ConstFaceFaceIter
,
FaceHandle
,
&
PolyConnectivity
::
cff_begin
,
...
...
@@ -1577,7 +1577,6 @@ private: // Working storage for add_face()
};
std
::
vector
<
AddFaceEdgeInfo
>
edgeData_
;
//
std
::
vector
<
std
::
pair
<
HalfedgeHandle
,
HalfedgeHandle
>
>
next_cache_
;
// cache for set_next_halfedge and vertex' set_halfedge
uint
next_cache_count_
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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