objc2_scene_kit/generated/
SCNPhysicsShape.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapeoption?language=objc)
10// NS_TYPED_ENUM
11pub type SCNPhysicsShapeOption = NSString;
12
13extern "C" {
14    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapetypekey?language=objc)
15    pub static SCNPhysicsShapeTypeKey: &'static SCNPhysicsShapeOption;
16}
17
18extern "C" {
19    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapekeepascompoundkey?language=objc)
20    pub static SCNPhysicsShapeKeepAsCompoundKey: &'static SCNPhysicsShapeOption;
21}
22
23extern "C" {
24    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapescalekey?language=objc)
25    pub static SCNPhysicsShapeScaleKey: &'static SCNPhysicsShapeOption;
26}
27
28extern "C" {
29    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapeoptioncollisionmargin?language=objc)
30    pub static SCNPhysicsShapeOptionCollisionMargin: &'static SCNPhysicsShapeOption;
31}
32
33/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapetype?language=objc)
34// NS_TYPED_ENUM
35pub type SCNPhysicsShapeType = NSString;
36
37extern "C" {
38    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapetypeboundingbox?language=objc)
39    pub static SCNPhysicsShapeTypeBoundingBox: &'static SCNPhysicsShapeType;
40}
41
42extern "C" {
43    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapetypeconvexhull?language=objc)
44    pub static SCNPhysicsShapeTypeConvexHull: &'static SCNPhysicsShapeType;
45}
46
47extern "C" {
48    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshapetypeconcavepolyhedron?language=objc)
49    pub static SCNPhysicsShapeTypeConcavePolyhedron: &'static SCNPhysicsShapeType;
50}
51
52extern_class!(
53    /// SCNPhysicsShape represents the shape of a physics body.
54    ///
55    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnphysicsshape?language=objc)
56    #[unsafe(super(NSObject))]
57    #[derive(Debug, PartialEq, Eq, Hash)]
58    pub struct SCNPhysicsShape;
59);
60
61extern_conformance!(
62    unsafe impl NSCoding for SCNPhysicsShape {}
63);
64
65extern_conformance!(
66    unsafe impl NSCopying for SCNPhysicsShape {}
67);
68
69unsafe impl CopyingHelper for SCNPhysicsShape {
70    type Result = Self;
71}
72
73extern_conformance!(
74    unsafe impl NSObjectProtocol for SCNPhysicsShape {}
75);
76
77extern_conformance!(
78    unsafe impl NSSecureCoding for SCNPhysicsShape {}
79);
80
81impl SCNPhysicsShape {
82    extern_methods!(
83        #[cfg(feature = "SCNGeometry")]
84        /// # Safety
85        ///
86        /// `options` generic should be of the correct type.
87        #[unsafe(method(shapeWithGeometry:options:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn shapeWithGeometry_options(
90            geometry: &SCNGeometry,
91            options: Option<&NSDictionary<SCNPhysicsShapeOption, AnyObject>>,
92        ) -> Retained<Self>;
93
94        #[cfg(feature = "SCNNode")]
95        /// # Safety
96        ///
97        /// `options` generic should be of the correct type.
98        #[unsafe(method(shapeWithNode:options:))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn shapeWithNode_options(
101            node: &SCNNode,
102            options: Option<&NSDictionary<SCNPhysicsShapeOption, AnyObject>>,
103        ) -> Retained<Self>;
104
105        #[unsafe(method(shapeWithShapes:transforms:))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn shapeWithShapes_transforms(
108            shapes: &NSArray<SCNPhysicsShape>,
109            transforms: Option<&NSArray<NSValue>>,
110        ) -> Retained<Self>;
111
112        #[unsafe(method(options))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn options(
115            &self,
116        ) -> Option<Retained<NSDictionary<SCNPhysicsShapeOption, AnyObject>>>;
117
118        #[unsafe(method(sourceObject))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn sourceObject(&self) -> Retained<AnyObject>;
121
122        #[unsafe(method(transforms))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn transforms(&self) -> Option<Retained<NSArray<NSValue>>>;
125    );
126}
127
128/// Methods declared on superclass `NSObject`.
129impl SCNPhysicsShape {
130    extern_methods!(
131        #[unsafe(method(init))]
132        #[unsafe(method_family = init)]
133        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
134
135        #[unsafe(method(new))]
136        #[unsafe(method_family = new)]
137        pub unsafe fn new() -> Retained<Self>;
138    );
139}