#include <triangle_2d.h>
Public メソッド | |
Triangle2D (const Vector2D &v1, const Vector2D &v2, const Vector2D &v3) | |
constructor with variables | |
Triangle2D (const Segment2D &seg, const Vector2D &v) | |
constructor with a segment and a point | |
const Triangle2D & | assign (const Vector2D &v1, const Vector2D &v2, const Vector2D &v3) |
assign new vertex points | |
const Triangle2D & | assign (const Segment2D &seg, const Vector2D &v) |
assign new segment and vertex point | |
const Vector2D & | a () const |
get 1st point | |
const Vector2D & | b () const |
get 2nd point | |
const Vector2D & | c () const |
get 3rd point | |
double | area () const |
get the area of this region | |
double | signedArea () const |
get area with sign | |
double | signedArea2 () const |
get twice of signed area | |
bool | contains (const Vector2D &point) const |
check if this triangle contains 'point'. | |
Vector2D | getCentroid () const |
get the center of gravity(centroid, JUU-SIN) | |
Vector2D | getIncenter () const |
get the center of inscribed circle(NAI-SIN) | |
Vector2D | getCircumcenter () const |
get the center of circumscribed circle(GAI-SIN) | |
Vector2D | getOrthocenter () const |
get the orthocenter(SUI-SIN) | |
Static Public メソッド | |
static Vector2D | centroid (const Vector2D &a, const Vector2D &b, const Vector2D &c) |
get the center of gravity(JUU-SIN) | |
static Vector2D | incenter (const Vector2D &a, const Vector2D &b, const Vector2D &c) |
get the incenter point(NAI-SIN) | |
static Vector2D | circumcenter (const Vector2D &a, const Vector2D &b, const Vector2D &c) |
get the circumcenter point(GAI-SIN) | |
static Vector2D | orthocenter (const Vector2D &a, const Vector2D &b, const Vector2D &c) |
get the orthomcenter point(SUI-SIN) |
rcsc::Triangle2D::Triangle2D | ( | const Vector2D & | v1, | |
const Vector2D & | v2, | |||
const Vector2D & | v3 | |||
) | [inline] |
constructor with variables
v1 | first vertex point | |
v2 | second vertex point | |
v3 | third vertex point |
constructor with a segment and a point
seg | segment consist of triangle, first and second vertex points | |
v | third vertex point |
const Triangle2D& rcsc::Triangle2D::assign | ( | const Vector2D & | v1, | |
const Vector2D & | v2, | |||
const Vector2D & | v3 | |||
) | [inline] |
assign new vertex points
v1 | first vertex point | |
v2 | second vertex point | |
v3 | third vertex point |
const Triangle2D& rcsc::Triangle2D::assign | ( | const Segment2D & | seg, | |
const Vector2D & | v | |||
) | [inline] |
assign new segment and vertex point
seg | segment consist of triangle, first and second vertex points | |
v | third vertex point |
const Vector2D& rcsc::Triangle2D::a | ( | ) | const [inline] |
get 1st point
const Vector2D& rcsc::Triangle2D::b | ( | ) | const [inline] |
get 2nd point
const Vector2D& rcsc::Triangle2D::c | ( | ) | const [inline] |
get 3rd point
double rcsc::Triangle2D::area | ( | ) | const [inline] |
get the area of this region
double rcsc::Triangle2D::signedArea | ( | ) | const [inline] |
get area with sign
double rcsc::Triangle2D::signedArea2 | ( | ) | const [inline] |
get twice of signed area
bool rcsc::Triangle2D::contains | ( | const Vector2D & | point | ) | const |
check if this triangle contains 'point'.
point | considerd point |
Vector2D rcsc::Triangle2D::getCentroid | ( | ) | const [inline] |
get the center of gravity(centroid, JUU-SIN)
Vector2D rcsc::Triangle2D::getIncenter | ( | ) | const [inline] |
get the center of inscribed circle(NAI-SIN)
Vector2D rcsc::Triangle2D::getCircumcenter | ( | ) | const [inline] |
get the center of circumscribed circle(GAI-SIN)
Vector2D rcsc::Triangle2D::getOrthocenter | ( | ) | const [inline] |
get the orthocenter(SUI-SIN)
static Vector2D rcsc::Triangle2D::centroid | ( | const Vector2D & | a, | |
const Vector2D & | b, | |||
const Vector2D & | c | |||
) | [inline, static] |
get the center of gravity(JUU-SIN)
a | triangle's 1st vertex | |
b | triangle's 2nd vertex | |
c | triangle's 3rd vertex |
Vector2D rcsc::Triangle2D::incenter | ( | const Vector2D & | a, | |
const Vector2D & | b, | |||
const Vector2D & | c | |||
) | [static] |
get the incenter point(NAI-SIN)
a | triangle's 1st vertex | |
b | triangle's 2nd vertex | |
c | triangle's 3rd vertex |
Vector2D rcsc::Triangle2D::circumcenter | ( | const Vector2D & | a, | |
const Vector2D & | b, | |||
const Vector2D & | c | |||
) | [static] |
get the circumcenter point(GAI-SIN)
a | triangle's 1st vertex | |
b | triangle's 2nd vertex | |
c | triangle's 3rd vertex |
Vector2D rcsc::Triangle2D::orthocenter | ( | const Vector2D & | a, | |
const Vector2D & | b, | |||
const Vector2D & | c | |||
) | [static] |
get the orthomcenter point(SUI-SIN)
a | triangle's 1st vertex | |
b | triangle's 2nd vertex | |
c | triangle's 3rd vertex |