pub enum ShadingType {
FunctionBased {
domain: [f32; 4],
matrix: Affine,
function: ShadingFunction,
},
RadialAxial {
coords: [f32; 6],
domain: [f32; 2],
function: ShadingFunction,
extend: [bool; 2],
axial: bool,
},
TriangleMesh {
triangles: Vec<Triangle>,
function: Option<ShadingFunction>,
},
CoonsPatchMesh {
patches: Vec<CoonsPatch>,
function: Option<ShadingFunction>,
},
TensorProductPatchMesh {
patches: Vec<TensorProductPatch>,
function: Option<ShadingFunction>,
},
Dummy,
}Expand description
A type of shading.
Variants§
FunctionBased
A function-based shading.
Fields
function: ShadingFunctionThe function that should be used to evaluate the shading.
RadialAxial
A radial-axial shading.
Fields
coords: [f32; 6]The coordinates of the shading.
For axial shadings, only the first 4 entries are relevant, representing the x/y coordinates of the first point and the coordinates for the second point.
For radial shadings, the coordinates contain the x/y coordinates as well as the radius for both circles.
function: ShadingFunctionThe function forming the basis of the shading.
TriangleMesh
A triangle-mesh shading.
Fields
function: Option<ShadingFunction>An optional function used for calculating the sampled color values.
CoonsPatchMesh
A coons-patch-mesh shading.
Fields
patches: Vec<CoonsPatch>The patches that make up the shading.
function: Option<ShadingFunction>An optional function used for calculating the sampled color values.
TensorProductPatchMesh
A tensor-product-patch-mesh shading.
Fields
patches: Vec<TensorProductPatch>The patches that make up the shading.
function: Option<ShadingFunction>An optional function used for calculating the sampled color values.
Dummy
A dummy shading that should just be drawn transparent.