Commit f0257839 by Philipp Adolf

Add get_sharpness with name

parent 3ead38ca
...@@ -62,6 +62,19 @@ unsigned int Triangle::get_sharpness_wu() const { ...@@ -62,6 +62,19 @@ unsigned int Triangle::get_sharpness_wu() const {
return sharpness_wu; return sharpness_wu;
} }
unsigned int Triangle::get_sharpness(Triangle::Edge::Name name) const {
switch (name) {
case Triangle::Edge::Name::uv:
return sharpness_uv;
case Triangle::Edge::Name::vw:
return sharpness_uv;
case Triangle::Edge::Name::wu:
return sharpness_uv;
default:
return 0;
}
}
bool Triangle::has_sharp_edge() const{ bool Triangle::has_sharp_edge() const{
return (sharpness_uv > 0 || sharpness_vw > 0 || sharpness_wu > 0); return (sharpness_uv > 0 || sharpness_vw > 0 || sharpness_wu > 0);
} }
......
...@@ -54,6 +54,7 @@ class Triangle { ...@@ -54,6 +54,7 @@ class Triangle {
unsigned int get_sharpness_uv() const; unsigned int get_sharpness_uv() const;
unsigned int get_sharpness_vw() const; unsigned int get_sharpness_vw() const;
unsigned int get_sharpness_wu() const; unsigned int get_sharpness_wu() const;
unsigned int get_sharpness(Triangle::Edge::Name name) const;
bool has_sharp_edge() const; bool has_sharp_edge() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment