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

org.jeometry.geom3D.neighbor.IncidenceMap Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
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);
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy