-
Notifications
You must be signed in to change notification settings - Fork 4
/
dispinfo.go
66 lines (59 loc) · 1.31 KB
/
dispinfo.go
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
package dispinfo
import (
"github.com/go-gl/mathgl/mgl32"
)
// MaxDispCornerNeighbours maximum number of adjoining neigherbours per corner.
const MaxDispCornerNeighbours = 4
// DispInfo
type DispInfo struct {
// StartPosition
StartPosition mgl32.Vec3
// DispVertStart
DispVertStart int32
// DispTriStart
DispTriStart int32
// Power
Power int32
// MinTess
MinTess int32
// SmoothingAngle
SmoothingAngle float32
// Contents
Contents int32
// MapFace
MapFace uint16
_ [2]byte
// LightmapAlphaStart
LightmapAlphaStart int32
// LightmapSampleStartPosition
LightmapSampleStartPosition int32
// Ignore contains bytes with unknown purpose and representation. This should be updated as purpose id discovered
Ignore [32]uint32
//EdgeNeighbors [4]DispNeighbor
//CornerNeighbors [4]DispCornerNeighbors
//AllowedVerts [8]uint32
}
// DispNeighbor
type DispNeighbor struct {
// SubNeighbours
SubNeighbours [2]DispSubNeighbor
}
// DispSubNeighbor
type DispSubNeighbor struct {
// Index
// 0xFFFF if no neighbor
Index uint16
// NeighborOrientation
NeighborOrientation uint8
// Span
Span uint8
// NeighborSpan
NeighborSpan uint8
}
// DispCornerNeighbors
type DispCornerNeighbors struct {
// Neighbors
Neighbors [MaxDispCornerNeighbours]uint16
// NumNeighbors is number of neighbours
NumNeighbors uint8
}