package com.srbenoit.modeling.mesh;

import com.srbenoit.render.WorldVertex;

/**
 * A vertex that is part of a membrane.
 */
public class MembraneVertex extends WorldVertex {

    /** a unique ID for the membrane this vertex belongs to */
    private final int membraneId;

    /** the radius of the vertex for interactions */
    private final double radius;

    /**
     * Constructs a new <code>MembraneVertex</code>.
     *
     * @param  whichMembrane  the unique ID of the membrane this face belongs to
     * @param  rad            the radius of the vertex for interactions
     */
    public MembraneVertex(final int whichMembrane, final double rad) {

        super();
        this.membraneId = whichMembrane;
        this.radius = rad;
    }

    /**
     * Constructs a new <code>MembraneVertex</code>.
     *
     * @param  xCoord         the X coordinate
     * @param  yCoord         the Y coordinate
     * @param  zCoord         the Z coordinate
     * @param  whichMembrane  the unique ID of the membrane this face belongs to
     * @param  rad            the radius of the vertex for interactions
     */
    public MembraneVertex(final double xCoord, final double yCoord, final double zCoord,
        final int whichMembrane, final double rad) {

        super(xCoord, yCoord, zCoord);

        this.membraneId = whichMembrane;
        this.radius = rad;
    }

    /**
     * Gets the unique ID of the membrane this vertex belongs to.
     *
     * @return  the membrane ID
     */
    public int getMembraneId() {

        return this.membraneId;
    }

    /**
     * Gets the radius of the vertex for interactions
     *
     * @return  the radius
     */
    public double getRadius() {

        return this.radius;
    }
}
