Cornell Cocos
Cornell Extensions to Cocos2d
Public Member Functions | Public Attributes | List of all members
QueryProxy Class Reference
Inheritance diagram for QueryProxy:

Public Member Functions

 QueryProxy ()
 
bool ReportFixture (b2Fixture *fixture) override
 

Public Attributes

std::function< bool(b2Fixture *fixture)> onQuery
 

Detailed Description

A lightweight b2QueryCallback proxy.

This class allows us to replace the listener class with a modern closure.

Constructor & Destructor Documentation

QueryProxy::QueryProxy ( )
inline

Creates a new query proxy

Member Function Documentation

bool QueryProxy::ReportFixture ( b2Fixture *  fixture)
inlineoverride

Returns false to terminate an AABB query

This function is called for each fixture found in the query AABB.

Parameters
fixturethe fixture selected
Returns
false to terminate the query.

Member Data Documentation

std::function<bool(b2Fixture* fixture)> QueryProxy::onQuery

Returns false to terminate an AABB query

This function is called for each fixture found in the query AABB.

Parameters
fixturethe fixture selected
Returns
false to terminate the query.

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