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

« back to all changes in this revision

Viewing changes to extern/bullet/Bullet/CollisionShapes/Simplex1to4Shape.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 BU_SIMPLEX_1TO4_SHAPE
17
 
#define BU_SIMPLEX_1TO4_SHAPE
18
 
 
19
 
 
20
 
#include <CollisionShapes/PolyhedralConvexShape.h>
21
 
#include "BroadphaseCollision/BroadphaseProxy.h"
22
 
 
23
 
 
24
 
///BU_Simplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex).
25
 
class BU_Simplex1to4 : public PolyhedralConvexShape
26
 
{
27
 
protected:
28
 
 
29
 
        int     m_numVertices;
30
 
        SimdPoint3      m_vertices[4];
31
 
 
32
 
public:
33
 
        BU_Simplex1to4();
34
 
 
35
 
        BU_Simplex1to4(const SimdPoint3& pt0);
36
 
        BU_Simplex1to4(const SimdPoint3& pt0,const SimdPoint3& pt1);
37
 
        BU_Simplex1to4(const SimdPoint3& pt0,const SimdPoint3& pt1,const SimdPoint3& pt2);
38
 
        BU_Simplex1to4(const SimdPoint3& pt0,const SimdPoint3& pt1,const SimdPoint3& pt2,const SimdPoint3& pt3);
39
 
 
40
 
    
41
 
        void    Reset()
42
 
        {
43
 
                m_numVertices = 0;
44
 
        }
45
 
        
46
 
 
47
 
        virtual int     GetShapeType() const{ return TETRAHEDRAL_SHAPE_PROXYTYPE; }
48
 
 
49
 
        void AddVertex(const SimdPoint3& pt);
50
 
 
51
 
        //PolyhedralConvexShape interface
52
 
 
53
 
        virtual int     GetNumVertices() const;
54
 
 
55
 
        virtual int GetNumEdges() const;
56
 
 
57
 
        virtual void GetEdge(int i,SimdPoint3& pa,SimdPoint3& pb) const;
58
 
        
59
 
        virtual void GetVertex(int i,SimdPoint3& vtx) const;
60
 
 
61
 
        virtual int     GetNumPlanes() const;
62
 
 
63
 
        virtual void GetPlane(SimdVector3& planeNormal,SimdPoint3& planeSupport,int i) const;
64
 
 
65
 
        virtual int GetIndex(int i) const;
66
 
 
67
 
        virtual bool IsInside(const SimdPoint3& pt,SimdScalar tolerance) const;
68
 
 
69
 
 
70
 
        ///GetName is for debugging
71
 
        virtual  char*  GetName()const { return "BU_Simplex1to4";}
72
 
 
73
 
};
74
 
 
75
 
#endif //BU_SIMPLEX_1TO4_SHAPE