A 3D frustum is the portion of a solid (normally a cone or pyramid). More...
#include <vgl_frustum_3d.h>
Public Member Functions | |
| vgl_frustum_3d () | |
| default constructor. More... | |
| vgl_frustum_3d (std::vector< vgl_ray_3d< Type > > const &corner_rays, vgl_vector_3d< Type > const &norm, Type d0, Type d1) | |
| Construct the frustum from rays. More... | |
| bool | operator== (vgl_frustum_3d< Type > const &other) const |
| Equality test. More... | |
| const vgl_point_3d< Type > & | apex () const |
| const std::vector< vgl_plane_3d< Type > > & | surface_planes () const |
| const vgl_plane_3d< Type > & | near_plane () const |
| const vgl_plane_3d< Type > & | far_plane () const |
| const std::vector< vgl_point_3d< Type > > & | verts () const |
| const std::map< int, std::vector< int > > & | faces () const |
| vgl_box_3d< Type > | bounding_box () const |
| vgl_point_3d< Type > | centroid () const |
| Get the centroid point. More... | |
| bool | is_convex () const |
| test if the frustum is convex. More... | |
| bool | contains (vgl_point_3d< Type > const &p) const |
| Return true iff the point p is inside this frustum. More... | |
| bool | contains (Type const &x, Type const &y, Type const &z) const |
| Return true if (x,y,z) is inside this frustum. More... | |
Protected Attributes | |
| vgl_point_3d< Type > | apex_ |
| vgl_vector_3d< Type > | norm_ |
| std::vector< vgl_plane_3d< Type > > | surface_planes_ |
| planes bounding the frustum volume including near and far plane. More... | |
| int | near_plane_ |
| int | far_plane_ |
| std::vector< vgl_point_3d< Type > > | verts_ |
| int | n_top_bot_face_verts_ |
| the number of verts in the top or bottom face. More... | |
| std::map< int, std::vector< int > > | faces_ |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Type > | |
| std::ostream & | operator<< (std::ostream &s, vgl_frustum_3d< Type > const &p) |
| Write frustum to stream. More... | |
A 3D frustum is the portion of a solid (normally a cone or pyramid).
that lies between two parallel planes cutting it.
Definition at line 28 of file vgl_frustum_3d.h.
|
inline |
default constructor.
Definition at line 32 of file vgl_frustum_3d.h.
| vgl_frustum_3d< Type >::vgl_frustum_3d | ( | std::vector< vgl_ray_3d< Type > > const & | corner_rays, |
| vgl_vector_3d< Type > const & | norm, | ||
| Type | d0, | ||
| Type | d1 | ||
| ) |
Construct the frustum from rays.
the corner rays intersect in a common origin point, i.e., the apex of the frustum cone. It is assumed the rays are in sorted order around the cone surface, so that sequential rays are coplanar with a cone surface plane and the cross product r[i].dir X r[i+1].dir defines an outward-pointing normal. norm is the vector perpendicular to the parallel frustum faces. d0 is the distance in the norm vector dirction from the apex to the closest parallel face. d1 the distance in the norm direction from the apex to the far face.
Definition at line 17 of file vgl_frustum_3d.hxx.
|
inline |
Definition at line 52 of file vgl_frustum_3d.h.
| vgl_box_3d< Type > vgl_frustum_3d< Type >::bounding_box | ( | ) | const |
Definition at line 132 of file vgl_frustum_3d.hxx.
| vgl_point_3d< Type > vgl_frustum_3d< Type >::centroid | ( | ) | const |
Get the centroid point.
Definition at line 140 of file vgl_frustum_3d.hxx.
| bool vgl_frustum_3d< Type >::contains | ( | vgl_point_3d< Type > const & | p | ) | const |
Return true iff the point p is inside this frustum.
assumes that the frustum is a convex solid
Definition at line 202 of file vgl_frustum_3d.hxx.
| bool vgl_frustum_3d< Type >::contains | ( | Type const & | x, |
| Type const & | y, | ||
| Type const & | z | ||
| ) | const |
Return true if (x,y,z) is inside this frustum.
assumes that the frustum is a convex solid
Definition at line 186 of file vgl_frustum_3d.hxx.
|
inline |
Definition at line 67 of file vgl_frustum_3d.h.
|
inline |
Definition at line 61 of file vgl_frustum_3d.h.
| bool vgl_frustum_3d< Type >::is_convex | ( | ) | const |
test if the frustum is convex.
Definition at line 157 of file vgl_frustum_3d.hxx.
|
inline |
Definition at line 58 of file vgl_frustum_3d.h.
|
inline |
Equality test.
Definition at line 114 of file vgl_frustum_3d.hxx.
|
inline |
Definition at line 55 of file vgl_frustum_3d.h.
|
inline |
Definition at line 64 of file vgl_frustum_3d.h.
|
related |
Write frustum to stream.
|
protected |
Definition at line 94 of file vgl_frustum_3d.h.
|
protected |
Definition at line 105 of file vgl_frustum_3d.h.
|
protected |
Definition at line 99 of file vgl_frustum_3d.h.
|
protected |
the number of verts in the top or bottom face.
Definition at line 102 of file vgl_frustum_3d.h.
|
protected |
Definition at line 98 of file vgl_frustum_3d.h.
|
protected |
Definition at line 95 of file vgl_frustum_3d.h.
|
protected |
planes bounding the frustum volume including near and far plane.
Definition at line 97 of file vgl_frustum_3d.h.
|
protected |
Definition at line 100 of file vgl_frustum_3d.h.
1.8.15