Blender  V2.59
SG_ParentRelation.h
Go to the documentation of this file.
00001 /*
00002  * $Id: SG_ParentRelation.h 35175 2011-02-25 13:39:04Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  * 
00029  */
00030 
00054 #ifndef __SG_ParentRelation_h
00055 #define __SG_ParentRelation_h
00056 
00057 class SG_Spatial;
00058 
00059 class SG_ParentRelation {
00060 
00061 public :
00071         virtual
00072                 bool
00073         UpdateChildCoordinates(
00074                 SG_Spatial * child,
00075                 const SG_Spatial * parent,
00076                 bool& parentUpdated
00077         ) = 0;
00078 
00079         virtual 
00080         ~SG_ParentRelation(
00081         ){
00082         };
00083 
00092         virtual 
00093                 SG_ParentRelation *
00094         NewCopy(
00095         ) = 0;
00096 
00100         virtual
00101                 bool
00102         IsVertexRelation(
00103         ) { 
00104                 return false;
00105         }
00106         
00110         virtual
00111                 bool
00112         IsSlowRelation(
00113         ) { 
00114                 return false;
00115         }
00116 protected :
00117 
00123         SG_ParentRelation(
00124         ) {     
00125         };
00126 
00131         SG_ParentRelation(
00132                 const SG_ParentRelation &
00133         ); 
00134         
00135         
00136 #ifdef WITH_CXX_GUARDEDALLOC
00137 public:
00138         void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_ParentRelation"); }
00139         void operator delete( void *mem ) { MEM_freeN(mem); }
00140 #endif
00141 };      
00142 
00143 #endif
00144