Class ContactPatchSimplifierNaive

Class Documentation

class ContactPatchSimplifierNaive

Naive patch simplifier. Computes the area of all possible combinations. Returns the combination with the largest area. This is very expensive and only meant to be used in tests to check if other simplifiers return the correct answer.

Public Functions

ContactPatchSimplifierNaive() = default
void compute(const ContactPatch &patch_in, std::size_t target_vertices, ContactPatch &patch_out)

Compute the maximum-area subset of patch_in with target_vertices points and store it in patch_out.

void simplify(ContactPatch &patch, std::size_t target_vertices)

In-place simplification helper that replaces the polygon with the max-area subset.