com.annahid.libs.artenus.physics
PolygonShape
Represents a
Shape
consisting of a convex polygon. public final class PolygonShape implements Shape
Field Summary
Modifier and Type | Field and Description |
---|---|
public static final | TYPE Type value representing a polygonal shape. |
Constructor Summary
Modifier and Type | Constructor and Description |
---|---|
public | PolygonShape(Point2D[] points) Constructs a PolygonShape using the convex hull of the given points. |
Method Summary
Modifier and Type | Method and Description |
---|---|
public Object | createInternal() Creates an internal representation of this Shape. |
public int | getType() Gets the type of this Shape . |
Methods inherited from java.lang.Object
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
, wait
, wait
Constructor Detail
PolygonShape | ||
---|---|---|
public PolygonShape( Point2D[] points )Constructs a PolygonShape using the convex hull of the given points. Parameters:
|
Method Detail
createInternal |
---|
public Object createInternal() Creates an internal representation of this Shape. The exact type of the returned
object depends on the physics simulation engine used internally. Specified By:
Returns:
Box2D representation of this Shape |
getType |
---|
public int getType() Gets the type of this Shape .Specified By:
Returns:
The type of the shape |