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

org.jeometry.geom3D.primitive.indexed.IndexedLine3D Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package org.jeometry.geom3D.primitive.indexed;

import org.jeometry.Jeometry;
import org.jeometry.geom3D.point.Point3D;
import org.jeometry.geom3D.point.Point3DContainer;
import org.jeometry.geom3D.primitive.Line3D;

/**
 * An interface that describe an indexed 3D line.
 * @param  The type of the underlying 3D points
 * @author Julien Seinturier - COMEX S.A. - [email protected] - https://github.com/jorigin/jeometry
 * @version {@value Jeometry#version}
 * @since 1.0.0
 */
public interface IndexedLine3D extends Line3D{
  
  /**
   * Get the vertices of the line. A line links two 3D points as vertices.
   * @return the indices of the extremities of the line   
   */
  int[] getVerticesIndexes();

  /**
   * Get the vertices list from which the indexes are coming.
   * @return the vertices list from which the indexes are coming.
   * @see #setVerticesSource(Point3DContainer)
   */
  Point3DContainer getVerticesSource();

  /**
   * Set the vertices list from which the indexes are coming. 
   * This method has not to be confused with {@link #getVertices()}
   * method that return only the vertices attached to this line (only the 2 extreminies).
   * @param verticesSource the vertices list from which the indexes are coming.
   * @see #getVerticesSource()
   */
  public void setVerticesSource(Point3DContainer verticesSource);
  
  /**
   * Return if the indexes of the geometry have been validated. The validation is made by calling method {@link #validateIndexes()}.
   * @return true if the geometry has validated indexes and false otherwise.
   */
  boolean isValidatedIndexes();
  
  /**
   * Validate the geometry. This method valid the link between the indexed geometry and the geometry itself.
   * @return true if the validation is effective, false otherwise.
   */
  boolean validateIndexes();
  
  /**
   * Get the index within the {@link #getVerticesSource() vertices source} of the first extremity of the line.
   * @return the index within the {@link #getVerticesSource() vertices source} of the first extremity of the line.
   * @see #getEnd2Index()
   * @see #getEnd1()
   */
  public int getEnd1Index();
  
  /**
   * Set the index within the {@link #getVerticesSource() vertices source} of the first extremity of the line.
   * @param index the index within the {@link #getVerticesSource() vertices source} of the first extremity of the line.
   * @see #getEnd1Index()
   */
  public void setEnd1Index(int index);
  
  /**
   * Get the index within the {@link #getVerticesSource() vertices source} of the second extremity of the line.
   * @return the index within the {@link #getVerticesSource() vertices source} of the second extremity of the line.
   * @see #getEnd1Index()
   * @see #getEnd2()
   */
  public int getEnd2Index();
  
  /**
   * Set the index within the {@link #getVerticesSource() vertices source} of the second extremity of the line.
   * @param index the index within the {@link #getVerticesSource() vertices source} of the second extremity of the line.
   * @see #getEnd2Index()
   */
  public void setEnd2Index(int index);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy