btConvexPolyhedron.h
Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2011 Advanced Micro Devices, Inc.  http://bulletphysics.org
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the use of this software.
00007 Permission is granted to anyone to use this software for any purpose, 
00008 including commercial applications, and to alter it and redistribute it freely, 
00009 subject to the following restrictions:
00010 
00011 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.
00012 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00013 3. This notice may not be removed or altered from any source distribution.
00014 */
00015 
00016 
00018 
00019 
00020 #ifndef _BT_POLYHEDRAL_FEATURES_H
00021 #define _BT_POLYHEDRAL_FEATURES_H
00022 
00023 #include "LinearMath/btTransform.h"
00024 #include "LinearMath/btAlignedObjectArray.h"
00025 
00026 #define TEST_INTERNAL_OBJECTS 1
00027 
00028 
00029 struct btFace
00030 {
00031         btAlignedObjectArray<int>       m_indices;
00032 //      btAlignedObjectArray<int>       m_connectedFaces;
00033         btScalar        m_plane[4];
00034 };
00035 
00036 
00037 class btConvexPolyhedron
00038 {
00039         public:
00040         btConvexPolyhedron();
00041         virtual ~btConvexPolyhedron();
00042 
00043         btAlignedObjectArray<btVector3> m_vertices;
00044         btAlignedObjectArray<btFace>    m_faces;
00045         btAlignedObjectArray<btVector3> m_uniqueEdges;
00046 
00047         btVector3               m_localCenter;
00048         btVector3               m_extents;
00049         btScalar                m_radius;
00050         btVector3               mC;
00051         btVector3               mE;
00052 
00053         void    initialize();
00054         bool testContainment() const;
00055 
00056         void project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const;
00057 };
00058 
00059         
00060 #endif //_BT_POLYHEDRAL_FEATURES_H
00061 
00062 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:31