00001
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
00010 JPrism( double h = 0.0, double r = 0.0,
00011 int x = 0, int y = 0 );
00012
00013 void setHeight( double Height );
00014 double getHeight() const;
00015 double area() const;
00016 double volume() const;
00017
00018
00019 friend ostream& operator<<( ostream &output, const JPrism &pr ) {
00020 output << pr.rc << "; Height = " << pr.height;
00021 return output;
00022 }
00023
00024 protected:
00025 JRectangle rc;
00026 double height;
00027
00028 double area_cache;
00029 double volume_cache;
00030
00031 };
00032
00033 #endif
00034