Bullet Collision Detection & Physics Library: btTriangleBuffer Class Reference

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
btTriangleBuffer Class Reference

The btTriangleBuffer callback can be useful to collect and store overlapping triangles between AABB and concave objects that support 'processAllTriangles' Example usage of this class: btTriangleBuffer triBuf; concaveShape->processAllTriangles(&triBuf,aabbMin, aabbMax); for (int i=0;i<triBuf.getNumTriangles();i++) { const btTriangle& tri = triBuf.getTriangle(i); //do something useful here with the triangle }. More...

`#include <btTriangleBuffer.h>`

Inheritance diagram for btTriangleBuffer:
[legend]
Collaboration diagram for btTriangleBuffer:
[legend]

## Public Member Functions
virtual void | processTriangle (btVector3 *triangle, int partId, int triangleIndex)
int | getNumTriangles () const
const btTriangle & | getTriangle (int index) const
void | clearBuffer ()
Public Member Functions inherited from btTriangleCallback
virtual | ~btTriangleCallback ()
virtual void | processTriangle (btVector3 *triangle, int partId, int triangleIndex)=0

## Private Attributes
btAlignedObjectArray< btTriangle > | m_triangleBuffer

## Detailed Description

The btTriangleBuffer callback can be useful to collect and store overlapping triangles between AABB and concave objects that support 'processAllTriangles' Example usage of this class: btTriangleBuffer triBuf; concaveShape->processAllTriangles(&triBuf,aabbMin, aabbMax); for (int i=0;i<triBuf.getNumTriangles();i++) { const btTriangle& tri = triBuf.getTriangle(i); //do something useful here with the triangle }.

Definition at line 40 of file btTriangleBuffer.h.

## Member Function Documentation

## ◆ clearBuffer()

void btTriangleBuffer::clearBuffer | ( |  | ) |
| inline

Definition at line 57 of file btTriangleBuffer.h.

## ◆ getNumTriangles()

int btTriangleBuffer::getNumTriangles | ( |  | ) | const
| inline

Definition at line 47 of file btTriangleBuffer.h.

## ◆ getTriangle()

const btTriangle & btTriangleBuffer::getTriangle | ( | int | index | ) | const
| inline

Definition at line 52 of file btTriangleBuffer.h.

## ◆ processTriangle()

void btTriangleBuffer::processTriangle | ( | btVector3 * | triangle,
|  | int | partId,
|  | int | triangleIndex
| ) |  |
| virtual

Implements btTriangleCallback.

Definition at line 18 of file btTriangleBuffer.cpp.

## Member Data Documentation

## ◆ m_triangleBuffer

btAlignedObjectArray<btTriangle> btTriangleBuffer::m_triangleBuffer
| private

Definition at line 42 of file btTriangleBuffer.h.

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

- btTriangleBuffer.h
- btTriangleBuffer.cpp