com.jme.math
Class Triangle

java.lang.Object
  extended bycom.jme.math.Triangle

public class Triangle
extends java.lang.Object

Triangle defines a object for containing triangle information. The triangle is defined by a collection of three Vector3f objects.

Version:
$Id: Triangle.java,v 1.4 2004/07/30 23:18:55 cep21 Exp $
Author:
Mark Powell

Constructor Summary
Triangle(Vector3f p1, Vector3f p2, Vector3f p3)
          Constructor instantiates a new Triangle object with the supplied vectors as the points.
 
Method Summary
 Vector3f get(int i)
          get retrieves a point on the triangle denoted by the index supplied.
 void set(int i, Vector3f point)
          set sets one of the triangles points to that specified as a parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triangle

public Triangle(Vector3f p1,
                Vector3f p2,
                Vector3f p3)
Constructor instantiates a new Triangle object with the supplied vectors as the points. It is recommended that the vertices be supplied in a counter clockwise winding to support normals for a right handed coordinate system.

Parameters:
p1 - the first point of the triangle.
p2 - the second point of the triangle.
p3 - the third point of the triangle.
Method Detail

get

public Vector3f get(int i)
get retrieves a point on the triangle denoted by the index supplied.

Parameters:
i - the index of the point.
Returns:
the point.

set

public void set(int i,
                Vector3f point)
set sets one of the triangles points to that specified as a parameter.

Parameters:
i - the index to place the point.
point - the point to set.