From 3a94328b3cff255ac64a208ac98919cc3e530aa0 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 5 May 2019 22:53:12 +0400 Subject: Made changes to CMakeLists.txt so CUDA version of program builds when CUDA is installed. Replaced C-style approach to generating texture to OOP-style with Canvas.h --- point.h | 87 ----------------------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 point.h (limited to 'point.h') diff --git a/point.h b/point.h deleted file mode 100644 index 36cfda9..0000000 --- a/point.h +++ /dev/null @@ -1,87 +0,0 @@ -// -// Created by saintruler on 11.04.19. -// - -#ifndef OPENGLTEST_POINT_H -#define OPENGLTEST_POINT_H - -#include - -class point -{ -public: - point(double x, double y) - { - this->x = x; - this->y = y; - } - - friend point operator+(const point& left, const point& right) - { - return point(left.x + right.x, left.y + right.y); - } - - friend point operator+=(point& left, const point& right) - { - left.x += right.x; - left.y += right.y; - return left; - } - - friend point operator-(const point& left, const point& right) - { - return point(left.x - right.x, left.y - right.y); - } - - friend point operator-=(point& left, const double right) - { - left.x -= right; - left.y -= right; - return left; - } - - friend point operator/(const point& left, const double right) - { - return point(left.x / right, left.y / right); - } - - friend point operator/=(point& left, const double right) - { - left.x /= right; - left.y /= right; - return left; - } - - friend point operator*(const point& left, const double right) - { - return point(left.x * right, left.y * right); - } - - friend point operator*=(point& left, const double right) - { - left.x *= right; - left.y *= right; - return left; - } - - double length() - { - return sqrt(pow(x, 2) + pow(y, 2)); - } - - double length_sqared() - { - return pow(x, 2) + pow(y, 2); - } - - void normalize() - { - const double l = length(); - this->x /= l; - this->y /= l; - } - - double x, y; -}; - -#endif //OPENGLTEST_POINT_H -- cgit v1.2.3