#include <c4d_baseobject.h>
Represents a polygon that can be either a triangle or a quadrangle.
Public Member Functions | |
| CPolygon () | |
| CPolygon (Int32 t_a, Int32 t_b, Int32 t_c) | |
| CPolygon (Int32 t_a, Int32 t_b, Int32 t_c, Int32 t_d) | |
| Int32 & | operator[] (Int32 index) const |
| Bool | IsTriangle (void) const |
| Int32 | Find (Int32 index) const |
| Int32 | FindEdge (Int32 index1, Int32 index2) const |
| void | EdgePoints (Int32 edge, Int32 &p1, Int32 &p2) const |
| Int32 & | GetPoint (Int32 index) const |
Public Attributes | |
| Int32 | a |
| Int32 | b |
| Int32 | c |
| Int32 | d |
| CPolygon | ( | ) |
Constructs a polygon by default.
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. |
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. |
| Bool IsTriangle | ( | void | ) | const |
Checks if the polygon is a triangle.
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. |
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. |
| Int32 a |
Index of the first point in the polygon.
| Int32 b |
Index of the second point in the polygon.
| Int32 c |
Index of the third point in the polygon.
| Int32 d |
Index of the fourth point in the polygon.