Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F129944
BulletCollisionResult.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
BulletCollisionResult.h
View Options
#ifndef ECHOBULLETMANIFOLDRESULT_H
#define ECHOBULLETMANIFOLDRESULT_H
#include
<echo/Physics/CollisionResult.h>
#include
<BulletCollision/CollisionDispatch/btManifoldResult.h>
namespace
Echo
{
class
BulletCollisionResult
:
public
CollisionResult
,
public
btManifoldResult
{
public
:
BulletCollisionResult
(
const
btCollisionObjectWrapper
*
body0
,
const
btCollisionObjectWrapper
*
body1
)
:
btManifoldResult
(
body0
,
body1
),
mNumberOfContactPoints
(
0
),
mLastContactPoint
(
Vector3
::
ZERO
)
{}
~
BulletCollisionResult
(){}
virtual
Size
GetNumberOfContactPoints
()
const
override
{
return
mNumberOfContactPoints
;}
virtual
Vector3
GetLastContactPoint
()
const
override
{
return
mLastContactPoint
;}
private
:
/**
* Called by bullet to add a contact point.
*/
virtual
void
addContactPoint
(
const
btVector3
&
normalOnBInWorld
,
const
btVector3
&
pointInWorld
,
btScalar
depth
)
override
{
mNumberOfContactPoints
++
;
mLastContactPoint
.
x
=
pointInWorld
.
getX
();
mLastContactPoint
.
y
=
pointInWorld
.
getY
();
mLastContactPoint
.
z
=
pointInWorld
.
getZ
();
btManifoldResult
::
addContactPoint
(
normalOnBInWorld
,
pointInWorld
,
depth
);
}
Size
mNumberOfContactPoints
;
Vector3
mLastContactPoint
;
};
}
#endif
/* BULLETMANIFOLDRESULT_H */
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, May 18, 8:41 PM (1 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
76683
Default Alt Text
BulletCollisionResult.h (1 KB)
Attached To
Mode
rEE Echo 3
Attached
Detach File
Event Timeline
Log In to Comment