Box2D::b2Manifold - Manifold for two touching convex shapes.
my $manifold = $contact->GetManifold(); my $normal = $manifold->localNormal(); my $point = $manifold->localPoint();
A manifold for two touching convex shapes.
Box2D supports multiple types of contact:
Box2D
clip point versus plane with radius
point versus point with radius (circles)
The local point usage depends on the manifold type:
e_circles: the local center of circleA
e_circles
e_faceA: the center of faceA
e_faceA
e_faceB: the center of faceB
e_faceB
Similarly the local normal usage:
e_circles: not used
e_faceA: the normal on polygonA
e_faceB: the normal on polygonB
We store contacts in this way so that position correction can account for movement, which is critical for continuous physics. All contact scenarios must be expressed in one of these types. This structure is stored across time steps, so we keep it small.
Default constructor.
not use for Type::e_points
Parameters:
Box2D::b2Vec2 $localNormal (optional)
Box2D::b2Vec2
$localNormal
Returns a Box2D::b2Vec2
usage depends on manifold type
Box2D::b2Vec2 $localPoint (optional)
$localPoint
the number of manifold points
int32 $pointCount (optional)
int32
$pointCount
Returns a int32
Box2D::b2Contact
See "BUGS" in Box2D
See "AUTHORS" in Box2D
See "COPYRIGHT & LICENSE" in Box2D
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box2D
CPAN shell
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.