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
//! 3D physics ECS

pub use collide3d::*;
pub use core::physics3d::*;
pub use physics::setup_dispatch_3d;

use cgmath::{Matrix3, Point3, Quaternion, Vector3};
use collision::primitive::Primitive3;
use collision::Aabb3;

use physics::{
    ContactResolutionSystem, CurrentFrameUpdateSystem, DeltaTime, NextFrameSetupSystem,
    PhysicalEntityParts,
};

/// Current frame integrator system for 2D
///
/// ### Type parameters:
///
/// - `S`: Scalar type (f32 or f64)
/// - `T`: Transform type (`BodyPose3` or similar)
pub type CurrentFrameUpdateSystem3<S, T> =
    CurrentFrameUpdateSystem<Point3<S>, Quaternion<S>, Vector3<S>, T>;

/// Resolution system for 2D
///
/// ### Type parameters:
///
/// - `S`: Scalar type (f32 or f64)
/// - `T`: Transform type (`BodyPose3` or similar)
pub type ContactResolutionSystem3<S, T> =
    ContactResolutionSystem<Point3<S>, Quaternion<S>, Matrix3<S>, Vector3<S>, Vector3<S>, T>;

/// Next frame setup system for 2D
///
/// ### Type parameters:
///
/// - `S`: Scalar type (f32 or f64)
/// - `T`: Transform type (`BodyPose3` or similar)
pub type NextFrameSetupSystem3<S, T> =
    NextFrameSetupSystem<Point3<S>, Quaternion<S>, Matrix3<S>, Vector3<S>, T, DeltaTime<S>>;

/// SystemData for 3D
///
/// ### Type parameters:
///
/// - `S`: Scalar type (f32 or f64)
/// - `T`: Transform type (`BodyPose3` or similar)
/// - `Y`: Collision shape type, see `Collider`
pub type PhysicalEntityParts3<'a, S, T, Y> = PhysicalEntityParts<
    'a,
    Primitive3<S>,
    Y,
    Quaternion<S>,
    Vector3<S>,
    Vector3<S>,
    Matrix3<S>,
    Aabb3<S>,
    T,
>;