77
88@wp .kernel
99def wp_gather_indexed_rows_3d (
10- src : wp .array3d (dtype = wp .float32 ), # type: ignore
11- dst : wp .array3d (dtype = wp .float32 ), # type: ignore
12- rows : wp .array (dtype = wp .int32 ), # type: ignore
10+ src : wp .array3d [float ], dst : wp .array3d [float ], rows : wp .array [int ]
1311):
1412 """Gather specific rows (dim 1) from a 3D Warp array into a narrower destination.
1513
@@ -30,9 +28,7 @@ def wp_gather_indexed_rows_3d(
3028
3129@wp .kernel
3230def wp_gather_indexed_rows_vec3f (
33- src : wp .array2d (dtype = wp .vec3f ), # type: ignore
34- dst : wp .array3d (dtype = wp .float32 ), # type: ignore
35- rows : wp .array (dtype = wp .int32 ), # type: ignore
31+ src : wp .array2d [wp .vec3 ], dst : wp .array3d [float ], rows : wp .array [int ]
3632):
3733 """Gather specific rows from a 2D ``vec3f`` array into a ``(n_worlds, n_rows_narrow, 3)``
3834 ``float32`` destination.
@@ -57,9 +53,7 @@ def wp_gather_indexed_rows_vec3f(
5753
5854@wp .kernel
5955def wp_gather_indexed_rows_quatf (
60- src : wp .array2d (dtype = wp .quatf ), # type: ignore
61- dst : wp .array3d (dtype = wp .float32 ), # type: ignore
62- rows : wp .array (dtype = wp .int32 ), # type: ignore
56+ src : wp .array2d [wp .quat ], dst : wp .array3d [float ], rows : wp .array [int ]
6357):
6458 """Gather specific rows from a 2D ``quatf`` array into a ``(n_worlds, n_rows_narrow, 4)``
6559 ``float32`` destination.
@@ -85,9 +79,7 @@ def wp_gather_indexed_rows_quatf(
8579
8680@wp .kernel
8781def wp_scatter_indexed_cols_2d (
88- src : wp .array2d (dtype = wp .float32 ), # type: ignore
89- dst : wp .array2d (dtype = wp .float32 ), # type: ignore
90- cols : wp .array (dtype = wp .int32 ), # type: ignore
82+ src : wp .array2d [float ], dst : wp .array2d [float ], cols : wp .array [int ]
9183):
9284 """Scatter a 2D Warp array into specific columns of a wider destination array.
9385
@@ -108,9 +100,7 @@ def wp_scatter_indexed_cols_2d(
108100
109101@wp .kernel
110102def wp_gather_indexed_cols_2d (
111- src : wp .array2d (dtype = wp .float32 ), # type: ignore
112- dst : wp .array2d (dtype = wp .float32 ), # type: ignore
113- cols : wp .array (dtype = wp .int32 ), # type: ignore
103+ src : wp .array2d [float ], dst : wp .array2d [float ], cols : wp .array [int ]
114104):
115105 """Gather specific columns from a 2D Warp array into a narrower destination array.
116106
@@ -132,12 +122,12 @@ def wp_gather_indexed_cols_2d(
132122@wp .kernel
133123def unpack_rgb_kernel_selected_worlds_and_cameras (
134124 # In:
135- packed : wp .array2d ( dtype = wp .uint32 ), # type: ignore
136- rgb_adr : wp .array ( dtype = int ), # type: ignore
137- worldids_to_render : wp .array ( dtype = int ), # type: ignore
138- camids_to_render : wp .array ( dtype = int ), # type: ignore
125+ packed : wp .array2d [ wp .uint32 ],
126+ rgb_adr : wp .array [ int ],
127+ worldids_to_render : wp .array [ int ],
128+ camids_to_render : wp .array [ int ],
139129 # Out:
140- rgb_out : wp .array4d ( dtype = wp .vec3 ), # type: ignore
130+ rgb_out : wp .array4d [ wp .vec3 ],
141131):
142132 """Unpack ABGR uint32 packed pixel data into separate R, G, and B channels."""
143133 idx_within_worldids , idx_within_camids , pixelid = wp .tid ()
@@ -156,9 +146,9 @@ def unpack_rgb_kernel_selected_worlds_and_cameras(
156146
157147def get_rgb_selected_worlds_and_cameras (
158148 rc : mjw .RenderContext ,
159- worldids : wp .array ( dtype = int ), # type: ignore
160- camids : wp .array ( dtype = int ), # type: ignore
161- rgb_out : wp .array4d ( dtype = wp .vec3 ), # type: ignore
149+ worldids : wp .array [ int ],
150+ camids : wp .array [ int ],
151+ rgb_out : wp .array4d [ wp .vec3 ],
162152):
163153 """Get the RGB data output from the render context buffers for the selected worlds
164154 and cameras.
0 commit comments