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/CUBE.HPP

Go to the documentation of this file.
00001 // Definition of class JCube
00002 #ifndef __J2K__JCube_HPP__
00003 #define __J2K__JCube_HPP__
00004 
00005 #include <j2k/Fred/Geometry/JSquare.hpp>
00006 
00007 class JCube {
00008 public:
00009    // default constructor
00010    JCube();
00011    JCube( double X );
00012    JCube( double X, double Y );
00013    JCube( double X, double Y, double Length );
00014 
00015    double area()      const;           // calculate and return area
00016    double volume()    const;           // calculate and return volume
00017 
00018    // Output Cube dimensions
00019    friend ostream&  operator<<( ostream &output, const JCube &c ) {
00020      output << c.sq;
00021      return output;                              // Enable cascaded calls
00022    }
00023 
00024 protected:
00025    JSquare sq;                         // square ( x, y, length )
00026    double area_cache;                  // Area   cache valid > 0.0
00027    double volume_cache;                // Volume cache valid > 0.0
00028 };
00029 
00030 #endif
00031 

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