pub trait IPhysicsDirectBodyState3DExtension: GodotClass + You_forgot_the_attribute__godot_api {
Show 51 methods // Provided methods fn init(base: Base<Self::Base>) -> Self { ... } fn to_string(&self) -> GString { ... } fn on_notification(&mut self, what: ObjectNotification) { ... } fn get_property(&self, property: StringName) -> Option<Variant> { ... } fn set_property(&mut self, property: StringName, value: Variant) -> bool { ... } fn get_total_gravity(&self) -> Vector3 { ... } fn get_total_linear_damp(&self) -> f32 { ... } fn get_total_angular_damp(&self) -> f32 { ... } fn get_center_of_mass(&self) -> Vector3 { ... } fn get_center_of_mass_local(&self) -> Vector3 { ... } fn get_principal_inertia_axes(&self) -> Basis { ... } fn get_inverse_mass(&self) -> f32 { ... } fn get_inverse_inertia(&self) -> Vector3 { ... } fn get_inverse_inertia_tensor(&self) -> Basis { ... } fn set_linear_velocity(&mut self, velocity: Vector3) { ... } fn get_linear_velocity(&self) -> Vector3 { ... } fn set_angular_velocity(&mut self, velocity: Vector3) { ... } fn get_angular_velocity(&self) -> Vector3 { ... } fn set_transform(&mut self, transform: Transform3D) { ... } fn get_transform(&self) -> Transform3D { ... } fn get_velocity_at_local_position(&self, local_position: Vector3) -> Vector3 { ... } fn apply_central_impulse(&mut self, impulse: Vector3) { ... } fn apply_impulse(&mut self, impulse: Vector3, position: Vector3) { ... } fn apply_torque_impulse(&mut self, impulse: Vector3) { ... } fn apply_central_force(&mut self, force: Vector3) { ... } fn apply_force(&mut self, force: Vector3, position: Vector3) { ... } fn apply_torque(&mut self, torque: Vector3) { ... } fn add_constant_central_force(&mut self, force: Vector3) { ... } fn add_constant_force(&mut self, force: Vector3, position: Vector3) { ... } fn add_constant_torque(&mut self, torque: Vector3) { ... } fn set_constant_force(&mut self, force: Vector3) { ... } fn get_constant_force(&self) -> Vector3 { ... } fn set_constant_torque(&mut self, torque: Vector3) { ... } fn get_constant_torque(&self) -> Vector3 { ... } fn set_sleep_state(&mut self, enabled: bool) { ... } fn is_sleeping(&self) -> bool { ... } fn get_contact_count(&self) -> i32 { ... } fn get_contact_local_position(&self, contact_idx: i32) -> Vector3 { ... } fn get_contact_local_normal(&self, contact_idx: i32) -> Vector3 { ... } fn get_contact_impulse(&self, contact_idx: i32) -> Vector3 { ... } fn get_contact_local_shape(&self, contact_idx: i32) -> i32 { ... } fn get_contact_local_velocity_at_position( &self, contact_idx: i32 ) -> Vector3 { ... } fn get_contact_collider(&self, contact_idx: i32) -> Rid { ... } fn get_contact_collider_position(&self, contact_idx: i32) -> Vector3 { ... } fn get_contact_collider_id(&self, contact_idx: i32) -> u64 { ... } fn get_contact_collider_object( &self, contact_idx: i32 ) -> Option<Gd<Object>> { ... } fn get_contact_collider_shape(&self, contact_idx: i32) -> i32 { ... } fn get_contact_collider_velocity_at_position( &self, contact_idx: i32 ) -> Vector3 { ... } fn get_step(&self) -> f32 { ... } fn integrate_forces(&mut self) { ... } fn get_space_state(&mut self) -> Option<Gd<PhysicsDirectSpaceState3D>> { ... }
}
Expand description

Virtual methods for class PhysicsDirectBodyState3DExtension.

These methods represent constructors (init) or callbacks invoked by the engine.

See also Godot docs for PhysicsDirectBodyState3DExtension methods.

Provided Methods§

fn init(base: Base<Self::Base>) -> Self

Godot constructor, accepting an injected base object.

