23 # include <vcl_msvc_warnings.h> 55 {
a_ = pl.
a();
b_ = pl.
b();
c_ = pl.
c();
d_ = pl.
d();
return *
this; }
61 :
a_(ta),
b_(tb),
c_(tc),
d_(td) { assert(ta||tb||tc); }
89 inline T
a()
const {
return a_;}
90 inline T
nx()
const {
return a_;}
92 inline T
b()
const {
return b_;}
93 inline T
ny()
const {
return b_;}
95 inline T
c()
const {
return c_;}
96 inline T
nz()
const {
return c_;}
98 inline T
d()
const {
return d_;}
101 inline void set(T ta,T tb,T tc,T td) { assert(ta||tb||tc);
a_=ta;
b_=tb;
c_=tc;
d_=td; }
110 inline bool ideal(T = (T)0)
const {
return false; }
147 template <
class T>
inline 165 #define VGL_PLANE_3D_INSTANTIATE(T) extern "please include vgl/vgl_plane_3d.hxx first" 167 #endif // vgl_plane_3d_h
T a() const
Return x coefficient.
vgl_vector_3d< T > normal() const
Return the normal direction, i.e., a unit vector orthogonal to this plane.
direction vector in Euclidean 3D space
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
void plane_coord_vectors(vgl_vector_3d< T > &uvec, vgl_vector_3d< T > &vvec) const
plane coordinate unit vectors.
T b() const
Return y coefficient.
vgl_plane_3d(T ta, T tb, T tc, T td)
Construct a vgl_plane_3d from its equation $ax+by+cz+d=0$.
bool plane_coords(vgl_point_3d< T > const &p3d, vgl_point_2d< T > &p2d, T tol=(T) 0) const
Given a 3-d point, return a 2-d point in the coord. system of the plane.
Represents a Euclidean 3D plane.
bool is_ideal(l const &line, T tol=(T) 0)
Return true iff line is the line at infinity.
T d() const
Return constant coefficient.
bool operator!=(vgl_plane_3d< T >const &p) const
Direction vector in Euclidean 3D space, templated by type of element.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
vgl_plane_3d(const T v[4])
Construct a vgl_plane_3d from its equation $v[0]x+v[1]y+v[2]z+v[3]=0$.
void set(T ta, T tb, T tc, T td)
Set this vgl_plane_3d to have the equation $ax+by+cz+d=0$.
vgl_point_3d< T > world_coords(vgl_point_2d< T > const &p2d) const
inverse map from plane coordinates to world coordinates.
bool operator==(vgl_plane_3d< T > const &p) const
the comparison operator.
bool ideal(T=(T) 0) const
Return true iff the plane is the plane at infinity.
bool contains(vgl_point_3d< T > const &p, T tol=(T) 0) const
Return true if p is on the plane.
T c() const
Return z coefficient.
v normalized(v const &a)
Return a normalised version of a.