All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.mihosoft.vrl.v3d.ext.quickhull3d.FaceList Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package eu.mihosoft.vrl.v3d.ext.quickhull3d;

// TODO: Auto-generated Javadoc
/**
 * Maintains a single-linked list of faces for use by QuickHull3D.
 */
class FaceList
{
	
	/** The head. */
	private Face head;
	
	/** The tail. */
	private Face tail;

	/**
	 * Clears this list.
	 */
	public void clear()
	 {
	   head = tail = null; 
	 }

	/**
	 * Adds a vertex to the end of this list.
	 *
	 * @param vtx the vtx
	 */
	public void add (Face vtx)
	 { 
	   if (head == null)
	    { head = vtx;
	    }
	   else
	    { tail.next = vtx; 
	    }
	   vtx.next = null;
	   tail = vtx;
	 }

	/**
	 * First.
	 *
	 * @return the face
	 */
	public Face first()
	 {
	   return head;
	 }

	/**
	 * Returns true if this list is empty.
	 *
	 * @return true, if is empty
	 */
	public boolean isEmpty()
	 {
	   return head == null;
	 }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy