package de.hft_stuttgart.swp2.model;

/**
 * This is a simple container class that represents a triangle
 * 
 * @author 12bema1bif, 12tost1bif, 12riju1bif
 * 
 */
public class Triangle {

	private final Vertex[] vertices;

	/**
	 * creates a new triangle out of 3 vertcies. If anything other than 3
	 * vertices is given this throws a IllegalArgumentException.
	 * 
	 * @param vertices
	 *            the 3 vertices that define the triangle
	 */
	public Triangle(final Vertex[] vertices) {
		if (vertices.length != 3) {
			throw new IllegalArgumentException(
					"A triangle always consists of 3 vertices\nYou created one with "
							+ vertices.length);
		}
		this.vertices = vertices;
	}
	
	public Triangle(Vertex v0, Vertex v1, Vertex v2) {
		vertices = new Vertex[3];
		vertices[0] = v0;
		vertices[1] = v1;
		vertices[2] = v2;
	}

	/**
	 * 
	 * @return the vertices that the triangle consists of
	 */
	public Vertex[] getVertices() {
		return vertices;
	}
}

@@ -214,16 +214,297 @@
 ertices;
+%0A%09private Vertex normalVector;%0A%0A%09/**%0A%09 * @return the normalVector%0A%09 */%0A%09public Vertex getNormalVector() %7B%0A%09%09return normalVector;%0A%09%7D%0A%0A%09/**%0A%09 * @param normalVector the normalVector to set%0A%09 */%0A%09public void setNormalVector(Vertex normalVector) %7B%0A%09%09this.normalVector = normalVector;%0A%09%7D
 %0A%0A%09/**%0A%09
@@ -546,10 +546,10 @@
 vert
-c
 i
+c
 es. 

add normal vector attribute