Back to index

See source file

PHPlane.h

 
#ifndef PHPLANE_H 
#define PHPLANE_H 
 
//--------------------------------------------------------------------------------------- 
// Class:  PHPlane header 
// 
// Created by:  Jane M. Burward-Hoy and Federica Messer 
// 
// Purpose:  The Phenix plane class. 
//           PHPlane is declared here.  
// 
//           A plane is defined by a local coordinate origin point 
//           and a unit vector normal to the plane.  The equation 
//           of a plane is Ax + By + Cz + D = 0, where a, b, c, 
//           and d are the magnitudes of the unit vector normal to 
//           the plane. 
// 
// Last update:  10/25/99 
// 
//----------------------------------------------------------- 
#include <iostream.h> 
#include "PHPoint.h" 
#include "PHVector.h" 
#include "PHLine.h" 
 
class PHPlane 
{ 
 
 public: 
 
  PHPlane(); 
  PHPlane(const PHPoint &, const PHVector &); 
  PHPlane(const PHPlane &); 
  PHPlane(const PHLine &); 
  PHPlane& operator=(const PHPlane &); 
  PHPlane& operator=(const PHLine &); 
  ~PHPlane(); 
 
  void print(); 
  friend ostream& operator<<(ostream&, const PHPlane&); 
 
  void     setOrigin(PHPoint &p)  {origin = p;} 
  void     setNormal(PHVector &v); 
  PHPoint  getOrigin()  const {return origin;} 
  PHVector getNormal()  const {return normal;} 
   
  double getD(); 
  void normalize()     { normal.normalize();} 
 
 private: 
   
  PHPoint origin; 
  PHVector normal; 
 
}; 
 
 
 
 
#endif /*PHPLANE_H*/ 

Back to index

See source file