-
首页
-
C4D R23.110 C++ SDK
Pgon Class Reference
Library
»
Ngon
#include <lib_ngon.h>
成员函数文档编制
◆
CalcNormal()
向量
CalcNormal
|
(
|
const
向量
*
|
padr
,
|
|
|
const
CPolygon
*
|
polys
|
|
)
|
|
const
|
Calculates the normal for the N-gon.
-
参数
-
[in]
|
padr
|
The point array. The caller owns the pointed array.
|
[in]
|
polys
|
The polygons array. The caller owns the pointed array.
|
-
返回
-
The calculated normal.
◆
GetMpRad()
void GetMpRad
|
(
|
const
向量
*
|
padr
,
|
|
|
const
CPolygon
*
|
polys
,
|
|
|
向量
&
|
mp
,
|
|
|
向量
&
|
rad
|
|
)
|
|
const
|
Get the bounds of the N-gon.
-
参数
-
[in]
|
padr
|
The point array. The caller owns the pointed array.
|
[in]
|
polys
|
The polygons array. The caller owns the pointed array.
|
[out]
|
mp
|
Assigned the calculated mid-point.
|
[out]
|
rad
|
Assigned the calculated bounding box vector.
|
◆
GetCount()
Retrieves the number of elements in the array (all
PgonEdge
edges in all segments).
-
注意
-
This is not the same as all N-gon edges since some elements may be from internal polygons with no outer/inner N-gon edge.
-
返回
-
The number of elements in the array.
◆
GetEdge()
[1/2]
Gets access directly to a
PgonEdge
. Normally the helper functions below should be used.
-
参数
-
-
返回
-
The edge.
◆
ID()
Retrieves the
PgonEdge::ID()
of the edge at index
i
.
-
参数
-
-
返回
-
The edge polygon ID.
◆
State()
Retrieves the
PgonEdge::State()
of the edge at index
i
.
-
参数
-
-
返回
-
The edge state.
◆
Edge()
Retrieves the
PgonEdge::Edge()
of the edge at index
i
.
-
参数
-
-
返回
-
The edge.
◆
EdgeIndex()
Retrieves the
PgonEdge::EdgeIndex()
of the edge at index
i
.
-
参数
-
-
返回
-
The edge index.
◆
IsFirst()
Retrieves the
PgonEdge::IsFirst()
state of the edge at index
i
.
-
参数
-
-
返回
-
The edge first state.
◆
IsSegmentEnd()
Retrieves the
PgonEdge::IsSegmentEnd()
state of the edge at index
i
.
-
参数
-
-
返回
-
The edge segment end state.
◆
GetIdentity()
Int32
GetIdentity
|
(
|
|
)
|
const
|
Retrieves the first polygon ID in the array, useful as a marker (identity) for the N-gon giving a polygon ID that is within the N-gon.
-
返回
-
The first polygon ID.
◆
GetSegmentCount()
Int32
GetSegmentCount
|
(
|
|
)
|
const
|
Retrieves the number of segments in the N-gon.
-
返回
-
The segment count.
◆
GetSegmentLen()
Retrieves the number of elements in the segment starting from the index
startedge
. This includes any
PgonEdge
edges that are internal (NOEDGE).
-
参数
-
[in]
|
startedge
|
An edge index.
|
-
返回
-
The number of elements in the segment starting from
startedge
.
◆
GetEdge()
[2/2]
Maps to the function
PgonEdge::GetEdge()
of the edge at index
i
.
-
参数
-
[in]
|
i
|
An edge index.
|
[in]
|
vadr
|
The polygon array. The caller owns the pointed array.
|
[out]
|
p1
|
Assigned the first point index.
|
[out]
|
p2
|
Assigned the second point index.
|
◆
FindPolygon()
Does a search to see if the polygon index
id
exists within the N-gon; the look up uses tables so it is pretty fast.
-
参数
-
[in]
|
id
|
A polygon ID to search for.
|
-
返回
-
The index of the first edge found with the specified polygon
id
,或
NOTOK
if no edge was found.
◆
GetEdgeState()
Retrieves the edges (bits) for polygon
id
that form any edge/s around the N-gon.
-
参数
-
[in]
|
id
|
Combined edge bits for all edges with polygon ID matching
id
:
PGONEDGE
|
-
返回
-
A polygon ID.
◆
GetPointCount()
Int32
GetPointCount
|
(
|
|
)
|
const
|
Retrieves the number of points that form the N-gon.
-
返回
-
The point count.
◆
GetPolygonCount()
Int32
GetPolygonCount
|
(
|
|
)
|
const
|
Retrieves the number of polygons that form the N-gon.
-
返回
-
The polygon count.
◆
UpdateStates()
If any changes are done to the PgonEdges this must be called when completed to update the REPEAT markers of the PgonEdges.
Also note that any changes must correct set/change any of the marker bits (such as the segment end, or no edges markers).
Member Data Documentation
◆
m_Edge
◆
m_Count
◆
m_CRC