objc2_sprite_kit/generated/
SKPhysicsContact.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct SKPhysicsContact;
15);
16
17extern_conformance!(
18 unsafe impl NSObjectProtocol for SKPhysicsContact {}
19);
20
21impl SKPhysicsContact {
22 extern_methods!(
23 #[cfg(feature = "SKPhysicsBody")]
24 #[unsafe(method(bodyA))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn bodyA(&self) -> Retained<SKPhysicsBody>;
27
28 #[cfg(feature = "SKPhysicsBody")]
29 #[unsafe(method(bodyB))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn bodyB(&self) -> Retained<SKPhysicsBody>;
32
33 #[cfg(feature = "objc2-core-foundation")]
34 #[unsafe(method(contactPoint))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn contactPoint(&self) -> CGPoint;
37
38 #[cfg(feature = "objc2-core-foundation")]
39 #[unsafe(method(contactNormal))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn contactNormal(&self) -> CGVector;
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}
49
50impl SKPhysicsContact {
52 extern_methods!(
53 #[unsafe(method(init))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57 #[unsafe(method(new))]
58 #[unsafe(method_family = new)]
59 pub unsafe fn new() -> Retained<Self>;
60 );
61}