com.badlogic.gdx.physics.box2d
Class EdgeShape

java.lang.Object
  extended by com.badlogic.gdx.physics.box2d.Shape
      extended by com.badlogic.gdx.physics.box2d.EdgeShape

public class EdgeShape
extends Shape

A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The connectivity information is used to ensure correct contact normals.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.badlogic.gdx.physics.box2d.Shape
Shape.Type
 
Constructor Summary
EdgeShape()
           
 
Method Summary
 Shape.Type getType()
          Get the type of this shape.
 void getVertex1(Vector2 vec)
           
 void getVertex2(Vector2 vec)
           
 void set(float v1X, float v1Y, float v2X, float v2Y)
          Set this as an isolated edge.
 void set(Vector2 v1, Vector2 v2)
          Set this as an isolated edge.
 
Methods inherited from class com.badlogic.gdx.physics.box2d.Shape
dispose, getChildCount, getRadius, setRadius
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeShape

public EdgeShape()
Method Detail

set

public void set(Vector2 v1,
                Vector2 v2)
Set this as an isolated edge.


set

public void set(float v1X,
                float v1Y,
                float v2X,
                float v2Y)
Set this as an isolated edge.


getVertex1

public void getVertex1(Vector2 vec)

getVertex2

public void getVertex2(Vector2 vec)

getType

public Shape.Type getType()
Description copied from class: Shape
Get the type of this shape. You can use this to down cast to the concrete shape.

Specified by:
getType in class Shape
Returns:
the shape type.


Copyright © 2013. All Rights Reserved.