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

org.jeometry.geom3D.neighbor.AdjacencyMap 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.mesh.indexed.IndexedMesh;
import org.jeometry.geom3D.point.Point3D;

/**
 * An adjacency map that enable to describe faces adjacencies for a given {@link IndexedMesh indexed mesh}.
 * @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 AdjacencyMap {

  /**
   * Get the faces that are adjacent to the given one.
   * @param face the face for which adjacencies are needed.
   * @return the faces that are adjacent to the given one.
   * @see #setAdjacencies(IndexedFace, List)
   */
  List> getAdjacencies(IndexedFace face);
  
  /**
   * Set the faces that are adjacent to the given one.
   * @param face the face for which adjacency has to be set.
   * @param adjacencies the list of all the faces that are adjacent.
   * @see #getAdjacencies(IndexedFace)
   */
  void setAdjacencies(IndexedFace face, List> adjacencies);
  
  /**
   * Add the given adjacent as an adjacent of the given face.
   * @param face the face that is updated.
   * @param adjacent the new adjacent to add.
   * @return true if the adjacent is successfully added and false otherwise.
   */
  boolean addAdjacent(IndexedFace face, IndexedFace adjacent);
  
  /**
   * Remove the given adjacent as an adjacent of the given face.
   * @param face face the face that is updated.
   * @param adjacent the adjacent to remove.
   * @return true if the adjacent is successfully removed and false otherwise.
   */
  boolean removeAdjacent(IndexedFace face, IndexedFace adjacent);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy