embree4_sys/
lib.rs

1//! Rust FFI bindings for
2//! [Intel's Embree](https://www.embree.org/)
3//! 4 high-performance ray tracing library.
4//!
5//! Bindings are generated via
6//! [rust-bindgen](https://github.com/rust-lang/rust-bindgen).
7//!
8//! A valid Embree installation is required. See
9//! [Installation of Embree](https://github.com/embree/embree#installation-of-embree)
10//! from the Embree docs.
11
12#![allow(non_camel_case_types)]
13#![allow(non_snake_case)]
14#![allow(non_upper_case_globals)]
15
16include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
17
18pub const RTC_INVALID_GEOMETRY_ID: u32 = (-1_i32) as u32;
19
20impl Default for RTCBuildQuality {
21    fn default() -> Self {
22        Self::MEDIUM
23    }
24}
25
26#[allow(clippy::derivable_impls)]
27impl Default for RTCSceneFlags {
28    fn default() -> Self {
29        Self(Default::default())
30    }
31}
32
33impl Default for RTCRay {
34    fn default() -> Self {
35        Self {
36            org_x: Default::default(),
37            org_y: Default::default(),
38            org_z: Default::default(),
39            tnear: Default::default(),
40            dir_x: Default::default(),
41            dir_y: Default::default(),
42            dir_z: Default::default(),
43            time: Default::default(),
44            tfar: std::f32::INFINITY,
45            mask: -1_i32 as u32,
46            id: Default::default(),
47            flags: Default::default(),
48        }
49    }
50}
51
52impl Default for RTCRay4 {
53    fn default() -> Self {
54        Self {
55            org_x: Default::default(),
56            org_y: Default::default(),
57            org_z: Default::default(),
58            tnear: Default::default(),
59            dir_x: Default::default(),
60            dir_y: Default::default(),
61            dir_z: Default::default(),
62            time: Default::default(),
63            tfar: [std::f32::INFINITY; 4],
64            mask: [-1_i32 as u32; 4],
65            id: Default::default(),
66            flags: Default::default(),
67        }
68    }
69}
70
71impl Default for RTCRay8 {
72    fn default() -> Self {
73        Self {
74            org_x: Default::default(),
75            org_y: Default::default(),
76            org_z: Default::default(),
77            tnear: Default::default(),
78            dir_x: Default::default(),
79            dir_y: Default::default(),
80            dir_z: Default::default(),
81            time: Default::default(),
82            tfar: [std::f32::INFINITY; 8],
83            mask: [-1_i32 as u32; 8],
84            id: Default::default(),
85            flags: Default::default(),
86        }
87    }
88}
89
90impl Default for RTCRay16 {
91    fn default() -> Self {
92        Self {
93            org_x: Default::default(),
94            org_y: Default::default(),
95            org_z: Default::default(),
96            tnear: Default::default(),
97            dir_x: Default::default(),
98            dir_y: Default::default(),
99            dir_z: Default::default(),
100            time: Default::default(),
101            tfar: [std::f32::INFINITY; 16],
102            mask: [-1_i32 as u32; 16],
103            id: Default::default(),
104            flags: Default::default(),
105        }
106    }
107}
108
109impl Default for RTCHit {
110    fn default() -> Self {
111        Self {
112            Ng_x: Default::default(),
113            Ng_y: Default::default(),
114            Ng_z: Default::default(),
115            u: Default::default(),
116            v: Default::default(),
117            primID: Default::default(),
118            geomID: RTC_INVALID_GEOMETRY_ID,
119            instID: [RTC_INVALID_GEOMETRY_ID],
120        }
121    }
122}
123
124impl Default for RTCHit4 {
125    fn default() -> Self {
126        Self {
127            Ng_x: Default::default(),
128            Ng_y: Default::default(),
129            Ng_z: Default::default(),
130            u: Default::default(),
131            v: Default::default(),
132            primID: Default::default(),
133            geomID: [RTC_INVALID_GEOMETRY_ID; 4],
134            instID: [[RTC_INVALID_GEOMETRY_ID; 4]],
135        }
136    }
137}
138
139impl Default for RTCHit8 {
140    fn default() -> Self {
141        Self {
142            Ng_x: Default::default(),
143            Ng_y: Default::default(),
144            Ng_z: Default::default(),
145            u: Default::default(),
146            v: Default::default(),
147            primID: Default::default(),
148            geomID: [RTC_INVALID_GEOMETRY_ID; 8],
149            instID: [[RTC_INVALID_GEOMETRY_ID; 8]],
150        }
151    }
152}
153
154impl Default for RTCHit16 {
155    fn default() -> Self {
156        Self {
157            Ng_x: Default::default(),
158            Ng_y: Default::default(),
159            Ng_z: Default::default(),
160            u: Default::default(),
161            v: Default::default(),
162            primID: Default::default(),
163            geomID: [RTC_INVALID_GEOMETRY_ID; 16],
164            instID: [[RTC_INVALID_GEOMETRY_ID; 16]],
165        }
166    }
167}
168
169#[allow(clippy::derivable_impls)]
170impl Default for RTCBounds {
171    fn default() -> Self {
172        Self {
173            lower_x: Default::default(),
174            lower_y: Default::default(),
175            lower_z: Default::default(),
176            align0: Default::default(),
177            upper_x: Default::default(),
178            upper_y: Default::default(),
179            upper_z: Default::default(),
180            align1: Default::default(),
181        }
182    }
183}
184
185unsafe impl Send for RTCIntersectArguments {}
186unsafe impl Sync for RTCIntersectArguments {}