pub struct BulbGroup<'a> {
pub bulb_group: &'a BulbGroup,
}
Expand description
Models a group of bulbs within a traffic light. All of the bulbs within a group should share the same approximate orientation. However, this is not programmatically enforced. About the bulb group pose:
- The position of the bulb group is defined as the linear offset of this bulb group’s frame relative to the frame of the traffic light that contains it. The origin of this bulb group’s frame should approximate the bulb group’s CoM.
- The orientation of the bulb group is defined as the rotational offset of this bulb group’s frame relative to the frame of the traffic light that contains it. The +Z axis should align with the bulb group’s “up” direction, and the +X axis should point in the direction that the bulb group is facing. Following a right-handed coordinate frame, the +Y axis should point left when facing the +X direction.
Fields§
§bulb_group: &'a BulbGroup
Implementations§
Source§impl BulbGroup<'_>
impl BulbGroup<'_>
Sourcepub fn unique_id(&self) -> UniqueBulbGroupId
pub fn unique_id(&self) -> UniqueBulbGroupId
Returns this BulbGroup instance’s unique identifier.
Sourcepub fn position_traffic_light(&self) -> InertialPosition
pub fn position_traffic_light(&self) -> InertialPosition
Get the position of the BulbGroup in the traffic light.
§Return
An crate::api::InertialPosition representing the position of the BulbGroup in the traffic light.
Sourcepub fn orientation_traffic_light(&self) -> Rotation
pub fn orientation_traffic_light(&self) -> Rotation
Get the orientation of the BulbGroup in the traffic light.
§Return
An crate::api::Rotation representing the orientation of the BulbGroup in the traffic light.
Sourcepub fn traffic_light(&self) -> TrafficLight<'_>
pub fn traffic_light(&self) -> TrafficLight<'_>
Returns the parent TrafficLight of the bulb group.
§Return
The parent TrafficLight of the bulb group.
Auto Trait Implementations§
impl<'a> Freeze for BulbGroup<'a>
impl<'a> RefUnwindSafe for BulbGroup<'a>
impl<'a> !Send for BulbGroup<'a>
impl<'a> !Sync for BulbGroup<'a>
impl<'a> Unpin for BulbGroup<'a>
impl<'a> UnwindSafe for BulbGroup<'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