-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #349 from KNMI/optimize-bbox
Refactored optimized bbox
- Loading branch information
Showing
16 changed files
with
85 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <tuple> | ||
#include "BBOX.h" | ||
|
||
bool operator<(BBOX a, BBOX b) { return std::make_tuple(a.bbox[0], a.bbox[1], a.bbox[2], a.bbox[3]) < std::make_tuple(b.bbox[0], b.bbox[1], b.bbox[2], b.bbox[3]); } | ||
|
||
BBOX makeBBOX(double *bbox) { | ||
BBOX box; | ||
box.bbox[0] = bbox[0]; | ||
box.bbox[1] = bbox[1]; | ||
box.bbox[2] = bbox[2]; | ||
box.bbox[3] = bbox[3]; | ||
return box; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
|
||
#ifndef BBOX_H | ||
|
||
#define BBOX_H | ||
|
||
class BBOX { | ||
public: | ||
struct BBOX { | ||
double bbox[4]; | ||
}; | ||
|
||
/** | ||
* Custom comparison operator for the BBOX | ||
*/ | ||
bool operator<(BBOX a, BBOX b); | ||
|
||
/** | ||
* Makes a BBOX from a array of doubles | ||
*/ | ||
BBOX makeBBOX(double *bbox); | ||
|
||
#endif // ! BBOX_H |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.