2023-01-15 22:34:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Line3D.h"
|
|
|
|
|
|
|
|
class WorldObject {
|
|
|
|
public:
|
2023-11-25 18:45:04 +00:00
|
|
|
WorldObject(const std::string&);
|
2023-01-15 22:34:02 +00:00
|
|
|
|
2023-07-14 14:34:24 +00:00
|
|
|
void setBaseRotationX(double x);
|
|
|
|
void setBaseRotationY(double y);
|
|
|
|
void setBaseRotationZ(double z);
|
2023-07-05 16:57:41 +00:00
|
|
|
void setCurrentRotationX(double x);
|
|
|
|
void setCurrentRotationY(double y);
|
|
|
|
void setCurrentRotationZ(double z);
|
2023-07-05 11:02:28 +00:00
|
|
|
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-09-01 18:52:36 +00:00
|
|
|
};
|