aboutsummaryrefslogtreecommitdiff
path: root/APEX_1.4/samples_v2/SampleBase/ApexController.h
diff options
context:
space:
mode:
authorsschirm <[email protected]>2016-12-23 14:20:36 +0100
committersschirm <[email protected]>2016-12-23 14:56:17 +0100
commitef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch)
tree710426e8daa605551ce3f34b581897011101c30f /APEX_1.4/samples_v2/SampleBase/ApexController.h
parentInitial commit: (diff)
downloadphysx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz
physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'APEX_1.4/samples_v2/SampleBase/ApexController.h')
-rw-r--r--APEX_1.4/samples_v2/SampleBase/ApexController.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/APEX_1.4/samples_v2/SampleBase/ApexController.h b/APEX_1.4/samples_v2/SampleBase/ApexController.h
index 15ecaf64..653e47ee 100644
--- a/APEX_1.4/samples_v2/SampleBase/ApexController.h
+++ b/APEX_1.4/samples_v2/SampleBase/ApexController.h
@@ -126,7 +126,34 @@ class ApexController : public ISampleController
mPaused = !mPaused;
}
- private:
+ void toggleFixedTimestep()
+ {
+ mUseFixedTimestep = !mUseFixedTimestep;
+ if (mUseFixedTimestep)
+ {
+ mTimeRemainder = 0.0;
+ }
+ }
+
+ bool usingFixedTimestep() const
+ {
+ return mUseFixedTimestep;
+ }
+
+ void setFixedTimestep(double fixedTimestep)
+ {
+ if (fixedTimestep > 0.0)
+ {
+ mFixedTimestep = fixedTimestep;
+ }
+ }
+
+ double getFixedTimestep()
+ {
+ return mFixedTimestep;
+ }
+
+private:
void initPhysX();
void releasePhysX();
@@ -187,6 +214,10 @@ class ApexController : public ISampleController
LARGE_INTEGER mPerformanceFreq;
bool mPaused;
+
+ bool mUseFixedTimestep;
+ double mFixedTimestep;
+ double mTimeRemainder;
};
#endif