Package net.phys2d.raw

Examples of net.phys2d.raw.StaticBody


  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body body1 = new StaticBody("Ground1", new Box(400.0f, 20.0f));
    body1.setPosition(250.0f, 300);
    world.add(body1);
    body1 = new StaticBody("Ground1", new Box(20.0f, 400.0f));
    body1.setPosition(40.0f, 150);
    world.add(body1);
    body1 = new StaticBody("Ground1", new Box(20.0f, 400.0f));
    body1.setPosition(460.0f, 150);
    world.add(body1);
   
    Body body2 = new Body("Mover1", new Circle(15), 10.0f);
    body2.setPosition(200.0f, 30.0f);
    world.add(body2);
View Full Code Here


  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body land = new StaticBody("Line1", new Line(100,50));
    land.setPosition(150,150);
    world.add(land);
    land = new StaticBody("Line2", new Line(150,-75));
    land.setPosition(250,300);
    world.add(land);
    land = new StaticBody("Line2", new Line(150,75));
    land.setPosition(100,350);
    world.add(land);
    land = new StaticBody("Line2", new Line(150,0));
    land.setPosition(300,450);
    world.add(land);
   
    box = new Body("Faller", new Box(50,50), 1);
    box.setPosition(200,50);
    world.add(box);
View Full Code Here

 
  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body leftAxis = new StaticBody(new Circle(10));
    leftAxis.setPosition(100,250);
    leftAxis.setRestitution(1);
    world.add(leftAxis);
   
    wheel = new Body(new Circle(70),400);
    wheel.setPosition(400, 250);
    wheel.setMoveable(false);
View Full Code Here

 
  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body knot = new StaticBody(new Circle(10));
    knot.setPosition(250,100);
    world.add(knot);
   
    int N=5;
    Body bodies[] = new Body[N];
    for(int i=0;i<N;i++){
View Full Code Here

  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body body1 = new StaticBody("Ground1", new Box(400.0f, 20.0f));
    body1.setPosition(250.0f, 400);
    world.add(body1);
    Body body3 = new StaticBody("Ground2", new Box(200.0f, 20.0f));
    body3.setPosition(250.0f, 100);
    world.add(body3);
   
    Body swing = new Body("Swing", new Circle(10), 50);
    swing.setPosition(160.0f, 300);
    world.add(swing);
View Full Code Here

    if (!added) {
      world.addListener(this);
      added = true;
    }
   
    Body body1 = new StaticBody("Ground1", new Box(400.0f, 20.0f));
    body1.setPosition(250.0f, 400);
    world.add(body1);
    Body body3 = new StaticBody("Ground2", new Box(200.0f, 20.0f));
    body3.setPosition(360.0f, 380);
    world.add(body3);
    Body body5 = new StaticBody("Ground3", new Box(20.0f, 100.0f));
    body5.setPosition(200.0f, 300);
    world.add(body5);
    Body body6 = new StaticBody("Ground3", new Box(20.0f, 100.0f));
    body6.setPosition(400.0f, 300);
    world.add(body6);
   
    Body body2 = new Body("Mover1", new Box(50.0f, 50.0f), 100.0f);
    body2.setPosition(250.0f, 4.0f);
    world.add(body2);
View Full Code Here

 
  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body b1 = new StaticBody("Anchor", new Box(500.0f, 20.0f));
    b1.setFriction(0.2f);
    b1.setPosition(250.0f, 100);
    b1.setRotation(0);
    world.add(b1);

    for (int i=0;i<9;i++) {
      float size = 10;
      if (i == 0) {
View Full Code Here

 
  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body b1 = new StaticBody("Anchor", new Box(500.0f, 20.0f));
    b1.setFriction(0.2f);
    b1.setPosition(250.0f, 100);
    b1.setRotation(0);
    world.add(b1);

    for (int i=0;i<9;i++) {
      float size = 6;
      if (i == 0) {
View Full Code Here

  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body body1 = new StaticBody("Ground1", new Box(400.0f, 20.0f));
    body1.setPosition(250.0f, 400);
    world.add(body1);
    Body body3 = new StaticBody("Ground2", new Box(200.0f, 20.0f));
    body3.setPosition(360.0f, 380);
    world.add(body3);
    Body body5 = new StaticBody("Ground3", new Box(20.0f, 100.0f));
    body5.setPosition(200.0f, 300);
    world.add(body5);
    Body body6 = new StaticBody("Ground3", new Box(20.0f, 100.0f));
    body6.setPosition(400.0f, 300);
    world.add(body6);
   
    Body body2 = new Body("Mover1", new Box(50.0f, 50.0f), 100.0f);
    body2.setPosition(250.0f, 4.0f);
    world.add(body2);
View Full Code Here

  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Body body1 = new StaticBody("Ground1", new Line(-300.0f, 0, false, true));
    body1.setPosition(400, 300);
    world.add(body1);
    Body body3 = new StaticBody("Ground2", new Line(0,50, false, true));
    body3.setPosition(100, 301);
    world.add(body3);
   
    body2 = new Body("Mover1", new Box(40,40), 10.0f);
    body2.setPosition(150.0f, 280.0f);
    world.add(body2);
View Full Code Here

TOP

Related Classes of net.phys2d.raw.StaticBody

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.