base refers to the base instance of the class, which can either be stored in a Base<T> field or discarded. This method returns a fully-constructed instance, which will then be moved into a Gd<T> pointer.

If the class has a #[class(init)] attribute, this method will be auto-generated and must not be overridden.

fn to_string(&self) -> GString

String representation of the Godot instance.

Override this method to define how the instance is represented as a string. Used by impl Display for Gd<T>, as well as str() and print() in GDScript.

fn on_notification(&mut self, what: ObjectNotification)

Called when the object receives a Godot notification.

The type of notification can be identified through what. The enum is designed to hold all possible NOTIFICATION_* constants that the current class can handle. However, this is not validated in Godot, so an enum variant Unknown exists to represent integers out of known constants (mistakes or future additions).

This method is named _notification in Godot, but on_notification in Rust. To send notifications, use the Object::notify method.

See also in Godot docs:

fn get_property(&self, property: StringName) -> Option<Variant>

Called whenever get() is called or Godot gets the value of a property.

Should return the given property’s value as Some(value), or None if the property should be handled normally.

See also in Godot docs:

fn set_property(&mut self, property: StringName, value: Variant) -> bool

Called whenever Godot set() is called or Godot sets the value of a property.

Should set property to the given value and return true, or return false to indicate the property should be handled normally.

See also in Godot docs:

fn get_total_gravity(&self) -> Vector3

fn get_total_linear_damp(&self) -> f32

fn get_total_angular_damp(&self) -> f32

fn get_center_of_mass(&self) -> Vector3

fn get_center_of_mass_local(&self) -> Vector3

fn get_principal_inertia_axes(&self) -> Basis

fn get_inverse_mass(&self) -> f32

fn get_inverse_inertia(&self) -> Vector3

fn get_inverse_inertia_tensor(&self) -> Basis

fn set_linear_velocity(&mut self, velocity: Vector3)

fn get_linear_velocity(&self) -> Vector3

fn set_angular_velocity(&mut self, velocity: Vector3)

fn get_angular_velocity(&self) -> Vector3

fn set_transform(&mut self, transform: Transform3D)

fn get_transform(&self) -> Transform3D

fn get_velocity_at_local_position(&self, local_position: Vector3) -> Vector3

fn apply_central_impulse(&mut self, impulse: Vector3)

fn apply_impulse(&mut self, impulse: Vector3, position: Vector3)

fn apply_torque_impulse(&mut self, impulse: Vector3)

fn apply_central_force(&mut self, force: Vector3)

fn apply_force(&mut self, force: Vector3, position: Vector3)

fn apply_torque(&mut self, torque: Vector3)

fn add_constant_central_force(&mut self, force: Vector3)

fn add_constant_force(&mut self, force: Vector3, position: Vector3)

fn add_constant_torque(&mut self, torque: Vector3)

fn set_constant_force(&mut self, force: Vector3)

fn get_constant_force(&self) -> Vector3

fn set_constant_torque(&mut self, torque: Vector3)

fn get_constant_torque(&self) -> Vector3

fn set_sleep_state(&mut self, enabled: bool)

fn is_sleeping(&self) -> bool

fn get_contact_count(&self) -> i32

fn get_contact_local_position(&self, contact_idx: i32) -> Vector3

fn get_contact_local_normal(&self, contact_idx: i32) -> Vector3

fn get_contact_impulse(&self, contact_idx: i32) -> Vector3

fn get_contact_local_shape(&self, contact_idx: i32) -> i32

fn get_contact_local_velocity_at_position(&self, contact_idx: i32) -> Vector3

fn get_contact_collider(&self, contact_idx: i32) -> Rid

fn get_contact_collider_position(&self, contact_idx: i32) -> Vector3

fn get_contact_collider_id(&self, contact_idx: i32) -> u64

fn get_contact_collider_object(&self, contact_idx: i32) -> Option<Gd<Object>>

fn get_contact_collider_shape(&self, contact_idx: i32) -> i32

fn get_contact_collider_velocity_at_position(&self, contact_idx: i32) -> Vector3

fn get_step(&self) -> f32

fn integrate_forces(&mut self)

fn get_space_state(&mut self) -> Option<Gd<PhysicsDirectSpaceState3D>>

Object Safety§

This trait is not object safe.

Implementors§