|
contact.h00001 /* 00002 Dynamics/Kinematics modeling and simulation library. 00003 Copyright (C) 1999 by Michael Alexander Ewert 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 CT_COLLIDING_H 00022 #define CT_COLLIDING_H 00023 00024 #include "csphyzik/phyztype.h" 00025 00026 #define MIN_CONTACT MIN_REAL * 100 00027 00028 class ctPhysicalEntity; 00029 class ctRigidBody; 00030 00031 class ctCollidingContact 00032 { 00033 public: 00034 00035 ctCollidingContact() : contact_p(0), ea(0), eb(0), n(0) 00036 { 00037 body_b = NULL; 00038 restitution = 1.0; 00039 next = NULL; 00040 } 00041 00043 ctEntity *body_a; 00044 00049 ctEntity *body_b; 00050 00052 ctVector3 contact_p; 00054 ctVector3 ea; 00056 ctVector3 eb; 00057 00060 bool vf; 00061 00063 ctVector3 n; 00064 00069 real restitution; 00070 00072 ctCollidingContact *next; 00073 00074 }; 00075 00076 00077 class ctContact 00078 { 00079 public: 00080 00081 ctContact() : contact_p(0), ea(0), eb(0), n(0) 00082 { 00083 body_b = NULL; 00084 next = NULL; 00085 } 00086 00088 ctRigidBody *body_a; 00089 00092 ctRigidBody *body_b; 00093 00095 ctVector3 contact_p; 00097 ctVector3 ea; 00099 ctVector3 eb; 00100 00101 bool vf; 00102 00104 ctVector3 n; 00106 ctContact *next; 00107 00108 }; 00109 00110 #endif Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |