Lagrange
Loading...
Searching...
No Matches
RepackOptions Struct Reference

RepackOptions allows one to customize packing options. More...

#include <lagrange/packing/repack_uv_charts.h>

Public Attributes

std::string_view uv_attribute_name = ""
 Name of the indexed attribute to use as UV coordinates.
 
std::string_view chart_attribute_name = ""
 Name of the facet attribute that group facets into UV charts.
 
bool allow_rotation = true
 Whether to allow box to rotate by 90 degree when packing.
 
bool normalize = true
 Whether the output should be normalized to fit into a unit box.
 
float margin = 1e-3f
 Minimum allowed distance between two boxes.
 

Detailed Description

RepackOptions allows one to customize packing options.

Member Data Documentation

◆ uv_attribute_name

std::string_view uv_attribute_name = ""

Name of the indexed attribute to use as UV coordinates.

If empty, the first indexed UV attribute will be used.

◆ chart_attribute_name

std::string_view chart_attribute_name = ""

Name of the facet attribute that group facets into UV charts.

If empty, it will be computed based on UV chart connectivity.

◆ normalize

bool normalize = true

Whether the output should be normalized to fit into a unit box.

When false, the packed charts preserve their original scale but are still translated so the minimum UV is at the origin.

◆ margin

float margin = 1e-3f

Minimum allowed distance between two boxes.

When normalize is true, this value is measured in the normalized [0, 1] output domain. When normalize is false, it is interpreted as an absolute distance in the original UV units.


The documentation for this struct was generated from the following file: