Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/Geometry/Linear/PRISM.HPP

Go to the documentation of this file.
00001 // Definition of class JPrism
00002 #ifndef __J2K__JPrism_HPP__
00003 #define __J2K__JPrism_HPP__
00004 
00005 #include <j2k/Fred/Geometry/JCircle.hpp>
00006 
00007 class JPrism {
00008 public:
00009    // default constructor
00010    JPrism( double h = 0.0, double r = 0.0,
00011              int x = 0, int y = 0 );
00012 
00013    void   setHeight( double Height );  // set height
00014    double getHeight() const;           // return height
00015    double area()      const;           // calculate and return area
00016    double volume()    const;           // calculate and return volume
00017 
00018    // Output JPrism dimensions
00019    friend ostream&  operator<<( ostream &output, const JPrism &pr ) {
00020      output << pr.rc << "; Height = " << pr.height;
00021      return output;                              // enables cascaded calls
00022    }
00023 
00024 protected:
00025    JRectangle rc;                       // JRectangle ( x, y, length )
00026    double height;             // height of the JPrism
00027 
00028    double area_cache;                  // Area   cache valid > 0.0
00029    double volume_cache;                // Volume cache valid > 0.0
00030    
00031 };
00032 
00033 #endif
00034 

Generated on Sun Oct 14 18:46:10 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001