add structure.png file
parent
c4b9bd0e35
commit
b0a457ce47
|
@ -33,6 +33,9 @@ Player control is standard.
|
|||
|
||||
<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)
|
||||
|
||||
openal: https://openal.org/downloads/
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
class Engine {
|
||||
private:
|
||||
std::string _name;
|
||||
|
||||
double _triPerSec = 0;
|
||||
bool _debugText = true;
|
||||
bool _updateWorld = true;
|
||||
|
||||
void printDebugText() const;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<Screen> screen;
|
||||
std::shared_ptr<Keyboard> keyboard;
|
||||
|
|
|
@ -152,8 +152,6 @@ Matrix4x4 Matrix4x4::Rotation(Point4D v, double rv) {
|
|||
return Rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Matrix4x4 Matrix4x4::Projection(double fov, double aspect, double ZNear, double ZFar) {
|
||||
Matrix4x4 p{};
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
class Matrix4x4 {
|
||||
private:
|
||||
std::array<std::array<double, 4>, 4> _arr{};
|
||||
|
||||
public:
|
||||
Matrix4x4 () = default;
|
||||
Matrix4x4& operator=(const Matrix4x4& matrix4X4) = default;
|
||||
|
|
|
@ -67,7 +67,7 @@ Point4D Point4D::operator/(double number) const {
|
|||
// Other useful methods
|
||||
double Point4D::sqrAbs() const
|
||||
{
|
||||
return x()*x() + y()*y() + z()*z() + w()*w();
|
||||
return x()*x() + y()*y() + z()*z();
|
||||
}
|
||||
double Point4D::abs() const {
|
||||
return sqrt(sqrAbs());
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Time
|
|||
{
|
||||
// High precision time
|
||||
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
|
||||
high_resolution_clock::time_point _fpsStart;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 296 KiB |
Loading…
Reference in New Issue