libMesh
Public Member Functions | Private Member Functions | Private Attributes | List of all members
libMesh::Plane Class Reference

This class defines a plane. More...

#include <plane.h>

Inheritance diagram for libMesh::Plane:
[legend]

Public Member Functions

 Plane ()
 Dummy Constructor. More...
 
 Plane (const Point &p, const Point &n)
 Constructs a plane containing point p with normal n. More...
 
 Plane (const Point &p0, const Point &p1, const Point &p2)
 Constructs a plane containing the three points. More...
 
 Plane (const Plane &other_plane)
 Copy-constructor. More...
 
 ~Plane ()
 Destructor. More...
 
void create_from_point_normal (const Point &p, const Point &n)
 Defines a plane containing point p with normal n. More...
 
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. More...
 
void xy_plane (const Real zpos=0.)
 Creates an XY plane located at z=zpos. More...
 
void xz_plane (const Real ypos=0.)
 Creates an XZ plane located at y=ypos. More...
 
void yz_plane (const Real xpos=0.)
 Creates an YZ plane located at x=xpos. More...
 
virtual bool above_surface (const Point &p) const override
 
virtual bool below_surface (const Point &p) const override
 
virtual bool on_surface (const Point &p) const override
 
virtual Point closest_point (const Point &p) const override
 
virtual Point unit_normal (const Point &p) const override
 
const Pointget_planar_point () const
 
virtual Point surface_coords (const Point &world_coords) const
 
virtual Point world_coords (const Point &surf_coords) const
 

Private Member Functions

const Pointnormal () const
 

Private Attributes

Point _point
 The plane is defined by a point and a normal. More...
 
Point _normal
 

Detailed Description

This class defines a plane.

Author
Benjamin S. Kirk
Date
2002 A geometric object representing a planar surface.

Definition at line 36 of file plane.h.

Constructor & Destructor Documentation

◆ Plane() [1/4]

libMesh::Plane::Plane ( )

Dummy Constructor.

◆ Plane() [2/4]

libMesh::Plane::Plane ( const Point p,
const Point n 
)

Constructs a plane containing point p with normal n.

◆ Plane() [3/4]

libMesh::Plane::Plane ( const Point p0,
const Point p1,
const Point p2 
)

Constructs a plane containing the three points.

The normal is determined in a counter-clockwise sense. See the create_from_three_points method for more details.

◆ Plane() [4/4]

libMesh::Plane::Plane ( const Plane other_plane)

Copy-constructor.

◆ ~Plane()

libMesh::Plane::~Plane ( )

Destructor.

Does nothing at the moment.

Member Function Documentation

◆ above_surface()

virtual bool libMesh::Plane::above_surface ( const Point p) const
overridevirtual
Returns
true if the point p is above the surface, false otherwise.

Implements libMesh::Surface.

◆ below_surface()

virtual bool libMesh::Plane::below_surface ( const Point p) const
overridevirtual
Returns
true if the point p is below the surface, false otherwise.

Implements libMesh::Surface.

◆ closest_point()

virtual Point libMesh::Plane::closest_point ( const Point p) const
overridevirtual
Returns
The closest point on the surface to point p.

Implements libMesh::Surface.

◆ create_from_point_normal()

void libMesh::Plane::create_from_point_normal ( const Point p,
const Point n 
)

Defines a plane containing point p with normal n.

◆ create_from_three_points()

void libMesh::Plane::create_from_three_points ( const Point p0,
const Point p1,
const Point p2 
)

Defines a plane intersecting the three points p0, p1, and p2.

The normal is constructed in a counter-clockwise sense, i.e. (p1-p0)x(p2-p0);

◆ get_planar_point()

const Point& libMesh::Plane::get_planar_point ( ) const
Returns
A point on the plane useful for determining position.

◆ normal()

const Point& libMesh::Plane::normal ( ) const
private
Returns
The normal for the plane.

Definition at line 139 of file plane.h.

References _normal.

139 { return _normal; }
Point _normal
Definition: plane.h:145

◆ on_surface()

virtual bool libMesh::Plane::on_surface ( const Point p) const
overridevirtual
Returns
true if the point p is on the surface, false otherwise.
Note
The definition of "on the surface" really means "very close" to account for roundoff error.

Implements libMesh::Surface.

◆ surface_coords()

virtual Point libMesh::Surface::surface_coords ( const Point world_coords) const
virtualinherited
Returns
The Point world_coords in the surface's coordinate system. world_coords is in the world coordinate system. This method is not purely virtual, because there may be surfaces that do not have their own coordinate system. These simply do not have to override this method.

Reimplemented in libMesh::Sphere.

Definition at line 101 of file surface.h.

References libMesh::Surface::world_coords().

101 { return world_coords; }
virtual Point world_coords(const Point &surf_coords) const
Definition: surface.h:110

◆ unit_normal()

virtual Point libMesh::Plane::unit_normal ( const Point p) const
overridevirtual
Returns
A unit vector normal to the surface at point p.

Implements libMesh::Surface.

◆ world_coords()

virtual Point libMesh::Surface::world_coords ( const Point surf_coords) const
virtualinherited
Returns
The world (cartesian) coordinates for the surface coordinates surf_coords. This method is not purely virtual, because there may be surfaces that do not have an own coordinate system. These simply do not have to override this method.

Reimplemented in libMesh::Sphere.

Definition at line 110 of file surface.h.

Referenced by libMesh::Surface::surface_coords().

110 { return surf_coords; }

◆ xy_plane()

void libMesh::Plane::xy_plane ( const Real  zpos = 0.)

Creates an XY plane located at z=zpos.

◆ xz_plane()

void libMesh::Plane::xz_plane ( const Real  ypos = 0.)

Creates an XZ plane located at y=ypos.

◆ yz_plane()

void libMesh::Plane::yz_plane ( const Real  xpos = 0.)

Creates an YZ plane located at x=xpos.

Member Data Documentation

◆ _normal

Point libMesh::Plane::_normal
private

Definition at line 145 of file plane.h.

Referenced by normal().

◆ _point

Point libMesh::Plane::_point
private

The plane is defined by a point and a normal.

Definition at line 144 of file plane.h.


The documentation for this class was generated from the following file: