CPolygon Struct Reference

#include <c4d_cpolygon.h>

Public Member Functions

 CPolygon (Int32 t_a, Int32 t_b, Int32 t_c)
 
 CPolygon (Int32 t_a, Int32 t_b, Int32 t_c, Int32 t_d)
 
Int32operator[] (Int32 index) const
 

Public Attributes

Int32 a
 
Int32 b
 
Int32 c
 
Int32 d
 

Detailed Description

Represents a polygon that can be either a triangle or quadrangle.

Constructor & Destructor Documentation

◆ CPolygon() [1/2]

CPolygon ( Int32  t_a,
Int32  t_b,
Int32  t_c 
)

Constructs a triangle.

Parameters
[in]t_aIndex of the first point in the polygon.
[in]t_bIndex of the second point in the polygon.
[in]t_cIndex of the third point in the polygon.

◆ CPolygon() [2/2]

CPolygon ( Int32  t_a,
Int32  t_b,
Int32  t_c,
Int32  t_d 
)

Constructs a quadrangle.

Parameters
[in]t_aIndex of the first point in the polygon.
[in]t_bIndex of the second point in the polygon.
[in]t_cIndex of the third point in the polygon.
[in]t_dIndex of the third point in the polygon.

Member Function Documentation

◆ operator[]()

Int32& operator[] ( Int32  index) const

Vertex index array operator.
Accesses the polygon's vertex indices through their polygon vertex numbers (0 - 3) instead of a, b, c, d.

Since
18.002
Parameters
[in]indexThe vertex index (0 - 3) to retrieve in the polygon.
Returns
The vertex index.

Member Data Documentation

◆ a

Int32 a

Index of the first point in the polygon.

◆ b

Int32 b

Index of the second point in the polygon.

◆ c

Int32 c

Index of the third point in the polygon.

◆ d

Int32 d

Index of the fourth point in the polygon.