mirror of
https://github.com/mii443/rust-openvr.git
synced 2025-08-22 16:25:36 +00:00
Render model component state helpers
This commit is contained in:
@ -239,6 +239,14 @@ pub struct ComponentState {
|
|||||||
pub properties: ComponentProperties,
|
pub properties: ComponentProperties,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ComponentState {
|
||||||
|
pub fn is_static(&self) -> bool { self.properties & component_properties::IS_STATIC != 0 }
|
||||||
|
pub fn is_visible(&self) -> bool { self.properties & component_properties::IS_VISIBLE != 0 }
|
||||||
|
pub fn is_touched(&self) -> bool { self.properties & component_properties::IS_TOUCHED != 0 }
|
||||||
|
pub fn is_pressed(&self) -> bool { self.properties & component_properties::IS_PRESSED != 0 }
|
||||||
|
pub fn is_scrolled(&self) -> bool { self.properties & component_properties::IS_SCROLLED != 0 }
|
||||||
|
}
|
||||||
|
|
||||||
type ComponentProperties = sys::VRComponentProperties;
|
type ComponentProperties = sys::VRComponentProperties;
|
||||||
|
|
||||||
pub mod component_properties {
|
pub mod component_properties {
|
||||||
|
Reference in New Issue
Block a user