Bullet Collision Detection & Physics Library: btGeometryUtil.h Source File

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

btGeometryUtil.h
Go to the documentation of this file.
1/*
2Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans https://bulletphysics.org
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#ifndef BT_GEOMETRY_UTIL_H
16#define BT_GEOMETRY_UTIL_H
17
18#include "btVector3.h"
19#include "btAlignedObjectArray.h"
20
22 class btGeometryUtil
23{
24public:
25 static void getPlaneEquationsFromVertices(btAlignedObjectArray<btVector3>& vertices, btAlignedObjectArray<btVector3>& planeEquationsOut);
26
27 static void getVerticesFromPlaneEquations(const btAlignedObjectArray<btVector3>& planeEquations, btAlignedObjectArray<btVector3>& verticesOut);
28
29 static bool isInside(const btAlignedObjectArray<btVector3>& vertices, const btVector3& planeNormal, btScalar margin);
30
31 static bool isPointInsidePlanes(const btAlignedObjectArray<btVector3>& planeEquations, const btVector3& point, btScalar margin);
32
33 static bool areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray<btVector3>& vertices, btScalar margin);
34};
35
36#endif //BT_GEOMETRY_UTIL_H
btAlignedObjectArray.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
btVector3.h
btAlignedObjectArray
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
Definition: btAlignedObjectArray.h:46
btGeometryUtil
The btGeometryUtil helper class provides a few methods to convert between plane equations and vertice...
Definition: btGeometryUtil.h:23
btGeometryUtil::isInside
static bool isInside(const btAlignedObjectArray< btVector3 > &vertices, const btVector3 &planeNormal, btScalar margin)
btGeometryUtil::getVerticesFromPlaneEquations
static void getVerticesFromPlaneEquations(const btAlignedObjectArray< btVector3 > &planeEquations, btAlignedObjectArray< btVector3 > &verticesOut)
Definition: btGeometryUtil.cpp:119
btGeometryUtil::areVerticesBehindPlane
static bool areVerticesBehindPlane(const btVector3 &planeNormal, const btAlignedObjectArray< btVector3 > &vertices, btScalar margin)
Definition: btGeometryUtil.cpp:44
btGeometryUtil::getPlaneEquationsFromVertices
static void getPlaneEquationsFromVertices(btAlignedObjectArray< btVector3 > &vertices, btAlignedObjectArray< btVector3 > &planeEquationsOut)
Definition: btGeometryUtil.cpp:75
btGeometryUtil::isPointInsidePlanes
static bool isPointInsidePlanes(const btAlignedObjectArray< btVector3 > &planeEquations, const btVector3 &point, btScalar margin)
Definition: btGeometryUtil.cpp:29
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:82