libMesh
Loading...
Searching...
No Matches
plane.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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
26namespace libMesh
27{
28
36class Plane : public Surface
37{
38public:
39
44
48 Plane (const Point & p, const Point & n);
49
55 Plane (const Point & p0, const Point & p1, const Point & p2);
56
60 Plane (const Plane & other_plane);
61
66
70 void create_from_point_normal (const Point & p, const Point & n);
71
77 void create_from_three_points (const Point & p0,
78 const Point & p1,
79 const Point & p2 );
80
84 void xy_plane (const Real zpos=0.);
85
89 void xz_plane (const Real ypos=0.);
90
94 void yz_plane (const Real xpos=0.);
95
100 virtual bool above_surface (const Point & p) const override;
101
106 virtual bool below_surface (const Point & p) const override;
107
115 virtual bool on_surface (const Point & p) const override;
116
120 virtual Point closest_point (const Point & p) const override;
121
126 virtual Point unit_normal (const Point & p) const override;
127
132 const Point & get_planar_point() const;
133
134
135private:
139 const Point & normal () const { return _normal; }
140
146};
147
148} // namespace libMesh
149
150#endif // LIBMESH_PLANE_H
This class defines a plane.
Definition plane.h:37
const Point & get_planar_point() const
Definition plane.C:183
Point _normal
Definition plane.h:145
void xz_plane(const Real ypos=0.)
Creates an XZ plane located at y=ypos.
Definition plane.C:99
Point _point
The plane is defined by a point and a normal.
Definition plane.h:144
virtual Point unit_normal(const Point &p) const override
Definition plane.C:178
~Plane()
Destructor.
void yz_plane(const Real xpos=0.)
Creates an YZ plane located at x=xpos.
Definition plane.C:110
void create_from_point_normal(const Point &p, const Point &n)
Defines a plane containing point p with normal n.
Definition plane.C:64
Plane()
Dummy Constructor.
virtual bool on_surface(const Point &p) const override
Definition plane.C:145
virtual bool above_surface(const Point &p) const override
Definition plane.C:121
virtual Point closest_point(const Point &p) const override
Definition plane.C:163
void xy_plane(const Real zpos=0.)
Creates an XY plane located at z=zpos.
Definition plane.C:88
void create_from_three_points(const Point &p0, const Point &p1, const Point &p2)
Defines a plane intersecting the three points p0, p1, and p2.
Definition plane.C:72
virtual bool below_surface(const Point &p) const override
Definition plane.C:138
const Point & normal() const
Definition plane.h:139
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
The base class for all "surface" related geometric objects.
Definition surface.h:43
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real