summaryrefslogtreecommitdiff
path: root/WPIJavaCV/src/edu/wpi/first/wpijavacv/WPIPoint.java
blob: a5a201620d31de67a07d22f6791d7e8abde2fa5f (plain)
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
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpijavacv;

import com.googlecode.javacv.cpp.opencv_core.CvPoint;

/**
 * A class representing a point
 * @author Greg Granito
 */
public class WPIPoint {

    CvPoint p;
    /**
     * Creates a new WpiPoint with the specified x and y coordinates
     * @param x the x coord
     * @param y the y coord
     */
    public WPIPoint(int x, int y) {
        p = new CvPoint(x, y);
    }

    WPIPoint(CvPoint c) {
        p = c;
    }

    /**
     *
     * @return the x coord
     */
    public int getX(){
        return p.x();
    }

    /**
     *
     * @return the y coord
     */
    public int getY(){
        return p.y();
    }

    CvPoint getCvPoint(){
        return p;
    }

    @Override
    public String toString() {
        return p.toString();
    }


}