Skip to main content

Crate fast_mesh_scene

Crate fast_mesh_scene 

Source
Expand description

Scenes of several editable meshes, built on fast_mesh_store, fast_mesh_bvh and fast_mesh_query.

A Scene owns meshes, each with a BVH, an UpdateMode and a Placement (a rotation, a per-axis scale and a translation into the world). Meshes are addressed by generational MeshIds: once a mesh is removed, its id is rejected with SceneError::UnknownMesh for good.

Re-exports§

pub use fast_mesh_ops as ops;

Structs§

BooleanReport
What Scene::boolean did.
ColorRule
How a scalar field is turned into colours.
Coloring
How a mesh is coloured from one of its fields, for Scene::set_coloring.
Contact
Two meshes within the margin of Scene::find_contacts.
ContactFilter
Which mesh pairs Scene::find_contacts looks at.
CurvatureField
A per-vertex curvature field to register with Scene::add_curvature_field.
CutOptions
What to cut: a world plane and whether to cap.
CutReport
What Scene::cut_by_plane did.
DistanceField
A signed distance field to register with Scene::add_distance_field.
FieldId
A field registered on a mesh of the scene.
FieldStatus
The state of a field, from Scene::field_status.
Fill
The filled cross-section made by fill: triangles over (u, v) points.
Gap
The closest pair between two meshes’ contours in a section, from Scene::section_gap.
JoinOptions
What to join: a loop on the target and a loop on the source.
JoinReport
What Scene::join did.
MeshBuild
A mesh being prepared for Scene::add_mesh_built outside any scene: its BVH, and its vertex normals when asked for (MeshBuild::set_normals), are built in steps (MeshBuild::step), so that a caller can yield between them (the Worker engine adds large meshes this way). Nothing of it is in a scene until it is added.
MeshChanges
What happened to one mesh since the subscriber’s last Scene::take_changes_for (or Scene::take_changes for the default subscriber).
MeshId
A handle to a mesh in a Scene.
MeshOptions
Options for adding a mesh to a Scene.
Placement
A transform from a mesh’s points to the world: world = rotation * (scale * p) + translation, where p is the mesh’s own point (its origin plus a local position), all in f64.
Plane
A plane in mesh-local coordinates, with an orthonormal 2D frame (u, v) in it. The frame is right-handed: normal = u × v.
RegisterOptions
Options for Scene::register.
RegisterReport
What Scene::register found.
Scene
Several meshes, each with a BVH and a placement in the world.
SceneClosestHit
The point of the scene nearest to a world point.
SceneClosestOptions
Options for Scene::closest_point and Scene::closest_point_on, in world units.
SceneMeshDistance
The closest pair of points between two meshes, in the world.
SceneOptions
Options for a Scene.
SceneRayHit
Where a world ray hit a mesh of the scene.
SceneRayOptions
Options for Scene::raycast, in world units.
SectionContour
One chain of a section: a closed loop or an open polyline.
SectionDesc
A plane section to register with Scene::add_section.
SectionId
A plane section of the scene, from Scene::add_section.
SectionResult
A section’s result for one mesh, from Scene::section.
SignStatus
What SignData::build found out about a mesh, so that an application can warn when signs are doubtful.
SubscriberId
A consumer of change reports, from Scene::subscribe.
ThicknessField
A per-vertex wall-thickness field to register with Scene::add_thickness_field.

Enums§

BooleanOp
Which boolean to compute.
Colormap
A colormap from t in [0, 1] to RGBA8.
FieldBudget
How much one Scene::field_step computes.
FieldsError
Why a field kernel could not run.
NotApplied
Why a result was not applied.
OutOfRange
What to show for a value outside the colour range.
SceneError
Why a scene operation could not run. A failed operation leaves the scene unchanged.
SectionStatus
Whether a section’s result for a mesh matches the scene as it is now, from Scene::section_status.
SignMode
How the sign of a distance is decided.
StepState
Where the field step unit stands after Scene::field_step.
UpdateMode
When a mesh’s BVH is brought up to date after the mesh changes.

Constants§

DEFAULT_MAX_RMSE_FRACTION
The default RegisterOptions::max_rmse, as a fraction of the moving points’ extent. A wrong local minimum measured about 3%, and the same mesh with noise of 1% of its size correctly aligned at about 0.4% (icp_survey in fast-mesh-ops). Scans noisier than this need their own limit.

Functions§

color_of
The colour of value v under rule.

Type Aliases§

Result
Result with SceneError as the error type.