00001
00002
00003 #include <j2k/Fred/Standard.hpp>
00004 #include <iostream.h>
00005 #include <iomanip.h>
00006
00007 #define __J2K__Need_JCylinder_double_double
00008 #include <j2k/Fred/Geometry/Macro/MC_JCylinder.hpp>
00009
00010
00011 #define JPoint JPoint_double_double
00012 #define JCircle JCircle_double_double
00013 #define JCylinder JCylinder_double_double
00014
00015 int main()
00016 {
00017
00018 JCylinder cyl( 5.7, 2.5, 12, 23 );
00019
00020
00021 cout << "X coordinate is " << cyl.getX()
00022 << "\nY coordinate is " << cyl.getY()
00023 << "\nRadius is " << cyl.getRadius()
00024 << "\nHeight is " << cyl.getHeight()
00025 << "\n\n";
00026
00027
00028 cyl.setPoint( 2, 2 ).setRadius( 4.25 ).setHeight( 10 );
00029 cout << "The new location, radius, and height of cyl are:\n"
00030 << cyl << '\n';
00031
00032
00033 JPoint& pRef = cyl;
00034
00035 cout << "\nJCylinder printed as a Point is: "
00036 << pRef << "\n\n";
00037
00038
00039 JCircle& JCircleRef = cyl;
00040
00041 cout << "JCylinder printed as a JCircle is:\n" << JCircleRef
00042 << "\nArea: " << JCircleRef.area() << endl;
00043
00044 return 0;
00045 }
00046
00047