DrawLines3dInstance

Struct DrawLines3dInstance 

Source
#[repr(C)]
pub struct DrawLines3dInstance { pub position_before: Vec3, pub position_start: Vec3, pub position_end: Vec3, pub position_after: Vec3, pub color_start: Vec4, pub color_end: Vec4, pub scale: f32, }

Fields§

§position_before: Vec3

Starting point for the previous line segment. We use this to compute the corner between the previous line segment and the current one.

§position_start: Vec3

Starting point for the current line segment. This is also the end point for the previous segment. If the current segment is the very first one in the strip, DrawLines3dInstance::position_before and DrawLines3dInstance::position_start will be the same point.

§position_end: Vec3

End point for the current line segment. This is also the start point for the next segment in the strip. If the current segment is the last one in the strip, both DrawLines3dInstance::position_end and DrawLines3dInstance::position_after will have the same value.

§position_after: Vec3

End point for the next segment in the strip. This point is used to compute the corner between the current segment and the next one.

§color_start: Vec4

Color for the start point in the current line segment.

§color_end: Vec4

Color for the end point in the current line segment. If it’s different from the start color, we get a gradient effect.

§scale: f32

Thichness of the line strip

Implementations§

Source§

impl DrawLines3dInstance

Source

pub fn from_segment(start: Vec3, end: Vec3, color: Vec4, scale: f32) -> Self

Trait Implementations§

Source§

impl Clone for DrawLines3dInstance

Source§

fn clone(&self) -> DrawLines3dInstance

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DrawLines3dInstance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,