Artenus 2D Framework
Artenus Reference
Represents a rectangular Shape that can be used for physical simulation.
public final class RectangleShape
implements Shape

Field Summary

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

Constructor Summary

Modifier and TypeConstructor and Description
public RectangleShape(float width, float height)
Creates a RectangleShape with given dimensions.

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 rectangular shape.

Constructor Detail

RectangleShape
public  RectangleShape(
    float width,
    float height
)
Creates a RectangleShape with given dimensions.
Parameters:
widthThe width of the rectangle
heightThe height of the rectangle

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