Box2d v2.1.0 user manual translation-Chapter 12th, 13, 14

Source: Internet
Author: User

Many excerpted content
Translated by Aman JiangBox2d v2.0.1 User Manual

Chapter 4 debug drawing)

The implementation of b2debugdraw allows you to get a detailed picture of the physical world. Here is the available entity:

• Shape Contour

• Joint connectivity

• Core shape (for continuous collision)

• Broad-phase AABB, including the world's AABB

• Polygon Oriented Bounding Boxes (obbs)

• Broad-phase pairs (potential contacts)

• Centroid

This is the first way to draw these physical entities, which is better than accessing data directly. Because a lot of necessary information can only be accessed internally and changed from time to time.

Testbed uses debug drawing and contact listener to draw physical entities. It is a good example to demonstrate how to implement debug drawing and how to draw contact points.

Chapter 1 limitations)

Box2d uses some numerical approximation to make the simulation more efficient. This imposes some restrictions.

This is the current limit:

1. placing a heavy object on a relatively light object will be unstable. When the mass ratio is, the stability will decrease.

2. polygons may not slide smoothly over chains of edge shapes or other polygon shapes that are aligned. for this reason, tile-based environments may not have smooth collision with box-like characters. this problem will be fixed in the future.

3. link the body with a joint. If a lighter body hangs a heavier object, the body link may be stretched. For example, a very light chain hanging a heavy ball may be unstable. When the mass ratio exceeds, the stability will decrease.

4. There is usually a gap of about 5cm, And the collision between the shape and the shape is detected.

5. Continuous collision is handled in order. In the event of an impact, the body moves backward and stays there for the rest of the time. This may make the fast moving objects not smooth.

Chapter 1 References (references)

Erin catto GDC Tutorial: http://code.google.com/p/box2d/downloads/list

Collision Detection in interactive 3D environments, Gino van den Bergen, 2004

Real-time collision detection, faster ster Ericson, 2005

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.