Back to index

See source file

PHLine.h

 
#ifndef PHLINE_H 
#define PHLINE_H 
 
//--------------------------------------------------------------------------------------- 
// Class:  PHLine header 
// 
// Created by:  Jane M. Burward-Hoy and Federica Messer 
// 
// Purpose:  The Phenix line class. 
// PHLine is declared here.  It contains 
//           PHPoint and PHVector as member classes (a point on the line 
//           and a vector along the line define the line). 
//  
// Last update:  10/20/99 
// 
//------------------------------------------------------------------------------------ 
#include <iostream.h> 
#include "PHPoint.h" 
#include "PHVector.h" 
 
class PHLine 
{ 
public: 
 
  PHLine(); 
  PHLine(const PHPoint &, const PHVector &);  
  PHLine(const PHPoint &, const PHPoint  &);  
  PHLine(const PHLine &);  
  PHLine& operator=(const PHLine &); 
  ~PHLine(); 
 
  double length() const { return direction.length();}  
  void normalize()      { direction.normalize();}  
 
  void print() const;      
  friend ostream& operator<<(ostream&, PHLine &);  
 
  void setBasepoint(const PHPoint p)  {basepoint = p; }      
  void setDirection(const PHVector v) {direction = v; } 
 
  PHPoint  getBasepoint() const { return basepoint; } 
  PHVector getDirection() const { return direction; } 
 
private: 
  PHPoint basepoint; 
  PHVector direction; 
 
}; 
 
 
#endif /* PHLINE_H */ 
 

Back to index

See source file