osci-render/Source/shape/Point.h

36 wiersze
894 B
C
Czysty Zwykły widok Historia

#pragma once
#include "Shape.h"
#include <cmath>
#include <string>
2024-01-07 16:17:20 +00:00
class Point : public Shape {
public:
2024-01-07 16:17:20 +00:00
Point(double x, double y, double z);
Point(double x, double y);
Point(double val);
Point();
2024-01-07 16:17:20 +00:00
Point nextVector(double drawingProgress) override;
void scale(double x, double y, double z) override;
void translate(double x, double y, double z) override;
double length() override;
double magnitude();
std::unique_ptr<Shape> clone() override;
std::string type() override;
void rotate(double rotateX, double rotateY, double rotateZ);
2024-01-21 22:22:03 +00:00
void normalize();
double innerProduct(Point& other);
// copy assignment operator
2024-01-07 16:17:20 +00:00
Point& operator=(const Point& other);
2024-01-21 22:22:03 +00:00
Point operator+(const Point& other);
Point operator-(const Point& other);
Point operator-();
Point operator*(const Point& other);
Point operator*(double scalar);
2024-01-07 16:17:20 +00:00
double x, y, z;
};