-
Notifications
You must be signed in to change notification settings - Fork 42
/
.personaltypes.py
53 lines (46 loc) · 1.67 KB
/
.personaltypes.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
from dumper import *
# Qt Creator Debuggin Helpers for glm vec3,vec4,mat3, and mat4 types
def qdump__glm__vec3(d, value):
d.putValue('[%s, %s, %s]' % (value["x"].display(), value["y"].display(), value["z"].display()))
d.putNumChild(1)
if d.isExpanded():
with Children(d):
d.putSubItem("x", value["x"])
d.putSubItem("y", value["y"])
d.putSubItem("z", value["z"])
def qdump__glm__vec4(d, value):
d.putValue('[%s, %s, %s, %s]' % (value["x"].display(), value["y"].display(), value["z"].display(), value["w"].display()))
d.putNumChild(1)
if d.isExpanded():
with Children(d):
d.putSubItem("x", value["x"])
d.putSubItem("y", value["y"])
d.putSubItem("z", value["z"])
d.putSubItem("w", value["w"])
def qdump__glm__mat__col_type(d, value):
vecSize = (value).type.size() / 4
if vecSize == 4:
d.putBetterType("glm::vec4")
qdump__glm__vec4(d, value)
elif vecSize == 3:
d.putBetterType("glm::vec3")
qdump__glm__vec3(d, value)
else:
pass
def qdump__glm__mat4(d, value):
d.putValue("<4 columns>")
d.putNumChild(1)
if d.isExpanded():
with Children(d, value):
d.putSubItem("[0]",value[0][0])
d.putSubItem("[1]",value[0][1])
d.putSubItem("[2]",value[0][2])
d.putSubItem("[3]",value[0][3])
def qdump__glm__mat3(d, value):
d.putValue("<3 columns>")
d.putNumChild(1)
if d.isExpanded():
with Children(d, value):
d.putSubItem("[0]",value[0][0])
d.putSubItem("[1]",value[0][1])
d.putSubItem("[2]",value[0][2])