pub struct RobotModule {
pub shape: ShapePrimitive,
pub mass: f32,
pub density: f32,
pub material_id: MaterialId,
pub sensors: Vec<SensorMount>,
pub transform: (Vec3, Quat),
}Expand description
A single rigid body segment of the robot.
Fields§
§shape: ShapePrimitiveThe physical shape of this segment.
mass: f32Mass in kg, computed from shape volume and density via bevy_heavy.
density: f32Density in kg/m³ used to derive mass properties.
material_id: MaterialIdMaterial ID for visual rendering (links to external palette).
sensors: Vec<SensorMount>Sensors attached directly to this module.
transform: (Vec3, Quat)Initial World Transform (Position, Rotation) for the Rest Pose. Essential for stable physics initialization.
Trait Implementations§
Source§impl Clone for RobotModule
impl Clone for RobotModule
Source§fn clone(&self) -> RobotModule
fn clone(&self) -> RobotModule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RobotModule
impl Debug for RobotModule
Source§impl<'de> Deserialize<'de> for RobotModule
impl<'de> Deserialize<'de> for RobotModule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RobotModule
impl RefUnwindSafe for RobotModule
impl Send for RobotModule
impl Sync for RobotModule
impl Unpin for RobotModule
impl UnsafeUnpin for RobotModule
impl UnwindSafe for RobotModule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more