クラス rcsc::Triangle2D

2D triangle class [詳細]

#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 Triangle2Dassign (const Vector2D &v1, const Vector2D &v2, const Vector2D &v3)
 assign new vertex points
const Triangle2Dassign (const Segment2D &seg, const Vector2D &v)
 assign new segment and vertex point
const Vector2Da () const
 get 1st point
const Vector2Db () const
 get 2nd point
const Vector2Dc () 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)


説明

2D triangle class


コンストラクタとデストラクタ

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

rcsc::Triangle2D::Triangle2D ( const Segment2D seg,
const Vector2D v 
) [inline]

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 reference to itself

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 reference to itself

const Vector2D& rcsc::Triangle2D::a (  )  const [inline]

get 1st point

戻り値:
const reference to the member variable

const Vector2D& rcsc::Triangle2D::b (  )  const [inline]

get 2nd point

戻り値:
const reference to the member variable

const Vector2D& rcsc::Triangle2D::c (  )  const [inline]

get 3rd point

戻り値:
const reference to the member variable

double rcsc::Triangle2D::area (  )  const [inline]

get the area of this region

戻り値:
value of the area

double rcsc::Triangle2D::signedArea (  )  const [inline]

get area with sign

戻り値:
value of area with sign. If points a, b, c are placed counterclockwise order, returns positive number. If points a, b, c are placed clockwise order, returns negative number. If points a, b, c are placed on a line, returns 0.

double rcsc::Triangle2D::signedArea2 (  )  const [inline]

get twice of signed area

戻り値:
twice of signed area If points a, b, c are placed counterclockwise order, returns positive number. If points a, b, c are placed clockwise order, returns negative number. If points a, b, c are placed on a line, returns 0.

bool rcsc::Triangle2D::contains ( const Vector2D point  )  const

check if this triangle contains 'point'.

引数:
point considerd point
戻り値:
true or false

Vector2D rcsc::Triangle2D::getCentroid (  )  const [inline]

get the center of gravity(centroid, JUU-SIN)

戻り値:
coordinates of gravity center

Vector2D rcsc::Triangle2D::getIncenter (  )  const [inline]

get the center of inscribed circle(NAI-SIN)

戻り値:
coordinates of inner center

Vector2D rcsc::Triangle2D::getCircumcenter (  )  const [inline]

get the center of circumscribed circle(GAI-SIN)

戻り値:
coordinates of outer center

Vector2D rcsc::Triangle2D::getOrthocenter (  )  const [inline]

get the orthocenter(SUI-SIN)

戻り値:
coordinates of ortho center

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
戻り値:
coordinates of gravity center
centroid = (a + b + c) / 3

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
戻り値:
coordinates of incenter

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
戻り値:
coordinates of circumcenter

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
戻り値:
coordinates of orthocenter
orthocenter = a + b + c - 2 * circumcenter


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0