mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
All changes made for 10th part of tutorial
voxel_engine.cpp - changed structure, added character controls, physics almost all files are modified (including shaders) + new source directory - physics
This commit is contained in:
parent
e1cdcf01e9
commit
1a00a11917
22 changed files with 587 additions and 149 deletions
21
src/physics/PhysicsSolver.h
Normal file
21
src/physics/PhysicsSolver.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef PHYSICS_PHYSICSSOLVER_H_
|
||||
#define PHYSICS_PHYSICSSOLVER_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/ext.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
|
||||
using namespace glm;
|
||||
|
||||
class Hitbox;
|
||||
class Chunks;
|
||||
|
||||
class PhysicsSolver {
|
||||
vec3 gravity;
|
||||
public:
|
||||
PhysicsSolver(vec3 gravity);
|
||||
void step(Chunks* chunks, Hitbox* hitbox, float delta, unsigned substeps, bool shifting);
|
||||
bool isBlockInside(int x, int y, int z, Hitbox* hitbox);
|
||||
};
|
||||
|
||||
#endif /* PHYSICS_PHYSICSSOLVER_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue