differt-core 0.0.18__tar.gz → 0.0.20__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.
Files changed (52) hide show
  1. {differt_core-0.0.18 → differt_core-0.0.20}/Cargo.lock +1 -1
  2. {differt_core-0.0.18 → differt_core-0.0.20}/PKG-INFO +1 -1
  3. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/Cargo.toml +1 -1
  4. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/geometry/triangle_mesh.rs +17 -10
  5. {differt_core-0.0.18 → differt_core-0.0.20}/Cargo.toml +0 -0
  6. {differt_core-0.0.18 → differt_core-0.0.20}/README.md +0 -0
  7. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/LICENSE.md +0 -0
  8. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/README.md +0 -0
  9. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/benches/bench_main.rs +0 -0
  10. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/benches/benchmarks/graph_iterators.rs +0 -0
  11. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/benches/benchmarks/mod.rs +0 -0
  12. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/__init__.py +0 -0
  13. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/_lowlevel/__init__.pyi +0 -0
  14. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/_lowlevel/geometry/triangle_mesh.pyi +0 -0
  15. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/_lowlevel/rt/__init__.pyi +0 -0
  16. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/_lowlevel/rt/graph.pyi +0 -0
  17. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/_lowlevel/scene/sionna.pyi +0 -0
  18. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/_lowlevel/scene/triangle_scene.pyi +0 -0
  19. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/geometry/__init__.py +0 -0
  20. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/geometry/triangle_mesh.py +0 -0
  21. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/py.typed +0 -0
  22. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/rt/__init__.py +0 -0
  23. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/rt/graph.py +0 -0
  24. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/scene/__init__.py +0 -0
  25. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/scene/sionna.py +0 -0
  26. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/python/differt_core/scene/triangle_scene.py +0 -0
  27. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/geometry/mod.rs +0 -0
  28. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/lib.rs +0 -0
  29. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/rt/graph.rs +0 -0
  30. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/rt/mod.rs +0 -0
  31. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/scene/mod.rs +0 -0
  32. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/scene/sionna.rs +0 -0
  33. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/src/scene/triangle_scene.rs +0 -0
  34. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/tests/__init__.py +0 -0
  35. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/tests/rt/__init__.py +0 -0
  36. {differt_core-0.0.18 → differt_core-0.0.20}/differt-core/tests/rt/test_graph.py +0 -0
  37. {differt_core-0.0.18 → differt_core-0.0.20}/pyproject.toml +0 -0
  38. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/__init__.py +0 -0
  39. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/_lowlevel/__init__.pyi +0 -0
  40. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/_lowlevel/geometry/triangle_mesh.pyi +0 -0
  41. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/_lowlevel/rt/__init__.pyi +0 -0
  42. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/_lowlevel/rt/graph.pyi +0 -0
  43. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/_lowlevel/scene/sionna.pyi +0 -0
  44. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/_lowlevel/scene/triangle_scene.pyi +0 -0
  45. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/geometry/__init__.py +0 -0
  46. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/geometry/triangle_mesh.py +0 -0
  47. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/py.typed +0 -0
  48. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/rt/__init__.py +0 -0
  49. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/rt/graph.py +0 -0
  50. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/scene/__init__.py +0 -0
  51. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/scene/sionna.py +0 -0
  52. {differt_core-0.0.18 → differt_core-0.0.20}/python/differt_core/scene/triangle_scene.py +0 -0
@@ -238,7 +238,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
238
238
 
239
239
  [[package]]
240
240
  name = "differt-core"
