-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVertexArray.py
59 lines (47 loc) · 1.91 KB
/
VertexArray.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
54
55
56
57
58
59
class VertexArray(Object3D)
def __init__(self, args)
if len(args) == 3 and isinstance(args[0], int) and isinstance(args[1], int) and isinstance(args[2], int)
num_entries, num_components, component_size = args
self.handle = self.create(num_entries, num_components, component_size)
else
raise ValueError(Invalid arguments)
super().__init__(self.handle)
Engine.add_java_peer(self.swerve_handle, self)
self.ii = (self.__class__ != VertexArray)
def get(self, first_vertex, num_vertices, values)
if isinstance(values, list)
self.get16(first_vertex, num_vertices, values)
else
raise ValueError(Invalid argument type)
def set(self, start_index, length, values)
if isinstance(values, list)
self.set16(start_index, length, values)
else
raise ValueError(Invalid argument type)
def get8(self, first_vertex, num_vertices, values)
# Implementar a versão para get8
pass
def set8(self, start_index, length, values)
# Implementar a versão para set8
pass
def create(self, num_entries, num_components, component_size)
# Implementar o método nativo create
pass
def get16(self, first_vertex, num_vertices, values)
# Implementar o método nativo get16
pass
def set16(self, start_index, length, values)
# Implementar o método nativo set16
pass
def finalize(self)
# Implementar o método nativo finalize
pass
def get_vertex_count(self)
# Implementar o método nativo getVertexCount
pass
def get_component_count(self)
# Implementar o método nativo getComponentCount
pass
def get_component_type(self)
# Implementar o método nativo getComponentType
pass