#include <JPoint.hpp>
Inheritance diagram for JPoint::
Public Methods | |
__inline | JPoint () |
__inline | JPoint (Type X) |
__inline | JPoint (Type X, Type Y) |
__inline | JPoint (const JPoint &p) |
__inline const JPoint & | operator= (const JPoint &p) |
__inline bool | operator== (const JPoint &p) |
__inline bool | operator!= (const JPoint &p) |
__inline const JPoint & | operator++ () |
__inline const JPoint & | operator++ (int) |
__inline const JPoint & | operator-- () |
__inline const JPoint & | operator-- (int) |
__inline const JPoint & | setPoint (Type X, Type Y) |
__inline const JPoint & | setPolar (FType R, FType Theta) |
__inline const JPoint & | setX (FType X) |
__inline const JPoint & | setY (FType Y) |
__inline const JPoint & | setR (FType R) |
__inline const JPoint & | setAngle (FType Theta) |
__inline Type | getX () const |
__inline Type | getY () const |
__inline FType | getR () |
__inline FType | getAngle () |
Protected Methods | |
void | getXYfromPolar () |
void | getPolarfromXY () |
Protected Attributes | |
JPoint_t | pt |
Friends | |
__inline friend ostream & | operator<< (ostream &os, const JPoint &p) |
|
Definition at line 34 of file JPoint.hpp. 00034 { 00035 memset( &pt, 0, sizeof( JPoint_t ) ); 00036 } |
|
Definition at line 38 of file JPoint.hpp. |
|
Definition at line 43 of file JPoint.hpp. |
|
Definition at line 49 of file JPoint.hpp. |
|
Definition at line 149 of file JPoint.hpp. 00149 { // get angle 00150 if ( !pt.PolarCache ) 00151 getPolarfromXY(); 00152 return pt.theta; 00153 } |
|
Definition at line 173 of file JPoint.hpp. Referenced by getAngle(), getR(), operator++(), and operator--().
|
|
Definition at line 143 of file JPoint.hpp. 00143 { // get r coordinate 00144 if ( !pt.PolarCache ) 00145 getPolarfromXY(); 00146 return pt.r; 00147 } |
|
Definition at line 135 of file JPoint.hpp. Referenced by main().
00135 { // get x coordinate 00136 return pt.x; 00137 } |
|
Definition at line 166 of file JPoint.hpp. Referenced by operator++(), operator--(), setAngle(), setPolar(), and setR().
|
|
Definition at line 139 of file JPoint.hpp. Referenced by main().
00139 { // get y coordinate 00140 return pt.y; 00141 } |
|
Definition at line 63 of file JPoint.hpp. 00063 { 00064 return memcmp( &pt, &p.pt, (sizeof( Type ) * 2) ); 00065 } |
|
Reimplemented in JCircle. Definition at line 74 of file JPoint.hpp. 00074 { 00075 if ( !pt.PolarCache ) getPolarfromXY(); 00076 pt.r++; 00077 getXYfromPolar(); 00078 return *this; 00079 } |
|
Reimplemented in JCircle. Definition at line 67 of file JPoint.hpp. Referenced by JCircle::operator++().
00067 { 00068 if ( !pt.PolarCache ) getPolarfromXY(); 00069 pt.r++; 00070 getXYfromPolar(); 00071 return *this; 00072 } |
|
Reimplemented in JCircle. Definition at line 88 of file JPoint.hpp. 00088 { 00089 if ( !pt.PolarCache ) getPolarfromXY(); 00090 pt.r--; 00091 getXYfromPolar(); 00092 return *this; 00093 } |
|
Reimplemented in JCircle. Definition at line 81 of file JPoint.hpp. Referenced by JCircle::operator--().
00081 { 00082 if ( !pt.PolarCache ) getPolarfromXY(); 00083 pt.r--; 00084 getXYfromPolar(); 00085 return *this; 00086 } |
|
Definition at line 53 of file JPoint.hpp. |
|
Definition at line 59 of file JPoint.hpp. 00059 { 00060 return !memcmp( &pt, &p.pt, (sizeof( Type ) * 2) ); 00061 } |
|
Reimplemented in JCircle, and JCylinder. Definition at line 129 of file JPoint.hpp. Referenced by JSquare::setAngle(), JRectangle::setAngle(), and JCircle::setAngle().
00129 { 00130 pt.theta = Theta; 00131 getXYfromPolar(); 00132 return *this; 00133 } |
|
Reimplemented in JCircle, and JCylinder. Definition at line 96 of file JPoint.hpp. Referenced by JCircle::setCircle(), JRectangle::setJRectangle(), JRectangle::setJSquare(), JSquare::setPoint(), JRectangle::setPoint(), and JCircle::setPoint().
00096 { 00097 pt.x = X; 00098 pt.y = Y; 00099 pt.PolarCache = FALSE; 00100 return *this; 00101 } |
|
Reimplemented in JCircle, and JCylinder. Definition at line 104 of file JPoint.hpp. Referenced by JSquare::setPolar(), JRectangle::setPolar(), and JCircle::setPolar().
00104 { 00105 pt.r = R; 00106 pt.theta = Theta; 00107 getXYfromPolar(); 00108 return *this; 00109 } |
|
Reimplemented in JCircle, and JCylinder. Definition at line 123 of file JPoint.hpp. Referenced by JSquare::setR(), JRectangle::setR(), and JCircle::setR().
00123 { 00124 pt.r = R; 00125 getXYfromPolar(); 00126 return *this; 00127 } |
|
Definition at line 111 of file JPoint.hpp. Referenced by JSquare::setX(), JRectangle::setX(), and JCircle::setX().
00111 { 00112 pt.x = X; 00113 pt.PolarCache = FALSE; 00114 return *this; 00115 } |
|
Definition at line 117 of file JPoint.hpp. Referenced by JSquare::setY(), JRectangle::setY(), and JCircle::setY().
00117 { 00118 pt.y = Y; 00119 pt.PolarCache = FALSE; 00120 return *this; 00121 } |
|
Definition at line 156 of file JPoint.hpp. |
|
Definition at line 163 of file JPoint.hpp. Referenced by JPoint(), operator!=(), JCircle::operator!=(), operator<<(), operator=(), JCylinder::operator=(), JCircle::operator=(), operator==(), and JCircle::operator==().
|