Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mlib::Wplane Class Reference
["World" Coordinate System]

A plane in World coordinates. More...

#include <points.H>

Inheritance diagram for mlib::Wplane:

Inheritance graph
[legend]
Collaboration diagram for mlib::Wplane:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Plane ()
 Default constructor. Creates a plane with a zero offset from the origin and default constructed vector.
 Plane (const Wvec &n, double d)
 Constructor that creates a plane with the normal and offset set to the values passed as arguments.
 Plane (const Wpt &p, const Wvec &n)
 Constructor that creates a plane that passes through the point p and that has normal n.
 Plane (const Wpt &p1, const Wpt &p2, const Wpt &p3)
 Constructor that creates a plane that contains the three points p1, p2 and p3.
 Plane (const Wpt &, const Wvec &, const Wvec &)
 Constructor that creates a plane that contains the given piont and two given vectors.
 Plane (const Wptplg[], int n)
 Create plane from a polygon of vertices (n >=3).
 Plane (const Wptplg[], int n, const Wvec &normal)
 The plane normal is given, just calculate the 'd' parameter from all polygon vertices.
Wvecnormal ()
const Wvecnormal () const
double & d ()
double d () const
Wpt origin () const
bool is_valid () const
 Is the plane valid (i.e. does it have a unit length normal)?
bool is_parallel (const Wplane &p) const
 Are the two planes parallel?
bool is_equal (const Wplane &p) const
 Are the two planes equivalent?
Wplane operator- () const
 Negates the plane's normal vector and offset.
Wpt project (const Wpt &) const
 Projects the given point on to the plane.
Wvec project (const Wvec &) const
 Projects the given vector on to the plane.
Wline project (const Wline &) const
 Projects the given line on to the plane.
double dist (const Wpt &p) const
 Computes the distance from the given point to the nearest point on the plane.
Wpt intersect (const Wline &l) const
 Computes the intersection point of the given line and the plane.
Constructors
 Wplane ()
 Wplane (CWvec &n, double d)
 Wplane (CWpt &n, CWvec &v)
 Wplane (CWpt &n, CWpt &p1, CWpt &p2)
 Wplane (CWpt &p, CWvec &v1, CWvec &v2)
 Wplane (CWpt plg[], int n)
 Wplane (CWpt plg[], int n, CWvec &normal)

Protected Attributes

Wvec _normal
double _d

Detailed Description

A plane in World coordinates.

Definition at line 344 of file points.H.


Constructor & Destructor Documentation

mlib::Wplane::Wplane  )  [inline]
 

Definition at line 351 of file points.H.

mlib::Wplane::Wplane CWvec n,
double  d
[inline]
 

Definition at line 352 of file points.H.

mlib::Wplane::Wplane CWpt n,
CWvec v
[inline]
 

Definition at line 353 of file points.H.

mlib::Wplane::Wplane CWpt n,
CWpt p1,
CWpt p2
[inline]
 

Definition at line 354 of file points.H.

mlib::Wplane::Wplane CWpt p,
CWvec v1,
CWvec v2
[inline]
 

Definition at line 355 of file points.H.

mlib::Wplane::Wplane CWpt  plg[],
int  n
[inline]
 

Definition at line 356 of file points.H.

mlib::Wplane::Wplane CWpt  plg[],
int  n,
CWvec normal
[inline]
 

Definition at line 357 of file points.H.


Member Function Documentation

double mlib::Plane< Wplane , Wpt , Wvec , Wline >::d  )  const [inline, inherited]
 

Definition at line 89 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_d.

double& mlib::Plane< Wplane , Wpt , Wvec , Wline >::d  )  [inline, inherited]
 

Definition at line 88 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_d.

double mlib::Plane< Wplane , Wpt , Wvec , Wline >::dist const Wpt p  )  const [inline, inherited]
 

Computes the distance from the given point to the nearest point on the plane.

Definition at line 139 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal.

Wpt mlib::Plane< Wplane , Wpt , Wvec , Wline >::intersect const Wline l  )  const [inline, inherited]
 