241
- version = "0.0.18"
241
+ version = "0.0.20"
242
242
  dependencies = [
243
243
  "criterion",
244
244
  "indexmap",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: differt-core
3
- Version: 0.0.18
3
+ Version: 0.0.20
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.9
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -36,4 +36,4 @@ unexpected_cfgs = {level = "warn", check-cfg = ['cfg(tarpaulin_include)']}
36
36
  edition = "2021"
37
37
  name = "differt-core"
38
38
  rust-version = "1.75.0"
39
- version = "0.0.18"
39
+ version = "0.0.20"
@@ -119,21 +119,24 @@ impl TriangleMesh {
119
119
 
120
120
  #[pymethods]
121
121
  impl TriangleMesh {
122
- /// jaxtyping.Float[np.ndarray, 'num_vertices 3']: The array of triangle vertices.
122
+ /// jaxtyping.Float[np.ndarray, 'num_vertices 3']: The array of triangle
123
+ /// vertices.
123
124
  #[getter]
124
125
  fn vertices<'py>(&self, py: Python<'py>) -> Bound<'py, PyArray2<f32>> {
125
126
  let array = arr2(&self.vertices);
126
127
  PyArray2::from_owned_array_bound(py, array)
127
128
  }
128
129
 
129
- /// jaxtyping.Int[np.ndarray, 'num_triangles 3']: The array of triangle indices.
130
+ /// jaxtyping.Int[np.ndarray, 'num_triangles 3']: The array of triangle
131
+ /// indices.
130
132
  #[getter]
131
133
  fn triangles<'py>(&self, py: Python<'py>) -> Bound<'py, PyArray2<usize>> {
132
134
  let array = arr2(&self.triangles);
133
135
  PyArray2::from_owned_array_bound(py, array)
134
136
  }
135
137
 
136
- /// jaxtyping.Float[numpy.ndarray, 'num_vertices 3'] | None: The array of face colors.
138
+ /// jaxtyping.Float[numpy.ndarray, 'num_vertices 3'] | None: The array of
139
+ /// face colors.
137
140
  ///
138
141
  /// The array contains the face colors, as RGB triplets,
139
142
  /// with a black color used as defaults (if some faces have a color).
@@ -147,7 +150,8 @@ impl TriangleMesh {
147
150
  None
148
151
  }
149
152
 
150
- /// jaxtyping.Int[numpy.ndarray, 'num_vertices'] | None: The array of face materials.
153
+ /// jaxtyping.Int[numpy.ndarray, 'num_vertices'] | None: The array of face
154
+ /// materials.
151
155
  ///
152
156
  /// The array contains the material indices,
153
157
  /// with a special placeholder value of :data:`-1`.
@@ -161,7 +165,8 @@ impl TriangleMesh {
161
165
  None
162
166
  }
163
167
 
164
- /// jaxtyping.Int[numpy.ndarray, 'num_objects 2'] | None: The array of object indices.
168
+ /// jaxtyping.Int[numpy.ndarray, 'num_objects 2'] | None: The array of
169
+ /// object indices.
165
170
  ///
166
171
  /// If the present mesh contains multiple objects, usually as a result of
167
172
  /// appending multiple meshes together, this array contain start end end
@@ -237,26 +242,28 @@ impl TriangleMesh {
237
242
  x.append(y);
238
243
  }
239
244
 
240
- let offset = self.vertices.len();
245
+ let index_offset = self.vertices.len();
246
+ let bound_offset = self.triangles.len();
241
247
  self.vertices.append(&mut other.vertices);
242
248
 
243
249
  self.triangles.reserve(other.triangles.len());
244
250
 
245
251
  for [v0, v1, v2] in &other.triangles {
246
- self.triangles.push([v0 + offset, v1 + offset, v2 + offset]);
252
+ self.triangles
253
+ .push([v0 + index_offset, v1 + index_offset, v2 + index_offset]);
247
254
  }
248
255
 
249
256
  other.triangles.clear();
250
257
 
251
258
  self.object_bounds
252
259
  .get_or_insert_with(|| {
253
- if offset > 0 {
254
- vec![[0, offset]]
260
+ if bound_offset > 0 {
261
+ vec![[0, bound_offset]]
255
262
  } else {
256
263
  vec![]
257
264
  }
258
265
  })
259
- .push([offset, self.vertices.len()]);
266
+ .push([bound_offset, self.triangles.len()]);
260
267
  }
261
268
 
262
269
  /// Load a triangle mesh from a Wavefront .obj file.
File without changes
File without changes