2次元の線分を表す構造体.
[詳解]
#include <math_line_segment2.h>
2次元の線分を表す構造体.
math_line_segment2.h の 20 行目に定義があります。
◆ LineSegment2() [1/5]
designlab::LineSegment2::LineSegment2 |
( |
| ) |
|
|
default |
◆ LineSegment2() [2/5]
constexpr designlab::LineSegment2::LineSegment2 |
( |
const Vector2 & |
start, |
|
|
const Vector2 & |
end |
|
) |
| |
|
inlineconstexpr |
◆ LineSegment2() [3/5]
constexpr designlab::LineSegment2::LineSegment2 |
( |
float |
start_x, |
|
|
float |
start_y, |
|
|
float |
end_x, |
|
|
float |
end_y |
|
) |
| |
|
inlineconstexpr |
◆ LineSegment2() [4/5]
constexpr designlab::LineSegment2::LineSegment2 |
( |
const LineSegment2 & |
other | ) |
|
|
constexprdefault |
◆ LineSegment2() [5/5]
constexpr designlab::LineSegment2::LineSegment2 |
( |
LineSegment2 && |
other | ) |
|
|
constexprdefaultnoexcept |
◆ CheckAndGetIntersection()
bool designlab::LineSegment2::CheckAndGetIntersection |
( |
const LineSegment2 & |
other, |
|
|
Vector2 * |
intersection |
|
) |
| const |
他の線分と交点が存在しているかどうか調べ,交点を返す関数.
- 引数
-
[in] | other | 他の線分. |
[out] | intersection | 交点. |
- 戻り値
-
true | 交点が1つだけある. |
false | 交点がない,または線分が重なっていて交点が無限にある. |
math_line_segment2.cpp の 73 行目に定義があります。
◆ GetIntersection()
他の線分との交点を求める.
- 引数
-
- 戻り値
- 交点の座標.交点がない,または平行な場合は(0, 0)を返す.
端点一致,かつ平行の場合を考慮していないので注意.
- 覚え書き
- 参考
math_line_segment2.cpp の 17 行目に定義があります。
◆ GetLength()
float designlab::LineSegment2::GetLength |
( |
| ) |
const |
|
inline |
◆ HasIntersection()
bool designlab::LineSegment2::HasIntersection |
( |
const LineSegment2 & |
other | ) |
const |
◆ IsParallel()
constexpr bool designlab::LineSegment2::IsParallel |
( |
const LineSegment2 & |
other | ) |
const |
|
inlineconstexpr |
◆ operator!=()
constexpr bool designlab::LineSegment2::operator!= |
( |
const LineSegment2 & |
other | ) |
const |
|
inlineconstexpr |
◆ operator=()
◆ operator==()
constexpr bool designlab::LineSegment2::operator== |
( |
const LineSegment2 & |
other | ) |
const |
|
inlineconstexpr |
◆ end
Vector2 designlab::LineSegment2::end |
◆ start
Vector2 designlab::LineSegment2::start |
この構造体詳解は次のファイルから抽出されました: