KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Typedefs | Functions
gr_2D_bounding_box.h File Reference

Class representing an axis-aligned, 2D rectangle. More...

#include <m_cpp/m_vector.h>
#include <l_cpp/l_functors.h>
#include <iosfwd>
#include <algorithm>
#include <vector>

Go to the source code of this file.

Classes

class  kjb::Axis_aligned_rectangle_2d
 Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center, its width and its height. More...
 

Namespaces

 kjb
 Classes and functions for dealing with trajectory files.
 

Typedefs

typedef Axis_aligned_rectangle_2d kjb::Bounding_Box2D
 

Functions

std::ostream & kjb::operator<< (std::ostream &ost, const Axis_aligned_rectangle_2d &box)
 
std::istream & kjb::operator>> (std::istream &ist, Axis_aligned_rectangle_2d &box)
 
Bounding_Box2D kjb::intersect (const Bounding_Box2D &b1, const Bounding_Box2D &b2)
 
void kjb::translate (kjb::Axis_aligned_rectangle_2d &box, const kjb::Vector &t)
 
void kjb::scale (kjb::Axis_aligned_rectangle_2d &box, const kjb::Vector &s)
 
void kjb::get_projected_bbox_from_3Dpoints (Axis_aligned_rectangle_2d &bb, const std::vector< Vector > &points, const Base_gl_interface &camera, double img_width, double img_height)
 Projects a set of 3D points onto the image plane, and finds a bounding box (aligned with the image axes), such that it contains all the projected points. More...
 
template<class Iterator >
Axis_aligned_rectangle_2d kjb::compute_bounding_box (Iterator first, Iterator last)
 Computes the 2D bounding box of a range of 2D points. More...
 
double kjb::get_rectangle_intersection (const kjb::Bounding_Box2D &b1, const kjb::Bounding_Box2D &b2)
 Compute area of intersection of two rectangles. More...
 
void kjb::swap (Axis_aligned_rectangle_2d &r1, Axis_aligned_rectangle_2d &r2)
 Swaps two rectangles. More...
 

Detailed Description

Class representing an axis-aligned, 2D rectangle.

Author
Luca Del Pero, Ernesto Brau