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
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 #[unsafe(method(shapeWithGeometry:options:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn shapeWithGeometry_options(
87 geometry: &SCNGeometry,
88 options: Option<&NSDictionary<SCNPhysicsShapeOption, AnyObject>>,
89 ) -> Retained<Self>;
90
91 #[cfg(feature = "SCNNode")]
92 #[unsafe(method(shapeWithNode:options:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn shapeWithNode_options(
95 node: &SCNNode,
96 options: Option<&NSDictionary<SCNPhysicsShapeOption, AnyObject>>,
97 ) -> Retained<Self>;
98
99 #[unsafe(method(shapeWithShapes:transforms:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn shapeWithShapes_transforms(
102 shapes: &NSArray<SCNPhysicsShape>,
103 transforms: Option<&NSArray<NSValue>>,
104 ) -> Retained<Self>;
105
106 #[unsafe(method(options))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn options(
109 &self,
110 ) -> Option<Retained<NSDictionary<SCNPhysicsShapeOption, AnyObject>>>;
111
112 #[unsafe(method(sourceObject))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn sourceObject(&self) -> Retained<AnyObject>;
115
116 #[unsafe(method(transforms))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn transforms(&self) -> Option<Retained<NSArray<NSValue>>>;
119 );
120}
121
122impl SCNPhysicsShape {
124 extern_methods!(
125 #[unsafe(method(init))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128
129 #[unsafe(method(new))]
130 #[unsafe(method_family = new)]
131 pub unsafe fn new() -> Retained<Self>;
132 );
133}