![]() ![]() ![]()
|
BREW C++ ライブラリ & GUI フレームワーク & XML ミドルウェア : SophiaFramework 4.1 |
SFXPolygon クラスは、頂点の座標を配列として処理します。
SFXPolygon クラスは、内部でヒープの割り当てを行いません。 頂点の座標を保持する配列を作成する必要があります。
SFXPolygon クラスにスコープがある間は、作成した配列が破壊しないようにする必要があります。
| コンストラクタ/デストラクタ |
|---|
|
SFXPolygon( Void ) SFXPolygon( SFXPolygonConstRef param ) SFXPolygon( SFXPixelPtr vertex , SInt16 length ) SFXPolygon( SFXPolylineConstRef polyline ) SFXPolygon クラスのコンストラクタです。
|
| 型 |
|---|
|
AtomRec
多角形を表す構造体です。
|
| グローバル関数 | |
|---|---|
| SFXPolygon::AtomRec * |
atomic_cast(
SFXPolygon * param
) SFXPolygon を SFXPolygon::AtomRec に変換します。
|
| AtomRec const * |
atomic_cast(
SFXPolygon::SFXPolygon const * param
) SFXPolygon を SFXPolygon::AtomRec に変換します。
|
| AEEPolygon * |
interface_cast(
SFXPolygon * param
) SFXPolygon を AEEPolygon に変換します。
|
| AEEPolygon const * |
interface_cast(
SFXPolygon const * param
) SFXPolygon を AEEPolygon に変換します。
|
| Bool |
operator==(
SFXPolygonConstRef left
, SFXPolygonConstRef right
) == の関係を判定します。
|
| SFXPolygon |
operator-(
SFXPolygonConstRef left
, SFXGridConstRef right
) 全ての頂点の座標を減算し、多角形を移動します。
|
| Bool |
operator!=(
SFXPolygonConstRef left
, SFXPolygonConstRef right
) != の関係を判定します。
|
| SFXPolygon |
operator+(
SFXPolygonConstRef left
, SFXGridConstRef right
) 全ての頂点を加算し、多角形を移動します。
|
[ public, explicit ] SFXPolygon(Void);
[ public ]
SFXPolygon(
SFXPolygonConstRef param // 元になる多角形
);
[ public, explicit ]
SFXPolygon(
SFXPixelPtr vertex // 頂点の座標の列
SInt16 length // 頂点の数
);
[ public, explicit ]
SFXPolygon(
SFXPolylineConstRef polyline // 元になる折れ線
);
[ public ] SFXPolygonRef AddVertex( SInt16 index // 加算対象の頂点のインデックス SFXPixelConstRef value // 頂点の座標に加える値 );
[ public ] SFXPolygonRef AddVertex( SInt16 index // 加算対象の頂点のインデックス SInt16 x // 頂点の X 座標に加える値 SInt16 y // 頂点の Y 座標に加える値 );
SFXPolygon::AddVertexX | SFXPolygon::AddVertexY | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertex
[ public ] SFXPolygonRef AddVertexX( SInt16 index // 加算対象の頂点のインデックス SInt16 value // 頂点の座標に加える値 );
SFXPolygon::AddVertex | SFXPolygon::AddVertexY | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX
[ public ] SFXPolygonRef AddVertexY( SInt16 index // 加算対象の頂点のインデックス SInt16 value // 頂点の座標に加える値 );
SFXPolygon::AddVertex | SFXPolygon::AddVertexX | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY
[ public ] SFXPolygonRef DivVertex( SInt16 index // 除算対象の頂点のインデックス SInt16 x // 頂点の X 座標を除算する値 SInt16 y // 頂点の Y 座標を除算する値 );
[ public ] SFXPolygonRef DivVertex( SInt16 index // 除算対象の頂点のインデックス SInt16 value // 頂点の座標を除算する値 );
value、x、y の値が 0 の場合の動作は未定義です。
SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertexX | SFXPolygon::DivVertexY | SFXPolygon::ModVertex | SFXPolygon::NegVertex
[ public ] SFXPolygonRef DivVertexX( SInt16 index // 除算対象の頂点のインデックス SInt16 value // 頂点の X 座標を除算する値 );
value の値が 0 の場合の動作は未定義です。
SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertex | SFXPolygon::DivVertexY | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX
[ public ] SFXPolygonRef DivVertexY( SInt16 index // 除算対象の頂点のインデックス SInt16 value // 頂点の Y 座標を除算する値 );
value の値が 0 の場合の動作は未定義です。
SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertex | SFXPolygon::DivVertexX | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY
[ public, static ] SFXPolygonConstRef EmptyInstance(Void);
面積がゼロである多角形を表すインスタンスを返します。
図形で長さを表す変数が、0 以下のときその図形の面積はゼロになります。主に、代入文での図形の初期値や、関数での図形の戻り値として利用します。
[ public, const ] Bool Equals( SFXPolygonConstRef param // 比較対象の多角形 );
[ public, const ] Bool Equals( SFXPixelConstPtr vertex // 比較対象の頂点の列 SInt16 length // 比較対象の頂点の数 );
[ public, const ] SInt16 GetLength(Void);
[ public, const ] SFXPixelPtr GetVertex(Void);
[ public, const ] SFXPixelConstRef GetVertex( SInt16 index // 取得する頂点のインデックス );
[ public, const ] Bool IsEmpty(Void);
[ public ] SFXPolygonRef ModVertex( SInt16 index // 剰余を求める頂点のインデックス SInt16 x // 頂点の X 座標を除算する値 SInt16 y // 頂点の Y 座標を除算する値 );
[ public ] SFXPolygonRef ModVertex( SInt16 index // 剰余を求める頂点のインデックス SInt16 value // 頂点の座標を除算する値 );
value、x、y の値が 0 の場合の動作は未定義です。
SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertexX | SFXPolygon::ModVertexY | SFXPolygon::NegVertex
[ public ] SFXPolygonRef ModVertexX( SInt16 index // 剰余を求める対象の頂点のインデックス SInt16 value // 頂点の座標を除算する値 );
value の値が 0 の場合の動作は未定義です。
SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertex | SFXPolygon::ModVertexY | SFXPolygon::NegVertexX
[ public ] SFXPolygonRef ModVertexY( SInt16 index // 剰余を求める対象の頂点のインデックス SInt16 value // 頂点の座標を除算する値 );
value の値が 0 の場合の動作は未定義です。
SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertex | SFXPolygon::ModVertexX | SFXPolygon::NegVertexY
[ public ] SFXPolygonRef MulVertex( SInt16 index // 乗算対象の頂点のインデックス SInt16 x // 頂点の X 座標に乗算する値 SInt16 y // 頂点の Y 座標に乗算する値 );
[ public ] SFXPolygonRef MulVertex( SInt16 index // 乗算対象の頂点のインデックス SInt16 value // 頂点の座標に乗算する値 );
SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertexX | SFXPolygon::MulVertexY | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertex
[ public ] SFXPolygonRef MulVertexX( SInt16 index // 乗算対象の頂点のインデックス SInt16 value // 頂点の座標に乗算する値 );
SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertex | SFXPolygon::MulVertexY | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX
[ public ] SFXPolygonRef MulVertexY( SInt16 index // 乗算対象の頂点のインデックス SInt16 value // 頂点の Y 座標に乗算する値 );
SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertex | SFXPolygon::MulVertexX | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY
[ public ] SFXPolygonRef NegVertex( SInt16 index // 対象となる頂点のインデックス );
SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertexX | SFXPolygon::NegVertexY
[ public ] SFXPolygonRef NegVertexX( SInt16 index // 対象となる頂点のインデックス );
SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertex | SFXPolygon::NegVertexY
[ public ] SFXPolygonRef NegVertexY( SInt16 index // 対象となる頂点のインデックス );
SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertex | SFXPolygon::NegVertexX
[ public ] SFXPolygonRef Normalize(Void);
何も行いません。
[ public ] SFXPolygonRef Offset( SFXGridConstRef param // 全ての頂点の座標に加える値 );
[ public ] SFXPolygonRef Offset( SInt16 x // 全ての頂点の X 座標に加える値 SInt16 y // 全ての頂点の Y 座標に加える値 );
[ public ] SFXPolygonRef Set( SFXPolygonConstRef param // コピー元の多角形 );
[ public ] SFXPolygonRef Set( SFXPixelPtr vertex // 頂点の座標の列 SInt16 length // 頂点の数 );
[ public ] SFXPolygonRef Set( SFXPolylineConstRef polyline // 元になる折れ線 );
[ public ] SFXPolygonRef SetLength( SInt16 param // 設定する値 );
[ public ] SFXPolygonRef SetVertex( SFXPixelPtr param // 設定する座標の列 );
[ public ] SFXPolygonRef SetVertex( SInt16 index // 設定対象の頂点のインデックス SFXPixelConstRef value // 設定する座標 );
[ public ] SFXPolygonRef SetVertex( SInt16 index // 設定対象の頂点のインデックス SInt16 x // 設定する X 座標 SInt16 y // 設定する Y 座標 );
[ public ] SFXPolygonRef SetVertexX( SInt16 index // 設定対象の頂点のインデックス SInt16 value // 設定する値 );
[ public ] SFXPolygonRef SetVertexY( SInt16 index // 設定対象の頂点のインデックス SInt16 value // 設定する値 );
[ public ] SFXPolygonRef SubVertex( SInt16 index // 減算対象の頂点のインデックス SFXPixelConstRef value // 頂点の座標から減算する値 );
[ public ] SFXPolygonRef SubVertex( SInt16 index // 減算対象の頂点のインデックス SInt16 x // 頂点の X 座標から減算する値 SInt16 y // 頂点の Y 座標から減算する値 );
SFXPolygon::AddVertex | SFXPolygon::SubVertexX | SFXPolygon::SubVertexY | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertex
[ public ] SFXPolygonRef SubVertexX( SInt16 index // 減算対象の頂点のインデックス SInt16 value // 頂点の X 座標から減算する値 );
SFXPolygon::AddVertexX | SFXPolygon::SubVertex | SFXPolygon::SubVertexY | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX
[ public ] SFXPolygonRef SubVertexY( SInt16 index // 減算対象の頂点のインデックス SInt16 value // 頂点の Y 座標から減算する値 );
SFXPolygon::AddVertexY | SFXPolygon::SubVertex | SFXPolygon::SubVertexX | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY
[ public ] SFXPolygonRef Unoffset( SFXGridConstRef param // 全ての頂点の座標から減算する値 );
[ public ] SFXPolygonRef Unoffset( SInt16 x // 全ての頂点の X 座標から減算する値 SInt16 y // 全ての頂点の Y 座標から減算する値 );
[ public, static ] SFXPolygonConstRef ZeroInstance(Void);
多角形を表す変数の値が 0 であるインスタンスを返します。
![]() |
0 を表すインスタンスとは |
|---|---|
0 を表すインスタンスとは、対応する AtomRec 構造体のすべてのメンバ変数が 0 または null に設定されたインスタンスのことです。 | |
SFXPixel vertex[] = {
SFXPixel(40, 40),
SFXPixel(40, 60),
SFXPixel(50, 30),
SFXPixel(60, 20),
SFXPixel(30, 30)
};
SFXPolygon polygon;
// 多角形を設定する
polygon.Set(vertex, lengthof(vertex));
// 頂点の数を取得する
TRACE("Length = %d", polygon.GetLength()); // Length = 5
// polygon を初期化する
polygon = SFXPolygon::ZeroInstance();
// 頂点の数を取得する
TRACE("Length = %d", polygon.GetLength()); // Length = 0
[ public, friend ]
SFXPolygon::AtomRec * atomic_cast(
SFXPolygon * param // キャストする多角形
);
[ public, friend ]
AtomRec const * atomic_cast(
SFXPolygon::SFXPolygon const * param // キャストする多角形
);
[ public, friend ] AEEPolygon * interface_cast( SFXPolygon * param // キャストする多角形 );
[ public, friend ] AEEPolygon const * interface_cast( SFXPolygon const * param // キャストする多角形 );
[ public ] SFXPolygonRef operator=( SFXPolygonConstRef param // コピー元の多角形 );
[ public, friend ] Bool operator==( SFXPolygonConstRef left // 比較する多角形 SFXPolygonConstRef right // 比較する多角形 );
[ public, const ] SFXPixelRef operator[]( SInt16 index // 取得する頂点の位置 );
[ public ] SFXPolygonRef operator-=( SFXGridConstRef param // 全ての頂点から減算する値 );
[ public, friend ] SFXPolygon operator-( SFXPolygonConstRef left // 移動対象の多角形 SFXGridConstRef right // 全ての頂点の座標から減算する値 );
[ public, friend ] Bool operator!=( SFXPolygonConstRef left // 比較する多角形 SFXPolygonConstRef right // 比較する多角形 );
[ public ] SFXPolygonRef operator+=( SFXGridConstRef param // 全ての頂点の座標に加算する値 );
[ public, friend ] SFXPolygon operator+( SFXPolygonConstRef left // 移動対象の多角形 SFXGridConstRef right // 全ての頂点の座標に加算する値 );
struct AtomRec {
SInt16 length; // 頂点の数
SFXPixel::AtomRecPtr vertex; // 頂点の座標の列
};
|
Copyright (C) 2002 - 2009 Sophia Cradle, Inc. All Rights Reserved. |
![]() ![]() ![]()
|