![]() ![]() ![]()
|
SophiaFramework 2.2 |
#include <SFUCircle.hpp>
class SFUCircle : public AEECircle;
typedef SFUCircle& SFUCircleRef; typedef SFUCircle* SFUCirclePtr; typedef SFUCircle** SFUCircleHandle; typedef const SFUCircle ConstSFUCircle; typedef const SFUCircle& ConstSFUCircleRef; typedef const SFUCircle* ConstSFUCirclePtr; typedef const SFUCircle** ConstSFUCircleHandle;
SFUCircle は円を表現するクラスです。 円を操作するためのさまざまな関数が用意されています。
| コンストラクタ/デストラクタ | ||
|---|---|---|
| public |
SFUCircle | SFUCircle クラスのコンストラクタです。 |
| public |
~SFUCircle | SFUCircle クラスのデストラクタです。 |
| パブリック変数 | ||
|---|---|---|
| public |
cx | 円の中心の X 座標です。 |
| public |
cy | 円の中心の Y 座標です。 |
| public |
r | 円の半径です。 |
| パブリック関数 | ||
|---|---|---|
| public |
Empty | 半径が 0 であるか判定します。 |
| public |
Equal | 円が等しいか判定します。 |
| public |
Inset | 円の半径を縮小します。 |
| public |
Offset | 円の中心を移動します。 |
| public |
Origin | 円の中心を設定します。 |
| public |
Radius | 円の半径を取得/設定します。 |
| public |
Set | 円の中心と半径を設定します。 |
| public |
operator+ | 円の中心を移動します。 |
| public |
operator- | 円の中心を逆方向に移動します。 |
| public |
operator== | 2 つの円が等しいか判定します。 |
[ public ] SFUCircle(Void);
[ public ]
SFUCircle(
ConstSFUCircleRef circle // コピー元の円
);
[ public ]
SFUCircle(
ConstAEECircleRef circle // コピー元の円
);
[ public ]
SFUCircle(
SInt16 x // 中心の X 座標
SInt16 y // 中心の Y 座標
SInt16 r // 半径
);
[ public ]
SFUCircle(
ConstSFUPointRef point // 中心
SInt16 r // 半径
);
[ public ] ~SFUCircle(Void);
[ public, const ] Bool Empty(Void);
円の半径が 0 であれば TRUE、そうでなければ FALSE を返します。
[ public, const ] Bool Equal( ConstSFUCircleRef circle // 比較対象となる円 );
2 つの円の中心と半径がともに等しい場合 TRUE を返します。 そうでなければ FALSE を返します。
[ public ] ConstSFUCircleRef Inset( SInt16 dr // 半径を縮める値 );
次の例では円の半径が 5 だけ縮みます。
SFUCircle c(20,20,15); c.Inset(5);
[ public ] ConstSFUCircleRef Offset( SInt16 x // X 方向の移動距離 SInt16 y // Y 方向の移動距離 );
[ public ] ConstSFUCircleRef Offset( ConstSFUPointRef point // 移動する方向 );
自分自身を返します。
次の例では円を移動しています。
SFUCircle c(100, 100, 20); SFUPoint point(5, 10); c.Offset(point); // c は 中心 (105, 110) になります。
[ public ] ConstSFUCircleRef Origin( SInt16 x // 中心の X 座標 SInt16 y // 中心の Y 座標 );
[ public ] ConstSFUCircleRef Origin( ConstSFUPointRef point // 中心 );
[ public, const ] SFUPoint Origin(Void);
自分自身を返します。
[ public ] ConstSFUCircleRef Radius( SInt16 r // 設定する半径 );
[ public, const ] SInt16 Radius(Void);
[ public ] ConstSFUCircleRef Set( SInt16 x // 中心の X 座標 SInt16 y // 中心の Y 座標 SInt16 r // 半径 );
[ public ] ConstSFUCircleRef Set( ConstSFUPointRef point // 中心 SInt16 r // 半径 );
[ public, friend ] Bool operator==( ConstSFUCircleRef circle1 ConstSFUCircleRef circle2 );
[ public, friend ] Bool operator!=( ConstSFUCircleRef circle1 ConstSFUCircleRef circle2 );
[ public, friend ] SFUCircle operator-( ConstSFUCircleRef circle // 移動する円 ConstSFUPointRef point // 移動する方向 );
[ public ] ConstSFUCircleRef operator-=( ConstSFUPointRef point // 移動する方向 );
[ public, friend ] SFUCircle operator+( ConstSFUCircleRef cirlce // 移動する円 ConstSFUPointRef point // 移動する方向 );
[ public ] ConstSFUCircleRef operator+=( ConstSFUPointRef point // 移動する方向 );
[ public ] SInt16 cx;
[ public ] SInt16 cy;
[ public ] SInt16 r;
| Copyright(C) 2003-2004 Sophia Cradle Inc., All Rights Reserved. |
![]() ![]() ![]()
|