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
20extern_conformance!(
21    unsafe impl NSCoding for SCNLevelOfDetail {}
22);
23
24extern_conformance!(
25    unsafe impl NSCopying for SCNLevelOfDetail {}
26);
27
28unsafe impl CopyingHelper for SCNLevelOfDetail {
29    type Result = Self;
30}
31
32extern_conformance!(
33    unsafe impl NSObjectProtocol for SCNLevelOfDetail {}
34);
35
36extern_conformance!(
37    unsafe impl NSSecureCoding for SCNLevelOfDetail {}
38);
39
40impl SCNLevelOfDetail {
41    extern_methods!(
42        #[cfg(all(feature = "SCNGeometry", feature = "objc2-core-foundation"))]
43        /// This is a convenience method to create a level of detail with a coverage radius threshold mode.
44        ///
45        /// 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.
46        ///
47        /// 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.
48        #[unsafe(method(levelOfDetailWithGeometry:screenSpaceRadius:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn levelOfDetailWithGeometry_screenSpaceRadius(
51            geometry: Option<&SCNGeometry>,
52            radius: CGFloat,
53        ) -> Retained<Self>;
54
55        #[cfg(all(feature = "SCNGeometry", feature = "objc2-core-foundation"))]
56        /// This is a convenience method to create a level of detail with a distance threshold mode.
57        ///
58        /// 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.
59        ///
60        /// Parameter `distance`: The minimum distance to the current point of view that this level of detail is suitable for.
61        #[unsafe(method(levelOfDetailWithGeometry:worldSpaceDistance:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn levelOfDetailWithGeometry_worldSpaceDistance(
64            geometry: Option<&SCNGeometry>,
65            distance: CGFloat,
66        ) -> Retained<Self>;
67
68        #[cfg(feature = "SCNGeometry")]
69        /// Returns the geometry of the receiver.
70        #[unsafe(method(geometry))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn geometry(&self) -> Option<Retained<SCNGeometry>>;
73
74        #[cfg(feature = "objc2-core-foundation")]
75        /// Returns the screen space radius of the receiver if any, 0 otherwise.
76        #[unsafe(method(screenSpaceRadius))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn screenSpaceRadius(&self) -> CGFloat;
79
80        #[cfg(feature = "objc2-core-foundation")]
81        /// Returns the world space distance of the receiver if any, 0 otherwise.
82        #[unsafe(method(worldSpaceDistance))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn worldSpaceDistance(&self) -> CGFloat;
85    );
86}
87
88/// Methods declared on superclass `NSObject`.
89impl SCNLevelOfDetail {
90    extern_methods!(
91        #[unsafe(method(init))]
92        #[unsafe(method_family = init)]
93        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95        #[unsafe(method(new))]
96        #[unsafe(method_family = new)]
97        pub unsafe fn new() -> Retained<Self>;
98    );
99}