Bullet Collision Detection & Physics Library
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SphereTriangleDetector Struct Reference

sphere-triangle to match the btDiscreteCollisionDetectorInterface More...

#include <SphereTriangleDetector.h>

Inheritance diagram for SphereTriangleDetector:
Inheritance graph
[legend]
Collaboration diagram for SphereTriangleDetector:
Collaboration graph
[legend]

Public Member Functions

virtual void getClosestPoints (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)
 
 SphereTriangleDetector (btSphereShape *sphere, btTriangleShape *triangle, btScalar contactBreakingThreshold)
 
virtual ~SphereTriangleDetector ()
 
bool collide (const btVector3 &sphereCenter, btVector3 &point, btVector3 &resultNormal, btScalar &depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold)
 
- Public Member Functions inherited from btDiscreteCollisionDetectorInterface
virtual ~btDiscreteCollisionDetectorInterface ()
 
virtual void getClosestPoints (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)=0
 

Private Member Functions

bool pointInTriangle (const btVector3 vertices[], const btVector3 &normal, btVector3 *p)
 
bool facecontains (const btVector3 &p, const btVector3 *vertices, btVector3 &normal)
 

Private Attributes

btSphereShapem_sphere
 
btTriangleShapem_triangle
 
btScalar m_contactBreakingThreshold
 

Detailed Description

sphere-triangle to match the btDiscreteCollisionDetectorInterface

Definition at line 25 of file SphereTriangleDetector.h.

Constructor & Destructor Documentation

◆ SphereTriangleDetector()

SphereTriangleDetector::SphereTriangleDetector ( btSphereShape sphere,
btTriangleShape triangle,
btScalar  contactBreakingThreshold 
)

Definition at line 21 of file SphereTriangleDetector.cpp.

◆ ~SphereTriangleDetector()

virtual SphereTriangleDetector::~SphereTriangleDetector ( )
inlinevirtual

Definition at line 31 of file SphereTriangleDetector.h.

Member Function Documentation

◆ collide()

bool SphereTriangleDetector::collide ( const btVector3 sphereCenter,
btVector3 point,
btVector3 resultNormal,
btScalar depth,
btScalar timeOfImpact,
btScalar  contactBreakingThreshold 
)

Definition at line 96 of file SphereTriangleDetector.cpp.

◆ facecontains()

bool SphereTriangleDetector::facecontains ( const btVector3 p,
const btVector3 vertices,
btVector3 normal 
)
private

Definition at line 88 of file SphereTriangleDetector.cpp.

◆ getClosestPoints()

void SphereTriangleDetector::getClosestPoints ( const ClosestPointInput input,
Result output,
class btIDebugDraw debugDraw,
bool  swapResults = false 
)
virtual

Implements btDiscreteCollisionDetectorInterface.

Definition at line 28 of file SphereTriangleDetector.cpp.

◆ pointInTriangle()

bool SphereTriangleDetector::pointInTriangle ( const btVector3  vertices[],
const btVector3 normal,
btVector3 p 
)
private

Definition at line 189 of file SphereTriangleDetector.cpp.

Member Data Documentation

◆ m_contactBreakingThreshold

btScalar SphereTriangleDetector::m_contactBreakingThreshold
private

Definition at line 41 of file SphereTriangleDetector.h.

◆ m_sphere

btSphereShape* SphereTriangleDetector::m_sphere
private

Definition at line 39 of file SphereTriangleDetector.h.

◆ m_triangle

btTriangleShape* SphereTriangleDetector::m_triangle
private

Definition at line 40 of file SphereTriangleDetector.h.


The documentation for this struct was generated from the following files: