Back to index

supertuxkart  0.5+dfsg1
btGeometryUtil.h
Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  http://continuousphysics.com/Bullet/
00003 
00004 This software is provided 'as-is', without any express or implied warranty.
00005 In no event will the authors be held liable for any damages arising from the use of this software.
00006 Permission is granted to anyone to use this software for any purpose, 
00007 including commercial applications, and to alter it and redistribute it freely, 
00008 subject to the following restrictions:
00009 
00010 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
00011 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00012 3. This notice may not be removed or altered from any source distribution.
00013 */
00014 
00015 
00016 #ifndef BT_GEOMETRY_UTIL_H
00017 #define BT_GEOMETRY_UTIL_H
00018 
00019 #include "btVector3.h"
00020 #include "btAlignedObjectArray.h"
00021 
00022 class btGeometryUtil
00023 {
00024        public:
00025        
00026        
00027               static void   getPlaneEquationsFromVertices(btAlignedObjectArray<btVector3>& vertices, btAlignedObjectArray<btVector3>& planeEquationsOut );
00028 
00029               static void   getVerticesFromPlaneEquations(const btAlignedObjectArray<btVector3>& planeEquations , btAlignedObjectArray<btVector3>& verticesOut );
00030        
00031               static bool   isInside(const btAlignedObjectArray<btVector3>& vertices, const btVector3& planeNormal, btScalar  margin);
00032               
00033               static bool   isPointInsidePlanes(const btAlignedObjectArray<btVector3>& planeEquations, const btVector3& point, btScalar     margin);
00034 
00035               static bool   areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray<btVector3>& vertices, btScalar  margin);
00036 
00037 };
00038 
00039 
00040 #endif //BT_GEOMETRY_UTIL_H
00041