Skip to main content

PatternKind

Enum PatternKind 

Source
pub enum PatternKind {
    Unresolved {
        form: Option<PatternForm>,
    },
    Linear {
        direction: Option<Vector3>,
        spacing: Length,
        count: u32,
        second: Option<LinearPatternDirection>,
    },
    LinearOffsets {
        direction: Option<Vector3>,
        offsets: Vec<Length>,
    },
    Circular {
        axis_origin: Point3,
        axis_dir: Vector3,
        angle: Angle,
        count: u32,
    },
    CircularAngles {
        axis_origin: Point3,
        axis_dir: Vector3,
        angles: Vec<Angle>,
    },
    CurveDriven {
        path: Option<PathRef>,
        spacing: Length,
        count: u32,
    },
    Mirror {
        plane_origin: Point3,
        plane_normal: Vector3,
    },
    Scale {
        center: PatternScaleCenter,
        final_factor: f64,
        count: u32,
    },
    Composite {
        stages: Vec<PatternStage>,
    },
}
Expand description

Spatial transform used to repeat or reflect seed features.

Variants§

§

Unresolved

Pattern construction whose form or required operands are unresolved.

Fields

§form: Option<PatternForm>

Native pattern form, when identified independently of its operands.

§

Linear

Repeats seeds evenly along a straight direction.

Fields

§direction: Option<Vector3>

Repetition direction, when resolved.

§spacing: Length

Distance between consecutive instances.

§count: u32

Total number of instances, including the original.

§second: Option<LinearPatternDirection>

Optional complete second translation direction.

§

LinearOffsets

Repeats seeds at explicitly located distances along a straight direction.

Fields

§direction: Option<Vector3>

Repetition direction, when resolved.

§offsets: Vec<Length>

Cumulative distances from the original instance, beginning with zero.

§

Circular

Repeats seeds evenly around an axis.

Fields

§axis_origin: Point3

A point on the pattern axis.

§axis_dir: Vector3

Unit direction of the pattern axis.

§angle: Angle

Angular span covered by the pattern.

§count: u32

Total number of instances, including the original.

§

CircularAngles

Repeats seeds at explicitly located angles around an axis.

Fields

§axis_origin: Point3

A point on the pattern axis.

§axis_dir: Vector3

Unit direction of the pattern axis.

§angles: Vec<Angle>

Cumulative angles from the original instance, beginning with zero.

§

CurveDriven

Repeats seeds at fixed arc-length spacing along a curve.

Fields

§path: Option<PathRef>

Pattern path, when its native reference is available.

§spacing: Length

Arc-length spacing between consecutive instances.

§count: u32

Total number of instances, including the original.

§

Mirror

Reflects seeds across a plane.

Fields

§plane_origin: Point3

A point on the mirror plane.

§plane_normal: Vector3

Unit normal of the mirror plane.

§

Scale

Repeats seeds using progressive uniform scales.

Fields

§center: PatternScaleCenter

Fixed locus used by every scale transform.

§final_factor: f64

Scale factor of the final instance relative to the original.

§count: u32

Total number of instances, including the original.

§

Composite

Applies an ordered sequence of pattern stages.

Fields

§stages: Vec<PatternStage>

Stages in application order.

Trait Implementations§

Source§

impl Clone for PatternKind

Source§

fn clone(&self) -> PatternKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PatternKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PatternKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for PatternKind

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for PatternKind

Source§

fn eq(&self, other: &PatternKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PatternKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PatternKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.