3#include <cgv/type/standard_types.h>
4#include <cgv/math/vec.h>
5#include <cgv/math/fvec.h>
13template<
typename T, cgv::type::u
int32_type N>
41 for (i=0; i<_minp.
size(); ++i) {
46 for (i=0; i<_maxp.
size(); ++i) {
54 for (
unsigned int c = 0; c<N; ++c) {
72 for (
unsigned int dim=0; dim < N; ++dim, bit *= 2)
84 bool is_valid()
const {
return minp[0] <= maxp[0]; }
87 for (
unsigned int c = 0; c<N; ++c) {
88 if (p(c) < minp(c))
return false;
89 if (p(c) >= maxp(c))
return false;
96 for (
unsigned int c = 0; c<N; ++c) {
97 if (p(c) > maxp(c)) maxp(c) = p(c);
98 if (p(c) < minp(c)) minp(c) = p(c);
107 for (
unsigned int c = 0; p.
size(); ++c) {
110 if (p(c) > maxp(c)) maxp(c) = p(c);
111 if (p(c) < minp(c)) minp(c) = p(c);
131 for (
unsigned int c = 0; c<N; ++c) {
132 if (aab.maxp(c) < maxp(c)) max_p(c) = aab.maxp(c);
133 if (aab.minp(c) > minp(c)) min_p(c) = aab.minp(c);
142 for (
unsigned int c = 0; c<N; ++c) {
160 for (
unsigned i=1; i<N; ++i)
168template<
typename T, cgv::type::u
int32_type N>
169std::ostream& operator<<(std::ostream& out,
const axis_aligned_box<T, N>& box)
171 return out << box.get_min_pnt() <<
"->" << box.get_max_pnt();
A vector with zero based index.
unsigned size() const
number of elements
cgv::media::axis_aligned_box< float, 3 > box3
declare type of 3d single precision floating point axis-aligned boxes
cgv::media::axis_aligned_box< uint16_t, 3 > usbox3
declare type of 3d 16 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< uint16_t, 4 > usbox4
declare type of 4d 16 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< int16_t, 3 > sbox3
declare type of 3d 16 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< double, 3 > dbox3
declare type of 3d double precision floating point axis-aligned boxes
cgv::media::axis_aligned_box< int16_t, 2 > sbox2
declare type of 2d 16 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< uint32_t, 2 > ubox2
declare type of 2d 32 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< uint16_t, 2 > usbox2
declare type of 2d 16 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< uint64_t, 3 > ulbox3
declare type of 3d 64 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< uint64_t, 2 > ulbox2
declare type of 2d 64 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< int32_t, 2 > ibox2
declare type of 2d 32 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< int32_t, 3 > ibox3
declare type of 3d 32 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< int64_t, 2 > lbox2
declare type of 2d 64 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< float, 2 > box2
declare type of 2d single precision floating point axis-aligned boxes
cgv::media::axis_aligned_box< double, 2 > dbox2
declare type of 2d double precision floating point axis-aligned boxes
cgv::media::axis_aligned_box< uint32_t, 3 > ubox3
declare type of 3d 32 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< int64_t, 3 > lbox3
declare type of 3d 64 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< int16_t, 4 > sbox4
declare type of 4d 16 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< float, 4 > box4
declare type of 4d single precision floating point axis-aligned boxes
cgv::media::axis_aligned_box< uint64_t, 4 > ulbox4
declare type of 4d 64 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< int32_t, 4 > ibox4
declare type of 4d 32 bit integer axis-aligned boxes
cgv::media::axis_aligned_box< double, 4 > dbox4
declare type of 4d double precision floating point axis-aligned boxes
cgv::media::axis_aligned_box< uint32_t, 4 > ubox4
declare type of 4d 32 bit unsigned integer axis-aligned boxes
cgv::media::axis_aligned_box< int64_t, 4 > lbox4
declare type of 4d 64 bit integer axis-aligned boxes