mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +05:30
Added getbatchdata function
This commit is contained in:
parent
7835a8d90d
commit
a8d2cfeb4a
@ -367,6 +367,9 @@ class MEsh:
|
|||||||
else:
|
else:
|
||||||
print("nothing to show")
|
print("nothing to show")
|
||||||
|
|
||||||
|
def getbatchdata(self):
|
||||||
|
return self.cstruct.b.contents.bd.contents
|
||||||
|
|
||||||
def getpositions(self):
|
def getpositions(self):
|
||||||
length = self.cstruct.b.contents.bd.contents.numVertex
|
length = self.cstruct.b.contents.bd.contents.numVertex
|
||||||
return self.cstruct.b.contents.vd.positions[:length]
|
return self.cstruct.b.contents.vd.positions[:length]
|
||||||
@ -474,18 +477,21 @@ if __name__ == "__main__":
|
|||||||
mh.show()
|
mh.show()
|
||||||
m = MEsh(0, data)
|
m = MEsh(0, data)
|
||||||
m.show()
|
m.show()
|
||||||
p = m.getpositions()
|
# p = m.getpositions()
|
||||||
print("positions:")
|
# print("positions:")
|
||||||
for point in p:
|
# for point in p:
|
||||||
print(point)
|
# print(point)
|
||||||
n = m.getnormals()
|
# n = m.getnormals()
|
||||||
print("normals:")
|
# print("normals:")
|
||||||
for point in n:
|
# for point in n:
|
||||||
print(point)
|
# print(point)
|
||||||
u = m.getuvs()
|
# u = m.getuvs()
|
||||||
print("uvs:")
|
# print("uvs:")
|
||||||
for point in u:
|
# for point in u:
|
||||||
print(point)
|
# print(point)
|
||||||
|
dbatch = m.getbatchdata()
|
||||||
|
print(hex(dbatch.numVertex))
|
||||||
|
print(hex(dbatch.padding))
|
||||||
#---------------------------------------+
|
#---------------------------------------+
|
||||||
# main()
|
# main()
|
||||||
mainx()
|
mainx()
|
||||||
|
Loading…
Reference in New Issue
Block a user