Follow this link to skip to the main content

3d_object.h

Go to the documentation of this file.
00001 // -*-c++-*-
00002 //---------------------------< /-/ CLARAty /-/ >------------------------------
00003 /**
00004  * @file  3d_object.h
00005  *
00006  * The 3d_object class is a base class for modeling 3D objects. These
00007  * objects may be used in 3D graphical or collision applications.
00008  *
00009  * <br>@b Designer(s):  Hari Das Nayar, Issa Nesnas
00010  * <br>@b Author(s):    Hari Das Nayar
00011  * <br>@b Date:         August 4, 2005
00012  *
00013  * <b>Software License:</b><br>
00014  * <code> http://claraty.jpl.nasa.gov/license/open_src/  or 
00015  *        file: license/open_src.txt </code> 
00016  *
00017  * &copy; 2006, Jet Propulsion Laboratory, California Institute of Technology<br>
00018  *
00019  * $Revision: 1.7 $
00020  */
00021 //-----------------------------------------------------------------------------
00022 
00023 #ifndef  N_3D_OBJECT_H
00024 #define  N_3D_OBJECT_H
00025 
00026 #include "claraty/share.h"
00027 #include <iostream>
00028 
00029 namespace claraty {
00030 
00031 /**
00032  * @ingroup motion_data_structure
00033  *
00034  * 3d_Object class
00035  * The 3d_Object class is a used to model 3-D object
00036  * data and methods. For example, 3d_Object would be used as a base
00037  * class for types like Box, Cylinder or Sphere.
00038  */
00039 //@{
00040 //@}
00041 
00042 const int NUMBER_OF_3D_OBJECT_DIMENSIONS = 3;
00043 
00044 class N_3D_Object {
00045   friend std::ostream& operator<< (std::ostream& os,
00046                                    N_3D_Object & n_3D_object);  
00047   
00048   /** @{ @name THREE_Object constructor/destructor */
00049 public:
00050   enum SHAPE_TYPE {BOX, CYLINDER, SPHERE, OTHER};
00051   N_3D_Object();  /**< Default Constructor for a
00052                      N_3D_Object object.*/
00053   N_3D_Object(const N_3D_Object & shape_object);
00054   virtual ~N_3D_Object(){}
00055   /** @} */
00056   
00057   /** @{ @name N_3D_Object set/get parameters */
00058 public:
00059   SHAPE_TYPE get_shape_type();
00060   void set_shape_type(SHAPE_TYPE shape_type);
00061   void set_number_of_dimensions(int n_dimensions);
00062   int  get_number_of_dimensions() {return _number_of_dimensions;};
00063   void set_dimensions(double & dims);
00064   void set_dimensions(double * dims);
00065   void get_dimensions(double * dims);
00066   bool is_empty(); // a placeholder for future implementation
00067   bool contains(); // a placeholder for future implementation
00068   
00069   /** @} */
00070   
00071   
00072   /** @{ @name N_3D_Object string values of data */
00073 private:
00074   SHAPE_TYPE _shape_type;
00075   int _number_of_dimensions;
00076   double _dimensions[NUMBER_OF_3D_OBJECT_DIMENSIONS];
00077   /** @} */
00078 };
00079 
00080 } // namespace claraty
00081 
00082 #endif // N_3D_OBJECT_H