-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGroup.py
53 lines (41 loc) · 1.61 KB
/
Group.py
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
class Group(Node):
def __init__(self, handle=None):
if handle:
super().__init__(handle)
else:
self.handle = self.create()
Engine.add_java_peer(self.handle, self)
self.ii = (self.__class__ != Group)
def get_child(self, index):
child_handle = self.get_child_impl(index)
return Engine.instantiate_java_peer(child_handle)
def add_child(self, child):
self.add_child_impl(child)
Engine.add_xot(child)
def pick(self, scope, ox, oy, oz, dx, dy, dz, ray_intersection):
return self.pick_node(scope, ox, oy, oz, dx, dy, dz, ray_intersection)
def pick_with_camera(self, scope, x, y, camera, ray_intersection):
return self.pick_camera(scope, x, y, camera, ray_intersection)
def finalize(self):
pass # Placeholder for finalization logic if needed
@staticmethod
def create():
# Simulating the native create method
return Engine.create_group()
def get_child_count(self):
return self.get_child_count_impl()
def get_child_impl(self, index):
# Placeholder for native method
pass
def add_child_impl(self, child):
# Placeholder for native method
pass
def remove_child(self, child):
# Placeholder for native method
pass
def pick_node(self, scope, ox, oy, oz, dx, dy, dz, ray_intersection):
# Placeholder for native method
pass
def pick_camera(self, scope, x, y, camera, ray_intersection):
# Placeholder for native method
pass