pub struct Scene<'p> {
pub bodies: Vec<Body<'p>>,
/* private fields */
}Expand description
The bodies a drawing draws, and what seeing them needs.
Fields§
§bodies: Vec<Body<'p>>Implementations§
Source§impl<'p> Scene<'p>
impl<'p> Scene<'p>
Sourcepub fn new(bodies: Vec<Body<'p>>) -> GeopResult<Self>
pub fn new(bodies: Vec<Body<'p>>) -> GeopResult<Self>
The scene of bodies.
Sourcepub fn side_of(
&self,
k: usize,
origin: &Vector3,
normal: &Vector3,
) -> Option<bool>
pub fn side_of( &self, k: usize, origin: &Vector3, normal: &Vector3, ) -> Option<bool>
Which side of the plane through origin normal to normal body k
lies on: wholly on the side normal points to (Some(true)),
wholly on the other (Some(false)), or on both, or touching it
(None).
Sourcepub fn groups(&self) -> Vec<Vec<usize>>
pub fn groups(&self) -> Vec<Vec<usize>>
The bodies that share the work of the first stage (see the module docs): the same model, turned alike. Each group in the order of its first body.
Sourcepub fn project(
&self,
frame: &ViewFrame,
options: &ViewOptions,
) -> GeopResult<ProjectedView>
pub fn project( &self, frame: &ViewFrame, options: &ViewOptions, ) -> GeopResult<ProjectedView>
Every body seen through frame, each line visible or hidden: see
the module docs.
Sourcepub fn point_seen(&self, frame: &ViewFrame, point: Vector3) -> GeopResult<bool>
pub fn point_seen(&self, frame: &ViewFrame, point: Vector3) -> GeopResult<bool>
Whether point is seen through frame, every body in front of it
counted: what decides a line drawn that is no edge or silhouette of
a body, such as a cosmetic thread.
Auto Trait Implementations§
impl<'p> Freeze for Scene<'p>
impl<'p> RefUnwindSafe for Scene<'p>
impl<'p> Send for Scene<'p>
impl<'p> Sync for Scene<'p>
impl<'p> Unpin for Scene<'p>
impl<'p> UnsafeUnpin for Scene<'p>
impl<'p> UnwindSafe for Scene<'p>
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