Main Page
Namespaces
Classes
Files
File List
File Members
Bounding_Box.cpp
Go to the documentation of this file.
1
// Copyright (c) 2013 by Wayne C. Gramlich. All rights reserved.
2
3
#include "
Bounding_Box.hpp
"
4
#include "
Memory.hpp
"
5
#include <algorithm>
6
7
BoundingBox::BoundingBox
() {
8
reset
();
9
}
10
15
16
void
BoundingBox::reset
() {
17
double
big = 123456789.0;
18
maximum_x
= -big;
19
minimum_x
= big;
20
maximum_y
= -big;
21
minimum_y
= big;
22
}
23
31
32
void
BoundingBox::update
(
double
x,
double
y) {
33
maximum_x
= std::max(
maximum_x
, x);
34
minimum_x
= std::min(
minimum_x
, x);
35
maximum_y
= std::max(
maximum_y
, y);
36
minimum_y
= std::min(
minimum_y
, y);
37
}
38
BoundingBox::minimum_y
double minimum_y
Definition:
Bounding_Box.hpp:12
BoundingBox::reset
void reset()
Resets the contents of bounding_box to empty.
Definition:
Bounding_Box.cpp:16
BoundingBox::maximum_y
double maximum_y
Definition:
Bounding_Box.hpp:11
Memory.hpp
BoundingBox::maximum_x
double maximum_x
Definition:
Bounding_Box.hpp:9
BoundingBox::BoundingBox
BoundingBox()
Definition:
Bounding_Box.cpp:7
Bounding_Box.hpp
BoundingBox::minimum_x
double minimum_x
Definition:
Bounding_Box.hpp:10
BoundingBox::update
void update(double x, double y)
Adds the point (x, y) to *bounding_box.
Definition:
Bounding_Box.cpp:32
fiducial_lib
Author(s): Wayne Gramlich
autogenerated on Thu Dec 28 2017 04:06:53