core/vgui/vgui_soview3D.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_soview3D.h
00002 #ifndef vgui_soview3D_h_
00003 #define vgui_soview3D_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author Philip C. Pritchett, Robotics Research Group, University of Oxford
00010 // \date   24 Mar 99
00011 // \brief  3-dimensional spatial object view.
00012 //
00013 // Contains classes:  vgui_soview3D  vgui_point3D  vgui_linseg3D
00014 // Notes:  We use floats instead of doubles as size is a speed issue (sic.)
00015 //
00016 
00017 #include "vgui_soview.h"
00018 #include <vcl_iosfwd.h>
00019 
00020 //: 3-dimensional spatial object view.
00021 class vgui_soview3D : public vgui_soview
00022 {
00023  public:
00024   vgui_soview3D() {}
00025   virtual ~vgui_soview3D() {}
00026 };
00027 
00028 
00029 //: 3-dimensional point.
00030 class vgui_point3D : public vgui_soview3D
00031 {
00032  public:
00033   vgui_point3D() {}
00034   vgui_point3D(float x_, float y_, float z_) : vgui_soview3D(), x(x_), y(y_), z(z_) {}
00035 
00036   virtual void draw() const;
00037   virtual vcl_ostream& print(vcl_ostream&) const;
00038   vcl_string type_name() const { return "vgui_point3D"; }
00039 
00040   float x,y,z;
00041 };
00042 
00043 
00044 //: 3-dimensional line segment.
00045 class vgui_lineseg3D : public vgui_soview3D
00046 {
00047  public:
00048   vgui_lineseg3D() {}
00049   vgui_lineseg3D( float x0_, float y0_, float z0_,
00050                   float x1_, float y1_, float z1_ )
00051     : x0(x0_), y0(y0_), z0(z0_), x1(x1_), y1(y1_), z1(z1_) {}
00052 
00053   virtual void draw() const;
00054   virtual vcl_ostream& print(vcl_ostream&) const;
00055   vcl_string type_name() const { return "vgui_lineseg3D"; }
00056 
00057   float x0, y0, z0, x1, y1, z1;
00058 };
00059 
00060 
00061 //: 3-dimensional line segment.
00062 class vgui_triangle3D : public vgui_soview3D
00063 {
00064  public:
00065   vgui_triangle3D() {}
00066   vgui_triangle3D( float x0_, float y0_, float z0_,
00067                    float x1_, float y1_, float z1_,
00068                    float x2_, float y2_, float z2_ )
00069     : x0(x0_), y0(y0_), z0(z0_),
00070       x1(x1_), y1(y1_), z1(z1_),
00071       x2(x2_), y2(y2_), z2(z2_) {}
00072 
00073   virtual void draw() const;
00074   virtual vcl_ostream& print(vcl_ostream&) const;
00075   vcl_string type_name() const { return "vgui_triangle3D"; }
00076 
00077   float x0, y0, z0, x1, y1, z1, x2, y2, z2;
00078 };
00079 
00080 
00081 #endif // vgui_soview3D_h_