Trait TransformObject

Source
pub trait TransformObject: Sized {
    // Required method
    fn transform_with_cache(
        self,
        transform: &Transform,
        services: &mut Services,
        cache: &mut TransformCache,
    ) -> Self;

    // Provided methods
    fn transform(self, transform: &Transform, services: &mut Services) -> Self { ... }
    fn translate(
        self,
        offset: impl Into<Vector<3>>,
        services: &mut Services,
    ) -> Self { ... }
    fn rotate(
        self,
        axis_angle: impl Into<Vector<3>>,
        services: &mut Services,
    ) -> Self { ... }
}
Expand description

Transform an object

§Implementation Note

So far, a general transform method is available, along some convenience methods for more specific transformations.

More convenience methods can be added as required. The only reason this hasn’t been done so far, is that no one has put in the work yet.

Required Methods§

Source

fn transform_with_cache( self, transform: &Transform, services: &mut Services, cache: &mut TransformCache, ) -> Self

Transform the object using the provided cache

Provided Methods§

Source

fn transform(self, transform: &Transform, services: &mut Services) -> Self

Transform the object

Source

fn translate( self, offset: impl Into<Vector<3>>, services: &mut Services, ) -> Self

Translate the object

Convenience wrapper around TransformObject::transform.

Source

fn rotate( self, axis_angle: impl Into<Vector<3>>, services: &mut Services, ) -> Self

Rotate the object

Convenience wrapper around TransformObject::transform.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§