2023-01-15 22:34:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Line3D.h"
|
|
|
|
|
|
|
|
class WorldObject {
|
|
|
|
public:
|
2023-01-20 23:41:37 +00:00
|
|
|
WorldObject(std::string);
|
2023-01-15 22:34:02 +00:00
|
|
|
|
2023-07-05 11:02:28 +00:00
|
|
|
void setBaseRotation(double x, double y, double z);
|
|
|
|
void setRotationSpeed(double rotateSpeed);
|
|
|
|
void nextFrame();
|
|
|
|
|
|
|
|
std::atomic<double> rotateX = 0.0, rotateY = 0.0, rotateZ = 0.0;
|
2023-01-15 22:34:02 +00:00
|
|
|
|
|
|
|
std::vector<Line3D> edges;
|
2023-01-19 23:02:52 +00:00
|
|
|
std::vector<float> vs;
|
|
|
|
int numVertices;
|
2023-01-19 20:46:41 +00:00
|
|
|
private:
|
2023-07-05 11:02:28 +00:00
|
|
|
double linearSpeedToActualSpeed(double rotateSpeed);
|
|
|
|
|
|
|
|
std::atomic<double> baseRotateX = 0.0, baseRotateY = 0.0, baseRotateZ = 0.0;
|
|
|
|
std::atomic<double> currentRotateX = 0.0, currentRotateY = 0.0, currentRotateZ = 0.0;
|
|
|
|
std::atomic<double> rotateSpeed;
|
2023-01-15 22:34:02 +00:00
|
|
|
};
|