Revert "update bullet, physx for debug draw (#419)" (#421)

This reverts commit fce5974adb.
This commit is contained in:
minggo 2023-09-13 16:23:10 +08:00 committed by GitHub
parent ab01b1e0af
commit 1a551ab783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 24382 additions and 26879 deletions

File diff suppressed because one or more lines are too long

View File

@ -42,8 +42,6 @@ declare namespace Bullet {
// constraints // constraints
TypedConstraint_getFixedBody(): ptr; TypedConstraint_getFixedBody(): ptr;
TypedConstraint_getDbgDrawSize(): number;
TypedConstraint_setDbgDrawSize(p: ptr, dbgDrawSize: number): void;
HingeConstraint_new(ptr0: ptr, ptr1: ptr, ptr2: ptr, ptr3: ptr): ptr; HingeConstraint_new(ptr0: ptr, ptr1: ptr, ptr2: ptr, ptr3: ptr): ptr;
HingeConstraint_setFrames(ptr0: ptr, ptr1: ptr, ptr2: ptr): void; HingeConstraint_setFrames(ptr0: ptr, ptr1: ptr, ptr2: ptr): void;
HingeConstraint_setLimit(p: ptr, low: number, upper: number, softness: number, biasFactor: number, relaxationFactor: number): void; HingeConstraint_setLimit(p: ptr, low: number, upper: number, softness: number, biasFactor: number, relaxationFactor: number): void;
@ -210,8 +208,6 @@ declare namespace Bullet {
CollisionWorld_removeCollisionObject(p: ptr, body: ptr): void; CollisionWorld_removeCollisionObject(p: ptr, body: ptr): void;
CollisionWorld_rayTest(p: ptr, p0: ptr, p1: ptr, p2: ptr): void; CollisionWorld_rayTest(p: ptr, p0: ptr, p1: ptr, p2: ptr): void;
CollisionWorld_convexSweepTest(p: ptr, castShape: ptr, from: ptr, to: ptr, resultCallback: ptr, allowedCcdPenetration: ptr): void; CollisionWorld_convexSweepTest(p: ptr, castShape: ptr, from: ptr, to: ptr, resultCallback: ptr, allowedCcdPenetration: ptr): void;
CollisionWorld_setDebugDrawer(p: ptr, drawer: ptr): void;
CollisionWorld_debugDrawWorld(p: ptr): void;
ccDiscreteDynamicsWorld_new(dispatcher: ptr, pairCache: ptr, solver: ptr): ptr; ccDiscreteDynamicsWorld_new(dispatcher: ptr, pairCache: ptr, solver: ptr): ptr;
ccDiscreteDynamicsWorld_setAllowSleep(p: ptr, v: boolean): void; ccDiscreteDynamicsWorld_setAllowSleep(p: ptr, v: boolean): void;
@ -224,18 +220,6 @@ declare namespace Bullet {
DynamicsWorld_addAction(p: ptr, action: ptr): void; DynamicsWorld_addAction(p: ptr, action: ptr): void;
DynamicsWorld_removeAction(p: ptr, action: ptr): void; DynamicsWorld_removeAction(p: ptr, action: ptr): void;
DebugDraw_new(): ptr;
DebugDraw_setDebugMode(p: ptr, debugMode: number): void;
DebugDraw_getDebugMode(p: ptr): number;
DebugDraw_setActiveObjectColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setDeactiveObjectColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setWantsDeactivationObjectColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setDisabledDeactivationObjectColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setDisabledSimulationObjectColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setAABBColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setContactPointColor(p: ptr, r: number, g: number, b: number): void;
DebugDraw_setConstraintLimitColor(p: ptr, r: number, g: number, b: number): void;
RayCallback_hasHit(p: ptr): boolean; RayCallback_hasHit(p: ptr): boolean;
ConvexCallback_hasHit(p: ptr): boolean; ConvexCallback_hasHit(p: ptr): boolean;

Binary file not shown.

View File

@ -1,3 +1,4 @@
interface Vec3 { interface Vec3 {
x: number, y: number, z: number x: number, y: number, z: number
} }
@ -16,7 +17,7 @@ interface FilterData {
declare namespace phy { declare namespace phy {
/// Base /// /// Base ///
const physics: Physics; const physics: Physics
abstract class Physics { abstract class Physics {
private constructor () private constructor ()
createCooking (cp: CookingParams): Cooking createCooking (cp: CookingParams): Cooking
@ -349,6 +350,8 @@ declare namespace phy {
/// Joints /// /// Joints ///
/// Extensions /// /// Extensions ///
interface Spring { interface Spring {
@ -612,22 +615,22 @@ declare namespace phy {
class SceneQueryHit { class SceneQueryHit {
private constructor () private constructor ()
actor: RigidActor; actor: RigidActor
shape: Shape; shape: Shape
faceIndex: number; faceIndex: number
} }
class RayCastHit { class RayCastHit {
private constructor () private constructor ()
actor: RigidActor; actor: RigidActor
shape: Shape; shape: Shape
faceIndex: number; faceIndex: number
u: number; u: number
v: number; v: number
normal: Vec3; normal: Vec3
position: Vec3; position: Vec3
distance: number; distance: number
flags: number; flags: number
} }
type preFilter = (filterData: FilterData, shape: Shape, actor: RigidActor, hitFlags: number) => QueryHitType type preFilter = (filterData: FilterData, shape: Shape, actor: RigidActor, hitFlags: number) => QueryHitType
@ -939,16 +942,12 @@ declare namespace phy {
*/ */
eRIGID_DYNAMIC, eRIGID_DYNAMIC,
eARTICULATION_LINK eARTICULATION_LINK
} }
enum ActorFlag { enum ActorFlag {
/** /**
\brief Enable debug renderer for this actor
@see PxScene.getRenderBuffer() PxRenderBuffer PxVisualizationParameter
*/
eVISUALIZATION = (1 << 0),
/** /**
\brief Disables scene gravity for this actor \brief Disables scene gravity for this actor
*/ */
@ -1150,6 +1149,8 @@ declare namespace phy {
PxConvexMeshCookingType::eINFLATION_INCREMENTAL_HULL is set. The default algorithm PxConvexMeshCookingType::eINFLATION_INCREMENTAL_HULL is set. The default algorithm
PxConvexMeshCookingType::eQUICK_HULL ignores this flag, inflation is not used. PxConvexMeshCookingType::eQUICK_HULL ignores this flag, inflation is not used.
/** /**
\brief Quantizes the input vertices using the k-means clustering \brief Quantizes the input vertices using the k-means clustering
@ -1193,6 +1194,7 @@ declare namespace phy {
*/ */
eFAST_INERTIA_COMPUTATION = (1 << 7), eFAST_INERTIA_COMPUTATION = (1 << 7),
/** /**
\brief Convex hull input vertices are shifted to be around origin to provide better computation stability. \brief Convex hull input vertices are shifted to be around origin to provide better computation stability.
It is recommended to provide input vertices around the origin, otherwise use this flag to improve It is recommended to provide input vertices around the origin, otherwise use this flag to improve
@ -1349,6 +1351,7 @@ declare namespace phy {
*/ */
eARTICULATION = 4, eARTICULATION = 4,
} }
enum FilterObjectFlag { enum FilterObjectFlag {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long