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
35namespace WFMath {
36
37template class AxisBox<3>;
38template class AxisBox<2>;
39
40template bool Intersection<3>(const AxisBox<3>&, const AxisBox<3>&, AxisBox<3>&);
41template bool Intersection<2>(const AxisBox<2>&, const AxisBox<2>&, AxisBox<2>&);
42
43template AxisBox<3> Union<3>(const AxisBox<3> &, const AxisBox<3> &);
44template AxisBox<2> Union<2>(const AxisBox<2>&, const AxisBox<2>&);
45
46template AxisBox<3> BoundingBox<3, std::vector>(const std::vector<AxisBox<3>, std::allocator<AxisBox<3> > > &);
47template AxisBox<2> BoundingBox<2, std::vector>(const std::vector<AxisBox<2>, std::allocator<AxisBox<2> > > &);
48
49template AxisBox<3> BoundingBox<3, std::vector>(const std::vector<Point<3>, std::allocator<Point<3> > >&);
50template AxisBox<2> BoundingBox<2, std::vector>(const std::vector<Point<2>, std::allocator<Point<2> > >&);
51
52static_assert(std::is_standard_layout<AxisBox<3>>::value, "AxisBox should be standard layout.");
53static_assert(std::is_trivially_copyable<AxisBox<3>>::value, "AxisBox should be trivially copyable.");
54
55static_assert(std::is_standard_layout<AxisBox<2>>::value, "AxisBox should be standard layout.");
56static_assert(std::is_trivially_copyable<AxisBox<2>>::value, "AxisBox should be trivially copyable.");
57
58}
Generic library namespace.
Definition: shape.h:41