前のページ次のページ上に戻るホーム SophiaFramework 2.2
SFUPoint
点または方向を表すクラスです。
#include <SFUPoint.hpp>
class SFUPoint : public AEEPoint;
typedef SFUPoint&          SFUPointRef;
typedef SFUPoint*          SFUPointPtr;
typedef SFUPoint**         SFUPointHandle;
typedef const SFUPoint     ConstSFUPoint;
typedef const SFUPoint&    ConstSFUPointRef;
typedef const SFUPoint*    ConstSFUPointPtr;
typedef const SFUPoint**   ConstSFUPointHandle;

解説

SFUPoint は点または方向を表すクラスです。 点を表す場合は X 座標と Y 座標を指定します。 方向を表す場合は X 方向と Y 方向を指定します。

参照

SFUSize

メンバ

コンストラクタ/デストラクタ
public
SFUPoint SFUPoint クラスのコンストラクタです。
public
~SFUPoint SFUPoint クラスのデストラクタです。
パブリック変数
public
x 点の X 座標です。
public
y 点の Y 座標です。
パブリック関数
public
Equal 2 つの点が等しいか判定します。
public
Inside 座標点が四角形の内側にあるかどうかを判定します。
public
Offset 点を移動します。
public
Set 点の X 座標と Y 座標を設定します。
public
operator+ 点を移動します。
public
operator- 点を逆移動します。
public
operator== 2 つの点が等しいか判定します。

SFUPoint::SFUPoint
SFUPoint クラスのコンストラクタです。
[ public ]
SFUPoint(Void);
[ public ]
SFUPoint(
    ConstAEEPointRef point   // コピー元の点
);
[ public ]
SFUPoint(
    SInt16 x   // X 座標
    SInt16 y   // Y 座標
);

参照

SFUPoint::Set


SFUPoint::~SFUPoint
SFUPoint クラスのデストラクタです。
[ public ]
~SFUPoint(Void);

SFUPoint::Equal
2 つの点が等しいか判定します。
[ public, const ]
Bool Equal(
    ConstSFUPointRef point   // 比較対象となる点
);

戻り値

2 つの点の X 座標と Y 座標がともに等しければ TRUE を返します。 そうでなければ FALSE を返します。

参照

SFUPoint::operator==


SFUPoint::Inside
座標点が四角形の内側にあるかどうかを判定します。
[ public, const ]
Bool Inside(
    ConstSFURectRef rect   // 比較対照の四角形
);

戻り値

四角形の内部にあれば TRUE を返し、そうでなければ FALSE を返します。


SFUPoint::Offset
点を移動します。
[ public ]
ConstSFUPointRef Offset(
    SInt16 dx   // X 方向の移動量
    SInt16 dy   // Y 方向の移動量
);
[ public ]
ConstSFUPointRef Offset(
    ConstSFUPointRef vector   // 移動する方向
);

戻り値

自分自身を返します。

参照

SFUPoint::operator- | SFUPoint::operator+


SFUPoint::Set
点の X 座標と Y 座標を設定します。
[ public ]
ConstSFUPointRef Set(
    SInt16 x   // X 座標
    SInt16 y   // Y 座標
);

戻り値

自分自身を返します。

参照

SFUPoint::SFUPoint


SFUPoint::operator==
2 つの点が等しいか判定します。
[ public, friend ]
Bool operator==(
    ConstSFUPointRef point1   
    ConstSFUPointRef point2   
);
[ public, friend ]
Bool operator!=(
    ConstSFUPointRef point1   
    ConstSFUPointRef point2   
);

戻り値

2 つの点の X 座標と Y 座標がともに等しければ TRUE を返します。 そうでなければ FALSE を返します。

参照

SFUPoint::Equal


SFUPoint::operator-
点を逆移動します。
[ public, friend ]
SFUPoint operator-(
    ConstSFUPointRef point    // 逆移動する点
    ConstSFUPointRef vector   // 逆移動する方向
);
[ public, friend ]
SFUPoint operator-(
    ConstSFUPointRef vector   // 逆移動する方向
);
[ public ]
ConstSFUPointRef operator-=(
    ConstSFUPointRef vector   // 逆移動する方向
);

参照

SFUPoint::Offset | SFUPoint::operator+


SFUPoint::operator+
点を移動します。
[ public, friend ]
SFUPoint operator+(
    ConstSFUPointRef point    // 移動する点
    ConstSFUPointRef vector   // 移動する方向
);
[ public, friend ]
SFUPoint operator+(
    ConstSFUPointRef vector   // 移動する方向
);
[ public ]
ConstSFUPointRef operator+=(
    ConstSFUPointRef vector   // 移動する方向
);

参照

SFUPoint::Offset | SFUPoint::operator-


SFUPoint::x
点の X 座標です。
[ public ]
SInt16 x;

SFUPoint::y
点の Y 座標です。
[ public ]
SInt16 y;