Physics working
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#ifndef HYDRAINITIALISEPHYSICSWORLDTASK
|
||||
#define HYDRAINITIALISEPHYSICSWORLDTASK
|
||||
|
||||
#include "../HydraTask.h"
|
||||
#include "../../engine/HydraEngine.h"
|
||||
#include "../../renderer/HydraRenderer.h"
|
||||
#include <GLMIncludes.h>
|
||||
#include "../../GlewIncludes.h"
|
||||
#include "../../buffer/HydraTextureBufferManager.h"
|
||||
#include <box3d/box3d.h>
|
||||
|
||||
class HydraInitialisePhysicsWorldTask : public HydraTask
|
||||
{
|
||||
private:
|
||||
b3WorldId* m_world_id = nullptr;
|
||||
|
||||
|
||||
protected:
|
||||
public:
|
||||
void Process() override
|
||||
{
|
||||
b3WorldDef world_def = b3DefaultWorldDef();
|
||||
world_def.workerCount = 1;
|
||||
world_def.enableSleep = true;
|
||||
|
||||
|
||||
*m_world_id = b3CreateWorld( &world_def );
|
||||
|
||||
b3World_SetContactRecycleDistance(*m_world_id, 0.05f);
|
||||
|
||||
}
|
||||
void Initialise(b3WorldId *world_id)
|
||||
{
|
||||
m_world_id = world_id;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* HYDRAINITIALISEPHYSICSWORLDTASK */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user