public struct PrimitiveShapeAn entity drawn as one of the built-in shapes.
As a scene component
- Size
- 16 bytes — 585 rows in a 16 KB chunk, alone on the archetype
Remarks
The kind and nothing else. The geometry is not stored per entity — a thousand cubes are a thousand copies of the same twenty-four vertices, and MeshPrimitives builds one on demand from a value that is four bytes. Size, position and orientation are the transform's, which is why every primitive comes out of the builder fitting the unit cube: scale: 2 1 2 then means what it looks like it means.
Separate from MeshRenderable rather than a null mesh on one. A primitive needs no asset and no residency cache — the extraction that draws one can be written before the extraction that draws an asset, and an entity is one or the other. Making it a special case of a mesh reference would put a branch on "is this reference null" in the middle of the path that resolves references.
Fields and properties (2)
public PrimitiveKind KindWhich shape.
public AssetReference MaterialWhich material, or Null for the renderer's default.
Used by (15)
- ComponentRegistrationVixen.Rendering
- LightExtractionTestsVixen.Rendering.Tests
- MeshExtractionSystemVixen.Rendering
- MeshExtractionTestsVixen.Rendering.Tests
- PrimitiveShapesVixen.Rendering
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Ecs_PrimitiveShapeSerializerVixen.Rendering
- ComponentTestsVixen.Editor.App.Tests
- InspectorPanelTestsVixen.Editor.App.Tests
- MaterialIconsVixen.Editor.App
- SceneMaterialTestsVixen.Editor.SceneView.Tests
- SceneMeshAssetTestsVixen.Editor.SceneView.Tests
- SceneMeshesVixen.Editor.SceneView
- SceneRenderComponentTestsVixen.Editor.Assets.Tests
- StandardIconsVixen.Editor.App