public record class MeshDataThe geometry of one mesh, as it came out of an authoring tool.
Remarks
The CPU side of MeshDraw. That struct holds buffer handles and a range, because it is read once per object in a frame; this holds arrays, because it is read once per build by something deciding what those buffers should contain.
Parallel arrays, and typed ones. A vertex is not a struct here, because the layout is a compile-time decision — which attributes are present, in what order, at what precision, interleaved or not — and doc 08 puts that in ModelCompiler where the whole model is in hand. Separate arrays let a compiler drop an attribute nothing samples without rewriting the ones it keeps.
An attribute the file did not have is an empty array rather than a null or a defaulted one. Empty says "this mesh has no tangents"; an array of zeros says "this mesh has tangents and they are all degenerate", and a compiler cannot tell the second from a bug in the first.
Fields and properties (20)
public string NameWhat the mesh is called. Its sub-asset name, and part of its address.
public Vector3[] PositionsOne position per vertex.
public Vector3[] NormalsOne normal per vertex, or empty.
public Vector4[] TangentsOne tangent per vertex, or empty. W is the bitangent's sign.
public Vector2[] TexCoordsOne texture coordinate per vertex, or empty.
public Vector2[] TexCoords1A second texture coordinate per vertex, or empty.
public Vector4[] ColorsOne colour per vertex, or empty. Linear, straight alpha.
public int[] IndicesThree indices per triangle.
public int[] BoneIndicesFour joint indices per vertex, or empty if the mesh is not skinned.
public float[] BoneWeightsFour weights per vertex, summing to one, or empty.
public int MaterialIndexWhich of the model's materials this is drawn with.
public BoundingBox BoundsEverything the mesh occupies, in the model's space.
public AssetReference ClustersThis mesh's cluster hierarchy and page records, or null if it has none.
public AssetReference ClusterPagesWhere this mesh's page blob is, or null if it has no clusters.
public bool IsClusteredWhether it was built with a cluster hierarchy.
public int VertexCountHow many vertices it has.
public int TriangleCountHow many triangles it has.
public bool IsSkinnedWhether it carries skinning weights.
public bool HasColorsWhether it carries per-vertex colours.
public bool HasTexCoords1Whether it carries a second texture coordinate set.
Used by (51, showing 40)
- AssetMeshSourceVixen.Engine.Renderer
- AssetVirtualGeometrySourceVixen.Engine.Renderer
- BuilderVixen.Rendering
- DeferredMeshSourceVixen.Engine.Renderer.Tests
- EditorGizmoFacingDeviceTestsVixen.Graphics.Golden.Tests
- EntryVixen.Engine.Renderer
- EveryMeshVixen.Rendering.Tests
- GeometryResidencyVixen.Rendering
- IMeshSourceVixen.Rendering
- MeshExtractionSystemVixen.Rendering
- MeshExtractionTestsVixen.Rendering.Tests
- MeshInstanceRendererVixen.Rendering
- MeshInstanceRendererTestsVixen.Rendering.Tests
- MeshPrimitivesVixen.Rendering
- MeshPrimitivesTestsVixen.Rendering.Tests
- MeshRenderableVixen.Rendering
- ModelDataTestsVixen.Rendering.Tests
- OneMeshVixen.Rendering.Tests
- SurfaceGeometryVixen.Rendering
- SurfaceGeometryTestsVixen.Rendering.Tests
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_MeshDataSerializerVixen.Rendering
- WorldRendererTestsVixen.Engine.Renderer.Tests
- BlockoutBooleanTestsVixen.Editor.Blockout.Tests
- BlockoutHandoffVixen.Editor.Blockout
- BlockoutSurfaceTestsVixen.Editor.Blockout.Tests
- EditMeshSceneTestsVixen.Editor.SceneView.Tests
- EditMeshesVixen.Editor.SceneView
- GizmoGeometryVixen.Editor.SceneView
- ImportedGeometryLoadsTestsVixen.Editor.Assets.Tests
- MeshElementsVixen.Editor.SceneView
- MeshExportVixen.Editor.SceneView
- MeshesVixen.Editor.SceneView.Tests
- MeshesVixen.Editor.SceneView.Tests
- ModelCompilerVixen.Editor.Assets
- ModelImporterVixen.Editor.Assets
- ModelImporterTestsVixen.Editor.Assets.Tests
- ModelReaderVixen.Editor.Assets
- ModelReaderTestsVixen.Editor.Assets.Tests
- NavMeshImporterVixen.Editor.Assets