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        ///
26        /// # Safety
27        ///
28        /// - `min` must be a valid pointer or null.
29        /// - `max` must be a valid pointer or null.
30        #[unsafe(method(getBoundingBoxMin:max:))]
31        #[unsafe(method_family = none)]
32        unsafe fn getBoundingBoxMin_max(&self, min: *mut SCNVector3, max: *mut SCNVector3) -> bool;
33
34        #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
35        /// Override the receiver bounding box with the min and max vectors provided (in local space of the receiver).
36        ///
37        /// Parameter `min`: A pointer to a SCNVector3 representing the min vertex of the desired bounding box.
38        ///
39        /// Parameter `max`: A pointer to a SCNVector3 representing the max vertex of the desired bounding box.
40        ///
41        /// Passing nil as arguments will recompute the original bounding box of the receiver.
42        ///
43        /// # Safety
44        ///
45        /// - `min` must be a valid pointer or null.
46        /// - `max` must be a valid pointer or null.
47        #[unsafe(method(setBoundingBoxMin:max:))]
48        #[unsafe(method_family = none)]
49        unsafe fn setBoundingBoxMin_max(&self, min: *mut SCNVector3, max: *mut SCNVector3);
50
51        #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
52        /// Fill the center vector with the center of the bounding sphere and store the radius of the bounding sphere in 'radius'.
53        ///
54        /// Parameter `center`: A pointer to a SCNVector3 to store the center of the bounding sphere into.
55        ///
56        /// Parameter `radius`: A pointer to a CGFloat to store the radius of the bounding sphere into.
57        ///
58        /// the returned bounding sphere is in local space of the receiver.
59        ///
60        /// # Safety
61        ///
62        /// - `center` must be a valid pointer or null.
63        /// - `radius` must be a valid pointer or null.
64        #[unsafe(method(getBoundingSphereCenter:radius:))]
65        #[unsafe(method_family = none)]
66        unsafe fn getBoundingSphereCenter_radius(
67            &self,
68            center: *mut SCNVector3,
69            radius: *mut CGFloat,
70        ) -> bool;
71    }
72);