pub fn revolve(&mut self, current: &glm::Vec2, options: &InteractionOptions) {
        match &mut self.data {
            SquidData::Rect(rect) => {
                if let Some(expression) = rect.revolve_behavior.express(current, options) {
                    let mut new_data = *rect.data.get_real();
                    new_data.position = MultiLerp::Circle(expression.apply_origin_rotation_to_center(), expression.origin);
                    new_data.rotation += expression.delta_object_rotation;
                    rect.data.set(new_data);
                }
            }
            SquidData::Circle(circle) => {
                if let Some(expression) = circle.revolve_behavior.express(current, options) {
                    let mut new_data = *circle.data.get_real();
                    new_data.position = MultiLerp::Circle(expression.apply_origin_rotation_to_center(), expression.origin);
                    new_data.virtual_rotation += expression.delta_object_rotation;
                    circle.data.set(new_data);
                }
            }
            SquidData::Tri(tri) => {
                if let Some(expression) = tri.revolve_behavior.express(current, options) {
                    let mut new_data = *tri.data.get_real();
                    new_data.position = MultiLerp::Circle(expression.apply_origin_rotation_to_center(), expression.origin);
                    new_data.rotation += expression.delta_object_rotation;
                    tri.data.set(new_data);
                }
            }
        }
    }
// Revolves a squid body around point
Revolves a squid body around point
Revolves a squid body around point
pub fn revolve(&mut self, current: &glm::Vec2, options: &InteractionOptions) {
        match &mut self.data {
            SquidData::Rect(rect) => {
                if let Some(expression) = rect.revolve_behavior.express(current, options) {
                    let mut new_data = *rect.data.get_real();
                    new_data.position = MultiLerp::Circle(expression.apply_origin_rotation_to_center(), expression.origin);
                    new_data.rotation += expression.delta_object_rotation;
                    rect.data.set(new_data);
                }
            }
            SquidData::Circle(circle) => {
                if let Some(expression) = circle.revolve_behavior.express(current, options) {
                    let mut new_data = *circle.data.get_real();
                    new_data.position = MultiLerp::Circle(expression.apply_origin_rotation_to_center(), expression.origin);
                    new_data.virtual_rotation += expression.delta_object_rotation;
                    circle.data.set(new_data);
                }
            }
            SquidData::Tri(tri) => {
                if let Some(expression) = tri.revolve_behavior.express(current, options) {
                    let mut new_data = *tri.data.get_real();
                    new_data.position = MultiLerp::Circle(expression.apply_origin_rotation_to_center(), expression.origin);
                    new_data.rotation += expression.delta_object_rotation;
                    tri.data.set(new_data);
                }
            }
        }
    }
pub fn revolve ( & mut self , current : & glm :: Vec2 , options : & InteractionOptions ) { match & mut self . data { SquidData :: Rect ( rect ) => { if let Some ( expression ) = rect . revolve_behavior . express ( current , options ) { let mut new_data = * rect . data . get_real ( ) ; new_data . position = MultiLerp :: Circle ( expression . apply_origin_rotation_to_center ( ) , expression . origin ) ; new_data . rotation += expression . delta_object_rotation ; rect . data . set ( new_data ) ; } } SquidData :: Circle ( circle ) => { if let Some ( expression ) = circle . revolve_behavior . express ( current , options ) { let mut new_data = * circle . data . get_real ( ) ; new_data . position = MultiLerp :: Circle ( expression . apply_origin_rotation_to_center ( ) , expression . origin ) ; new_data . virtual_rotation += expression . delta_object_rotation ; circle . data . set ( new_data ) ; } } SquidData :: Tri ( tri ) => { if let Some ( expression ) = tri . revolve_behavior . express ( current , options ) { let mut new_data = * tri . data . get_real ( ) ; new_data . position = MultiLerp :: Circle ( expression . apply_origin_rotation_to_center ( ) , expression . origin ) ; new_data . rotation += expression . delta_object_rotation ; tri . data . set ( new_data ) ; } } } }
Revolves a squid body around point
Revolves a squid body around point
&mut self
current
&glm::Vec2
options
&InteractionOptions
&mut self
current
&glm::Vec2
options
&InteractionOptions