pub struct RasterizedModel {
pub vertices: BTreeMap<VertexId, Vector3>,
pub edges: BTreeMap<EdgeId, Vec<Vector3>>,
pub faces: BTreeMap<FaceId, Vec<TriangleFace>>,
}Expand description
A Model rasterized once, with every sampled point/polyline/triangle
kept alongside the id of the entity it came from.
This is the single place the crate turns topology into sampled geometry
— drawing and ray picking (geop_core_editor::view::PartView), STL, and debug
rendering (debug) all build on top of it, rather than each walking
Model and sampling curves/surfaces on their own. That matters beyond
not repeating code: it guarantees a pick can never disagree with what
the viewer actually drew, because both read the same triangles.
Fields§
§vertices: BTreeMap<VertexId, Vector3>§edges: BTreeMap<EdgeId, Vec<Vector3>>Each edge’s curve sampled into an n-point polyline.
faces: BTreeMap<FaceId, Vec<TriangleFace>>Each face’s trimmed region, triangulated (see face_triangles_uv)
and mapped through surface.evaluate — one face generally maps to
several triangles.
Implementations§
Auto Trait Implementations§
impl Freeze for RasterizedModel
impl RefUnwindSafe for RasterizedModel
impl Send for RasterizedModel
impl Sync for RasterizedModel
impl Unpin for RasterizedModel
impl UnsafeUnpin for RasterizedModel
impl UnwindSafe for RasterizedModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more