-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPonto.h
53 lines (42 loc) · 1.27 KB
/
Ponto.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Ponto.h
//
// Created by Márcio Sarroglia Pinho on 18/08/20.
// Copyright © 2020 Márcio Sarroglia Pinho. All rights reserved.
//
#ifndef Ponto_hpp
#define Ponto_hpp
#include <iostream>
#include <cmath>
using namespace std;
class Ponto {
public:
float x,y,z;
Ponto ();
Ponto(float x, float y, float z=0);
void set(float x, float y, float z=0);
void imprime();
void imprime(char const *msg);
void imprime(char const *msgAntes, char const *msgDepois);
void multiplica(double x, double y, double z);
void soma(double x, double y, double z);
void versor();
double modulo();
void rotacionaX(float angulo);
void rotacionaY(float angulo);
void rotacionaZ(float angulo);
} ;
Ponto ObtemMinimo (Ponto P1, Ponto P2);
Ponto ObtemMaximo (Ponto P1, Ponto P2);
bool operator==(Ponto P1, Ponto P2);
Ponto operator+(Ponto P1, Ponto P2);
Ponto operator- (Ponto P1, Ponto P2);
Ponto operator* (Ponto P1, float k);
Ponto operator-(Ponto P1);
double ProdEscalar(Ponto v1, Ponto v2);
void ProdVetorial (Ponto v1, Ponto v2, Ponto &vresult);
int intersec2d(Ponto k, Ponto l, Ponto m, Ponto n, double &s, double &t);
bool HaInterseccao(Ponto k, Ponto l, Ponto m, Ponto n);
long int getContadorInt();
void resetContadorInt();
#endif /* Ponto_hpp */