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
17unsafe impl NSObjectProtocol for SKPhysicsContact {}
18
19impl SKPhysicsContact {
20 extern_methods!(
21 #[cfg(feature = "SKPhysicsBody")]
22 #[unsafe(method(bodyA))]
23 #[unsafe(method_family = none)]
24 pub unsafe fn bodyA(&self) -> Retained<SKPhysicsBody>;
25
26 #[cfg(feature = "SKPhysicsBody")]
27 #[unsafe(method(bodyB))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn bodyB(&self) -> Retained<SKPhysicsBody>;
30
31 #[cfg(feature = "objc2-core-foundation")]
32 #[unsafe(method(contactPoint))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn contactPoint(&self) -> CGPoint;
35
36 #[cfg(feature = "objc2-core-foundation")]
37 #[unsafe(method(contactNormal))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn contactNormal(&self) -> CGVector;
40
41 #[cfg(feature = "objc2-core-foundation")]
42 #[unsafe(method(collisionImpulse))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn collisionImpulse(&self) -> CGFloat;
45 );
46}
47
48impl SKPhysicsContact {
50 extern_methods!(
51 #[unsafe(method(init))]
52 #[unsafe(method_family = init)]
53 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55 #[unsafe(method(new))]
56 #[unsafe(method_family = new)]
57 pub unsafe fn new() -> Retained<Self>;
58 );
59}