Artenus 2D Framework
Artenus Reference
Represents a Shape consisting of a convex polygon.
public final class PolygonShape
implements Shape

Field Summary

Modifier and TypeField and Description
public static final TYPE
Type value representing a polygonal shape.

Constructor Summary

Modifier and TypeConstructor and Description
public PolygonShape(Point2D[] points)
Constructs a PolygonShape using the convex hull of the given points.

Method Summary

Modifier and TypeMethod and Description
public ObjectcreateInternal()
Creates an internal representation of this Shape.
public intgetType()
Gets the type of this Shape.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TYPE
public static final TYPE
Type value representing a polygonal shape.

Constructor Detail

PolygonShape
public  PolygonShape(
    Point2D[] points
)
Constructs a PolygonShape using the convex hull of the given points.
Parameters:
pointsThe array of points making the desired polygon

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