Photo.java 1.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
package com.theta.model;

import android.graphics.Bitmap;

/**
 * Photo object storage class
 */
public class Photo {

    private Double mOrientationAngle;

    private Double mElevationAngle;
    private Double mHorizontalAngle;

    private Bitmap mPhoto;

    private Photo() {
    }

    /**
     * Constructor
     * @param photo Photo object
     */
    public Photo(Bitmap photo) {
        this(photo, null, null, null);
    }

    /**
     * Constructor
     * @param photo Photo object
     * @param orientationAngle Orientation angle
     * @param elevationAngle Elevation angle
     * @param horizontalAngle Horizontal angle
     */
    public Photo(Bitmap photo, Double orientationAngle, Double elevationAngle, Double horizontalAngle) {
        this();

        mOrientationAngle = orientationAngle;
        mElevationAngle = elevationAngle;
        mHorizontalAngle = horizontalAngle;

        mPhoto = photo;
    }

    /**
     * Acquires the orientation angle
     * @return Orientation angle
     */
    public Double getOrientationAngle() {
        return mOrientationAngle;
    }

    /**
     * Acquires the elevation angle
     * @return Elevation angle
     */
    public Double getElevetionAngle() {
        return mElevationAngle;
    }

    /**
     * Acquires the horizontal angle
     * @return Horizontal angle
     */
    public Double getHorizontalAngle() {
        return mHorizontalAngle;
    }

    /**
     * Acquires the photo object
     * @return Photo object
     */
    public Bitmap getPhoto() {
        return mPhoto;
    }

    /**
     * Updates the photo object
     * @param drawable Photo object
     */
    public void updatePhoto(Bitmap drawable) {
        mPhoto = drawable;
    }

}