Bullet Collision Detection & Physics Library
SpuContactResult.h
Go to the documentation of this file.
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 SPU_CONTACT_RESULT2_H
17 #define SPU_CONTACT_RESULT2_H
18 
19 
20 #ifndef _WIN32
21 #include <stdint.h>
22 #endif
23 
24 
25 
26 #include "../SpuDoubleBuffer.h"
27 
28 
29 #include "LinearMath/btTransform.h"
30 
31 
34 
35 class btCollisionShape;
36 
37 
39 {
42 
50 
53 
55  bool m_useEpa;
56 };
57 
58 
60 {
62 };
63 
67 {
71 
76 
78 
80 
81  public:
83  virtual ~SpuContactResult();
84 
86  {
87  return m_spuManifold;
88  }
89 
90  virtual void setShapeIdentifiersA(int partId0,int index0);
91  virtual void setShapeIdentifiersB(int partId1,int index1);
92 
93  void setContactInfo(btPersistentManifold* spuManifold, ppu_address_t manifoldAddress,const btTransform& worldTrans0,const btTransform& worldTrans1, btScalar restitution0,btScalar restitution1, btScalar friction0,btScalar friction01, bool isSwapped);
94 
95 
97 
98  virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth);
99 
100  void flush();
101 };
102 
103 
104 
105 #endif //SPU_CONTACT_RESULT2_H
106 
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
DoubleBuffer< btPersistentManifold, 1 > g_manifoldDmaExport
ppu_address_t m_persistentManifoldPtr
btTransform m_worldTransform0
btTransform m_worldTransform1
uint32_t ppu_address_t
btPersistentManifold * GetSpuManifold() const
btVector3 m_primitiveDimensions0
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
SpuContactResult exports the contact points using double-buffered DMA transfers, only when needed So ...
btScalar m_combinedRestitution
ppu_address_t m_collisionShapes[2]
void writeDoubleBufferedManifold(btPersistentManifold *lsManifold, btPersistentManifold *mmManifold)
btPersistentManifold * m_spuManifold
btTransform m_rootWorldTransform0
btTransform m_rootWorldTransform1
btCollisionShape * m_spuCollisionShapes[2]
btVector3 m_primitiveDimensions1
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:83
virtual ~SpuContactResult()
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:34
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
btScalar m_combinedFriction
virtual void setShapeIdentifiersA(int partId0, int index0)
setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material comb...
void setContactInfo(btPersistentManifold *spuManifold, ppu_address_t manifoldAddress, const btTransform &worldTrans0, const btTransform &worldTrans1, btScalar restitution0, btScalar restitution1, btScalar friction0, btScalar friction01, bool isSwapped)
ppu_address_t m_manifoldAddress
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:266
virtual void setShapeIdentifiersB(int partId1, int index1)
struct SpuConvexPolyhedronVertexData * m_convexVertexData[2]