objc2_scene_kit/generated/
SCNPhysicsContact.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// SCNPhysicsContact contains information about a physics contact.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicscontact?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct SCNPhysicsContact;
17);
18
19unsafe impl NSObjectProtocol for SCNPhysicsContact {}
20
21impl SCNPhysicsContact {
22    extern_methods!(
23        #[cfg(feature = "SCNNode")]
24        #[unsafe(method(nodeA))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn nodeA(&self) -> Retained<SCNNode>;
27
28        #[cfg(feature = "SCNNode")]
29        #[unsafe(method(nodeB))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn nodeB(&self) -> Retained<SCNNode>;
32
33        #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
34        #[unsafe(method(contactPoint))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn contactPoint(&self) -> SCNVector3;
37
38        #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
39        #[unsafe(method(contactNormal))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn contactNormal(&self) -> SCNVector3;
42
43        #[cfg(feature = "objc2-core-foundation")]
44        #[unsafe(method(collisionImpulse))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn collisionImpulse(&self) -> CGFloat;
47
48        #[cfg(feature = "objc2-core-foundation")]
49        #[unsafe(method(penetrationDistance))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn penetrationDistance(&self) -> CGFloat;
52
53        #[cfg(feature = "objc2-core-foundation")]
54        #[unsafe(method(sweepTestFraction))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn sweepTestFraction(&self) -> CGFloat;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61impl SCNPhysicsContact {
62    extern_methods!(
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}