use crate::builder::PlotDescription;
use crate::layout::kernel::{FeedbackKind, FeedbackRequestId, FeedbackRound};
use crate::layout::ComponentAddress;
use crate::spec::PlotKind;
use crate::Error;
pub(crate) mod coordinate;
pub(crate) mod guide;
pub(crate) mod preference;
pub(crate) mod sizing;
pub(crate) mod tracks;
pub(crate) fn ink_pitch(ink: f64, room: f64) -> Result<f64, Error> {
if ink <= 0.0 {
return Ok(0.0);
}
if room <= 0.0 {
return Err(Error::Render(
"mark ink has no containing category room".into(),
));
}
let pitch = ink / room;
if pitch.is_finite() {
Ok(pitch)
} else {
Err(Error::Render(
"mark containing pitch exceeds spatial range".into(),
))
}
}
macro_rules! interior_routes {
($($class:ident { $($kind:ident),+ $(,)? }),+ $(,)?) => {
$(#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum $class { $($kind),+ })+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum InteriorRoute { $($class($class)),+ }
impl InteriorRoute {
pub(crate) const fn classify(kind: PlotKind) -> Self {
match kind {
$($(PlotKind::$kind => Self::$class($class::$kind),)+)+
}
}
pub(crate) const fn kind(self) -> PlotKind {
match self {
$($(Self::$class($class::$kind) => PlotKind::$kind,)+)+
}
}
}
};
}
interior_routes! {
StandardCoordinate { Scatter, Line, Trajectory, LinePath, Histogram, Density, Qq, Regression },
OneCategoricalAxis { PointInterval, Coefficient, Forest, Dumbbell, Bar, HorizontalBar, StackedBar, StackedHorizontalBar, Boxplot, Violin, Raincloud, Interaction },
SpecializedGrid { Heatmap, Matrix, Marginal, Beeswarm, Waterfall },
}
impl InteriorRoute {
pub(crate) const fn is_coordinate(self) -> bool {
matches!(
self,
Self::StandardCoordinate(_) | Self::OneCategoricalAxis(_)
)
}
pub(crate) fn validate(self, plot: &crate::builder::PlotDescription) -> Result<(), Error> {
if self.kind() != plot.kind() {
return Err(Error::Data(
format!(
"interior route {:?} does not match prepared plot {:?}",
self.kind(),
plot.kind()
)
.into(),
));
}
Ok(())
}
}
#[derive(Debug)]
pub(crate) struct MeasuredCoordinateMarks {
pub(crate) marks: std::sync::Arc<SelectedMarkPlan>,
pub(crate) significance: Option<crate::significance::SignificancePlan>,
pub(crate) deferred_annotation_text: Vec<crate::layout::DeferredAnnotationTextPlan>,
pub(crate) numeric_presentation:
Option<std::sync::Arc<crate::numeric::set::NumericPresentation>>,
}
impl MeasuredCoordinateMarks {
pub(crate) fn new(marks: std::sync::Arc<SelectedMarkPlan>) -> Self {
Self {
marks,
significance: None,
deferred_annotation_text: Vec::new(),
numeric_presentation: None,
}
}
}
pub(crate) fn measure(
context: &crate::spec::PlotMeasureContext<'_, '_>,
request: &crate::text::TextRequestContext<'_, '_>,
) -> Result<crate::spec::PlotRenderResult, crate::layout::fit::PlanError> {
let source = context.registered.source;
match InteriorRoute::classify(source.kind()) {
route @ (InteriorRoute::StandardCoordinate(_) | InteriorRoute::OneCategoricalAxis(_)) => {
route.measure(source, context, request)
}
InteriorRoute::SpecializedGrid(SpecializedGrid::Matrix) => {
crate::plots::matrix::measure(source, context, request)
}
InteriorRoute::SpecializedGrid(SpecializedGrid::Marginal) => {
crate::plots::marginal::measure(source, context, request)
}
InteriorRoute::SpecializedGrid(SpecializedGrid::Heatmap) => {
crate::plots::heatmap::measure(source, context, request)
}
InteriorRoute::SpecializedGrid(SpecializedGrid::Beeswarm) => {
crate::plots::beeswarm::measure(source, context, request)
}
InteriorRoute::SpecializedGrid(SpecializedGrid::Waterfall) => {
crate::plots::waterfall::measure(context, request)
}
}
}
pub(crate) fn measure_selected_interior(
context: &crate::spec::PlotMeasureContext<'_, '_>,
layout: &crate::layout::Layout,
request: &crate::text::TextRequestContext<'_, '_>,
) -> Result<MeasuredCoordinateMarks, crate::layout::fit::PlanError> {
let plot = context.registered.source;
match plot.kind() {
PlotKind::Scatter => crate::plots::scatter::measure_marks(plot, context, request, layout),
PlotKind::Line | PlotKind::Trajectory | PlotKind::LinePath => {
crate::plots::line::measure_marks(plot, context, request, layout)
}
PlotKind::Histogram => crate::plots::histogram::measure_marks(context, request, layout),
PlotKind::Density => crate::plots::density::measure_marks(context, request, layout),
PlotKind::Qq => crate::plots::qq::measure_marks(plot, context, request, layout),
PlotKind::Regression => {
crate::plots::regression::measure_marks(plot, context, request, layout)
}
PlotKind::PointInterval | PlotKind::Coefficient | PlotKind::Forest => {
crate::plots::interval_estimate::measure_marks(plot, context, request, layout)
}
PlotKind::Dumbbell => crate::plots::dumbbell::measure_marks(plot, context, request, layout),
PlotKind::Bar | PlotKind::StackedBar => {
crate::plots::bar::measure_marks(plot, context, request, layout)
}
PlotKind::HorizontalBar | PlotKind::StackedHorizontalBar => {
crate::plots::horizontal_bar::measure_marks(plot, context, request, layout)
}
PlotKind::Boxplot => crate::plots::boxplot::measure_marks(plot, context, request, layout),
PlotKind::Violin | PlotKind::Raincloud => {
crate::plots::violin::measure_marks(plot, context, request, layout)
}
PlotKind::Interaction => {
crate::plots::interaction::measure_marks(plot, context, request, layout)
}
_ => unreachable!("coordinate route selected its own marks"),
}
}
#[cfg(test)]
pub(crate) fn measure_for_test(
factory: &crate::orchestrator::assignment::PlotMeasureAssignmentFactory<'_, '_>,
panel: crate::layout::PixelRect,
round: &FeedbackRound,
) -> Result<crate::spec::PlotRenderResult, crate::layout::fit::PlanError> {
let entry = factory.assign(
crate::orchestrator::assignment::PlotAllocationInputs::for_test(
factory.root.measurement_size,
panel,
round,
&factory.registered.scope.address,
),
round,
None,
)?;
crate::orchestrator::measure_plot(
factory,
entry,
crate::decorations::legend::discrete::scoped::GuideConsumption {
use_kind: crate::decorations::legend::discrete::scoped::GuideUse::Local,
..crate::decorations::legend::discrete::scoped::SUPPRESSED_GUIDES
},
&crate::layout::fit::FitScope::root(),
)
.map(|(_, result)| result)
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum CompositionChildPolicy {
Facet,
Canvas,
}
impl CompositionChildPolicy {
pub(crate) fn validate_child(
self,
plot: &crate::builder::PlotDescription,
) -> Result<(), Error> {
match self {
Self::Canvas if plot.kind() == PlotKind::Matrix => Err(Error::Render(
"Matrix manages its own canvas and cannot be nested in a composed canvas".into(),
)),
Self::Canvas if plot.has_facets() => Err(Error::Render(
"a faceted chart cannot be nested inside a composed canvas".into(),
)),
Self::Facet if matches!(plot.kind(), PlotKind::Matrix | PlotKind::Marginal) => {
Err(Error::Render(
format!(
"{:?} manages its own panels and cannot be nested in generic faceting",
plot.kind()
)
.into(),
))
}
Self::Canvas | Self::Facet => Ok(()),
}
}
}
pub(crate) fn intrinsic_body_minimum(
registered: &crate::orchestrator::registration::PlotRegistration<'_>,
domains: crate::builder::RootFrameDomainInput<'_>,
intrinsic: &crate::orchestrator::root::PlotIntrinsics,
operation: &crate::font::canonical::OperationContext,
request: &crate::text::TextRequestContext<'_, '_>,
) -> Result<(f64, f64), Error> {
let ranges = match domains {
crate::builder::RootFrameDomainInput::Prepared => None,
crate::builder::RootFrameDomainInput::Selected(assignment) => assignment.ranges(),
};
intrinsic_body_minimum_for_ranges(registered, intrinsic, operation, request, ranges)
}
pub(crate) fn intrinsic_body_minimum_for_ranges(
registered: &crate::orchestrator::registration::PlotRegistration<'_>,
intrinsic: &crate::orchestrator::root::PlotIntrinsics,
operation: &crate::font::canonical::OperationContext,
request: &crate::text::TextRequestContext<'_, '_>,
ranges: Option<[(f64, f64); 2]>,
) -> Result<(f64, f64), Error> {
registered.source.intrinsic_body_minimum(
Some(registered),
intrinsic,
operation,
request,
ranges,
)
}
impl PlotDescription {
fn intrinsic_body_minimum(
&self,
registered: Option<&crate::orchestrator::registration::PlotRegistration<'_>>,
intrinsic: &crate::orchestrator::root::PlotIntrinsics,
operation: &crate::font::canonical::OperationContext,
theme: &crate::text::TextRequestContext<'_, '_>,
ranges: Option<[(f64, f64); 2]>,
) -> Result<(f64, f64), Error> {
let mut minimum = if InteriorRoute::classify(self.kind()).is_coordinate() {
crate::orchestrator::root::coordinate_intrinsic(
intrinsic,
&crate::orchestrator::root::intrinsic_inputs(registered, theme, operation)?,
)?
.minimum(crate::orchestrator::registration::axis_tick_labels_visible(
registered, 1,
))
} else {
(1.0 / 1024.0, 1.0 / 1024.0)
};
let mark = match self.kind() {
PlotKind::Scatter => Some(crate::plots::scatter::intrinsic_body_minimum(
self, registered, theme,
)?),
PlotKind::Qq => Some(crate::plots::qq::intrinsic_body_minimum(
self, registered, theme,
)?),
PlotKind::Regression => Some(crate::plots::regression::intrinsic_body_minimum(
self, registered, theme,
)?),
PlotKind::Line | PlotKind::Trajectory | PlotKind::LinePath => Some(
crate::plots::line::intrinsic_body_minimum(self, registered, theme)?,
),
PlotKind::Density => Some(crate::plots::density::intrinsic_body_minimum(
registered, theme,
)?),
PlotKind::Histogram => Some(crate::plots::histogram::intrinsic_body_minimum(
registered, theme,
)?),
PlotKind::PointInterval | PlotKind::Coefficient | PlotKind::Forest => {
let prepared = registered
.map(|registered| registered.family.as_ref())
.and_then(|family| match family {
crate::orchestrator::registration::FamilyRef::Estimate {
marks, ..
} => Some(marks),
_ => None,
})
.ok_or_else(|| {
Error::Render("estimate intrinsic requires root-prepared rows".into())
})?;
Some(
prepared.mark_intrinsic(
registered.expect("prepared Estimate occurrence"),
®istered
.expect("prepared Estimate occurrence")
.axes
.categories(1)
.expect("prepared Estimate categories")
.raw,
theme,
)?,
)
}
PlotKind::Dumbbell => Some(crate::plots::dumbbell::intrinsic_body_minimum(
self, registered, theme,
)?),
PlotKind::Bar
| PlotKind::StackedBar
| PlotKind::HorizontalBar
| PlotKind::StackedHorizontalBar => Some(
crate::plots::bar_data::intrinsic_body_minimum(self, registered, theme)?,
),
PlotKind::Boxplot => Some(crate::plots::boxplot::intrinsic_body_minimum(
self, registered, theme,
)?),
PlotKind::Raincloud if self.raincloud_geometry_input().is_some() => Some(
crate::plots::violin::precomputed::intrinsic_body_minimum(self, registered, theme)?,
),
PlotKind::Violin | PlotKind::Raincloud => Some(
crate::plots::violin::intrinsic_body_minimum(self, registered, theme)?,
),
PlotKind::Interaction => Some(crate::plots::interaction::intrinsic_body_minimum(
self, registered, theme,
)?),
PlotKind::Heatmap => Some(crate::plots::heatmap::intrinsic_body_minimum(
registered, intrinsic, operation, theme,
)?),
PlotKind::Beeswarm => Some(crate::plots::beeswarm::intrinsic_body_minimum(
self, registered, intrinsic, operation, theme,
)?),
PlotKind::Waterfall => Some(crate::plots::waterfall::intrinsic_body_minimum(
self, registered, intrinsic, operation, theme, ranges,
)?),
PlotKind::Marginal => Some(crate::plots::marginal::intrinsic_body_minimum(
self, registered, intrinsic, operation, theme,
)?),
PlotKind::Matrix => Some(crate::plots::matrix::intrinsic_body_minimum(
self, registered, theme,
)?),
};
if let Some(mark) = mark {
minimum.0 = minimum.0.max(mark.0);
minimum.1 = minimum.1.max(mark.1);
}
Ok(minimum)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum ClearanceAxis {
X,
Y,
}
#[derive(Debug, Clone, Copy)]
pub(crate) struct DomainExpansion {
pub(crate) axis: ClearanceAxis,
pub(crate) limits: (f64, f64),
}
impl DomainExpansion {
pub(crate) fn submit(
self,
round: &mut FeedbackRound,
source: &ComponentAddress,
target: &ComponentAddress,
) -> Result<Option<FeedbackRequestId>, Error> {
let kind = match self.axis {
ClearanceAxis::X => FeedbackKind::AutomaticDomainX,
ClearanceAxis::Y => FeedbackKind::AutomaticDomainY,
};
round.request_domain(source, target, kind, self.limits)
}
}
pub(crate) fn automatic_mark_ink_domain(
axis: ClearanceAxis,
source: (f64, f64),
current: (f64, f64),
pixels: (f64, f64),
projected: (f64, f64),
ink: (f64, f64),
scope: &crate::layout::fit::FitScope,
) -> Result<Option<DomainExpansion>, crate::layout::fit::PlanError> {
use crate::layout::fit::FitKind;
if !source.0.is_finite()
|| !source.1.is_finite()
|| !projected.0.is_finite()
|| !projected.1.is_finite()
{
return Err(
Error::Render("automatic mark ink source/projection must be finite".into()).into(),
);
}
let quantum = 1.0 / 1024.0;
let left = (-ink.0).max(0.0) + 2.0 * quantum;
let right = ink.1.max(0.0) + 2.0 * quantum;
if projected.0 + ink.0 >= pixels.0 + quantum && projected.1 + ink.1 <= pixels.1 - quantum {
return Ok(None);
}
let available = pixels.1 - pixels.0 - left - right;
if !available.is_finite() || available <= 0.0 {
return Err(scope
.failure(
FitKind::TrackOrResidual,
"automatic mark ink leaves no representable data span in its assigned panel",
)
.into());
}
let scale = source
.0
.abs()
.max(source.1.abs())
.max(current.0.abs())
.max(current.1.abs())
.max(1.0);
let span =
((source.1 / scale) - (source.0 / scale)).max((current.1 / scale) - (current.0 / scale));
if !span.is_finite() || span <= 0.0 {
return Err(scope
.failure(
FitKind::SpecializedGeometry,
"automatic mark ink source span is unrepresentable",
)
.into());
}
let lower = ((source.0 / scale) - span * left / available) * scale;
let upper = ((source.1 / scale) + span * right / available) * scale;
if !lower.is_finite() || !upper.is_finite() {
return Err(scope
.failure(
FitKind::SpecializedGeometry,
"automatic mark ink cannot obtain a finite data domain",
)
.into());
}
let limits = (current.0.min(lower), current.1.max(upper));
if limits == current {
return Err(scope
.failure(
FitKind::SpecializedGeometry,
"automatic mark ink cannot extend this representable data domain",
)
.into());
}
Ok(Some(DomainExpansion { axis, limits }))
}
pub(crate) fn automatic_mark_ink_expansions(
source: [(f64, f64); 2],
projection: &crate::layout::Projection,
bounds: crate::render::geometry::GeometryBox,
automatic: [bool; 2],
scope: &crate::layout::fit::FitScope,
) -> Result<[Option<DomainExpansion>; 2], crate::layout::fit::PlanError> {
let mut expansions = [None; 2];
if !automatic.into_iter().any(|axis| axis) {
return Ok(expansions);
}
let low = projection.project(source[0].0, source[1].0);
let high = projection.project(source[0].1, source[1].1);
let panel = projection.panel_box();
for (index, (axis, current, pixels, projected, painted)) in [
(
ClearanceAxis::X,
projection.x_range(),
(panel.x0, panel.x1),
(low.0, high.0),
(bounds.left, bounds.right),
),
(
ClearanceAxis::Y,
projection.y_range(),
(panel.y0, panel.y1),
(low.1, high.1),
(bounds.bottom, bounds.top),
),
]
.into_iter()
.enumerate()
{
if automatic[index] {
expansions[index] = automatic_mark_ink_domain(
axis,
source[index],
current,
pixels,
projected,
painted,
scope,
)?;
}
}
Ok(expansions)
}
pub(crate) fn automatic_absolute_ink_expansions(
source: [(f64, f64); 2],
projection: &crate::layout::Projection,
bounds: crate::render::geometry::GeometryBox,
automatic: [bool; 2],
scope: &crate::layout::fit::FitScope,
) -> Result<[Option<DomainExpansion>; 2], crate::layout::fit::PlanError> {
let mut expansions = [None; 2];
if !automatic.into_iter().any(|axis| axis) {
return Ok(expansions);
}
let low = projection.project(source[0].0, source[1].0);
let high = projection.project(source[0].1, source[1].1);
let panel = projection.panel_box();
for (index, (axis, current, pixels, projected, painted)) in [
(
ClearanceAxis::X,
projection.x_range(),
(panel.x0, panel.x1),
(low.0, high.0),
(bounds.left - low.0, bounds.right - high.0),
),
(
ClearanceAxis::Y,
projection.y_range(),
(panel.y0, panel.y1),
(low.1, high.1),
(bounds.bottom - low.1, bounds.top - high.1),
),
]
.into_iter()
.enumerate()
{
if automatic[index] {
expansions[index] = automatic_mark_ink_domain(
axis,
source[index],
current,
pixels,
projected,
painted,
scope,
)?;
}
}
Ok(expansions)
}
pub(crate) fn merge_mark_domain_expansions(
mut existing: [Option<DomainExpansion>; 2],
additional: [Option<DomainExpansion>; 2],
) -> [Option<DomainExpansion>; 2] {
for (target, candidate) in existing.iter_mut().zip(additional) {
if let Some(candidate) = candidate {
*target = Some(target.map_or(candidate, |current| DomainExpansion {
axis: current.axis,
limits: (
current.limits.0.min(candidate.limits.0),
current.limits.1.max(candidate.limits.1),
),
}));
}
}
existing
}
#[derive(Debug)]
pub(crate) struct SelectedMarkPlan {
pub(crate) payload: MarkPayload,
pub(crate) geometry: crate::render::geometry::GeometrySnapshot,
}
#[derive(Debug)]
pub(crate) enum MarkPayload {
Waterfall(crate::plots::waterfall::WaterfallPayload),
Beeswarm(crate::plots::beeswarm::BeeswarmPayload),
Matrix(crate::plots::matrix::MatrixPayload),
Marginal(crate::plots::marginal::MarginalPayload),
Heatmap(crate::plots::heatmap::HeatmapPayload),
Interaction(crate::plots::interaction::InteractionPayload),
Distribution(crate::plots::categorical_distribution::DistributionPayload),
Bars(crate::plots::bar_data::BarPayload),
Estimate(crate::plots::interval_estimate::EstimatePayload),
Dumbbell(crate::plots::dumbbell::DumbbellPayload),
Scatter(crate::plots::scatter::ScatterPayload),
Line(crate::plots::line::LinePayload),
Histogram(crate::plots::histogram::HistogramPayload),
Density(crate::plots::density::DensityPayload),
Qq(crate::plots::qq::QqPayload),
Regression(crate::plots::regression::RegressionPayload),
}
impl SelectedMarkPlan {
pub(crate) fn draw(
&self,
backend: &mut dyn crate::render::backend::Backend,
) -> Result<(), Error> {
match &self.payload {
MarkPayload::Waterfall(payload) => payload.draw(backend),
MarkPayload::Beeswarm(payload) => payload.draw(backend),
MarkPayload::Matrix(payload) => payload.draw(backend),
MarkPayload::Marginal(payload) => payload.draw(backend),
MarkPayload::Heatmap(payload) => payload.draw(backend),
MarkPayload::Interaction(payload) => payload.draw(backend),
MarkPayload::Distribution(payload) => payload.draw(backend),
MarkPayload::Bars(payload) => payload.draw(backend),
MarkPayload::Estimate(payload) => payload.draw(backend),
MarkPayload::Dumbbell(payload) => payload.draw(backend),
MarkPayload::Scatter(payload) => payload.draw(backend),
MarkPayload::Line(payload) => payload.draw(backend),
MarkPayload::Histogram(payload) => payload.draw(backend),
MarkPayload::Density(payload) => payload.draw(backend),
MarkPayload::Qq(payload) => payload.draw(backend),
MarkPayload::Regression(payload) => payload.draw(backend),
}
}
}
#[derive(Debug)]
pub(crate) struct SelectedAnnotationPlan {
pub(crate) guides: crate::orchestrator::layers::GuideSnapshot,
pub(crate) panel_layer: Option<String>,
pub(crate) panel_clip: crate::layout::PixelRect,
pub(crate) text: Vec<crate::render::backend::PlacedText>,
pub(crate) geometry: crate::render::geometry::GeometrySnapshot,
pub(crate) explanation: Option<crate::render::backend::PlacedText>,
}
impl SelectedAnnotationPlan {
pub(crate) fn draw(
&self,
backend: &mut dyn crate::render::backend::Backend,
) -> Result<(), Error> {
self.guides.draw(backend)?;
if let Some(explanation) = &self.explanation {
explanation.draw(backend)?;
}
if let Some(layer) = &self.panel_layer {
crate::render::backend::with_layer(backend, layer, |backend| {
crate::render::backend::with_clip(backend, self.panel_clip, |backend| {
for text in &self.text {
text.draw(backend)?;
}
Ok(())
})
})?;
}
Ok(())
}
}
#[cfg(test)]
mod automatic_ink_tests {
use super::{automatic_mark_ink_domain, ClearanceAxis};
use crate::layout::fit::{FitKind, PlanError, ROOT_SCOPE};
#[test]
fn painted_extremes_request_one_finite_monotonic_domain_per_automatic_axis() {
let request = automatic_mark_ink_domain(
ClearanceAxis::X,
(0.0, 10.0),
(-0.5, 10.5),
(0.0, 100.0),
(100.0 / 22.0, 100.0 * 21.0 / 22.0),
(-20.0, 20.0),
&ROOT_SCOPE,
)
.unwrap()
.unwrap();
assert!(request.limits.0 < -0.5 && request.limits.1 > 10.5);
let project =
|value: f64| (value - request.limits.0) / (request.limits.1 - request.limits.0) * 100.0;
assert!(project(0.0) - 20.0 > 0.0);
assert!(project(10.0) + 20.0 < 100.0);
assert!(
automatic_mark_ink_domain(
ClearanceAxis::X,
(0.0, 10.0),
request.limits,
(0.0, 100.0),
(project(0.0), project(10.0)),
(-20.0, 20.0),
&ROOT_SCOPE,
)
.unwrap()
.is_none(),
"requested={:?} painted=[{}, {}]",
request.limits,
project(0.0) - 20.0,
project(10.0) + 20.0
);
let miss = automatic_mark_ink_domain(
ClearanceAxis::Y,
(0.0, 10.0),
(-0.5, 10.5),
(0.0, 30.0),
(0.0, 30.0),
(-20.0, 20.0),
&ROOT_SCOPE,
)
.unwrap_err();
assert!(
matches!(miss, PlanError::Fit(failure) if failure.reason.kind == FitKind::TrackOrResidual)
);
let extreme = automatic_mark_ink_domain(
ClearanceAxis::X,
(-f64::MAX, f64::MAX),
(-f64::MAX, f64::MAX),
(0.0, 100.0),
(0.0, 100.0),
(-4.0, 4.0),
&ROOT_SCOPE,
)
.unwrap_err();
assert!(
matches!(extreme, PlanError::Fit(failure) if failure.reason.kind == FitKind::SpecializedGeometry)
);
}
}