-
首页
-
C4D R23.110 C++ SDK
CPolygon Struct Reference
#include <c4d_baseobject.h>
详细描述
Represents a polygon that can be either a triangle or a quadrangle.
构造函数 & 析构函数文档编制
◆
CPolygon()
[1/3]
Constructs a polygon by default.
◆
CPolygon()
[2/3]
Constructs a triangle.
-
参数
-
[in]
|
t_a
|
Index of the first point in the polygon.
|
[in]
|
t_b
|
Index of the second point in the polygon.
|
[in]
|
t_c
|
Index of the third point in the polygon.
|
◆
CPolygon()
[3/3]
Constructs a quadrangle.
-
参数
-
[in]
|
t_a
|
Index of the first point in the polygon.
|
[in]
|
t_b
|
Index of the second point in the polygon.
|
[in]
|
t_c
|
Index of the third point in the polygon.
|
[in]
|
t_d
|
Index of the fourth point in the polygon.
|
成员函数文档编制
◆
operator[]()
Vertex index array operator.
Accesses the polygon's vertex indices through their polygon vertex numbers (
0
-
3
) instead of
a
,
b
,
c
,
d
.
-
参数
-
[in]
|
index
|
The vertex index (
0
-
3
) to retrieve in the polygon.
|
-
返回
-
The vertex index.
◆
IsTriangle()
Bool
IsTriangle
|
(
|
void
|
|
)
|
const
|
Checks if the polygon is a triangle.
-
返回
-
true
if the polygon is a triangle, otherwise
false
.
◆
Find()
Checks if one of the polygon vertex indices is equal to index and returns the found polygon vertex number (
0
-
3
, equals
a
-
d
).
-
参数
-
[in]
|
index
|
The vertex index to check.
|
-
返回
-
The matching polygon vertex number (
0
-
3
, equals
a
-
d
).
NOTOK
is returned if there is no match.
◆
FindEdge()
Checks if the vertex indices
index1
and
index2
form an edge in the polygon. If so the polygon edge number is returned (
0
-
3
).
-
参数
-
[in]
|
index1
|
The vertex index of the first edge point.
|
[in]
|
index2
|
The vertex index of the second edge point.
|
-
返回
-
The found polygon edge number (
0
-
3
), or
NOTOK
if there is no match.
◆
EdgePoints()
Gets the point indices for an
edge
index.
-
参数
-
[in]
|
edge
|
The edge index.
|
[out]
|
p1
|
Assigned the index of the first edge point.
|
[out]
|
p2
|
Assigned the index of the second edge point.
|
◆
GetPoint()
Gets the point with modulo for the number of points in the polygon.
If the polygon is a triangle it goes
a
,
b
,
c
,
a
,
b
, c etc thus point
3
will be point
a
again, but with a quad it goes
a
,
b
,
c
,
d
,
a
,
b
,
c
,
d
... so point
3
will be
d
.
-
参数
-
[in]
|
index
|
The point index.
|
-
返回
-
The point index.
Member Data Documentation
Index of the first point in the polygon.
Index of the second point in the polygon.
Index of the third point in the polygon.
Index of the fourth point in the polygon.