Physics3D/PhysWorld3D: Fix move constructor/operator
This commit is contained in:
parent
be6a56d76a
commit
efd07029e3
|
|
@ -68,6 +68,7 @@ Nazara Engine:
|
|||
- Add PhysWorld[2D|3D] max step count per Step call (default: 50), to avoid spirals of death when the physics engine simulation time is over step size.
|
||||
- Fix Window triggering KeyPressed event after triggering a resize/movement event on Windows
|
||||
- (WIP) Add support for materials and callbacks to Physics3D module.
|
||||
- PhysWorld3D class is now movable
|
||||
|
||||
Nazara Development Kit:
|
||||
- Added ImageWidget (#139)
|
||||
|
|
@ -103,7 +104,7 @@ Nazara Development Kit:
|
|||
- ⚠️ Renamed World::Update() to World::Refresh() for more clarity and to differentiate it from World::Update(elapsedTime)
|
||||
- World entity ids are now reused from lowest to highest (they were previously reused in reverse order of death)
|
||||
- World now has an internal profiler, allowing to measure the refresh and system update time
|
||||
- CollisionComponent[2D|3D] and PhysicsComponent[2D|3D] now configures their internal RigidBody userdata to the entity ID they belong to (useful for callbacks)
|
||||
- CollisionComponent[2D|3D] and PhysicsComponent[2D|3D] now configures their internal RigidBody userdata to the entity ID they belong to (useful for callbacks).
|
||||
|
||||
# 0.4:
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#define NAZARA_PHYSWORLD_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Math/Box.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
|
|
@ -32,7 +33,7 @@ namespace Nz
|
|||
|
||||
PhysWorld3D();
|
||||
PhysWorld3D(const PhysWorld3D&) = delete;
|
||||
PhysWorld3D(PhysWorld3D&&) = delete; ///TODO
|
||||
PhysWorld3D(PhysWorld3D&&) = default;
|
||||
~PhysWorld3D();
|
||||
|
||||
int CreateMaterial(String name = String());
|
||||
|
|
@ -60,7 +61,7 @@ namespace Nz
|
|||
void Step(float timestep);
|
||||
|
||||
PhysWorld3D& operator=(const PhysWorld3D&) = delete;
|
||||
PhysWorld3D& operator=(PhysWorld3D&&) = delete; ///TODO
|
||||
PhysWorld3D& operator=(PhysWorld3D&&) = default;
|
||||
|
||||
private:
|
||||
struct Callback
|
||||
|
|
@ -75,8 +76,8 @@ namespace Nz
|
|||
std::unordered_map<Nz::UInt64, std::unique_ptr<Callback>> m_callbacks;
|
||||
std::unordered_map<Nz::String, int> m_materialIds;
|
||||
std::size_t m_maxStepCount;
|
||||
MovablePtr<NewtonWorld> m_world;
|
||||
Vector3f m_gravity;
|
||||
NewtonWorld* m_world;
|
||||
float m_stepSize;
|
||||
float m_timestepAccumulator;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue