pub trait IPhysicsDirectSpaceState3DExtension: GodotClass + You_forgot_the_attribute__godot_api {
// 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 { ... }
unsafe fn intersect_ray(
&mut self,
from: Vector3,
to: Vector3,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
hit_from_inside: bool,
hit_back_faces: bool,
pick_ray: bool,
result: *mut PhysicsServer3DExtensionRayResult
) -> bool { ... }
unsafe fn intersect_point(
&mut self,
position: Vector3,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
results: *mut PhysicsServer3DExtensionShapeResult,
max_results: i32
) -> i32 { ... }
unsafe fn intersect_shape(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
result_count: *mut PhysicsServer3DExtensionShapeResult,
max_results: i32
) -> i32 { ... }
unsafe fn cast_motion(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
closest_safe: *mut f64,
closest_unsafe: *mut f64,
info: *mut PhysicsServer3DExtensionShapeRestInfo
) -> bool { ... }
unsafe fn collide_shape(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
results: *mut c_void,
max_results: i32,
result_count: *mut i32
) -> bool { ... }
unsafe fn rest_info(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
rest_info: *mut PhysicsServer3DExtensionShapeRestInfo
) -> bool { ... }
fn get_closest_point_to_object_volume(
&self,
object: Rid,
point: Vector3
) -> Vector3 { ... }
}
Expand description
Virtual methods for class PhysicsDirectSpaceState3DExtension
.
These methods represent constructors (init
) or callbacks invoked by the engine.
See also Godot docs for PhysicsDirectSpaceState3DExtension
methods.
Provided Methods§
fn init(base: Base<Self::Base>) -> Self
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
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)
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>
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
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:
unsafe fn intersect_ray(
&mut self,
from: Vector3,
to: Vector3,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
hit_from_inside: bool,
hit_back_faces: bool,
pick_ray: bool,
result: *mut PhysicsServer3DExtensionRayResult
) -> bool
unsafe fn intersect_ray( &mut self, from: Vector3, to: Vector3, collision_mask: u32, collide_with_bodies: bool, collide_with_areas: bool, hit_from_inside: bool, hit_back_faces: bool, pick_ray: bool, result: *mut PhysicsServer3DExtensionRayResult ) -> bool
§Safety
This method has automatically been marked unsafe
because it accepts raw pointers as parameters.
If Godot does not document any safety requirements, make sure you understand the underlying semantics.
unsafe fn intersect_point(
&mut self,
position: Vector3,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
results: *mut PhysicsServer3DExtensionShapeResult,
max_results: i32
) -> i32
unsafe fn intersect_point( &mut self, position: Vector3, collision_mask: u32, collide_with_bodies: bool, collide_with_areas: bool, results: *mut PhysicsServer3DExtensionShapeResult, max_results: i32 ) -> i32
§Safety
This method has automatically been marked unsafe
because it accepts raw pointers as parameters.
If Godot does not document any safety requirements, make sure you understand the underlying semantics.
unsafe fn intersect_shape(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
result_count: *mut PhysicsServer3DExtensionShapeResult,
max_results: i32
) -> i32
unsafe fn intersect_shape( &mut self, shape_rid: Rid, transform: Transform3D, motion: Vector3, margin: f32, collision_mask: u32, collide_with_bodies: bool, collide_with_areas: bool, result_count: *mut PhysicsServer3DExtensionShapeResult, max_results: i32 ) -> i32
§Safety
This method has automatically been marked unsafe
because it accepts raw pointers as parameters.
If Godot does not document any safety requirements, make sure you understand the underlying semantics.
unsafe fn cast_motion(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
closest_safe: *mut f64,
closest_unsafe: *mut f64,
info: *mut PhysicsServer3DExtensionShapeRestInfo
) -> bool
unsafe fn cast_motion( &mut self, shape_rid: Rid, transform: Transform3D, motion: Vector3, margin: f32, collision_mask: u32, collide_with_bodies: bool, collide_with_areas: bool, closest_safe: *mut f64, closest_unsafe: *mut f64, info: *mut PhysicsServer3DExtensionShapeRestInfo ) -> bool
§Safety
This method has automatically been marked unsafe
because it accepts raw pointers as parameters.
If Godot does not document any safety requirements, make sure you understand the underlying semantics.
unsafe fn collide_shape(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
results: *mut c_void,
max_results: i32,
result_count: *mut i32
) -> bool
unsafe fn collide_shape( &mut self, shape_rid: Rid, transform: Transform3D, motion: Vector3, margin: f32, collision_mask: u32, collide_with_bodies: bool, collide_with_areas: bool, results: *mut c_void, max_results: i32, result_count: *mut i32 ) -> bool
§Safety
This method has automatically been marked unsafe
because it accepts raw pointers as parameters.
If Godot does not document any safety requirements, make sure you understand the underlying semantics.
unsafe fn rest_info(
&mut self,
shape_rid: Rid,
transform: Transform3D,
motion: Vector3,
margin: f32,
collision_mask: u32,
collide_with_bodies: bool,
collide_with_areas: bool,
rest_info: *mut PhysicsServer3DExtensionShapeRestInfo
) -> bool
unsafe fn rest_info( &mut self, shape_rid: Rid, transform: Transform3D, motion: Vector3, margin: f32, collision_mask: u32, collide_with_bodies: bool, collide_with_areas: bool, rest_info: *mut PhysicsServer3DExtensionShapeRestInfo ) -> bool
§Safety
This method has automatically been marked unsafe
because it accepts raw pointers as parameters.
If Godot does not document any safety requirements, make sure you understand the underlying semantics.