use super::PredictionSchemeImpl;
use crate::core::attribute::{Attribute, AttributeType};
use crate::core::corner_table::GenericCornerTable;
use crate::core::shared::{CornerIdx, Float, NdVector, Vector, VertexIdx};
pub struct DerivativePredictionForTextureCoordinates<'a, C, const N: usize> {
#[allow(dead_code)] corner_table: &'a C,
#[allow(dead_code)] points: &'a Attribute,
}
impl<'a, C, const N: usize> DerivativePredictionForTextureCoordinates<'a, C, N>
where
C: GenericCornerTable,
NdVector<N, i32>: Vector<N, Component = i32>,
{
#[allow(dead_code)] fn predict_impl<F>(
&self,
_values_up_till_now: &[NdVector<N, i32>],
_points: &[NdVector<3, F>],
_faces: &[[usize; 3]],
) -> NdVector<N, i32>
where
F: Float,
NdVector<3, F>: Vector<N, Component = F>,
{
unimplemented!()
}
}
impl<'parents, C, const N: usize> PredictionSchemeImpl<'parents, C, N>
for DerivativePredictionForTextureCoordinates<'parents, C, N>
where
C: GenericCornerTable,
NdVector<N, i32>: Vector<N, Component = i32>,
{
const ID: u32 = 4;
type AdditionalDataForMetadata = ();
fn new(parents: &[&'parents Attribute], corner_table: &'parents C) -> Self {
assert!(
parents.len() == 2,
"Derivative prediction needs two parents: faces and points."
);
assert!(
parents[0].get_attribute_type() == AttributeType::Position,
"Derivative prediction needs points points as parents, but they are: {:?}.",
parents[0].get_attribute_type()
);
Self {
corner_table,
points: parents[0],
}
}
fn get_values_impossible_to_predict(
&mut self,
_seq: &mut Vec<std::ops::Range<usize>>,
) -> Vec<std::ops::Range<usize>> {
unimplemented!();
}
fn predict(
&mut self,
_i: CornerIdx,
_vertices_processed_up_till_now: &[VertexIdx],
_attribute: &Attribute,
) -> NdVector<N, i32> {
unimplemented!()
}
}