Skip to content

Commit

Permalink
updated to PhysX 5.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fabmax committed Jun 2, 2024
1 parent aa81e20 commit c9a6f10
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 57 deletions.
2 changes: 1 addition & 1 deletion PhysX
Submodule PhysX updated 2327 files
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.gradle.jvm.tasks.Jar

subprojects {
group = "de.fabmax"
version = "2.3.3-SNAPSHOT"
version = "2.4.0-SNAPSHOT"

if (name != "physx-jni-android") {
apply(plugin = "java-library")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class NativeLibLinux extends NativeLib {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final List<String> libraries = new ArrayList<>() {{
add("libPhysXJniBindings_64.so");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class NativeLibLinux extends NativeLib {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final List<String> libraries = new ArrayList<>() {{
add("libPhysXJniBindings_64.so");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class NativeLibMacosArm64 extends NativeLib {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final List<String> libraries = new ArrayList<>() {{
add("libPhysXJniBindings_64.dylib");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class NativeLibMacos extends NativeLib {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final List<String> libraries = new ArrayList<>() {{
add("libPhysXJniBindings_64.dylib");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class NativeLibWindows extends NativeLib {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final List<String> libraries = new ArrayList<>() {{
add("PhysX_64.dll");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class NativeLibWindows extends NativeLib {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final List<String> libraries = new ArrayList<>() {{
add("PhysX_64.dll");
Expand Down
8 changes: 5 additions & 3 deletions physx-jni/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ dependencies {
testRuntimeOnly(project(":physx-jni-natives-macos"))
testRuntimeOnly(project(":physx-jni-natives-macos-arm64"))

testImplementation("org.lwjgl:lwjgl:3.3.1")
testImplementation("org.lwjgl:lwjgl:3.3.3")

val os = org.gradle.internal.os.OperatingSystem.current()
val arch = System.getProperty("os.arch", "unknown")
val lwjglNatives = when {
os.isLinux -> "natives-linux"
os.isMacOsX -> "natives-macos"
os.isMacOsX && arch == "aarch64" -> "natives-macos-arm64"
os.isMacOsX && arch != "aarch64" -> "natives-macos"
else -> "natives-windows"
}
testRuntimeOnly("org.lwjgl:lwjgl:3.3.1:$lwjglNatives")
testRuntimeOnly("org.lwjgl:lwjgl:3.3.3:$lwjglNatives")
}

publishing {
Expand Down
2 changes: 1 addition & 1 deletion physx-jni/src/main/java/de/fabmax/physxjni/Loader.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class Loader {

private static final String version = "2.3.3-SNAPSHOT";
private static final String version = "2.4.0-SNAPSHOT";

private static final AtomicBoolean isLoaded = new AtomicBoolean(false);

Expand Down
9 changes: 3 additions & 6 deletions physx-jni/src/main/webidl/common/PxCuda.idl
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ interface PxCudaContextManagerDesc {
};

[Platforms="windows;linux", Prefix="physx::"]
interface PxgDynamicsMemoryConfig {
void PxgDynamicsMemoryConfig();
interface PxGpuDynamicsMemoryConfig {
void PxGpuDynamicsMemoryConfig();
boolean isValid();
attribute unsigned long tempBufferCapacity;
attribute unsigned long maxRigidContactCount;
Expand Down Expand Up @@ -200,7 +200,6 @@ interface PxParticleBuffer {
unsigned long getFlatListStartIndex();
void raiseFlags(PxParticleBufferFlagEnum flags);
void release();
readonly attribute unsigned long bufferIndex;
readonly attribute unsigned long bufferUniqueId;
};
PxParticleBuffer implements PxBase;
Expand Down Expand Up @@ -395,9 +394,7 @@ interface PxParticleRigidFilterPair {

[Platforms="windows;linux"]
enum PxParticleSolverTypeEnum {
"PxParticleSolverTypeEnum::ePBD",
"PxParticleSolverTypeEnum::eFLIP",
"PxParticleSolverTypeEnum::eMPM"
"PxParticleSolverTypeEnum::ePBD"
};

[Platforms="windows;linux", Prefix="physx::", StackAllocatable]
Expand Down
2 changes: 0 additions & 2 deletions physx-jni/src/main/webidl/physics/PxActor.idl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ enum PxActorTypeEnum {
"PxActorTypeEnum::eSOFTBODY",
"PxActorTypeEnum::eFEMCLOTH",
"PxActorTypeEnum::ePBD_PARTICLESYSTEM",
"PxActorTypeEnum::eFLIP_PARTICLESYSTEM",
"PxActorTypeEnum::eMPM_PARTICLESYSTEM",
"PxActorTypeEnum::eHAIRSYSTEM"
};

Expand Down
41 changes: 5 additions & 36 deletions physx-jni/src/main/webidl/physics/PxArticulation.idl
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ interface PxArticulationCache {
[Value] attribute PxRealPtr jointForce;
attribute PxSpatialVelocity linkVelocity;
attribute PxSpatialVelocity linkAcceleration;
attribute PxSpatialForce linkIncomingJointForce;
attribute PxArticulationRootLinkData rootLinkData;
attribute PxSpatialForce sensorForces;
[Value] attribute PxRealPtr coefficientMatrix;
[Value] attribute PxRealPtr lambda;
attribute VoidPtr scratchMemory;
Expand All @@ -59,8 +59,9 @@ enum PxArticulationCacheFlagEnum {
"PxArticulationCacheFlagEnum::eLINK_ACCELERATION",
"PxArticulationCacheFlagEnum::eROOT_TRANSFORM",
"PxArticulationCacheFlagEnum::eROOT_VELOCITIES",
"PxArticulationCacheFlagEnum::eSENSOR_FORCES",
"PxArticulationCacheFlagEnum::eJOINT_SOLVER_FORCES",
"PxArticulationCacheFlagEnum::eLINK_INCOMING_JOINT_FORCE",
"PxArticulationCacheFlagEnum::eJOINT_TARGET_POSITIONS",
"PxArticulationCacheFlagEnum::eJOINT_TARGET_VELOCITIES",
"PxArticulationCacheFlagEnum::eALL"
};

Expand Down Expand Up @@ -105,8 +106,7 @@ PxArticulationFixedTendon implements PxArticulationTendon;
enum PxArticulationFlagEnum {
"PxArticulationFlagEnum::eFIX_BASE",
"PxArticulationFlagEnum::eDRIVE_LIMITS_ARE_FORCES",
"PxArticulationFlagEnum::eDISABLE_SELF_COLLISION",
"PxArticulationFlagEnum::eCOMPUTE_JOINT_FORCES"
"PxArticulationFlagEnum::eDISABLE_SELF_COLLISION"
};

[Prefix="physx::", StackAllocatable]
Expand Down Expand Up @@ -271,45 +271,14 @@ interface PxArticulationReducedCoordinate {
unsigned long getGpuArticulationIndex();
PxArticulationSpatialTendon createSpatialTendon();
PxArticulationFixedTendon createFixedTendon();
PxArticulationSensor createSensor(PxArticulationLink link, [Const, Ref] PxTransform relativePose);
//unsigned long getSpatialTendons();
unsigned long getNbSpatialTendons();
//unsigned long getFixedTendons();
unsigned long getNbFixedTendons();
//unsigned long getSensors();
unsigned long getNbSensors();
void updateKinematic([Ref] PxArticulationKinematicFlags flags);
};
PxArticulationReducedCoordinate implements PxBase;

[Prefix="physx::"]
interface PxArticulationSensor {
[Value] PxSpatialForce getForces();
[Value] PxTransform getRelativePose();
void setRelativePose([Const, Ref] PxTransform pose);
PxArticulationLink getLink();
unsigned long getIndex();
PxArticulationReducedCoordinate getArticulation();
[Value] PxArticulationSensorFlags getFlags();
void setFlag(PxArticulationSensorFlagEnum flag, boolean enabled);
attribute VoidPtr userData;
};
PxArticulationSensor implements PxBase;

enum PxArticulationSensorFlagEnum {
"PxArticulationSensorFlagEnum::eFORWARD_DYNAMICS_FORCES",
"PxArticulationSensorFlagEnum::eCONSTRAINT_SOLVER_FORCES",
"PxArticulationSensorFlagEnum::eWORLD_FRAME"
};

[Prefix="physx::", StackAllocatable]
interface PxArticulationSensorFlags {
void PxArticulationSensorFlags(octet flags);
boolean isSet(PxArticulationSensorFlagEnum flag);
void raise(PxArticulationSensorFlagEnum flag);
void clear(PxArticulationSensorFlagEnum flag);
};

[Prefix="physx::"]
interface PxArticulationSpatialTendon {
PxArticulationAttachment createAttachment(PxArticulationAttachment parent, float coefficient, [Const, Ref] PxVec3 relativeOffset, PxArticulationLink link);
Expand Down
2 changes: 1 addition & 1 deletion physx-jni/src/main/webidl/physics/PxScene.idl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ interface PxSceneDesc {
attribute float ccdMaxSeparation;
attribute float wakeCounterResetValue;
[Value] attribute PxBounds3 sanityBounds;
[Platforms="windows;linux", Value] attribute PxgDynamicsMemoryConfig gpuDynamicsConfig;
[Platforms="windows;linux", Value] attribute PxGpuDynamicsMemoryConfig gpuDynamicsConfig;
attribute unsigned long gpuMaxNumPartitions;
attribute unsigned long gpuMaxNumStaticPartitions;
attribute unsigned long gpuComputeVersion;
Expand Down

0 comments on commit c9a6f10

Please sign in to comment.