ArticulationBody

Struct ArticulationBody 

Source
pub struct ArticulationBody {
Show 32 fields pub m_AnchorPosition: Vector3f, pub m_AnchorRotation: Quaternionf, pub m_AngularDamping: f32, pub m_ArticulationJointType: i32, pub m_Enabled: u8, pub m_GameObject: PPtr, pub m_Immovable: bool, pub m_JointFriction: f32, pub m_LinearDamping: f32, pub m_LinearX: i32, pub m_LinearY: i32, pub m_LinearZ: i32, pub m_Mass: f32, pub m_ParentAnchorPosition: Vector3f, pub m_ParentAnchorRotation: Quaternionf, pub m_SwingY: i32, pub m_SwingZ: i32, pub m_Twist: i32, pub m_XDrive: ArticulationDrive, pub m_YDrive: ArticulationDrive, pub m_ZDrive: ArticulationDrive, pub m_CenterOfMass: Option<Vector3f>, pub m_CollisionDetectionMode: Option<i32>, pub m_ComputeParentAnchor: Option<bool>, pub m_ExcludeLayers: Option<BitField>, pub m_ImplicitCom: Option<bool>, pub m_ImplicitTensor: Option<bool>, pub m_IncludeLayers: Option<BitField>, pub m_InertiaRotation: Option<Quaternionf>, pub m_InertiaTensor: Option<Vector3f>, pub m_MatchAnchors: Option<bool>, pub m_UseGravity: Option<bool>,
}
Expand description

ArticulationBody is a class of the Unity engine since version 2020.1.0b1. Exert from Unity’s scripting documentation: A body that forms part of a Physics articulation. An articulation is a set of bodies arranged in a logical tree. The parent-child link in this tree reflects that the bodies have their relative motion constrained. Articulations are solved by a Featherstone solver that works in reduced coordinates - that is each body has relative coordinates to its parent but only along the unlocked degrees of freedom. This guarantees there is no unwanted stretch.

Like with regular Joints, there are two anchors for each pair of connected articulation bodies. One anchor is defined in the parent body’s reference frame, whereas the other one is defined in the child’s reference frame. Changing the constraints, you directly affect the allowed space for relative positions of the two anchors. For instance, ArticulationDofLock.LockedMotion will not allow any relative motion at all.

Fields§

§m_AnchorPosition: Vector3f

Position of the anchor relative to this body.

§m_AnchorRotation: Quaternionf

Rotation of the anchor relative to this body.

§m_AngularDamping: f32

Damping factor that affects how this body resists rotations.

§m_ArticulationJointType: i32§m_Enabled: u8

Enabled Behaviours are Updated, disabled Behaviours are not.

§m_GameObject: PPtr

The game object this component is attached to. A component is always attached to a game object. PPtr<GameObject>: (2020.1.0b1 - 2022.3.2f1)

§m_Immovable: bool

Allows you to specify that this body is not movable.

§m_JointFriction: f32

Allows you to specify the amount of friction that is applied as a result of the parent body moving relative to this body.

§m_LinearDamping: f32

Damping factor that affects how this body resists linear motion.

§m_LinearX: i32§m_LinearY: i32§m_LinearZ: i32§m_Mass: f32

The mass of this articulation body.

§m_ParentAnchorPosition: Vector3f

Position of the anchor relative to this body’s parent.

§m_ParentAnchorRotation: Quaternionf

Rotation of the anchor relative to this body’s parent.

§m_SwingY: i32§m_SwingZ: i32§m_Twist: i32§m_XDrive: ArticulationDrive

The properties of drive along or around X.

§m_YDrive: ArticulationDrive

The properties of drive along or around Y.

§m_ZDrive: ArticulationDrive

The properties of drive along or around Z.

§m_CenterOfMass: Option<Vector3f>

The center of mass of the body defined in local space. Vector3f: (2022.2.0b1 - 2022.3.2f1)

§m_CollisionDetectionMode: Option<i32>

The ArticulationBody’s collision detection mode. i32: (2020.3.5f1 - 2022.3.2f1)

§m_ComputeParentAnchor: Option<bool>

bool: (2020.1.0b1 - 2021.2.0a20)

§m_ExcludeLayers: Option<BitField>

The additional layers that all Colliders attached to this ArticulationBody should exclude when deciding if the Collider can come into contact with another Collider. BitField: (2022.2.0b1 - 2022.3.2f1)

§m_ImplicitCom: Option<bool>

bool: (2022.2.0b1 - 2022.3.2f1)

§m_ImplicitTensor: Option<bool>

bool: (2022.2.0b1 - 2022.3.2f1)

§m_IncludeLayers: Option<BitField>

The additional layers that all Colliders attached to this ArticulationBody should include when deciding if a the Collider can come into contact with another Collider. BitField: (2022.2.0b1 - 2022.3.2f1)

§m_InertiaRotation: Option<Quaternionf>

Quaternionf: (2022.2.0b1 - 2022.3.2f1)

§m_InertiaTensor: Option<Vector3f>

The inertia tensor of this body. Vector3f: (2022.2.0b1 - 2022.3.2f1)

§m_MatchAnchors: Option<bool>

Whether the parent anchor should be computed automatically or not. bool: (2021.2.0b1 - 2022.3.2f1)

§m_UseGravity: Option<bool>

Controls whether gravity affects this articulation body. bool: (2020.1.0b1 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for ArticulationBody

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ArticulationBody

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ArticulationBody

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,