00001 //=========================================================================== 00002 /* 00003 This file is part of the CHAI 3D visualization and haptics libraries. 00004 Copyright (C) 2003-2009 by CHAI 3D. All rights reserved. 00005 00006 This library is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License("GPL") version 2 00008 as published by the Free Software Foundation. 00009 00010 For using the CHAI 3D libraries with software that can not be combined 00011 with the GNU GPL, and for taking advantage of the additional benefits 00012 of our support services, please contact CHAI 3D about acquiring a 00013 Professional Edition License. 00014 00015 \author <http://www.chai3d.org> 00016 \author Francois Conti 00017 \version 2.0.0 $Rev: 251 $ 00018 */ 00019 //=========================================================================== 00020 00021 //--------------------------------------------------------------------------- 00022 #ifndef CGenericPointForceAlgoH 00023 #define CGenericPointForceAlgoH 00024 //--------------------------------------------------------------------------- 00025 #include "math/CVector3d.h" 00026 #include "scenegraph/CGenericObject.h" 00027 #include <vector> 00028 //--------------------------------------------------------------------------- 00029 class cWorld; 00030 //--------------------------------------------------------------------------- 00031 00032 //=========================================================================== 00040 //=========================================================================== 00041 00042 //=========================================================================== 00051 //=========================================================================== 00052 class cGenericPointForceAlgo 00053 { 00054 public: 00055 00056 //----------------------------------------------------------------------- 00057 // CONSTRUCTOR & DESTRUCTOR: 00058 //----------------------------------------------------------------------- 00059 00061 cGenericPointForceAlgo(); 00062 00064 virtual ~cGenericPointForceAlgo() {}; 00065 00066 00067 //----------------------------------------------------------------------- 00068 // METHODS: 00069 //----------------------------------------------------------------------- 00070 00072 cWorld* getWorld() { return (m_world); } 00073 00075 virtual void initialize(cWorld* a_world, const cVector3d& a_initialPos) {}; 00076 00078 virtual cVector3d computeForces(const cVector3d& a_toolPos, const cVector3d& a_toolVel) 00079 { return (cVector3d(0.0, 0.0, 0.0)); } 00080 00081 00082 protected: 00083 00084 //----------------------------------------------------------------------- 00085 // MEMBERS: 00086 //----------------------------------------------------------------------- 00087 00089 cWorld* m_world; 00090 }; 00091 00092 //--------------------------------------------------------------------------- 00093 #endif 00094 //--------------------------------------------------------------------------- 00095