#include <JCylinder.hpp>
Inheritance diagram for JCylinder::
Public Methods | |
JCylinder () | |
JCylinder (Type X) | |
JCylinder (Type X, Type Y) | |
JCylinder (Type X, Type Y, FType radius) | |
JCylinder (Type X, Type Y, FType Radius, FType Height) | |
JCylinder (const JCylinder &src) | |
const JCircle & | operator= (const JCircle &src) |
const JCylinder & | setHeight (FType Height) |
FType | getHeight () const |
FType | area () const |
FType | volume () const |
const JCylinder & | setRadius (FType r) |
const JCylinder & | setPoint (Type X, Type Y) |
const JCylinder & | setPolar (FType R, FType Theta) |
const JCylinder & | setCircle (Type X, Type Y, FType Radius) |
const JCylinder & | setX (Type X) |
const JCylinder & | setY (Type Y) |
const JCylinder & | setR (FType R) |
const JCylinder & | setAngle (FType Theta) |
Protected Attributes | |
JCylinder_t | cyl |
Friends | |
ostream & | operator<< (ostream &os, const JCylinder &Cyl) |
|
Definition at line 42 of file JCylinder.hpp. 00042 : JCircle( 0, 0, 0 ) 00043 { 00044 memset( &cyl, 0, sizeof( JCylinder_t ) ); 00045 } |
|
Definition at line 47 of file JCylinder.hpp. 00047 : JCircle( X, 0, 0 ) 00048 { 00049 memset( &cyl, 0, sizeof( JCylinder_t ) ); 00050 } |
|
Definition at line 52 of file JCylinder.hpp. 00052 : JCircle( X, Y, 0 ) 00053 { 00054 memset( &cyl, 0, sizeof( JCylinder_t ) ); 00055 } |
|
Definition at line 57 of file JCylinder.hpp. 00058 : JCircle( X, Y, radius ) 00059 { 00060 memset( &cyl, 0, sizeof( JCylinder_t ) ); 00061 cyl.area_cache = -1; 00062 cyl.volume_cache = -1; 00063 } |
|
Definition at line 65 of file JCylinder.hpp. 00066 : JCircle( X, Y, Radius ) 00067 { 00068 memset( &cyl, 0, sizeof( JCylinder_t ) ); 00069 cyl.height = Height; 00070 cyl.area_cache = -1; 00071 cyl.volume_cache = -1; 00072 } |
|
Definition at line 74 of file JCylinder.hpp. 00075 : JCircle( (const JCircle&) src ) 00076 { 00077 memcpy( &cyl, &src.cyl, sizeof( JCylinder_t ) ); 00078 } |
|
Definition at line 105 of file JCylinder.hpp. 00106 { 00107 if ( cyl.area_cache < 0 ) { 00108 FType a = JCircle::area(); 00109 FType r = JCircle::getRadius(); 00110 00111 cyl.area_cache = ( 2 * a ) + \ 00112 ( 2 * Math_PI * r * cyl.height ); 00113 } 00114 return area_cache; 00115 } |
|
Definition at line 100 of file JCylinder.hpp. Referenced by main().
00100 { 00101 return cyl.height; 00102 } |
|
Reimplemented from JCircle. Definition at line 80 of file JCylinder.hpp. 00081 { 00082 memcpy( &pt, &src.pt, sizeof( JPoint_t ) ); 00083 memcpy( &c, &src.c, sizeof( JCircle_t ) ); 00084 memcpy( &cyl, &src.cyl, sizeof( JCylinder_t ) ); 00085 return *this; 00086 } |
|
Reimplemented from JCircle. Definition at line 181 of file JCylinder.hpp. 00182 { 00183 JCircle::setAngle( Theta ); 00184 return *this; 00185 } |
|
Reimplemented from JCircle. Definition at line 157 of file JCylinder.hpp. 00158 { 00159 JCircle::setCircle( X, Y, Radius ); 00160 return *this; 00161 } |
|
JCylinder specific functions. /////////////////////////////////////////////////////////////////////////.
Definition at line 93 of file JCylinder.hpp. 00094 { 00095 cyl.height = Height; 00096 return *this; 00097 } |
|
Point related functions. ////////////////////////////////////////////////////////////////////////////.
Reimplemented from JCircle. Definition at line 143 of file JCylinder.hpp. Referenced by main().
00144 { 00145 JCircle::setPoint( X, Y ); 00146 return *this; 00147 } |
|
JPoint related functions. ////////////////////////////////////////////////////////////////////.
Reimplemented from JCircle. Definition at line 150 of file JCylinder.hpp. 00151 { 00152 JCircle::setPolar( R, Theta ); 00153 return *this; 00154 } |
|
Reimplemented from JCircle. Definition at line 175 of file JCylinder.hpp. 00176 { 00177 JCircle::setR( R ); 00178 return *this; 00179 } |
|
JCircle related functions. ////////////////////////////////////////////////////////////////////////////.
Reimplemented from JCircle. Definition at line 132 of file JCylinder.hpp. Referenced by main().
00133 { 00134 JCircle::setRadius( r ); 00135 return *this; 00136 } |
|
Reimplemented from JCircle. Definition at line 163 of file JCylinder.hpp. 00164 { 00165 JCircle::setX( X ); 00166 return *this; 00167 } |
|
Reimplemented from JCircle. Definition at line 169 of file JCylinder.hpp. 00170 { 00171 JCircle::setY( Y ); 00172 return *this; 00173 } |
|
Definition at line 118 of file JCylinder.hpp. 00119 { 00120 if ( cyl.volume_cache < 0 ) { 00121 FType a = JCircle::area(); 00122 cyl.volume_cache = a * cyl.height; 00123 } 00124 return cyl.volume_cache; 00125 } |
|
Definition at line 188 of file JCylinder.hpp. |
|
Definition at line 195 of file JCylinder.hpp. Referenced by operator<<().
|