kopia lustrzana https://github.com/jameshball/osci-render
27 wiersze
797 B
C++
27 wiersze
797 B
C++
#pragma once
|
|
|
|
#include "Line3D.h"
|
|
|
|
class WorldObject {
|
|
public:
|
|
WorldObject(std::string);
|
|
|
|
void setBaseRotation(double x, double y, double z);
|
|
void setCurrentRotationX(double x);
|
|
void setCurrentRotationY(double y);
|
|
void setCurrentRotationZ(double z);
|
|
void setRotationSpeed(double rotateSpeed);
|
|
void nextFrame();
|
|
|
|
std::atomic<double> rotateX = 0.0, rotateY = 0.0, rotateZ = 0.0;
|
|
|
|
std::vector<Line3D> edges;
|
|
std::vector<float> vs;
|
|
int numVertices;
|
|
private:
|
|
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;
|
|
}; |