Adding nlohmanns json library

This commit is contained in:
Dynamitos
2020-05-05 01:52:07 +02:00
parent 3ef8342247
commit bb5b48698a
83 changed files with 2426 additions and 646 deletions
+14 -7
View File
@@ -1,19 +1,21 @@
#pragma once
#include "MinimalEngine.h"
#include "Transform.h"
#include "Math/Transform.h"
namespace Seele
{
DECLARE_REF(Actor);
DECLARE_REF(Scene);
DECLARE_REF(Component);
class Component
{
public:
Component();
virtual ~Component();
void tick(float deltaTime);
PComponent getParent();
void setParent(PComponent parent);
PActor getOwner();
void setOwner(PActor owner);
virtual void notifySceneAttach(PScene scene);
void setWorldLocation(Vector location);
void setWorldRotation(Vector rotation);
@@ -24,25 +26,30 @@ public:
void setRelativeRotation(Vector rotation);
void setRelativeRotation(Quaternion rotation);
void setRelativeScale(Vector scale);
void addWorldTranslation(Vector translation);
void addWorldRotation(Vector rotation);
void addWorldRotation(Quaternion rotation);
void addWorldScale(Vector scale);
Transform getTransform() const;
private:
void setParent(PComponent parent);
void internalSetTransform(Vector newLocation, Quaternion newRotation);
void propagateTransformUpdate();
void updateComponentTransform(Quaternion relativeRotationQuat);
uint8 bComponentTransformClean:1;
Quaternion getRelativeWorldRotation(Quaternion worldRotation);
void setRelativeLocationAndRotation(Vector newLocation, Quaternion newRotation);
uint8 bComponentTransformClean : 1;
Vector relativeLocation;
Vector relativeRotation;
Vector relativeScale;
Transform transform;
PScene owningScene;
PActor owner;
PComponent parent;
Array<PComponent> children;
friend class Actor;
};
DEFINE_REF(Component)
}
} // namespace Seele