-
-
Notifications
You must be signed in to change notification settings - Fork 56
/
MBRConverter.java
36 lines (33 loc) · 964 Bytes
/
MBRConverter.java
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
package net.citizensnpcs.api.util.prtree;
/**
* A class that given a T can tell the minimum and maximum ordinates for that object.
*
* @param <T>
* the data type stored in the PRTree
*/
public interface MBRConverter<T> {
/**
* @return the number of dimensions this converter cares about
*/
int getDimensions();
/**
* Get the maximum coordinate value for the given t
*
* @param axis
* the axis to get the max value for
* @param t
* the object to get the mbr ordinate for
* @return the max value for the given axis
*/
double getMax(int axis, T t);
/**
* Get the minimum coordinate value for the given t.
*
* @param axis
* the axis to get the min value for
* @param t
* the object to get the mbr ordinate for
* @return the min value for the given axis
*/
double getMin(int axis, T t);
}