Fix compilation warnings
This commit is contained in:
parent
e0c624205c
commit
96c581ae9b
|
@ -38,4 +38,8 @@ Body::Body(bodyindex id)
|
|||
: mID(id), mIsAlreadyInIsland(false), mIsAllowedToSleep(true), mIsActive(true),
|
||||
mIsSleeping(false), mSleepTime(0), mUserData(nullptr) {
|
||||
|
||||
#ifdef IS_LOGGING_ACTIVE
|
||||
mLogger = nullptr;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,10 @@ CollisionBody::CollisionBody(const Transform& transform, CollisionWorld& world,
|
|||
: Body(id), mType(BodyType::DYNAMIC), mTransform(transform), mProxyCollisionShapes(nullptr),
|
||||
mNbCollisionShapes(0), mContactManifoldsList(nullptr), mWorld(world) {
|
||||
|
||||
#ifdef IS_PROFILING_ACTIVE
|
||||
mProfiler = nullptr;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
|
|
|
@ -37,7 +37,7 @@ using namespace reactphysics3d;
|
|||
*/
|
||||
ProxyShape::ProxyShape(CollisionBody* body, CollisionShape* shape, const Transform& transform, decimal mass, MemoryManager& memoryManager)
|
||||
:mMemoryManager(memoryManager), mBody(body), mCollisionShape(shape), mLocalToBodyTransform(transform), mMass(mass),
|
||||
mNext(nullptr), mBroadPhaseID(-1), mCollisionCategoryBits(0x0001), mCollideWithMaskBits(0xFFFF) {
|
||||
mNext(nullptr), mBroadPhaseID(-1), mUserData(nullptr), mCollisionCategoryBits(0x0001), mCollideWithMaskBits(0xFFFF) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ const decimal SATAlgorithm::SAME_SEPARATING_AXIS_BIAS = decimal(0.001);
|
|||
// Constructor
|
||||
SATAlgorithm::SATAlgorithm(MemoryAllocator& memoryAllocator) : mMemoryAllocator(memoryAllocator) {
|
||||
|
||||
#ifdef IS_PROFILING_ACTIVE
|
||||
mProfiler = nullptr;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Test collision between a sphere and a convex mesh
|
||||
|
|
|
@ -34,7 +34,11 @@ using namespace reactphysics3d;
|
|||
// Constructor
|
||||
CollisionShape::CollisionShape(CollisionShapeName name, CollisionShapeType type)
|
||||
: mType(type), mName(name), mId(0) {
|
||||
|
||||
|
||||
#ifdef IS_PROFILING_ACTIVE
|
||||
mProfiler = nullptr;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Compute the world-space AABB of the collision shape given a transform from shape
|
||||
|
|
|
@ -348,7 +348,7 @@ class List {
|
|||
if (mSize != list.mSize) return false;
|
||||
|
||||
T* items = static_cast<T*>(mBuffer);
|
||||
for (int i=0; i < mSize; i++) {
|
||||
for (size_t i=0; i < mSize; i++) {
|
||||
if (items[i] != list[i]) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@ ContactSolver::ContactSolver(MemoryManager& memoryManager, const WorldSettings&
|
|||
mLinearVelocities(nullptr), mAngularVelocities(nullptr),
|
||||
mIsSplitImpulseActive(true), mWorldSettings(worldSettings) {
|
||||
|
||||
#ifdef IS_PROFILING_ACTIVE
|
||||
mProfiler = nullptr;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Initialize the contact constraints
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
Timer::Timer(double timeStep) : mTimeStep(timeStep), mIsRunning(false) {
|
||||
Timer::Timer(double timeStep) : mTimeStep(timeStep), mLastUpdateTime(0), mIsRunning(false) {
|
||||
assert(timeStep > 0.0);
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void SingleFrameAllocator::reset() {
|
|||
|
||||
// Divide the total memory to allocate by two
|
||||
mTotalSizeBytes /= 2;
|
||||
if (mTotalSizeBytes <= 0) mTotalSizeBytes = 1;
|
||||
if (mTotalSizeBytes == 0) mTotalSizeBytes = 1;
|
||||
|
||||
// Allocate a whole block of memory at the beginning
|
||||
mMemoryBufferStart = static_cast<char*>(MemoryManager::getBaseAllocator().allocate(mTotalSizeBytes));
|
||||
|
|
|
@ -2620,10 +2620,7 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
bool swappedBodiesCollisionData = collisionData->getBody1()->getId() != mConvexMeshBody1->getId();
|
||||
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class TestTriangleVertexArray : public Test {
|
|||
double mVertices2[4*3];
|
||||
float mNormals2[4*3];
|
||||
uint mIndices1[6];
|
||||
short mIndices2[6];
|
||||
uint mIndices2[6];
|
||||
TriangleVertexArray* mTriangleVertexArray1;
|
||||
TriangleVertexArray* mTriangleVertexArray2;
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
/// Constructor
|
||||
PhysicsObject::PhysicsObject() : openglframework::Mesh() {
|
||||
|
||||
mBody = nullptr;
|
||||
mColor = openglframework::Color(1, 1, 1, 1);
|
||||
mSleepingColor = openglframework::Color(1, 0, 0, 1);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ double Gui::mCachedUpdateTime = 0;
|
|||
double Gui::mCachedPhysicsUpdateTime = 0;
|
||||
|
||||
// Constructor
|
||||
Gui::Gui(TestbedApplication* app) : mApp(app) {
|
||||
Gui::Gui(TestbedApplication* app) : mApp(app), mSimulationPanel(nullptr) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ using namespace openglframework;
|
|||
|
||||
// Constructor
|
||||
Scene::Scene(const std::string& name, EngineSettings& engineSettings, bool isShadowMappingEnabled)
|
||||
: mName(name), mEngineSettings(engineSettings), mInterpolationFactor(0.0f), mViewportX(0), mViewportY(0),
|
||||
: mName(name), mEngineSettings(engineSettings), mLastMouseX(0), mLastMouseY(0), mInterpolationFactor(0.0f), mViewportX(0), mViewportY(0),
|
||||
mViewportWidth(0), mViewportHeight(0), mIsShadowMappingEnabled(isShadowMappingEnabled),
|
||||
mIsContactPointsDisplayed(true), mIsAABBsDisplayed(false), mIsWireframeEnabled(false) {
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ SceneDemo::SceneDemo(const std::string& name, EngineSettings& settings, float sc
|
|||
mPhongShader("shaders/phong.vert", "shaders/phong.frag"),
|
||||
mColorShader("shaders/color.vert", "shaders/color.frag"),
|
||||
mQuadShader("shaders/quad.vert", "shaders/quad.frag"),
|
||||
mVBOQuad(GL_ARRAY_BUFFER), mMeshFolderPath("meshes/") {
|
||||
mVBOQuad(GL_ARRAY_BUFFER), mMeshFolderPath("meshes/"),
|
||||
mPhysicsWorld(nullptr) {
|
||||
|
||||
shadowMapTextureLevel++;
|
||||
|
||||
|
|
|
@ -54,22 +54,15 @@ const float TestbedApplication::SCROLL_SENSITIVITY = 0.08f;
|
|||
// Constructor
|
||||
TestbedApplication::TestbedApplication(bool isFullscreen)
|
||||
: Screen(Vector2i(1280, 800), "Testbed ReactPhysics3D", true, isFullscreen),
|
||||
mIsInitialized(false), mGui(this), mFPS(0), mNbFrames(0), mPreviousTime(0),
|
||||
mLastTimeComputedFPS(0), mFrameTime(0), mPhysicsTime(0) {
|
||||
|
||||
mCurrentScene = NULL;
|
||||
mIsMultisamplingActive = true;
|
||||
mWidth = 1280;
|
||||
mHeight = 720;
|
||||
mEngineSettings = EngineSettings::defaultSettings();
|
||||
mSinglePhysicsStepEnabled = false;
|
||||
mSinglePhysicsStepDone = false;
|
||||
mWindowToFramebufferRatio = Vector2(1, 1);
|
||||
mIsShadowMappingEnabled = true;
|
||||
mIsVSyncEnabled = true;
|
||||
mIsContactPointsDisplayed = false;
|
||||
mIsAABBsDisplayed = false;
|
||||
mIsWireframeEnabled = false;
|
||||
mIsInitialized(false), mGui(this), mCurrentScene(nullptr),
|
||||
mEngineSettings(EngineSettings::defaultSettings()),
|
||||
mFPS(0), mNbFrames(0), mPreviousTime(0),
|
||||
mLastTimeComputedFPS(0), mFrameTime(0), mPhysicsTime(0),
|
||||
mIsMultisamplingActive(true), mWidth(1280), mHeight(720),
|
||||
mSinglePhysicsStepEnabled(false), mSinglePhysicsStepDone(false),
|
||||
mWindowToFramebufferRatio(Vector2(1, 1)), mIsShadowMappingEnabled(true),
|
||||
mIsContactPointsDisplayed(false), mIsAABBsDisplayed(false), mIsWireframeEnabled(false),
|
||||
mIsVSyncEnabled(true) {
|
||||
|
||||
init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user