Public Types | Public Member Functions | Public Attributes | List of all members
PolygonShapesCallback Class Reference
Inheritance diagram for PolygonShapesCallback:
Inheritance graph
[legend]

Public Types

enum  { e_maxCount = 4 }
 

Public Member Functions

 PolygonShapesCallback ()
 
bool ReportFixture (b2Fixture *fixture) override
 
- Public Member Functions inherited from b2QueryCallback
virtual ~b2QueryCallback ()
 

Public Attributes

b2Drawg_debugDraw
 
b2CircleShape m_circle
 
int32 m_count
 
b2Transform m_transform
 

Detailed Description

This tests stacking. It also shows how to use b2World::Query and b2TestOverlap. This callback is called by b2World::QueryAABB. We find all the fixtures that overlap an AABB. Of those, we use b2TestOverlap to determine which fixtures overlap a circle. Up to 4 overlapped fixtures will be highlighted with a yellow border.

Definition at line 31 of file polygon_shapes.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
e_maxCount 

Definition at line 35 of file polygon_shapes.cpp.

Constructor & Destructor Documentation

◆ PolygonShapesCallback()

PolygonShapesCallback::PolygonShapesCallback ( )
inline

Definition at line 40 of file polygon_shapes.cpp.

Member Function Documentation

◆ ReportFixture()

bool PolygonShapesCallback::ReportFixture ( b2Fixture fixture)
inlineoverridevirtual

Called for each fixture found in the query AABB.

Returns
false to terminate the query.

Implements b2QueryCallback.

Definition at line 47 of file polygon_shapes.cpp.

Member Data Documentation

◆ g_debugDraw

b2Draw* PolygonShapesCallback::g_debugDraw

Definition at line 72 of file polygon_shapes.cpp.

◆ m_circle

b2CircleShape PolygonShapesCallback::m_circle

Definition at line 70 of file polygon_shapes.cpp.

◆ m_count

int32 PolygonShapesCallback::m_count

Definition at line 73 of file polygon_shapes.cpp.

◆ m_transform

b2Transform PolygonShapesCallback::m_transform

Definition at line 71 of file polygon_shapes.cpp.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:23