33 inline a_3dh(
double x,
double y,
double z,
double t=1.) :
a_mat_c(4) {(*this)(0)=
x; (*this)(1)=
y; (*this)(2)=
z; (*this)(3)=t;};
34 inline a_3dh(
double *
x) :
a_mat_c(4) {(*this)(0)=
x[0]; (*this)(1)=
x[1]; (*this)(2)=
x[2]; (*this)(3)=1.;};
37 static const std::string
help();
38 inline void set(
double x,
double y,
double z,
double t=1.) {(*this)(0)=
x; (*this)(1)=
y; (*this)(2)=
z; (*this)(3)=t;};
39 inline void set(
double *
x) {(*this)(0)=
x[0]; (*this)(1)=
x[1]; (*this)(2)=
x[2]; (*this)(3)=1.;};
40 inline void set(
const a_point& p) {(*this)(0)=p.
x(); (*this)(1)=p.
y(); (*this)(2)=p.
z(); (*this)(3)=1.;};
41 inline a_point point()
const {
return a_point((*
this)(0)/(*
this)(3),(*
this)(1)/(*
this)(3),(*
this)(2)/(*
this)(3));};
42 inline void X(
double v) {(*this)(0) = v;}
43 inline void Y(
double v) {(*this)(1) = v;}
44 inline void Z(
double v) {(*this)(2) = v;}
45 inline void T(
double v) {(*this)(3) = v;}
46 inline double X()
const {
return (*
this)(0);}
47 inline double Y()
const {
return (*
this)(1);}
48 inline double Z()
const {
return (*
this)(2);}
49 inline double T()
const {
return (*
this)(3);}
50 inline double x()
const {
return (*
this)(0)/(*
this)(3);}
51 inline double y()
const {
return (*
this)(1)/(*
this)(3);}
52 inline double z()
const {
return (*
this)(2)/(*
this)(3);}
an homogeneous 3d matrix class
friend std::ostream & operator<<(std::ostream &o, const a_3dh &m)
void set(double x, double y, double z, double t=1.)
friend std::istream & operator>>(std::istream &i, a_3dh &m)
static const std::string help()
void set(const a_point &p)
a_3dh(double x, double y, double z, double t=1.)