#[repr(transparent)]pub struct MTLCurveBasis(pub NSInteger);MTLAccelerationStructure only.Expand description
Basis function to use to interpolate curve control points
See also Apple’s documentation
Tuple Fields§
§0: NSIntegerImplementations§
Source§impl MTLCurveBasis
impl MTLCurveBasis
Sourcepub const BSpline: Self
pub const BSpline: Self
B-Spline basis. Each curve segment must have 3 or 4 control points. Curve segments join with C^(N - 2) continuity, where N is the number of control points. The curve does not necessarily pass through the control points without additional control points at the beginning and end of the curve. Each curve segment can overlap N-1 control points.
Sourcepub const CatmullRom: Self
pub const CatmullRom: Self
Catmull-Rom basis. Curves represented in this basis can also be easily converted to and from the Bézier basis. Each curve segment must have 4 control points. Each index in the control point index buffer points to the first of 4 consecutive control points in the control point buffer.
The tangent at each control point is given by (P_(i+1) - P_(i-1)) / 2. Therefore, the curve does not pass through the first and last control point of each connected sequence of curve segments. Instead, the first and last control point are used to control the tangent vector at the beginning and end of the curve.
Curve segments join with C^1 continuity and the curve passes through the control points. Each curve segment can overlap 3 control points.
Trait Implementations§
Source§impl Clone for MTLCurveBasis
impl Clone for MTLCurveBasis
Source§fn clone(&self) -> MTLCurveBasis
fn clone(&self) -> MTLCurveBasis
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more