PM_CARTESIAN - Posición cartesiana de tres ejes
#include posemath.h |
||
struct PM_CARTESIAN; |
PM_CARTESIAN()
Construir el punto <0,0,0>
PMCARTESIAN(double x, double y, double z)
Construir el punto <x,y,z>
PMCARTESIAN(const PM_CARTESIAN &v)
Construir una copia del punto v
double x, y, z
operator[](int n);
Devuelve el componente nsimo del vector (x=0, y=1, z=2)
int
operator==(PM_CARTESIAN v1, PM_CARTESIAN
v2)
int operator!=(PM_CARTESIAN v1,
PM_CARTESIAN v2)
Operador de igualdad y desigualdad de elementos
PM_CARTESIAN
operator+(PM_CARTESIAN v1,
PM_CARTESIANv2)
PM_CARTESIAN operator-(PM_CARTESIAN v1,
PM_CARTESIANv2)
Suma y resta de vectores
PM_CARTESIAN
operator*(double s, PM_CARTESIAN
v)
PM_CARTESIAN operator*(PM_CARTESIAN v,
double s)
Multiplicación escalar
PM_CARTESIAN operator/(PM_CARTESIAN v, double s)
Multiplicación escalar por 1/s
double
dot(PM_CARTESIAN v1, PM_CARTESIAN
v2)
PM_CARTESIAN cross(PM_CARTESIAN v1,
PM_CARTESIAN v2)
PM_CARTESIAN norm(PM_CARTESIAN v)