Computes the intersection point of the given line and the plane.

Definition at line 142 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_normal, mlib::Plane< PLANE, P, V, L >::origin(), and mlib::Plane< PLANE, P, V, L >::plane_intersect().

bool mlib::Plane< Wplane , Wpt , Wvec , Wline >::is_equal const Wplane p  )  const [inline, inherited]
 

Are the two planes equivalent?

Definition at line 112 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal.

bool mlib::Plane< Wplane , Wpt , Wvec , Wline >::is_parallel const Wplane p  )  const [inline, inherited]
 

Are the two planes parallel?

Definition at line 108 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_normal.

bool mlib::Plane< Wplane , Wpt , Wvec , Wline >::is_valid  )  const [inline, inherited]
 

Is the plane valid (i.e. does it have a unit length normal)?

Definition at line 99 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_normal, and mlib::epsNorMath().

const Wvec & mlib::Plane< Wplane , Wpt , Wvec , Wline >::normal  )  const [inline, inherited]
 

Definition at line 86 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_normal.

Wvec & mlib::Plane< Wplane , Wpt , Wvec , Wline >::normal  )  [inline, inherited]
 

Definition at line 85 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_normal.

Wplane mlib::Plane< Wplane , Wpt , Wvec , Wline >::operator-  )  const [inline, inherited]
 

Negates the plane's normal vector and offset.

Definition at line 121 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal.

Wpt mlib::Plane< Wplane , Wpt , Wvec , Wline >::origin  )  const [inline, inherited]
 

Definition at line 96 of file plane.H.

References mlib::Plane< PLANE, P, V, L >::_d, and mlib::Plane< PLANE, P, V, L >::_normal.

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane const Wpt   plg[],
int  n,
const Wvec normal
[inherited]
 

The plane normal is given, just calculate the 'd' parameter from all polygon vertices.

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane const Wpt   plg[],
int  n
[inherited]
 

Create plane from a polygon of vertices (n >=3).

All polygon vertices are used to calculate the plane coefficients to make the formula symetrical.

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane const Wpt ,
const Wvec ,
const Wvec
[inherited]
 

Constructor that creates a plane that contains the given piont and two given vectors.

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane const Wpt p1,
const Wpt p2,
const Wpt p3
[inline, inherited]
 

Constructor that creates a plane that contains the three points p1, p2 and p3.

Definition at line 66 of file plane.H.

References mlib::cross().

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane const Wpt p,
const Wvec n
[inline, inherited]
 

Constructor that creates a plane that passes through the point p and that has normal n.

Definition at line 62 of file plane.H.

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane const Wvec n,
double  d
[inline, inherited]
 

Constructor that creates a plane with the normal and offset set to the values passed as arguments.

Definition at line 58 of file plane.H.

mlib::Plane< Wplane , Wpt , Wvec , Wline >::Plane  )  [inline, inherited]
 

Default constructor. Creates a plane with a zero offset from the origin and default constructed vector.

This most likely creates an invalid plane with a zero length vector.

Definition at line 53 of file plane.H.

Wline mlib::Plane< Wplane , Wpt , Wvec , Wline >::project const Wline  )  const [inherited]
 

Projects the given line on to the plane.

Wvec mlib::Plane< Wplane , Wpt , Wvec , Wline >::project const Wvec  )  const [inherited]
 

Projects the given vector on to the plane.

Wpt mlib::Plane< Wplane , Wpt , Wvec , Wline >::project const Wpt  )  const [inherited]
 

Projects the given point on to the plane.


Member Data Documentation

double mlib::Plane< Wplane , Wpt , Wvec , Wline >::_d [protected, inherited]
 

Definition at line 42 of file plane.H.

Wvec mlib::Plane< Wplane , Wpt , Wvec , Wline >::_normal [protected, inherited]
 

Definition at line 41 of file plane.H.


The documentation for this class was generated from the following file:
Generated on Mon Sep 18 11:48:14 2006 for jot by  doxygen 1.4.4