use "ARCH=arch_name make" restructured project folder, implementations and headers together under sources/
31 lines
771 B
C++
Executable File
31 lines
771 B
C++
Executable File
#pragma once
|
|
#include <glm/glm.hpp>
|
|
#include <GLES2/gl2.h>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
class WorldInstanceable {
|
|
|
|
private:
|
|
glm::vec3 localFront, localUp;
|
|
void setup(glm::vec3 position);
|
|
|
|
public:
|
|
glm::mat4 scaleMat;
|
|
glm::mat4 rotation;
|
|
glm::vec3 position;
|
|
WorldInstanceable(glm::vec3 position);
|
|
WorldInstanceable(glm::vec3 position, glm::vec3 scale);
|
|
WorldInstanceable(glm::vec3 position, glm::vec3 axis, float angle);
|
|
WorldInstanceable(glm::vec3 position, glm::vec3 scale, glm::vec3 axis, float angle);
|
|
void setPosition(glm::vec3 position);
|
|
void rotate(glm::vec3 axis, float angle);
|
|
void scale(float factor);
|
|
void scale(glm::vec3 factors);
|
|
glm::mat4 getLocalTransform();
|
|
glm::mat4 getGlobalTransform();
|
|
void alignTo(glm::vec3 direction);
|
|
|
|
};
|