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
use crate::{
c::{spAttachment, spBoundingBoxAttachment, spVertexAttachment},
c_interface::{NewFromPtr, SyncPtr},
};
#[derive(Debug)]
pub struct BoundingBoxAttachment {
c_bounding_box_attachment: SyncPtr<spBoundingBoxAttachment>,
}
impl NewFromPtr<spBoundingBoxAttachment> for BoundingBoxAttachment {
unsafe fn new_from_ptr(c_bounding_box_attachment: *const spBoundingBoxAttachment) -> Self {
Self {
c_bounding_box_attachment: SyncPtr(
c_bounding_box_attachment as *mut spBoundingBoxAttachment,
),
}
}
}
impl BoundingBoxAttachment {
fn attachment(&self) -> &spAttachment {
unsafe { &self.c_ptr_ref().super_0.super_0 }
}
fn vertex_attachment(&self) -> &spVertexAttachment {
unsafe { &self.c_ptr_ref().super_0 }
}
c_attachment_accessors!();
c_vertex_attachment_accessors!();
c_accessor_color!(color, color);
c_ptr!(c_bounding_box_attachment, spBoundingBoxAttachment);
}
#[cfg(feature = "mint")]
impl BoundingBoxAttachment {
c_vertex_attachment_accessors_mint!();
}