2 #ifndef vgl_homg_plane_3d_h 3 #define vgl_homg_plane_3d_h 22 # include <vcl_msvc_warnings.h> 66 inline Type
a()
const {
return a_;}
67 inline Type
nx()
const {
return a_;}
69 inline Type
b()
const {
return b_;}
70 inline Type
ny()
const {
return b_;}
72 inline Type
c()
const {
return c_;}
73 inline Type
nz()
const {
return c_;}
75 inline Type
d()
const {
return d_;}
78 inline void set(Type ta,Type tb,Type tc,Type td) { assert(ta||tb||tc||td);
a_=ta;
b_=tb;
c_=tc;
d_=td; }
87 inline bool ideal(Type tol = (Type)0)
const 89 #define vgl_Abs(x) ((x)<0?-(x):(x)) // avoid #include of vcl_cmath.h AND vcl_cstdlib.h 105 template <
class Type>
110 template <
class Type>
113 template <
class Type>
116 #define VGL_HOMG_PLANE_3D_INSTANTIATE(T) extern "please include vgl/vgl_homg_plane_3d.hxx first" 118 #endif // vgl_homg_plane_3d_h
void normalize()
divide all coefficients by sqrt(a^2 + b^2 + c^2).
Represents a homogeneous 3D plane.
direction vector in Euclidean 3D space
Type b() const
Return y coefficient.
Type c() const
Return z coefficient.
vgl_homg_plane_3d(const Type v[4])
Construct from 4-vector.
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
Type d() const
Return homogeneous scaling coefficient.
Represents a homogeneous 3D point.
bool operator!=(vgl_homg_plane_3d< Type >const &pl) const
vgl_homg_plane_3d()=default
Represents a Euclidean 3D plane.
bool is_ideal(l const &line, T tol=(T) 0)
Return true iff line is the line at infinity.
vgl_vector_3d< double > normal() const
Type a() const
Return x coefficient.
bool operator==(vgl_homg_plane_3d< Type > const &pl) const
the comparison operator.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
vgl_homg_plane_3d(Type ta, Type tb, Type tc, Type td)
Construct from four Types.
void set(Type ta, Type tb, Type tc, Type td)
Set equation a*x+b*y+c*z+d*w=0.
bool ideal(Type tol=(Type) 0) const
Return true iff the plane is the plane at infinity.
v normalized(v const &a)
Return a normalised version of a.
Represents a homogeneous 3D line using two points.