objc2_scene_kit/generated/SCNBoundingVolume.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 /// The SCNBoundingVolume protocol is implemented by objects which can compute their bounding boxes.
12 ///
13 /// You can currently use this protocol to get the bounding boxes of nodes and geometries.
14 ///
15 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnboundingvolume?language=objc)
16 pub unsafe trait SCNBoundingVolume: NSObjectProtocol {
17 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
18 /// Fill the min and max vectors with the min and max vertex of the bounding box.
19 ///
20 /// Parameter `min`: A pointer to a SCNVector3 to store the min vertex of the bounding box into.
21 ///
22 /// Parameter `max`: A pointer to a SCNVector3 to store the max vertex of the bounding box into.
23 ///
24 /// the returned bounding box is in local space of the receiver.
25 #[unsafe(method(getBoundingBoxMin:max:))]
26 #[unsafe(method_family = none)]
27 unsafe fn getBoundingBoxMin_max(&self, min: *mut SCNVector3, max: *mut SCNVector3) -> bool;
28
29 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
30 /// Override the receiver bounding box with the min and max vectors provided (in local space of the receiver).
31 ///
32 /// Parameter `min`: A pointer to a SCNVector3 representing the min vertex of the desired bounding box.
33 ///
34 /// Parameter `max`: A pointer to a SCNVector3 representing the max vertex of the desired bounding box.
35 ///
36 /// Passing nil as arguments will recompute the original bounding box of the receiver.
37 #[unsafe(method(setBoundingBoxMin:max:))]
38 #[unsafe(method_family = none)]
39 unsafe fn setBoundingBoxMin_max(&self, min: *mut SCNVector3, max: *mut SCNVector3);
40
41 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
42 /// Fill the center vector with the center of the bounding sphere and store the radius of the bounding sphere in 'radius'.
43 ///
44 /// Parameter `center`: A pointer to a SCNVector3 to store the center of the bounding sphere into.
45 ///
46 /// Parameter `radius`: A pointer to a CGFloat to store the radius of the bounding sphere into.
47 ///
48 /// the returned bounding sphere is in local space of the receiver.
49 #[unsafe(method(getBoundingSphereCenter:radius:))]
50 #[unsafe(method_family = none)]
51 unsafe fn getBoundingSphereCenter_radius(
52 &self,
53 center: *mut SCNVector3,
54 radius: *mut CGFloat,
55 ) -> bool;
56 }
57);