C# Class MeshExplorer.IO.Formats.JsonFile

Read and write JSON files.
The JSON format: { "config": { "ver": 1, "type": "mesh" | "poly" | "points", "dim": 2 }, "points": { "data": [ p0.x, p0.y ... pn.x, pn.y ], "markers": [ ... ], "attributes": [ ... ] }, "segments": { "data": [ s0(1), s0(2) ... sn(1), sn(2) ], "markers": [ ... ] }, "holes": [ h0.x, h0.y ... hn.x, hn.y ], "triangles": { "data": [ t0(1), t0(2), t0(3) ... tn(1), tn(2), tn(3) ], "neighbors": [ t0.n1, t0.n2, t0.n3 ... tn.n1, tn.n2, tn.n3 ], "attributes": [ ... ] } }
Inheritance: IMeshFile
Afficher le fichier Open project: RegrowthStudios/VoxelRTS Class Usage Examples

Méthodes publiques

Méthode Description
ContainsMeshData ( string filename ) : bool
Import ( string filename ) : Mesh
Read ( string filename ) : InputGeometry

Write ( Mesh mesh, string filename ) : void

Private Methods

Méthode Description
ParseJson ( string filename ) : void
ReadHoles ( InputGeometry geometry, ArrayList holes ) : void
ReadPoints ( InputGeometry geometry, object>.Dictionary points, int &count ) : void
ReadSegments ( InputGeometry geometry, object>.Dictionary segments, int count ) : void
ReadTriangles ( object>.Dictionary triangles, int points ) : List
WriteHoles ( IEnumerable data, StreamWriter writer, int nh ) : void
WritePoints ( IEnumerable data, StreamWriter writer, int nv, bool useMarkers ) : StringBuilder
WritePoints ( Mesh mesh, StreamWriter writer, int nv ) : void
WriteSegments ( IEnumerable data, StreamWriter writer, int ns ) : void
WriteTriangles ( IEnumerable data, StreamWriter writer, int ne ) : void

Method Details

ContainsMeshData() public méthode

public ContainsMeshData ( string filename ) : bool
filename string
Résultat bool

Import() public méthode

public Import ( string filename ) : Mesh
filename string
Résultat TriangleNet.Mesh

Read() public méthode

public Read ( string filename ) : InputGeometry
filename string
Résultat TriangleNet.Geometry.InputGeometry

Write() public méthode

public Write ( Mesh mesh, string filename ) : void
mesh Mesh
filename string
Résultat void