objc2_scene_kit/generated/
SCNLevelOfDetail.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::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// SCNLevelOfDetail represents a level of detail of a geometry.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlevelofdetail?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct SCNLevelOfDetail;
18);
19
20unsafe impl NSCoding for SCNLevelOfDetail {}
21
22unsafe impl NSCopying for SCNLevelOfDetail {}
23
24unsafe impl CopyingHelper for SCNLevelOfDetail {
25    type Result = Self;
26}
27
28unsafe impl NSObjectProtocol for SCNLevelOfDetail {}
29
30unsafe impl NSSecureCoding for SCNLevelOfDetail {}
31
32impl SCNLevelOfDetail {
33    extern_methods!(
34        #[cfg(all(feature = "SCNGeometry", feature = "objc2-core-foundation"))]
35        /// This is a convenience method to create a level of detail with a coverage radius threshold mode.
36        ///
37        /// Parameter `geometry`: The geometry for this level of detail. nil is supported and indicates that no geometry should be rendered for this level of detail.
38        ///
39        /// Parameter `radius`: The maximum radius in screen-space that this level of detail is suitable for. The coverage radius is calculated from the projected bounding sphere and expressed in pixels.
40        #[unsafe(method(levelOfDetailWithGeometry:screenSpaceRadius:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn levelOfDetailWithGeometry_screenSpaceRadius(
43            geometry: Option<&SCNGeometry>,
44            radius: CGFloat,
45        ) -> Retained<Self>;
46
47        #[cfg(all(feature = "SCNGeometry", feature = "objc2-core-foundation"))]
48        /// This is a convenience method to create a level of detail with a distance threshold mode.
49        ///
50        /// Parameter `geometry`: The geometry for this level of detail. nil is supported and indicates that no geometry should be rendered for this level of detail.
51        ///
52        /// Parameter `distance`: The minimum distance to the current point of view that this level of detail is suitable for.
53        #[unsafe(method(levelOfDetailWithGeometry:worldSpaceDistance:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn levelOfDetailWithGeometry_worldSpaceDistance(
56            geometry: Option<&SCNGeometry>,
57            distance: CGFloat,
58        ) -> Retained<Self>;
59
60        #[cfg(feature = "SCNGeometry")]
61        /// Returns the geometry of the receiver.
62        #[unsafe(method(geometry))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn geometry(&self) -> Option<Retained<SCNGeometry>>;
65
66        #[cfg(feature = "objc2-core-foundation")]
67        /// Returns the screen space radius of the receiver if any, 0 otherwise.
68        #[unsafe(method(screenSpaceRadius))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn screenSpaceRadius(&self) -> CGFloat;
71
72        #[cfg(feature = "objc2-core-foundation")]
73        /// Returns the world space distance of the receiver if any, 0 otherwise.
74        #[unsafe(method(worldSpaceDistance))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn worldSpaceDistance(&self) -> CGFloat;
77    );
78}
79
80/// Methods declared on superclass `NSObject`.
81impl SCNLevelOfDetail {
82    extern_methods!(
83        #[unsafe(method(init))]
84        #[unsafe(method_family = init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub unsafe fn new() -> Retained<Self>;
90    );
91}