矩形
[詳解]
#include <mgl_rectangle.h>
|
|
constexpr | Rectangle () noexcept |
| | ゼロ初期化
|
| |
| constexpr | Rectangle (float inX, float inY, float inWidth, float inHeight) noexcept |
| | 指定したパラメータで初期化
|
| |
| constexpr | Rectangle (const Vector2 &position, const Vector2 &size) noexcept |
| | 位置とサイズで初期化
|
| |
| constexpr void | SetPosition (const Vector2 &position) noexcept |
| | 位置を設定
|
| |
| constexpr void | SetPosition (float inX, float inY) noexcept |
| | 位置を設定
|
| |
| constexpr void | SetSize (const Vector2 &size) noexcept |
| | サイズを設定
|
| |
| constexpr void | SetSize (float inWidth, float inHeight) noexcept |
| | サイズを設定
|
| |
| constexpr Vector2 | GetPosition () const noexcept |
| | 位置を取得
|
| |
| constexpr Vector2 | GetSize () const noexcept |
| | サイズを取得
|
| |
| constexpr bool | IsEnclosed (const Vector2 &point) const noexcept |
| | 指定した位置が矩形の内側にあるかを取得
|
| |
|
|
float | x |
| | X座標
|
| |
|
float | y |
| | Y座標
|
| |
|
float | width |
| | 幅
|
| |
|
float | height |
| | 高さ
|
| |
◆ Rectangle() [1/2]
| MGL::Rectangle::Rectangle |
( |
float | inX, |
|
|
float | inY, |
|
|
float | inWidth, |
|
|
float | inHeight ) |
|
inlineconstexprnoexcept |
指定したパラメータで初期化
- 引数
-
| [in] | inX | 位置のX座標 |
| [in] | inY | 位置のY座標 |
| [in] | inWidth | サイズの幅 |
| [in] | inHeight | サイズの高さ |
◆ Rectangle() [2/2]
| MGL::Rectangle::Rectangle |
( |
const Vector2 & | position, |
|
|
const Vector2 & | size ) |
|
inlineconstexprnoexcept |
位置とサイズで初期化
- 引数
-
| [in] | position | 位置 |
| [in] | size | サイズ |
◆ GetPosition()
| Vector2 MGL::Rectangle::GetPosition |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
◆ GetSize()
| Vector2 MGL::Rectangle::GetSize |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
◆ IsEnclosed()
| bool MGL::Rectangle::IsEnclosed |
( |
const Vector2 & | point | ) |
const |
|
inlinenodiscardconstexprnoexcept |
指定した位置が矩形の内側にあるかを取得
- 引数
-
- 戻り値
-
| true | 位置が矩形の内側にある |
| false | 位置は矩形の外側にある |
◆ SetPosition() [1/2]
| void MGL::Rectangle::SetPosition |
( |
const Vector2 & | position | ) |
|
|
inlineconstexprnoexcept |
◆ SetPosition() [2/2]
| void MGL::Rectangle::SetPosition |
( |
float | inX, |
|
|
float | inY ) |
|
inlineconstexprnoexcept |
◆ SetSize() [1/2]
| void MGL::Rectangle::SetSize |
( |
const Vector2 & | size | ) |
|
|
inlineconstexprnoexcept |
◆ SetSize() [2/2]
| void MGL::Rectangle::SetSize |
( |
float | inWidth, |
|
|
float | inHeight ) |
|
inlineconstexprnoexcept |
サイズを設定
- 引数
-
| [in] | inWidth | 幅 |
| [in] | inHeight | 高さ |
この構造体詳解は次のファイルから抽出されました: