Pixel ===== .. java:package:: ch.epfl.leb.sass.models.emitters.internal :noindex: .. java:type:: public class Pixel Representation of a single pixel signature caused by a single emitter. :author: Marcel Stefko Fields ------ x ^ .. java:field:: public final int x :outertype: Pixel X-position of pixel in image. y ^ .. java:field:: public final int y :outertype: Pixel Y-position of pixel in image. Constructors ------------ Pixel ^^^^^ .. java:constructor:: public Pixel(int x, int y, double signature) :outertype: Pixel Initialize new pixel with position and signature. :param x: x-position [px] :param y: y-position [px] :param signature: relative brightness of this pixel due to emitter [-] Methods ------- distance_to ^^^^^^^^^^^ .. java:method:: public double distance_to(Pixel p) :outertype: Pixel Calculates euclidean distance to another pixel :param p: another Pixel :return: euclidean distance between these pixels [px] distance_to_sq ^^^^^^^^^^^^^^ .. java:method:: public int distance_to_sq(Pixel p) :outertype: Pixel Calculates squared distance to another pixel :param p: another Pixel :return: squared distance between these pixels [px2] getSignature ^^^^^^^^^^^^ .. java:method:: public double getSignature() :outertype: Pixel Returns this pixel's signature :return: relative brightness of this pixel due to an emitter [-] setSignature ^^^^^^^^^^^^ .. java:method:: public void setSignature(double signature) :outertype: Pixel Set's the pixel's signature.