feat(input): tip

This commit is contained in:
Nova
2022-10-01 22:55:41 -04:00
parent a67583a22c
commit c75798cbe9
2 changed files with 58 additions and 0 deletions

View File

@@ -1,8 +1,10 @@
pub mod hand;
pub mod pointer;
pub mod tip;
use self::hand::Hand;
use self::pointer::Pointer;
use self::tip::Tip;
use super::fields::Field;
use super::spatial::{get_spatial_parent_flex, parse_transform, Spatial};
@@ -38,6 +40,7 @@ pub trait InputSpecialization: Send + Sync {
pub enum InputType {
Pointer(Pointer),
Hand(Box<Hand>),
Tip(Tip),
}
impl Deref for InputType {
type Target = dyn InputSpecialization;
@@ -45,6 +48,7 @@ impl Deref for InputType {
match self {
InputType::Pointer(p) => p,
InputType::Hand(h) => h.as_ref(),
InputType::Tip(t) => t,
}
}
}