-
Notifications
You must be signed in to change notification settings - Fork 0
/
MetaShapeFileFormat.txt
121 lines (99 loc) · 3.37 KB
/
MetaShapeFileFormat.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
*.nmc NativeMeta Cluster file format
"%f" //file format version
"%d" //rendering mode (1:ray tracing, -1:sphere tracing, 0:mix of ray trace & sphere trace), -2:sphere tracing(Normal vector is obtained by UV neighbor interpolation)
"%l" //threshold for field function
"%d" //include group files(*.nmg) count
"%s" //group file name full path
... //group file name full path (include group files count times)
*.nmg NativeMeta Group file format
"%f" //file format version
"%d" //rendering mode (0:surface rendering, 1:volume rendering)
"%d\n" //meta shape count
//Hereafter, will describe each meta shape
// MULTI SHELL DECLARATIONS /////////////////////////////////////////////////////////////////////////////////////////
"%d %d\n" // Shells count, SHELL defines (0:default meta shape, 1:CSG:Or, -1:CSG:And)
//Hereafter, will describe each Shells
"%d\n" //meta shape type (ELLIPSOID=1, CUBE=2, POLYLINE=3, POLYHEDRON,BILINEAR_SURFACE=5, SPLINE=7, BICUBIC_SURFACE=8)
"%lf %lf\n" //weight, fusion_scale
case ELLIPSOID:
"%lf %lf %lf %lf\n"
"%lf %lf %lf %lf\n"
"%lf %lf %lf %lf\n"
"%lf %lf %lf %lf\n" // affine matrix for unit sphere
case CUBE:
"%lf %lf %lf"... // cube's 8 vertices (0~3 is x plus direction, 4~7 is x minus direction)
case POLYLINE:
"%lf\n" // radius
"%d %d %d\n" // both ends cap shape type, segment count, is closed
"%lf %lf %lf\n" // polyline vertices
case POLYHEDRON,BILINEAR_SURFACE:
"%d %d\n" //use_bilinear=1, face_cnt
//loop face_cnt times
"%d\n" //vertices_max 3 or 4
//loop vertices_max times
" %lf %lf %lf" //vertices
case SPLINE:
"%f\n" //base thickness
"%d\n" //segment count
"%lf %lf %lf" //control point
"%lf %lf %lf" //control point
"%lf %lf %lf" //control point
"%lf %lf %lf" //control point
...
case BICUBIC_SURFACE:
"%f\n" //base thickness
"%d\n" //patch_cnt
//loop patch_cnt times ( 4 * 4 control points net )
//loop 4 times
//loop 4 times
"%lf %lf %lf\n" //control points
// MULTI CORE DECLARATIONS /////////////////////////////////////////////////////////////////////////////////////////
"%d\n" //core count (0:default shell&core, n:user defined cores)
"%d\n" //meta core type (Point=1, Polyline=2, Spline=3, Polygon=4, BilinearSurface=5, BicubicSurface=6, Polyhedron=7, BilinearSolid=8, BicubicSolid=9)
"%lf\n" //core weight
case Point:
" %lf %lf %lf\n"
case Polyline:
"%d\n" //vertices count
"%lf %lf %lf\n" // polyline vertices
case Spline:
"%d\n" //segment count
"%lf %lf %lf" //control point
"%lf %lf %lf" //control point
"%lf %lf %lf" //control point
"%lf %lf %lf" //control point
...
case Polygon:
"%d\n" //face_cnt
//loop face_cnt times
"%d\n" //vertices_max 3 or 4
//loop vertices_max times
" %lf %lf %lf" //vertices
case BilinearSurface:
"%d\n" //face_cnt
//loop face_cnt times
//loop vertices 4 times
" %lf %lf %lf" //vertices
case BicubicSurface:
"%d\n" //patch_cnt
//loop patch_cnt times ( 4 * 4 control points net )
//loop 4 times
//loop 4 times
"%lf %lf %lf\n" //control points
case Polyhedron:
"%d\n" //face_cnt
//loop face_cnt times
"%d\n" //vertices_max 3 or 4
//loop vertices_max times
" %lf %lf %lf" //vertices
case BilinearSolid:
"%d\n" //face_cnt
//loop face_cnt times
//loop vertices 4 times
" %lf %lf %lf" //vertices
case BicubicSolid:
"%d\n" //patch_cnt
//loop patch_cnt times ( 4 * 4 control points net )
//loop 4 times
//loop 4 times
"%lf %lf %lf\n" //control points