Struct three_d::renderer::object::Line [−][src]
pub struct Line<M: Material> { /* fields omitted */ }
Implementations
pub fn new_with_material(
context: &Context,
pixel0: Vec2,
pixel1: Vec2,
width: f32,
material: M
) -> ThreeDResult<Self>
Change the two end points of the line. The pixel coordinates must be in physical pixels, where (viewport.x, viewport.y) indicate the top left corner of the viewport and (viewport.x + viewport.width, viewport.y + viewport.height) indicate the bottom right corner.
Trait Implementations
Render the object. Must be called in a render target render function, for example in the callback function of Screen::write. Read more
Returns whether or not this object should be considered transparent. Read more
fn render_with_material(
&self,
material: &dyn Material,
viewport: Viewport
) -> ThreeDResult<()>
fn render_with_material(
&self,
material: &dyn Material,
viewport: Viewport
) -> ThreeDResult<()>
Render the object with the given material. Must be called in a render target render function, for example in the callback function of Screen::write. Read more
use render_with_material instead
Render the object with the given material. Must be called in a render target render function, for example in the callback function of Screen::write. Read more
Auto Trait Implementations
impl<M> !RefUnwindSafe for Line<M>
impl<M> !UnwindSafe for Line<M>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more