use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MDLCameraProjection(pub NSUInteger);
impl MDLCameraProjection {
#[doc(alias = "MDLCameraProjectionPerspective")]
pub const Perspective: Self = Self(0);
#[doc(alias = "MDLCameraProjectionOrthographic")]
pub const Orthographic: Self = Self(1);
}
unsafe impl Encode for MDLCameraProjection {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MDLCameraProjection {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(MDLObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "MDLObject")]
pub struct MDLCamera;
);
#[cfg(all(feature = "MDLObject", feature = "MDLTypes"))]
extern_conformance!(
unsafe impl MDLNamed for MDLCamera {}
);
#[cfg(feature = "MDLObject")]
extern_conformance!(
unsafe impl NSObjectProtocol for MDLCamera {}
);
#[cfg(feature = "MDLObject")]
impl MDLCamera {
extern_methods!(
#[unsafe(method(projection))]
#[unsafe(method_family = none)]
pub unsafe fn projection(&self) -> MDLCameraProjection;
#[unsafe(method(setProjection:))]
#[unsafe(method_family = none)]
pub unsafe fn setProjection(&self, projection: MDLCameraProjection);
#[unsafe(method(nearVisibilityDistance))]
#[unsafe(method_family = none)]
pub unsafe fn nearVisibilityDistance(&self) -> c_float;
#[unsafe(method(setNearVisibilityDistance:))]
#[unsafe(method_family = none)]
pub unsafe fn setNearVisibilityDistance(&self, near_visibility_distance: c_float);
#[unsafe(method(farVisibilityDistance))]
#[unsafe(method_family = none)]
pub unsafe fn farVisibilityDistance(&self) -> c_float;
#[unsafe(method(setFarVisibilityDistance:))]
#[unsafe(method_family = none)]
pub unsafe fn setFarVisibilityDistance(&self, far_visibility_distance: c_float);
#[unsafe(method(worldToMetersConversionScale))]
#[unsafe(method_family = none)]
pub unsafe fn worldToMetersConversionScale(&self) -> c_float;
#[unsafe(method(setWorldToMetersConversionScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setWorldToMetersConversionScale(
&self,
world_to_meters_conversion_scale: c_float,
);
#[unsafe(method(barrelDistortion))]
#[unsafe(method_family = none)]
pub unsafe fn barrelDistortion(&self) -> c_float;
#[unsafe(method(setBarrelDistortion:))]
#[unsafe(method_family = none)]
pub unsafe fn setBarrelDistortion(&self, barrel_distortion: c_float);
#[unsafe(method(fisheyeDistortion))]
#[unsafe(method_family = none)]
pub unsafe fn fisheyeDistortion(&self) -> c_float;
#[unsafe(method(setFisheyeDistortion:))]
#[unsafe(method_family = none)]
pub unsafe fn setFisheyeDistortion(&self, fisheye_distortion: c_float);
#[unsafe(method(opticalVignetting))]
#[unsafe(method_family = none)]
pub unsafe fn opticalVignetting(&self) -> c_float;
#[unsafe(method(setOpticalVignetting:))]
#[unsafe(method_family = none)]
pub unsafe fn setOpticalVignetting(&self, optical_vignetting: c_float);
#[unsafe(method(chromaticAberration))]
#[unsafe(method_family = none)]
pub unsafe fn chromaticAberration(&self) -> c_float;
#[unsafe(method(setChromaticAberration:))]
#[unsafe(method_family = none)]
pub unsafe fn setChromaticAberration(&self, chromatic_aberration: c_float);
#[unsafe(method(focalLength))]
#[unsafe(method_family = none)]
pub unsafe fn focalLength(&self) -> c_float;
#[unsafe(method(setFocalLength:))]
#[unsafe(method_family = none)]
pub unsafe fn setFocalLength(&self, focal_length: c_float);
#[unsafe(method(focusDistance))]
#[unsafe(method_family = none)]
pub unsafe fn focusDistance(&self) -> c_float;
#[unsafe(method(setFocusDistance:))]
#[unsafe(method_family = none)]
pub unsafe fn setFocusDistance(&self, focus_distance: c_float);
#[unsafe(method(fieldOfView))]
#[unsafe(method_family = none)]
pub unsafe fn fieldOfView(&self) -> c_float;
#[unsafe(method(setFieldOfView:))]
#[unsafe(method_family = none)]
pub unsafe fn setFieldOfView(&self, field_of_view: c_float);
#[unsafe(method(fStop))]
#[unsafe(method_family = none)]
pub unsafe fn fStop(&self) -> c_float;
#[unsafe(method(setFStop:))]
#[unsafe(method_family = none)]
pub unsafe fn setFStop(&self, f_stop: c_float);
#[unsafe(method(apertureBladeCount))]
#[unsafe(method_family = none)]
pub unsafe fn apertureBladeCount(&self) -> NSUInteger;
#[unsafe(method(setApertureBladeCount:))]
#[unsafe(method_family = none)]
pub unsafe fn setApertureBladeCount(&self, aperture_blade_count: NSUInteger);
#[unsafe(method(maximumCircleOfConfusion))]
#[unsafe(method_family = none)]
pub unsafe fn maximumCircleOfConfusion(&self) -> c_float;
#[unsafe(method(setMaximumCircleOfConfusion:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaximumCircleOfConfusion(&self, maximum_circle_of_confusion: c_float);
#[unsafe(method(shutterOpenInterval))]
#[unsafe(method_family = none)]
pub unsafe fn shutterOpenInterval(&self) -> NSTimeInterval;
#[unsafe(method(setShutterOpenInterval:))]
#[unsafe(method_family = none)]
pub unsafe fn setShutterOpenInterval(&self, shutter_open_interval: NSTimeInterval);
#[unsafe(method(sensorVerticalAperture))]
#[unsafe(method_family = none)]
pub unsafe fn sensorVerticalAperture(&self) -> c_float;
#[unsafe(method(setSensorVerticalAperture:))]
#[unsafe(method_family = none)]
pub unsafe fn setSensorVerticalAperture(&self, sensor_vertical_aperture: c_float);
#[unsafe(method(sensorAspect))]
#[unsafe(method_family = none)]
pub unsafe fn sensorAspect(&self) -> c_float;
#[unsafe(method(setSensorAspect:))]
#[unsafe(method_family = none)]
pub unsafe fn setSensorAspect(&self, sensor_aspect: c_float);
);
}
#[cfg(feature = "MDLObject")]
impl MDLCamera {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(MDLCamera, MDLObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "MDLObject")]
pub struct MDLStereoscopicCamera;
);
#[cfg(all(feature = "MDLObject", feature = "MDLTypes"))]
extern_conformance!(
unsafe impl MDLNamed for MDLStereoscopicCamera {}
);
#[cfg(feature = "MDLObject")]
extern_conformance!(
unsafe impl NSObjectProtocol for MDLStereoscopicCamera {}
);
#[cfg(feature = "MDLObject")]
impl MDLStereoscopicCamera {
extern_methods!(
#[unsafe(method(interPupillaryDistance))]
#[unsafe(method_family = none)]
pub unsafe fn interPupillaryDistance(&self) -> c_float;
#[unsafe(method(setInterPupillaryDistance:))]
#[unsafe(method_family = none)]
pub unsafe fn setInterPupillaryDistance(&self, inter_pupillary_distance: c_float);
#[unsafe(method(leftVergence))]
#[unsafe(method_family = none)]
pub unsafe fn leftVergence(&self) -> c_float;
#[unsafe(method(setLeftVergence:))]
#[unsafe(method_family = none)]
pub unsafe fn setLeftVergence(&self, left_vergence: c_float);
#[unsafe(method(rightVergence))]
#[unsafe(method_family = none)]
pub unsafe fn rightVergence(&self) -> c_float;
#[unsafe(method(setRightVergence:))]
#[unsafe(method_family = none)]
pub unsafe fn setRightVergence(&self, right_vergence: c_float);
#[unsafe(method(overlap))]
#[unsafe(method_family = none)]
pub unsafe fn overlap(&self) -> c_float;
#[unsafe(method(setOverlap:))]
#[unsafe(method_family = none)]
pub unsafe fn setOverlap(&self, overlap: c_float);
);
}
#[cfg(feature = "MDLObject")]
impl MDLStereoscopicCamera {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}