Vixen
dd8b0a81
csharp
public readonly record struct UvPlacement

Where the packer put an island, as a transform rather than as rewritten coordinates.

Read the guide page for this →

Remarks

⚠ A transform rather than coordinates, so that a caller can pack twice and compare. A packer that rewrote the coordinates in place would make "what did this setting cost me" a question you answer by re-running the whole unwrap. It also keeps the island's own shape exactly as it arrived, which is docs/plan/42's exit criterion 7 — repacking an artist's layout must leave the island shapes untouched.

Fields and properties (5)

  • public int Island

    Which island, by index into what was handed in.

  • public Vector2 Offset

    Where the island's lower corner sits, in the atlas's unit square.

  • public float Scale

    What the island's coordinates were multiplied by.

  • public int Rotation

    Quarter turns applied, counter-clockwise, before the offset.

  • public Int2 Tile

    Which UDIM tile, as integer offsets. (0, 0) for a single-atlas pack.

Methods (2)

  • public UvPlacement(int Island, Vector2 Offset, float Scale, int Rotation, Int2 Tile)

    Where the packer put an island, as a transform rather than as rewritten coordinates.

  • public Vector2 Apply(in UvIsland island, Vector2 coordinate)

    Where one of the island's coordinates ends up.

Used by (20)

  • AttemptedVixen.Geometry.Uv
  • LayoutAtlasVixen.Geometry.Remeshing
  • PackOutcomeVixen.Geometry.Uv
  • PackedAtlasVixen.Geometry.Uv.Tests
  • PackerVixen.Geometry.Uv
  • UvAllTestsVixen.Geometry.Uv.Tests
  • UvDensityVixen.Geometry.Uv
  • UvDensityTestsVixen.Geometry.Uv.Tests
  • UvPackDeterminismTestsVixen.Geometry.Uv.Tests
  • UvPackMarginTestsVixen.Geometry.Uv.Tests
  • UvPackPropertyTestsVixen.Geometry.Uv.Tests
  • UvPackingTestsVixen.Geometry.Uv.Tests
  • UvStackingVixen.Geometry.Uv
  • UvStackingTestsVixen.Geometry.Uv.Tests
  • UvUdimTestsVixen.Geometry.Uv.Tests
  • UvUnwrapVixen.Geometry.Uv
  • UvUnwrapPipelinePropertyTestsVixen.Geometry.Uv.Tests
  • BlockoutUvPanelVixen.Editor.Blockout
  • GeometryRunnerVixen.Cli
  • ModelGeometryVixen.Editor.Assets