Vixen
02b45cc4
csharp
public sealed class SceneShapeData

A parametric block-out shape as a scene file carries it: a name and six numbers.

Read the guide page for this →

Remarks

Doc 24's D6, written down. A shape keeps live parameters until somebody edits a face of it, and these are those — so a corridor that should be a metre wider is one number in a diff rather than a mesh rewritten from end to end.

⚠ An entity with these does not write its mesh, and that is the whole reason to have them. The geometry is a function of the parameters, so a file carrying both would carry two answers to one question and would diff against itself the first time a generator's arithmetic changed by a bit. What it costs is that a scene opened by an editor that has never heard of the shape shows the entity with no geometry — the same trade Shape already made, and the same reason it is a name rather than a number.

⚠ Six fields for twelve shapes, and what each means is per kind. The alternative is a tagged variant per shape, which is a format that grows a case every time somebody adds a stair — see ShapeParameters, which makes the same argument from the other side.

Fields and properties (6)

  • public string Kind

    Which shape, by name — Box, Stairs, Arch and the rest.

  • public Vector3 Size

    How big it is across each axis, in world units.

  • public int Sides

    How many divisions around its axis.

  • public int Steps

    How many along it.

  • public float Thickness

    How much solid material is left — the header above an opening.

  • public float Inner

    The ratio a hole through it is of the whole.

Methods (1)

  • public override string ToString()

    Renders it as its kind.

Used by (4)

  • BlockoutCreateTestsVixen.Editor.Blockout.Tests
  • EditMeshesVixen.Editor.SceneView
  • SceneEntityDataVixen.Editor.Core
  • TypeRegistrationVixen.Editor.Core