1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/gameplaykit/gkpath?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GKPath;
);
extern_conformance!(
unsafe impl NSObjectProtocol for GKPath {}
);
impl GKPath {
extern_methods!(
/// Radius of the pathway. Defines a spatial area that the path occupies.
/// This can be though of as the union between rectangles between all points, and circles at each point
#[unsafe(method(radius))]
#[unsafe(method_family = none)]
pub unsafe fn radius(&self) -> c_float;
/// Setter for [`radius`][Self::radius].
#[unsafe(method(setRadius:))]
#[unsafe(method_family = none)]
pub unsafe fn setRadius(&self, radius: c_float);
/// Number of points in this path
#[unsafe(method(numPoints))]
#[unsafe(method_family = none)]
pub unsafe fn numPoints(&self) -> NSUInteger;
/// Does this path loop back on itself, creating a cycle?
#[unsafe(method(isCyclical))]
#[unsafe(method_family = none)]
pub unsafe fn isCyclical(&self) -> bool;
/// Setter for [`isCyclical`][Self::isCyclical].
#[unsafe(method(setCyclical:))]
#[unsafe(method_family = none)]
pub unsafe fn setCyclical(&self, cyclical: bool);
#[cfg(feature = "GKGraphNode")]
/// Creates a path from an array of graph nodes (often a result of pathfinding)
/// Accepts GKGraphNode2D and GKGraphNode3D
/// Cyclical is set to NO
///
/// Parameter `graphNodes`: an array of graph nodes to make a path from
///
/// Parameter `radius`: radius of the path to create
///
/// See: GKGraphNode
#[unsafe(method(pathWithGraphNodes:radius:))]
#[unsafe(method_family = none)]
pub unsafe fn pathWithGraphNodes_radius(
graph_nodes: &NSArray<GKGraphNode>,
radius: c_float,
) -> Retained<Self>;
#[cfg(feature = "GKGraphNode")]
#[unsafe(method(initWithGraphNodes:radius:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithGraphNodes_radius(
this: Allocated<Self>,
graph_nodes: &NSArray<GKGraphNode>,
radius: c_float,
) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl GKPath {
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>;
);
}