mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-27 09:35:52 +00:00
Update name of enum variant
This commit is contained in:
parent
e632bd55ca
commit
218dfdbae2
@ -4,14 +4,14 @@ use crate::{Shape, Shape2d};
|
|||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub enum Shape3d {
|
pub enum Shape3d {
|
||||||
|
/// The union of two 3-dimensional shapes
|
||||||
|
Group(Box<Group>),
|
||||||
|
|
||||||
/// A sweep of 2-dimensional shape along the z-axis
|
/// A sweep of 2-dimensional shape along the z-axis
|
||||||
Sweep(Sweep),
|
Sweep(Sweep),
|
||||||
|
|
||||||
/// A transformed 3-dimensional shape
|
/// A transformed 3-dimensional shape
|
||||||
Transform(Box<Transform>),
|
Transform(Box<Transform>),
|
||||||
|
|
||||||
/// The union of two 3-dimensional shapes
|
|
||||||
Union(Box<Group>),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<Shape3d> for Shape {
|
impl From<Shape3d> for Shape {
|
||||||
@ -40,13 +40,13 @@ pub struct Group {
|
|||||||
|
|
||||||
impl From<Group> for Shape {
|
impl From<Group> for Shape {
|
||||||
fn from(shape: Group) -> Self {
|
fn from(shape: Group) -> Self {
|
||||||
Self::Shape3d(Shape3d::Union(Box::new(shape)))
|
Self::Shape3d(Shape3d::Group(Box::new(shape)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<Group> for Shape3d {
|
impl From<Group> for Shape3d {
|
||||||
fn from(shape: Group) -> Self {
|
fn from(shape: Group) -> Self {
|
||||||
Self::Union(Box::new(shape))
|
Self::Group(Box::new(shape))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ macro_rules! dispatch {
|
|||||||
$(
|
$(
|
||||||
fn $method(&self, $($arg_name: $arg_ty,)*) -> $ret {
|
fn $method(&self, $($arg_name: $arg_ty,)*) -> $ret {
|
||||||
match self {
|
match self {
|
||||||
|
Self::Group(shape) => shape.$method($($arg_name,)*),
|
||||||
Self::Sweep(shape) => shape.$method($($arg_name,)*),
|
Self::Sweep(shape) => shape.$method($($arg_name,)*),
|
||||||
Self::Transform(shape) => shape.$method($($arg_name,)*),
|
Self::Transform(shape) => shape.$method($($arg_name,)*),
|
||||||
Self::Union(shape) => shape.$method($($arg_name,)*),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)*
|
)*
|
||||||
|
Loading…
Reference in New Issue
Block a user