ncca-ngl 0.3.2__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/PKG-INFO +1 -1
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/pyproject.toml +1 -1
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/lookatwidget.py +33 -2
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/transformwidget.py +22 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/LICENSE.txt +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/.ruff_cache/.gitignore +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/.ruff_cache/0.13.0/10564494386971134025 +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/.ruff_cache/0.13.0/7783445477288392980 +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/.ruff_cache/CACHEDIR.TAG +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/NGLDebug.log +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/Primitives.npz +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/buddah.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/bunny.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/cube.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/dodecahedron.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/dragon.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/football.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/icosahedron.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/octahedron.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/pack_arrays.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/teapot.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/tetrahedron.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/PrimData/troll.npy +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/__init__.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/abstract_vao.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/base_mesh.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/base_mesh.pyi +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/bbox.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/bezier_curve.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/first_person_camera.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/image.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/log.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/mat2.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/mat3.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/mat4.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/multi_buffer_vao.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/obj.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/plane.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/prim_data.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/primitives.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/pyside_event_handling_mixin.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/quaternion.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/random.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shader.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shader_lib.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shader_program.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/checker_fragment.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/checker_vertex.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/colour_fragment.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/colour_vertex.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/diffuse_fragment.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/diffuse_vertex.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/text_fragment.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/text_geometry.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/shaders/text_vertex.glsl +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/simple_index_vao.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/simple_vao.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/text.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/texture.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/transform.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/util.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vao_factory.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vec2.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vec2_array.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vec3.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vec3_array.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vec4.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/vec4_array.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/NGLDebug.log +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/__init__.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/__main__.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/glsl/phong.frag +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/glsl/phong.vert +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/glsl/picking.frag +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/glsl/picking.vert +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/mat4widget.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/rgbacolourwidget.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/rgbcolourwidget.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/transformation_widget.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/vec2widget.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/vec3widget.py +0 -0
- {ncca_ngl-0.3.2 → ncca_ngl-0.3.4}/src/ncca/ngl/widgets/vec4widget.py +0 -0
|
@@ -10,6 +10,7 @@ class LookAtWidget(QFrame):
|
|
|
10
10
|
"""A widget for displaying and editing a Transform object, with foldable sections."""
|
|
11
11
|
|
|
12
12
|
valueChanged = Signal(Mat4)
|
|
13
|
+
world_up = [Vec3(0, 1, 0), Vec3(1, 0, 0), Vec3(0, 0, 1)]
|
|
13
14
|
|
|
14
15
|
def __init__(self, parent: QWidget | None = None, name: str = "", eye=Vec3(2, 2, 2), look=Vec3(0, 0, 0)) -> None:
|
|
15
16
|
"""
|
|
@@ -53,6 +54,31 @@ class LookAtWidget(QFrame):
|
|
|
53
54
|
main_layout.addWidget(self._toggle_button)
|
|
54
55
|
main_layout.addWidget(self._content_widget)
|
|
55
56
|
|
|
57
|
+
def set_eye(self, eye):
|
|
58
|
+
self._eye.set_value(eye)
|
|
59
|
+
|
|
60
|
+
def set_look(self, look):
|
|
61
|
+
self._look.set_value(look)
|
|
62
|
+
|
|
63
|
+
def set_up(self, up):
|
|
64
|
+
self._up.setCurrentIndex(up)
|
|
65
|
+
|
|
66
|
+
def set_name(self, name):
|
|
67
|
+
self._name = name
|
|
68
|
+
self._toggle_button.setText(name)
|
|
69
|
+
|
|
70
|
+
def get_name(self):
|
|
71
|
+
return self._name.text()
|
|
72
|
+
|
|
73
|
+
def get_eye(self):
|
|
74
|
+
return self._eye.value
|
|
75
|
+
|
|
76
|
+
def get_look(self):
|
|
77
|
+
return self._look.value
|
|
78
|
+
|
|
79
|
+
def get_up(self):
|
|
80
|
+
return self.world_up[self._up.currentIndex()]
|
|
81
|
+
|
|
56
82
|
def toggle_collapsed(self, checked: bool) -> None:
|
|
57
83
|
"""Toggles the visibility of the content widget."""
|
|
58
84
|
if checked:
|
|
@@ -66,8 +92,8 @@ class LookAtWidget(QFrame):
|
|
|
66
92
|
"""Updates the view matrix based on the widget values."""
|
|
67
93
|
eye = self._eye.value
|
|
68
94
|
look = self._look.value
|
|
69
|
-
|
|
70
|
-
up = world_up[self._up.currentIndex()]
|
|
95
|
+
|
|
96
|
+
up = self.world_up[self._up.currentIndex()]
|
|
71
97
|
|
|
72
98
|
self._view = look_at(eye, look, up)
|
|
73
99
|
self.valueChanged.emit(self._view)
|
|
@@ -75,3 +101,8 @@ class LookAtWidget(QFrame):
|
|
|
75
101
|
def view(self) -> Mat4:
|
|
76
102
|
"""Returns the current view matrix."""
|
|
77
103
|
return self._view
|
|
104
|
+
|
|
105
|
+
name = Property(str, get_name, set_name)
|
|
106
|
+
eye = Property(Vec3, get_eye, set_eye)
|
|
107
|
+
look = Property(Vec3, get_look, set_look)
|
|
108
|
+
up = Property(Vec3, get_up, set_up)
|
|
@@ -40,8 +40,12 @@ class TransformWidget(QFrame):
|
|
|
40
40
|
content_layout.setContentsMargins(0, 0, 0, 0)
|
|
41
41
|
|
|
42
42
|
self._position = Vec3Widget(self, "Position", Vec3(0.0, 0.0, 0.0))
|
|
43
|
+
self._position.set_range(-20, 20)
|
|
43
44
|
self._rotation = Vec3Widget(self, "Rotation", Vec3(0.0, 0.0, 0.0))
|
|
45
|
+
self._rotation.set_range(-360, 360)
|
|
44
46
|
self._scale = Vec3Widget(self, "Scale", Vec3(1.0, 1.0, 1.0))
|
|
47
|
+
self._scale.set_range(-20, 20)
|
|
48
|
+
|
|
45
49
|
self._rot_order = QComboBox(self)
|
|
46
50
|
for v in self._rotation_order:
|
|
47
51
|
self._rot_order.addItem(v)
|
|
@@ -79,3 +83,21 @@ class TransformWidget(QFrame):
|
|
|
79
83
|
tx.set_scale(scale.x, scale.y, scale.z)
|
|
80
84
|
print(tx.get_matrix())
|
|
81
85
|
self.valueChanged.emit(tx.get_matrix())
|
|
86
|
+
|
|
87
|
+
def name(self) -> str:
|
|
88
|
+
"""
|
|
89
|
+
Returns:
|
|
90
|
+
The name of the widget.
|
|
91
|
+
"""
|
|
92
|
+
return self._name
|
|
93
|
+
|
|
94
|
+
def set_name(self, name: str) -> None:
|
|
95
|
+
"""Sets the name of the widget.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
name: The new name of the widget.
|
|
99
|
+
"""
|
|
100
|
+
self._name = name
|
|
101
|
+
self._toggle_button.setText(name)
|
|
102
|
+
|
|
103
|
+
name = Property(str, name, set_name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|