package com.srbenoit.geom;

/**
 * An interface for objects that can be represented by a 3-dimensional point.
 */
public interface Point3Int {

    /**
     * Gets the X coordinate.
     *
     * @return  the X coordinate
     */
    double getPosX();

    /**
     * Sets the X coordinate.
     *
     * @param  xCoord  the X coordinate
     */
    void setPosX(double xCoord);

    /**
     * Gets the Y coordinate.
     *
     * @return  the Y coordinate
     */
    double getPosY();

    /**
     * Sets the Y coordinate.
     *
     * @param  yCoord  the Y coordinate
     */
    void setPosY(double yCoord);

    /**
     * Gets the Z coordinate.
     *
     * @return  the Z coordinate
     */
    double getPosZ();

    /**
     * Sets the Z coordinate.
     *
     * @param  zCoord  theZ coordinate
     */
    void setPosZ(double zCoord);

    /**
     * Sets the coordinates of the point.
     *
     * @param  xCoord  the x coordinate
     * @param  yCoord  the y coordinate
     * @param  zCoord  the z coordinate
     */
    void setPos(double xCoord, double yCoord, double zCoord);

    /**
     * Sets the coordinates of the point from another point.
     *
     * @param  source  the point whose position is to be copied
     */
    void setPos(Point3Int source);

    /**
     * Moves the coordinates of the point.
     *
     * @param  xDelta  the change to the x coordinate
     * @param  yDelta  the change to the y coordinate
     * @param  zDelta  the change to the z coordinate
     */
    void move(double xDelta, double yDelta, double zDelta);

    /**
     * Moves the coordinates of the point by a vector.
     *
     * @param  vector  the vector by which to move the point
     */
    void move(final Vector3Int vector);

    /**
     * Adds a scaled version of a vector to this point's position (this = this + scale tuple).
     *
     * @param  scale   the scalar value
     * @param  vector  the vector to be scaled then added
     */
    void moveScaled(double scale, Vector3Int vector);

    /**
     * Computes the square of the Euclidean distance between this point and another point.
     *
     * @param   otherPoint  the other point
     * @return  the square of the distance
     */
    double distSquared(Point3Int otherPoint);

    /**
     * Computes the Euclidean distance between this point and another point.
     *
     * @param   otherPoint  the other point
     * @return  the distance
     */
    double dist(Point3Int otherPoint);
}
