plane.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_PLANE_H 00021 #define LIBMESH_PLANE_H 00022 00023 // Local includes 00024 #include "libmesh/surface.h" 00025 00026 // C++ includes 00027 00028 namespace libMesh 00029 { 00030 00031 00038 // ------------------------------------------------------------ 00039 // Plane class definition 00040 class Plane : public Surface 00041 { 00042 public: 00043 00047 Plane (); 00048 00052 Plane (const Point& p, const Point& n); 00053 00059 Plane (const Point& p0, const Point& p1, const Point& p2); 00060 00064 Plane (const Plane& other_plane); 00065 00069 ~Plane (); 00070 00074 void create_from_point_normal (const Point& p, const Point& n); 00075 00081 void create_from_three_points (const Point& p0, 00082 const Point& p1, 00083 const Point& p2 ); 00084 00088 void xy_plane (const Real zpos=0.); 00089 00093 void xz_plane (const Real ypos=0.); 00094 00098 void yz_plane (const Real xpos=0.); 00099 00104 bool above_surface (const Point& p) const; 00105 00110 bool below_surface (const Point& p) const; 00111 00118 bool on_surface (const Point& p) const; 00119 00123 Point closest_point (const Point& p) const; 00124 00129 Point unit_normal (const Point& p) const; 00130 00135 const Point & get_planar_point() const; 00136 00137 00138 private: 00139 00140 00144 const Point& normal () const; 00145 00149 Point _point; 00150 Point _normal; 00151 00152 }; 00153 00154 00155 00156 // ------------------------------------------------------------ 00157 // Plane class inline members 00158 inline const Point & Plane::normal () const 00159 { 00160 return _normal; 00161 } 00162 00163 } // namespace libMesh 00164 00165 #endif // LIBMESH_PLANE_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: