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) {
    this.world = world;
   
    Body body1 = new StaticBody("Ground1", new Box(400.0f, 20.0f));
    body1.setPosition(250.0f, 400);
    body1.setFriction(1);
    world.add(body1);
   
    for (int y=0;y<7;y++) {
      int xbase = 250 - (y * 21);
      for (int x=0;x<y+1;x++) {
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(190,0));
    land.setPosition(50,400);
    world.add(land);
    Body land2 = new StaticBody("Box1", new Box(190,10));
    land2.setPosition(350,405);
    world.add(land2);
   
    Body box = new Body("Faller", new Box(50,50), 1);
    box.setPosition(150,100);
    box.setRotation(0.5f);
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 body1a = new StaticBody("Ground2", new Box(200.0f, 20.0f));
    body1a.setPosition(350.0f, 280);
    body1a.setRotation(-0.7f);
    world.add(body1a);
    Body body1b = new StaticBody("Ground1", new Box(20.0f, 400.0f));
    body1b.setPosition(20.0f, 200);
    world.add(body1b);
   
    Body body2 = new Body("Mover1", new Circle(25), 100.0f);
    body2.setPosition(300.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 Box(600.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, 340);
    body3.setRotation(0.4f);
    world.add(body3);
    Body body9 = new StaticBody("Ground3", new Box(200.0f, 20.0f));
    body9.setPosition(140.0f, 340);
    body9.setRotation(-0.4f);
    world.add(body9);
    Body bodya = new StaticBody("Wall1", new Box(20.0f, 400.0f));
    bodya.setPosition(20.0f, 190);
    world.add(bodya);
    Body bodyb = new StaticBody("Wall2", new Box(20.0f, 400.0f));
    bodyb.setPosition(480.0f, 190);
    world.add(bodyb);
   
    Body body2 = new Body("Mover1", new Box(50.0f, 50.0f), 100.0f);
    body2.setPosition(250.0f, 4.0f);
    body2.setRotation(0.2f);
View Full Code Here

   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    Vector2f[] groundVerts = {new Vector2f(-200, -10), new Vector2f(200,-10), new Vector2f(200,10), new Vector2f(-200,10)};
    ConvexPolygon groundBox = new ConvexPolygon(groundVerts);
    Body ground = new StaticBody("ground", groundBox);
    ground.setPosition(250, 50);
    world.add(ground);
   
    {
      int noVerts = 40;
      Vector2f[] circleVerts = new Vector2f[noVerts];
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 body1b = new StaticBody("Ground1", new Box(20.0f, 400.0f));
    body1b.setPosition(20.0f, 200);
    world.add(body1b);

    Body body3 = new Body("Mover2", new Circle(25), 50.0f);
    body3.setPosition(225.0f, 365);
    world.add(body3);
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(100,400);
    knot.setRotation(0.5f);
    world.add(knot);
    int N=8;
    Body balls[] = new Body[N];
    for(int i=0;i<N;i++){
      Body ball = new Body(new Circle(5),10);
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(500.0f, 20.0f));
    body1.setPosition(250.0f, 400);
    world.add(body1);
   
    Body body2 = new Body("Teeter", new Box(250.0f, 10.0f), 5);
    body2.setFriction(0.5f);
    body2.setPosition(250.0f, 370);
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, 50);
    world.add(body1);
   
    Body body2 = new Body("Mover1", new Box(20.0f, 20.0f), 100.0f);
    body2.setPosition(100.0f, 100f);
    world.add(body2);
View Full Code Here

   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
   */
  protected void init(World world) {
    this.world = world;
   
    Body body1 = new StaticBody("Ground1", new Box(400.0f, 20.0f));
    body1.setPosition(250.0f, 400);
    body1.setFriction(1);
    world.add(body1);
   
    for (int y=0;y<5;y++) {
      int xbase = 250 - (y * 21);
      for (int x=0;x<y+1;x++) {
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.