Skip to main content

Scene

Struct Scene 

Source
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>

Source

pub fn new(bodies: Vec<Body<'p>>) -> GeopResult<Self>

The scene of bodies.

Source

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).

Source

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.

Source

pub fn project( &self, frame: &ViewFrame, options: &ViewOptions, ) -> GeopResult<ProjectedView>

Every body seen through frame, each line visible or hidden: see the module docs.

Source

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.

Source§

impl<'p> Scene<'p>

Source

pub fn of(reader: &Reader<'p>) -> GeopResult<Self>

The faces of the part reader reads and of every part placed in it, however deep, each where it is placed: the part’s own first, then those placed, in the order they were placed, each followed by those placed in it.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.