mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
26 lines
520 B
C++
26 lines
520 B
C++
#pragma once
|
|
|
|
#include "data/dv_fwd.hpp"
|
|
#include "physics/Hitbox.hpp"
|
|
|
|
#include <vector>
|
|
#include <entt/fwd.hpp>
|
|
|
|
class Entities;
|
|
struct EntityDef;
|
|
|
|
struct Rigidbody {
|
|
bool enabled = true;
|
|
Hitbox hitbox;
|
|
std::vector<Sensor> sensors;
|
|
float mass;
|
|
float elasticity;
|
|
bool selectable;
|
|
|
|
dv::value serialize(bool saveVelocity, bool saveBodySettings) const;
|
|
void deserialize(const dv::value& root);
|
|
|
|
void initialize(
|
|
const EntityDef& def, entityid_t id, Entities& entities
|
|
);
|
|
};
|