nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// 3D plot for a spatial dataset or channel (point cloud, BVH mesh, etc.) loaded by RID.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct GeoPlot3dSpatial {
    #[builder(into)]
    #[serde(rename = "plotId")]
    plot_id: String,
    #[builder(default, into)]
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
    enabled: Option<bool>,
    #[builder(default, into)]
    #[serde(rename = "label", skip_serializing_if = "Option::is_none", default)]
    label: Option<String>,
    #[serde(rename = "spatialRid")]
    spatial_rid: super::super::super::super::api::rids::SpatialRid,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::SpatialColoring>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "coloring", skip_serializing_if = "Option::is_none", default)]
    coloring: Option<Box<super::SpatialColoring>>,
}
impl GeoPlot3dSpatial {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        plot_id: impl Into<String>,
        spatial_rid: super::super::super::super::api::rids::SpatialRid,
    ) -> Self {
        Self::builder().plot_id(plot_id).spatial_rid(spatial_rid).build()
    }
    #[inline]
    pub fn plot_id(&self) -> &str {
        &*self.plot_id
    }
    #[inline]
    pub fn enabled(&self) -> Option<bool> {
        self.enabled.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn label(&self) -> Option<&str> {
        self.label.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn spatial_rid(&self) -> &super::super::super::super::api::rids::SpatialRid {
        &self.spatial_rid
    }
    /// How to color the asset. If omitted, renderers use a +Z direction ramp with colormap
    /// VIRIDIS and default bounds (`SpatialColoringGeometryAxis` with axis { x: 0, y: 0, z: 1 }).
    #[inline]
    pub fn coloring(&self) -> Option<&super::SpatialColoring> {
        self.coloring.as_ref().map(|o| &**o)
    }
}