Derive Macro crystal_ball_derive::Transformable
source · #[derive(Transformable)]
{
// Attributes available to this derive:
#[transform]
#[internal]
}
Expand description
Easily implement Transformable
.
The implementation simply multiplies the new transform with the old one.
§Attributes
#[transform]
: declares which field should be used for the implementation#[internal]
: for use incrystal_ball
itself only
§Examples
use crystal_ball::math::Transform;
use crystal_ball::Transformable;
#[derive(Copy, Clone, Default, Debug, PartialEq, Transformable)]
pub struct Sphere {
#[transform]
pub transform: Transform,
}