Commit 59b5b0e9 by Philipp Adolf

Use unsigned int in Triangle

parent 197f85be
...@@ -13,7 +13,7 @@ Triangle::Triangle(const Triangle &other) { ...@@ -13,7 +13,7 @@ Triangle::Triangle(const Triangle &other) {
this->w_ = other.w_; this->w_ = other.w_;
} }
Triangle::Triangle(const QVector<Vertex> &vertex_buffer, int u, int v, int w) { Triangle::Triangle(const QVector<Vertex> &vertex_buffer, unsigned int u, unsigned int v, unsigned int w) {
this->vertex_buffer_ = vertex_buffer; this->vertex_buffer_ = vertex_buffer;
this->u_ = u; this->u_ = u;
this->v_ = v; this->v_ = v;
...@@ -32,15 +32,15 @@ Vertex Triangle::w() const { ...@@ -32,15 +32,15 @@ Vertex Triangle::w() const {
return vertex_buffer_[w_]; return vertex_buffer_[w_];
} }
int Triangle::u_idx() const { unsigned int Triangle::u_idx() const {
return u_; return u_;
} }
int Triangle::v_idx() const { unsigned int Triangle::v_idx() const {
return v_; return v_;
} }
int Triangle::w_idx() const { unsigned int Triangle::w_idx() const {
return w_; return w_;
} }
......
...@@ -23,15 +23,15 @@ class Triangle { ...@@ -23,15 +23,15 @@ class Triangle {
Triangle(); Triangle();
Triangle(const Triangle &other); Triangle(const Triangle &other);
Triangle(const QVector<Vertex> &vertex_buffer, int u, int v, int w); Triangle(const QVector<Vertex> &vertex_buffer, unsigned int u, unsigned int v, unsigned int w);
Vertex u() const; Vertex u() const;
Vertex v() const; Vertex v() const;
Vertex w() const; Vertex w() const;
int u_idx() const; unsigned int u_idx() const;
int v_idx() const; unsigned int v_idx() const;
int w_idx() const; unsigned int w_idx() const;
bool get_shared_edge(Triangle other, Edge &edge_a, Edge &edge_b) const; bool get_shared_edge(Triangle other, Edge &edge_a, Edge &edge_b) const;
...@@ -44,9 +44,9 @@ class Triangle { ...@@ -44,9 +44,9 @@ class Triangle {
private: private:
QVector<Vertex> vertex_buffer_; QVector<Vertex> vertex_buffer_;
int u_; unsigned int u_;
int v_; unsigned int v_;
int w_; unsigned int w_;
void rotate_indices(); void rotate_indices();
bool get_shared_edge_(const Triangle &other, Edge &edge_a, Edge &edge_b) const; bool get_shared_edge_(const Triangle &other, Edge &edge_a, Edge &edge_b) 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