The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

visualobject.h

Go to the documentation of this file.
00001 /* 
00002  *  VISUALOBJECT.h
00003  *
00004  *  Created by Bret Fortenberry on Aug 27, 2003.
00005  *  Fixes: 
00006  * 
00007  *  Copyright (c) 2003 Machine Perception Laboratory 
00008  *  University of California San Diego.
00009  * 
00010  * Please read the disclaimer and notes about redistribution 
00011  * at the end of this file.
00012  *  
00013  */
00014 
00015 #ifndef _VISUALOBJECT_H_
00016 #define _VISUALOBJECT_H_
00017 
00018 #include <algorithm>
00019 #include <math.h>
00020 #include <list>
00021 #include "square.h"
00022 
00023 
00024 using namespace std;
00025 
00026 enum feature_type{e_face = 1, lefteye, righteye, botheyes};
00027 
00028 class VisualObject{
00029  public:
00030   float x;
00031   float y;
00032   float xSize;
00033   float ySize;
00034   float scale;
00035         double activation;
00036   feature_type feature;
00037   bool listFlag;
00038 
00039   list< VisualObject *> objects;
00040   typedef list< VisualObject *>::iterator VisualObject_iter;
00041 
00042   VisualObject(); 
00043   VisualObject(feature_type feature_in);
00044   VisualObject(float x_in, float y_in, float xSize_in, float scale_in, feature_type feature_in, float ySize_in = 0.0);
00045   VisualObject(VisualObject &thelist);
00046   VisualObject(TSquare<float> &square, feature_type feature_in);
00047   virtual ~VisualObject();
00048 
00049   virtual void clear();
00050   inline int size() const {return objects.size();}
00051   inline bool empty() const {return objects.empty();}
00052   inline void sort() {objects.sort();}
00053   inline void erase(VisualObject_iter &object){objects.erase(object);}
00054   inline void push_back( VisualObject  *const &object){objects.push_back(object);}
00055   inline void push_front( VisualObject  *const &object){objects.push_front(object);}
00056   inline void pop_front(){objects.pop_front();}
00057   inline void pop_back(){objects.pop_back();}
00058   inline VisualObject_iter begin() { return objects.begin(); }
00059   inline VisualObject_iter end() { return objects.end(); }
00060   inline VisualObject  *front() const { return objects.front(); }
00061   inline VisualObject  *back() const { return objects.back(); }
00062   inline void insert(VisualObject_iter list1, VisualObject_iter list2, 
00063           VisualObject_iter list3){objects.insert(list1, list2, list3);}
00064 
00065 };
00066 
00067 
00068 
00069 
00070 #endif
00071 
00072 /*
00073  * 
00074  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00075  * 
00076  *    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00077  *    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
00078  *    3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00079  * 
00080  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00081  * 
00082  */

Generated on Mon Nov 8 17:07:52 2004 for MPT by  doxygen 1.3.9.1