TexGen
Plane.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2006 Martin Sherburn
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18=============================================================================*/
19
20#pragma once
21namespace TexGen
22{
25 {
26 public:
27 PLANE();
28 PLANE(XYZ Normal, double d);
29
31 double d;
32 };
33
34 inline PLANE::PLANE()
35 : d(0)
36 {
37 }
38
39 inline PLANE::PLANE(XYZ Normal, double d)
40 : Normal(Normal)
41 , d(d)
42 {
43 if (GetLength(this->Normal) == 0)
44 assert(false);
45 else
46 Normalise(this->Normal);
47 }
48
49}; // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Namespace containing a series of customised math operations not found in the standard c++ library.
double GetLength(const XYZ &Point1, const XYZ &Point2)
Get the length between two points.
Definition: mymath.h:540
WXYZ & Normalise(WXYZ &Quaternion)
Normalise the quaternion and return it.
Definition: mymath.h:609
Struct for representing a Plane.
Definition: Plane.h:25
XYZ Normal
Definition: Plane.h:30
double d
Definition: Plane.h:31
Struct for representing points in 3D space.
Definition: mymath.h:56