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§
Sourcefn transform_with_cache(
self,
transform: &Transform,
services: &mut Services,
cache: &mut TransformCache,
) -> Self
fn transform_with_cache( self, transform: &Transform, services: &mut Services, cache: &mut TransformCache, ) -> Self
Transform the object using the provided cache
Provided Methods§
Sourcefn transform(self, transform: &Transform, services: &mut Services) -> Self
fn transform(self, transform: &Transform, services: &mut Services) -> Self
Transform the object
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.