8#include <Eigen/Geometry>
22 Eigen::Vector4d
plane{0, 0, 0, 0};
A closed 3D polygon whose vertices are coplanar.
std::vector< uint8_t > serialize_vertices() const
Serialize vertices to compact binary (N * 3 * sizeof(double) bytes).
std::vector< Eigen::Vector3d > vertices
std::pair< Eigen::Vector3d, Eigen::Vector3d > bounding_box() const
Axis-aligned bounding box (min, max).
Eigen::Vector3d normal() const
Unit normal extracted from plane coefficients.
bool is_valid() const
True when >= 3 vertices and nonzero plane normal.
Eigen::Vector3d centroid() const
Centroid (arithmetic mean of vertices).
static std::vector< Eigen::Vector3d > deserialize_vertices(const void *data, size_t size)
Deserialize vertices from compact binary.
double area() const
Signed area via Newell's method projected onto the plane normal.