PlayRho  2.0.0
An interactive physics engine & library.
Point Containment Test Functions

Collection of functions testing for a point's containment within various objects. More...

Functions

bool TestPoint (const DistanceProxy &proxy, const Length2 &point) noexcept
 Tests a point for containment in the given distance proxy. More...
 
bool playrho::d2::TestPoint (const DistanceProxy &proxy, const Length2 &point) noexcept
 Tests a point for containment in the given distance proxy. More...
 
bool TestPoint (const Shape &shape, const Length2 &point) noexcept
 Test a point for containment in the given shape. More...
 
bool playrho::d2::TestPoint (const Shape &shape, const Length2 &point) noexcept
 Test a point for containment in the given shape. More...
 
bool TestPoint (const World &world, BodyID bodyId, ShapeID shapeId, const Length2 &p)
 Tests a point for containment in a shape associated with a body. More...
 
bool playrho::d2::TestPoint (const World &world, BodyID bodyId, ShapeID shapeId, const Length2 &p)
 Tests a point for containment in a shape associated with a body. More...
 

Detailed Description

Collection of functions testing for a point's containment within various objects.

Function Documentation

◆ TestPoint() [1/6]

bool TestPoint ( const DistanceProxy proxy,
const Length2 point 
)
related

Tests a point for containment in the given distance proxy.

Parameters
proxyDistance proxy to check if point is within.
pointPoint in local coordinates.
Returns
true if point is contained in proxy, false otherwise.

◆ TestPoint() [2/6]

bool playrho::d2::TestPoint ( const DistanceProxy proxy,
const Length2 point 
)
noexcept

Tests a point for containment in the given distance proxy.

Parameters
proxyDistance proxy to check if point is within.
pointPoint in local coordinates.
Returns
true if point is contained in proxy, false otherwise.
Examples
WorldShape.cpp.

Referenced by playrho::d2::Shape::TestPoint(), and playrho::d2::World::TestPoint().

◆ TestPoint() [3/6]

bool TestPoint ( const Shape shape,
const Length2 point 
)
related

Test a point for containment in the given shape.

Parameters
shapeShape to use for test.
pointPoint in local coordinates.
Returns
true if the given point is contained by the given shape, false otherwise.

◆ TestPoint() [4/6]

bool playrho::d2::TestPoint ( const Shape shape,
const Length2 point 
)
noexcept

Test a point for containment in the given shape.

Parameters
shapeShape to use for test.
pointPoint in local coordinates.
Returns
true if the given point is contained by the given shape, false otherwise.

◆ TestPoint() [5/6]

bool TestPoint ( const World world,
BodyID  bodyId,
ShapeID  shapeId,
const Length2 p 
)
related

Tests a point for containment in a shape associated with a body.

Parameters
worldThe world that the given shape ID exists within.
bodyIdBody to use for test.
shapeIdShape to use for test.
pPoint in world coordinates.
Exceptions
std::out_of_rangeIf given an invalid body or shape identifier.

◆ TestPoint() [6/6]

bool playrho::d2::TestPoint ( const World world,
BodyID  bodyId,
ShapeID  shapeId,
const Length2 p 
)

Tests a point for containment in a shape associated with a body.

Parameters
worldThe world that the given shape ID exists within.
bodyIdBody to use for test.
shapeIdShape to use for test.
pPoint in world coordinates.
Exceptions
std::out_of_rangeIf given an invalid body or shape identifier.