pub struct LineBatchInfo {
    pub label: DebugLabel,
    pub world_from_obj: Affine3A,
    pub line_vertex_count: u32,
    pub overall_outline_mask_ids: OutlineMaskPreference,
    pub additional_outline_mask_ids_vertex_ranges: Vec<(Range<u32>, OutlineMaskPreference)>,
    pub picking_object_id: PickingLayerObjectId,
    pub depth_offset: DepthOffset,
    pub triangle_cap_length_factor: f32,
    pub triangle_cap_width_factor: f32,
}
Expand description

Data that is valid for a batch of line strips.

Fields§

§label: DebugLabel§world_from_obj: Affine3A

Transformation applies to line positions

TODO(andreas): We don’t apply scaling to the radius yet. Need to pass a scaling factor like this in let scale = Mat3::from(world_from_obj).determinant().abs().cbrt()

§line_vertex_count: u32

Number of vertices covered by this batch.

The batch will start with the next vertex after the one the previous batch ended with. It is expected that this vertex is the first vertex of a new batch.

§overall_outline_mask_ids: OutlineMaskPreference

Optional outline mask setting for the entire batch.

§additional_outline_mask_ids_vertex_ranges: Vec<(Range<u32>, OutlineMaskPreference)>

Defines an outline mask for an individual vertex ranges (can span several line strips!)

Vertex ranges are not relative within the current batch, but relates to the draw data vertex buffer.

Having many of these individual outline masks can be slow as they require each their own uniform buffer & draw call. This feature is meant for a limited number of “extra selections” If an overall mask is defined as well, the per-vertex-range masks is overwriting the overall mask.

§picking_object_id: PickingLayerObjectId

Picking object id that applies for the entire batch.

§depth_offset: DepthOffset

Depth offset applied after projection.

§triangle_cap_length_factor: f32

Length factor as multiple of a line’s radius applied to all triangle caps in this batch.

This controls how far the “pointy end” of the triangle/arrow-head extends. (defaults to 4.0)

§triangle_cap_width_factor: f32

Width factor as multiple of a line’s radius applied to all triangle caps in this batch.

This controls how wide the triangle/arrow-head is orthogonal to the line’s direction. (defaults to 2.0)

Trait Implementations§

source§

impl Default for LineBatchInfo

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more