GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
公開メンバ関数 | 公開変数類 | 全メンバ一覧
designlab::LineSegment2 構造体final

2次元の線分を表す構造体. [詳解]

#include <math_line_segment2.h>

designlab::LineSegment2 連携図
Collaboration graph
[凡例]

公開メンバ関数

 LineSegment2 ()=default
 
constexpr LineSegment2 (const Vector2 &start, const Vector2 &end)
 
constexpr LineSegment2 (float start_x, float start_y, float end_x, float end_y)
 
constexpr LineSegment2 (const LineSegment2 &other)=default
 
constexpr LineSegment2 (LineSegment2 &&other) noexcept=default
 
constexpr LineSegment2operator= (const LineSegment2 &other)=default
 
constexpr bool operator== (const LineSegment2 &other) const
 
constexpr bool operator!= (const LineSegment2 &other) const
 
float GetLength () const
 線分の長さを求める関数.
 
constexpr bool IsParallel (const LineSegment2 &other) const
 引数の線分と自身が平行かどうか調べる関数. 全て constexpr 関数で処理できるため非常に高速.
 
Vector2 GetIntersection (const LineSegment2 &other) const
 他の線分との交点を求める.
 
bool HasIntersection (const LineSegment2 &other) const
 他の線分と交点が存在しているかどうか調べる関数.
 
bool CheckAndGetIntersection (const LineSegment2 &other, Vector2 *intersection) const
 他の線分と交点が存在しているかどうか調べ,交点を返す関数.
 

公開変数類

Vector2 start
 線分の始点.
 
Vector2 end
 線分の終点.
 

詳解

2次元の線分を表す構造体.

math_line_segment2.h20 行目に定義があります。

構築子と解体子

◆ LineSegment2() [1/5]

designlab::LineSegment2::LineSegment2 ( )
default

◆ LineSegment2() [2/5]

constexpr designlab::LineSegment2::LineSegment2 ( const Vector2 start,
const Vector2 end 
)
inlineconstexpr

math_line_segment2.h23 行目に定義があります。

◆ LineSegment2() [3/5]

constexpr designlab::LineSegment2::LineSegment2 ( float  start_x,
float  start_y,
float  end_x,
float  end_y 
)
inlineconstexpr

math_line_segment2.h25 行目に定義があります。

◆ 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.cpp73 行目に定義があります。

呼び出し関係図:

◆ GetIntersection()

Vector2 designlab::LineSegment2::GetIntersection ( const LineSegment2 other) const

他の線分との交点を求める.

引数
[in]other他の線分.
戻り値
交点の座標.交点がない,または平行な場合は(0, 0)を返す.
端点一致,かつ平行の場合を考慮していないので注意.
覚え書き
参考

math_line_segment2.cpp17 行目に定義があります。

呼び出し関係図:

◆ GetLength()

float designlab::LineSegment2::GetLength ( ) const
inline

線分の長さを求める関数.

戻り値
線分の長さ.

math_line_segment2.h44 行目に定義があります。

◆ HasIntersection()

bool designlab::LineSegment2::HasIntersection ( const LineSegment2 other) const

他の線分と交点が存在しているかどうか調べる関数.

引数
[in]other他の線分.
戻り値
true交点がある.
false交点がない.あるいは平行である時.

math_line_segment2.cpp45 行目に定義があります。

呼び出し関係図:
被呼び出し関係図:

◆ IsParallel()

constexpr bool designlab::LineSegment2::IsParallel ( const LineSegment2 other) const
inlineconstexpr

引数の線分と自身が平行かどうか調べる関数. 全て constexpr 関数で処理できるため非常に高速.

引数
[in]other他の線分.
戻り値
true平行である.
false平行でない時.

math_line_segment2.h54 行目に定義があります。

呼び出し関係図:
被呼び出し関係図:

◆ operator!=()

constexpr bool designlab::LineSegment2::operator!= ( const LineSegment2 other) const
inlineconstexpr

math_line_segment2.h36 行目に定義があります。

◆ operator=()

constexpr LineSegment2 & designlab::LineSegment2::operator= ( const LineSegment2 other)
constexprdefault

◆ operator==()

constexpr bool designlab::LineSegment2::operator== ( const LineSegment2 other) const
inlineconstexpr

math_line_segment2.h31 行目に定義があります。

メンバ詳解

◆ end

Vector2 designlab::LineSegment2::end

線分の終点.

math_line_segment2.h85 行目に定義があります。

◆ start

Vector2 designlab::LineSegment2::start

線分の始点.

math_line_segment2.h84 行目に定義があります。


この構造体詳解は次のファイルから抽出されました: