mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
refactor enums: CursorShape, InterpolationType, ParticleSpawnShape
This commit is contained in:
parent
7749675a61
commit
3be8546bf4
9 changed files with 44 additions and 91 deletions
|
|
@ -5,8 +5,9 @@
|
|||
#include <vector>
|
||||
|
||||
#include "interfaces/Serializable.hpp"
|
||||
#include "util/EnumMetadata.hpp"
|
||||
|
||||
enum ParticleSpawnShape {
|
||||
enum class ParticleSpawnShape {
|
||||
/// @brief Coordinates are regulary distributed within
|
||||
/// the volume of a ball.
|
||||
BALL = 0,
|
||||
|
|
@ -18,8 +19,11 @@ enum ParticleSpawnShape {
|
|||
BOX
|
||||
};
|
||||
|
||||
std::string to_string(ParticleSpawnShape shape);
|
||||
ParticleSpawnShape ParticleSpawnShape_from(std::string_view s);
|
||||
VC_ENUM_METADATA(ParticleSpawnShape)
|
||||
{"ball", ParticleSpawnShape::BALL},
|
||||
{"sphere", ParticleSpawnShape::SPHERE},
|
||||
{"box", ParticleSpawnShape::BOX},
|
||||
VC_ENUM_END
|
||||
|
||||
struct ParticlesPreset : public Serializable {
|
||||
/// @brief Collision detection
|
||||
|
|
@ -53,7 +57,7 @@ struct ParticlesPreset : public Serializable {
|
|||
/// @brief Maximum angular velocity
|
||||
float maxAngularVelocity = 0.0f;
|
||||
/// @brief Spawn spread shape
|
||||
ParticleSpawnShape spawnShape = BALL;
|
||||
ParticleSpawnShape spawnShape = ParticleSpawnShape::BALL;
|
||||
/// @brief Spawn spread
|
||||
glm::vec3 spawnSpread {};
|
||||
/// @brief Texture name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue