Ngon Class Reference Library » Ngon

#include <lib_ngon.h>

公共成员函数

  Ngon ()
  ~Ngon ()
  Ngon (const CPolygon &ply)
  Ngon (const Ngon &src)
Ngon operator= (const Ngon &src)
Bool   Alloc ( Int32 cnt, Int32 scnt)
void  Free ()
Bool   CopyFrom (const Ngon *src)
Bool   CopyFrom ( Int32 cnt, Int32 scnt, Int32 *pts, Int32 *segs)
void  发行 ()
Float   CalcArea ( Int32 seg, const 向量 *p, 矩阵 &m)

Public Attributes

Int32 points
Int32 segments
Int32   count
Int32   segcount

构造函数 & 析构函数文档编制

◆  Ngon() [1/3]

Ngon ( )

Constructor.

◆  ~Ngon()

~ Ngon ( )

Destructor.

◆  Ngon() [2/3]

Ngon ( const CPolygon ply )
explicit

Constructor from polygon in ply .

参数
[in] ply A polygon.

◆  Ngon() [3/3]

Ngon ( const Ngon src )

Copy constructor from another N-gon in src .

参数
[in] src Another N-gon.

成员函数文档编制

◆  operator=()

Ngon & operator= ( const Ngon src )

Assignment operator.

参数
[in] src Another N-gon.
返回
The assigned N-gon.

◆  Alloc()

Bool Alloc ( Int32   cnt ,
Int32   scnt  
)

Allocates data for cnt points and scnt segments.

参数
[in] cnt The point count.
[in] scnt The segment count.
返回
true if successful, otherwise false .

◆  Free()

void Free ( )

Frees the internal data.

◆  CopyFrom() [1/2]

Bool CopyFrom ( const Ngon src )

Copies data from src .

参数
[in] src The source N-gon.
返回
true if successful, otherwise false .

◆  CopyFrom() [2/2]

Bool CopyFrom ( Int32   cnt ,
Int32   scnt ,
Int32 pts ,
Int32 segs  
)

Copies data from the passed arrays.

参数
[in] cnt The point count.
[in] scnt The segment count.
[in] pts The points array. The caller owns the pointed array.
[in] segs The segments array. The caller owns the pointed array.
返回
true if successful, otherwise false .

◆  Release()

void Release ( )

Releases the internal arrays, i.e. so that they are not freed by the destructor.

◆  CalcArea()

Float CalcArea ( Int32   seg ,
const 向量 p ,
矩阵 m  
)

Calculates the N-gon area.

参数
[in] seg The segment.
[in] p The points array.
[in] m The projection matrix.
返回
The calculated area.

Member Data Documentation

◆  points

Int32 * points

Point array.

◆  segments

Int32 * segments

Segments array.

◆  count

Int32 count

Point count.

◆  segcount

Int32 segcount

Segment count.