Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

point.h

00001 /*
00002     Dynamics/Kinematics modeling and simulation library.
00003     Copyright (C) 1999 by Michael Alexander Ewert and Noah Gibbs
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 */
00020 
00021 #ifndef ctPointObj_H
00022 #define ctPointObj_H
00023 
00024 #include "csphyzik/ctvector.h"
00025 #include "csphyzik/phyztype.h"
00026 
00033 class ctPointObj
00034 {
00035  public:
00036   ctPointObj () {}
00037   virtual ~ctPointObj () {}
00038   virtual ctVector3 pos () = 0;
00039 
00041   virtual ctVector3 vel () = 0;
00042 
00043   virtual void apply_force(ctVector3 force) = 0;
00044 };
00045 
00046 class ctConstPoint : public ctPointObj
00047 {
00048   ctVector3 x;
00049  public:
00050   ctConstPoint (ctVector3 pt)
00051   { x = pt; }
00052 
00053   ~ctConstPoint() {}
00054 
00055   ctVector3 pos ()
00056   { return x; }
00057 
00058   ctVector3 vel ()
00059   { return ctVector3(0.0, 0.0, 0.0); }
00060 
00061   void apply_force(ctVector3 /*force*/) {}
00062 };
00063 
00064 #endif

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000