pub struct Bulb<'a> {
pub bulb: &'a Bulb,
}
Expand description
Models a bulb within a bulb group.
Fields§
§bulb: &'a Bulb
Implementations§
Source§impl Bulb<'_>
impl Bulb<'_>
Sourcepub fn unique_id(&self) -> UniqueBulbId
pub fn unique_id(&self) -> UniqueBulbId
Returns this Bulb instance’s unique identifier.
Sourcepub fn position_bulb_group(&self) -> InertialPosition
pub fn position_bulb_group(&self) -> InertialPosition
Get the position of the Bulb in the bulb group.
§Return
An crate::api::InertialPosition representing the position of the Bulb in the bulb group.
Sourcepub fn orientation_bulb_group(&self) -> Rotation
pub fn orientation_bulb_group(&self) -> Rotation
Get the orientation of the Bulb in the bulb group.
§Return
An crate::api::Rotation representing the orientation of the Bulb in the bulb group.
Sourcepub fn arrow_orientation_rad(&self) -> Option<f64>
pub fn arrow_orientation_rad(&self) -> Option<f64>
Returns the arrow’s orientation. Only applicable if Bulb::bulb_type returns BulbType::Arrow.
Sourcepub fn get_default_state(&self) -> BulbState
pub fn get_default_state(&self) -> BulbState
Get the default state of the Bulb.
Sourcepub fn is_valid_state(&self, state: &BulbState) -> bool
pub fn is_valid_state(&self, state: &BulbState) -> bool
Check if the given state is possible valid for the Bulb.
Sourcepub fn bounding_box(&self) -> (Vector3, Vector3)
pub fn bounding_box(&self) -> (Vector3, Vector3)
Returns the bounding box of the bulb.
§Return
A tuple containing the minimum and maximum points of the bounding box.
Auto Trait Implementations§
impl<'a> Freeze for Bulb<'a>
impl<'a> RefUnwindSafe for Bulb<'a>
impl<'a> !Send for Bulb<'a>
impl<'a> !Sync for Bulb<'a>
impl<'a> Unpin for Bulb<'a>
impl<'a> UnwindSafe for Bulb<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more