public static class EditMeshesThe six lines that join the mesh kernel to the things that draw and save one.
Remarks
Doc 24's D1 puts these here rather than in the kernel, and the reason is one reference. Core/Vixen.Geometry depends on Vixen.Core.Mathematics and nothing else — a geometry kernel that needed the render assembly to describe a triangle would be backwards, and one that needed the editor's file format to describe a face would be worse. So the kernel hands back its own arrays and the copies live here, beside the code that uploads and writes them. Vixen.Navigation makes exactly this choice and it has cost it nothing.
⚠ A drawn vertex is a corner and not a position, which is why the trip out is not the trip in reversed. Going in, twenty-four entries weld to eight positions. Coming out, eight positions expand to one vertex per corner again — because a normal belongs to a corner, and a cube drawn from eight shared vertices is a cube lit as a very lumpy sphere.
Methods (8)
public static EditMesh From(MeshData mesh, float weld = 0.0001)Builds a mesh from geometry a renderer would draw.
public static EditMesh From(PrimitiveKind kind, int segments = 32, int rings = 16)Builds one from a primitive.
public static MeshData ToMeshData(this EditMesh mesh, string name = "Mesh")Turns a mesh into geometry a renderer can draw.
public static MeshData ToMeshData(this EditMesh mesh, string name, int group)Turns one face group of a mesh into geometry a renderer can draw.
public static SceneMeshData ToSceneData(this EditMesh mesh)Turns a mesh into what a scene file carries.
public static SceneShapeData ToSceneData(this ShapeParameters parameters)Turns a shape's parameters into what a scene file carries.
public static ShapeParameters? FromSceneData(SceneShapeData? data)Reads a shape's parameters back.
public static EditMesh? FromSceneData(SceneMeshData? data)Rebuilds a mesh from what a scene file carried.
Used by (10)
- BlockoutBooleanTestsVixen.Editor.Blockout.Tests
- BlockoutGeometryTestsVixen.Editor.Blockout.Tests
- BlockoutHandoffVixen.Editor.Blockout
- BlockoutSurfaceTestsVixen.Editor.Blockout.Tests
- EditMeshSceneTestsVixen.Editor.SceneView.Tests
- MeshEditVixen.Editor.SceneView
- MeshExportVixen.Editor.SceneView
- SceneMeshesVixen.Editor.SceneView
- SceneProbeVixen.Editor.SceneView
- SceneSerializerVixen.Editor.SceneView