Commit 59b5b0e9 by Philipp Adolf

Use unsigned int in Triangle

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