objc2_scene_kit/generated/
SCNPhysicsShape.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9pub type SCNPhysicsShapeOption = NSString;
12
13extern "C" {
14 pub static SCNPhysicsShapeTypeKey: &'static SCNPhysicsShapeOption;
16}
17
18extern "C" {
19 pub static SCNPhysicsShapeKeepAsCompoundKey: &'static SCNPhysicsShapeOption;
21}
22
23extern "C" {
24 pub static SCNPhysicsShapeScaleKey: &'static SCNPhysicsShapeOption;
26}
27
28extern "C" {
29 pub static SCNPhysicsShapeOptionCollisionMargin: &'static SCNPhysicsShapeOption;
31}
32
33pub type SCNPhysicsShapeType = NSString;
36
37extern "C" {
38 pub static SCNPhysicsShapeTypeBoundingBox: &'static SCNPhysicsShapeType;
40}
41
42extern "C" {
43 pub static SCNPhysicsShapeTypeConvexHull: &'static SCNPhysicsShapeType;
45}
46
47extern "C" {
48 pub static SCNPhysicsShapeTypeConcavePolyhedron: &'static SCNPhysicsShapeType;
50}
51
52extern_class!(
53 #[unsafe(super(NSObject))]
57 #[derive(Debug, PartialEq, Eq, Hash)]
58 pub struct SCNPhysicsShape;
59);
60
61unsafe impl NSCoding for SCNPhysicsShape {}
62
63unsafe impl NSCopying for SCNPhysicsShape {}
64
65unsafe impl CopyingHelper for SCNPhysicsShape {
66 type Result = Self;
67}
68
69unsafe impl NSObjectProtocol for SCNPhysicsShape {}
70
71unsafe impl NSSecureCoding for SCNPhysicsShape {}
72
73impl SCNPhysicsShape {
74 extern_methods!(
75 #[cfg(feature = "SCNGeometry")]
76 #[unsafe(method(shapeWithGeometry:options:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn shapeWithGeometry_options(
79 geometry: &SCNGeometry,
80 options: Option<&NSDictionary<SCNPhysicsShapeOption, AnyObject>>,
81 ) -> Retained<Self>;
82
83 #[cfg(feature = "SCNNode")]
84 #[unsafe(method(shapeWithNode:options:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn shapeWithNode_options(
87 node: &SCNNode,
88 options: Option<&NSDictionary<SCNPhysicsShapeOption, AnyObject>>,
89 ) -> Retained<Self>;
90
91 #[unsafe(method(shapeWithShapes:transforms:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn shapeWithShapes_transforms(
94 shapes: &NSArray<SCNPhysicsShape>,
95 transforms: Option<&NSArray<NSValue>>,
96 ) -> Retained<Self>;
97
98 #[unsafe(method(options))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn options(
101 &self,
102 ) -> Option<Retained<NSDictionary<SCNPhysicsShapeOption, AnyObject>>>;
103
104 #[unsafe(method(sourceObject))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn sourceObject(&self) -> Retained<AnyObject>;
107
108 #[unsafe(method(transforms))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn transforms(&self) -> Option<Retained<NSArray<NSValue>>>;
111 );
112}
113
114impl SCNPhysicsShape {
116 extern_methods!(
117 #[unsafe(method(init))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120
121 #[unsafe(method(new))]
122 #[unsafe(method_family = new)]
123 pub unsafe fn new() -> Retained<Self>;
124 );
125}