q3dviewer 1.0.5__py3-none-any.whl → 1.0.6__py3-none-any.whl
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.
- q3dviewer/custom_items/cloud_item.py +10 -11
- {q3dviewer-1.0.5.dist-info → q3dviewer-1.0.6.dist-info}/METADATA +1 -1
- {q3dviewer-1.0.5.dist-info → q3dviewer-1.0.6.dist-info}/RECORD +7 -7
- {q3dviewer-1.0.5.dist-info → q3dviewer-1.0.6.dist-info}/LICENSE +0 -0
- {q3dviewer-1.0.5.dist-info → q3dviewer-1.0.6.dist-info}/WHEEL +0 -0
- {q3dviewer-1.0.5.dist-info → q3dviewer-1.0.6.dist-info}/entry_points.txt +0 -0
- {q3dviewer-1.0.5.dist-info → q3dviewer-1.0.6.dist-info}/top_level.txt +0 -0
|
@@ -201,17 +201,6 @@ class CloudItem(BaseItem):
|
|
|
201
201
|
self.wait_add_data = data
|
|
202
202
|
self.add_buff_loc = 0
|
|
203
203
|
|
|
204
|
-
while self.add_buff_loc + self.wait_add_data.shape[0] > self.max_cloud_size:
|
|
205
|
-
# Randomly select half of the points
|
|
206
|
-
print(
|
|
207
|
-
"Warning: Buffer size exceeds the maximum cloud size. Randomly selecting half of the points.")
|
|
208
|
-
indices = np.random.choice(
|
|
209
|
-
self.add_buff_loc, self.add_buff_loc // 2, replace=False)
|
|
210
|
-
self.buff[:self.add_buff_loc // 2] = self.buff[indices]
|
|
211
|
-
self.add_buff_loc //= 2
|
|
212
|
-
indices = np.random.choice(
|
|
213
|
-
self.wait_add_data.shape[0], self.wait_add_data.shape[0] // 2, replace=False)
|
|
214
|
-
self.wait_add_data = self.wait_add_data[indices]
|
|
215
204
|
|
|
216
205
|
def update_setting(self):
|
|
217
206
|
if (self.need_update_setting is False):
|
|
@@ -245,6 +234,16 @@ class CloudItem(BaseItem):
|
|
|
245
234
|
new_buff[:self.add_buff_loc] = self.buff[:self.add_buff_loc]
|
|
246
235
|
new_buff[self.add_buff_loc:new_buff_top] = self.wait_add_data
|
|
247
236
|
self.buff = new_buff
|
|
237
|
+
|
|
238
|
+
# if exceed the maximum cloud size, randomly select half of the points
|
|
239
|
+
while self.buff.shape[0] >= self.max_cloud_size:
|
|
240
|
+
print("[Cloud Item] Exceed maximum cloud size, reduce to half")
|
|
241
|
+
new_buff = np.empty((self.buff.shape[0] // 2), self.data_type)
|
|
242
|
+
indices = np.random.choice(new_buff_top, new_buff_top // 2, replace=False)
|
|
243
|
+
new_buff = self.buff[indices]
|
|
244
|
+
new_buff_top = new_buff_top // 2
|
|
245
|
+
self.buff = new_buff
|
|
246
|
+
|
|
248
247
|
glBindBuffer(GL_ARRAY_BUFFER, self.vbo)
|
|
249
248
|
glBufferData(GL_ARRAY_BUFFER, self.buff.nbytes,
|
|
250
249
|
self.buff, GL_DYNAMIC_DRAW)
|
|
@@ -7,7 +7,7 @@ q3dviewer/viewer.py,sha256=Rv_YMo-N2kibh4Bnaz0g32hEtNyn8WXRmoh7GTSPcJg,1708
|
|
|
7
7
|
q3dviewer/custom_items/__init__.py,sha256=gOiAxdjDaAnFL8YbqSEWWWOwUrJfvzP9JLR34sCB9-4,434
|
|
8
8
|
q3dviewer/custom_items/axis_item.py,sha256=6dWGqBeA3DL-9xmsxdmTSIGLs6BcRbiysBKkkXVb5oI,4456
|
|
9
9
|
q3dviewer/custom_items/cloud_io_item.py,sha256=gjK3n9WKB7JwxC93ijkweEHA5EezpgNJ8KO-PBaDKCs,2835
|
|
10
|
-
q3dviewer/custom_items/cloud_item.py,sha256=
|
|
10
|
+
q3dviewer/custom_items/cloud_item.py,sha256=u9hHHFjK4Ls6ssFVbBFqdR2xg0QNmgsKOz9jGHSqrt8,12444
|
|
11
11
|
q3dviewer/custom_items/frame_item.py,sha256=YTBOEeRWh95trhAlKoZ9LZ4I2x-A5JjOhNPp4OvD5E0,6983
|
|
12
12
|
q3dviewer/custom_items/gaussian_item.py,sha256=B0mYjlW83Kr6FUtZ6P_f40pjjiASPB8g3CSjMTnjsvY,9857
|
|
13
13
|
q3dviewer/custom_items/grid_item.py,sha256=U4nk16d5Dkbt6U9s23c9PIlG-wPwu15Ho0HsamDuyqM,3436
|
|
@@ -33,9 +33,9 @@ q3dviewer/utils/convert_ros_msg.py,sha256=VJeleSqp4rMYGCOyrwoXiJveBanTQMM6MEzRMj
|
|
|
33
33
|
q3dviewer/utils/gl_helper.py,sha256=dRY_kUqyPMr7NTcupUr6_VTvgnj53iE2C0Lk0-oFYsI,1435
|
|
34
34
|
q3dviewer/utils/maths.py,sha256=ghnZQYxQtAQonTqQOmfHAMdSluk0sO1Ps_9bL2vMeb8,5397
|
|
35
35
|
q3dviewer/utils/range_slider.py,sha256=jZJQL-uQgnpgLvtYSWpKTrJlLkt3aqNpaRQAePEpNd0,3174
|
|
36
|
-
q3dviewer-1.0.
|
|
37
|
-
q3dviewer-1.0.
|
|
38
|
-
q3dviewer-1.0.
|
|
39
|
-
q3dviewer-1.0.
|
|
40
|
-
q3dviewer-1.0.
|
|
41
|
-
q3dviewer-1.0.
|
|
36
|
+
q3dviewer-1.0.6.dist-info/LICENSE,sha256=81cMOyNfw8KLb1JnPYngGHJ5W83gSbZEBU9MEP3tl-E,1124
|
|
37
|
+
q3dviewer-1.0.6.dist-info/METADATA,sha256=U3PKiEPPLKQWTa53XkcutQQtOuoKEHl72ZadqG4EJfM,252
|
|
38
|
+
q3dviewer-1.0.6.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
|
|
39
|
+
q3dviewer-1.0.6.dist-info/entry_points.txt,sha256=6zSxtJ5cjcpc32sR_wkRqOaeiJFpEuLnJQckZE3niU0,316
|
|
40
|
+
q3dviewer-1.0.6.dist-info/top_level.txt,sha256=HFFDCbGu28txcGe2HPc46A7EPaguBa_b5oH7bufmxHM,10
|
|
41
|
+
q3dviewer-1.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|