Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip Trettner
polymesh
Commits
8a97032e
Commit
8a97032e
authored
Jul 25, 2018
by
Christian Mattes
Browse files
Fixed attribute_collection::accessor and const_accessor looking up attributes from the wrong maps.
parent
03dcb61c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/polymesh/attribute_collection.hh
View file @
8a97032e
...
...
@@ -80,21 +80,21 @@ public:
template
<
class
AttrT
>
face_attribute
<
AttrT
>&
face
()
{
auto
pa
=
ref
.
m
Vertex
Attrs
.
at
(
name
).
get
();
auto
pa
=
ref
.
m
Face
Attrs
.
at
(
name
).
get
();
assert
(
pa
&&
"non-existent attribute"
);
return
*
dynamic_cast
<
face_attribute
<
AttrT
>*>
(
pa
);
}
template
<
class
AttrT
>
edge_attribute
<
AttrT
>&
edge
()
{
auto
pa
=
ref
.
m
Vertex
Attrs
.
at
(
name
).
get
();
auto
pa
=
ref
.
m
Edge
Attrs
.
at
(
name
).
get
();
assert
(
pa
&&
"non-existent attribute"
);
return
*
dynamic_cast
<
edge_attribute
<
AttrT
>*>
(
pa
);
}
template
<
class
AttrT
>
halfedge_attribute
<
AttrT
>&
halfedge
()
{
auto
pa
=
ref
.
m
Vertex
Attrs
.
at
(
name
).
get
();
auto
pa
=
ref
.
m
Halfedge
Attrs
.
at
(
name
).
get
();
assert
(
pa
&&
"non-existent attribute"
);
return
*
dynamic_cast
<
halfedge_attribute
<
AttrT
>*>
(
pa
);
}
...
...
@@ -114,21 +114,21 @@ public:
template
<
class
AttrT
>
face_attribute
<
AttrT
>&
face
()
{
auto
pa
=
ref
.
m
Vertex
Attrs
.
at
(
name
).
get
();
auto
pa
=
ref
.
m
Face
Attrs
.
at
(
name
).
get
();
assert
(
pa
&&
"non-existent attribute"
);
return
*
dynamic_cast
<
face_attribute
<
AttrT
>*>
(
pa
);
}
template
<
class
AttrT
>
edge_attribute
<
AttrT
>&
edge
()
{
auto
pa
=
ref
.
m
Vertex
Attrs
.
at
(
name
).
get
();
auto
pa
=
ref
.
m
Edge
Attrs
.
at
(
name
).
get
();
assert
(
pa
&&
"non-existent attribute"
);
return
*
dynamic_cast
<
edge_attribute
<
AttrT
>*>
(
pa
);
}
template
<
class
AttrT
>
halfedge_attribute
<
AttrT
>&
halfedge
()
{
auto
pa
=
ref
.
m
Vertex
Attrs
.
at
(
name
).
get
();
auto
pa
=
ref
.
m
Halfedge
Attrs
.
at
(
name
).
get
();
assert
(
pa
&&
"non-existent attribute"
);
return
*
dynamic_cast
<
halfedge_attribute
<
AttrT
>*>
(
pa
);
}
...
...
Write
Preview
Supports
Markdown
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