contrib/gel/pop/pop_geometric_object.h

Go to the documentation of this file.
00001 // This is gel/pop/pop_geometric_object.h
00002 #ifndef pop_geometric_object_h_
00003 #define pop_geometric_object_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief this is a geometric object which has a coordinate system.
00010 //
00011 // \author
00012 //            Peter Tu April 2003
00013 //            General Electric
00014 //
00015 //-------------------------------------------------------------------------------
00016 
00017 #include <pop/pop_vertex.h>
00018 #include <pop/pop_object.h>
00019 
00020 class pop_point_2d;
00021 class pop_point_3d;
00022 
00023 //: This is an object that has a coordinate system.
00024 //  The object is based on a set of parameters that can be changed. This object
00025 //  can be transformed into another coordinate system which is a pop_vertex.
00026 
00027 class pop_geometric_object : public pop_object
00028 {
00029  public:
00030   //: constructor
00031   pop_geometric_object(pop_vertex *coordinate_system,vcl_vector<pop_parameter*> &params);
00032 
00033   //: used when this is not a parametric object but just a geometric one
00034   pop_geometric_object(pop_vertex *coordinate_system);
00035 
00036   //: destructor
00037   virtual ~pop_geometric_object();
00038 
00039   //: this is the coordinate system
00040   pop_vertex *coordinate_system_;
00041 
00042   //: we should be able to transform to another coordinate system
00043   pop_geometric_object* transform(pop_vertex *destination);
00044 
00045   //: we need to have safe down casting
00046 
00047   pop_geometric_object* cast_to_pop_geometric_object() {return this;}
00048   virtual pop_point_2d* cast_to_pop_point_2d() {return 0;}
00049   virtual pop_point_3d* cast_to_pop_point_3d() {return 0;}
00050 
00051   //: computes a cost between this and another object
00052   virtual double cost(pop_geometric_object *other);
00053 
00054   virtual void update() =0;
00055 };
00056 
00057 #endif // pop_geometric_object_h_

Generated on Sat Sep 6 05:15:24 2008 for contrib/gel/pop by  doxygen 1.5.1