Vixen
02b45cc4
csharp
public readonly record struct SceneShape

What a run of entities draws: a built-in shape, or a mesh an artist authored.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

One key for two things, because a batch is a batch either way. The viewport groups entities that share geometry into one instanced draw, and whether that geometry came out of MeshPrimitives or out of a bundle changes nothing about the grouping, the instancing or the pipeline. What it changes is where the vertices come from, which is Shape's business alone.

⚠ A PrimitiveKind of zero is Cube, so the discriminator has to be the reference and not the kind. Defaulting a key would otherwise mean "every entity is a cube", which is a viewport full of cubes where the meshes should be — and the meshes are exactly what nobody had yet, so it would have looked like the feature simply not working.

Fields and properties (7)

  • public PrimitiveKind Kind

    Which primitive, when this names one.

  • public AssetReference Mesh

    Which mesh asset, when it names one instead.

  • public Entity Owner

    Whose edited mesh, when it names one of those.

  • public int Version

    Which revision of that mesh — see SceneDocument.MeshVersion.

  • public int Group

    Which face group of it, or −1 for the whole mesh.

  • public bool IsAsset

    Whether this names an authored mesh rather than a built-in shape.

  • public bool IsEdit

    Whether this names one entity's own edited geometry.

Methods (4)

Used by (5)

  • BlockoutSurfaceTestsVixen.Editor.Blockout.Tests
  • SceneMeshAssetTestsVixen.Editor.SceneView.Tests
  • SceneMeshesVixen.Editor.SceneView
  • ScenePresenterVixen.Editor.App
  • ShapeBatchVixen.Editor.SceneView