Box2D 形状坐标(Shape Coordinates)

Shape Coordinates
Posted on March 25, 2012
Keep in mind that a shape does not know about bodies and stand apart from the dynamics system. Shapes are stored in a compact form that is optimized for size and performance. As such, shapes are not easily moved around. You have to manually set the shape vertex positions to move a shape. However, when a shape is attached to a body using a fixture, the shapes move rigidly with the host body. In summary:


When a shape is not attached to a body, you can view it’s vertices as being expressed in world-space.
When a shape is attached to a body, you can view it’s vertices as being expressed in local coordinates.

形状坐标

发表于2012年3月25日
请记住,形状不知道有关刚体和保持距离的动态系统。形状被存储在一个最佳的大小和性能好的紧凑表里。因此,形状不容易四处移动。您必须手动设置形状的顶点位置移动形状。但是,当一个形状(shape)利用一个夹具依附到刚体上的话,形状的移动要严格跟宿主刚体保持一致。概括如下:

当形状不连接于一体,你可以查看它的顶点,在世界空间表示。
当一个形状连接于一体,你可以查看它的顶点在局部坐标表示。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值