1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use crate::procedural::path::PolylineCompatibleCap;
use na::{Point3, Vector3};
use simba::scalar::RealField;

/// A cap that renders nothing.
pub struct NoCap;

impl NoCap {
    /// Creates a new `NoCap`.
    #[inline]
    pub fn new() -> NoCap {
        NoCap
    }
}

impl<N: RealField> PolylineCompatibleCap<N> for NoCap {
    fn gen_start_cap(
        &self,
        _: u32,
        _: &[Point3<N>],
        _: &Point3<N>,
        _: &Vector3<N>,
        _: bool,
        _: &mut Vec<Point3<N>>,
        _: &mut Vec<Point3<u32>>,
    ) {
    }

    fn gen_end_cap(
        &self,
        _: u32,
        _: &[Point3<N>],
        _: &Point3<N>,
        _: &Vector3<N>,
        _: bool,
        _: &mut Vec<Point3<N>>,
        _: &mut Vec<Point3<u32>>,
    ) {
    }
}