~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to extern/bullet/Bullet/CollisionShapes/MultiSphereShape.h

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Bullet Continuous Collision Detection and Physics Library
3
 
Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
4
 
 
5
 
This software is provided 'as-is', without any express or implied warranty.
6
 
In no event will the authors be held liable for any damages arising from the use of this software.
7
 
Permission is granted to anyone to use this software for any purpose, 
8
 
including commercial applications, and to alter it and redistribute it freely, 
9
 
subject to the following restrictions:
10
 
 
11
 
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.
12
 
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13
 
3. This notice may not be removed or altered from any source distribution.
14
 
*/
15
 
 
16
 
#ifndef MULTI_SPHERE_MINKOWSKI_H
17
 
#define MULTI_SPHERE_MINKOWSKI_H
18
 
 
19
 
#include "ConvexShape.h"
20
 
#include "BroadphaseCollision/BroadphaseProxy.h" // for the types
21
 
 
22
 
#define MAX_NUM_SPHERES 5
23
 
 
24
 
///MultiSphereShape represents implicit convex hull of a collection of spheres (using getSupportingVertex)
25
 
class MultiSphereShape : public ConvexShape
26
 
 
27
 
{
28
 
        
29
 
        SimdVector3 m_localPositions[MAX_NUM_SPHERES];
30
 
        SimdScalar  m_radi[MAX_NUM_SPHERES];
31
 
        SimdVector3     m_inertiaHalfExtents;
32
 
 
33
 
        int m_numSpheres;
34
 
        float m_minRadius;
35
 
 
36
 
 
37
 
 
38
 
 
39
 
 
40
 
public:
41
 
        MultiSphereShape (const SimdVector3& inertiaHalfExtents,const SimdVector3* positions,const SimdScalar* radi,int numSpheres);
42
 
 
43
 
        ///CollisionShape Interface
44
 
        virtual void    CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia);
45
 
 
46
 
        /// ConvexShape Interface
47
 
        virtual SimdVector3     LocalGetSupportingVertexWithoutMargin(const SimdVector3& vec)const;
48
 
 
49
 
        virtual void    BatchedUnitVectorGetSupportingVertexWithoutMargin(const SimdVector3* vectors,SimdVector3* supportVerticesOut,int numVectors) const;
50
 
        
51
 
 
52
 
        virtual int     GetShapeType() const { return MULTI_SPHERE_SHAPE_PROXYTYPE; }
53
 
 
54
 
        virtual char*   GetName()const 
55
 
        {
56
 
                return "MultiSphere";
57
 
        }
58
 
 
59
 
};
60
 
 
61
 
 
62
 
#endif //MULTI_SPHERE_MINKOWSKI_H