use std::rc::Rc;
use super::EventSource;
#[derive(Default, Clone, Debug)]
pub struct TouchPoint {
pub view_x: f32,
pub view_y: f32,
pub id: i32,
pub source: Option<Box<EventSource>>,
}
impl TouchPoint {
pub fn new(id: i32) -> Self {
Self {
id,
..Default::default()
}
}
pub fn init(&mut self, view_x: f32, view_y: f32) {
self.view_x = view_x;
self.view_y = view_y;
}
}
impl PartialEq for TouchPoint {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
}
}