Bootstrap

Unity近似的Transform头文件

Unity近似的Transform头文件 

#include <stdint.h>
#include <string>
#include "Quad.h"

typedef struct{
    float x = 0.0;
    float y = 0.0;
    float z = 0.0;
}Vector3;

class Transform {

public:
    Transform() = default;
    Transform(Transform const &other) = default;
//    Transform(const Transform& a);
    Transform(Transform *p) : parent(p) {};
    Transform(glm::vec3 localPosition);
    Transform(char *name, glm::vec3 localPosition = glm::vec3(0.0, 0.0, 0.0),
              glm::vec3 localEulerAngles = glm::vec3(0.0, 0.0, 0.0), glm::vec3 localScale = glm::vec3(1.0, 1.0, 1.0));
    Transform(char *name, glm::vec3 localPosition = glm::vec3(0.0, 0.0, 0.0),
              glm::quat localRotation = glm::quat(1.0, 0.0, 0.0, 0.0), glm::vec3 localScale = glm::vec3(1.0, 1.0, 1.0));

    char *name = "null";
    glm::vec3 localPosition = glm::vec3(0.0, 0.0, 0.0);
    glm
;