Struct gdnative_bindings_lily::BulletPhysicsDirectBodyState [−][src]
pub struct BulletPhysicsDirectBodyState { /* fields omitted */ }
Expand description
core class BulletPhysicsDirectBodyState
inherits PhysicsDirectBodyState
(unsafe).
Official documentation
See the documentation of this class in the Godot engine’s official documentation. The method descriptions are generated from it and typically contain code samples in GDScript, not Rust.
Class hierarchy
BulletPhysicsDirectBodyState inherits methods from:
Safety
All types in the Godot API have “interior mutability” in Rust parlance.
To enforce that the official thread-safety guidelines are
followed, the typestate pattern is used in the Ref
and TRef
smart pointers,
and the Instance
API. The typestate Access
in these types tracks whether the
access is unique, shared, or exclusive to the current thread. For more information,
see the type-level documentation on Ref
.
Methods from Deref<Target = PhysicsDirectBodyState>
Adds a constant directional force without affecting rotation.
This is equivalent to add_force(force, Vector3(0,0,0))
.
Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
Adds a constant rotational force without affecting position.
Applies a single directional impulse without affecting rotation.
This is equivalent to apply_impulse(Vector3(0, 0, 0), impulse)
.
Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object’s origin.
Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector j
passed as parameter.
The body’s rotational velocity.
Returns the collider’s [RID].
Returns the collider’s object id.
Returns the collider object.
Returns the contact position in the collider.
Returns the collider’s shape index.
Returns the linear velocity vector at the collider’s contact point.
Returns the number of contacts this body has with other bodies. Note: By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody.contact_monitor].
Impulse created by the contact. Only implemented for Bullet physics.
Returns the local normal at the contact point.
Returns the local position of the contact point.
Returns the local shape index of the collision.
The inverse of the inertia of the body.
The inverse of the mass of the body.
The body’s linear velocity.
Returns the current state of the space, useful for queries.
The rate at which the body stops rotating, if there are not any other forces moving it.
The total gravity vector being currently applied to this body.
The rate at which the body stops moving, if there are not any other forces moving it.
Calls the built-in force integration code.
If true
, this body is currently sleeping (not active).
The body’s rotational velocity.
The body’s linear velocity.
If true
, this body is currently sleeping (not active).
The body’s transformation matrix.
Trait Implementations
type Target = PhysicsDirectBodyState
type Target = PhysicsDirectBodyState
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
type RefKind = ManuallyManaged
type RefKind = ManuallyManaged
Creates an explicitly null reference of Self
as a method argument. This makes type
inference easier for the compiler compared to Option
. Read more
Creates a new instance of Self
using a zero-argument constructor, as a Unique
reference. Read more
Performs a dynamic reference downcast to target type. Read more
Performs a static reference upcast to a supertype that is guaranteed to be valid. Read more
Creates a persistent reference to the same Godot object with shared thread access. Read more
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
Creates a persistent reference to the same Godot object with thread-local thread access. Read more
Creates a persistent reference to the same Godot object with unique access. Read more
Recovers a instance ID previously returned by Object::get_instance_id
if the object is
still alive. See also TRef::try_from_instance_id
. Read more
Auto Trait Implementations
impl !Send for BulletPhysicsDirectBodyState
impl !Sync for BulletPhysicsDirectBodyState
impl Unpin for BulletPhysicsDirectBodyState
impl UnwindSafe for BulletPhysicsDirectBodyState