pymomentum-cpu 0.1.78.post11__cp312-cp312-win_amd64.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.
Potentially problematic release.
This version of pymomentum-cpu might be problematic. Click here for more details.
- include/axel/BoundingBox.h +58 -0
- include/axel/Bvh.h +708 -0
- include/axel/BvhBase.h +75 -0
- include/axel/BvhCommon.h +43 -0
- include/axel/BvhEmbree.h +86 -0
- include/axel/BvhFactory.h +34 -0
- include/axel/Checks.h +21 -0
- include/axel/DualContouring.h +79 -0
- include/axel/KdTree.h +199 -0
- include/axel/Log.h +22 -0
- include/axel/MeshToSdf.h +123 -0
- include/axel/Profile.h +64 -0
- include/axel/Ray.h +45 -0
- include/axel/SignedDistanceField.h +248 -0
- include/axel/SimdKdTree.h +515 -0
- include/axel/TriBvh.h +157 -0
- include/axel/TriBvhEmbree.h +57 -0
- include/axel/common/Constants.h +27 -0
- include/axel/common/Types.h +21 -0
- include/axel/common/VectorizationTypes.h +58 -0
- include/axel/math/BoundingBoxUtils.h +54 -0
- include/axel/math/ContinuousCollisionDetection.h +48 -0
- include/axel/math/CoplanarityCheck.h +30 -0
- include/axel/math/EdgeEdgeDistance.h +31 -0
- include/axel/math/MeshHoleFilling.h +117 -0
- include/axel/math/PointTriangleProjection.h +34 -0
- include/axel/math/PointTriangleProjectionDefinitions.h +209 -0
- include/axel/math/RayTriangleIntersection.h +36 -0
- include/momentum/character/blend_shape.h +91 -0
- include/momentum/character/blend_shape_base.h +70 -0
- include/momentum/character/blend_shape_skinning.h +96 -0
- include/momentum/character/character.h +272 -0
- include/momentum/character/character_state.h +108 -0
- include/momentum/character/character_utility.h +128 -0
- include/momentum/character/collision_geometry.h +80 -0
- include/momentum/character/collision_geometry_state.h +130 -0
- include/momentum/character/fwd.h +262 -0
- include/momentum/character/inverse_parameter_transform.h +58 -0
- include/momentum/character/joint.h +82 -0
- include/momentum/character/joint_state.h +241 -0
- include/momentum/character/linear_skinning.h +139 -0
- include/momentum/character/locator.h +82 -0
- include/momentum/character/locator_state.h +43 -0
- include/momentum/character/marker.h +48 -0
- include/momentum/character/mesh_state.h +71 -0
- include/momentum/character/parameter_limits.h +144 -0
- include/momentum/character/parameter_transform.h +250 -0
- include/momentum/character/pose_shape.h +65 -0
- include/momentum/character/skeleton.h +85 -0
- include/momentum/character/skeleton_state.h +181 -0
- include/momentum/character/skeleton_utility.h +38 -0
- include/momentum/character/skin_weights.h +67 -0
- include/momentum/character/skinned_locator.h +80 -0
- include/momentum/character/types.h +202 -0
- include/momentum/character_sequence_solver/fwd.h +200 -0
- include/momentum/character_sequence_solver/model_parameters_sequence_error_function.h +65 -0
- include/momentum/character_sequence_solver/multipose_solver.h +65 -0
- include/momentum/character_sequence_solver/multipose_solver_function.h +82 -0
- include/momentum/character_sequence_solver/sequence_error_function.h +104 -0
- include/momentum/character_sequence_solver/sequence_solver.h +144 -0
- include/momentum/character_sequence_solver/sequence_solver_function.h +134 -0
- include/momentum/character_sequence_solver/state_sequence_error_function.h +109 -0
- include/momentum/character_sequence_solver/vertex_sequence_error_function.h +128 -0
- include/momentum/character_solver/aim_error_function.h +112 -0
- include/momentum/character_solver/collision_error_function.h +92 -0
- include/momentum/character_solver/collision_error_function_stateless.h +75 -0
- include/momentum/character_solver/constraint_error_function-inl.h +324 -0
- include/momentum/character_solver/constraint_error_function.h +248 -0
- include/momentum/character_solver/distance_error_function.h +77 -0
- include/momentum/character_solver/error_function_utils.h +60 -0
- include/momentum/character_solver/fixed_axis_error_function.h +139 -0
- include/momentum/character_solver/fwd.h +924 -0
- include/momentum/character_solver/gauss_newton_solver_qr.h +64 -0
- include/momentum/character_solver/limit_error_function.h +57 -0
- include/momentum/character_solver/model_parameters_error_function.h +64 -0
- include/momentum/character_solver/normal_error_function.h +73 -0
- include/momentum/character_solver/orientation_error_function.h +74 -0
- include/momentum/character_solver/plane_error_function.h +102 -0
- include/momentum/character_solver/point_triangle_vertex_error_function.h +141 -0
- include/momentum/character_solver/pose_prior_error_function.h +80 -0
- include/momentum/character_solver/position_error_function.h +75 -0
- include/momentum/character_solver/projection_error_function.h +93 -0
- include/momentum/character_solver/simd_collision_error_function.h +99 -0
- include/momentum/character_solver/simd_normal_error_function.h +157 -0
- include/momentum/character_solver/simd_plane_error_function.h +164 -0
- include/momentum/character_solver/simd_position_error_function.h +165 -0
- include/momentum/character_solver/skeleton_error_function.h +151 -0
- include/momentum/character_solver/skeleton_solver_function.h +94 -0
- include/momentum/character_solver/skinned_locator_error_function.h +166 -0
- include/momentum/character_solver/skinned_locator_triangle_error_function.h +146 -0
- include/momentum/character_solver/skinning_weight_iterator.h +80 -0
- include/momentum/character_solver/state_error_function.h +94 -0
- include/momentum/character_solver/transform_pose.h +80 -0
- include/momentum/character_solver/trust_region_qr.h +80 -0
- include/momentum/character_solver/vertex_error_function.h +155 -0
- include/momentum/character_solver/vertex_projection_error_function.h +126 -0
- include/momentum/character_solver/vertex_vertex_distance_error_function.h +151 -0
- include/momentum/common/aligned.h +155 -0
- include/momentum/common/checks.h +27 -0
- include/momentum/common/exception.h +70 -0
- include/momentum/common/filesystem.h +20 -0
- include/momentum/common/fwd.h +27 -0
- include/momentum/common/log.h +173 -0
- include/momentum/common/log_channel.h +17 -0
- include/momentum/common/memory.h +71 -0
- include/momentum/common/profile.h +79 -0
- include/momentum/common/progress_bar.h +37 -0
- include/momentum/common/string.h +52 -0
- include/momentum/diff_ik/ceres_utility.h +73 -0
- include/momentum/diff_ik/fully_differentiable_body_ik.h +58 -0
- include/momentum/diff_ik/fully_differentiable_distance_error_function.h +69 -0
- include/momentum/diff_ik/fully_differentiable_motion_error_function.h +46 -0
- include/momentum/diff_ik/fully_differentiable_orientation_error_function.h +114 -0
- include/momentum/diff_ik/fully_differentiable_pose_prior_error_function.h +76 -0
- include/momentum/diff_ik/fully_differentiable_position_error_function.h +138 -0
- include/momentum/diff_ik/fully_differentiable_projection_error_function.h +65 -0
- include/momentum/diff_ik/fully_differentiable_skeleton_error_function.h +160 -0
- include/momentum/diff_ik/fully_differentiable_state_error_function.h +54 -0
- include/momentum/diff_ik/fwd.h +385 -0
- include/momentum/diff_ik/union_error_function.h +67 -0
- include/momentum/gui/rerun/eigen_adapters.h +70 -0
- include/momentum/gui/rerun/logger.h +102 -0
- include/momentum/gui/rerun/logging_redirect.h +27 -0
- include/momentum/io/character_io.h +56 -0
- include/momentum/io/common/gsl_utils.h +50 -0
- include/momentum/io/common/stream_utils.h +65 -0
- include/momentum/io/fbx/fbx_io.h +109 -0
- include/momentum/io/fbx/fbx_memory_stream.h +66 -0
- include/momentum/io/fbx/openfbx_loader.h +49 -0
- include/momentum/io/fbx/polygon_data.h +60 -0
- include/momentum/io/gltf/gltf_builder.h +132 -0
- include/momentum/io/gltf/gltf_file_format.h +19 -0
- include/momentum/io/gltf/gltf_io.h +148 -0
- include/momentum/io/gltf/utils/accessor_utils.h +299 -0
- include/momentum/io/gltf/utils/coordinate_utils.h +60 -0
- include/momentum/io/gltf/utils/json_utils.h +102 -0
- include/momentum/io/legacy_json/legacy_json_io.h +70 -0
- include/momentum/io/marker/c3d_io.h +29 -0
- include/momentum/io/marker/conversions.h +57 -0
- include/momentum/io/marker/coordinate_system.h +30 -0
- include/momentum/io/marker/marker_io.h +54 -0
- include/momentum/io/marker/trc_io.h +27 -0
- include/momentum/io/motion/mmo_io.h +97 -0
- include/momentum/io/shape/blend_shape_io.h +70 -0
- include/momentum/io/shape/pose_shape_io.h +21 -0
- include/momentum/io/skeleton/locator_io.h +41 -0
- include/momentum/io/skeleton/mppca_io.h +26 -0
- include/momentum/io/skeleton/parameter_limits_io.h +25 -0
- include/momentum/io/skeleton/parameter_transform_io.h +41 -0
- include/momentum/io/skeleton/parameters_io.h +20 -0
- include/momentum/io/urdf/urdf_io.h +26 -0
- include/momentum/io/usd/usd_io.h +36 -0
- include/momentum/marker_tracking/app_utils.h +62 -0
- include/momentum/marker_tracking/marker_tracker.h +213 -0
- include/momentum/marker_tracking/process_markers.h +58 -0
- include/momentum/marker_tracking/tracker_utils.h +90 -0
- include/momentum/math/constants.h +82 -0
- include/momentum/math/covariance_matrix.h +84 -0
- include/momentum/math/fmt_eigen.h +23 -0
- include/momentum/math/fwd.h +132 -0
- include/momentum/math/generalized_loss.h +61 -0
- include/momentum/math/intersection.h +32 -0
- include/momentum/math/mesh.h +84 -0
- include/momentum/math/mppca.h +67 -0
- include/momentum/math/online_householder_qr.h +516 -0
- include/momentum/math/random-inl.h +404 -0
- include/momentum/math/random.h +310 -0
- include/momentum/math/simd_generalized_loss.h +40 -0
- include/momentum/math/transform.h +229 -0
- include/momentum/math/types.h +461 -0
- include/momentum/math/utility.h +251 -0
- include/momentum/rasterizer/camera.h +453 -0
- include/momentum/rasterizer/fwd.h +102 -0
- include/momentum/rasterizer/geometry.h +83 -0
- include/momentum/rasterizer/image.h +18 -0
- include/momentum/rasterizer/rasterizer.h +583 -0
- include/momentum/rasterizer/tensor.h +140 -0
- include/momentum/rasterizer/utility.h +268 -0
- include/momentum/simd/simd.h +221 -0
- include/momentum/solver/fwd.h +131 -0
- include/momentum/solver/gauss_newton_solver.h +136 -0
- include/momentum/solver/gradient_descent_solver.h +65 -0
- include/momentum/solver/solver.h +155 -0
- include/momentum/solver/solver_function.h +126 -0
- include/momentum/solver/subset_gauss_newton_solver.h +109 -0
- include/rerun/archetypes/annotation_context.hpp +157 -0
- include/rerun/archetypes/arrows2d.hpp +271 -0
- include/rerun/archetypes/arrows3d.hpp +257 -0
- include/rerun/archetypes/asset3d.hpp +262 -0
- include/rerun/archetypes/asset_video.hpp +275 -0
- include/rerun/archetypes/bar_chart.hpp +261 -0
- include/rerun/archetypes/boxes2d.hpp +293 -0
- include/rerun/archetypes/boxes3d.hpp +369 -0
- include/rerun/archetypes/capsules3d.hpp +333 -0
- include/rerun/archetypes/clear.hpp +180 -0
- include/rerun/archetypes/depth_image.hpp +425 -0
- include/rerun/archetypes/ellipsoids3d.hpp +384 -0
- include/rerun/archetypes/encoded_image.hpp +250 -0
- include/rerun/archetypes/geo_line_strings.hpp +166 -0
- include/rerun/archetypes/geo_points.hpp +177 -0
- include/rerun/archetypes/graph_edges.hpp +152 -0
- include/rerun/archetypes/graph_nodes.hpp +206 -0
- include/rerun/archetypes/image.hpp +434 -0
- include/rerun/archetypes/instance_poses3d.hpp +221 -0
- include/rerun/archetypes/line_strips2d.hpp +289 -0
- include/rerun/archetypes/line_strips3d.hpp +270 -0
- include/rerun/archetypes/mesh3d.hpp +387 -0
- include/rerun/archetypes/pinhole.hpp +385 -0
- include/rerun/archetypes/points2d.hpp +333 -0
- include/rerun/archetypes/points3d.hpp +369 -0
- include/rerun/archetypes/recording_properties.hpp +132 -0
- include/rerun/archetypes/scalar.hpp +170 -0
- include/rerun/archetypes/scalars.hpp +153 -0
- include/rerun/archetypes/segmentation_image.hpp +305 -0
- include/rerun/archetypes/series_line.hpp +274 -0
- include/rerun/archetypes/series_lines.hpp +271 -0
- include/rerun/archetypes/series_point.hpp +265 -0
- include/rerun/archetypes/series_points.hpp +251 -0
- include/rerun/archetypes/tensor.hpp +213 -0
- include/rerun/archetypes/text_document.hpp +200 -0
- include/rerun/archetypes/text_log.hpp +211 -0
- include/rerun/archetypes/transform3d.hpp +925 -0
- include/rerun/archetypes/video_frame_reference.hpp +295 -0
- include/rerun/archetypes/view_coordinates.hpp +393 -0
- include/rerun/archetypes.hpp +43 -0
- include/rerun/arrow_utils.hpp +32 -0
- include/rerun/as_components.hpp +90 -0
- include/rerun/blueprint/archetypes/background.hpp +113 -0
- include/rerun/blueprint/archetypes/container_blueprint.hpp +259 -0
- include/rerun/blueprint/archetypes/dataframe_query.hpp +178 -0
- include/rerun/blueprint/archetypes/entity_behavior.hpp +130 -0
- include/rerun/blueprint/archetypes/force_center.hpp +115 -0
- include/rerun/blueprint/archetypes/force_collision_radius.hpp +141 -0
- include/rerun/blueprint/archetypes/force_link.hpp +136 -0
- include/rerun/blueprint/archetypes/force_many_body.hpp +124 -0
- include/rerun/blueprint/archetypes/force_position.hpp +132 -0
- include/rerun/blueprint/archetypes/line_grid3d.hpp +178 -0
- include/rerun/blueprint/archetypes/map_background.hpp +104 -0
- include/rerun/blueprint/archetypes/map_zoom.hpp +103 -0
- include/rerun/blueprint/archetypes/near_clip_plane.hpp +109 -0
- include/rerun/blueprint/archetypes/panel_blueprint.hpp +95 -0
- include/rerun/blueprint/archetypes/plot_legend.hpp +118 -0
- include/rerun/blueprint/archetypes/scalar_axis.hpp +116 -0
- include/rerun/blueprint/archetypes/tensor_scalar_mapping.hpp +146 -0
- include/rerun/blueprint/archetypes/tensor_slice_selection.hpp +167 -0
- include/rerun/blueprint/archetypes/tensor_view_fit.hpp +95 -0
- include/rerun/blueprint/archetypes/view_blueprint.hpp +170 -0
- include/rerun/blueprint/archetypes/view_contents.hpp +142 -0
- include/rerun/blueprint/archetypes/viewport_blueprint.hpp +200 -0
- include/rerun/blueprint/archetypes/visible_time_ranges.hpp +116 -0
- include/rerun/blueprint/archetypes/visual_bounds2d.hpp +109 -0
- include/rerun/blueprint/archetypes/visualizer_overrides.hpp +113 -0
- include/rerun/blueprint/archetypes.hpp +29 -0
- include/rerun/blueprint/components/active_tab.hpp +82 -0
- include/rerun/blueprint/components/apply_latest_at.hpp +79 -0
- include/rerun/blueprint/components/auto_layout.hpp +77 -0
- include/rerun/blueprint/components/auto_views.hpp +77 -0
- include/rerun/blueprint/components/background_kind.hpp +66 -0
- include/rerun/blueprint/components/column_share.hpp +78 -0
- include/rerun/blueprint/components/component_column_selector.hpp +81 -0
- include/rerun/blueprint/components/container_kind.hpp +65 -0
- include/rerun/blueprint/components/corner2d.hpp +64 -0
- include/rerun/blueprint/components/enabled.hpp +77 -0
- include/rerun/blueprint/components/filter_by_range.hpp +74 -0
- include/rerun/blueprint/components/filter_is_not_null.hpp +77 -0
- include/rerun/blueprint/components/force_distance.hpp +82 -0
- include/rerun/blueprint/components/force_iterations.hpp +82 -0
- include/rerun/blueprint/components/force_strength.hpp +82 -0
- include/rerun/blueprint/components/grid_columns.hpp +78 -0
- include/rerun/blueprint/components/grid_spacing.hpp +78 -0
- include/rerun/blueprint/components/included_content.hpp +86 -0
- include/rerun/blueprint/components/lock_range_during_zoom.hpp +82 -0
- include/rerun/blueprint/components/map_provider.hpp +64 -0
- include/rerun/blueprint/components/near_clip_plane.hpp +82 -0
- include/rerun/blueprint/components/panel_state.hpp +61 -0
- include/rerun/blueprint/components/query_expression.hpp +89 -0
- include/rerun/blueprint/components/root_container.hpp +77 -0
- include/rerun/blueprint/components/row_share.hpp +78 -0
- include/rerun/blueprint/components/selected_columns.hpp +76 -0
- include/rerun/blueprint/components/tensor_dimension_index_slider.hpp +90 -0
- include/rerun/blueprint/components/timeline_name.hpp +76 -0
- include/rerun/blueprint/components/view_class.hpp +76 -0
- include/rerun/blueprint/components/view_fit.hpp +61 -0
- include/rerun/blueprint/components/view_maximized.hpp +79 -0
- include/rerun/blueprint/components/view_origin.hpp +81 -0
- include/rerun/blueprint/components/viewer_recommendation_hash.hpp +82 -0
- include/rerun/blueprint/components/visible_time_range.hpp +77 -0
- include/rerun/blueprint/components/visual_bounds2d.hpp +74 -0
- include/rerun/blueprint/components/visualizer_override.hpp +86 -0
- include/rerun/blueprint/components/zoom_level.hpp +78 -0
- include/rerun/blueprint/components.hpp +41 -0
- include/rerun/blueprint/datatypes/component_column_selector.hpp +61 -0
- include/rerun/blueprint/datatypes/filter_by_range.hpp +59 -0
- include/rerun/blueprint/datatypes/filter_is_not_null.hpp +61 -0
- include/rerun/blueprint/datatypes/selected_columns.hpp +62 -0
- include/rerun/blueprint/datatypes/tensor_dimension_index_slider.hpp +63 -0
- include/rerun/blueprint/datatypes.hpp +9 -0
- include/rerun/c/arrow_c_data_interface.h +111 -0
- include/rerun/c/compiler_utils.h +10 -0
- include/rerun/c/rerun.h +627 -0
- include/rerun/c/sdk_info.h +28 -0
- include/rerun/collection.hpp +496 -0
- include/rerun/collection_adapter.hpp +43 -0
- include/rerun/collection_adapter_builtins.hpp +138 -0
- include/rerun/compiler_utils.hpp +61 -0
- include/rerun/component_batch.hpp +163 -0
- include/rerun/component_column.hpp +111 -0
- include/rerun/component_descriptor.hpp +142 -0
- include/rerun/component_type.hpp +35 -0
- include/rerun/components/aggregation_policy.hpp +76 -0
- include/rerun/components/albedo_factor.hpp +74 -0
- include/rerun/components/annotation_context.hpp +102 -0
- include/rerun/components/axis_length.hpp +74 -0
- include/rerun/components/blob.hpp +73 -0
- include/rerun/components/class_id.hpp +71 -0
- include/rerun/components/clear_is_recursive.hpp +75 -0
- include/rerun/components/color.hpp +99 -0
- include/rerun/components/colormap.hpp +99 -0
- include/rerun/components/depth_meter.hpp +84 -0
- include/rerun/components/draw_order.hpp +79 -0
- include/rerun/components/entity_path.hpp +83 -0
- include/rerun/components/fill_mode.hpp +72 -0
- include/rerun/components/fill_ratio.hpp +79 -0
- include/rerun/components/gamma_correction.hpp +80 -0
- include/rerun/components/geo_line_string.hpp +63 -0
- include/rerun/components/graph_edge.hpp +75 -0
- include/rerun/components/graph_node.hpp +79 -0
- include/rerun/components/graph_type.hpp +57 -0
- include/rerun/components/half_size2d.hpp +91 -0
- include/rerun/components/half_size3d.hpp +95 -0
- include/rerun/components/image_buffer.hpp +86 -0
- include/rerun/components/image_format.hpp +84 -0
- include/rerun/components/image_plane_distance.hpp +77 -0
- include/rerun/components/interactive.hpp +76 -0
- include/rerun/components/keypoint_id.hpp +74 -0
- include/rerun/components/lat_lon.hpp +89 -0
- include/rerun/components/length.hpp +77 -0
- include/rerun/components/line_strip2d.hpp +73 -0
- include/rerun/components/line_strip3d.hpp +73 -0
- include/rerun/components/magnification_filter.hpp +63 -0
- include/rerun/components/marker_shape.hpp +82 -0
- include/rerun/components/marker_size.hpp +74 -0
- include/rerun/components/media_type.hpp +157 -0
- include/rerun/components/name.hpp +83 -0
- include/rerun/components/opacity.hpp +77 -0
- include/rerun/components/pinhole_projection.hpp +94 -0
- include/rerun/components/plane3d.hpp +75 -0
- include/rerun/components/pose_rotation_axis_angle.hpp +73 -0
- include/rerun/components/pose_rotation_quat.hpp +71 -0
- include/rerun/components/pose_scale3d.hpp +102 -0
- include/rerun/components/pose_transform_mat3x3.hpp +87 -0
- include/rerun/components/pose_translation3d.hpp +96 -0
- include/rerun/components/position2d.hpp +86 -0
- include/rerun/components/position3d.hpp +90 -0
- include/rerun/components/radius.hpp +98 -0
- include/rerun/components/range1d.hpp +75 -0
- include/rerun/components/resolution.hpp +88 -0
- include/rerun/components/rotation_axis_angle.hpp +72 -0
- include/rerun/components/rotation_quat.hpp +71 -0
- include/rerun/components/scalar.hpp +76 -0
- include/rerun/components/scale3d.hpp +102 -0
- include/rerun/components/series_visible.hpp +76 -0
- include/rerun/components/show_labels.hpp +79 -0
- include/rerun/components/stroke_width.hpp +74 -0
- include/rerun/components/tensor_data.hpp +94 -0
- include/rerun/components/tensor_dimension_index_selection.hpp +77 -0
- include/rerun/components/tensor_height_dimension.hpp +71 -0
- include/rerun/components/tensor_width_dimension.hpp +71 -0
- include/rerun/components/texcoord2d.hpp +101 -0
- include/rerun/components/text.hpp +83 -0
- include/rerun/components/text_log_level.hpp +110 -0
- include/rerun/components/timestamp.hpp +76 -0
- include/rerun/components/transform_mat3x3.hpp +92 -0
- include/rerun/components/transform_relation.hpp +66 -0
- include/rerun/components/translation3d.hpp +96 -0
- include/rerun/components/triangle_indices.hpp +85 -0
- include/rerun/components/value_range.hpp +78 -0
- include/rerun/components/vector2d.hpp +92 -0
- include/rerun/components/vector3d.hpp +96 -0
- include/rerun/components/video_timestamp.hpp +120 -0
- include/rerun/components/view_coordinates.hpp +346 -0
- include/rerun/components/visible.hpp +74 -0
- include/rerun/components.hpp +77 -0
- include/rerun/config.hpp +52 -0
- include/rerun/datatypes/angle.hpp +76 -0
- include/rerun/datatypes/annotation_info.hpp +76 -0
- include/rerun/datatypes/blob.hpp +67 -0
- include/rerun/datatypes/bool.hpp +57 -0
- include/rerun/datatypes/channel_datatype.hpp +87 -0
- include/rerun/datatypes/class_description.hpp +92 -0
- include/rerun/datatypes/class_description_map_elem.hpp +69 -0
- include/rerun/datatypes/class_id.hpp +62 -0
- include/rerun/datatypes/color_model.hpp +68 -0
- include/rerun/datatypes/dvec2d.hpp +76 -0
- include/rerun/datatypes/entity_path.hpp +60 -0
- include/rerun/datatypes/float32.hpp +62 -0
- include/rerun/datatypes/float64.hpp +62 -0
- include/rerun/datatypes/image_format.hpp +107 -0
- include/rerun/datatypes/keypoint_id.hpp +63 -0
- include/rerun/datatypes/keypoint_pair.hpp +65 -0
- include/rerun/datatypes/mat3x3.hpp +105 -0
- include/rerun/datatypes/mat4x4.hpp +119 -0
- include/rerun/datatypes/pixel_format.hpp +142 -0
- include/rerun/datatypes/plane3d.hpp +60 -0
- include/rerun/datatypes/quaternion.hpp +110 -0
- include/rerun/datatypes/range1d.hpp +59 -0
- include/rerun/datatypes/range2d.hpp +55 -0
- include/rerun/datatypes/rgba32.hpp +94 -0
- include/rerun/datatypes/rotation_axis_angle.hpp +67 -0
- include/rerun/datatypes/tensor_buffer.hpp +529 -0
- include/rerun/datatypes/tensor_data.hpp +100 -0
- include/rerun/datatypes/tensor_dimension_index_selection.hpp +58 -0
- include/rerun/datatypes/tensor_dimension_selection.hpp +56 -0
- include/rerun/datatypes/time_int.hpp +62 -0
- include/rerun/datatypes/time_range.hpp +55 -0
- include/rerun/datatypes/time_range_boundary.hpp +175 -0
- include/rerun/datatypes/uint16.hpp +62 -0
- include/rerun/datatypes/uint32.hpp +62 -0
- include/rerun/datatypes/uint64.hpp +62 -0
- include/rerun/datatypes/utf8.hpp +76 -0
- include/rerun/datatypes/utf8pair.hpp +62 -0
- include/rerun/datatypes/uuid.hpp +60 -0
- include/rerun/datatypes/uvec2d.hpp +76 -0
- include/rerun/datatypes/uvec3d.hpp +80 -0
- include/rerun/datatypes/uvec4d.hpp +59 -0
- include/rerun/datatypes/vec2d.hpp +76 -0
- include/rerun/datatypes/vec3d.hpp +80 -0
- include/rerun/datatypes/vec4d.hpp +84 -0
- include/rerun/datatypes/video_timestamp.hpp +67 -0
- include/rerun/datatypes/view_coordinates.hpp +87 -0
- include/rerun/datatypes/visible_time_range.hpp +57 -0
- include/rerun/datatypes.hpp +51 -0
- include/rerun/demo_utils.hpp +75 -0
- include/rerun/entity_path.hpp +20 -0
- include/rerun/error.hpp +180 -0
- include/rerun/half.hpp +10 -0
- include/rerun/image_utils.hpp +187 -0
- include/rerun/indicator_component.hpp +59 -0
- include/rerun/loggable.hpp +54 -0
- include/rerun/recording_stream.hpp +960 -0
- include/rerun/rerun_sdk_export.hpp +25 -0
- include/rerun/result.hpp +86 -0
- include/rerun/rotation3d.hpp +33 -0
- include/rerun/sdk_info.hpp +20 -0
- include/rerun/spawn.hpp +21 -0
- include/rerun/spawn_options.hpp +57 -0
- include/rerun/string_utils.hpp +16 -0
- include/rerun/third_party/cxxopts.hpp +2198 -0
- include/rerun/time_column.hpp +288 -0
- include/rerun/timeline.hpp +38 -0
- include/rerun/type_traits.hpp +40 -0
- include/rerun.hpp +86 -0
- lib/arrow_bundled_dependencies.lib +0 -0
- lib/arrow_static.lib +0 -0
- lib/axel.lib +0 -0
- lib/cmake/axel/axel-config.cmake +45 -0
- lib/cmake/axel/axelTargets-release.cmake +19 -0
- lib/cmake/axel/axelTargets.cmake +108 -0
- lib/cmake/momentum/Findre2.cmake +52 -0
- lib/cmake/momentum/momentum-config.cmake +67 -0
- lib/cmake/momentum/momentumTargets-release.cmake +259 -0
- lib/cmake/momentum/momentumTargets.cmake +377 -0
- lib/cmake/rerun_sdk/rerun_sdkConfig.cmake +70 -0
- lib/cmake/rerun_sdk/rerun_sdkConfigVersion.cmake +83 -0
- lib/cmake/rerun_sdk/rerun_sdkTargets-release.cmake +19 -0
- lib/cmake/rerun_sdk/rerun_sdkTargets.cmake +108 -0
- lib/momentum_app_utils.lib +0 -0
- lib/momentum_character.lib +0 -0
- lib/momentum_character_sequence_solver.lib +0 -0
- lib/momentum_character_solver.lib +0 -0
- lib/momentum_common.lib +0 -0
- lib/momentum_diff_ik.lib +0 -0
- lib/momentum_io.lib +0 -0
- lib/momentum_io_common.lib +0 -0
- lib/momentum_io_fbx.lib +0 -0
- lib/momentum_io_gltf.lib +0 -0
- lib/momentum_io_legacy_json.lib +0 -0
- lib/momentum_io_marker.lib +0 -0
- lib/momentum_io_motion.lib +0 -0
- lib/momentum_io_shape.lib +0 -0
- lib/momentum_io_skeleton.lib +0 -0
- lib/momentum_io_urdf.lib +0 -0
- lib/momentum_marker_tracker.lib +0 -0
- lib/momentum_math.lib +0 -0
- lib/momentum_online_qr.lib +0 -0
- lib/momentum_process_markers.lib +0 -0
- lib/momentum_rerun.lib +0 -0
- lib/momentum_simd_constraints.lib +0 -0
- lib/momentum_simd_generalized_loss.lib +0 -0
- lib/momentum_skeleton.lib +0 -0
- lib/momentum_solver.lib +0 -0
- lib/rerun_c__win_x64.lib +0 -0
- lib/rerun_sdk.lib +0 -0
- pymomentum/axel.cp312-win_amd64.pyd +0 -0
- pymomentum/backend/__init__.py +16 -0
- pymomentum/backend/skel_state_backend.py +614 -0
- pymomentum/backend/trs_backend.py +871 -0
- pymomentum/backend/utils.py +224 -0
- pymomentum/geometry.cp312-win_amd64.pyd +0 -0
- pymomentum/marker_tracking.cp312-win_amd64.pyd +0 -0
- pymomentum/quaternion.py +740 -0
- pymomentum/skel_state.py +514 -0
- pymomentum/solver.cp312-win_amd64.pyd +0 -0
- pymomentum/solver2.cp312-win_amd64.pyd +0 -0
- pymomentum/torch/character.py +809 -0
- pymomentum/torch/parameter_limits.py +494 -0
- pymomentum/torch/utility.py +20 -0
- pymomentum/trs.py +535 -0
- pymomentum_cpu-0.1.78.post11.dist-info/METADATA +121 -0
- pymomentum_cpu-0.1.78.post11.dist-info/RECORD +512 -0
- pymomentum_cpu-0.1.78.post11.dist-info/WHEEL +5 -0
- pymomentum_cpu-0.1.78.post11.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
|
2
|
+
// Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs".
|
|
3
|
+
|
|
4
|
+
#pragma once
|
|
5
|
+
|
|
6
|
+
#include "../component_descriptor.hpp"
|
|
7
|
+
#include "../result.hpp"
|
|
8
|
+
#include "time_range.hpp"
|
|
9
|
+
#include "utf8.hpp"
|
|
10
|
+
|
|
11
|
+
#include <cstdint>
|
|
12
|
+
#include <memory>
|
|
13
|
+
|
|
14
|
+
namespace arrow {
|
|
15
|
+
class Array;
|
|
16
|
+
class DataType;
|
|
17
|
+
class StructBuilder;
|
|
18
|
+
} // namespace arrow
|
|
19
|
+
|
|
20
|
+
namespace rerun::datatypes {
|
|
21
|
+
/// **Datatype**: Visible time range bounds for a specific timeline.
|
|
22
|
+
struct VisibleTimeRange {
|
|
23
|
+
/// Name of the timeline this applies to.
|
|
24
|
+
rerun::datatypes::Utf8 timeline;
|
|
25
|
+
|
|
26
|
+
/// Time range to use for this timeline.
|
|
27
|
+
rerun::datatypes::TimeRange range;
|
|
28
|
+
|
|
29
|
+
public:
|
|
30
|
+
VisibleTimeRange() = default;
|
|
31
|
+
};
|
|
32
|
+
} // namespace rerun::datatypes
|
|
33
|
+
|
|
34
|
+
namespace rerun {
|
|
35
|
+
template <typename T>
|
|
36
|
+
struct Loggable;
|
|
37
|
+
|
|
38
|
+
/// \private
|
|
39
|
+
template <>
|
|
40
|
+
struct Loggable<datatypes::VisibleTimeRange> {
|
|
41
|
+
static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.VisibleTimeRange";
|
|
42
|
+
|
|
43
|
+
/// Returns the arrow data type this type corresponds to.
|
|
44
|
+
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
|
45
|
+
|
|
46
|
+
/// Serializes an array of `rerun::datatypes::VisibleTimeRange` into an arrow array.
|
|
47
|
+
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
|
48
|
+
const datatypes::VisibleTimeRange* instances, size_t num_instances
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/// Fills an arrow array builder with an array of this type.
|
|
52
|
+
static rerun::Error fill_arrow_array_builder(
|
|
53
|
+
arrow::StructBuilder* builder, const datatypes::VisibleTimeRange* elements,
|
|
54
|
+
size_t num_elements
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
} // namespace rerun
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
|
2
|
+
|
|
3
|
+
#pragma once
|
|
4
|
+
|
|
5
|
+
#include "datatypes/angle.hpp"
|
|
6
|
+
#include "datatypes/annotation_info.hpp"
|
|
7
|
+
#include "datatypes/blob.hpp"
|
|
8
|
+
#include "datatypes/bool.hpp"
|
|
9
|
+
#include "datatypes/channel_datatype.hpp"
|
|
10
|
+
#include "datatypes/class_description.hpp"
|
|
11
|
+
#include "datatypes/class_description_map_elem.hpp"
|
|
12
|
+
#include "datatypes/class_id.hpp"
|
|
13
|
+
#include "datatypes/color_model.hpp"
|
|
14
|
+
#include "datatypes/dvec2d.hpp"
|
|
15
|
+
#include "datatypes/entity_path.hpp"
|
|
16
|
+
#include "datatypes/float32.hpp"
|
|
17
|
+
#include "datatypes/float64.hpp"
|
|
18
|
+
#include "datatypes/image_format.hpp"
|
|
19
|
+
#include "datatypes/keypoint_id.hpp"
|
|
20
|
+
#include "datatypes/keypoint_pair.hpp"
|
|
21
|
+
#include "datatypes/mat3x3.hpp"
|
|
22
|
+
#include "datatypes/mat4x4.hpp"
|
|
23
|
+
#include "datatypes/pixel_format.hpp"
|
|
24
|
+
#include "datatypes/plane3d.hpp"
|
|
25
|
+
#include "datatypes/quaternion.hpp"
|
|
26
|
+
#include "datatypes/range1d.hpp"
|
|
27
|
+
#include "datatypes/range2d.hpp"
|
|
28
|
+
#include "datatypes/rgba32.hpp"
|
|
29
|
+
#include "datatypes/rotation_axis_angle.hpp"
|
|
30
|
+
#include "datatypes/tensor_buffer.hpp"
|
|
31
|
+
#include "datatypes/tensor_data.hpp"
|
|
32
|
+
#include "datatypes/tensor_dimension_index_selection.hpp"
|
|
33
|
+
#include "datatypes/tensor_dimension_selection.hpp"
|
|
34
|
+
#include "datatypes/time_int.hpp"
|
|
35
|
+
#include "datatypes/time_range.hpp"
|
|
36
|
+
#include "datatypes/time_range_boundary.hpp"
|
|
37
|
+
#include "datatypes/uint16.hpp"
|
|
38
|
+
#include "datatypes/uint32.hpp"
|
|
39
|
+
#include "datatypes/uint64.hpp"
|
|
40
|
+
#include "datatypes/utf8.hpp"
|
|
41
|
+
#include "datatypes/utf8pair.hpp"
|
|
42
|
+
#include "datatypes/uuid.hpp"
|
|
43
|
+
#include "datatypes/uvec2d.hpp"
|
|
44
|
+
#include "datatypes/uvec3d.hpp"
|
|
45
|
+
#include "datatypes/uvec4d.hpp"
|
|
46
|
+
#include "datatypes/vec2d.hpp"
|
|
47
|
+
#include "datatypes/vec3d.hpp"
|
|
48
|
+
#include "datatypes/vec4d.hpp"
|
|
49
|
+
#include "datatypes/video_timestamp.hpp"
|
|
50
|
+
#include "datatypes/view_coordinates.hpp"
|
|
51
|
+
#include "datatypes/visible_time_range.hpp"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
// Utilities used in examples.
|
|
4
|
+
|
|
5
|
+
#include <algorithm>
|
|
6
|
+
#include <cmath>
|
|
7
|
+
#include <vector>
|
|
8
|
+
|
|
9
|
+
#include "components/color.hpp"
|
|
10
|
+
#include "components/position3d.hpp"
|
|
11
|
+
|
|
12
|
+
namespace rerun {
|
|
13
|
+
namespace demo {
|
|
14
|
+
constexpr float PI = 3.14159265358979323846264338327950288f;
|
|
15
|
+
constexpr float TAU = 6.28318530717958647692528676655900577f;
|
|
16
|
+
|
|
17
|
+
/// A linear interpolator that bounces between `a` and `b` as `t` goes above `1.0`.
|
|
18
|
+
inline float bounce_lerp(float a, float b, float t) {
|
|
19
|
+
auto tf = t - floorf(t);
|
|
20
|
+
if (static_cast<int32_t>(t) % 2 == 0) {
|
|
21
|
+
return (1.0f - tf) * a + tf * b;
|
|
22
|
+
} else {
|
|
23
|
+
return tf * a + (1.0f - tf) * b;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// Linearly interpolates from `a` through `b` in `n` steps, returning the intermediate result at
|
|
28
|
+
/// each step.
|
|
29
|
+
template <typename T>
|
|
30
|
+
inline std::vector<T> linspace(T start, T end, size_t num) {
|
|
31
|
+
std::vector<T> linspaced(num);
|
|
32
|
+
std::generate(linspaced.begin(), linspaced.end(), [&, i = 0]() mutable {
|
|
33
|
+
return static_cast<T>(
|
|
34
|
+
start + static_cast<T>(i++) * (end - start) / static_cast<T>(num - 1)
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
return linspaced;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/// Given a range `from`-`to`, linearly interpolates between them in `n` steps along
|
|
41
|
+
/// three axes each, returning the intermediate result at each step.
|
|
42
|
+
template <typename T, typename Elem>
|
|
43
|
+
std::vector<T> grid3d(Elem from, Elem to, size_t n) {
|
|
44
|
+
std::vector<T> output;
|
|
45
|
+
for (Elem z : linspace(from, to, n)) {
|
|
46
|
+
for (Elem y : linspace(from, to, n)) {
|
|
47
|
+
for (Elem x : linspace(from, to, n)) {
|
|
48
|
+
output.emplace_back(
|
|
49
|
+
static_cast<Elem>(x),
|
|
50
|
+
static_cast<Elem>(y),
|
|
51
|
+
static_cast<Elem>(z)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return output;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// Create a spiral of points with colors along the Z axis.
|
|
60
|
+
///
|
|
61
|
+
/// * `num_points`: Total number of points.
|
|
62
|
+
/// * `radius`: The radius of the spiral.
|
|
63
|
+
/// * `angular_step`: The factor applied between each step along the trigonometric circle.
|
|
64
|
+
/// * `angular_offset`: Offsets the starting position on the trigonometric circle.
|
|
65
|
+
/// * `z_step`: The factor applied between each step along the Z axis.
|
|
66
|
+
void color_spiral(
|
|
67
|
+
size_t num_points, float radius, float angular_step, float angular_offset, float z_step,
|
|
68
|
+
std::vector<components::Position3D>& out_points,
|
|
69
|
+
std::vector<components::Color>& out_colors
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
/// Returns sRGB polynomial approximation from Turbo color map, assuming `t` is normalized.
|
|
73
|
+
rerun::components::Color colormap_turbo_srgb(float t);
|
|
74
|
+
} // namespace demo
|
|
75
|
+
} // namespace rerun
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <string>
|
|
4
|
+
#include <string_view>
|
|
5
|
+
#include <vector>
|
|
6
|
+
|
|
7
|
+
namespace rerun {
|
|
8
|
+
|
|
9
|
+
/// Escape an individual part of an entity path.
|
|
10
|
+
///
|
|
11
|
+
/// For instance, `escape_entity_path_path("my image!")` will return `"my\ image\!"`.
|
|
12
|
+
std::string escape_entity_path_part(std::string_view str);
|
|
13
|
+
|
|
14
|
+
/// Construct an entity path by escaping each part of the path.
|
|
15
|
+
///
|
|
16
|
+
/// For instance, `rerun::new_entity_path({"world", 42, "unescaped string!"})` will return
|
|
17
|
+
/// `"world/42/escaped\ string\!"`.
|
|
18
|
+
std::string new_entity_path(const std::vector<std::string_view>& path);
|
|
19
|
+
|
|
20
|
+
} // namespace rerun
|
include/rerun/error.hpp
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <cstdint>
|
|
4
|
+
#include <string>
|
|
5
|
+
|
|
6
|
+
#ifdef __cpp_exceptions
|
|
7
|
+
#include <stdexcept>
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
namespace arrow {
|
|
11
|
+
class Status;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
struct rr_error;
|
|
15
|
+
|
|
16
|
+
/// Return error if a given rerun::Error producing expression is not rerun::ErrorCode::Ok.
|
|
17
|
+
#define RR_RETURN_NOT_OK(status_expr) \
|
|
18
|
+
do { \
|
|
19
|
+
const rerun::Error _status_ = status_expr; \
|
|
20
|
+
if (_status_.is_err()) { \
|
|
21
|
+
return _status_; \
|
|
22
|
+
} \
|
|
23
|
+
} while (false)
|
|
24
|
+
|
|
25
|
+
namespace rerun {
|
|
26
|
+
/// Status codes returned by the SDK as part of `Status`.
|
|
27
|
+
///
|
|
28
|
+
/// Category codes are used to group errors together, but are never returned directly.
|
|
29
|
+
enum class ErrorCode : uint32_t {
|
|
30
|
+
Ok = 0x0000'0000,
|
|
31
|
+
OutOfMemory,
|
|
32
|
+
NotImplemented,
|
|
33
|
+
SdkVersionMismatch,
|
|
34
|
+
|
|
35
|
+
// Invalid argument errors.
|
|
36
|
+
_CategoryArgument = 0x0000'0010,
|
|
37
|
+
UnexpectedNullArgument,
|
|
38
|
+
InvalidStringArgument,
|
|
39
|
+
InvalidEnumValue,
|
|
40
|
+
InvalidRecordingStreamHandle,
|
|
41
|
+
InvalidSocketAddress,
|
|
42
|
+
InvalidComponentTypeHandle,
|
|
43
|
+
InvalidTensorDimension,
|
|
44
|
+
InvalidArchetypeField,
|
|
45
|
+
FileRead,
|
|
46
|
+
InvalidServerUrl,
|
|
47
|
+
InvalidMemoryLimit,
|
|
48
|
+
|
|
49
|
+
// Recording stream errors
|
|
50
|
+
_CategoryRecordingStream = 0x0000'0100,
|
|
51
|
+
RecordingStreamRuntimeFailure,
|
|
52
|
+
RecordingStreamCreationFailure,
|
|
53
|
+
RecordingStreamSaveFailure,
|
|
54
|
+
RecordingStreamStdoutFailure,
|
|
55
|
+
RecordingStreamSpawnFailure,
|
|
56
|
+
RecordingStreamChunkValidationFailure,
|
|
57
|
+
RecordingStreamServeGrpcFailure,
|
|
58
|
+
|
|
59
|
+
// Arrow data processing errors.
|
|
60
|
+
_CategoryArrow = 0x0000'1000,
|
|
61
|
+
ArrowFfiSchemaImportError,
|
|
62
|
+
ArrowFfiArrayImportError,
|
|
63
|
+
|
|
64
|
+
// Utility errors.
|
|
65
|
+
_CategoryUtilities = 0x0001'0000,
|
|
66
|
+
VideoLoadError,
|
|
67
|
+
|
|
68
|
+
// Errors relating to file IO.
|
|
69
|
+
_CategoryFileIO = 0x0010'0000,
|
|
70
|
+
FileOpenFailure,
|
|
71
|
+
|
|
72
|
+
// Errors directly translated from arrow::StatusCode.
|
|
73
|
+
_CategoryArrowCppStatus = 0x1000'0000,
|
|
74
|
+
ArrowStatusCode_KeyError,
|
|
75
|
+
ArrowStatusCode_TypeError,
|
|
76
|
+
ArrowStatusCode_Invalid,
|
|
77
|
+
ArrowStatusCode_IOError,
|
|
78
|
+
ArrowStatusCode_CapacityError,
|
|
79
|
+
ArrowStatusCode_IndexError,
|
|
80
|
+
ArrowStatusCode_Cancelled,
|
|
81
|
+
ArrowStatusCode_UnknownError,
|
|
82
|
+
ArrowStatusCode_NotImplemented,
|
|
83
|
+
ArrowStatusCode_SerializationError,
|
|
84
|
+
ArrowStatusCode_RError,
|
|
85
|
+
ArrowStatusCode_CodeGenError,
|
|
86
|
+
ArrowStatusCode_ExpressionValidationError,
|
|
87
|
+
ArrowStatusCode_ExecutionError,
|
|
88
|
+
ArrowStatusCode_AlreadyExists,
|
|
89
|
+
|
|
90
|
+
Unknown = 0xFFFF'FFFF,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/// Callback function type for log handlers.
|
|
94
|
+
using StatusLogHandler = void (*)(const class Error& status, void* userdata);
|
|
95
|
+
|
|
96
|
+
/// Status outcome object (success or error) returned for fallible operations.
|
|
97
|
+
///
|
|
98
|
+
/// Converts to `true` for success, `false` for failure.
|
|
99
|
+
class [[nodiscard]] Error {
|
|
100
|
+
public:
|
|
101
|
+
/// Result code for the given operation.
|
|
102
|
+
ErrorCode code = ErrorCode::Ok;
|
|
103
|
+
|
|
104
|
+
/// Human readable description of the error.
|
|
105
|
+
std::string description;
|
|
106
|
+
|
|
107
|
+
public:
|
|
108
|
+
Error() = default;
|
|
109
|
+
|
|
110
|
+
Error(ErrorCode _code, std::string _description)
|
|
111
|
+
: code(_code), description(std::move(_description)) {}
|
|
112
|
+
|
|
113
|
+
/// Construct from a C status object.
|
|
114
|
+
Error(const rr_error& status);
|
|
115
|
+
|
|
116
|
+
/// Construct from an arrow status.
|
|
117
|
+
Error(const arrow::Status& status);
|
|
118
|
+
|
|
119
|
+
/// Creates a new error set to ok.
|
|
120
|
+
static Error ok() {
|
|
121
|
+
return Error();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// Compare two errors for equality. Requires the description to match.
|
|
125
|
+
bool operator==(const Error& other) const {
|
|
126
|
+
return code == other.code && description == other.description;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/// Returns true if the code is `Ok`.
|
|
130
|
+
bool is_ok() const {
|
|
131
|
+
return code == ErrorCode::Ok;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// Returns true if the code is not `Ok`.
|
|
135
|
+
bool is_err() const {
|
|
136
|
+
return code != ErrorCode::Ok;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/// Sets global log handler called for `handle`.
|
|
140
|
+
///
|
|
141
|
+
/// The default will log to stderr, unless `RERUN_STRICT` is set to something truthy.
|
|
142
|
+
///
|
|
143
|
+
/// \param handler The handler to call, or `nullptr` to reset to the default.
|
|
144
|
+
/// \param userdata Userdata pointer that will be passed to each invocation of the handler.
|
|
145
|
+
///
|
|
146
|
+
/// @see log, log_on_failure
|
|
147
|
+
static void set_log_handler(StatusLogHandler handler, void* userdata = nullptr);
|
|
148
|
+
|
|
149
|
+
/// Handle this error based on the set log handler.
|
|
150
|
+
///
|
|
151
|
+
/// If there is no error, nothing happens.
|
|
152
|
+
///
|
|
153
|
+
/// If you have set a log handler with `set_log_handler`, it will be called.
|
|
154
|
+
/// Else if the `RERUN_STRICT` env-var is set to something truthy,
|
|
155
|
+
/// an exception will be thrown (if `__cpp_exceptions` are enabled),
|
|
156
|
+
/// or the program will abort.
|
|
157
|
+
///
|
|
158
|
+
/// If no log handler is installed, and we are not in strict mode,
|
|
159
|
+
/// the error will be logged to stderr.
|
|
160
|
+
void handle() const;
|
|
161
|
+
|
|
162
|
+
/// Calls the `handle` method and then exits the application with code 1 if the error is not `Ok`.
|
|
163
|
+
/// @see throw_on_failure
|
|
164
|
+
void exit_on_failure() const;
|
|
165
|
+
|
|
166
|
+
/// Throws a `std::runtime_error` if the status is not `Ok`.
|
|
167
|
+
///
|
|
168
|
+
/// If exceptions are disabled, this will forward to `exit_on_failure` instead.
|
|
169
|
+
/// @see exit_on_failure
|
|
170
|
+
void throw_on_failure() const {
|
|
171
|
+
#ifdef __cpp_exceptions
|
|
172
|
+
if (is_err()) {
|
|
173
|
+
throw std::runtime_error(description);
|
|
174
|
+
}
|
|
175
|
+
#else
|
|
176
|
+
exit_on_failure();
|
|
177
|
+
#endif
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
} // namespace rerun
|
include/rerun/half.hpp
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "datatypes/channel_datatype.hpp"
|
|
4
|
+
#include "datatypes/color_model.hpp"
|
|
5
|
+
#include "datatypes/pixel_format.hpp"
|
|
6
|
+
#include "half.hpp"
|
|
7
|
+
|
|
8
|
+
#include <cassert>
|
|
9
|
+
#include <cstdint>
|
|
10
|
+
|
|
11
|
+
namespace rerun {
|
|
12
|
+
/// The width and height of an image.
|
|
13
|
+
struct WidthHeight {
|
|
14
|
+
uint32_t width;
|
|
15
|
+
uint32_t height;
|
|
16
|
+
|
|
17
|
+
WidthHeight(uint32_t width_, uint32_t height_) : width{width_}, height{height_} {}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/// Number of bits used by this element type
|
|
21
|
+
inline size_t datatype_bits(datatypes::ChannelDatatype value) {
|
|
22
|
+
switch (value) {
|
|
23
|
+
case datatypes::ChannelDatatype::U8: {
|
|
24
|
+
return 8;
|
|
25
|
+
}
|
|
26
|
+
case datatypes::ChannelDatatype::U16: {
|
|
27
|
+
return 16;
|
|
28
|
+
}
|
|
29
|
+
case datatypes::ChannelDatatype::U32: {
|
|
30
|
+
return 32;
|
|
31
|
+
}
|
|
32
|
+
case datatypes::ChannelDatatype::U64: {
|
|
33
|
+
return 64;
|
|
34
|
+
}
|
|
35
|
+
case datatypes::ChannelDatatype::I8: {
|
|
36
|
+
return 8;
|
|
37
|
+
}
|
|
38
|
+
case datatypes::ChannelDatatype::I16: {
|
|
39
|
+
return 16;
|
|
40
|
+
}
|
|
41
|
+
case datatypes::ChannelDatatype::I32: {
|
|
42
|
+
return 32;
|
|
43
|
+
}
|
|
44
|
+
case datatypes::ChannelDatatype::I64: {
|
|
45
|
+
return 64;
|
|
46
|
+
}
|
|
47
|
+
case datatypes::ChannelDatatype::F16: {
|
|
48
|
+
return 16;
|
|
49
|
+
}
|
|
50
|
+
case datatypes::ChannelDatatype::F32: {
|
|
51
|
+
return 32;
|
|
52
|
+
}
|
|
53
|
+
case datatypes::ChannelDatatype::F64: {
|
|
54
|
+
return 64;
|
|
55
|
+
}
|
|
56
|
+
default:
|
|
57
|
+
assert(false && "unreachable");
|
|
58
|
+
}
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
inline size_t num_bytes(WidthHeight resolution, datatypes::ChannelDatatype datatype) {
|
|
63
|
+
// rounding upwards:
|
|
64
|
+
return (resolution.width * resolution.height * datatype_bits(datatype) + 7) / 8;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
template <typename TElement>
|
|
68
|
+
inline datatypes::ChannelDatatype get_datatype(const TElement* _unused);
|
|
69
|
+
|
|
70
|
+
template <>
|
|
71
|
+
inline datatypes::ChannelDatatype get_datatype(const uint8_t* _unused) {
|
|
72
|
+
(void)(_unused); // Suppress unused warning.
|
|
73
|
+
return datatypes::ChannelDatatype::U8;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
template <>
|
|
77
|
+
inline datatypes::ChannelDatatype get_datatype(const uint16_t* _unused) {
|
|
78
|
+
(void)(_unused); // Suppress unused warning.
|
|
79
|
+
return datatypes::ChannelDatatype::U16;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
template <>
|
|
83
|
+
inline datatypes::ChannelDatatype get_datatype(const uint32_t* _unused) {
|
|
84
|
+
(void)(_unused); // Suppress unused warning.
|
|
85
|
+
return datatypes::ChannelDatatype::U32;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
template <>
|
|
89
|
+
inline datatypes::ChannelDatatype get_datatype(const uint64_t* _unused) {
|
|
90
|
+
(void)(_unused); // Suppress unused warning.
|
|
91
|
+
return datatypes::ChannelDatatype::U64;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
template <>
|
|
95
|
+
inline datatypes::ChannelDatatype get_datatype(const int8_t* _unused) {
|
|
96
|
+
(void)(_unused); // Suppress unused warning.
|
|
97
|
+
return datatypes::ChannelDatatype::I8;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
template <>
|
|
101
|
+
inline datatypes::ChannelDatatype get_datatype(const int16_t* _unused) {
|
|
102
|
+
(void)(_unused); // Suppress unused warning.
|
|
103
|
+
return datatypes::ChannelDatatype::I16;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
template <>
|
|
107
|
+
inline datatypes::ChannelDatatype get_datatype(const int32_t* _unused) {
|
|
108
|
+
(void)(_unused); // Suppress unused warning.
|
|
109
|
+
return datatypes::ChannelDatatype::I32;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
template <>
|
|
113
|
+
inline datatypes::ChannelDatatype get_datatype(const int64_t* _unused) {
|
|
114
|
+
(void)(_unused); // Suppress unused warning.
|
|
115
|
+
return datatypes::ChannelDatatype::I64;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
template <>
|
|
119
|
+
inline datatypes::ChannelDatatype get_datatype(const rerun::half* _unused) {
|
|
120
|
+
(void)(_unused); // Suppress unused warning.
|
|
121
|
+
return datatypes::ChannelDatatype::F16;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
template <>
|
|
125
|
+
inline datatypes::ChannelDatatype get_datatype(const float* _unused) {
|
|
126
|
+
(void)(_unused); // Suppress unused warning.
|
|
127
|
+
return datatypes::ChannelDatatype::F32;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
template <>
|
|
131
|
+
inline datatypes::ChannelDatatype get_datatype(const double* _unused) {
|
|
132
|
+
(void)(_unused); // Suppress unused warning.
|
|
133
|
+
return datatypes::ChannelDatatype::F64;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/// Returns the number of channels for a given color model.
|
|
137
|
+
///
|
|
138
|
+
/// This is the number of expected elements per pixel.
|
|
139
|
+
inline size_t color_model_channel_count(datatypes::ColorModel color_model) {
|
|
140
|
+
switch (color_model) {
|
|
141
|
+
case datatypes::ColorModel::L:
|
|
142
|
+
return 1;
|
|
143
|
+
case datatypes::ColorModel::BGR:
|
|
144
|
+
case datatypes::ColorModel::RGB:
|
|
145
|
+
return 3;
|
|
146
|
+
case datatypes::ColorModel::BGRA:
|
|
147
|
+
case datatypes::ColorModel::RGBA:
|
|
148
|
+
return 4;
|
|
149
|
+
default:
|
|
150
|
+
assert(false && "unreachable");
|
|
151
|
+
}
|
|
152
|
+
return 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
inline size_t pixel_format_num_bytes(
|
|
156
|
+
WidthHeight resolution, datatypes::PixelFormat pixel_format
|
|
157
|
+
) {
|
|
158
|
+
auto num_pixels = resolution.width * resolution.height;
|
|
159
|
+
switch (pixel_format) {
|
|
160
|
+
// 444 formats.
|
|
161
|
+
case datatypes::PixelFormat::Y_U_V24_FullRange:
|
|
162
|
+
case datatypes::PixelFormat::Y_U_V24_LimitedRange:
|
|
163
|
+
return num_pixels * 4;
|
|
164
|
+
|
|
165
|
+
// 422 formats.
|
|
166
|
+
case datatypes::PixelFormat::Y_U_V16_FullRange:
|
|
167
|
+
case datatypes::PixelFormat::Y_U_V16_LimitedRange:
|
|
168
|
+
case datatypes::PixelFormat::YUY2:
|
|
169
|
+
return 16 * num_pixels / 8;
|
|
170
|
+
|
|
171
|
+
// 420 formats.
|
|
172
|
+
case datatypes::PixelFormat::Y_U_V12_FullRange:
|
|
173
|
+
case datatypes::PixelFormat::Y_U_V12_LimitedRange:
|
|
174
|
+
case datatypes::PixelFormat::NV12:
|
|
175
|
+
return 12 * num_pixels / 8;
|
|
176
|
+
|
|
177
|
+
// Monochrome formats.
|
|
178
|
+
case datatypes::PixelFormat::Y8_LimitedRange:
|
|
179
|
+
case datatypes::PixelFormat::Y8_FullRange:
|
|
180
|
+
return num_pixels;
|
|
181
|
+
|
|
182
|
+
default:
|
|
183
|
+
assert(false && "unreachable");
|
|
184
|
+
}
|
|
185
|
+
return 0;
|
|
186
|
+
}
|
|
187
|
+
} // namespace rerun
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <memory> // std::shared_ptr
|
|
4
|
+
#include <optional>
|
|
5
|
+
#include "component_descriptor.hpp"
|
|
6
|
+
#include "loggable.hpp"
|
|
7
|
+
#include "result.hpp"
|
|
8
|
+
|
|
9
|
+
namespace arrow {
|
|
10
|
+
class DataType;
|
|
11
|
+
class Array;
|
|
12
|
+
} // namespace arrow
|
|
13
|
+
|
|
14
|
+
namespace rerun::components {
|
|
15
|
+
/// Arrow data type shared by all instances of IndicatorComponent.
|
|
16
|
+
const std::shared_ptr<arrow::DataType>& indicator_arrow_datatype();
|
|
17
|
+
|
|
18
|
+
/// Returns an arrow array for a single indicator component.
|
|
19
|
+
///
|
|
20
|
+
/// This allocates a shared pointer only on the first call and returns references to the static object afterwards.
|
|
21
|
+
const std::shared_ptr<arrow::Array>& indicator_arrow_array();
|
|
22
|
+
|
|
23
|
+
/// Returns an arrow array for a several indicator component.
|
|
24
|
+
///
|
|
25
|
+
/// Unlike the parameterless version this allocates a new data type on every call.
|
|
26
|
+
std::shared_ptr<arrow::Array> indicator_arrow_array(size_t num_instances);
|
|
27
|
+
|
|
28
|
+
/// Indicator component used by archetypes when converting them to component lists.
|
|
29
|
+
///
|
|
30
|
+
/// This is done in order to track how a collection of component was logged.
|
|
31
|
+
template <const char ComponentName[]>
|
|
32
|
+
struct IndicatorComponent {};
|
|
33
|
+
} // namespace rerun::components
|
|
34
|
+
|
|
35
|
+
namespace rerun {
|
|
36
|
+
/// \private
|
|
37
|
+
template <const char ComponentName_[]>
|
|
38
|
+
struct Loggable<components::IndicatorComponent<ComponentName_>> {
|
|
39
|
+
/// Returns the name of this type.
|
|
40
|
+
static constexpr ComponentDescriptor Descriptor = ComponentDescriptor(ComponentName_);
|
|
41
|
+
|
|
42
|
+
/// Returns the arrow data type this type corresponds to.
|
|
43
|
+
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
|
44
|
+
return components::indicator_arrow_datatype();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/// Creates an arrow ComponentBatch from an array of IndicatorComponent components.
|
|
48
|
+
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
|
49
|
+
const components::IndicatorComponent<ComponentName_>*, size_t num_instances
|
|
50
|
+
) {
|
|
51
|
+
// If possible, use the statically allocated shared pointer returned by the parameterless version.
|
|
52
|
+
if (num_instances == 1) {
|
|
53
|
+
return components::indicator_arrow_array();
|
|
54
|
+
} else {
|
|
55
|
+
return components::indicator_arrow_array(num_instances);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
} // namespace rerun
|