Back to index

See source file

PHSphere.h

 
#ifndef PHSPHERE_H 
#define PHSPHERE_H 
 
//--------------------------------------------------------------------------------------- 
// Class:  PHSphere header 
// 
// Written by:  Jane M. Burward-Hoy and Federica Messer 
// 
// Purpose:  A Sphere 
//  
// Last update:  10/28/99 
// 
// Pioneered by  J. Mitchell 
// 
// Details: the sphere is defined by its center, its radius  
//---------------------------------------------------------------------------- 
 
#include <iostream.h> 
#include "PHPoint.h" 
 
class PHSphere 
{ 
public: 
  
  PHSphere(); 
  PHSphere(double radius,const PHPoint);   
  PHSphere(const PHSphere &);  
  ~PHSphere(); 
   
  PHSphere& operator= (const PHSphere &); 
   
  void setCenter(PHPoint& val) { center = val;} 
  void setRadius(double val)   { radius = val;} 
   
  double getRadius()  const  { return radius;} 
  PHPoint getCenter() const { return center;} 
 
  void print() const;  
  friend ostream& operator<<(ostream& ,const PHSphere&); 
 
private: 
  double radius; 
  PHPoint center; 
   
}; 
 
#endif /* PHSPHERE_H */ 
 
 

Back to index

See source file