aboutsummaryrefslogtreecommitdiff
path: root/src/earth.proto
blob: 0f0b3d052728fd1a944b869b1db32765c6b717c6 (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
syntax = "proto2";

package earth.proto;

message BulkMetadataRequest {
    optional NodeKey node_key = 1;
}

message NodeDataRequest {
    optional NodeKey node_key = 1;
    optional Texture.Format texture_format = 2;
    optional uint32 imagery_epoch = 3;
}

message NodeKey {
    optional string path = 1;
    optional uint32 epoch = 2;
}

message CopyrightRequest {
    optional uint32 epoch = 1;
}

message TextureDataRequest {
    optional NodeKey node_key = 1;
    optional Texture.Format texture_format = 2;
    optional Texture.ViewDirection view_direction = 3;
}

message BulkMetadata {
    repeated NodeMetadata node_metadata = 1;
    optional NodeKey head_node_key = 2;
    repeated double head_node_center = 3 [packed = true];
    repeated float meters_per_texel = 4 [packed = true];
    optional uint32 default_imagery_epoch = 5;
    optional uint32 default_available_texture_formats = 6;
    optional uint32 default_available_view_dependent_textures = 7;
    optional uint32 default_available_view_dependent_texture_formats = 8;
}

message NodeMetadata {
    optional uint32 path_and_flags = 1;
    optional uint32 epoch = 2;
    optional uint32 bulk_metadata_epoch = 5;
    optional bytes oriented_bounding_box = 3;
    optional float meters_per_texel = 4;
    repeated double processing_oriented_bounding_box = 6 [packed = true];
    optional uint32 imagery_epoch = 7;
    optional uint32 available_texture_formats = 8;
    optional uint32 available_view_dependent_textures = 9;
    optional uint32 available_view_dependent_texture_formats = 10;
    
    enum Flags {
        RICH3D_LEAF = 1;
        RICH3D_NODATA = 2;
        LEAF = 4;
        NODATA = 8;
        USE_IMAGERY_EPOCH = 16;
    }
}

message NodeData {
    repeated double matrix_globe_from_mesh = 1 [packed = true];
    repeated Mesh meshes = 2;
    repeated uint32 copyright_ids = 3;
    optional NodeKey node_key = 4;
    repeated double kml_bounding_box = 5 [packed = true];
    optional Mesh water_mesh = 6;
    repeated Mesh overlay_surface_meshes = 7;
    optional bytes for_normals = 8;
}

message Mesh {
    optional bytes vertices = 1;
    optional bytes vertex_alphas = 9;
    optional bytes texture_coords = 2;
    repeated int32 indices = 3 [packed = true];
    optional bytes octant_ranges = 4;
    optional bytes layer_counts = 5;
    repeated Texture texture = 6;
    optional bytes texture_coordinates = 7;
    repeated float uv_offset_and_scale = 10 [packed = true];
    optional bytes layer_and_octant_counts = 8;
    optional bytes normals = 11;
    optional bytes normals_dev = 16;
    optional uint32 mesh_id = 12;
    optional bytes skirt_flags = 13;
    
    enum Layer {
        OVERGROUND = 0;
        TERRAIN_BELOW_WATER = 1;
        TERRAIN_ABOVE_WATER = 2;
        TERRAIN_HIDDEN = 3;
        WATER = 4;
        WATER_SKIRTS = 5;
        WATER_SKIRTS_INVERTED = 6;
        OVERLAY_SURFACE = 7;
        OVERLAY_SURFACE_SKIRTS = 8;
        NUM_LAYERS = 9;
    }
    
    enum LayerMask {
        TERRAIN_WITH_OVERGROUND = 7;
        TERRAIN_WITH_WATER = 28;
        TERRAIN_WITHOUT_WATER = 14;
    }
}

message Texture {
    repeated bytes data = 1;
    
    optional Format format = 2;
    enum Format {
        JPG = 1;
        DXT1 = 2;
        ETC1 = 3;
        PVRTC2 = 4;
        PVRTC4 = 5;
        CRN_DXT1 = 6;
    }
    
    optional uint32 width = 3 [default = 256];
    optional uint32 height = 4 [default = 256];
    
    optional ViewDirection view_direction = 5;
    enum ViewDirection {
        NADIR = 0;
        NORTH_45 = 1;
        EAST_45 = 2;
        SOUTH_45 = 3;
        WEST_45 = 4;
    }
    
    optional uint32 mesh_id = 6;
}

message TextureData {
    optional NodeKey node_key = 1;
    repeated Texture textures = 2;
}

message Copyrights {
    repeated Copyright copyrights = 1;
}

message Copyright {
    optional uint32 id = 1;
    optional string text = 2;
    optional string text_clean = 3;
}

message PlanetoidMetadata {
    optional NodeMetadata root_node_metadata = 1;
    optional float radius = 2;
    optional float min_terrain_altitude = 3;
    optional float max_terrain_altitude = 4;
}