org.jeometry.geom3D.neighbor.IncidenceMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jeometry-api Show documentation
Show all versions of jeometry-api Show documentation
Jeometry, a Mathematic and Geometry library for Java
package org.jeometry.geom3D.neighbor;
import java.util.List;
import org.jeometry.Jeometry;
import org.jeometry.geom3D.mesh.indexed.IndexedFace;
import org.jeometry.geom3D.point.Point3D;
/**
* A map that handles incidence map for a set of vertices.
* Such a map can be used for example for path computation algorithm.
* @param The type of underlying 3D points.
* @author Julien Seinturier - COMEX S.A. - [email protected] - https://github.com/jorigin/jeometry
* @version {@value Jeometry#version} build {@value Jeometry#BUILD}
* @since 1.0.0
*/
public interface IncidenceMap {
/**
* Get the faces that are incident to the given vertex.
* @param vertex the vertex to check.
* @return the faces that are incident to the given vertex.
* @see #setIncidences(Point3D, List)
*/
List> getIncidences(Point3D vertex);
/**
* Set the faces that are incident to the given vertex.
* @param vertex the vertex to set.
* @param incidences the faces that are incident to the given vertex.
*/
void setIncidences(T vertex, List> incidences);
/**
* Add the given face
as an incident to the given vertex
* @param vertex the vertex to update.
* @param incident the face to add to incidences.
* @return true
if the face is successfully added as an incident and false
otherwise.
* @see #removeIncident(Point3D, IndexedFace)
*/
boolean addIncident(T vertex, IndexedFace incident);
/**
* Remove the given face
from the incidences the given vertex
.
* @param vertex the vertex to update.
* @param incident the face to remove from incidences.
* @return true
if the face is successfully removed from incidences and false
otherwise.
*/
boolean removeIncident(T vertex, IndexedFace incident);
}