Browse Source

CreateBodies is const

Jorrit Rouwe 3 years ago
parent
commit
eda11f0d40
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Jolt/Physics/PhysicsScene.cpp
  2. 1 1
      Jolt/Physics/PhysicsScene.h

+ 1 - 1
Jolt/Physics/PhysicsScene.cpp

@@ -41,7 +41,7 @@ bool PhysicsScene::FixInvalidScales()
 	return success;
 	return success;
 }
 }
 
 
-void PhysicsScene::CreateBodies(PhysicsSystem *inSystem)
+void PhysicsScene::CreateBodies(PhysicsSystem *inSystem) const
 {
 {
 	BodyInterface &bi = inSystem->GetBodyInterface();
 	BodyInterface &bi = inSystem->GetBodyInterface();
 	for (const BodyCreationSettings &b : mBodies)
 	for (const BodyCreationSettings &b : mBodies)

+ 1 - 1
Jolt/Physics/PhysicsScene.h

@@ -27,7 +27,7 @@ public:
 	vector<BodyCreationSettings> &			GetBodies()										{ return mBodies; }
 	vector<BodyCreationSettings> &			GetBodies()										{ return mBodies; }
 
 
 	/// Instantiate all bodies
 	/// Instantiate all bodies
-	void									CreateBodies(PhysicsSystem *inSystem);
+	void									CreateBodies(PhysicsSystem *inSystem) const;
 
 
 	/// Go through all body creation settings and fix shapes that are scaled incorrectly (note this will change the scene a bit).
 	/// Go through all body creation settings and fix shapes that are scaled incorrectly (note this will change the scene a bit).
 	/// @return False when not all scales could be fixed.
 	/// @return False when not all scales could be fixed.