plane.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_PLANE_H
21 #define LIBMESH_PLANE_H
22 
23 // Local includes
24 #include "libmesh/surface.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 
38 // ------------------------------------------------------------
39 // Plane class definition
40 class Plane : public Surface
41 {
42 public:
43 
47  Plane ();
48 
52  Plane (const Point& p, const Point& n);
53 
59  Plane (const Point& p0, const Point& p1, const Point& p2);
60 
64  Plane (const Plane& other_plane);
65 
69  ~Plane ();
70 
74  void create_from_point_normal (const Point& p, const Point& n);
75 
81  void create_from_three_points (const Point& p0,
82  const Point& p1,
83  const Point& p2 );
84 
88  void xy_plane (const Real zpos=0.);
89 
93  void xz_plane (const Real ypos=0.);
94 
98  void yz_plane (const Real xpos=0.);
99 
104  bool above_surface (const Point& p) const;
105 
110  bool below_surface (const Point& p) const;
111 
118  bool on_surface (const Point& p) const;
119 
123  Point closest_point (const Point& p) const;
124 
129  Point unit_normal (const Point& p) const;
130 
135  const Point & get_planar_point() const;
136 
137 
138 private:
139 
140 
144  const Point& normal () const;
145 
151 
152 };
153 
154 
155 
156 // ------------------------------------------------------------
157 // Plane class inline members
158 inline const Point & Plane::normal () const
159 {
160  return _normal;
161 }
162 
163 } // namespace libMesh
164 
165 #endif // LIBMESH_PLANE_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:06 UTC

Hosted By:
SourceForge.net Logo