inexorgame-obsolete / entity-system-inactive

A new, thread safe C++17 entity component system.
https://inexor.org
MIT License
5 stars 0 forks source link

Add new data types in DataContainer #55

Closed aschaeffer closed 5 years ago

aschaeffer commented 5 years ago

New data types

In order to enable future use cases we should add these new data types in DataContainer:

Future use cases

Use Case Data type(s) Remarks / Examples
Entity position vec3, vec4 Player position, camera position, particle position, ...
Entity direction vec3, vec4 Player direction, camera direction, particle direction, ...
Vector arithmetic vec3, vec4 Velocity transformation, gravity, ...
Colors vec3, vec4 RGB or RGBA
Textures byte array Textures can be loaded from file into an attribute
Procedural Textures / Texture transformation byte array Procedural generation or transformation of textures

Removal

Maybe we should remove "data_float" and "data_int" for simplicity and force the use of int64 instead of int and double instead of float).

IAmNotHanni commented 5 years ago

For the byte array I found this topic.

aschaeffer commented 5 years ago

OpenGL Mathematics contains a bunch of datatypes. The most important are vec2, vec3 and vec4, but others like mat2, mat3 could be helpful, too.

#include <glm/vec2.hpp>               // vec2, bvec2, dvec2, ivec2 and uvec2
#include <glm/vec3.hpp>               // vec3, bvec3, dvec3, ivec3 and uvec3
#include <glm/vec4.hpp>               // vec4, bvec4, dvec4, ivec4 and uvec4
#include <glm/mat2x2.hpp>             // mat2, dmat2
#include <glm/mat2x3.hpp>             // mat2x3, dmat2x3
#include <glm/mat2x4.hpp>             // mat2x4, dmat2x4
#include <glm/mat3x2.hpp>             // mat3x2, dmat3x2
#include <glm/mat3x3.hpp>             // mat3, dmat3
#include <glm/mat3x4.hpp>             // mat3x4, dmat2
#include <glm/mat4x2.hpp>             // mat4x2, dmat4x2
#include <glm/mat4x3.hpp>             // mat4x3, dmat4x3
#include <glm/mat4x4.hpp>             // mat4, dmat4
Fohlen commented 5 years ago

Added basic vector types in 4e9e3d8c6d6a8d3006cfd281f5753dca8d6c5109

Fohlen commented 5 years ago

This will be solved by #86