org.jbox2d.dynamics.Body.getFixtureList()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(175)

本文整理了Java中org.jbox2d.dynamics.Body.getFixtureList()方法的一些代码示例,展示了Body.getFixtureList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getFixtureList()方法的具体详情如下:
包路径:org.jbox2d.dynamics.Body
类名称:Body
方法名:getFixtureList

Body.getFixtureList介绍

[英]Get the list of all fixtures attached to this body.
[中]获取连接到此实体的所有装置的列表。

代码示例

代码示例来源:origin: libgdx/libgdx

for (Body b = m_bodyList; b != null; b = b.getNext()) {
 xf.set(b.getTransform());
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  if (b.isActive() == false) {
   color.set(0.5f, 0.5f, 0.3f);
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  for (int i = 0; i < f.m_proxyCount; ++i) {
   FixtureProxy proxy = f.m_proxies[i];

代码示例来源:origin: konsoletyper/teavm

context.translate(center.x, center.y);
context.rotate(body.getAngle());
for (Fixture fixture = body.getFixtureList(); fixture != null; fixture = fixture.getNext()) {
  Shape shape = fixture.getShape();
  if (shape.getType() == ShapeType.CIRCLE) {

代码示例来源:origin: stackoverflow.com

public void checkOutTheseFixtures(Body body) {
  for (Fixture fixture = body.getFixtureList(); fixture != null; fixture = fixture.getNext()) {
    checkOutThisFixture(fixture);
  }
}

代码示例来源:origin: jbox2d/jbox2d

for (Body b = m_bodyList; b != null; b = b.getNext()) {
 xf.set(b.getTransform());
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  if (b.isActive() == false) {
   color.set(0.5f, 0.5f, 0.3f);
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  for (int i = 0; i < f.m_proxyCount; ++i) {
   FixtureProxy proxy = f.m_proxies[i];

代码示例来源:origin: stackoverflow.com

public void draw(Canvas canvas){
  Body body = world.getBodyList();
  while(body != null){
    Fixture fixture = body.getFixtureList();
    while(fixture != null){
      ShapeType type = fixture.getType();
      if(type == ShapeType.POLYGON){
        PolygonShape shape = (PolygonShape)fixture.getShape();
        // draw shape
      }else if(type == ShapeType.CIRCLE){
        CircleShape shape = (CircleShape)fixture.getShape();
        // draw shape
      }
      fixture = fixture.getNext();
    }
    body = body.getNext();
  }       
}

代码示例来源:origin: mirkosertic/GameComposer

aCanvas.drawPosition(toPosition(theBodyPosition));
Fixture theFixture = theBody.getFixtureList();
while (theFixture != null) {
  Shape theShape = theFixture.getShape();

代码示例来源:origin: org.jbox2d/jbox2d-library

for (Body b = m_bodyList; b != null; b = b.getNext()) {
 xf.set(b.getTransform());
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  if (b.isActive() == false) {
   color.set(0.5f, 0.5f, 0.3f);
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  for (int i = 0; i < f.m_proxyCount; ++i) {
   FixtureProxy proxy = f.m_proxies[i];

代码示例来源:origin: andmizi/MobikeTags

for (Body b = m_bodyList; b != null; b = b.getNext()) {
 xf.set(b.getTransform());
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  if (b.isActive() == false) {
   color.set(0.5f, 0.5f, 0.3f);
 for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
  for (int i = 0; i < f.m_proxyCount; ++i) {
   FixtureProxy proxy = f.m_proxies[i];

相关文章