simogl.geometry
Class Face

java.lang.Object
  extended by simogl.geometry.Face

public class Face
extends java.lang.Object

This class represents a face, that can be used in a mesh. A face consist of two triangles.

Author:
Frank Bruns

Constructor Summary
Face(Triangle trig1, Triangle trig2)
          Creates a new face.
 
Method Summary
 Triangle getTriangle1()
          Returns the first triangle of the face
 Triangle getTriangle2()
          Returns the second triangle of the face
 void setTriangle1(Triangle triangle1)
          Sets the first triangle of the face
 void setTriangle2(Triangle triangle2)
          Sets the second triangle of the face
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Face

public Face(Triangle trig1,
            Triangle trig2)
Creates a new face. A face consists of two triangles forming a square. When creating a face, there are some default texture coordinates assigned to the triangles of the face. So in order to use some specialised texture coordinates, always assign these coordinates after creating a face object.

Parameters:
trig1 - first triangle of the face
trig2 - second triangle of the face
Method Detail

getTriangle1

public Triangle getTriangle1()
Returns the first triangle of the face

Returns:
face's first triangle

setTriangle1

public void setTriangle1(Triangle triangle1)
Sets the first triangle of the face

Parameters:
triangle1 - first triangle of the mesh

getTriangle2

public Triangle getTriangle2()
Returns the second triangle of the face

Returns:
face's second triangle

setTriangle2

public void setTriangle2(Triangle triangle2)
Sets the second triangle of the face

Parameters:
triangle2 - second triangle of the mesh