Struct re_renderer::renderer::LineBatchInfo
source · 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: Affine3ATransformation 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: u32Number 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: OutlineMaskPreferenceOptional 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: PickingLayerObjectIdPicking object id that applies for the entire batch.
depth_offset: DepthOffsetDepth offset applied after projection.
triangle_cap_length_factor: f32Length 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: f32Width 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)