-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpanel3d.sj
37 lines (31 loc) · 903 Bytes
/
panel3d.sj
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
panel3d #model(
model : mat4_identity()
children : array!heap #model()
_world := mat4_identity()
update(sceneRect : 'rect, projection : 'mat4, view : 'mat4, world : 'mat4, light : 'light)'void {
_world = world
childWorld : world * model
for i : 0 to children.count {
c : children[i]
c.update(sceneRect, projection, view, childWorld, light)
}
void
}
getZ() { 0.0f }
getCenter() { vec3() }
getWorld() { _world * model }
renderOrQueue(zqueue : 'list!heap #model)'void {
for i : 0 to children.count {
c : children[i]
c.renderOrQueue(zqueue)
}
}
render()'void {
}
fireMouseEvent(mouseEvent : 'mouseEvent)'void {
for i : 0 to children.count {
c : children[i]
c.fireMouseEvent(mouseEvent)
}
}
) { this }