Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/physics/src/bullet/LinearMath/btGeometryUtil.h @ 2430

Last change on this file since 2430 was 2192, checked in by rgrieder, 16 years ago

Reverted all changes of attempt to update physics branch.

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/*
2Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans  http://continuousphysics.com/Bullet/
3
4This software is provided 'as-is', without any express or implied warranty.
5In no event will the authors be held liable for any damages arising from the use of this software.
6Permission is granted to anyone to use this software for any purpose,
7including commercial applications, and to alter it and redistribute it freely,
8subject to the following restrictions:
9
101. 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.
112. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
123. This notice may not be removed or altered from any source distribution.
13*/
14
15
16#ifndef BT_GEOMETRY_UTIL_H
17#define BT_GEOMETRY_UTIL_H
18
19#include "btVector3.h"
20#include "btAlignedObjectArray.h"
21
22///The btGeometryUtil helper class provides a few methods to convert between plane equations and vertices.
23class btGeometryUtil
24{
25        public:
26       
27       
28                static void     getPlaneEquationsFromVertices(btAlignedObjectArray<btVector3>& vertices, btAlignedObjectArray<btVector3>& planeEquationsOut );
29
30                static void     getVerticesFromPlaneEquations(const btAlignedObjectArray<btVector3>& planeEquations , btAlignedObjectArray<btVector3>& verticesOut );
31       
32                static bool     isInside(const btAlignedObjectArray<btVector3>& vertices, const btVector3& planeNormal, btScalar        margin);
33               
34                static bool     isPointInsidePlanes(const btAlignedObjectArray<btVector3>& planeEquations, const btVector3& point, btScalar     margin);
35
36                static bool     areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray<btVector3>& vertices, btScalar  margin);
37
38};
39
40
41#endif //BT_GEOMETRY_UTIL_H
42
Note: See TracBrowser for help on using the repository browser.