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
19extern_conformance!(
20    unsafe impl NSObjectProtocol for SCNPhysicsContact {}
21);
22
23impl SCNPhysicsContact {
24    extern_methods!(
25        #[cfg(feature = "SCNNode")]
26        #[unsafe(method(nodeA))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn nodeA(&self) -> Retained<SCNNode>;
29
30        #[cfg(feature = "SCNNode")]
31        #[unsafe(method(nodeB))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn nodeB(&self) -> Retained<SCNNode>;
34
35        #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
36        #[unsafe(method(contactPoint))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn contactPoint(&self) -> SCNVector3;
39
40        #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
41        #[unsafe(method(contactNormal))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn contactNormal(&self) -> SCNVector3;
44
45        #[cfg(feature = "objc2-core-foundation")]
46        #[unsafe(method(collisionImpulse))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn collisionImpulse(&self) -> CGFloat;
49
50        #[cfg(feature = "objc2-core-foundation")]
51        #[unsafe(method(penetrationDistance))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn penetrationDistance(&self) -> CGFloat;
54
55        #[cfg(feature = "objc2-core-foundation")]
56        #[unsafe(method(sweepTestFraction))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn sweepTestFraction(&self) -> CGFloat;
59    );
60}
61
62/// Methods declared on superclass `NSObject`.
63impl SCNPhysicsContact {
64    extern_methods!(
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72    );
73}