wfmath  1.0.3
A math library for the Worldforge system.
axisbox.cpp
1 // vector.cpp (Vector<> implementation)
2 //
3 // The WorldForge Project
4 // Copyright (C) 2001 The WorldForge Project
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 //
20 // For information about WorldForge and its authors, please contact
21 // the Worldforge Web Site at http://www.worldforge.org.
22 
23 // Author: Alistair Riddoch
24 // Created: 2009-01-12
25 
26 #include "axisbox_funcs.h"
27 
28 #include "rotmatrix.h"
29 #include "vector.h"
30 
31 #include <vector>
32 
33 #include <cmath>
34 
35 namespace WFMath {
36 
37 template class AxisBox<3>;
38 template class AxisBox<2>;
39 
40 template bool Intersection<3>(const AxisBox<3>&, const AxisBox<3>&, AxisBox<3>&);
41 template bool Intersection<2>(const AxisBox<2>&, const AxisBox<2>&, AxisBox<2>&);
42 
43 template AxisBox<3> Union<3>(const AxisBox<3> &, const AxisBox<3> &);
44 template AxisBox<2> Union<2>(const AxisBox<2>&, const AxisBox<2>&);
45 
46 template AxisBox<3> BoundingBox<3, std::vector>(const std::vector<AxisBox<3>, std::allocator<AxisBox<3> > > &);
47 template AxisBox<2> BoundingBox<2, std::vector>(const std::vector<AxisBox<2>, std::allocator<AxisBox<2> > > &);
48 
49 template AxisBox<3> BoundingBox<3, std::vector>(const std::vector<Point<3>, std::allocator<Point<3> > >&);
50 template AxisBox<2> BoundingBox<2, std::vector>(const std::vector<Point<2>, std::allocator<Point<2> > >&);
51 
52 static_assert(std::is_standard_layout<AxisBox<3>>::value, "AxisBox should be standard layout.");
53 static_assert(std::is_trivially_copyable<AxisBox<3>>::value, "AxisBox should be trivially copyable.");
54 
55 static_assert(std::is_standard_layout<AxisBox<2>>::value, "AxisBox should be standard layout.");
56 static_assert(std::is_trivially_copyable<AxisBox<2>>::value, "AxisBox should be trivially copyable.");
57 
58 }
WFMath
Generic library namespace.
Definition: shape.h:41