cleanup and removing nasty segv upon entity deletion
+ Fixing bug where clicking an entity in the hierarchy didn't update the stats
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include "open_engine/scene/native_scriptable_entity.hpp"
|
||||
#include "open_engine/scene/scene_camera.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <glm/ext/matrix_transform.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
#include <glm/fwd.hpp>
|
||||
@@ -19,10 +18,6 @@
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
void DrawVec3Control(const char* label, glm::vec3& values,
|
||||
float reset_value = 0.0f, float column_width = 100.0f,
|
||||
const std::array<const char*, 3> labels = {"x", "y", "z"});
|
||||
|
||||
struct TagComponent
|
||||
{
|
||||
std::string tag;
|
||||
@@ -43,18 +38,10 @@ namespace OpenEngine {
|
||||
TransformComponent(const TransformComponent&) = default;
|
||||
TransformComponent(const glm::vec3& position)
|
||||
: translation(position) {}
|
||||
|
||||
glm::mat4 GetTransform() const
|
||||
{
|
||||
glm::mat4 transform = glm::translate(glm::mat4(1.0f), translation);
|
||||
|
||||
transform *= glm::toMat4(glm::quat(rotation));
|
||||
transform *= glm::scale(glm::mat4(1.0f), scale);
|
||||
|
||||
return transform;
|
||||
};
|
||||
};
|
||||
|
||||
glm::mat4 GetTransformFromComp(TransformComponent& transform_comp);
|
||||
|
||||
struct SpriteRendererComponent
|
||||
{
|
||||
glm::vec4 color{ 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
|
||||
Reference in New Issue
Block a user