Skip to content

Commit 1b5953a

Browse files
committed
Moved out castRay arg struct from argument to the owner struct. (zig-gamedev#14)
1 parent 4bc806b commit 1b5953a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/zphysics.zig

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,14 +2227,15 @@ pub const BodyInterface = opaque {
22272227
//
22282228
//--------------------------------------------------------------------------------------------------
22292229
pub const NarrowPhaseQuery = opaque {
2230+
pub const CastRayArgs = struct {
2231+
broad_phase_layer_filter: ?*const BroadPhaseLayerFilter = null,
2232+
object_layer_filter: ?*const ObjectLayerFilter = null,
2233+
body_filter: ?*const BodyFilter = null,
2234+
};
22302235
pub fn castRay(
22312236
query: *const NarrowPhaseQuery,
22322237
ray: RRayCast,
2233-
args: struct {
2234-
broad_phase_layer_filter: ?*const BroadPhaseLayerFilter = null,
2235-
object_layer_filter: ?*const ObjectLayerFilter = null,
2236-
body_filter: ?*const BodyFilter = null,
2237-
},
2238+
args: CastRayArgs,
22382239
) struct { has_hit: bool, hit: RayCastResult } {
22392240
var hit: RayCastResult = .{};
22402241
const has_hit = c.JPC_NarrowPhaseQuery_CastRay(

0 commit comments

Comments
 (0)