55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#ifndef __PUNKT3D_H
|
|
#define __PUNKT3D_H
|
|
|
|
#include <iostream>
|
|
#include <cmath>
|
|
#include "emath.h"
|
|
|
|
class Punkt2D {
|
|
public:
|
|
Punkt2D();
|
|
Punkt2D(float, float);
|
|
|
|
float x, y;
|
|
|
|
void set(float, float);
|
|
void print(std::string="");
|
|
float abs();
|
|
|
|
// Operatoren
|
|
Punkt2D operator+(const Punkt2D&);
|
|
Punkt2D operator-(const Punkt2D&);
|
|
Punkt2D& operator+=(const Punkt2D&);
|
|
Punkt2D& operator-=(const Punkt2D&);
|
|
|
|
Punkt2D operator+(const float&);
|
|
Punkt2D operator-(const float&);
|
|
Punkt2D operator*(const float&);
|
|
Punkt2D operator/(const float&);
|
|
Punkt2D& operator+=(const float&);
|
|
Punkt2D& operator-=(const float&);
|
|
Punkt2D& operator*=(const float&);
|
|
Punkt2D& operator/=(const float&);
|
|
|
|
float operator*(const Punkt2D&);
|
|
|
|
Punkt2D operator-();
|
|
|
|
bool operator==(const Punkt2D&);
|
|
bool operator!=(const Punkt2D&);
|
|
|
|
friend Punkt2D operator+(const float&, const Punkt2D&);
|
|
friend Punkt2D operator-(const float&, const Punkt2D&);
|
|
friend Punkt2D operator*(const float&, const Punkt2D&);
|
|
friend Punkt2D operator/(const float&, const Punkt2D&);
|
|
|
|
};
|
|
|
|
void glTexCoord2f(Punkt2D);
|
|
float abs(Punkt2D);
|
|
|
|
// Fixed Headers
|
|
void glTexCoordP2D(Punkt2D p);
|
|
|
|
#endif
|