add structure.png file

master
Vectozavr 2021-09-20 17:54:09 +07:00
parent c4b9bd0e35
commit b0a457ce47
7 changed files with 7 additions and 5 deletions

View File

@ -33,6 +33,9 @@ Player control is standard.
<h4>Research source code:</h4> <h4>Research source code:</h4>
Structure:
![Project demonstration](img/structure.png)
1) Download and install OpenAL library for SFML sound support (in current version you can't setup this engine without OpenAL) 1) Download and install OpenAL library for SFML sound support (in current version you can't setup this engine without OpenAL)
openal: https://openal.org/downloads/ openal: https://openal.org/downloads/

View File

@ -16,12 +16,12 @@
class Engine { class Engine {
private: private:
std::string _name; std::string _name;
double _triPerSec = 0; double _triPerSec = 0;
bool _debugText = true; bool _debugText = true;
bool _updateWorld = true; bool _updateWorld = true;
void printDebugText() const; void printDebugText() const;
protected: protected:
std::shared_ptr<Screen> screen; std::shared_ptr<Screen> screen;
std::shared_ptr<Keyboard> keyboard; std::shared_ptr<Keyboard> keyboard;

View File

@ -152,8 +152,6 @@ Matrix4x4 Matrix4x4::Rotation(Point4D v, double rv) {
return Rv; return Rv;
} }
Matrix4x4 Matrix4x4::Projection(double fov, double aspect, double ZNear, double ZFar) { Matrix4x4 Matrix4x4::Projection(double fov, double aspect, double ZNear, double ZFar) {
Matrix4x4 p{}; Matrix4x4 p{};

View File

@ -11,6 +11,7 @@
class Matrix4x4 { class Matrix4x4 {
private: private:
std::array<std::array<double, 4>, 4> _arr{}; std::array<std::array<double, 4>, 4> _arr{};
public: public:
Matrix4x4 () = default; Matrix4x4 () = default;
Matrix4x4& operator=(const Matrix4x4& matrix4X4) = default; Matrix4x4& operator=(const Matrix4x4& matrix4X4) = default;

View File

@ -67,7 +67,7 @@ Point4D Point4D::operator/(double number) const {
// Other useful methods // Other useful methods
double Point4D::sqrAbs() const double Point4D::sqrAbs() const
{ {
return x()*x() + y()*y() + z()*z() + w()*w(); return x()*x() + y()*y() + z()*z();
} }
double Point4D::abs() const { double Point4D::abs() const {
return sqrt(sqrAbs()); return sqrt(sqrAbs());

View File

@ -15,7 +15,7 @@ namespace Time
{ {
// High precision time // High precision time
high_resolution_clock::time_point _start = high_resolution_clock::now(); high_resolution_clock::time_point _start = high_resolution_clock::now();
high_resolution_clock::time_point _last; high_resolution_clock::time_point _last = _start;
// FPS counter // FPS counter
high_resolution_clock::time_point _fpsStart; high_resolution_clock::time_point _fpsStart;

BIN
img/structure.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB