@galacean/engine-physics-physx 1.5.14 → 1.6.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-physics-physx",
3
- "version": "1.5.14",
3
+ "version": "1.6.0-alpha.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,11 +26,11 @@
26
26
  "types/**/*"
27
27
  ],
28
28
  "devDependencies": {
29
- "@galacean/engine": "1.5.14",
30
- "@galacean/engine-design": "1.5.14"
29
+ "@galacean/engine-design": "1.6.0-alpha.1",
30
+ "@galacean/engine": "1.6.0-alpha.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@galacean/engine": "1.5.14"
33
+ "@galacean/engine": "1.6.0-alpha.1"
34
34
  },
35
35
  "scripts": {
36
36
  "b:types": "tsc"
@@ -1,4 +1,4 @@
1
- import { Ray, Vector3 } from "@galacean/engine";
1
+ import { Ray, Vector3, Quaternion } from "@galacean/engine";
2
2
  import { ICollision, IPhysicsScene } from "@galacean/engine-design";
3
3
  import { PhysXCharacterController } from "./PhysXCharacterController";
4
4
  import { PhysXCollider } from "./PhysXCollider";
@@ -9,7 +9,13 @@ import { PhysXPhysicsManager } from "./PhysXPhysicsManager";
9
9
  */
10
10
  export declare class PhysXPhysicsScene implements IPhysicsScene {
11
11
  private static _tempPosition;
12
+ private static _tempQuaternion;
12
13
  private static _tempNormal;
14
+ private static _tempPose;
15
+ private static _tempShapeIDs;
16
+ private _boxGeometry;
17
+ private _sphereGeometry;
18
+ private _capsuleGeometry;
13
19
  private _physXPhysics;
14
20
  private _physXManager;
15
21
  private _pxRaycastHit;
@@ -53,10 +59,36 @@ export declare class PhysXPhysicsScene implements IPhysicsScene {
53
59
  * {@inheritDoc IPhysicsScene.raycast }
54
60
  */
55
61
  raycast(ray: Ray, distance: number, onRaycast: (obj: number) => boolean, hit?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
62
+ /**
63
+ * {@inheritDoc IPhysicsScene.boxCast }
64
+ */
65
+ boxCast(center: Vector3, orientation: Quaternion, halfExtents: Vector3, direction: Vector3, distance: number, onSweep: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
66
+ /**
67
+ * {@inheritDoc IPhysicsScene.sphereCast }
68
+ */
69
+ sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, onSweep: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
70
+ /**
71
+ * {@inheritDoc IPhysicsScene.capsuleCast }
72
+ */
73
+ capsuleCast(center: Vector3, radius: number, height: number, orientation: Quaternion, direction: Vector3, distance: number, onSweep: (obj: number) => boolean, outHitResult?: (shapeUniqueID: number, distance: number, position: Vector3, normal: Vector3) => void): boolean;
74
+ /**
75
+ * {@inheritDoc IPhysicsScene.overlapBoxAll }
76
+ */
77
+ overlapBoxAll(center: Vector3, orientation: Quaternion, halfExtents: Vector3, onOverlap: (obj: number) => boolean): number[];
78
+ /**
79
+ * {@inheritDoc IPhysicsScene.overlapSphereAll }
80
+ */
81
+ overlapSphereAll(center: Vector3, radius: number, onOverlap: (obj: number) => boolean): number[];
82
+ /**
83
+ * {@inheritDoc IPhysicsScene.overlapCapsuleAll }
84
+ */
85
+ overlapCapsuleAll(center: Vector3, radius: number, height: number, orientation: Quaternion, onOverlap: (obj: number) => boolean): number[];
56
86
  /**
57
87
  * {@inheritDoc IPhysicsScene.destroy }
58
88
  */
59
89
  destroy(): void;
90
+ private _sweepSingle;
91
+ private _overlapMultiple;
60
92
  private _simulate;
61
93
  private _fetchResults;
62
94
  private _getTrigger;
@@ -17,13 +17,14 @@ export declare enum ShapeFlag {
17
17
  * Abstract class for collider shapes.
18
18
  */
19
19
  export declare abstract class PhysXColliderShape implements IColliderShape {
20
- protected static _tempVector4: Vector4;
21
20
  static readonly halfSqrt: number;
22
21
  static transform: {
23
22
  translation: Vector3;
24
23
  rotation: any;
25
24
  };
25
+ protected static _tempVector4: Vector4;
26
26
  protected _physXPhysics: PhysXPhysics;
27
+ protected _pxGeometry: any;
27
28
  protected _axis: Quaternion;
28
29
  protected _physXRotation: Quaternion;
29
30
  private _shapeFlags;