Skip to main content

Deformation

Trait Deformation 

Source
pub trait Deformation {
    // Required methods
    fn point(&self, p: &Vector3) -> GeopResult<Vector3>;
    fn curve(
        &self,
        curve: &NurbCurve3D,
        at: &dyn Fn() -> GeopResult<Vector3>,
    ) -> GeopResult<NurbCurve3D>;
    fn surface(
        &self,
        surface: &NurbSurface3D,
        at: &dyn Fn() -> GeopResult<Vector3>,
    ) -> GeopResult<NurbSurface3D>;
    fn mirrors(&self) -> bool;
    fn affine(&self) -> bool;
}
Expand description

A map of space as it moves geometry: points, curves and surfaces, each keeping its parametrization, so a pcurve on a moved face still traces it. at gives a point of the curve or of the face the surface bounds, asked for only by a map made of pieces where the geometry’s control points straddle two of them: the piece that holds at moves it.

Required Methods§

Source

fn point(&self, p: &Vector3) -> GeopResult<Vector3>

The point p moved.

Source

fn curve( &self, curve: &NurbCurve3D, at: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbCurve3D>

The curve curve moved.

Source

fn surface( &self, surface: &NurbSurface3D, at: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbSurface3D>

The surface surface moved.

Source

fn mirrors(&self) -> bool

Whether it turns the side a surface’s normal points to: a mirror.

Source

fn affine(&self) -> bool

Whether it is affine, mapping control points to control points. One that is not costs by the size of what it maps, so a face’s surface is first cut down to what the face uses of it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Deformation for Motion

Source§

fn point(&self, p: &Vector3) -> GeopResult<Vector3>

Source§

fn curve( &self, curve: &NurbCurve3D, _: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbCurve3D>

Source§

fn surface( &self, surface: &NurbSurface3D, _: &dyn Fn() -> GeopResult<Vector3>, ) -> GeopResult<NurbSurface3D>

Source§

fn mirrors(&self) -> bool

Source§

fn affine(&self) -> bool

Implementors§