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 Chris Sewell 00017 \author Francois Conti 00018 \version 2.0.0 $Rev: 250 $ 00019 */ 00020 //=========================================================================== 00021 00022 //--------------------------------------------------------------------------- 00023 #ifndef CCollisionBruteH 00024 #define CCollisionBruteH 00025 //--------------------------------------------------------------------------- 00026 #include "math/CMaths.h" 00027 #include "graphics/CTriangle.h" 00028 #include "graphics/CVertex.h" 00029 #include "collisions/CGenericCollision.h" 00030 #include <vector> 00031 //--------------------------------------------------------------------------- 00032 using std::vector; 00033 //--------------------------------------------------------------------------- 00034 00035 //=========================================================================== 00043 //=========================================================================== 00044 00045 //=========================================================================== 00054 //=========================================================================== 00055 class cCollisionBrute : public cGenericCollision 00056 { 00057 public: 00058 00059 //----------------------------------------------------------------------- 00060 // CONSTRUCTOR & DESTRUCTOR: 00061 //----------------------------------------------------------------------- 00062 00064 cCollisionBrute(vector<cTriangle> *a_triangles) : m_triangles(a_triangles) {} 00065 00067 virtual ~cCollisionBrute() { } 00068 00069 00070 //----------------------------------------------------------------------- 00071 // METHODS: 00072 //----------------------------------------------------------------------- 00073 00075 virtual void initialize(double a_radius = 0) {}; 00076 00078 virtual void render() {}; 00079 00081 bool computeCollision(cVector3d& a_segmentPointA, 00082 cVector3d& a_segmentPointB, 00083 cCollisionRecorder& a_recorder, 00084 cCollisionSettings& a_settings); 00085 00086 protected: 00087 00088 //----------------------------------------------------------------------- 00089 // MEMBERS: 00090 //----------------------------------------------------------------------- 00091 00093 vector<cTriangle> *m_triangles; 00094 }; 00095 00096 //--------------------------------------------------------------------------- 00097 #endif 00098 //--------------------------------------------------------------------------- 00099