mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
the final rename
This commit is contained in:
parent
f27a418dbe
commit
1627e21c1d
196 changed files with 836 additions and 815 deletions
33
src/physics/PhysicsSolver.hpp
Normal file
33
src/physics/PhysicsSolver.hpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef PHYSICS_PHYSICSSOLVER_HPP_
|
||||
#define PHYSICS_PHYSICSSOLVER_HPP_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "../typedefs.hpp"
|
||||
#include "../voxels/Block.hpp"
|
||||
|
||||
class Hitbox;
|
||||
class Chunks;
|
||||
|
||||
class PhysicsSolver {
|
||||
glm::vec3 gravity;
|
||||
public:
|
||||
PhysicsSolver(glm::vec3 gravity);
|
||||
void step(Chunks* chunks,
|
||||
Hitbox* hitbox,
|
||||
float delta,
|
||||
uint substeps,
|
||||
bool shifting,
|
||||
float gravityScale,
|
||||
bool collisions);
|
||||
void colisionCalc(
|
||||
Chunks* chunks,
|
||||
Hitbox* hitbox,
|
||||
glm::vec3& vel,
|
||||
glm::vec3& pos,
|
||||
const glm::vec3 half,
|
||||
float stepHeight);
|
||||
bool isBlockInside(int x, int y, int z, Hitbox* hitbox);
|
||||
bool isBlockInside(int x, int y, int z, Block* def, blockstate_t states, Hitbox* hitbox);
|
||||
};
|
||||
|
||||
#endif /* PHYSICS_PHYSICSSOLVER_HPP_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue