-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTriangleStripArray.py
More file actions
40 lines (32 loc) · 1.41 KB
/
TriangleStripArray.py
File metadata and controls
40 lines (32 loc) · 1.41 KB
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
class TriangleStripArray(IndexBuffer):
def __init__(self, *args):
if len(args) == 2 and isinstance(args[0], int) and isinstance(args[1], list):
first_index, strip_lengths = args
self.handle = self.create_implicit(first_index, strip_lengths)
elif len(args) == 2 and isinstance(args[0], list) and isinstance(args[1], list):
indices, strip_lengths = args
self.handle = self.create_explicit(indices, strip_lengths)
else:
raise ValueError("Invalid arguments")
super().__init__(self.handle)
Engine.add_java_peer(self.swerve_handle, self)
self.ii = (self.__class__ != TriangleStripArray)
def get_index_count(self):
return self.get_index_count_impl()
def get_indices(self, indices):
self.get_indices_impl(indices)
def create_implicit(self, first_index, strip_lengths):
# Implementar o método nativo createImplicit
pass
def create_explicit(self, indices, strip_lengths):
# Implementar o método nativo createExplicit
pass
def get_index_count_impl(self):
# Implementar o método nativo getIndexCountImpl
pass
def get_indices_impl(self, indices):
# Implementar o método nativo getIndicesImpl
pass
def finalize(self):
# Implementar o método nativo finalize
pass