pub struct RasterizedModel<S: Scalar> {
pub vertices: HashMap<VertexId, Vector3<S>>,
pub edges: HashMap<EdgeId, Vec<Vector3<S>>>,
pub faces: HashMap<FaceId, Vec<TriangleFace<S>>>,
}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
— PrimitiveScene rendering (rasterize_model) and ray picking
(geop_cad_base::pick) both 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: HashMap<VertexId, Vector3<S>>§edges: HashMap<EdgeId, Vec<Vector3<S>>>Each edge’s curve sampled into an n-point polyline.
faces: HashMap<FaceId, Vec<TriangleFace<S>>>Each face’s trimmed region, triangulated (see face_triangles_uv)
and mapped through surface.evaluate — one face generally maps to
several triangles.
Auto Trait Implementations§
impl<S> Freeze for RasterizedModel<S>
impl<S> RefUnwindSafe for RasterizedModel<S>where
S: RefUnwindSafe,
impl<S> Send for RasterizedModel<S>
impl<S> Sync for RasterizedModel<S>
impl<S> Unpin for RasterizedModel<S>where
S: Unpin,
impl<S> UnsafeUnpin for RasterizedModel<S>
impl<S> UnwindSafe for RasterizedModel<S>where
S: UnwindSafe,
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