Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
ParticleCollider.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
10#pragma once
11
12#include "../../core/Types.hpp"
14#include "../../math/Math.hpp"
15
16namespace esengine::ecs {
17
18ES_ENUM(stability=beta)
20 Sphere = 0,
21 Box = 1,
23};
24
25ES_COMPONENT(stability=beta)
29
30 // A sphere's radius, and a capsule's round its axis.
31 ES_PROPERTY(min=0, category=Shape)
32 f32 radius{50.0f};
33
34 // A capsule's axis runs along the entity's up, this far each way from its centre.
35 ES_PROPERTY(min=0, category=Shape)
37
38 ES_PROPERTY(category=Shape)
39 glm::vec3 halfExtents{50.0f, 50.0f, 50.0f};
40
41 // Keeps particles in rather than out: a dome round a spell, the inside of a jar.
42 ES_PROPERTY(category=Shape)
43 bool inverted{false};
44
45 // Which emitters it stops: one that shares a bit with this in its collisionMask.
46 ES_PROPERTY(bitmask_source=collisionLayers, min=0, max=65535, step=1, category=Shape)
47 u32 mask{65535};
48
50 bool enabled{true};
51
52 ParticleCollider() = default;
53};
54
55} // namespace esengine::ecs
Math utilities and GLM configuration for ESEngine.
Reflection and metadata system for automatic binding generation.
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_ENUM(...)
Mark an enum that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Core type definitions and utilities for ESEngine.
std::int32_t i32
Signed 32-bit integer.
Definition Types.hpp:54
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
float f32
32-bit floating point
Definition Types.hpp:59