fn sample_curved_edge(
        &self,
        affine: &VU::SimpleAffine<I, F>,
        edge_id: VD::EdgeIndex,
        sampled_edge: &mut Vec<[F; 2]>,
    ) -> Result<(), BvError> {
        let max_dist = Self::f64_to_f(1E-3)
            * (self.screen_aabb.get_high().unwrap()[0] - self.screen_aabb.get_low().unwrap()[0]);

        let cell_id = self.diagram.edge_get_cell(edge_id)?;
        let cell = self.diagram.get_cell(cell_id)?.get();
        let twin_id = self.diagram.edge_get_twin(edge_id)?;
        let twin_cell_id = self.diagram.edge_get_cell(twin_id)?;

        let point = if cell.contains_point() {
            self.retrieve_point(cell_id)?
        } else {
            self.retrieve_point(twin_cell_id)?
        };
        let segment = if cell.contains_point() {
            self.retrieve_segment(twin_cell_id)?
        } else {
            self.retrieve_segment(cell_id)?
        };
        VU::VoronoiVisualUtils::<I, F>::discretize(&point, segment, max_dist, affine, sampled_edge);
        Ok(())
    }
/// Important: sampled_edge should contain both edge endpoints initially.
/// sampled_edge should be 'screen' coordinates, i.e. affine transformed from voronoi output
sampled_edge should contain both edge endpoints initially.
sampled_edge should be 'screen' coordinates, i.e. affine transformed from voronoi output
sampled_edge should contain both edge endpoints initially . sampled_edge should be ' screen ' coordinates i . e . affine transformed from voronoi output
fn sample_curved_edge(
        &self,
        affine: &VU::SimpleAffine<I, F>,
        edge_id: VD::EdgeIndex,
        sampled_edge: &mut Vec<[F; 2]>,
    ) -> Result<(), BvError> {
        let max_dist = Self::f64_to_f(1E-3)
            * (self.screen_aabb.get_high().unwrap()[0] - self.screen_aabb.get_low().unwrap()[0]);
        let cell_id = self.diagram.edge_get_cell(edge_id)?;
        let cell = self.diagram.get_cell(cell_id)?.get();
        let twin_id = self.diagram.edge_get_twin(edge_id)?;
        let twin_cell_id = self.diagram.edge_get_cell(twin_id)?;
        let point = if cell.contains_point() {
            self.retrieve_point(cell_id)?
        } else {
            self.retrieve_point(twin_cell_id)?
        };
        let segment = if cell.contains_point() {
            self.retrieve_segment(twin_cell_id)?
        } else {
            self.retrieve_segment(cell_id)?
        };
        VU::VoronoiVisualUtils::<I, F>::discretize(&point, segment, max_dist, affine, sampled_edge);
        Ok(())
    }
fn sample_curved_edge ( & self , affine : & VU :: SimpleAffine < I , F > , edge_id : VD :: EdgeIndex , sampled_edge : & mut Vec < [ F ; 2 ] > , ) -> Result < ( ) , BvError > { let max_dist = Self :: f64_to_f ( 1E-3 ) * ( self . screen_aabb . get_high ( ) . unwrap ( ) [ 0 ] - self . screen_aabb . get_low ( ) . unwrap ( ) [ 0 ] ) ; let cell_id = self . diagram . edge_get_cell ( edge_id ) ? ; let cell = self . diagram . get_cell ( cell_id ) ? . get ( ) ; let twin_id = self . diagram . edge_get_twin ( edge_id ) ? ; let twin_cell_id = self . diagram . edge_get_cell ( twin_id ) ? ; let point = if cell . contains_point ( ) { self . retrieve_point ( cell_id ) ? } else { self . retrieve_point ( twin_cell_id ) ? } ; let segment = if cell . contains_point ( ) { self . retrieve_segment ( twin_cell_id ) ? } else { self . retrieve_segment ( cell_id ) ? } ; VU :: VoronoiVisualUtils :: < I , F > :: discretize ( & point , segment , max_dist , affine , sampled_edge ) ; Ok ( ( ) ) }
Important: sampled_edge should contain both edge endpoints initially.
Important : sampled_edge should contain both edge endpoints initially .
&self
affine
&VU::SimpleAffine<I, F>
edge_id
VD::EdgeIndex
sampled_edge
&mut Vec<[F; 2]>