rhusics_ecs/
physics3d.rs

1//! 3D physics ECS
2
3pub use collide3d::*;
4pub use core::physics3d::*;
5pub use physics::setup_dispatch_3d;
6
7use cgmath::{Matrix3, Point3, Quaternion, Vector3};
8use collision::primitive::Primitive3;
9use collision::Aabb3;
10
11use physics::{
12    ContactResolutionSystem, CurrentFrameUpdateSystem, DeltaTime, NextFrameSetupSystem,
13    PhysicalEntityParts,
14};
15
16/// Current frame integrator system for 2D
17///
18/// ### Type parameters:
19///
20/// - `S`: Scalar type (f32 or f64)
21/// - `T`: Transform type (`BodyPose3` or similar)
22pub type CurrentFrameUpdateSystem3<S, T> =
23    CurrentFrameUpdateSystem<Point3<S>, Quaternion<S>, Vector3<S>, T>;
24
25/// Resolution system for 2D
26///
27/// ### Type parameters:
28///
29/// - `S`: Scalar type (f32 or f64)
30/// - `T`: Transform type (`BodyPose3` or similar)
31pub type ContactResolutionSystem3<S, T> =
32    ContactResolutionSystem<Point3<S>, Quaternion<S>, Matrix3<S>, Vector3<S>, Vector3<S>, T>;
33
34/// Next frame setup system for 2D
35///
36/// ### Type parameters:
37///
38/// - `S`: Scalar type (f32 or f64)
39/// - `T`: Transform type (`BodyPose3` or similar)
40pub type NextFrameSetupSystem3<S, T> =
41    NextFrameSetupSystem<Point3<S>, Quaternion<S>, Matrix3<S>, Vector3<S>, T, DeltaTime<S>>;
42
43/// SystemData for 3D
44///
45/// ### Type parameters:
46///
47/// - `S`: Scalar type (f32 or f64)
48/// - `T`: Transform type (`BodyPose3` or similar)
49/// - `Y`: Collision shape type, see `Collider`
50pub type PhysicalEntityParts3<'a, S, T, Y> = PhysicalEntityParts<
51    'a,
52    Primitive3<S>,
53    Y,
54    Quaternion<S>,
55    Vector3<S>,
56    Vector3<S>,
57    Matrix3<S>,
58    Aabb3<S>,
59    T,
60>;