Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vgl_sphere_3d< Type > Class Template Reference

#include <vgl_sphere_3d.h>

List of all members.


Detailed Description

template<class Type>
class vgl_sphere_3d< Type >

Represents a cartesian 3D point.

Definition at line 17 of file vgl_sphere_3d.h.

Public Member Functions

 vgl_sphere_3d ()
 Default constructor.
 vgl_sphere_3d (Type px, Type py, Type pz, Type radius)
 Construct from four Types.
 vgl_sphere_3d (const Type v[4])
 Construct from 4-array.
 vgl_sphere_3d (vgl_point_3d< Type > const &centre, Type radius)
 Construct from point and radius.
bool operator== (const vgl_sphere_3d< Type > &s) const
 Test for equality.
bool operator!= (vgl_sphere_3d< Type >const &s) const
const vgl_point_3d< Type > & centre () const
Type radius () const
bool is_empty () const
 Return true if this sphere is empty.
bool contains (vgl_point_3d< Type > const &p) const
 Return true iff the point p is inside (or on) this sphere.
void set_empty ()
 Make the sphere empty.
void set_radius (Type r)
 Set min x ordinate of box (other sides unchanged).
void set_centre (const vgl_point_3d< Type > &c)
 Set min y ordinate of box (other sides unchanged).
bool clip (const vgl_line_3d_2_points< Type > &line, vgl_point_3d< Type > &p1, vgl_point_3d< Type > &p2) const
 Calculate the end points of a line clipped by this sphere.

Private Attributes

vgl_point_3d< Type > c_
Type r_


Constructor & Destructor Documentation

template<class Type>
vgl_sphere_3d< Type >::vgl_sphere_3d  )  [inline]
 

Default constructor.

Definition at line 26 of file vgl_sphere_3d.h.

template<class Type>
vgl_sphere_3d< Type >::vgl_sphere_3d Type  px,
Type  py,
Type  pz,
Type  radius
[inline]
 

Construct from four Types.

Definition at line 29 of file vgl_sphere_3d.h.

template<class Type>
vgl_sphere_3d< Type >::vgl_sphere_3d const Type  v[4]  )  [inline]
 

Construct from 4-array.

Definition at line 32 of file vgl_sphere_3d.h.

template<class Type>
vgl_sphere_3d< Type >::vgl_sphere_3d vgl_point_3d< Type > const &  centre,
Type  radius
[inline]
 

Construct from point and radius.

Definition at line 35 of file vgl_sphere_3d.h.


Member Function Documentation

template<class Type>
const vgl_point_3d<Type>& vgl_sphere_3d< Type >::centre  )  const [inline]
 

Definition at line 45 of file vgl_sphere_3d.h.

template<class T>
bool vgl_sphere_3d< T >::clip const vgl_line_3d_2_points< T > &  line,
vgl_point_3d< T > &  p1,
vgl_point_3d< T > &  p2
const
 

Calculate the end points of a line clipped by this sphere.

Returns:
true if any of the line touches the sphere.

Definition at line 29 of file vgl_sphere_3d.txx.

template<class T>
bool vgl_sphere_3d< T >::contains vgl_point_3d< Type > const &  p  )  const
 

Return true iff the point p is inside (or on) this sphere.

Definition at line 20 of file vgl_sphere_3d.txx.

template<class Type>
bool vgl_sphere_3d< Type >::is_empty  )  const [inline]
 

Return true if this sphere is empty.

Definition at line 49 of file vgl_sphere_3d.h.

template<class Type>
bool vgl_sphere_3d< Type >::operator!= vgl_sphere_3d< Type >const &  s  )  const [inline]
 

Definition at line 40 of file vgl_sphere_3d.h.

template<class Type>
bool vgl_sphere_3d< Type >::operator== const vgl_sphere_3d< Type > &  s  )  const [inline]
 

Test for equality.

Definition at line 38 of file vgl_sphere_3d.h.

template<class Type>
Type vgl_sphere_3d< Type >::radius  )  const [inline]
 

Definition at line 46 of file vgl_sphere_3d.h.

template<class Type>
void vgl_sphere_3d< Type >::set_centre const vgl_point_3d< Type > &  c  )  [inline]
 

Set min y ordinate of box (other sides unchanged).

Definition at line 62 of file vgl_sphere_3d.h.

template<class Type>
void vgl_sphere_3d< Type >::set_empty  )  [inline]
 

Make the sphere empty.

Definition at line 57 of file vgl_sphere_3d.h.

template<class Type>
void vgl_sphere_3d< Type >::set_radius Type  r  )  [inline]
 

Set min x ordinate of box (other sides unchanged).

Definition at line 60 of file vgl_sphere_3d.h.


Member Data Documentation

template<class Type>
vgl_point_3d<Type> vgl_sphere_3d< Type >::c_ [private]
 

Definition at line 19 of file vgl_sphere_3d.h.

template<class Type>
Type vgl_sphere_3d< Type >::r_ [private]
 

Definition at line 20 of file vgl_sphere_3d.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:39:29 2008 for core/vgl by  doxygen 1.4.4