org.jbox2d.builders
Class BodyBuilder<K extends BodyBuilder<K,T>,T extends Shape>

java.lang.Object
  extended by org.jbox2d.builders.BodyBuilder<K,T>
Direct Known Subclasses:
BoxBuilder, ChainShapeBuilder, CircleShapeBuilder, PolygonShapeBuilder

public abstract class BodyBuilder<K extends BodyBuilder<K,T>,T extends Shape>
extends java.lang.Object

Author:
eppleton

Field Summary
protected  BodyDef bodyDef
           
protected  FixtureDef fixtureDef
           
protected  T shape
           
protected  World world
           
 
Constructor Summary
protected BodyBuilder(World world, T shape)
           
 
Method Summary
 K active(boolean active)
           
 K allowSleep(boolean allowSleep)
           
 K angle(float angle)
           
 K angularDamping(float angularDamping)
           
 K angularVelocity(float angularVelocity)
           
 K awake(boolean awake)
           
 Body build()
           
 K bullet(boolean bullet)
           
 K density(float density)
           
 K fixedRotation(boolean fixedRotation)
           
 K friction(float friction)
           
 K gravityScale(float scale)
           
 K linearDamping(float linearDamping)
           
 K position(float x, float y)
           
 K position(Vec2 position)
           
 K restitution(float restitution)
           
 K sensor(boolean sensor)
           
 K type(BodyType type)
           
 K userData(java.lang.Object userData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

world

protected World world

bodyDef

protected BodyDef bodyDef

shape

protected T extends Shape shape

fixtureDef

protected FixtureDef fixtureDef
Constructor Detail

BodyBuilder

protected BodyBuilder(World world,
                      T shape)
Method Detail

build

public Body build()

linearDamping

public K linearDamping(float linearDamping)

angularDamping

public K angularDamping(float angularDamping)

allowSleep

public K allowSleep(boolean allowSleep)

gravityScale

public K gravityScale(float scale)

active

public K active(boolean active)

angle

public K angle(float angle)

angularVelocity

public K angularVelocity(float angularVelocity)

awake

public K awake(boolean awake)

bullet

public K bullet(boolean bullet)

fixedRotation

public K fixedRotation(boolean fixedRotation)

userData

public K userData(java.lang.Object userData)

sensor

public K sensor(boolean sensor)

density

public K density(float density)

friction

public K friction(float friction)

position

public K position(Vec2 position)

position

public K position(float x,
                  float y)

restitution

public K restitution(float restitution)

type

public K type(BodyType type)


Copyright © 2012. All Rights Reserved.