| package org.eclipse.apogy.common.math.quickhull3d; |
| |
| /******************************************************************************** |
| * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| * Contributors: Pierre Allard (Pierre.Allard@canada.ca), Regent L'Archeveque |
| * (Regent.Larcheveque@canada.ca), Sebastien Gemme (Sebastien.Gemme@canada.ca), |
| * Canadian Space Agency (CSA) - Initial API and implementation |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 1.0 which is available at |
| * http://www.eclipse.org/legal/epl-v10.html. |
| * |
| * SPDX-License-Identifier: EPL-1.0 |
| ********************************************************************************/ |
| |
| class FaceList { |
| private Face head; |
| private Face tail; |
| |
| /** |
| * Clears this list. |
| */ |
| public void clear() { |
| this.head = this.tail = null; |
| } |
| |
| /** |
| * Adds a vertex to the end of this list. |
| */ |
| public void add(Face vtx) { |
| if (this.head == null) { |
| this.head = vtx; |
| } else { |
| this.tail.next = vtx; |
| } |
| vtx.next = null; |
| this.tail = vtx; |
| } |
| |
| public Face first() { |
| return this.head; |
| } |
| |
| /** |
| * Returns true if this list is empty. |
| */ |
| public boolean isEmpty() { |
| return this.head == null; |
| } |
| } |