-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdrawable.go
141 lines (122 loc) · 4.58 KB
/
drawable.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
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
package osg
import (
"github.com/flywave/go-osg/model"
)
func checkInitialBound(obj interface{}) bool {
node := obj.(*model.Drawable)
return node.InitialBound.Radius > 0
}
func readInitialBound(is *OsgIstream, obj interface{}) {
node := obj.(*model.Drawable)
is.Read(is.BEGINBRACKET)
is.PROPERTY.Name = "Center"
is.Read(is.PROPERTY)
is.Read(&node.InitialBound.Center)
is.PROPERTY.Name = "Radius"
is.Read(is.PROPERTY)
is.Read(&node.InitialBound.Radius)
is.Read(is.ENDBRACKET)
}
func writeInitialBound(os *OsgOstream, obj interface{}) {
node := obj.(*model.Drawable)
os.Write(os.BEGINBRACKET)
os.Write(os.CRLF)
os.PROPERTY.Name = "Center"
os.Write(os.PROPERTY)
os.Write(node.InitialBound.Center)
os.Write(os.CRLF)
os.PROPERTY.Name = "Radius"
os.Write(os.PROPERTY)
os.Write(node.InitialBound.Radius)
os.Write(os.CRLF)
os.Write(os.ENDBRACKET)
os.Write(os.CRLF)
}
func getBoxCallback(obj interface{}) interface{} {
return obj.(model.DrawableInterface).GetBoxCallback()
}
func setBoxCallback(obj interface{}, pro interface{}) {
obj.(model.DrawableInterface).SetBoxCallback(pro.(*model.ComputeBoundingBoxCallback))
}
func getShape(obj interface{}) interface{} {
return obj.(model.DrawableInterface).GetShape()
}
func setShape(obj interface{}, pro interface{}) {
obj.(model.DrawableInterface).SetShape(pro.(*model.Shape))
}
func getSupportsDisplayList(obj interface{}) interface{} {
return obj.(model.DrawableInterface).GetSupportsDisplayList()
}
func setSupportsDisplayList(obj interface{}, pro interface{}) {
obj.(model.DrawableInterface).SetSupportsDisplayList(pro.(bool))
}
func getUseDisplayList(obj interface{}) interface{} {
return obj.(model.DrawableInterface).GetUseDisplayList()
}
func setUseDisplayList(obj interface{}, pro interface{}) {
obj.(model.DrawableInterface).SetUseDisplayList(pro.(bool))
}
func getUseVertexBufferObjects(obj interface{}) interface{} {
return obj.(model.DrawableInterface).GetUseVertexBufferObjects()
}
func setUseVertexBufferObjects(obj interface{}, pro interface{}) {
obj.(model.DrawableInterface).SetUseVertexBufferObjects(pro.(bool))
}
func getDrawCallback(obj interface{}) interface{} {
return obj.(model.DrawableInterface).GetDwCallback()
}
func setDrawCallback(obj interface{}, pro interface{}) {
obj.(model.DrawableInterface).SetDwCallback(pro.(*model.DrawCallback))
}
func init() {
wrap := NewObjectWrapper("Drawable", nil, "osg::Object osg::Node osg::Drawable")
{
uv := AddUpdateWrapperVersionProxy(wrap, 154)
wrap.MarkSerializerAsAdded("osg::Node")
uv.SetLastVersion()
}
ser := NewObjectSerializer("StateSet", getStateSet, setStateSet)
seruser := NewUserSerializer("InitialBound", checkInitialBound, readInitialBound, writeInitialBound)
sercpm := NewObjectSerializer("ComputeBoundingBoxCallback", getBoxCallback, setBoxCallback)
sershape := NewObjectSerializer("Shape", getShape, setShape)
serbool1 := NewEnumSerializer("SupportsDisplayList", getSupportsDisplayList, setSupportsDisplayList)
serbool2 := NewEnumSerializer("UseDisplayList", getUseDisplayList, setUseDisplayList)
serbool3 := NewEnumSerializer("UseVertexBufferObjects", getUseVertexBufferObjects, setUseVertexBufferObjects)
seruc := NewObjectSerializer("UpdateCallback", getUpdateCallback, setUpdateCallback)
serec := NewObjectSerializer("EventCallback", getEventCallback, setEventCallback)
sercc := NewObjectSerializer("CullCallback", getCullCallback, setCullCallback)
serdc := NewObjectSerializer("DrawCallback", getDrawCallback, setDrawCallback)
wrap.AddSerializer(ser, RWOBJECT)
wrap.AddSerializer(seruser, RWUSER)
wrap.AddSerializer(sercpm, RWOBJECT)
wrap.AddSerializer(sershape, RWOBJECT)
wrap.AddSerializer(serbool1, RWBOOL)
wrap.AddSerializer(serbool2, RWBOOL)
wrap.AddSerializer(serbool3, RWBOOL)
wrap.AddSerializer(seruc, RWOBJECT)
wrap.AddSerializer(serec, RWOBJECT)
wrap.AddSerializer(sercc, RWOBJECT)
wrap.AddSerializer(serdc, RWOBJECT)
{
uv := AddUpdateWrapperVersionProxy(wrap, 156)
wrap.MarkSerializerAsRemoved("StateSet")
wrap.MarkSerializerAsRemoved("UpdateCallback")
wrap.MarkSerializerAsRemoved("EventCallback")
wrap.MarkSerializerAsRemoved("CullCallback")
wrap.MarkSerializerAsRemoved("DrawCallback")
uv.SetLastVersion()
}
{
uv := AddUpdateWrapperVersionProxy(wrap, 142)
serb1 := NewPropByValSerializer("NodeMask", false, getNodeMask, setNodeMask)
wrap.AddSerializer(serb1, RWUINT)
uv.SetLastVersion()
}
{
uv := AddUpdateWrapperVersionProxy(wrap, 145)
serb2 := NewPropByValSerializer("CullingActive", false, getCullingActive, setCullingActive)
wrap.AddSerializer(serb2, RWBOOL)
uv.SetLastVersion()
}
GetObjectWrapperManager().AddWrap(wrap)
}