Skip to content

Split entity properties into separate components #4442

@jleibs

Description

@jleibs

EntityProperties is currently a single serde-based mono-component:

pub struct EntityProperties {
    pub interactive: bool,

    /// What kind of color mapping should be applied (none, map, texture, transfer..)?
    pub color_mapper: EditableAutoValue<ColorMapper>,

    /// Distance of the projection plane (frustum far plane).
    ///
    /// Only applies to pinhole cameras when in a spatial view, using 3D navigation.
    pub pinhole_image_plane_distance: EditableAutoValue<f32>,

    /// Should the depth texture be backprojected into a point cloud?
    ///
    /// Only applies to tensors with meaning=depth that are affected by a pinhole transform.
    ///
    /// The default for 3D views is `true`, but for 2D views it is `false`.
    pub backproject_depth: EditableAutoValue<bool>,

    /// How many depth units per world-space unit. e.g. 1000 for millimeters.
    ///
    /// This corresponds to `re_components::Tensor::meter`.
    pub depth_from_world_scale: EditableAutoValue<f32>,

    /// Used to scale the radii of the points in the resulting point cloud.
    pub backproject_radius_scale: EditableAutoValue<f32>,

    /// Whether to show the 3D transform visualization at all.
    pub transform_3d_visible: EditableAutoValue<bool>,

    /// The length of the arrows in the entity's own coordinate system (space).
    pub transform_3d_size: EditableAutoValue<f32>,

    /// Should the legend be shown (for plot space views).
    pub show_legend: EditableAutoValue<bool>,

    /// The location of the legend (for plot space views).
    ///
    /// This is an Option instead of an EditableAutoValue to let each space view class decide on
    /// what's the best default.
    pub legend_location: Option<LegendCorner>,

    /// What kind of data aggregation to perform (for plot space views).
    pub time_series_aggregator: EditableAutoValue<TimeSeriesAggregator>,
}

For each of these fields, there should be a new, explicit component.

Metadata

Metadata

Assignees

Labels

🟦 blueprintThe data that defines our UI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions